diff --git a/package.json b/package.json index 2bb4d76..776823d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "dependencies": { "@stomp/stompjs": "^7.0.0", "axios": "^1.3.3", - "crypto-js": "4.2.0", + "crypto-js": "^4.2.0", "echarts": "^5.4.1", "element-plus": "2.3.1", "js-cookie": "^3.0.5", diff --git a/src/api/daily-plan.ts b/src/api/daily-plan.ts new file mode 100644 index 0000000..ef5a23e --- /dev/null +++ b/src/api/daily-plan.ts @@ -0,0 +1,57 @@ +import request from "@/utils/request"; + +const addDailyPlanUrl = "/admin/dailyPlan/saveOrUpdate"; +const getDailyPlanListUrl = "/admin/dailyPlan/getListByDate"; +const deleteByIdUrl = "/admin/dailyPlan/deleteById"; +const getPlanDateListUrl = "/admin/dailyPlan/getPlanDateList"; +const getTodoCountByDateUrl = "/admin/dailyPlan/getTodoCountByDate"; + +export function saveOrUpdate(param: any) { + return new Promise((resolve, reject) => { + request.postForm(addDailyPlanUrl, param).then((res: any) => { + resolve(res.data); + }).catch(err => { + reject(err); + }) + }) +} + +export function getDailyPlanList(date: string) { + return new Promise((resolve, reject) => { + request.postForm(getDailyPlanListUrl, {date}).then((res: any) => { + resolve(res.data); + }).catch(err => { + reject(err); + }) + }) +} + +export function deleteById(id: string) { + return new Promise((resolve, reject) => { + request.postForm(deleteByIdUrl, {id}).then((res: any) => { + resolve(res.data); + }).catch(err => { + reject(err); + }) + }) +} + +export function getPlanDateList(startDate: string, endDate: string) { + return new Promise((resolve, reject) => { + request.postForm(getPlanDateListUrl, {startDate, endDate}).then((res: any) => { + resolve(res.data); + }).catch(err => { + reject(err); + }) + }) +} + +export function getTodoCountByDate(date: string) { + return new Promise((resolve, reject) => { + request.postForm(getTodoCountByDateUrl, {date}).then((res: any) => { + resolve(res.data); + }).catch(err => { + reject(err); + }) + }); +} \ No newline at end of file diff --git a/src/api/log-manage.ts b/src/api/log-manage.ts index e002adb..3341e37 100644 --- a/src/api/log-manage.ts +++ b/src/api/log-manage.ts @@ -1,21 +1,32 @@ import request, {CommonHeaderEnum} from "@/utils/request"; const getMonthlyLogCountUrl = '/admin/log/getMonthlyLogCount' +const getPageUrl = "/admin/log/page"; export function getMonthlyLogCount(startTime: string, endTime: string) { - return new Promise(resolve => { - request({ - url: getMonthlyLogCountUrl, - method: 'post', - data: { - startTime, - endTime - }, - headers: { - 'Content-Type': CommonHeaderEnum.FORM_CONTENT_TYPE, - }, - }).then(res => { - resolve(res.data); - }) - }) + return new Promise(resolve => { + request({ + url: getMonthlyLogCountUrl, + method: 'post', + data: { + startTime, + endTime + }, + headers: { + 'Content-Type': CommonHeaderEnum.FORM_CONTENT_TYPE, + }, + }).then(res => { + resolve(res.data); + }) + }) +} + +export function getPage(current: number, size: number) { + return new Promise((resolve, reject) => { + request.get(getPageUrl + `?current=${current}&size=${size}`).then((res: any) => { + resolve(res.data); + }).catch(err => { + reject(err); + }) + }) } \ No newline at end of file diff --git a/src/api/patient.ts b/src/api/patient.ts new file mode 100644 index 0000000..2913f63 --- /dev/null +++ b/src/api/patient.ts @@ -0,0 +1,17 @@ +import request from "@/utils/request"; + +const patientInfoUrl = "/admin/medicine/getPatientInfo"; + +export function getPatientInfo(name: string, id: string, date: string) { + return new Promise((resolve, reject) => { + request.postForm(patientInfoUrl, { + patientName: name, + idNum: id, + date: date + }).then((res: any) => { + resolve(res.data); + }).catch(error => { + reject(error); + }); + }); +} \ No newline at end of file diff --git a/src/components/system-logs.vue b/src/components/system-logs.vue index 38eacd3..3529954 100644 --- a/src/components/system-logs.vue +++ b/src/components/system-logs.vue @@ -1,23 +1,28 @@ diff --git a/src/router/index.ts b/src/router/index.ts index 7230c80..e777a56 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,82 +1,100 @@ -import { createRouter, createWebHistory } from 'vue-router' -import { useLoginStore } from '@/stores/user-info-store' -import { ElMessage, ElMessageBox } from 'element-plus' -import { constantRoute } from './routes' +import {createRouter, createWebHistory} from 'vue-router' +import {useLoginStore} from '@/stores/user-info-store' +import {ElMessage} from 'element-plus' +import {constantRoute} from './routes' +import {decrypt, decryption, encrypt, encryption, isBase64} from "@/utils/other"; const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes: constantRoute, + history: createWebHistory(import.meta.env.BASE_URL), + routes: constantRoute, + stringifyQuery: stringifyQuery, + parseQuery: parseQuery, }) +const kk = "raxipnenttlewe"; + router.beforeEach((to, from, next) => { - const loginInfo = useLoginStore().getlogin() - const isLogin = loginInfo.isLogin - // 普通用户 - const commonUser = [ - '/login', - '/home', - '/patients-manage', - '/patients-manage/patients-manage', - '/patients-manage/surgery-info' - ] - // 中级管理员 - const IntermediateAdmin = [ - '/login', - '/home', - '/patients-manage', - '/patients-manage/patients-manage', - '/patients-manage/surgery-info', - '/remote-manage', - '/remote-manage/remote-manage', - '/remote-manage/remote-control' - ] - // 高级管理员 - const SeniorAdmin = [ - '/login', - '/home', - '/patients-manage', - '/patients-manage/patients-manage', - '/patients-manage/surgery-info', - '/remote-manage', - '/remote-manage/remote-manage', - '/remote-manage/remote-control', - '/permissions-manage', - '/permissions-manage/doctor-manage', - '/permissions-manage/role-manage', - '/permissions-manage/menu-manage', - '/logs-manage', - '/logs-manage/message-manage', - '/logs-manage/logs-manage' - ] - const isViewRoute = () => { - let release = false - switch (loginInfo.permissions) { - case '超级管理员': - release = true - break; - case '高级管理员': - release = SeniorAdmin.some((p: string) => p === to.path) - break; - case '中级管理员': - release = IntermediateAdmin.some((p: string) => p === to.path) - break; - case '普通用户': - release = commonUser.some((p: string) => p === to.path) - break; - default: - break; - } - return release - } - if(to.fullPath ==='/login') { - next() - return - } - if (!isLogin) next('/login') // 重定向登录页 - else if(!isViewRoute()) { - ElMessage.error('无权访问!') - next(from.fullPath) - }else next() + const loginInfo = useLoginStore().getlogin() +// const isLogin = loginInfo.isLogin + // 普通用户 + const commonUser = [ + '/login', + '/home', + '/patients-manage', + '/patients-manage/patients-manage', + '/patients-manage/surgery-info' + ] + // 中级管理员 + const IntermediateAdmin = [ + '/login', + '/home', + '/patients-manage', + '/patients-manage/patients-manage', + '/patients-manage/surgery-info', + '/remote-manage', + '/remote-manage/remote-manage', + '/remote-manage/remote-control' + ] + // 高级管理员 + const SeniorAdmin = [ + '/login', + '/home', + '/patients-manage', + '/patients-manage/patients-manage', + '/patients-manage/surgery-info', + '/remote-manage', + '/remote-manage/remote-manage', + '/remote-manage/remote-control', + '/permissions-manage', + '/permissions-manage/doctor-manage', + '/permissions-manage/role-manage', + '/permissions-manage/menu-manage', + '/logs-manage', + '/logs-manage/message-manage', + '/logs-manage/logs-manage' + ] + const isViewRoute = () => { + let release = true + /*switch (loginInfo.permissions) { + case '超级管理员': + release = true + break; + case '高级管理员': + release = SeniorAdmin.some((p: string) => p === to.path) + break; + case '中级管理员': + release = IntermediateAdmin.some((p: string) => p === to.path) + break; + case '普通用户': + release = commonUser.some((p: string) => p === to.path) + break; + default: + break; + }*/ + return release + } + if (to.fullPath === '/login') { + next() + return + } + /*if (!isLogin) next('/login') // 重定向登录页 + else */ + if (!isViewRoute()) { + ElMessage.error('无权访问!') + next(from.fullPath) + } else next() }); +function stringifyQuery(query: any) { + return btoa(encrypt(JSON.stringify(query), kk)); +} + +function parseQuery(query: any) { + if (isBase64(query)) { + return JSON.parse(decrypt(atob(query), kk)); + } else { + return query; + } +} + export default router diff --git a/src/router/routes.ts b/src/router/routes.ts index 047133e..4624a73 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -1,6 +1,6 @@ export const constantRoute=[ - { path: '/:pathMatch(.*)*', name: 'not-found', redirect: '/home' }, + { path: '/:pathMatch(.*)*', name: 'not-found', redirect: '/login' }, { path: '/login', name: '登录', @@ -8,7 +8,7 @@ export const constantRoute=[ }, { path: '/', - redirect: '/home', + redirect: '/login', component: () => import('@/views/index.vue'), children: [ { diff --git a/src/stores/remote-ws-store.ts b/src/stores/remote-ws-store.ts new file mode 100644 index 0000000..0e586ab --- /dev/null +++ b/src/stores/remote-ws-store.ts @@ -0,0 +1,214 @@ +import {defineStore} from "pinia"; +import {Session} from "@/utils/storage"; + +const vitalUrl = "ws://localhost:5173/socket.io/admin/rax/vitalSignsMedicine?token=" + Session.getToken() +const medicineUrl = "ws://localhost:5173/socket.io/admin/rax/addMedicine?token=" + Session.getToken() +const chatUrl = "ws://localhost:5173/socket.io/admin/rax/chatRoom?token=" + Session.getToken() + +export const useRemoteWsStore = defineStore("remoteWs", { + state: () => { + return { + patient: {} as any, + remoteTasks: [] as any, + remoteTasksCap: 10, + currentTaskIndex: 0, + varMedicine: ["丙泊酚", "舒芬太尼", "瑞芬太尼", "顺阿曲库胺"], + fixedMedicine: ["尼卡地平", "艾司洛尔", "麻黄素", "阿托品"], + exceptionType: ["BIS_except", "DBP_except", "EtCO2_except", "HR_except", "SBP_except", "ST_except"], + exceptionMsg: { + "BIS_except": "脑电双频指数异常", "DBP_except": "舒张压异常", "EtCO2_except": "呼气末二氧化碳异常", + "HR_except": "心率异常", "SBP_except": "收缩压异常", "ST_except": "ST异常" + }, + } + }, + actions: { + initRemoteTask() { + if (this.remoteTasks.length <= 0) { + for (let i = 0; i < 10; i++) { + this.remoteTasks.push({ + isRemote: false, + isException: false, + taskName: "", + server: "", + serverun: "", + serverps: "", + patient: "", + patientId: "", + date: "", + log: [], + index: i + }) + } + } + return this.remoteTasks + }, + resetRemoteTask(i: number) { + this.remoteTasks[i] = Object.assign(this.remoteTasks[i], { + isRemote: false, + isException: false, + taskName: "", + server: "", + serverun: "", + serverps: "", + patient: "", + patientId: "", + date: "", + log: [], + index: i, + message: [] + }) + }, + getActiveRemoteTask() { + for (let i = 0; i < this.remoteTasks.length; i++) { + if (this.remoteTasks[i].isRemote) return i + } + }, + setRemoteLog(log: any, i: number) { + this.remoteTasks[i].log.push(log) + }, + createConnect(name: string, id: string, date: string) { + if (!this.patient[name + id + date]) { + const vitalWS = new WebSocket(vitalUrl) + const medicineWS = new WebSocket(medicineUrl) + const chatWS = new WebSocket(chatUrl) + vitalWS.onopen = function () { + vitalWS.send(JSON.stringify({ + patientName: name, + idNum: id, + date: date + })) + } + medicineWS.onopen = function () { + medicineWS.send(JSON.stringify({ + patientName: name, + idNum: id, + date: date + })) + } + chatWS.onopen = function () { + chatWS.send(JSON.stringify({ + patientName: name, + idNum: id, + date: date + })) + } + this.patient[name + id + date] = { + vitalWS, + medicineWS, + chatWS + } + } + }, + disconnect(name: string, id: string, date: string) { + const patient: any = this.patient[name + id + date] + if (patient) { + patient.vitalWS.close() + patient.medicineWS.close() + patient.chatWS.close() + delete this.patient[name + id + date] + } + }, + subscribeVital(name: string, id: string, date: string, cb: any) { + const patient: any = this.patient[name + id + date] + if (patient) { + patient.vitalWS.onmessage = cb + patient.vitalCB = cb + } else { + cb({ + status: 1, + msg: "已断开连接" + }) + } + }, + unsubscribeVital(name: string, id: string, date: string) { + const patient: any = this.patient[name + id + date] + if (patient && patient.vitalWS) { + patient.vitalWS.onmessage = undefined; + patient.vitalCB = undefined; + } + }, + sendMsg(name: string, id: string, date: string, msg: string, cb: any) { + const patient: any = this.patient[name + id + date] + if (patient) { + const params = { + patientName: name, + idNum: id, + date: date, + msg + } + patient.chatWS.send(JSON.stringify(params)) + cb({ + status: 0 + }) + } else { + cb({ + status: 1, + msg: "已断开连接" + }) + } + }, + subscribeChat(name: string, id: string, date: string, cb: any) { + const patient: any = this.patient[name + id + date] + if (patient) { + patient.chatCB = cb + patient.chatWS.onmessage = cb + } else { + cb({ + status: 1, + msg: "已断开连接" + }) + } + }, + unsubscribeChat(name: string, id: string, date: string) { + const patient: any = this.patient[name + id + date] + patient.chatCB = undefined; + patient.chatWS.onmessage = undefined; + }, + sendMedicine(args: { + name: string, + id: string, + date: string, + flag: string, + medicine: string, + value: string + }, cb: any) { + const patient: any = this.patient[args.name + args.id + args.date] + if (patient) { + const params = { + patientName: args.name, + idNum: args.id, + date: args.date, + flag: args.flag, + medicine: args.medicine, + value: args.value + } + patient.medicineWS.send(JSON.stringify(params)) + cb({ + status: 0 + }) + } else { + cb({ + status: 1, + msg: "已断开连接" + }) + } + }, + subscribeMedicine(name: string, id: string, date: string, cb: any) { + const patient = this.patient[name + id + date] + if (patient) { + patient.medicineCB = cb + patient.medicineWS.onmessage = cb + } else { + cb({ + status: 1, + msg: "已断开连接" + }) + } + }, + unsubscribeMedicine(name: string, id: string, date: string) { + const patient: any = this.patient[name + id + date] + patient.medicineCB = undefined; + patient.medicineWS.onmessage = undefined; + } + } +}) \ No newline at end of file diff --git a/src/stores/user-info-store.ts b/src/stores/user-info-store.ts index e0d25c8..0f99bff 100644 --- a/src/stores/user-info-store.ts +++ b/src/stores/user-info-store.ts @@ -4,7 +4,6 @@ export const useLoginStore = defineStore('login', { state: () => { return { login: { - isLogin: false, account: '', name: '', /** @@ -13,7 +12,6 @@ export const useLoginStore = defineStore('login', { * 医院中级管理员: 首页、患者管理、远程管理 * 医院普通用户: 首页、患者管理 */ - permissions: '', hospital: '' } as any } diff --git a/src/utils/date-util.ts b/src/utils/date-util.ts index bcf51e1..666f5ec 100644 --- a/src/utils/date-util.ts +++ b/src/utils/date-util.ts @@ -22,55 +22,68 @@ export function dateFormater(formater: string, time?: any) { /** * 获取指定月份天数 - * @param {*} time - * @returns + * @param {*} time + * @returns */ export function getMonthDays(time: any) { - if (!time) time = new Date(); - const now = new Date(time); - const year = now.getFullYear(); - const month = now.getMonth() + 1; + if (!time) time = new Date(); + const now = new Date(time); + const year = now.getFullYear(); + const month = now.getMonth() + 1; - const isLeapYear = (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + const isLeapYear = (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; - const daysInMonth = month === 2 - ? isLeapYear ? 29 : 28 - : month === 4 || month === 6 || month === 9 || month === 11 - ? 30 - : 31; + const daysInMonth = month === 2 + ? isLeapYear ? 29 : 28 + : month === 4 || month === 6 || month === 9 || month === 11 + ? 30 + : 31; - return daysInMonth; + return daysInMonth; } /** * 获取当前日期的周几 i:1,2,3,4,5,6,7 * @returns */ -export function getFirstDayOfWeek(date: Date, i: number) { - if (i < 1 || i > 7) { - return null; - } - const day = date.getDay() || 7; - return new Date(date.getFullYear(), date.getMonth(), date.getDate() + i - day); +export function getFirstDayOfWeek(date: string | Date | number, i: number) { + let temp: any; + if (!(date instanceof Date)) { + if (typeof date == "number") { + temp = new Date(date); + } else { + const s = date.replace(/-/g, "/"); + temp = new Date(s); + } + } else { + temp = new Date(date.getTime()) + } + if (i < 1 || i > 7) { + return null; + } + const day = temp.getDay() || 7; + return new Date(temp.getFullYear(), temp.getMonth(), temp.getDate() + i - day); } + /** * 获取当前日期是周几 * @returns */ const weekArray = ['周天', '周一', '周二', '周三', '周四', '周五', '周六']; -export function getCurrentDate(date: any) { - let myDate = new Date(); - if (date) { - if (date instanceof Date) { - myDate = date; - } else { - date = date.replace(/-/g, '/'); - myDate = new Date(date); - } - } - const days = myDate.getDay(); - return weekArray[days]; +export function getCurrentDate(date: any) { + let myDate = new Date(); + if (date) { + if (date instanceof Date) { + myDate = date; + } else { + date = date.replace(/-/g, '/'); + myDate = new Date(date); + } + } + + const days = myDate.getDay(); + return weekArray[days]; } /** @@ -78,17 +91,20 @@ export function getCurrentDate(date: any) { * @returns */ export function getDays(date: any, days: number) { - if (date) { - if (!(date instanceof Date)) { - date = date.replace(/-/g, '/'); - date = new Date(date); - } + if (date) { + let temp: any; + if (!(date instanceof Date)) { + date = date.replace(/-/g, '/'); + temp = new Date(date); + } else { + temp = new Date(date.getTime()); + } - const time = date.setDate(date.getDate() + days); // 天数 - return new Date(time); - } + const time = temp.setDate(temp.getDate() + days); + return new Date(time); + } } export function getEndOfMonth(year: number, month: number) { - return new Date(year, month, 0).getDate() + return new Date(year, month, 0).getDate() } \ No newline at end of file diff --git a/src/utils/other.ts b/src/utils/other.ts index 2022a28..0f48724 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -5,29 +5,47 @@ import * as CryptoJS from 'crypto-js'; *加密处理 */ export function encryption(src: string, keyWord: string) { - const key = CryptoJS.enc.Utf8.parse(keyWord); - // 加密 - let encrypted = CryptoJS.AES.encrypt(src, key, { - iv: key, - mode: CryptoJS.mode.CBC, - padding: CryptoJS.pad.Pkcs7, - }); - return encrypted.toString(); + const key = CryptoJS.enc.Utf8.parse(keyWord); + // 加密 + const encrypted = CryptoJS.AES.encrypt(src, key, { + iv: key, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7, + }); + return encrypted.toString(); } /** * 解密 - * @param {*} params 参数列表 * @returns 明文 + * @param src + * @param keyWord */ export function decryption(src: string, keyWord: string) { - const key = CryptoJS.enc.Utf8.parse(keyWord); - // 解密逻辑 - let decryptd = CryptoJS.AES.decrypt(src, key, { - iv: key, - mode: CryptoJS.mode.CBC, - padding: CryptoJS.pad.Pkcs7, - }); + const key = keyWord; + // 解密逻辑 + const decryptd = CryptoJS.AES.decrypt(src, key, { + iv: key, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7, + }); - return decryptd.toString(CryptoJS.enc.Utf8); + return decryptd.toString(CryptoJS.enc.Utf8); +} + +export function encrypt(src: string, key: string) { + return CryptoJS.AES.encrypt(src, key).toString() +} + +export function decrypt(src: string, key: string) { + return CryptoJS.AES.decrypt(src, key).toString(CryptoJS.enc.Utf8) +} + +export function isBase64(s: string) { + if (s == "" || s.trim() == "") return false; + try { + return window.btoa(window.atob(s)) == s; + } catch (e) { + return false; + } } \ No newline at end of file diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 400e49b..befb5a5 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,72 +1,75 @@ diff --git a/src/views/home/record-form.vue b/src/views/home/record-form.vue index 60a963a..d726e44 100644 --- a/src/views/home/record-form.vue +++ b/src/views/home/record-form.vue @@ -1,146 +1,173 @@ diff --git a/src/views/home/week-calendar.vue b/src/views/home/week-calendar.vue index 50bb104..1a5e8c1 100644 --- a/src/views/home/week-calendar.vue +++ b/src/views/home/week-calendar.vue @@ -1,304 +1,334 @@ diff --git a/src/views/index.vue b/src/views/index.vue index 4233d57..464c5f1 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -82,32 +82,37 @@ getHospitalsData().then((res: any) => { const menus = [] as any switch (userInfo.permissions) { - case '超级管理员': - menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) - menus.push({label: '权限管理', path: '/permissions-manage', icon: 'icon-users'}) - menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) - menus.push({label: '远程管理', path: '/remote-manage', icon: 'icon-anquanbaozhang'}) - menus.push({label: '后台管理', path: '/system-manage', icon: 'icon-houtaiguanli'}) - menus.push({label: '系统管理', path: '/logs-manage', icon: 'icon-setting'}) - break; - case '高级管理员': - menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) - menus.push({label: '权限管理', path: '/permissions-manage', icon: 'icon-users'}) - menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) - menus.push({label: '远程管理', path: '/remote-manage', icon: 'icon-anquanbaozhang'}) - menus.push({label: '系统管理', path: '/logs-manage', icon: 'icon-setting'}) - break; - case '中级管理员': - menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) - menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) - menus.push({label: '远程管理', path: '/remote-manage', icon: 'icon-anquanbaozhang'}) - break; - case '普通用户': - menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) - menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) - break; - default: - break; + case '超级管理员': + menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) + menus.push({label: '权限管理', path: '/permissions-manage', icon: 'icon-users'}) + menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) + menus.push({label: '远程管理', path: '/remote-manage', icon: 'icon-anquanbaozhang'}) + menus.push({label: '后台管理', path: '/system-manage', icon: 'icon-houtaiguanli'}) + menus.push({label: '系统管理', path: '/logs-manage', icon: 'icon-setting'}) + break; + case '高级管理员': + menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) + menus.push({label: '权限管理', path: '/permissions-manage', icon: 'icon-users'}) + menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) + menus.push({label: '远程管理', path: '/remote-manage', icon: 'icon-anquanbaozhang'}) + menus.push({label: '系统管理', path: '/logs-manage', icon: 'icon-setting'}) + break; + case '中级管理员': + menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) + menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) + menus.push({label: '远程管理', path: '/remote-manage', icon: 'icon-anquanbaozhang'}) + break; + case '普通用户': + menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) + menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) + break; + default: + menus.push({label: '首页', path: '/home', icon: 'icon-shouye'}) + menus.push({label: '权限管理', path: '/permissions-manage', icon: 'icon-users'}) + menus.push({label: '患者管理', path: '/patients-manage', icon: 'icon-renyuanguanli'}) + menus.push({label: '远程管理', path: '/remote-manage', icon: 'icon-anquanbaozhang'}) + menus.push({label: '后台管理', path: '/system-manage', icon: 'icon-houtaiguanli'}) + menus.push({label: '系统管理', path: '/logs-manage', icon: 'icon-setting'}) } const isShowUserInfoDrawer = ref(false) diff --git a/src/views/login/login.vue b/src/views/login/login.vue index 6bf4733..333288a 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -8,120 +8,120 @@ - -
-
- 密码登录 - 验证码登录 -
- - - + +
+
+
+ 新用户申请 + + + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - 看不清? - + + + + + + + + + + + + + + + + + + + + + + + + + + + + 看不清? + - - -
+ + + - - - + + + diff --git a/src/views/remote-manage/chart/chart-ecg.vue b/src/views/remote-manage/chart/chart-ecg.vue index 8e223d1..9484df1 100644 --- a/src/views/remote-manage/chart/chart-ecg.vue +++ b/src/views/remote-manage/chart/chart-ecg.vue @@ -1,197 +1,181 @@ diff --git a/src/views/remote-manage/chart/chart-line.vue b/src/views/remote-manage/chart/chart-line.vue index 5b829bf..a875cda 100644 --- a/src/views/remote-manage/chart/chart-line.vue +++ b/src/views/remote-manage/chart/chart-line.vue @@ -5,102 +5,73 @@ diff --git a/src/views/remote-manage/remote-control.vue b/src/views/remote-manage/remote-control.vue index dbe7637..a64a745 100644 --- a/src/views/remote-manage/remote-control.vue +++ b/src/views/remote-manage/remote-control.vue @@ -1,206 +1,200 @@