chunk-51064f04.561742db.js 4.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-51064f04","chunk-2d0d6067","chunk-2d0c7b00"],{2475:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e._self._c;return t("d2-container",{class:{"page-compact":e.crud.pageOptions.compact}},[t("d2-crud-x",e._g(e._b({ref:"d2Crud",attrs:{"crud.options.tableType":"vxe-table"}},"d2-crud-x",e._crudProps,!1),e._crudListeners),[t("div",{attrs:{slot:"header"},slot:"header"},[t("crud-search",{ref:"search",attrs:{options:e.crud.searchOptions},on:{submit:e.handleSearch}}),t("crud-toolbar",{attrs:{search:e.crud.searchOptions.show,compact:e.crud.pageOptions.compact,columns:e.crud.columns},on:{"update:search":function(t){return e.$set(e.crud.searchOptions,"show",t)},"update:compact":function(t){return e.$set(e.crud.pageOptions,"compact",t)},refresh:function(t){return e.doRefresh()},"columns-filter-changed":e.handleColumnsFilterChanged}})],1)])],1)},o=[],a=r("7190"),s=r("524a"),i=r("1fbf"),c={name:"areas",mixins:[i["d2CrudPlus"].crud],data:function(){return{}},methods:{getCrudOptions:function(){return Object(s["crudOptions"])(this)},pageRequest:function(e){return a["GetList"](e)}}},d=c,u=(r("76d1"),r("2877")),l=Object(u["a"])(d,n,o,!1,null,null,null);t["default"]=l.exports},"524a":function(e,t,r){"use strict";r.r(t),r.d(t,"crudOptions",(function(){return o}));r("99af"),r("d81d"),r("e9f5"),r("ab43"),r("d3b7");var n=r("22ce"),o=function(e){return{pageOptions:{compact:!0},options:{tableType:"vxe-table",rowKey:!1,height:"100%",rowId:"code",highlightCurrentRow:!0,treeConfig:{lazy:!0,children:"children",hasChild:"hasChildren",loadMethod:function(e){var t=e.row;return Object(n["c"])({url:"/api/system/area/",method:"get",params:{pcode:t.code,limit:999}}).then((function(e){return e.data.data.map((function(e){e.hasChildren=0!==e.pcode_count})),t.hasChildren=!1,e.data.data}))},iconLoaded:"el-icon-loading"}},rowHandle:{show:!1,width:140,view:{thin:!0,text:"",show:!1,disabled:function(){return!e.hasPermissions("Retrieve")}},edit:{thin:!0,text:"",show:!1,disabled:function(){return!e.hasPermissions("Update")}},remove:{thin:!0,text:"",show:!1,disabled:function(){return!e.hasPermissions("Delete")}}},viewOptions:{componentType:"form"},formOptions:{defaultSpan:24,width:"30%"},indexRow:{title:"序号",align:"center",width:100},columns:[{title:"关键词",key:"search",show:!1,disabled:!0,search:{disabled:!1},form:{disabled:!0,component:{placeholder:"请输入关键词"}},view:{disabled:!0}},{title:"ID",key:"id",width:90,disabled:!0,form:{disabled:!0}},{title:"父级地区",key:"pcode",show:!1,search:{disabled:!1},type:"area-selector",form:{component:{showAllLevels:!1,props:{elProps:{clearable:!0,showAllLevels:!1,props:{checkStrictly:!0,emitPath:!1,clearable:!0}}}}}},{title:"名称",key:"name",search:{disabled:!1},treeNode:!0,width:160,type:"input",form:{rules:[{required:!0,message:"名称必填项"}],component:{placeholder:"请输入名称"},itemProps:{class:{yxtInput:!0}}}},{title:"地区编码",key:"code",search:{disabled:!1},type:"input",form:{rules:[{required:!0,message:"地区编码必填项"}],component:{placeholder:"请输入地区编码"},itemProps:{class:{yxtInput:!0}}}},{title:"拼音",key:"pinyin",search:{disabled:!0},type:"input",form:{rules:[{required:!0,message:"拼音必填项"}],itemProps:{class:{yxtInput:!0}},component:{placeholder:"请输入拼音"}}},{title:"地区层级",key:"level",search:{disabled:!0},type:"input",form:{disabled:!1,rules:[{required:!0,message:"拼音必填项"}],itemProps:{class:{yxtInput:!0}},component:{placeholder:"请输入拼音"}}},{title:"首字母",key:"initials",form:{rules:[{required:!0,message:"首字母必填项"}],itemProps:{class:{yxtInput:!0}},component:{placeholder:"请输入首字母"}}},{title:"是否启用",key:"enable",search:{disabled:!1},width:90,type:"radio",dict:{data:e.dictionary("button_status_bool")},form:{value:!0,itemProps:{class:{yxtInput:!0}}}}].concat(e.commonEndColumns())}}},7190:function(e,t,r){"use strict";r.r(t),r.d(t,"urlPrefix",(function(){return a})),r.d(t,"GetList",(function(){return s})),r.d(t,"AddObj",(function(){return i})),r.d(t,"UpdateObj",(function(){return c})),r.d(t,"DelObj",(function(){return d}));var n=r("5530"),o=(r("d81d"),r("e9f5"),r("ab43"),r("d3b7"),r("22ce")),a="/api/system/area/";function s(e){return void 0!==e.pcode&&null!==e.pcode&&0!==e.pcode.length||(e.level=1),Object(o["c"])({url:a,method:"get",params:Object(n["a"])(Object(n["a"])({},e),{},{limit:100})}).then((function(e){return e.data.data.map((function(e){e.hasChildren=0!==e.pcode_count})),e}))}function i(e){return Object(o["c"])({url:a,method:"post",data:e})}function c(e){return Object(o["c"])({url:a+e.id+"/",method:"put",data:e})}function d(e){return Object(o["c"])({url:a+e+"/",method:"delete",data:{id:e}})}},"76d1":function(e,t,r){"use strict";r("c59a")},c59a:function(e,t,r){}}]);