You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
4.6 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/life/temp/index"],{"20b1":function(e,t,n){},"6d7a":function(e,t,n){"use strict";var i=n("20b1"),r=n.n(i);r.a},"8a4e":function(e,t,n){"use strict";n.r(t);var i=n("de17"),r=n.n(i);for(var o in i)"default"!==o&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=r.a},bd38:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i}));var i={tkiTree:function(){return n.e("components/tki-tree/tki-tree").then(n.bind(null,"4253"))}},r=function(){var e=this,t=e.$createElement;e._self._c},o=[]},cc08:function(e,t,n){"use strict";(function(e){n("ef82");i(n("66fd"));var t=i(n("d919"));function i(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},d919:function(e,t,n){"use strict";n.r(t);var i=n("bd38"),r=n("8a4e");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("6d7a");var a,c=n("f0c5"),l=Object(c["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],a);t["default"]=l.exports},de17:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("aa63");function r(e){return l(e)||c(e)||a(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function c(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function l(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}getApp();var s=function(){n.e("components/select-tree/select-tree").then(function(){return resolve(n("c87c"))}.bind(null,n)).catch(n.oe)},d=function(){n.e("components/tki-tree/tki-tree").then(function(){return resolve(n("4253"))}.bind(null,n)).catch(n.oe)},f=[{city_id:1,id:1,isShow:1,lat:"39.904030",level:0,lng:"116.407526",mergerName:"北京",name:"北京市",parentId:0,children:[{areaCode:"110100000000",children:null,city_id:2,id:35,isShow:1,lat:"39.904030",level:1,lng:"116.407526",mergerName:"北京",name:"北京市",parentId:1}]},{areaCode:"130000000000",children:[{areaCode:"130100000000",children:null,city_id:13268,id:37,isShow:1,lat:"38.042306",level:1,lng:"114.514859",mergerName:"河北,石家庄",name:"石家庄市",parentId:13267},{areaCode:"130200000000",children:null,city_id:18128,id:38,isShow:1,lat:"39.630867",level:1,lng:"118.180193",mergerName:"河北,唐山",name:"唐山市",parentId:13267}],city_id:13267,id:3,isShow:1,lat:"38.037057",level:0,lng:"114.468664",mergerName:"河北",name:"河北省",parentId:0}],h=[{region:[{name:"默认全国",city_id:0}],regionName:"默认全国",first:1,price:0,_continue:1,continue_price:0}],p={components:{selectTree:s,tkiTree:d},data:function(){return{price:"0.00",stepNum:0,stepPrice:0,name:"",type:0,setpFreight:!1,list:f,templateList:h}},mounted:function(){var e=this;(0,i.citys)().then((function(t){var n=t.data;e.list=n}))},methods:{radioChange:function(e){this.type=e.detail.value},switchChange:function(e){this.setpFreight=e.detail.value},appointSwitchChange:function(e){this.$set(this.templateList[e],"setpFreight",!this.templateList[e].setpFreight),console.log(this.templateList)},showTree:function(){this.$refs.tkitree._show()},delTempItem:function(e){console.log(e),this.templateList.splice(e,1)},treeConfirm:function(e){var t=this.list,n=e,i=[],o=[];n.forEach((function(e,n){if(0==e.parentId){i.push(e.name);var r={name:e.name,city_id:e.city_id,children:[]};o.push(r)}else o.forEach((function(t,n){e.parentId==t.city_id&&t.children.push({city_id:e.city_id})})),t.forEach((function(n,r){e.parentId==t[r].city_id&&i.push(t[r].name)}))}));var a=r(new Set(i)).join(";");this.templateList.push({region:o,regionName:a,first:1,price:0,_continue:1,continue_price:0,setpFreight:!1})},treeCancel:function(e){console.log(e)},submit:function(){var t=this,n={};if(n.name=this.name,n.type=this.type,n.region_info=this.templateList,""==n.name)return this.alertMessage("请填写模板名字");n.region_info.length,(0,i.addTemp)(n).then((function(n){n.success&&(e.showToast({title:"添加成功"}),t.$yrouter.back())})),console.log(n)},alertMessage:function(t){e.showToast({title:t,icon:"none"})}}};t.default=p}).call(this,n("543d")["default"])}},[["cc08","common/runtime","common/vendor"]]]);