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

View File

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