2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
|
webpackJsonp([23],{"85Kt":function(t,e){},V74S:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("mvHQ"),l=a.n(i),o={data:function(){return{queryInfo:{dictValue:"",pageNum:1,pageSize:10},dataDictList:[],managerDataDictList:[],dictOptions:[],editForm:{},operatorPerson:JSON.parse(localStorage.getItem("userInfo")).nick,addSubDataDictDefaultFatherId:"",currpage:1,total:0,addDialogVisible:!1,editDialogVisible:!1,managerDialogVisible:!1,addForm:{dictValue:"",comments:""},addFormRules:{dictCode:[{required:!0,message:"请输入字典值",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],subDictCode:[{required:!1,message:"请输入字典值",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],dictValue:[{required:!0,message:"请输入字典名称",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 50 个字符",trigger:"blur"}],comments:[{required:!1,message:"请输入密码",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]},managerFormRules:{}}},mounted:function(){},created:function(){this.getDataDictList()},methods:{selectDataDictList:function(){this.queryInfo.pageNum=1,this.total=0,this.getDataDictList()},getDataDictList:function(){var t=this;this.loading=!0,this.$api.dict.queryAllFatherDataDict(l()(this.queryInfo)).then(function(e){t.loading=!1,t.dataDictList=e.data.data,t.total=e.data.count,t.queryInfo.pageNum=1}).catch(function(){t.loading=!1})},addSubDataDict:function(){var t={fatherId:this.addSubDataDictDefaultFatherId};this.managerDataDictList.push(t)},updateSubDataDict:function(){var t=this;if(this.managerDataDictList.length<=0)this.$notify({type:"warning",message:"至少添加一个字典"});else{var e=!1;document.querySelectorAll(".manager-dictName-input .el-input__inner").forEach(function(t){""==t.value?(t.style.border="1px solid red",e=!0):(t.style.border="1px solid #DCDFE6",e=!1)}),e||this.$api.dict.updateSubDataDict(l()(this.managerDataDictList)).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.managerDialogClose(),t.getDataDictList()}).catch(function(){})}},delSubDataDict:function(t){this.managerDataDictList.splice(t.$index,1)},managerDialogClose:function(){this.managerDialogVisible=!1},showManagerDialog:function(t){var e=this;this.addSubDataDictDefaultFatherId=t.dictCode,this.managerDialogVisible=!0,this.$api.dict.queryAllSubDataDictByFatherId(t.dictCode).then(function(t){e.loading=!1,e.managerDataDictList=t.data.data}).catch(function(){e.loading=!1})},editDialogClose:function(){this.editDialogVisible=!1,this.$refs.editFormRef.resetFields()},showEditDialog:function(t){var e=this;this.editDialogVisible=!0,this.$api.dict.queryFatherDataDictById(t.id).then(function(t){e.loading=!1,e.editForm=t.data.data}).catch(function(){e.loading=!1})},editDataDict:function(){var t=this;this.$refs.editFormRef.validate(function(e){e&&t.$api.dict.updateFatherDataDict(l()(t.editForm)).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.editDialogVisible=!1,t.getDataDictList()}).catch(function(){t.loading=!1})})},addDialogClose:function(){this.$refs.addFormRef.resetFields()},addDataDict:function(){var t=this;this.$refs.addFormRef.validate(function(e){e&&t.$api.dict.addFatherDataDict(l()(t.addForm)).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.addDialogVisible=!1,t.getDataDictList()}).catch(function(){t.loading=!1})})},delDataDict:function(t){var e=this;this.$confirm("确定删除该字典吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$api.dict.deleteFatherDataDictByDictCode(t.dictCode).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.getDataDictList()}).catch(function(){e.loading=!1})}).catch(function(){})},handleSizeChange:function(t){this.queryInfo.pageSize=t,this.getDataDictList()},handleCurrentChange:function(t){this.queryInfo.pageNum=t,this.getDataDictList()}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"di
|
||
|
//# sourceMappingURL=23.caeda2a4cd8d7bdb8b60.js.map
|