(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-00cf"],{"+4fj":function(t,e,a){"use strict";var i=a("SZQA");a.n(i).a},Fsbg:function(t,e,a){"use strict";a.r(e);var i=a("WZwz"),r={name:"EditStreet",data:function(){return{dialogFormVisible:!1,dialogStatus:"",streetForm:{id:"",streetCode:"",streetName:"",description:""},textMap:{update:"编辑道路",create:"新增道路",detail:"详情"},rules:{streetCode:[{required:!0,message:"道路编号不能为空",trigger:["blur","change"]}],streetName:[{required:!0,message:"道路名称不能为空",trigger:["blur","change"]}]},isEditMode:!1,btnLoading:!0}},methods:{initDialog:function(t,e){var a=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.btnLoading=!1,this.dialogStatus=t,this.dialogFormVisible=e,"create"===t?(this.resetForm(),this.isEditMode=!1,this.$nextTick(function(){a.$refs.dataForm.clearValidate()})):"update"===t&&(this.streetForm={id:i.id,streetCode:i.streetCode,streetName:i.streetName,description:i.description},this.isEditMode=!0)},resetForm:function(){this.streetForm={streetCode:"",streetName:"",description:""},this.btnLoading=!1},saveData:function(){this.btnLoading=!0,"update"===this.dialogStatus?this.updateData():"create"===this.dialogStatus&&this.createData()},createData:function(){var t=this;this.$refs.dataForm.validate(function(e){e?Object(i.b)(t.streetForm).then(function(e){200===e.code?t.$confirm("新增成功,是否继续新增?","提示",{confirmButtonText:"是",cancelButtonText:"否",type:"info"}).then(function(){t.resetForm(),t.$nextTick(function(){t.$refs.dataForm.clearValidate()})}).catch(function(){t.$emit("watchChild"),t.dialogFormVisible=!1}):t.btnLoading=!1}):t.btnLoading=!1})},updateData:function(){var t=this;this.$refs.dataForm.validate(function(e){e?Object(i.k)(t.streetForm).then(function(e){200===e.code?(t.$message.success("修改成功"),t.cancel()):t.btnLoading=!1}):t.btnLoading=!1})},cancel:function(){this.dialogFormVisible=!1,this.$emit("watchChild")}}},s=(a("Q99m"),a("KHd+")),n=Object(s.a)(r,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],"close-on-click-modal":!1,visible:t.dialogFormVisible,"append-to-body":""},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.streetForm,"label-well-code":"right","label-width":"110px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"道路编号",prop:"streetCode"}},[a("el-input",{attrs:{maxlength:30,type:"text",placeholder:"必填","show-word-limit":""},model:{value:t.streetForm.streetCode,callback:function(e){t.$set(t.streetForm,"streetCode","string"==typeof e?e.trim():e)},expression:"streetForm.streetCode"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"道路名称",prop:"streetName"}},[a("el-input",{attrs:{maxlength:50,type:"text",placeholder:"必填","show-word-limit":""},model:{value:t.streetForm.streetName,callback:function(e){t.$set(t.streetForm,"streetName","string"==typeof e?e.trim():e)},expression:"streetForm.streetName"}})],1)],1)],1),t._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"道路描述"}},[a("el-input",{attrs:{maxlength:120,type:"textarea",placeholder:"非必填",rows:"2","show-word-limit":""},model:{value:t.streetForm.description,callback:function(e){t.$set(t.streetForm,"description","string"==typeof e?e.trim():e)},expression:"streetForm.description"}})],1)],1)],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{loading:t.btnLoading,type:"primary"},on:{click:t.saveData}},[t._v("保存")]),t._v(" "),a("el-button",{on:{click:t.cancel}},[t._v("取消")])],1)],1)},[],!1,null,"dafebbf0",null);n.options.__file="editStreet.vue";var o={name:"StreetList",components:{editStreet:n.exports},data:function(){return{listQuery:{streetName:"",offset:1,limit:20,sort:"",order:""},columns:[{text:"道路名",value:"streetName",align:"center"},{text:"道路编号",value:"streetCode",align:"center"},{text:"描述",value:"description",align:"center"}],multipleSelection:[],list:[],total:0,listLoading:!1,fullscreenLoading:!1,dialogFormVisible:!1}},created:function(){this.fetchData()},methods:{checkSelection:function(){return 0!==this.multipleSelection.length},add:function(){this.dialogFormVisible=!0,this.$refs.editStreet.initDialog("create",this.dialogFormVisible)},edit:function(t){this.dialogFormVisible=!0,this.$refs.editStreet.initDialog("update",this.dialogFormVisible,t)},del:function(){var t=this;if(this.checkSelection()){var e=[];this.multipleSelection.forEach(function(t,a){e.push(t.id)}),this.$confirm("确定要删除所选道路吗?","确认操作",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.d)(e).then(function(e){200===e.code&&(t.$message.success("删除成功"),t.fetchData())})})}else this.$message.error("至少选中一项")},search:function(){this.fetchData(!1)},fetchData:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.listLoading=!0,e||(this.listQuery.offset=1),Object(i.i)(this.listQuery).then(function(e){200===e.code?(t.list=e.data.rows,t.total=parseInt(e.data.total)):t.$message.error(e.message),t.listLoading=!1})},indexMethod:function(t){return this.listQuery.limit*(this.listQuery.offset-1)+t+1},handleSizeChange:function(t){this.listQuery.limit=t,this.fetchData()},handleCurrentChange:function(t){this.listQuery.offset=t,this.fetchData()},handleSelectionChange:function(t){this.multipleSelection=t}}},l=(a("+4fj"),Object(s.a)(o,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"search-div"},[a("div",{staticClass:"search-left"},[a("el-form",{ref:"selectForm",staticClass:"form-container",attrs:{inline:!0,model:t.listQuery}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{staticClass:"selectForm-container-item"},[a("el-input",{attrs:{placeholder:"道路名",clearable:""},model:{value:t.listQuery.streetName,callback:function(e){t.$set(t.listQuery,"streetName","string"==typeof e?e.trim():e)},expression:"listQuery.streetName"}})],1)],1),t._v(" "),a("el-col",{staticClass:"search-right",attrs:{span:6}},[a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.search}},[t._v("搜索")])],1)],1)],1)],1)]),t._v(" "),a("div",[a("el-row",{staticClass:"table-title"},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"title-header"},[a("i",{staticClass:"el-icon-menu"}),t._v("数据列表")])]),t._v(" "),a("el-col",{staticClass:"edit_btns",attrs:{span:12,offset:6}},[t.hasPerm("/street/delete")?a("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:t.del}},[t._v("删除")]):t._e(),t._v(" "),a("el-button",{staticClass:"edit_btn",attrs:{size:"small"},on:{click:t.add}},[t._v("新增")])],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"table",attrs:{data:t.list,border:""},on:{"selection-change":t.handleSelectionChange}},[t.hasPerm("/street/delete")?a("el-table-column",{attrs:{align:"center",type:"selection",width:"55"}}):t._e(),t._v(" "),a("el-table-column",{attrs:{index:t.indexMethod,align:"center",type:"index",label:"#",width:"55"}}),t._v(" "),t._l(t.columns,function(e){return a("el-table-column",{key:e.value,attrs:{label:e.text,width:e.width,align:e.align,"show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(i){return[a("span",{class:e.class},[t._v(t._s(i.row[e.value]))])]}}])})}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.hasPerm("/street/edit")?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.edit(e.row)}}},[t._v("编辑")]):t._e()]}}])})],2)],1),t._v(" "),a("div",{staticClass:"pagination-container"},[a("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>t.listQuery.limit,expression:"total>listQuery.limit"}],attrs:{"current-page":t.listQuery.offset,"page-sizes":[20,30,50],"page-size":t.listQuery.limit,total:t.total,align:"center",layout:"total, sizes, prev, pager, next"},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),a("edit-street",{ref:"editStreet",on:{watchChild:t.fetchData}})],1)},[],!1,null,"54e40eae",null));l.options.__file="streetList.vue";e.default=l.exports},NwQI:function(t,e,a){},Q99m:function(t,e,a){"use strict";var i=a("NwQI");a.n(i).a},SZQA:function(t,e,a){},WZwz:function(t,e,a){"use strict";a.d(e,"f",function(){return o}),a.d(e,"g",function(){return l}),a.d(e,"h",function(){return c}),a.d(e,"a",function(){return u}),a.d(e,"j",function(){return d}),a.d(e,"c",function(){return m}),a.d(e,"i",function(){return f}),a.d(e,"e",function(){return h}),a.d(e,"d",function(){return p}),a.d(e,"b",function(){return g}),a.d(e,"k",function(){return b});var i=a("t3Un"),r=a("Qyje"),s=a.n(r),n=a("Kw5r");function o(t){return Object(i.a)({url:"area/listPage",method:"get",params:t})}function l(t){return Object(i.a)({url:"area/list",method:"get",params:t})}function c(){return Object(i.a)({url:"dict/code/levelType",method:"get"})}function u(t){return Object(i.a)({url:"area/add",method:"post",params:t})}function d(t){return Object(i.a)({url:"area/update",method:"post",params:t})}function m(t){return Object(i.a)({url:"area/delete",method:"post",params:{id:t}})}function f(t){var e=n.default.prototype.baseConfig.lampBasePath;return Object(i.a)({url:e+"busBaseStreet/listPage",method:"get",params:t})}function h(t){var e=n.default.prototype.baseConfig.lampBasePath;return Object(i.a)({url:e+"busBaseStreet/list",method:"get",params:t})}function p(t){var e=n.default.prototype.baseConfig.lampBasePath;return Object(i.a)({url:e+"busBaseStreet/batchDelete",method:"post",params:{busBaseStreetIds:t},paramsSerializer:function(t){return s.a.stringify(t,{indices:!1})}})}function g(t){var e=n.default.prototype.baseConfig.lampBasePath;return Object(i.a)({url:e+"busBaseStreet/add",method:"post",params:t})}function b(t){var e=n.default.prototype.baseConfig.lampBasePath;return Object(i.a)({url:e+"busBaseStreet/update",method:"post",params:t})}}}]);