beehole-store-server
Version:
www.bee-hole.com
1 lines • 26.9 kB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-35fbc558","chunk-15c652ba","chunk-1b5fb657","chunk-df6d6910","chunk-e42343f0","chunk-2760dcce","chunk-60d1f006","chunk-2d21a7e7"],{"510b":function(t,e,a){"use strict";a.r(e);a("b0c0");var s=function(){var t=this,e=t._self._c;return e("a-drawer",{attrs:{width:"35%","label-col":4,title:t.formTitle,"wrapper-col":14,visible:t.open,"body-style":{height:"calc(100vh - 100px)",overflow:"auto"}},on:{close:t.cancel}},[e("a-form-model",{ref:"form",attrs:{model:t.form,rules:t.rules}},[e("a-form-model-item",{attrs:{label:"字典名称",prop:"name"}},[e("a-input",{attrs:{placeholder:"请输入字典名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("a-form-model-item",{attrs:{label:"字典类型",prop:"type"}},[e("a-input",{attrs:{placeholder:"请输入字典类型"},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}})],1),e("a-form-model-item",{attrs:{label:"状态",prop:"status"}},[e("a-select",{attrs:{placeholder:"请选择"},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},t._l(t.statusOptions,(function(a,s){return e("a-select-option",{key:s,attrs:{value:a.value}},[t._v(t._s(a.label))])})),1)],1),e("a-form-model-item",{attrs:{label:"备注",prop:"remark"}},[e("a-input",{attrs:{placeholder:"请输入内容",type:"textarea","allow-clear":""},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1),e("div",{staticClass:"bottom-control"},[e("a-space",[e("a-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(" 保存 ")]),e("a-button",{on:{click:t.cancel}},[t._v(" 取消 ")])],1)],1)],1)],1)},r=[],o=a("5530"),i=a("5c39"),n=Object(o["a"])({},i["default"]),l=n,c=a("2877"),d=Object(c["a"])(l,s,r,!1,null,null,null);e["default"]=d.exports},"590e":function(t,e,a){"use strict";a.r(e);a("b0c0"),a("99af");var s=function(){var t=this,e=t._self._c;return e("div",[e("a-card",{staticStyle:{"margin-bottom":"10px"},attrs:{bordered:!1}},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{labelCol:t.labelCol,wrapperCol:t.wrapperCol}},[e("a-row",{attrs:{gutter:48}},[e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"字典名称"}},[e("a-input",{attrs:{placeholder:"请输入字典名称","allow-clear":""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery.apply(null,arguments)}},model:{value:t.queryParam.name,callback:function(e){t.$set(t.queryParam,"name",e)},expression:"queryParam.name"}})],1)],1),e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"字典类型"}},[e("a-input",{attrs:{placeholder:"请选择字典类型","allow-clear":""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleQuery.apply(null,arguments)}},model:{value:t.queryParam.type,callback:function(e){t.$set(t.queryParam,"type",e)},expression:"queryParam.type"}})],1)],1),e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"状态"}},[e("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:"字典状态"},model:{value:t.queryParam.status,callback:function(e){t.$set(t.queryParam,"status",e)},expression:"queryParam.status"}},t._l(t.statusOptions,(function(a,s){return e("a-select-option",{key:s,attrs:{value:a.value}},[t._v(t._s(a.label))])})),1)],1)],1),t.advanced?e("a-col",{attrs:{md:6,sm:24}},[e("a-form-item",{attrs:{label:"创建时间"}},[e("a-range-picker",{staticStyle:{width:"100%"},attrs:{valueFormat:"YYYY-MM-DD",format:"YYYY-MM-DD"},model:{value:t.dateRange,callback:function(e){t.dateRange=e},expression:"dateRange"}})],1)],1):t._e(),e("a-col",[e("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"right"}},[e("a-button",{attrs:{type:"primary"},on:{click:t.handleQuery}},[e("a-icon",{attrs:{type:"search"}}),t._v("查询")],1),e("a-button",{staticStyle:{"margin-left":"8px"},on:{click:t.resetQuery}},[e("a-icon",{attrs:{type:"redo"}}),t._v("重置")],1),e("a",{staticStyle:{"margin-left":"8px"},on:{click:t.toggleAdvanced}},[t._v(" "+t._s(t.advanced?"收起":"展开")+" "),e("a-icon",{attrs:{type:t.advanced?"up":"down"}})],1)],1)])],1)],1)],1)]),e("a-card",{staticClass:"table-card",attrs:{bordered:!1}},[t.showEditModal?e("dict-type-Edit-form",{ref:"dictTypeEditForm",attrs:{statusOptions:t.statusOptions},on:{ok:t.getList,close:function(e){t.showEditModal=!1}}}):t._e(),t.showAddModal?e("dict-type-add-form",{ref:"dictTypeAddForm",attrs:{statusOptions:t.statusOptions},on:{ok:t.getList,close:function(e){t.showAddModal=!1}}}):t._e(),e("advance-table",{attrs:{loading:t.loading,rowKey:"id",columns:t.columns,expandedRowKeys:t.expandedKeys,"data-source":t.list,title:"字典管理",size:"middle",tableKey:"system-dict-DictIndex-table","format-conditions":!0,"row-selection":{selectedRowKeys:t.selectedRowKeys,onChange:t.onSelectChange},pagination:{current:t.queryParam.page,limit:t.queryParam.limit,total:t.total,showSizeChanger:!0,showLessItems:!0,showQuickJumper:!0,showTotal:function(t,e){return"第 ".concat(e[0],"-").concat(e[1]," 条,总计 ").concat(t," 条")},onChange:t.changeSize,onShowSizeChange:t.onShowSizeChange}},on:{expand:t.onExpandCurrent,refresh:t.getList},scopedSlots:t._u([{key:"expandedRowRender",fn:function(t){var a=t.record;return e("span",{},[e("dict-data-index",{ref:"dictDataIndex",attrs:{title:a.name,dictId:a.id,type:a.type}})],1)}},{key:"status",fn:function(a){a.text;var s=a.record;return e("span",{},[e("a-badge",{attrs:{status:"1"==s.status?"processing":"error",text:t.statusFormat(s)}})],1)}},{key:"created_at",fn:function(a){a.text;var s=a.record;return e("span",{},[t._v(" "+t._s(t.parseTime(s.created_at))+" ")])}},{key:"operation",fn:function(a){a.text;var s=a.record;return e("span",{},[e("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:edit"],expression:"['system:dict:edit']"}],on:{click:function(e){return t.handleUpdate(s,void 0)}}},[t._v(" 修改 ")]),e("a-divider",{attrs:{type:"vertical"}}),e("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:remove"],expression:"['system:dict:remove']"}],on:{click:function(e){return t.handleDelete(s)}}},[t._v(" 删除 ")])],1)}}])},[e("div",{staticClass:"table-operations",attrs:{slot:"button"},slot:"button"},[e("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:add"],expression:"['system:dict:add']"}],attrs:{type:"primary"},on:{click:function(e){return t.handleAdd()}}},[e("a-icon",{attrs:{type:"plus"}}),t._v("新增 ")],1),t.multiple?t._e():e("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:remove"],expression:"['system:dict:remove']"}],attrs:{type:"danger"},on:{click:t.handleDelete}},[e("a-icon",{attrs:{type:"delete"}}),t._v("删除 ")],1),e("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:export"],expression:"['system:dict:export']"}],attrs:{type:""},on:{click:t.handleExport}},[e("a-icon",{attrs:{type:"download"}}),t._v("导出 ")],1),e("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:remove"],expression:"['system:dict:remove']"}],attrs:{type:""},on:{click:t.handleRefreshCache}},[e("a-icon",{attrs:{type:"redo"}}),t._v("刷新缓存 ")],1)],1)])],1)],1)},r=[],o=(a("d81d"),a("ed45")),i=a("510b"),n=a("5d9e"),l=a("cc7d"),c=a("d91d"),d=a("028d"),u={name:"Dict",components:{DictTypeEditForm:i["default"],DictTypeAddForm:l["default"],DictDataIndex:c["default"],AdvanceTable:n["a"]},data:function(){return{showAddModal:!1,showEditModal:!1,list:[],selectedRowKeys:[],selectedRows:[],advanced:!1,single:!0,multiple:!0,ids:[],names:[],loading:!1,total:0,statusOptions:[],labelCol:{span:6},wrapperCol:{span:18},dateRange:[],queryParam:{page:1,limit:10,name:void 0,type:void 0,status:void 0},expandedKeys:[],columns:[{title:"字典名称",dataIndex:"name",ellipsis:!0,align:"left"},{title:"字典类型",dataIndex:"type",ellipsis:!0,align:"center"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"},align:"center"},{title:"备注",dataIndex:"remark",ellipsis:!0,align:"left"},{title:"创建时间",dataIndex:"created_at",ellipsis:!0,scopedSlots:{customRender:"created_at"},align:"center"},{title:"操作",dataIndex:"operation",width:"10%",scopedSlots:{customRender:"operation"},align:"center"}]}},filters:{},created:function(){var t=this;this.getList(),this.getDicts("sys_normal_disable").then((function(e){t.statusOptions=e}))},computed:{},watch:{},methods:{getList:function(){var t=this;this.showAddModal=!1,this.showEditModal=!1,this.loading=!0,Object(o["d"])(this.addDateRange(this.queryParam,this.dateRange)).then((function(e){t.list=e.list,t.total=e.total_count,t.loading=!1}))},statusFormat:function(t){return this.selectDictLabel(this.statusOptions,t.status)},handleQuery:function(){this.queryParam.page=1,this.getList()},handleAdd:function(){var t=this;this.showAddModal=!0,this.$nextTick((function(){return t.$refs.dictTypeAddForm.handleAdd()}))},handleUpdate:function(t,e){var a=this;this.showEditModal=!0,this.$nextTick((function(){return a.$refs.dictTypeEditForm.handleUpdate(t,e)}))},resetQuery:function(){this.dateRange=[],this.queryParam={page:1,limit:10,name:void 0,type:void 0,status:void 0},this.handleQuery()},onShowSizeChange:function(t,e){this.queryParam.limit=e,this.getList()},changeSize:function(t,e){this.queryParam.page=t,this.queryParam.limit=e,this.getList()},onSelectChange:function(t,e){this.selectedRowKeys=t,this.selectedRows=e,this.ids=this.selectedRows.map((function(t){return t.id})),this.names=this.selectedRows.map((function(t){return t.name})),this.single=1!==t.length,this.multiple=!t.length},toggleAdvanced:function(){this.advanced=!this.advanced},handleDelete:function(t){var e=this,a=t.id||this.ids,s=t.name||this.names;this.$confirm({title:"确认删除所选中数据?",content:'当前选中字典编号为"'+s+'"的数据',onOk:function(){return Object(o["b"])(a).then((function(){e.onSelectChange([],[]),e.getList(),e.$message.success("删除成功",3)}))},onCancel:function(){}})},handleExport:function(){var t=this;this.$confirm({title:"是否确认导出?",content:"此操作将导出当前条件下所有数据而非选中数据",onOk:function(){Object(d["g"])("/dict_type/export",t.queryParam)},onCancel:function(){}})},handleRefreshCache:function(){var t=this;Object(o["f"])().then((function(e){t.$message.success("刷新成功",3)}))},onExpandCurrent:function(t,e){this.expandedKeys=t?[e.id]:[]}}},m=u,p=a("2877"),f=Object(p["a"])(m,s,r,!1,null,null,null);e["default"]=f.exports},"5c39":function(t,e,a){"use strict";a.r(e);a("b0c0");var s=a("2dd7"),r=a("ed45");e["default"]={name:"CreateForm",props:{statusOptions:{type:Array,required:!0}},components:{AntModal:s["a"]},data:function(){return{loading:!1,formTitle:"",form:{id:void 0,name:void 0,type:void 0,status:"1",remark:void 0},open:!1,rules:{name:[{required:!0,message:"字典名称不能为空",trigger:"blur"}],type:[{required:!0,message:"字典类型不能为空",trigger:"blur"},{validator:this.checkDictTypeUnique}]}}},filters:{},created:function(){},computed:{},watch:{},methods:{cancel:function(){this.open=!1,this.reset(),this.$emit("close")},reset:function(){},handleAdd:function(){this.reset(),this.open=!0,this.formTitle="添加字典类型"},handleUpdate:function(t,e){var a=this;this.reset();var s=t?t.id:e;Object(r["c"])(s).then((function(t){a.form=t,a.form.status=""+t.status,a.open=!0,a.formTitle="修改【"+a.form.name+"】类型"}))},submitForm:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;void 0!==t.form.id?Object(r["g"])(t.form).then((function(e){t.$message.success("修改成功",3),t.open=!1,t.$emit("ok")})):Object(r["g"])(t.form).then((function(e){t.$message.success("新增成功",3),t.open=!1,t.$emit("ok")}))}))},checkDictTypeUnique:function(t,e,a){var s="数据字典类型已存在";if(""===e)a();else{var o={type:e,id:void 0!==this.form.id?this.form.id:""};Object(r["a"])(o).then((function(t){t.is_unique?a():a(s)}))}}}}},"75be":function(t,e,a){"use strict";a.r(e);a("4e82");var s=function(){var t=this,e=t._self._c;return e("a-drawer",{attrs:{width:"35%","label-col":4,title:t.formTitle,"wrapper-col":14,visible:t.open,"body-style":{height:"calc(100vh - 100px)",overflow:"auto"}},on:{close:t.cancel}},[e("a-form-model",{ref:"form",attrs:{model:t.form,rules:t.rules}},[e("a-form-model-item",{attrs:{label:"字典类型",prop:"type"}},[e("a-input",{attrs:{disabled:!0},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}})],1),e("a-form-model-item",{attrs:{label:"数据标签",prop:"label"}},[e("a-input",{attrs:{placeholder:"请输入数据标签"},model:{value:t.form.label,callback:function(e){t.$set(t.form,"label",e)},expression:"form.label"}})],1),e("a-form-model-item",{attrs:{label:"数据键值",prop:"value"}},[e("a-input",{attrs:{placeholder:"请输入数据键值"},model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}})],1),e("a-form-model-item",{attrs:{label:"显示排序",prop:"sort"}},[e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort",e)},expression:"form.sort"}})],1),e("a-form-model-item",{attrs:{label:"状态",prop:"status"}},[e("a-select",{attrs:{placeholder:"请选择"},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},t._l(t.statusOptions,(function(a,s){return e("a-select-option",{key:s,attrs:{value:a.value}},[t._v(t._s(a.label))])})),1)],1),e("a-form-model-item",{attrs:{label:"备注",prop:"remark"}},[e("a-input",{attrs:{placeholder:"请输入内容",type:"textarea","allow-clear":""},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1),e("div",{staticClass:"bottom-control"},[e("a-space",[e("a-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(" 保存 ")]),e("a-button",{on:{click:t.cancel}},[t._v(" 取消 ")])],1)],1)],1)],1)},r=[],o=a("5530"),i=a("bc6f"),n=Object(o["a"])({},i["default"]),l=n,c=a("2877"),d=Object(c["a"])(l,s,r,!1,null,null,null);e["default"]=d.exports},"970d":function(t,e,a){"use strict";a.r(e);a("4e82");var s=function(){var t=this,e=t._self._c;return e("ant-modal",{attrs:{visible:t.open,"modal-title":t.formTitle,"adjust-size":!0,modalWidth:"640",modalHeight:"420"},on:{cancel:t.cancel}},[e("a-form-model",{ref:"form",attrs:{slot:"content",model:t.form,rules:t.rules,layout:"vertical"},slot:"content"},[e("a-row",{staticClass:"form-row",attrs:{gutter:32}},[e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"字典类型",prop:"type"}},[e("a-input",{attrs:{disabled:!0},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}})],1)],1),e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"数据标签",prop:"label"}},[e("a-input",{attrs:{placeholder:"请输入数据标签"},model:{value:t.form.label,callback:function(e){t.$set(t.form,"label",e)},expression:"form.label"}})],1)],1),e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"数据键值",prop:"value"}},[e("a-input",{attrs:{placeholder:"请输入数据键值"},model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}})],1)],1),e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"显示排序",prop:"sort"}},[e("a-input-number",{staticStyle:{width:"100%"},attrs:{min:0},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort",e)},expression:"form.sort"}})],1)],1),e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"状态",prop:"status"}},[e("a-select",{attrs:{placeholder:"请选择"},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},t._l(t.statusOptions,(function(a,s){return e("a-select-option",{key:s,attrs:{value:a.value}},[t._v(t._s(a.label))])})),1)],1)],1),e("a-col",{attrs:{lg:24,md:24,sm:24}},[e("a-form-model-item",{attrs:{label:"备注",prop:"remark"}},[e("a-input",{attrs:{placeholder:"请输入内容",type:"textarea","allow-clear":""},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1)],1)],1),e("template",{slot:"footer"},[e("a-button",{on:{click:t.cancel}},[t._v(" 取消 ")]),e("a-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(" 保存 ")])],1)],2)},r=[],o=a("5530"),i=a("bc6f"),n=Object(o["a"])({},i["default"]),l=n,c=a("2877"),d=Object(c["a"])(l,s,r,!1,null,null,null);e["default"]=d.exports},bc6f:function(t,e,a){"use strict";a.r(e);a("4e82");var s=a("2dd7"),r=a("aa3a");e["default"]={name:"CreateDataForm",props:{type:{type:String,required:!0},statusOptions:{type:Array,required:!0},title:String},components:{AntModal:s["a"]},data:function(){return{loading:!1,formTitle:"",form:{id:void 0,label:void 0,value:void 0,sort:0,status:"1",remark:void 0},open:!1,rules:{label:[{required:!0,message:"数据标签不能为空",trigger:"blur"}],value:[{required:!0,message:"数据键值不能为空",trigger:"blur"},{validator:this.checkDictDataValueUnique}],sort:[{required:!0,message:"数据顺序不能为空",trigger:"blur"}]}}},filters:{},created:function(){},computed:{},watch:{},methods:{cancel:function(){this.open=!1,this.reset(),this.$emit("close")},reset:function(){},handleAdd:function(){var t=this;this.reset(),Object(r["d"])(this.type).then((function(e){t.form.sort=e.sort,t.open=!0,t.formTitle="添加【"+t.title+"】子表数据",t.form.type=t.type}))},handleUpdate:function(t){var e=this;this.reset();var a=t.id;Object(r["f"])(a).then((function(t){e.form=t,e.form.status=""+t.status,e.open=!0,e.formTitle="修改【"+e.title+"】子表数据"}))},submitForm:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;void 0!==t.form.id?Object(r["i"])(t.form).then((function(e){t.$message.success("修改成功",3),t.open=!1,t.$emit("ok")})):Object(r["i"])(t.form).then((function(e){t.$message.success("新增成功",3),t.open=!1,t.$emit("ok")}))}))},checkDictDataValueUnique:function(t,e,a){var s="数据字典值已存在";if(""===e)a();else{var o={value:e,type:this.type,id:void 0!==this.form.id?this.form.id:""};Object(r["a"])(o).then((function(t){t.is_unique?a():a(s)}))}}}}},cc7d:function(t,e,a){"use strict";a.r(e);a("b0c0");var s=function(){var t=this,e=t._self._c;return e("ant-modal",{attrs:{visible:t.open,"modal-title":t.formTitle,"adjust-size":!0,modalWidth:"640",modalHeight:"420"},on:{cancel:t.cancel}},[e("a-form-model",{ref:"form",attrs:{slot:"content",model:t.form,rules:t.rules,layout:"vertical"},slot:"content"},[e("a-row",{staticClass:"form-row",attrs:{gutter:32}},[e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"字典名称",prop:"name"}},[e("a-input",{attrs:{placeholder:"请输入字典名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"字典类型",prop:"type"}},[e("a-input",{attrs:{placeholder:"请输入字典类型"},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}})],1)],1),e("a-col",{attrs:{lg:12,md:12,sm:24}},[e("a-form-model-item",{attrs:{label:"状态",prop:"status"}},[e("a-select",{attrs:{placeholder:"请选择","allow-clear":""},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},t._l(t.statusOptions,(function(a,s){return e("a-select-option",{key:s,attrs:{value:a.value}},[t._v(t._s(a.label))])})),1)],1)],1),e("a-col",{attrs:{lg:24,md:24,sm:24,span:24}},[e("a-form-model-item",{attrs:{label:"备注",prop:"remark"}},[e("a-input",{attrs:{placeholder:"请输入内容",type:"textarea","allow-clear":""},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1)],1)],1),e("template",{slot:"footer"},[e("a-button",{on:{click:t.cancel}},[t._v(" 取消 ")]),e("a-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(" 保存 ")])],1)],2)},r=[],o=a("5530"),i=a("5c39"),n=Object(o["a"])({},i["default"]),l=n,c=a("2877"),d=Object(c["a"])(l,s,r,!1,null,null,null);e["default"]=d.exports},d91d:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t._self._c;return e("div",[t.showEditSubModal?e("dict-data-edit-form",{ref:"dictDataEditForm",attrs:{title:t.title,statusOptions:t.statusOptions,type:t.type},on:{ok:t.getList,close:function(e){t.showEditSubModal=!1}}}):t._e(),t.showAddSubModal?e("dict-data-add-form",{ref:"dictDataAddForm",attrs:{statusOptions:t.statusOptions,type:t.type,title:t.title},on:{ok:t.getList,close:function(e){t.showAddSubModal=!1}}}):t._e(),e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"table-operations"},[e("div",{staticClass:"table_title"},[t._v(t._s(t.title))]),e("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:add"],expression:"['system:dict:add']"}],attrs:{type:"primary"},on:{click:function(e){return t.handleSubAdd()}}},[e("a-icon",{attrs:{type:"plus"}}),t._v("新增 ")],1),t.multiple?t._e():e("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:remove"],expression:"['system:dict:remove']"}],attrs:{type:"danger"},on:{click:t.handleSubDelete}},[e("a-icon",{attrs:{type:"delete"}}),t._v("删除 ")],1),e("a-tooltip",{attrs:{title:"刷新"}},[e("a-icon",{staticClass:"action",attrs:{type:t.loading?"loading":"reload"},on:{click:t.getList}})],1)],1),e("a-table",{attrs:{loading:t.loading,rowKey:"id",size:"middle",columns:t.columns,"data-source":t.list,"row-selection":{selectedRowKeys:t.selectedRowKeys,onChange:t.onSelectChange},pagination:!1},scopedSlots:t._u([{key:"status",fn:function(a,s){return e("span",{},[e("a-badge",{attrs:{status:"1"==s.status?"processing":"error",text:t.statusFormat(s)}})],1)}},{key:"createTime",fn:function(a,s){return e("span",{},[t._v(" "+t._s(t.parseTime(s.created_at))+" ")])}},{key:"operation",fn:function(a,s){return e("span",{},[e("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:edit"],expression:"['system:dict:edit']"}],on:{click:function(e){return t.handleSubUpdate(s)}}},[t._v(" 修改 ")]),e("a-divider",{attrs:{type:"vertical"}}),e("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:remove"],expression:"['system:dict:remove']"}],on:{click:function(e){return t.handleSubDelete(s)}}},[t._v(" 删除 ")])],1)}}])})],1)],1)},r=[],o=(a("a9e3"),a("d81d"),a("aa3a")),i=a("75be"),n=a("970d"),l={name:"DictData",props:{type:{type:String,required:!0},dictId:{type:Number,required:!0},title:{type:String,default:"子表"}},components:{DictDataEditForm:i["default"],DictDataAddForm:n["default"]},data:function(){return{showAddSubModal:!1,showEditSubModal:!1,list:[],selectedRowKeys:[],selectedRows:[],advanced:!1,single:!0,multiple:!0,ids:[],dictLabels:[],loading:!1,total:0,statusOptions:[],queryParam:{page:1,limit:100,dictName:void 0,type:void 0,status:void 0},columns:[{title:"字典标签",dataIndex:"label",ellipsis:!0,align:"center"},{title:"字典键值",dataIndex:"value",ellipsis:!0,align:"center"},{title:"字典排序",dataIndex:"sort",ellipsis:!0,align:"center"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"},align:"center"},{title:"备注",dataIndex:"remark",ellipsis:!0,align:"center"},{title:"创建时间",dataIndex:"created_at",ellipsis:!0,scopedSlots:{customRender:"created_at"},align:"center"},{title:"操作",dataIndex:"operation",width:"15%",scopedSlots:{customRender:"operation"},align:"center"}]}},filters:{},created:function(){var t=this;this.queryParam.type=this.type,this.getList(),this.getDicts("sys_normal_disable").then((function(e){t.statusOptions=e}))},computed:{},watch:{},methods:{getList:function(){var t=this;this.showAddSubModal=!1,this.showEditSubModal=!1,this.loading=!0,Object(o["h"])(this.queryParam).then((function(e){t.list=e.list,t.total=e.total_count,t.loading=!1}))},statusFormat:function(t){return this.selectDictLabel(this.statusOptions,t.status)},handleQuery:function(){this.queryParam.page=1,this.getList()},handleSubAdd:function(){var t=this;this.showAddSubModal=!0,this.$nextTick((function(){return t.$refs.dictDataAddForm.handleAdd()}))},handleSubUpdate:function(t){var e=this;this.showEditSubModal=!0,this.$nextTick((function(){return e.$refs.dictDataEditForm.handleUpdate(t)}))},resetQuery:function(){this.dateRange=[],this.queryParam={page:1,limit:10,name:void 0,type:void 0,status:void 0},this.handleQuery()},onShowSizeChange:function(t,e){this.queryParam.limit=e,this.getList()},changeSize:function(t,e){this.queryParam.page=t,this.queryParam.limit=e,this.getList()},onSelectChange:function(t,e){this.selectedRowKeys=t,this.selectedRows=e,this.ids=this.selectedRows.map((function(t){return t.id})),this.dictLabels=this.selectedRows.map((function(t){return t.dictLabel})),this.single=1!==t.length,this.multiple=!t.length},handleSubDelete:function(t){var e=this,a=t.id||this.ids,s=t.dictLabel||this.dictLabels;this.$confirm({title:"确认删除所选中数据?",content:'当前选中字典编码为"'+s+'"的数据',onOk:function(){return Object(o["b"])(a).then((function(){e.onSelectChange([],[]),e.getList(),e.$message.success("删除成功",3)}))},onCancel:function(){}})},handleExport:function(){var t=this;this.$confirm({title:"是否确认导出?",content:"此操作将导出当前条件下所有数据而非选中数据",onOk:function(){return Object(o["c"])(t.queryParam).then((function(e){t.download(e.msg),t.$message.success("导出成功",3)}))},onCancel:function(){}})}}},c=l,d=a("2877"),u=Object(d["a"])(c,s,r,!1,null,null,null);e["default"]=u.exports},ed45:function(t,e,a){"use strict";a.d(e,"d",(function(){return r})),a.d(e,"c",(function(){return o})),a.d(e,"g",(function(){return i})),a.d(e,"b",(function(){return n})),a.d(e,"f",(function(){return l})),a.d(e,"e",(function(){return c})),a.d(e,"a",(function(){return d}));var s=a("b775");function r(t){return Object(s["b"])({url:"/dict_type/list",method:"get",params:t})}function o(t){return Object(s["b"])({url:"/dict_type/view",method:"get",params:{id:t}})}function i(t){return Object(s["b"])({url:"/dict_type/edit",method:"post",data:t})}function n(t){return Object(s["b"])({url:"/dict_type/delete",method:"post",params:{id:t}})}function l(){return Object(s["b"])({url:"/dict_type/refresh_cache",method:"get"})}function c(){return Object(s["b"])({url:"/system/dict/type/optionselect",method:"get"})}function d(t){return Object(s["b"])({url:"/dict_type/unique",method:"get",params:t})}}}]);