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
9.2 KiB

5 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-26bbd2fe"],{"1c18":function(e,t,n){},"274d":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var i=n("b775");function a(e){return Object(i["a"])({url:"/api/admin/region-add",method:"post",data:e})}function o(e){return Object(i["a"])({url:"/api/admin/region-update",method:"post",data:e})}function r(e){return Object(i["a"])({url:"/api/admin/region-del",method:"post",data:e})}function s(e){return Object(i["a"])({url:"/api/admin/region-list",method:"post",data:e})}function l(e){return Object(i["a"])({url:"/api/admin/region-sel",method:"post",data:e})}},"29d6":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"filter-container"},[n("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v("添加")])],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.list,"row-key":"id",border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{label:"名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("span",[e._v(e._s(i.name))])]}}])}),n("el-table-column",{attrs:{label:"序号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("span",[e._v(e._s(i.sort_number))])]}}])}),n("el-table-column",{attrs:{label:e.$t("table.actions"),align:"center",width:"230","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.row;return[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.handleUpdate(i)}}},[e._v(e._s(e.$t("table.edit")))]),n("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(t){return e.handleDelete(i)}}},[e._v(e._s(e.$t("table.delete")))])]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.page_number,limit:e.listQuery.page_size},on:{"update:page":function(t){return e.$set(e.listQuery,"page_number",t)},"update:limit":function(t){return e.$set(e.listQuery,"page_size",t)},pagination:e.getList}}),n("el-dialog",{attrs:{title:e.temp.id?"修改":"新增",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[n("el-form",{ref:"dataForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:e.rules,model:e.temp,"label-position":"left","label-width":"100px"}},[n("el-form-item",{attrs:{label:"名称",prop:"name"}},[n("el-input",{model:{value:e.temp.name,callback:function(t){e.$set(e.temp,"name",t)},expression:"temp.name"}})],1),n("el-form-item",{attrs:{label:"上级区域",prop:"parent_id"}},[n("el-cascader",{attrs:{options:e.options,props:{label:"name",value:"id",checkStrictly:!0}},model:{value:e.temp.parent_id,callback:function(t){e.$set(e.temp,"parent_id",t)},expression:"temp.parent_id"}})],1),n("el-form-item",{attrs:{label:"排序值",prop:"sort_number"}},[n("el-input",{model:{value:e.temp.sort_number,callback:function(t){e.$set(e.temp,"sort_number",t)},expression:"temp.sort_number"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取消")]),n("el-button",{attrs:{type:"primary"},on:{click:e.update}},[e._v("保存")])],1)],1)],1)},a=[],o=n("53ca"),r=n("274d"),s=n("6724"),l=n("333d"),u={name:"Region",components:{Pagination:l["a"]},directives:{waves:s["a"]},data:function(){return{list:[],total:0,listLoading:!0,listQuery:{page_number:1,page_size:20,keyword:""},temp:{id:"",name:"",parent_id:[],sort_number:0},dialogFormVisible:!1,dialogStatus:"",rules:{name:[{required:!0,message:"请输入名称",trigger:"change"}],sort_number:[{required:!0,message:"请输入