From 94eb830a28df5d60209783e7776f43eaf62e2ef3 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 24 Oct 2022 13:46:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E6=93=8D=E4=BD=9C=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E6=9C=89=E9=85=8D=E9=A2=9D=E7=AE=A1=E7=90=86=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018654 --user=李玉号 【系统设置】开源版环境-操作日志-操作对象有“配额管理”信息 https://www.tapd.cn/55049933/s/1274070 --- .../frontend/src/business/common/config.js | 3 ++- .../src/business/system/log/OperatingLog.vue | 24 +++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/system-setting/frontend/src/business/common/config.js b/system-setting/frontend/src/business/common/config.js index 2c6bdbd336..4452a5d46f 100644 --- a/system-setting/frontend/src/business/common/config.js +++ b/system-setting/frontend/src/business/common/config.js @@ -194,7 +194,8 @@ export function SYSLIST() { { label: i18n.t('commons.system') + "-" + i18n.t('commons.quota'), value: [i18n.t('commons.system') + "-" + i18n.t('commons.quota'), 'SYSTEM_QUOTA_MANAGEMENT'], - leaf: true + leaf: true, + license: true }, { label: i18n.t('commons.system') + "-" + i18n.t('license.title'), diff --git a/system-setting/frontend/src/business/system/log/OperatingLog.vue b/system-setting/frontend/src/business/system/log/OperatingLog.vue index fb5067005f..7363fa682d 100644 --- a/system-setting/frontend/src/business/system/log/OperatingLog.vue +++ b/system-setting/frontend/src/business/system/log/OperatingLog.vue @@ -161,6 +161,7 @@ import {getWorkspaces} from "../../../api/workspace"; import {getUserListByResourceUrl} from "../../../api/user"; import {modifyUserByResourceId} from "metersphere-frontend/src/api/user"; import {getOperatingLogPages} from "../../../api/operating-log"; +import {hasLicense} from "metersphere-frontend/src/utils/permission"; export default { name: "OperatingLog", @@ -170,6 +171,26 @@ export default { MsLogDetail }, data() { + let getModules = function () { + let license = hasLicense(); + let data = new SYSLIST; + return data.filter(item => { + if (!item.license) { + if (item.children) { + item.children = item.children.filter(child => { + if (!child.license || (child.license && license)) { + return true; + } + }) + } + return true; + } else { + if (license) { + return true; + } + } + }); + }; return { props: { multiple: false, @@ -190,7 +211,7 @@ export default { LOG_TYPE: new LOG_TYPE(this), LOG_TYPE_MAP: new LOG_TYPE_MAP(this), LOG_MODULE_MAP: new LOG_MODULE_MAP(this), - sysList: new SYSLIST(), + sysList: getModules(), loading: false, options: [], selectLoading: false @@ -201,7 +222,6 @@ export default { handler(toPath) { if (toPath === '/setting/operatingLog/system') { this.isSystem = true; - this.sysList = new SYSLIST(); this.condition.workspaceId = ''; this.getWorkSpaceList(); this.getMember();