(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-77575ace"],{"0110":function(e,t,r){"use strict";r.r(t);var a=r("3f85"),l=(r("b6c4"),{data:()=>({form:{id:"",parent_id:1e5,level:1,name:"",short:"",city_code:"",zip_code:"",gcj02_lng:0,gcj02_lat:0,remark1:"",remark2:""},allPlace:[]}),methods:{getAllPlace(){Object(a.f)({}).then(e=>{this.allPlace=e.data})},getDetail(){Object(a.e)({id:this.form.id}).then(e=>{this.form=e.data})},edit(){var e=this.form.parent_id.length;this.form.parent_id=this.form.parent_id[e-1],Object(a.h)(this.form).then(e=>{this.$message.success("修改成功!"),setTimeout(()=>this.$router.go(-1),500)}).catch(e=>{this.$message.error("修改出错!")})}},mounted(){this.getAllPlace(),this.getDetail()},created(){const e=this.$route.query;this.form.id=e.id}}),o=r("2877"),i=Object(o.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"ls-card"},[r("el-page-header",{attrs:{content:"编辑地区"},on:{back:function(t){return e.$router.go(-1)}}})],1),r("div",{staticClass:"ls-card m-t-16"},[r("div",{staticClass:"card-title"},[e._v("编辑地区")]),r("div",{staticClass:"card-content m-t-24"},[r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"120px"}},[r("el-form-item",{attrs:{label:"地区编号"}},[r("el-input",{attrs:{placeholder:"请输入地区编号"},model:{value:e.form.id,callback:function(t){e.$set(e.form,"id",t)},expression:"form.id"}})],1),r("el-form-item",{attrs:{label:"父级地区编号"}},[r("el-cascader",{attrs:{options:e.allPlace,children:"sub",label:"name",value:"id",props:{value:"id",label:"name",children:"sub",expandTrigger:"hover",checkStrictly:!0}},model:{value:e.form.parent_id,callback:function(t){e.$set(e.form,"parent_id",t)},expression:"form.parent_id"}})],1),r("el-form-item",{attrs:{label:"等级"}},[r("el-radio-group",{model:{value:e.form.level,callback:function(t){e.$set(e.form,"level",t)},expression:"form.level"}},[r("el-radio",{attrs:{label:1}},[e._v("省份")]),r("el-radio",{attrs:{label:2}},[e._v("地级市")]),r("el-radio",{attrs:{label:3}},[e._v("县区")])],1)],1),r("el-form-item",{attrs:{label:"名称"}},[r("el-input",{attrs:{placeholder:"请输入名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),r("el-form-item",{attrs:{label:"简称"}},[r("el-input",{attrs:{placeholder:"请输入简称"},model:{value:e.form.short,callback:function(t){e.$set(e.form,"short",t)},expression:"form.short"}})],1),r("el-form-item",{attrs:{label:"纬度"}},[r("el-input",{attrs:{placeholder:"请输入纬度"},model:{value:e.form.gcj02_lng,callback:function(t){e.$set(e.form,"gcj02_lng",t)},expression:"form.gcj02_lng"}})],1),r("el-form-item",{attrs:{label:"经度"}},[r("el-input",{attrs:{placeholder:"请输入经度"},model:{value:e.form.gcj02_lat,callback:function(t){e.$set(e.form,"gcj02_lat",t)},expression:"form.gcj02_lat"}})],1),r("el-form-item",{attrs:{label:"备注1"}},[r("el-input",{attrs:{placeholder:"请输入备注1"},model:{value:e.form.remark1,callback:function(t){e.$set(e.form,"remark1",t)},expression:"form.remark1"}})],1),r("el-form-item",{attrs:{label:"备注2"}},[r("el-input",{attrs:{placeholder:"请输入备注2"},model:{value:e.form.remark2,callback:function(t){e.$set(e.form,"remark2",t)},expression:"form.remark2"}})],1)],1)],1)]),r("div",{staticClass:"bg-white ls-fixed-footer"},[r("div",{staticClass:"row-center flex",staticStyle:{height:"100%"}},[r("el-button",{attrs:{size:"small"},on:{click:function(t){return e.$router.go(-1)}}},[e._v("取消")]),r("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.edit}},[e._v("编辑")])],1)])])}),[],!1,null,null,null);t.default=i.exports},"3f85":function(e,t,r){"use strict";r.d(t,"f",(function(){return l})),r.d(t,"e",(function(){return o})),r.d(t,"h",(function(){return i})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return c})),r.d(t,"g",(function(){return m})),r.d(t,"d",(function(){return d}));var a=r("6b2d");const l=e=>a.a.get("/region/list",{params:e}),o=e=>a.a.get("/region/detail",{params:e}),i=e=>a.a.post("/region/update",e),s=e=>a.a.post("/region/create",e),n=e=>a.a.get("/region/del",{params:e}),c=e=>a.a.post("/region/adds",e),m=e=>a.a.get("/region/txt",{params:e}),d=e=>a.a.get("/region/delAll",{params:e})}}]);