From 0b0506c411582f203fcd3d7f4ebd7f098d7d1a10 Mon Sep 17 00:00:00 2001 From: yaojn Date: Wed, 29 Nov 2023 15:51:07 +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[=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=20=20-=20[?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D]=E6=A8=A1=E5=9D=97=E7=BC=96=E8=BE=91runner?= =?UTF-8?q?=E6=97=B6=EF=BC=8Crunner=E6=B2=A1=E6=9C=89=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98=20-=20[=E4=BF=AE=E5=A4=8D]?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=BA=94=E7=94=A8=E5=92=8C=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=97=B6=EF=BC=8C=E8=8E=B7=E5=8F=96itemlist?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=85=A2=EF=BC=8C=E5=AF=BC=E8=87=B4=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=97=B6=E4=BF=A1=E6=81=AF=E5=9B=9E=E6=98=BE=E6=9C=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application-config-manage.vue | 48 +++- .../application-config/config/app-manage.vue | 6 + .../config/app/app-info-manage.vue | 237 +++++++++--------- .../config/app/components/app-tree-edit.vue | 13 +- .../app/components/module-tree-edit.vue | 13 +- .../config/module-manage.vue | 9 +- .../config/module/module-edit.vue | 8 +- 7 files changed, 194 insertions(+), 140 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 5cb69b9c..f420f0b3 100644 --- a/src/views/pages/deploy/application-config/application-config-manage.vue +++ b/src/views/pages/deploy/application-config/application-config-manage.vue @@ -12,25 +12,25 @@ - @@ -125,7 +139,13 @@ export default { ClearConfigDialog: resolve => require(['./config/clear-config-dialog'], resolve), // 清空配置 ImportPipelineConfigDialog: resolve => require(['pages/deploy/application-config/import-pipeline-config-dialog'], resolve) // 导入流水线配置 }, - props: {}, + props: { + hideFucntionExcludeAppModuleRunner: { + // codehub新增应用配置入口,为了维护应用和模块,以及模块对应的runner组,发布其他功能全部屏蔽 + type: Boolean, + default: false + } + }, data() { return { loadingShow: true, @@ -477,6 +497,10 @@ export default { return true; } return false; + }, + canShow() { + // 应用和模块以及模块对应的runner组,其他功能全部屏蔽 + return !this.hideFucntionExcludeAppModuleRunner; } }, diff --git a/src/views/pages/deploy/application-config/config/app-manage.vue b/src/views/pages/deploy/application-config/config/app-manage.vue index 5f0c25c8..e0e9a5e9 100644 --- a/src/views/pages/deploy/application-config/config/app-manage.vue +++ b/src/views/pages/deploy/application-config/config/app-manage.vue @@ -11,6 +11,7 @@ v-if="tabValue == 'appConfig'" :appSystemId="appSystemId" :hasEditConfigAuth="hasEditConfigAuth" + :hideFucntionExcludeAppModuleRunner="hideFucntionExcludeAppModuleRunner" @updateAuth="updateAuth" > @@ -56,6 +57,11 @@ export default { // 是否有超级流水线权限 type: Boolean, default: false + }, + hideFucntionExcludeAppModuleRunner: { + // codehub新增应用配置入口,为了维护应用和模块,以及模块对应的runner组,发布其他功能全部屏蔽 + type: Boolean, + default: false } }, data() { 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 9216ccb9..18b60ee7 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 @@ -4,116 +4,118 @@
-
-
- {{ $t('page.authority') }} -
-
- - -
- {{ $t('page.add') }} - {{ $t('page.edit') }} - {{ $t('page.delete') }} -
- - - - - - - -
-
- -
- - - - - - - - - { - this.searchAuth(1); - }).finally(() => { - this.loadingShow = false; - }); + if (this.canShow) { + this.loadingShow = true; + this.getAuthList().then(() => { + this.searchAuth(1); + }).finally(() => { + this.loadingShow = false; + }); + } }, beforeUpdate() {}, updated() {}, @@ -485,7 +494,11 @@ export default { } }, filter: {}, - computed: {}, + computed: { + canShow() { + return !this.hideFucntionExcludeAppModuleRunner; + } + }, watch: {} }; diff --git a/src/views/pages/deploy/application-config/config/app/components/app-tree-edit.vue b/src/views/pages/deploy/application-config/config/app/components/app-tree-edit.vue index 5bea1a95..f759be8b 100644 --- a/src/views/pages/deploy/application-config/config/app/components/app-tree-edit.vue +++ b/src/views/pages/deploy/application-config/config/app/components/app-tree-edit.vue @@ -59,15 +59,14 @@ export default { }; }, beforeCreate() {}, - created() { + async created() { + await this.getAppSystemCiAttrList(); if (this.appSystemId) { this.getAppSystemById(this.appSystemId); } }, beforeMount() {}, - mounted() { - this.getAppSystemCiAttrList(); - }, + mounted() {}, beforeUpdate() {}, updated() {}, activated() {}, @@ -82,7 +81,7 @@ export default { }; //获取应用系统模型属性列表 //此接口查询的属性列表里的控件,现在from控件大部分都支持,有个别不支持,如附件、表格、表达式、超链接 - this.$api.deploy.applicationConfig.getAppSystemCiAttrList(params).then((res) => { + return this.$api.deploy.applicationConfig.getAppSystemCiAttrList(params).then((res) => { if (res.Status == 'OK') { this.formConfig = this.formConfig.concat(this.getAppCiAttrList(res.Return, this.attrNameList, 'APP')); } @@ -116,8 +115,8 @@ export default { getAppSystemById(id) { this.$api.deploy.applicationConfig.getAppSystem(id).then((res) => { if (res && res.Status == 'OK') { - let dataInfo = res.Return; - if (dataInfo && !this.$utils.isEmptyObj(dataInfo)) { + let dataInfo = res.Return || {}; + if (dataInfo && !this.$utils.isEmpty(dataInfo)) { this.formConfig && this.formConfig.forEach((item) => { if (dataInfo[item.name]) { this.$set(this.formValue, item.name, item.name == 'maintenanceWindow' ? this.handleMaintenanceWindowValue(dataInfo[item.name]) : dataInfo[item.name]); diff --git a/src/views/pages/deploy/application-config/config/app/components/module-tree-edit.vue b/src/views/pages/deploy/application-config/config/app/components/module-tree-edit.vue index b8e86fb9..1a822452 100644 --- a/src/views/pages/deploy/application-config/config/app/components/module-tree-edit.vue +++ b/src/views/pages/deploy/application-config/config/app/components/module-tree-edit.vue @@ -65,15 +65,14 @@ export default { }; }, beforeCreate() {}, - created() { + async created() { + await this.getAppModuleCiAttrList(); if (this.appModuleId) { this.getAppModueInfoById(this.appModuleId); } }, beforeMount() {}, - mounted() { - this.getAppModuleCiAttrList(); - }, + mounted() {}, beforeUpdate() {}, updated() {}, activated() {}, @@ -88,7 +87,7 @@ export default { }; // 获取应用模块模型属性列表 //此接口查询的属性列表里的控件,现在from控件大部分都支持,有不支持,如 附件、表格、表达式、超链接 - this.$api.deploy.applicationConfig.getAppModuleCiAttrList(params).then((res) => { + return this.$api.deploy.applicationConfig.getAppModuleCiAttrList(params).then((res) => { if (res.Status == 'OK') { this.formConfig = this.formConfig.concat(this.getAppCiAttrList(res.Return, this.attrNameList, 'APP')); } @@ -123,8 +122,8 @@ export default { getAppModueInfoById(id) { this.$api.deploy.applicationConfig.getAppModue(id).then((res) => { if (res && res.Status == 'OK') { - let dataInfo = res.Return; - if (dataInfo && !this.$utils.isEmptyObj(dataInfo)) { + let dataInfo = res.Return || {}; + if (dataInfo && !this.$utils.isEmpty(dataInfo)) { this.formConfig && this.formConfig.forEach((item) => { if (dataInfo[item.name]) { this.$set(this.formValue, item.name, item.name == 'maintenanceWindow' ? this.handleMaintenanceWindowValue(dataInfo[item.name]) : dataInfo[item.name]); diff --git a/src/views/pages/deploy/application-config/config/module-manage.vue b/src/views/pages/deploy/application-config/config/module-manage.vue index 9a875b14..426c4349 100644 --- a/src/views/pages/deploy/application-config/config/module-manage.vue +++ b/src/views/pages/deploy/application-config/config/module-manage.vue @@ -38,7 +38,12 @@ - + @@ -70,6 +75,7 @@ export default { moduleInfo: {}, runnerGroupInfo: {}, tableConfig: {}, + runnerId: null, theadList: [ { key: 'name', @@ -113,6 +119,7 @@ export default { destroyed() {}, methods: { openModuleInfoEdit() { + this.runnerId = this.runnerGroupInfo?.id; this.isShowModuleInfoEdit = true; }, closeModuleInfoEdit(needRefresh) { diff --git a/src/views/pages/deploy/application-config/config/module/module-edit.vue b/src/views/pages/deploy/application-config/config/module/module-edit.vue index 18c42e25..a74f525a 100644 --- a/src/views/pages/deploy/application-config/config/module/module-edit.vue +++ b/src/views/pages/deploy/application-config/config/module/module-edit.vue @@ -32,11 +32,17 @@ export default { default: function() { return {}; } + }, + runnerId: { + type: Number, + default: null } }, data() { return { - formValue: {}, + formValue: { + runnerGroupId: this.runnerId + }, formConfig: [ { name: 'runnerGroupId', -- Gitee
- - {{ th.title }} -