品牌活动控制类型不能删除(val:code),多个编码用英文逗号拼接
This commit is contained in:
@@ -172,4 +172,11 @@ public class CommonController {
|
||||
return Result.success(count > 0);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("系统配置")
|
||||
public Result getConfigKeyObj(String key) {
|
||||
return Result.success().addData(sysDictService.dao().fetch(Sys_config.class, Cnd.where("configKey", "=", key)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -240,7 +240,8 @@ layout("/layouts/platform.html"){
|
||||
fileType: [{ required: true, message: "请选择文件类型", trigger: ["blur"] }],
|
||||
fileNumber: [{ required: true, message: "请输入文件个数", trigger: ["blur", "change"] }]
|
||||
},
|
||||
choose: {}
|
||||
choose: {},
|
||||
dictControlTypeCannotDeleteCodeList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -296,7 +297,7 @@ layout("/layouts/platform.html"){
|
||||
} else if (type == "edit") {
|
||||
this.openEdit(data)
|
||||
} else if (type == "delete") {
|
||||
this.doDelete(data.id)
|
||||
this.doDelete(data)
|
||||
} else if (type == "bottom") {
|
||||
this.rowChange(data, true)
|
||||
}
|
||||
@@ -386,14 +387,18 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
doDelete(id) {
|
||||
doDelete(data) {
|
||||
if(this.dictControlTypeCannotDeleteCodeList.includes(data.code)){
|
||||
this.$message.warning("类型编码:" + data.code + ", 已配置不能删除!");
|
||||
return ;
|
||||
}
|
||||
this.$confirm("此操作将删除类型,确认删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post(loc() + "/doDelete", { id: id }).then((res) => {
|
||||
this.$axios.post(loc() + "/doDelete", { id: data.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(res.msg)
|
||||
@@ -409,10 +414,20 @@ layout("/layouts/platform.html"){
|
||||
async getEnumOptions() {
|
||||
const resp = await this.$axios.post("/open/common/dictEnumOptions", { name: "ColumnFormTypeEnum" })
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
async getConfigKeyObj() {
|
||||
//该参数控制哪些类型不能删除(val: code)
|
||||
const resp = await this.$axios.post("/open/common/getConfigKeyObj", { key: "dictControlTypeCannotDeleteCodeList" })
|
||||
if(resp.data?.configValue){
|
||||
this.dictControlTypeCannotDeleteCodeList = resp.data.configValue.split(",");
|
||||
} else {
|
||||
return "暂无配置提示内容";
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getColTypeOptions()
|
||||
await this.getConfigKeyObj()
|
||||
this.columnFormTypeList = await this.getEnumOptions()
|
||||
this.pageData()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user