require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugin/person_info/PageComponents/FormProvinceCityItem"],{"49f9":function(i,t,e){"use strict";e.r(t);var n=e("6f05"),s=e.n(n);for(var o in n)["default"].indexOf(o)<0&&function(i){e.d(t,i,(function(){return n[i]}))}(o);t["default"]=s.a},"5de6":function(i,t,e){},"6f05":function(i,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={name:"FormProvinceCityItem",props:{value:{type:Object,default:function(){return{}}},label:{type:String,default:""},required:{type:Boolean,default:!1},cityJson:{type:Object,default:function(){return{}}}},data:function(){return{chooseRegion:[],region_list:[[],[]],regionIndex:[0,0],provinceList:[],cityList:[]}},watch:{cityJson:{handler:function(i){i&&Object.keys(i).length>0&&this.initData()},deep:!0,immediate:!0},value:{handler:function(i){i&&i.prov_id&&i.area_id&&this.setRegionFromValue()},deep:!0}},methods:{initData:function(){for(var i in this.provinceList=[],this.region_list[0]=[],this.cityJson)this.provinceList.push({name:i,val:this.cityJson[i].val,items:this.cityJson[i].items}),this.region_list[0].push(i);this.provinceList.length>0&&this.updateCityList(0),this.value&&this.value.prov_id&&this.value.area_id&&this.setRegionFromValue()},updateCityList:function(i){if(0!==this.provinceList.length&&this.provinceList[i]){var t=this.provinceList[i];if(this.cityList=[],this.region_list[1]=[],t.items)for(var e in t.items)this.cityList.push({name:e,val:t.items[e].val}),this.region_list[1].push(e)}},setRegionFromValue:function(){for(var i=-1,t=-1,e=0;e<this.provinceList.length;e++)if(this.provinceList[e].val===this.value.prov_id){i=e,this.updateCityList(e);for(var n=0;n<this.cityList.length;n++)if(this.cityList[n].val===this.value.area_id){t=n;break}break}i>=0&&t>=0&&(this.regionIndex=[i,t],this.chooseRegion=[this.region_list[0][i],this.region_list[1][t]],this.$forceUpdate())},regionColumn:function(i){var t=i.detail,e=t.column,n=t.value;this.regionIndex[e]=n,0===e&&(this.updateCityList(n),this.regionIndex[1]=0,this.$forceUpdate())},regionPicker:function(i){this.regionIndex=i.detail.value;var t=this.regionIndex[0],e=this.regionIndex[1];if(this.provinceList[t]&&this.cityList[e]){this.chooseRegion=[this.region_list[0][t],this.region_list[1][e]];var n={prov_id:this.provinceList[t].val,area_id:this.cityList[e].val};this.$emit("input",n)}}}};t.default=n},"7e90":function(i,t,e){"use strict";e.d(t,"b",(function(){return n})),e.d(t,"c",(function(){return s})),e.d(t,"a",(function(){}));var n=function(){var i=this.$createElement,t=(this._self._c,this.chooseRegion.filter((function(i){return i})).join("-")||"请选择"+this.label);this.$mp.data=Object.assign({},{$root:{g0:t}})},s=[]},ac2e:function(i,t,e){"use strict";e.r(t);var n=e("7e90"),s=e("49f9");for(var o in s)["default"].indexOf(o)<0&&function(i){e.d(t,i,(function(){return s[i]}))}(o);e("f9d4");var r=e("828b"),a=Object(r["a"])(s["default"],n["b"],n["c"],!1,null,"4188070a",null,!1,n["a"],void 0);t["default"]=a.exports},f9d4:function(i,t,e){"use strict";var n=e("5de6"),s=e.n(n);s.a}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'plugin/person_info/PageComponents/FormProvinceCityItem-create-component',
    {
        'plugin/person_info/PageComponents/FormProvinceCityItem-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("ac2e"))
        })
    },
    [['plugin/person_info/PageComponents/FormProvinceCityItem-create-component']]
]);
