mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 04:54:58 +08:00
2024年10月17日17点31分: 修改折线图. 实时1S展示更新一次
This commit is contained in:
parent
33fcd07dde
commit
d90d5e4eef
|
@ -2,10 +2,23 @@ import {defineStore} from "pinia";
|
|||
import {Session} from "@/utils/storage";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
// 本地调试版本:
|
||||
const vitalUrl = "ws://" + window.location.host + "/socket.io/admin/rax/vitalSignsMedicine?token=" + Session.getToken()
|
||||
const medicineUrl = "ws://" + window.location.host + "/socket.io/admin/rax/addMedicine?token=" + Session.getToken()
|
||||
const chatUrl = "ws://" + window.location.host + "/socket.io/admin/rax/chatRoom?token=" + Session.getToken()
|
||||
|
||||
// 服务器部署版本
|
||||
// const vitalUrl = "wss://" + window.location.host + "/socket.io/admin/rax/vitalSignsMedicine?token=" + Session.getToken()
|
||||
// const medicineUrl = "wss://" + window.location.host + "/socket.io/admin/rax/addMedicine?token=" + Session.getToken()
|
||||
// const chatUrl = "wss://" + window.location.host + "/socket.io/admin/rax/chatRoom?token=" + Session.getToken()
|
||||
|
||||
// 测试echars
|
||||
// const vitalUrl = "wss://" + "110.41.142.124" + "/socket.io/admin/rax/vitalSignsMedicine?token=" + Session.getToken()
|
||||
// const medicineUrl = "wss://" + "110.41.142.124" + "/socket.io/admin/rax/addMedicine?token=" + Session.getToken()
|
||||
// const chatUrl = "wss://" + "110.41.142.124" + "/socket.io/admin/rax/chatRoom?token=" + Session.getToken()
|
||||
|
||||
|
||||
|
||||
export const useRemoteWsStore = defineStore("remoteWs", {
|
||||
state: () => {
|
||||
return {
|
||||
|
@ -261,7 +274,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
|
|||
patientName: name,
|
||||
idNum: id,
|
||||
date: date,
|
||||
msgType: "msg"
|
||||
msgType: "init"
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
@ -34,13 +34,15 @@ onMounted(() => {
|
|||
|
||||
function updateChartData(data: any) {
|
||||
if (data) {
|
||||
if (currentNode && currentNode.Time == data[0].Time) {
|
||||
// if (currentNode && currentNode.Time == data[0].Time) {
|
||||
if (currentNode && currentNode.Time == data.Time) {
|
||||
return;
|
||||
} else {
|
||||
currentNode = data[0];
|
||||
currentNode = data;
|
||||
}
|
||||
for (let i = (data.length - 1); i >= 0; i--) {
|
||||
const item = data[i]
|
||||
// for (let i = (data.length - 1); i >= 0; i--) {
|
||||
// const item = data[i];
|
||||
const item = data;
|
||||
if (xData.indexOf(dateFormater("HH:mm:ss", item.Time)) == -1) {
|
||||
xData.shift();
|
||||
xData.push(dateFormater("HH:mm:ss", item.Time));
|
||||
|
@ -58,7 +60,7 @@ function updateChartData(data: any) {
|
|||
series,
|
||||
})
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user