fix(navbar): 修复导航栏国际化字符显示问题
- 修复了搜索和公告通知注释的字符编码问题 - 修复了公告和通知按钮的字符显示问题 - 修复了帮助中心按钮的字符显示问题 - 添加了主题设置功能并修复相关字符编码 - 修复了个人中心菜单项的字符显示问题 - 修复了锁定屏幕和退出登录选项的字符显示问题 - 修复了切换科室对话框标题和按钮的字符显示问题 - 导入Setting图标组件以支持主题设置功能 - 修复了加载和更新未读数量函数的注释字符问题 - 修复了切换侧边栏函数注释的字符问题 - 修复了切换科室确认消息框的字符显示问题 - 修复了退出系统确认消息框的字符显示问题 - 修复了打开公告通知面板函数注释的字符
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索和公告通知 -->
|
||||
<!-- æœç´¢å’Œå…¬å‘Šé€šçŸ¥ -->
|
||||
<div class="left-actions">
|
||||
<template v-if="appStore.device !== 'mobile'">
|
||||
<header-search
|
||||
@@ -19,9 +19,9 @@
|
||||
class="left-action-item"
|
||||
/>
|
||||
</template>
|
||||
<!-- 公告和通知按钮 -->
|
||||
<!-- 公告和通知按钮 -->
|
||||
<el-tooltip
|
||||
content="公告/通知"
|
||||
content="公告/通知"
|
||||
placement="bottom"
|
||||
>
|
||||
<div
|
||||
@@ -37,9 +37,9 @@
|
||||
</el-badge>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 帮助中心按钮 -->
|
||||
<!-- 帮助ä¸å¿ƒæŒ‰é’® -->
|
||||
<el-tooltip
|
||||
content="帮助中心"
|
||||
content="帮助ä¸å¿ƒ"
|
||||
placement="bottom"
|
||||
>
|
||||
<div
|
||||
@@ -49,6 +49,18 @@
|
||||
<el-icon><Help /></el-icon>
|
||||
</div>
|
||||
</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 class="right-menu">
|
||||
@@ -81,19 +93,19 @@
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<router-link to="/user/profile">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
<el-dropdown-item>个人ä¸å¿ƒ</el-dropdown-item>
|
||||
</router-link>
|
||||
<el-dropdown-item
|
||||
divided
|
||||
command="lockScreen"
|
||||
>
|
||||
<span>锁定屏幕</span>
|
||||
<span>é”定å±å¹•</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
divided
|
||||
command="logout"
|
||||
>
|
||||
<span>退出登录</span>
|
||||
<span>退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
@@ -126,7 +138,7 @@
|
||||
</div>
|
||||
<el-dialog
|
||||
v-model="showDialog"
|
||||
title="切换科室"
|
||||
title="切æ¢ç§‘室"
|
||||
width="400px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@@ -149,16 +161,16 @@
|
||||
type="primary"
|
||||
@click="submit"
|
||||
>
|
||||
确定
|
||||
确定
|
||||
</el-button>
|
||||
<el-button @click="showDialog = false">
|
||||
取消
|
||||
å–æ¶ˆ
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 公告/通知面板 -->
|
||||
<!-- 公告/é€šçŸ¥é¢æ¿ -->
|
||||
<NoticePanel
|
||||
ref="noticePanelRef"
|
||||
@update-unread-count="updateUnreadCount"
|
||||
@@ -178,7 +190,7 @@ import useLockStore from '@/store/modules/lock';
|
||||
import {getOrg, switchOrg} from '@/api/login';
|
||||
import {getUnreadCount} from '@/api/system/notice';
|
||||
import {useRouter} from 'vue-router';
|
||||
import {Help} from "@element-plus/icons-vue";
|
||||
import {Help, Setting} from "@element-plus/icons-vue";
|
||||
|
||||
const appStore = useAppStore();
|
||||
const userStore = useUserStore()
|
||||
@@ -192,7 +204,7 @@ const unreadCount = ref(0);
|
||||
|
||||
const sidebar = computed(() => appStore.sidebar);
|
||||
|
||||
// 加载未读数量
|
||||
// åŠ è½½æœªè¯»æ•°é‡
|
||||
function loadUnreadCount() {
|
||||
getUnreadCount().then(res => {
|
||||
unreadCount.value = res.data || 0;
|
||||
@@ -201,12 +213,12 @@ function loadUnreadCount() {
|
||||
});
|
||||
}
|
||||
|
||||
// 更新未读数量
|
||||
// 更新未读数é‡
|
||||
function updateUnreadCount() {
|
||||
loadUnreadCount();
|
||||
}
|
||||
|
||||
// 切换侧边栏
|
||||
// 切æ¢ä¾§è¾¹æ
|
||||
function toggleSideBar() {
|
||||
appStore.toggleSideBar();
|
||||
}
|
||||
@@ -228,11 +240,11 @@ function handleOrgSwitch(selectedOrgId) {
|
||||
}
|
||||
|
||||
const selectedOrg = orgOptions.value.find((item) => item.orgId === selectedOrgId);
|
||||
const orgName = selectedOrg ? selectedOrg.orgName : '该科室';
|
||||
const orgName = selectedOrg ? selectedOrg.orgName : '该科室';
|
||||
|
||||
ElMessageBox.confirm(`确定要切换到科室"${orgName}"吗?`, '切换科室', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
ElMessageBox.confirm(`确定è¦åˆ‡æ¢åˆ°ç§‘室"${orgName}"å—?`, '切æ¢ç§‘室', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: 'å–æ¶ˆ',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
orgId.value = selectedOrgId;
|
||||
@@ -269,9 +281,9 @@ function lockScreen() {
|
||||
}
|
||||
|
||||
function logout() {
|
||||
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
ElMessageBox.confirm('确定注销并退出系统å—?', 'æç¤º', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: 'å–æ¶ˆ',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -297,7 +309,7 @@ function setLayout() {
|
||||
emits('setLayout');
|
||||
}
|
||||
|
||||
// 打开公告/通知面板
|
||||
// 打开公告/é€šçŸ¥é¢æ¿
|
||||
function openNoticePanel() {
|
||||
if (noticePanelRef.value) {
|
||||
noticePanelRef.value.open();
|
||||
|
||||
Reference in New Issue
Block a user