diff --git a/api/app/lib/controllers/dataQuality/index.js b/api/app/lib/controllers/dataQuality/index.js index 4a628b0..1f2e1de 100644 --- a/api/app/lib/controllers/dataQuality/index.js +++ b/api/app/lib/controllers/dataQuality/index.js @@ -73,7 +73,7 @@ function getStandardDocFolders (opts) { -// 标准文档目录新增失败 + function postStandardDocFolders (opts) { return async function (ctx, next) { @@ -157,6 +157,11 @@ function postBusinessRules (opts) { const { id, name, description, problemType, problemLevel, ruleBasis } = ctx.request.body; + let findOne = await models.BusinessRule.findOne({ where: { name: name } }) + if ((!id && findOne) || (id && findOne && findOne.id != id)) { + message = '业务规则名称重复' + throw '' + } if (id) { await models.BusinessRule.update({ name, description, problemType, problemLevel, ruleBasis diff --git a/web/client/assets/files/common/1687657483581_2.jpg b/web/client/assets/files/common/1687657483581_2.jpg new file mode 100644 index 0000000..3f96826 Binary files /dev/null and b/web/client/assets/files/common/1687657483581_2.jpg differ diff --git a/web/client/src/sections/dataQuality/components/fileModal.js b/web/client/src/sections/dataQuality/components/fileModal.js index 760a750..54356a6 100644 --- a/web/client/src/sections/dataQuality/components/fileModal.js +++ b/web/client/src/sections/dataQuality/components/fileModal.js @@ -78,7 +78,7 @@ function FileModal ({ loading, parent, user, actions, editData = {}, dispatch, c />