mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54:58 +08:00
hospitalID
This commit is contained in:
parent
92130cdd74
commit
1eff24c36d
|
@ -1,6 +1,7 @@
|
|||
import * as other from "@/utils/other";
|
||||
import {ElMessage} from "element-plus";
|
||||
import request, {CommonHeaderEnum, postData} from "@/utils/request";
|
||||
import { Local, Session } from "@/utils/storage";
|
||||
|
||||
const registerUrl = "/admin/register/user"
|
||||
|
||||
|
@ -8,6 +9,9 @@ const logoutUrl = "/admin/token/logout"
|
|||
|
||||
export const login = (data: any) => {
|
||||
return new Promise(resolve => {
|
||||
Local.clear()
|
||||
Session.clear()
|
||||
|
||||
const basicAuth = 'Basic ' + window.btoa(import.meta.env.VITE_OAUTH2_PASSWORD_CLIENT);
|
||||
|
||||
let encPassword = data.password;
|
||||
|
|
|
@ -66,7 +66,7 @@ export function userPage(data: any) {
|
|||
}).then((res: any) => {
|
||||
resolve(res.data)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
resolve(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ export function userList(data: any): Promise<any> {
|
|||
.then((res: any) => {
|
||||
resolve(res.data)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
resolve(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { Local, Session } from "@/utils/storage";
|
||||
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()
|
||||
|
@ -24,26 +24,26 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
actions: {
|
||||
setCurrentTaskIndex(i: number) {
|
||||
this.currentTaskIndex = i
|
||||
Local.set("currentTaskIndex", i)
|
||||
Session.set("currentTaskIndex", i)
|
||||
},
|
||||
getCurrentTaskIndex() {
|
||||
if (Local.get("currentTaskIndex")) {
|
||||
this.currentTaskIndex = Local.get("currentTaskIndex")
|
||||
if (Session.get("currentTaskIndex")) {
|
||||
this.currentTaskIndex = Session.get("currentTaskIndex")
|
||||
}
|
||||
return this.currentTaskIndex
|
||||
},
|
||||
setRemoteTask() {
|
||||
Local.set("remoteTasks", this.remoteTasks)
|
||||
Session.set("remoteTasks", this.remoteTasks)
|
||||
},
|
||||
getRemoteTask() {
|
||||
if (Local.get("remoteTasks")) {
|
||||
this.remoteTasks = Local.get("remoteTasks")
|
||||
if (Session.get("remoteTasks")) {
|
||||
this.remoteTasks = Session.get("remoteTasks")
|
||||
}
|
||||
return this.remoteTasks
|
||||
},
|
||||
initRemoteTask() {
|
||||
if (Local.get("remoteTasks")) {
|
||||
this.remoteTasks = Local.get("remoteTasks")
|
||||
if (Session.get("remoteTasks")) {
|
||||
this.remoteTasks = Session.get("remoteTasks")
|
||||
}
|
||||
if (this.remoteTasks.length <= 0) {
|
||||
for (let i = 0; i < 10; i++) {
|
||||
|
@ -79,7 +79,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
index: i,
|
||||
message: []
|
||||
})
|
||||
Local.set("remoteTasks", this.remoteTasks)
|
||||
Session.set("remoteTasks", this.remoteTasks)
|
||||
},
|
||||
getActiveRemoteTask() {
|
||||
for (let i = 0; i < this.remoteTasks.length; i++) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {defineStore} from 'pinia'
|
||||
import {getUserMenu} from "@/api/menu";
|
||||
import {Session} from "@/utils/storage";
|
||||
import {Local, Session} from "@/utils/storage";
|
||||
import router from "@/router";
|
||||
|
||||
export const useUserStore = defineStore('login', {
|
||||
|
@ -37,6 +37,7 @@ export const useUserStore = defineStore('login', {
|
|||
},
|
||||
logout() {
|
||||
Session.clear();
|
||||
Local.clear();
|
||||
router.removeRoute("root");
|
||||
router.addRoute({
|
||||
name: "root",
|
||||
|
|
|
@ -113,7 +113,7 @@ async function getHospitalList() {
|
|||
hospitals.value = [];
|
||||
if (res.code == 0 && res.data.length > 0) {
|
||||
hospitals.value = res.data;
|
||||
if (data.data) {
|
||||
if (data.data && data.data != 'null') {
|
||||
hospital.value = data.data;
|
||||
}
|
||||
preHospital.value = hospital.value
|
||||
|
|
Loading…
Reference in New Issue
Block a user