ellisran před 1 měsícem
rodič
revize
1295040259
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      app/controller/quality_controller.js

+ 2 - 2
app/controller/quality_controller.js

@@ -155,7 +155,7 @@ module.exports = app => {
                 };
                 switch (data.type) {
                     case 'add-audit':
-                        if (!data.key || !tenderPermissionKeys.includes(data.key) || !Object.keys(tPsKeys).includes(data.key)) throw '参数有误';
+                        if (!data.key || (!tenderPermissionKeys.includes(data.key) && !Object.keys(tPsKeys).includes(data.key))) throw '参数有误';
                         // // 判断用户是单个还是数组
                         uids = data.id instanceof Array ? data.id : [data.id];
                         // // 判断该用户的组是否已加入到表中,已加入则提示无需添加
@@ -178,7 +178,7 @@ module.exports = app => {
                         responseData.data = await ctx.service.tenderPermission.getPartsPermission(tenderInfo.id, insertKeys);
                         break;
                     case 'del-audit':
-                        if (!data.key || !tenderPermissionKeys.includes(data.key) || !Object.keys(tPsKeys).includes(data.key)) throw '参数有误';
+                        if (!data.key || (!tenderPermissionKeys.includes(data.key) && !Object.keys(tPsKeys).includes(data.key))) throw '参数有误';
                         uids = data.id instanceof Array ? data.id : [data.id];
                         if (uids.length === 0) throw '没有选择要移除的用户';
                         const deleteKeys = data.together ? tPsKeys[data.key] : [data.key];