Your Name
2022-11-30 f0cd5a4fe3b366fa753b8da5e387673c30c4d0f7
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-5f3d"],{b0lC:function(t,e,a){},b7Ox:function(t,e,a){"use strict";var i=a("b0lC");a.n(i).a},s9sP:function(t,e,a){"use strict";a.r(e);var i=a("14Xm"),r=a.n(i),n=a("D3Ub"),o=a.n(n),c=a("WZwz"),s={name:"lookStoreHouse",data:function(){return{title:"",dialogVisible:!1,dataForm:{province:"",city:"",district:""},provinceList:[],cityList:[],districtList:[],dataFormRules:{}}},created:function(){this.getProvince()},methods:{selectApproach:function(){this.dataForm={province:"",city:"",district:""},this.dialogVisible=!0},getProvince:function(){var t=this;return o()(r.a.mark(function e(){var a;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(c.b)();case 2:"200"===(a=e.sent).data.code&&(t.provinceList=a.data.result.provinceList);case 4:case"end":return e.stop()}},e,t)}))()},changeArea:function(t){var e=this;return o()(r.a.mark(function a(){var i,n;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if("province"!==t){a.next=10;break}return e.dataForm.city="",e.dataForm.district="",e.areaListQuery={type:2,parenttype:1,parentname:e.dataForm.province},a.next=6,Object(c.a)(e.areaListQuery);case 6:"200"===(i=a.sent).data.code&&(e.cityList=i.data.result),a.next=17;break;case 10:if("city"!==t){a.next=17;break}return e.dataForm.district="",e.areaListQuery={type:3,parenttype:2,parentname:e.dataForm.city},a.next=15,Object(c.a)(e.areaListQuery);case 15:"200"===(n=a.sent).data.code&&(e.districtList=n.data.result);case 17:case"end":return a.stop()}},a,e)}))()},submitApproach:function(){this.$emit("giveApproach",this.dataForm),this.dialogVisible=!1}}},l=(a("b7Ox"),a("KHd+")),d=Object(l.a)(s,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{visible:t.dialogVisible,"append-to-body":"",title:t.title,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{rules:t.dataFormRules,model:t.dataForm,"label-position":"right","label-width":"140px",width:"600px"}},[a("el-form-item",{attrs:{label:"省:",prop:"name"}},[a("el-select",{attrs:{clearable:"",filterable:""},on:{change:function(e){t.changeArea("province")}},model:{value:t.dataForm.province,callback:function(e){t.$set(t.dataForm,"province",e)},expression:"dataForm.province"}},t._l(t.provinceList,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}))],1),t._v(" "),a("el-form-item",{attrs:{label:"市:"}},[a("el-select",{attrs:{clearable:"",filterable:""},on:{change:function(e){t.changeArea("city")}},model:{value:t.dataForm.city,callback:function(e){t.$set(t.dataForm,"city",e)},expression:"dataForm.city"}},t._l(t.cityList,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}))],1),t._v(" "),a("el-form-item",{attrs:{type:"textarea",label:"区:",prop:"memo"}},[a("el-select",{attrs:{clearable:"",filterable:""},model:{value:t.dataForm.district,callback:function(e){t.$set(t.dataForm,"district",e)},expression:"dataForm.district"}},t._l(t.districtList,function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}))],1)],1),t._v(" "),a("div",{attrs:{align:"right"}},[a("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitApproach()}}},[t._v("确认")])],1)],1)},[],!1,null,"27859f2e",null);d.options.__file="addApproach.vue";e.default=d.exports}}]);