Compare commits
2 Commits
54225f6cad
...
14a81564bf
| Author | SHA1 | Date | |
|---|---|---|---|
| 14a81564bf | |||
| 5751c6941c |
@@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 登录方法
|
||||
// 登录方法
|
||||
export function login(username, password, code, uuid, tenantId) {
|
||||
const data = {
|
||||
username,
|
||||
@@ -20,7 +20,7 @@ export function login(username, password, code, uuid, tenantId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 注册方法
|
||||
// 注册方法
|
||||
export function register(data) {
|
||||
return request({
|
||||
url: '/register',
|
||||
@@ -32,7 +32,7 @@ export function register(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户详细信息
|
||||
// 获å–çâ€Â¨Ã¦Ë†Â·Ã¨Â¯Â¦Ã§Â»â€ ä¿¡æÂ¯
|
||||
export function getInfo() {
|
||||
return request({
|
||||
url: '/getInfo',
|
||||
@@ -40,7 +40,7 @@ export function getInfo() {
|
||||
})
|
||||
}
|
||||
|
||||
// 退出方法
|
||||
// 退出方法
|
||||
export function logout() {
|
||||
return request({
|
||||
url: '/logout',
|
||||
@@ -48,9 +48,9 @@ export function logout() {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
// 获å–验è¯Âç Â
|
||||
export function getUserBindTenantList(username) {
|
||||
// 确保username存在,避免构建出错误的URL
|
||||
// ç¡®ä¿Âusernameå˜在,é¿å…Â构建出éâ€â„¢Ã¨Â¯Â¯Ã§Å¡â€žURL
|
||||
const safeUsername = username || '';
|
||||
return request({
|
||||
url: '/system/tenant/user-bind/' + safeUsername,
|
||||
@@ -62,7 +62,7 @@ export function getUserBindTenantList(username) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取验证码
|
||||
// 获å–验è¯Âç Â
|
||||
export function getCodeImg() {
|
||||
return request({
|
||||
url: '/captchaImage',
|
||||
@@ -74,7 +74,7 @@ export function getCodeImg() {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前登录用户所属科室
|
||||
// 获å–当å‰Â登录çâ€Â¨Ã¦Ë†Â·Ã¦â€°â‚¬Ã¥Â±Å¾Ã§Â§â€˜Ã¥Â®Â¤
|
||||
export function getOrg() {
|
||||
return request({
|
||||
url: '/base-data-manage/practitioner/get-selectable-org-list',
|
||||
@@ -82,7 +82,7 @@ export function getOrg() {
|
||||
})
|
||||
}
|
||||
|
||||
// 切换科室
|
||||
// 切æÂ¢ç§‘室
|
||||
export function switchOrg(orgId) {
|
||||
return request({
|
||||
url: '/base-data-manage/practitioner/switch-org?orgId=' + orgId,
|
||||
@@ -90,18 +90,17 @@ export function switchOrg(orgId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 医保签到
|
||||
// 医ä¿Âç¾到
|
||||
export function sign(practitionerId, mac, ip) {
|
||||
return request({
|
||||
url: `/yb-request/sign?practitionerId=${practitionerId}&mac=${mac}&ip=${ip}`,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
// 锁屏解锁(验证密码)
|
||||
// 锁屏解锁(验证登录状态)
|
||||
export function unlockScreen(password) {
|
||||
return request({
|
||||
url: '/auth/unlock',
|
||||
method: 'post',
|
||||
data: { password }
|
||||
url: '/getInfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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