fix: 修复帮助文档跳转404

This commit is contained in:
TsMask
2023-11-28 16:43:51 +08:00
parent a22213eae3
commit 534f261bd4
3 changed files with 33 additions and 11 deletions

View File

@@ -120,6 +120,16 @@ function fnComponentSetName(component: any, to: any) {
// 清空导航栏标签
tabsStore.clear();
/**系统使用手册跳转 */
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');
}
/**
* 国际化翻译转换
*/
@@ -285,9 +295,8 @@ document.addEventListener('visibilitychange', function () {
</a-button>
<a-button
type="link"
href="/help"
target="_blank"
size="small"
@click="fnClickHelpDoc()"
v-if="appStore.getHelpDoc !== '#'"
>
{{ t('loayouts.basic.helpDoc') }}

View File

@@ -32,6 +32,16 @@ function fnClickAlarm() {
router.push({ path: '/faultManage/active-alarm' });
}
/**系统使用手册跳转 */
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');
}
/**改变多语言 */
function fnChangeLocale(e: any) {
changeLocale(e.key);
@@ -54,7 +64,7 @@ function fnChangeLocale(e: any) {
<a-tooltip placement="bottom" v-if="appStore.getHelpDoc !== '#'">
<template #title>{{ t('loayouts.rightContent.helpDoc') }}</template>
<a-button type="text" href="/help" target="_blank">
<a-button type="text" @click="fnClickHelpDoc()">
<template #icon>
<QuestionCircleOutlined />
</template>