1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b86ffb0"],{1707:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"dashboard-container"},[a("div",{staticClass:"search-content"},[a("el-select",{staticStyle:{width:"220px"},attrs:{placeholder:"请选择字典名称",clearable:""},model:{value:t.queryParams.dictType,callback:function(e){t.$set(t.queryParams,"dictType",e)},expression:"queryParams.dictType"}},t._l(t.getOptionData,(function(t){return a("el-option",{key:t.dictType,attrs:{label:t.dictName,value:t.dictType}})})),1),a("el-input",{staticStyle:{width:"220px"},attrs:{placeholder:"请输入字典标签"},model:{value:t.queryParams.dictLabel,callback:function(e){t.$set(t.queryParams,"dictLabel",e)},expression:"queryParams.dictLabel"}}),a("el-select",{staticStyle:{width:"220px"},attrs:{clearable:"",placeholder:"请选择状态"},model:{value:t.queryParams.status,callback:function(e){t.$set(t.queryParams,"status",e)},expression:"queryParams.status"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),a("div",{staticClass:"search-btn"},[a("div",{staticClass:"search",on:{click:t.handleSearch}},[t._v("查询")]),a("div",{staticClass:"reset",staticStyle:{"margin-right":"10px"},on:{click:t.reset}},[t._v("重置")]),a("div",{staticClass:"reset",on:{click:t.backLaster}},[t._v("返回")])])],1),a("div",{staticClass:"table-content"},[a("div",{staticStyle:{width:"100%",height:"30px"}},[a("div",{staticClass:"btn",on:{click:t.addDepartMenDict}},[a("span",{staticClass:"icon font_family"},[t._v("")]),t._v(" 新增 ")]),a("div",{staticClass:"btn",on:{click:t.deleteDictIds}},[a("span",{staticClass:"icon font_family"},[t._v("")]),t._v(" 批量删除 ")]),a("div",{staticClass:"btn",on:{click:t.uploadOut}},[a("span",{staticClass:"icon font_family"},[t._v("")]),t._v(" 导出 ")])]),a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData,"tooltip-effect":"dark"},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{prop:"dictCode",label:"字典主键",align:"center",width:"100"}}),a("el-table-column",{attrs:{prop:"dictType",label:"字典类型",align:"center",width:"210"}}),a("el-table-column",{attrs:{label:"字典标签",align:"center",prop:"dictLabel",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[""==e.row.listClass||"default"==e.row.listClass?a("span",[t._v(t._s(e.row.dictLabel))]):a("el-tag",{attrs:{type:"primary"==e.row.listClass?"":e.row.listClass}},[t._v(t._s(e.row.dictLabel))])]}}])}),a("el-table-column",{attrs:{prop:"dictSort",label:"字典排序",align:"center",width:"120"}}),a("el-table-column",{attrs:{prop:"status",label:"状态",align:"center",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.status?a("div",{staticClass:"startUsing"},[t._v("启用")]):a("div",{staticClass:"Deactivate"},[t._v("停用")])]}}])}),a("el-table-column",{attrs:{prop:"remark",label:"备注",align:"center",width:"220"}}),a("el-table-column",{attrs:{prop:"updateTime",label:"最后更新",align:"center"}}),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"operateBtn"},[a("div",{staticStyle:{color:"#2766DD"},on:{click:function(a){return t.editDict(e.row)}}},[t._v("修改")]),a("div",{staticStyle:{color:"#2766DD"},on:{click:function(a){return t.deleteDict(e.row)}}},[t._v("删除")])])]}}])})],1),a("el-row",{staticStyle:{"margin-top":"10px"},attrs:{type:"flex",justify:"end"}},[a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{"page-sizes":[10,15,20],"page-size":t.searchData.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])],1),a("el-dialog",{attrs:{center:"",width:"636px",title:t.title,visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules}},[a("el-form-item",{attrs:{label:"字典类型","label-width":"80px",prop:"railwayName"}},[a("el-input",{attrs:{autocomplete:"off",disabled:""},model:{value:t.form.dictType,callback:function(e){t.$set(t.form,"dictType",e)},expression:"form.dictType"}})],1),a("el-form-item",{attrs:{label:"数据标签","label-width":"80px",prop:"railwayCode"}},[a("el-input",{attrs:{autocomplete:"off",maxlength:"20",placeholder:"请输入数据标签"},model:{value:t.form.dictLabel,callback:function(e){t.$set(t.form,"dictLabel",e)},expression:"form.dictLabel"}})],1),a("el-form-item",{attrs:{label:"数据键值","label-width":"80px",prop:"railwayCode"}},[a("el-input",{attrs:{autocomplete:"off",maxlength:"25",placeholder:"请输入数据键值"},model:{value:t.form.dictValue,callback:function(e){t.$set(t.form,"dictValue",e)},expression:"form.dictValue"}})],1),a("el-form-item",{attrs:{label:"样式属性","label-width":"80px",prop:"railwayCode"}},[a("el-input",{attrs:{autocomplete:"off",maxlength:"4",placeholder:"请输入样式属性"},model:{value:t.form.cssClass,callback:function(e){t.$set(t.form,"cssClass",e)},expression:"form.cssClass"}})],1),a("el-form-item",{attrs:{label:"显示排序","label-width":"80px",prop:"railwayCode"}},[a("el-input",{attrs:{autocomplete:"off",maxlength:"4",placeholder:"请输入部门排序"},model:{value:t.form.dictSort,callback:function(e){t.$set(t.form,"dictSort",e)},expression:"form.dictSort"}})],1),a("el-form-item",{attrs:{label:"回显样式","label-width":"80px",prop:"listClass"}},[a("el-select",{staticStyle:{width:"100%"},model:{value:t.form.listClass,callback:function(e){t.$set(t.form,"listClass",e)},expression:"form.listClass"}},t._l(t.listClassOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label+"("+t.value+")",value:t.value}})})),1)],1),a("el-form-item",{attrs:{label:"字典状态","label-width":"80px"}},[a("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[a("el-radio",{attrs:{label:1}},[t._v("启用")]),a("el-radio",{attrs:{label:2}},[t._v("停用")])],1)],1),a("el-form-item",{attrs:{label:"备注","label-width":"80px",prop:"remark"}},[a("el-input",{attrs:{placeholder:"请输入备注",autocomplete:"off"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("div",{staticClass:"search",on:{click:t.submitForm}},[t._v("保 存")]),a("div",{staticClass:"reset",on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")])])],1)],1)},l=[],i=a("5530"),r=(a("d81d"),a("14d9"),a("e9c4"),a("b64b"),a("d3b7"),a("3ca3"),a("ddb0"),a("2b3d"),a("bf19"),a("9861"),a("88a7"),a("271a"),a("5494"),a("f5e6")),o=a("2f62"),n={name:"DepartType",computed:Object(i["a"])({},Object(o["b"])(["name"])),data:function(){return{clickType:"",getOptionData:[],queryParams:{dataType:"",pageSize:10,pageNum:1,diceCode:"",dictLabel:"",dictType:""},form:{dictLabel:"",dictValue:"",cssClass:"",listClass:"default",dictSort:0,status:"0",dictType:this.$route.query.testQuery,remark:""},statusOptions:[{label:"启用",value:"1"},{label:"停用",value:"2"}],searchData:{},ids:[],tableData:[],total:0,title:"",dialogFormVisible:!1,testQuery:"",listClassOptions:[{value:"default",label:"默认"},{value:"primary",label:"主要"},{value:"success",label:"成功"},{value:"info",label:"信息"},{value:"warning",label:"警告"},{value:"danger",label:"危险"}]}},created:function(){this.queryParams.dictType=this.$route.query.testQuery,this.getTypes(),this.getSelectNameList()},mounted:function(){},methods:{backLaster:function(){this.$router.push({path:"/system/department-dict"})},getSelectNameList:function(){var t=this;Object(r["i"])({dataType:""}).then((function(e){t.getOptionData=e.data}))},uploadOut:function(){var t=this;Object(r["g"])(this.queryParams).then((function(e){if("application/json"==res.type){var a=new FileReader;a.readAsText(res,"utf-8"),a.onload=function(){var t=JSON.parse(a.result);200==t.code?this.exportFile(e,"部门数据字典信息"):Message({type:"error",message:t.msg})}}else t.exportFile(e,"部门数据字典信息")}))},exportFile:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"xlsx",s=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.ms-excel"})),l=document.createElement("a");l.style.display="none",l.href=s;var i=e+"."+a;l.setAttribute("download",i),document.body.appendChild(l),l.click(),document.body.removeChild(l)},reset:function(){this.queryParams={},this.queryParams.pageNum=1,this.queryParams.pageSize=10,this.getTypes()},handleSelectionChange:function(t){this.ids=t.map((function(t){return t.dictCode}))},deleteDictIds:function(){var t=this;0==this.ids.length?this.$message({type:"error",message:"请选择要删除的字典数据!"}):this.$confirm("确定要删除吗?","信息提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["c"])(t.ids).then((function(e){200==e.code?(t.getTypes(t.data),t.$message({type:"success",message:"删除成功!"})):t.$message({type:"error",message:e.msg})}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},deleteDict:function(t){var e=this;this.$confirm("确定要删除吗?","信息提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["c"])(t.dictCode).then((function(t){200==t.code?(e.getTypes(e.data),e.$message({type:"success",message:"删除成功!"})):e.$message({type:"error",message:t.msg})}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},submitForm:function(){var t=this;1==this.clickType?Object(r["a"])(this.form).then((function(e){200==e.code&&(t.$message({type:"success",message:"新增成功!"}),t.dialogFormVisible=!1,t.form={},t.getTypes())})):2==this.clickType&&Object(r["k"])(this.form).then((function(e){200==e.code&&(t.$message({type:"success",message:"修改成功!"}),t.dialogFormVisible=!1,t.form={},t.getTypes())}))},handleSearch:function(){this.queryParams.pageNum=1,this.getTypes()},getTypes:function(){var t=this;Object(r["j"])(this.queryParams).then((function(e){t.tableData=e.data.records,t.total=e.data.total}))},addDepartMenDict:function(){this.form={},this.form.dictType=this.$route.query.testQuery,this.clickType=1,this.title="添加字典数据",this.dialogFormVisible=!0},editDict:function(t){this.clickType=2,this.title="修改字典数据",this.dialogFormVisible=!0,this.form=JSON.parse(JSON.stringify(t))},handleSizeChange:function(t){this.queryParams.pageSize=t,this.getTypes()},handleCurrentChange:function(t){this.queryParams.pageNum=t,this.getTypes()}}},c=n,u=(a("82fc"),a("2877")),d=Object(u["a"])(c,s,l,!1,null,"23c91ccd",null);e["default"]=d.exports},"82fc":function(t,e,a){"use strict";a("f25e")},f25e:function(t,e,a){},f5e6:function(t,e,a){"use strict";a.d(e,"h",(function(){return l})),a.d(e,"b",(function(){return i})),a.d(e,"l",(function(){return r})),a.d(e,"d",(function(){return o})),a.d(e,"f",(function(){return n})),a.d(e,"e",(function(){return c})),a.d(e,"j",(function(){return u})),a.d(e,"a",(function(){return d})),a.d(e,"k",(function(){return p})),a.d(e,"c",(function(){return m})),a.d(e,"g",(function(){return f})),a.d(e,"i",(function(){return b}));var s=a("b775");function l(t){return Object(s["a"])({url:"/system/dict/type/list",method:"post",data:t})}function i(t){return Object(s["a"])({url:"/system/dict/type",method:"post",data:t})}function r(t){return Object(s["a"])({url:"/system/dict/type/update",method:"post",data:t})}function o(t){return Object(s["a"])({url:"/system/dict/type/remove/".concat(t),method:"get"})}function n(t){return Object(s["a"])({url:"/system/dict/type/export",method:"post",data:t,responseType:"blob"})}function c(t){return Object(s["a"])({url:"/system/dict/type/export",method:"post",data:t,responseType:"blob"})}function u(t){return Object(s["a"])({url:"/system/dict/data/list",method:"post",data:t})}function d(t){return Object(s["a"])({url:"/system/dict/data",method:"post",data:t})}function p(t){return Object(s["a"])({url:"/system/dict/data/edit",method:"post",data:t})}function m(t){return Object(s["a"])({url:"/system/dict/data/remove/".concat(t),method:"get"})}function f(t){return Object(s["a"])({url:"/system/dict/data/export",method:"post",data:t,responseType:"blob"})}function b(t){return Object(s["a"])({url:"/system/dict/type/optionselect",method:"get",params:t})}}}]);
|