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