Browse Source

2024-1-4 数据字典

master
zelian_wu 2 years ago
parent
commit
916fbdb578
  1. 16
      src/views/modules/sys/dict-data.vue

16
src/views/modules/sys/dict-data.vue

@ -55,7 +55,7 @@ export default {
status:[{required:true,message:' ',tagger:['blur','change']}], status:[{required:true,message:' ',tagger:['blur','change']}],
}, },
// //
selectionDictTypeList:[],
selectionDictDataList:[],
// //
activeTabs:'dictData', activeTabs:'dictData',
} }
@ -151,12 +151,17 @@ export default {
}); });
}, },
delBatchDictData(){ delBatchDictData(){
let some = this.selectionDictDataList.some(item=>item.isSystem === 'N');
if (!some){
this.$alert('系统参数,无法删除', '警告', {confirmButtonText: '确定',});
return;
}
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delBatchDictData(this.selectionDictTypeList).then(({data})=>{
delBatchDictData(this.selectionDictDataList).then(({data})=>{
if (data && data.code === 0){ if (data && data.code === 0){
this.$message.success(data.msg); this.$message.success(data.msg);
this.initDictData(); this.initDictData();
@ -168,14 +173,11 @@ export default {
this.$message.error(error) this.$message.error(error)
}) })
}).catch(() => { }).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
}); });
}, },
handleSelectionChange(val){ handleSelectionChange(val){
this.selectionDictTypeList = val;
this.selectionDictDataList = val;
}, },
dictTypeSizeChange(val){ dictTypeSizeChange(val){
this.no = 1 this.no = 1

Loading…
Cancel
Save