Merge remote-tracking branch 'origin/main' into multi-tenant

This commit is contained in:
lai
2024-07-24 18:36:11 +08:00
4 changed files with 56 additions and 62 deletions

View File

@@ -343,7 +343,7 @@ onUnmounted(() => {
:href="appStore.officialUrl"
target="_blank"
size="small"
v-perms:has="['system:setting:link']"
v-perms:has="['system:setting:official']"
v-if="appStore.officialUrl !== '#'"
>
{{ t('loayouts.basic.officialUrl') }}
@@ -351,7 +351,7 @@ onUnmounted(() => {
<a-button
type="link"
size="small"
v-perms:has="['system:setting:HelpDoc']"
v-perms:has="['system:setting:doc']"
@click="fnClickHelpDoc()"
>
{{ t('loayouts.basic.helpDoc') }}

View File

@@ -101,55 +101,59 @@ function fnChangeLocale(e: any) {
</a-button>
<!-- 锁屏操作 -->
<a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.lock') }}</template>
<a-button type="text" style="color: inherit" @click="fnClickLock()">
<template #icon>
<LockOutlined />
</template>
</a-button>
<ProModal
:drag="true"
:width="400"
:minHeight="200"
:mask-closable="false"
v-model:visible="lockConfirm"
:title="t('loayouts.rightContent.lockTip')"
@ok="fnClickLockToPage()"
>
<a-space>
{{ t('loayouts.rightContent.lockPasswd') }}
<a-input-password
v-model:value="lockPasswd"
:placeholder="t('common.inputPlease')"
>
<template #prefix>
<a-tooltip
:title="t('loayouts.rightContent.lockPasswdTip')"
placement="topLeft"
>
<UnlockOutlined />
</a-tooltip>
</template>
</a-input-password>
</a-space>
</ProModal>
</a-tooltip>
<span v-perms:has="['system:setting:lock']">
<a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.lock') }}</template>
<a-button type="text" style="color: inherit" @click="fnClickLock()">
<template #icon>
<LockOutlined />
</template>
</a-button>
<ProModal
:drag="true"
:width="400"
:minHeight="200"
:mask-closable="false"
v-model:visible="lockConfirm"
:title="t('loayouts.rightContent.lockTip')"
@ok="fnClickLockToPage()"
>
<a-space>
{{ t('loayouts.rightContent.lockPasswd') }}
<a-input-password
v-model:value="lockPasswd"
:placeholder="t('common.inputPlease')"
>
<template #prefix>
<a-tooltip
:title="t('loayouts.rightContent.lockPasswdTip')"
placement="topLeft"
>
<UnlockOutlined />
</a-tooltip>
</template>
</a-input-password>
</a-space>
</ProModal>
</a-tooltip>
</span>
<a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
<a-button
type="text"
style="color: inherit"
@click="fnClickHelpDoc()"
v-perms:has="['system:setting:HelpDoc']"
v-roles:has="[TENANTADMIN_ROLE_KEY]"
>
<template #icon>
<QuestionCircleOutlined />
</template>
</a-button>
</a-tooltip>
<!-- 用户帮助手册 -->
<span v-perms:has="['system:setting:doc']">
<a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
<a-button
type="text"
style="color: inherit"
@click="fnClickHelpDoc()"
v-roles:has="[TENANTADMIN_ROLE_KEY]"
>
<template #icon>
<QuestionCircleOutlined />
</template>
</a-button>
</a-tooltip>
</span>
<a-tooltip placement="bottom">
<template #title>{{ t('loayouts.rightContent.fullscreen') }}</template>

View File

@@ -134,16 +134,6 @@ onMounted(() => {
function fnChangeLocale(e: any) {
changeLocale(e.key);
}
/**系统使用手册跳转 */
function fnClickHelpDoc(language?: string) {
const routeData = router.resolve({ name: 'HelpDoc' });
let href = routeData.href;
if (language) {
href = `${routeData.href}?language=${language}`;
}
window.open(href, '_blank');
}
</script>
<template>

View File

@@ -31,13 +31,13 @@ const { t } = useI18n();
{{ t('views.system.setting.sysLoginBg') }}
</a-divider>
<ChangeLogoBG></ChangeLogoBG>
<div v-perms:has="['system:setting:HelpDoc']">
<div v-perms:has="['system:setting:doc']">
<a-divider orientation="left">
{{ t('views.system.setting.sysHelpDoc') }}
</a-divider>
<ChangeHelpDoc></ChangeHelpDoc>
</div>
<div v-perms:has="['system:setting:link']">
<div v-perms:has="['system:setting:official']">
<a-divider orientation="left">
{{ t('views.system.setting.sysOfficialUrl') }}
</a-divider>