Skip to content

Commit

Permalink
fix: S-mart 应用不能在页面上修改基本信息、可见范围展示修复
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 13463
  • Loading branch information
leafage-collb committed Jul 30, 2024
1 parent b63d498 commit 7ac827c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webfe/package_vue/src/components/authentication-info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</span>
</template>
</bk-table-column>
<bk-table-column :label="$t('操作')" :width="120">
<bk-table-column :label="$t('操作')" :width="localLanguage === 'en' ? 150 : 120">
<template slot-scope="props">
<a
v-bk-tooltips.light="disabledTooltipsConfig"
Expand Down Expand Up @@ -287,7 +287,7 @@
:disabled="!option.enabled"
>
<span>{{ option.bk_app_secret }}</span>
({{ option.enabled ? $t('创建时间:') + smartTime(option.created_at, 'smartShorten') : $t('已禁用') }})
({{ option.enabled ? `${$t('创建时间')}: ` + smartTime(option.created_at, 'smartShorten') : $t('已禁用') }})
</bk-option>
<div
slot="extension"
Expand Down Expand Up @@ -423,6 +423,9 @@ export default {
isAddNewSecret() {
return this.appSecretList.length < 2;
},
localLanguage() {
return this.$store.state.localLanguage;
},
},
watch: {
appCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{{ $t('基本信息-title') }}
<div
v-if="!appBaseInfoConfig.isEdit"
v-bk-tooltips="{ content: basicInfoTips, disabled: !basicInfoTips }"
:class="['edit-container', { 'disabled': !isBasicInfoEditable }]"
@click="handleEditBaseInfo">
<i class="paasng-icon paasng-edit-2 pl10" />
Expand Down Expand Up @@ -296,6 +297,7 @@ export default {
return this.curAppInfo.role.name !== 'operator';
},
isBasicInfoEditable() {
if (this.isSmartApp) return false;
return ['administrator', 'operator'].indexOf(this.curAppInfo.role.name) !== -1;
},
formRemoveValidated() {
Expand All @@ -316,6 +318,9 @@ export default {
previewImageRrl() {
return this.curFileData[0]?.url;
},
basicInfoTips() {
return this.isSmartApp ? this.$t('应用名称等基本信息请在“app.yaml”文件中配置') : '';
},
},
watch: {
curAppInfo(value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default {
handler(newVal) {
this.baseInfo = cloneDeep(newVal);
},
deep: true,
immediate: true,
},
},
Expand Down

0 comments on commit 7ac827c

Please sign in to comment.