From 8e1e495d577ae82f77eb1d13f811a0db47eacd4d Mon Sep 17 00:00:00 2001 From: yaojn Date: Thu, 7 Dec 2023 12:24:31 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E5=8A=9F=E8=83=BD]codehub=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BA=94=E7=94=A8=E9=85=8D=E7=BD=AE=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=20=20=20-=20[=E5=85=B3=E8=81=94]#[1035306810179584]codehub?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=94=E7=94=A8=E9=85=8D=E7=BD=AE=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=20http://192.168.0.96:8090/demo/rdm.html#/story-detai?= =?UTF-8?q?l/939050947543040/939050947543042/1035306810179584?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application-config-manage.vue | 1 - .../application-config/config/app/app-edit.vue | 2 +- .../config/app/app-info-manage.vue | 16 +++++++++------- .../app/components/batch-edit-auth-dialog.vue | 13 +++++++++---- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/views/pages/deploy/application-config/application-config-manage.vue b/src/views/pages/deploy/application-config/application-config-manage.vue index f8926926..55183ff7 100644 --- a/src/views/pages/deploy/application-config/application-config-manage.vue +++ b/src/views/pages/deploy/application-config/application-config-manage.vue @@ -488,7 +488,6 @@ export default { canEdit() { // 是否有“编辑配置”权限,isHasAllAuthority 表示自动发布管理员权限 if (this.authList.includes('operation#all') || this.authList.includes('operation#edit') || (this.selectedApp && this.selectedApp.isHasAllAuthority)) { - console.log('返回的值', this.selectedApp, this.authList); return true; } return false; diff --git a/src/views/pages/deploy/application-config/config/app/app-edit.vue b/src/views/pages/deploy/application-config/config/app/app-edit.vue index 771717ee..f3196041 100644 --- a/src/views/pages/deploy/application-config/config/app/app-edit.vue +++ b/src/views/pages/deploy/application-config/config/app/app-edit.vue @@ -242,7 +242,7 @@ export default { }); }, getAuthList() { - return this.$api.deploy.applicationConfig.getAuthList({appSystemId: this.params.appSystemId, actionList: this.hideFucntionExcludeAppModuleRunner ? ['view', 'edit'] : []}).then((res) => { + return this.$api.deploy.applicationConfig.getAuthList({appSystemId: this.params.appSystemId, includeActionList: this.hideFucntionExcludeAppModuleRunner ? ['view', 'edit'] : []}).then((res) => { if (res && res.Status == 'OK') { this.authSetting = res.Return || {}; for (let key in res.Return) { diff --git a/src/views/pages/deploy/application-config/config/app/app-info-manage.vue b/src/views/pages/deploy/application-config/config/app/app-info-manage.vue index df5ef9d2..9e9d84f4 100644 --- a/src/views/pages/deploy/application-config/config/app/app-info-manage.vue +++ b/src/views/pages/deploy/application-config/config/app/app-info-manage.vue @@ -35,7 +35,7 @@ :multiple="false" :dataList="authList" :placeholder="$t('page.authority')" - @on-change="searchAuth(1)" + @change="searchAuth(1)" > @@ -198,7 +198,7 @@ export default { destroyed() {}, methods: { getAuthList() { - return this.$api.deploy.applicationConfig.getAuthList({appSystemId: this.appSystemId, actionList: !this.canShow ? ['view', 'edit'] : []}).then((res) => { + return this.$api.deploy.applicationConfig.getAuthList({appSystemId: this.appSystemId, includeActionList: !this.canShow ? ['view', 'edit'] : []}).then((res) => { if (res && res.Status == 'OK') { let dataInfo = res.Return || {}; this.handleAuthListData(dataInfo); @@ -221,11 +221,13 @@ export default { searchAuth(currentPage) { this.searchParam.currentPage = currentPage || 1; let searchParam = { + ...this.searchParam, actionList: this.handleActionList(this.actionList), - authorityStrList: this.authorityStrList ? [this.authorityStrList] : [] + authorityStrList: this.authorityStrList ? [this.authorityStrList] : [], + includeActionList: !this.canShow ? ['view', 'edit'] : [] }; this.loadingShow = true; - this.$api.deploy.applicationConfig.getAppConfigAuthList({...this.searchParam, ...searchParam, actionList: !this.canShow ? ['view', 'edit'] : []}).then((res) => { + this.$api.deploy.applicationConfig.getAppConfigAuthList(searchParam).then((res) => { if (res && res.Status == 'OK') { this.operationAuthLength = 0; this.envAuthLength = 0; @@ -457,10 +459,10 @@ export default { } } }, - handleActionList(auth) { + handleActionList(valueList) { let actionList = []; - if (auth) { - let authList = auth.split('/'); + if (!this.$utils.isEmpty(valueList)) { + let authList = valueList.split('/'); if (authList && authList.length > 0) { actionList.push({ action: authList[1], diff --git a/src/views/pages/deploy/application-config/config/app/components/batch-edit-auth-dialog.vue b/src/views/pages/deploy/application-config/config/app/components/batch-edit-auth-dialog.vue index c4d50e1c..cfe75252 100644 --- a/src/views/pages/deploy/application-config/config/app/components/batch-edit-auth-dialog.vue +++ b/src/views/pages/deploy/application-config/config/app/components/batch-edit-auth-dialog.vue @@ -28,7 +28,7 @@ > -
  • +
  • {{ $t('term.deploy.envauth') }}
  • -
  • +
  • {{ $t('term.deploy.scenarioauth') }}
    { + return this.$api.deploy.applicationConfig.getAuthList({appSystemId: this.params.appSystemId, includeActionList: this.hideFucntionExcludeAppModuleRunner ? ['view', 'edit'] : []}).then((res) => { if (res && res.Status == 'OK') { this.authSetting = res.Return || {}; for (let key in res.Return) { @@ -236,7 +236,12 @@ export default { } }, filter: {}, - computed: {}, + computed: { + canShowEnvScenario() { + // 显示环境场景 + return !this.hideFucntionExcludeAppModuleRunner; + } + }, watch: {} }; -- Gitee