fix(navbar): 修复导航栏国际化字符显示问题

- 修复了搜索和公告通知注释的字符编码问题
- 修复了公告和通知按钮的字符显示问题
- 修复了帮助中心按钮的字符显示问题
- 添加了主题设置功能并修复相关字符编码
- 修复了个人中心菜单项的字符显示问题
- 修复了锁定屏幕和退出登录选项的字符显示问题
- 修复了切换科室对话框标题和按钮的字符显示问题
- 导入Setting图标组件以支持主题设置功能
- 修复了加载和更新未读数量函数的注释字符问题
- 修复了切换侧边栏函数注释的字符问题
- 修复了切换科室确认消息框的字符显示问题
- 修复了退出系统确认消息框的字符显示问题
- 修复了打开公告通知面板函数注释的字符
This commit is contained in:
2026-06-04 12:22:07 +08:00
parent 5751c6941c
commit 14a81564bf

View File

@@ -11,7 +11,7 @@
</el-icon> </el-icon>
</div> </div>
</div> </div>
<!-- 搜索和公告通知 --> <!-- 搜索åŒå¬åŠéšçŸ¥ -->
<div class="left-actions"> <div class="left-actions">
<template v-if="appStore.device !== 'mobile'"> <template v-if="appStore.device !== 'mobile'">
<header-search <header-search
@@ -19,9 +19,9 @@
class="left-action-item" class="left-action-item"
/> />
</template> </template>
<!-- 公告和通知按钮 --> <!-- å¬åŠåŒéšçŸ¥æŒé® -->
<el-tooltip <el-tooltip
content="公告/通知" content="公告/通知"
placement="bottom" placement="bottom"
> >
<div <div
@@ -37,9 +37,9 @@
</el-badge> </el-badge>
</div> </div>
</el-tooltip> </el-tooltip>
<!-- 帮助中心按钮 --> <!-- 帮助中心æŒé® -->
<el-tooltip <el-tooltip
content="帮助中心" content="帮助中心"
placement="bottom" placement="bottom"
> >
<div <div
@@ -49,6 +49,18 @@
<el-icon><Help /></el-icon> <el-icon><Help /></el-icon>
</div> </div>
</el-tooltip> </el-tooltip>
<!-- 主题/布局设置 -->
<el-tooltip
content="主题设置"
placement="bottom"
>
<div
class="left-action-item"
@click="setLayout"
>
<el-icon><Setting /></el-icon>
</div>
</el-tooltip>
</div> </div>
</div> </div>
<div class="right-menu"> <div class="right-menu">
@@ -81,19 +93,19 @@
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<router-link to="/user/profile"> <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item> <el-dropdown-item>个人中心</el-dropdown-item>
</router-link> </router-link>
<el-dropdown-item <el-dropdown-item
divided divided
command="lockScreen" command="lockScreen"
> >
<span>锁定屏幕</span> <span>éå®šå±å¹</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
divided divided
command="logout" command="logout"
> >
<span>退出登录</span> <span>éåºç»å½</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
@@ -126,7 +138,7 @@
</div> </div>
<el-dialog <el-dialog
v-model="showDialog" v-model="showDialog"
title="切换科室" title="切换科室"
width="400px" width="400px"
append-to-body append-to-body
destroy-on-close destroy-on-close
@@ -149,16 +161,16 @@
type="primary" type="primary"
@click="submit" @click="submit"
> >
确定 确定
</el-button> </el-button>
<el-button @click="showDialog = false"> <el-button @click="showDialog = false">
取消 åæˆ
</el-button> </el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<!-- 公告/通知面板 --> <!-- å¬åŠ/éšçŸ¥é¢æ¿ -->
<NoticePanel <NoticePanel
ref="noticePanelRef" ref="noticePanelRef"
@update-unread-count="updateUnreadCount" @update-unread-count="updateUnreadCount"
@@ -178,7 +190,7 @@ import useLockStore from '@/store/modules/lock';
import {getOrg, switchOrg} from '@/api/login'; import {getOrg, switchOrg} from '@/api/login';
import {getUnreadCount} from '@/api/system/notice'; import {getUnreadCount} from '@/api/system/notice';
import {useRouter} from 'vue-router'; import {useRouter} from 'vue-router';
import {Help} from "@element-plus/icons-vue"; import {Help, Setting} from "@element-plus/icons-vue";
const appStore = useAppStore(); const appStore = useAppStore();
const userStore = useUserStore() const userStore = useUserStore()
@@ -192,7 +204,7 @@ const unreadCount = ref(0);
const sidebar = computed(() => appStore.sidebar); const sidebar = computed(() => appStore.sidebar);
// 加载未读数量 // 加载未读数量
function loadUnreadCount() { function loadUnreadCount() {
getUnreadCount().then(res => { getUnreadCount().then(res => {
unreadCount.value = res.data || 0; unreadCount.value = res.data || 0;
@@ -201,12 +213,12 @@ function loadUnreadCount() {
}); });
} }
// 更新未读数量 // 更新未读数量
function updateUnreadCount() { function updateUnreadCount() {
loadUnreadCount(); loadUnreadCount();
} }
// 切换侧边栏 // 切换侧边栏
function toggleSideBar() { function toggleSideBar() {
appStore.toggleSideBar(); appStore.toggleSideBar();
} }
@@ -228,11 +240,11 @@ function handleOrgSwitch(selectedOrgId) {
} }
const selectedOrg = orgOptions.value.find((item) => item.orgId === selectedOrgId); const selectedOrg = orgOptions.value.find((item) => item.orgId === selectedOrgId);
const orgName = selectedOrg ? selectedOrg.orgName : '该科室'; const orgName = selectedOrg ? selectedOrg.orgName : '该科室';
ElMessageBox.confirm(`确定要切换到科室"${orgName}"吗?`, '切换科室', { ElMessageBox.confirm(`确定要切换到科室"${orgName}"吗?`, '切换科室', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {
orgId.value = selectedOrgId; orgId.value = selectedOrgId;
@@ -269,9 +281,9 @@ function lockScreen() {
} }
function logout() { function logout() {
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', { ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
@@ -297,7 +309,7 @@ function setLayout() {
emits('setLayout'); emits('setLayout');
} }
// 打开公告/通知面板 // 打开公告/通知面板
function openNoticePanel() { function openNoticePanel() {
if (noticePanelRef.value) { if (noticePanelRef.value) {
noticePanelRef.value.open(); noticePanelRef.value.open();