threethousanddream 3 ヶ月 前
コミット
72a6a74e87
2 ファイル変更13 行追加11 行削除
  1. 1 1
      src/utils/request.js
  2. 12 10
      src/views/basic/dynamicModel/list/index.vue

ファイルの差分が大きいため隠しています
+ 1 - 1
src/utils/request.js


+ 12 - 10
src/views/basic/dynamicModel/list/index.vue

@@ -2265,7 +2265,7 @@ export default {
     rowPermissionShow(row, val, type) {
       // 判断行权限
       let authFlag = false;
-      if (this.config.rowPermissionStatus === 0) {
+      if (this.config.rowPermissionStatus === 1) {
         let userInfoObj = JSON.parse(localStorage.getItem("lowcodeUserInfo"));
         // 如果为私有信息
         const isPrivateInfo = row[this.columnDict[this.rowPermissionJson.permissionCubeColumnId]] === this.rowPermissionJson.privatePermission;
@@ -2282,11 +2282,15 @@ export default {
       }
       // 判断系统按钮sql展示条件
       let condFlag = false;
-      let btnId = this.systemBtnFlag[type];
-      if (btnId) {
-        let rowKey = row[this.columnDict[this.idKey]];
-        let btns = this.getPreconditionObj[rowKey] || [];
-        condFlag = !!btns.find(i => i.id === btnId);
+      let btn = this.systemBtnFlag[type];
+      if (btn) {
+        if (!btn.condition) {
+          condFlag = true;
+        } else {
+          let rowKey = row[this.columnDict[this.idKey]];
+          let btns = this.getPreconditionObj[rowKey] || [];
+          condFlag = !!btns.find(i => i.id === btn.id);
+        }
       } else {
         condFlag = true;
       }
@@ -3205,10 +3209,8 @@ export default {
       let systemBtnIds = [], systemBtnFlag = {}, toCheckTypes = ["edit", "remove", "detail"];
       this.systemBtns.forEach(btn => {
         if (toCheckTypes.includes(btn.permKey)) {
-          if (btn.buttonId) {
-            systemBtnIds.push(btn.buttonId);
-            systemBtnFlag[btn.permKey] = btn.buttonId;
-          }
+          systemBtnFlag[btn.permKey] = { id: btn.buttonId, condition: btn.buttonCondition };
+          if (btn.buttonId) systemBtnIds.push(btn.buttonId);
         }
       });
       this.systemBtnFlag = systemBtnFlag;