fix(系统设置): 修复扫码登录页面控制显示问题

--bug=1045016 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045016
This commit is contained in:
guoyuqi 2024-08-14 10:43:20 +08:00 committed by 刘瑞斌
parent 0fa2ab5982
commit 246f171d22
2 changed files with 14 additions and 5 deletions

View File

@ -32,6 +32,7 @@ export interface PlatformSource {
platform: string;
enable: boolean;
valid: boolean;
hasConfig: boolean;
}
export interface PlatformConfigItem {
@ -42,6 +43,7 @@ export interface PlatformConfigItem {
valid: boolean;
logo: string;
edit: boolean;
hasConfig: boolean;
}
export type PlatformSourceList = PlatformSource[];

View File

@ -20,7 +20,7 @@
<div class="flex flex-col justify-start">
<p>
<span class="mr-4 font-semibold">{{ item.title }}</span>
<span v-if="!item.valid" class="ms-enable">{{ t('organization.service.unconfigured') }}</span>
<span v-if="!item.hasConfig" class="ms-enable">{{ t('organization.service.unconfigured') }}</span>
<span
v-else
class="ms-enable active"
@ -36,14 +36,16 @@
</div>
<div class="flex justify-between">
<a-space>
<a-tooltip v-if="!item.valid" :content="t('organization.service.unconfiguredTip')" position="tl">
<a-tooltip v-if="!item.hasConfig" :content="t('organization.service.unconfiguredTip')" position="tl">
<span>
<a-button
v-if="!item.valid"
v-if="!item.hasConfig"
type="outline"
class="arco-btn-outline--secondary"
size="mini"
:disabled="!item.valid || !hasAnyPermission(['SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE'])"
:disabled="
!item.hasConfig || !hasAnyPermission(['SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE'])
"
@click="getValidateHandler(item.key)"
>{{ t('organization.service.testLink') }}</a-button
></span
@ -51,7 +53,7 @@
</a-tooltip>
<a-button
v-else
:disabled="!item.valid || !hasAnyPermission(['SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE'])"
:disabled="!item.hasConfig || !hasAnyPermission(['SYSTEM_PARAMETER_SETTING_QRCODE:READ+UPDATE'])"
type="outline"
class="arco-btn-outline--secondary"
size="mini"
@ -161,6 +163,7 @@
valid: false,
logo: 'icon-logo_wechat-work',
edit: false,
hasConfig: false,
},
{
key: 'DING_TALK',
@ -170,6 +173,7 @@
valid: false,
logo: 'icon-logo_dingtalk',
edit: false,
hasConfig: false,
},
{
key: 'LARK',
@ -179,6 +183,7 @@
valid: false,
logo: 'icon-logo_lark',
edit: false,
hasConfig: false,
},
{
key: 'LARK_SUITE',
@ -188,6 +193,7 @@
valid: false,
logo: 'icon-logo_lark',
edit: false,
hasConfig: false,
},
]);
const data = ref<PlatformSourceList>([]);
@ -234,6 +240,7 @@
filterKey.enable = dataKey.enable;
filterKey.valid = dataKey.valid;
filterKey.edit = true;
filterKey.hasConfig = dataKey.hasConfig;
}
});
});