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 line
45 KiB
1 line
45 KiB
3 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-438727a6"],{"0cd0":function(t,e,r){},"0d56":function(t,e,r){"use strict";r("f49f")},"0fae":function(t,e,r){},"36af":function(t,e,r){},5334:function(t,e,r){"use strict";r("0fae");var n=r("2f62"),i=r("90e7");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u={name:"city",props:{type:{type:Number,default:0},selectArr:{type:Array,default:[]}},data:function(){return{iSselect:!1,addressModal:!1,cityList:[],activeCity:-1,loading:!1}},computed:c(c({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{enter:function(t){this.activeCity=t},leave:function(){this.activeCity=null},getCityList:function(){var t=this;this.loading=!0,Object(i.yb)().then((function(e){t.loading=!1,e.data.forEach((function(e,r,n){e.isShow=!0,e.children.forEach((function(e,r){e.isShow=!0,t.selectArr.length>0&&t.selectArr.forEach((function(t,r){t.children.forEach((function(t,r){e.city_id==t.city_id&&(e.isShow=!1)}))}))}))})),e.data.forEach((function(t,e,r){var n=0,i=0;t.children.forEach((function(t,e){t.isShow?i++:n++})),n==t.children.length&&(t.isShow=!1),t.childNum=i})),t.cityList=e.data}))},allCheckbox:function(){var t=this,e=this.iSselect;t.cityList.forEach((function(r,n){t.$set(t.cityList[n],"checked",e),e?t.$set(t.cityList[n],"count",t.cityList[n].children.length):t.$set(t.cityList[n],"count",0),t.cityList[n].children.forEach((function(r,i){t.$set(t.cityList[n].children[i],"checked",e)}))}))},empty:function(){var t=this;t.cityList.forEach((function(e,r){t.$set(t.cityList[r],"checked",!1),t.cityList[r].children.forEach((function(e,n){t.$set(t.cityList[r].children[n],"checked",!1)})),t.$set(t.cityList[r],"count",0)})),this.iSselect=!1},checkedClick:function(t){var e=this;e.cityList[t].checked?(e.$set(e.cityList[t],"count",e.cityList[t].childNum),e.cityList[t].children.forEach((function(r,n){e.$set(e.cityList[t].children[n],"checked",!0)}))):(e.$set(e.cityList[t],"count",0),e.$set(e.cityList[t],"checked",!1),e.cityList[t].children.forEach((function(r,n){e.$set(e.cityList[t].children[n],"checked",!1)})),e.iSselect=!1)},primary:function(t,e){var r=!1,n=0;this.cityList[t].children.forEach((function(t,e){t.checked&&(r=!0,n++)})),this.$set(this.cityList[t],"count",n),this.$set(this.cityList[t],"checked",r)},confirm:function(){var t=this,e=[];if(t.cityList.forEach((function(r,n){var i={};r.checked&&(i={name:r.name,city_id:r.city_id,children:[]}),t.cityList[n].children.forEach((function(t,e){t.checked&&i.children.push({city_id:t.city_id})})),void 0!==i.city_id&&e.push(i)})),0===e.length)return t.$Message.error("至少选择一个省份或者城市");this.$emit("selectCity",e,this.type),t.addressModal=!1,this.cityList=[]},close:function(){this.addressModal=!1,this.cityList=[]}},mounted:function(){}},l=(r("0d56"),r("2
|