commit: 二期

This commit is contained in:
republicline 2024-11-14 16:29:50 +08:00
parent 22820d1035
commit 3480ee2af7
2 changed files with 940 additions and 921 deletions

View File

@ -193,7 +193,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
patientName: name,
idNum: id,
date: date,
msgType: "msg"
msgType: "init"
}))
}
}
@ -251,10 +251,11 @@ export const useRemoteWsStore = defineStore("remoteWs", {
const patient: any = this.patient[name + id + date + index]
if (patient) {
const params = {
msgType: "msg",
patientName: name,
idNum: id,
date: date,
msg
content:msg
}
patient.chatWS.send(JSON.stringify(params))
cb({

View File

@ -38,12 +38,14 @@
<div class="top-btn-box">
<div class="top-left-btn-box" v-loading="connectionUnityLoading">
<el-space direction="vertical">
<el-text style="margin-right:20px;font-size: 18px;font-weight:700;color:#006080 ">病人尿量(ml):500
<el-text style="margin-right:20px;font-size: 18px;font-weight:700;color:#006080 ">
病人尿量(ml):500
</el-text>
</el-space>
<el-button color="#C77000" @click="viewPatientInfo">患者信息</el-button>
<el-button type="text" color="#C77000">当前延迟{{ timeDiffPing }}ms</el-button>
<el-button color="#C77000" @click="connectionUnity('1')" v-if="!whetherControl">连接远程控制</el-button>
<el-button color="#C77000" @click="connectionUnity('1')" v-if="!whetherControl">连接远程控制
</el-button>
<template v-else>
<el-button color="#C77000">已控制</el-button>
<el-button color="#C77000" @click="connectionUnity('0')">断开远程控制</el-button>
@ -64,24 +66,24 @@
</ul>
</div>
<div class="right-box">
<div class="video-box" @click="playPause">
<div class="icon-box">
<el-icon v-if="isVideoPlay">
<VideoPause/>
</el-icon>
<el-icon v-else>
<VideoPlay/>
</el-icon>
</div>
<!-- poster="@/assets/imgs/video_bck.png" -->
<video ref="liveVideo">
<source src="@/assets/medical.mp4" type="video/mp4"/>
</video>
</div>
<!--<div class="video-box" @click="playPause">-->
<!-- <div class="icon-box">-->
<!-- <el-icon v-if="isVideoPlay">-->
<!-- <VideoPause/>-->
<!-- </el-icon>-->
<!-- <el-icon v-else>-->
<!-- <VideoPlay/>-->
<!-- </el-icon>-->
<!-- </div>-->
<!-- &lt;!&ndash; poster="@/assets/imgs/video_bck.png" &ndash;&gt;-->
<!-- <video ref="liveVideo">-->
<!-- <source src="@/assets/medical.mp4" type="video/mp4"/>-->
<!-- </video>-->
<!--</div>-->
<div class="message-box">
<ul ref="msgLog" class="message-log">
<li v-for="(item, index) in mssageList" :key="'msg-log-' + index"
:class="{ 'align-right': item.createName == userName }">
:class="{ 'align-right': item.createUser == userInfo.userInfo.username }">
<span>{{ item.content }}</span>
</li>
</ul>
@ -113,7 +115,8 @@
<el-table-column label="特殊情况人为干预" align="center">
<template #default="scope">
<div class="table-btn-box">
<el-button size="small" color="#006080" @click="tableItemPlus(scope)" :disabled="!whetherControl" >
<el-button size="small" color="#006080" @click="tableItemPlus(scope)"
:disabled="!whetherControl">
<el-icon>
<Plus/>
</el-icon>
@ -125,9 +128,11 @@
</el-icon>
</el-button>
<el-button size="small" color="#006080"
@click="tableItemConfirm(scope, varTableData)" :disabled="!whetherControl">确定
@click="tableItemConfirm(scope, varTableData)"
:disabled="!whetherControl">确定
</el-button>
<el-button size="small" color="#006080" @click="tableItemCancel(scope)" :disabled="!whetherControl">取消
<el-button size="small" color="#006080" @click="tableItemCancel(scope)"
:disabled="!whetherControl">取消
</el-button>
</div>
</template>
@ -152,7 +157,8 @@
<el-table-column label="特殊情况人为干预" align="center">
<template #default="scope">
<div class="table-btn-box">
<el-button size="small" color="#006080" @click="tableItemPlus(scope)" :disabled="!whetherControl">
<el-button size="small" color="#006080" @click="tableItemPlus(scope)"
:disabled="!whetherControl">
<el-icon>
<Plus/>
</el-icon>
@ -164,9 +170,11 @@
</el-icon>
</el-button>
<el-button size="small" color="#006080"
@click="tableItemConfirm(scope, fixedTableData)" :disabled="!whetherControl">确定
@click="tableItemConfirm(scope, fixedTableData)"
:disabled="!whetherControl">确定
</el-button>
<el-button size="small" color="#006080" @click="tableItemCancel(scope)" :disabled="!whetherControl">取消
<el-button size="small" color="#006080" @click="tableItemCancel(scope)"
:disabled="!whetherControl">取消
</el-button>
</div>
</template>
@ -307,12 +315,16 @@ watch(subscribeMedicineData,(newValue:any,oldValue:any)=>{
})
.then(() => {
whetherControl.value = unityConnectionFlag === '1';
remoteWsStore.reqMedicineConnect({...params,flag:unityConnectionFlag},(res:any)=>{console.log('res >>>>>',res);});
remoteWsStore.reqMedicineConnect({...params, flag: unityConnectionFlag}, (res: any) => {
console.log('res >>>>>', res);
});
})
.catch(() => {
//
whetherControl.value = false;
remoteWsStore.reqMedicineConnect({...params,flag:'0'},(res:any)=>{console.log('res >>>>>',res);});
remoteWsStore.reqMedicineConnect({...params, flag: '0'}, (res: any) => {
console.log('res >>>>>', res);
});
});
break;
case 'unityResponseConnection':
@ -337,14 +349,17 @@ watch(subscribeMedicineData,(newValue:any,oldValue:any)=>{
}
}
})
function createConnect() {
remoteWsStore.createChatConnect(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, currentRemote.value.index)
remoteWsStore.createMedicineConnect(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, currentRemote.value.index)
}
function loopSendMedicinePing() {
remoteWsStore.loopSendMedicinePing(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, currentRemote.value.index,(res:any)=>{})
remoteWsStore.loopSendMedicinePing(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, currentRemote.value.index, (res: any) => {
})
}
//
function connectionUnity(flag: string) {
if (flag === "1") {
@ -395,7 +410,7 @@ const subscribeVital = () => {
onVitalClose()
remoteWsStore.subscribeVital(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, currentRemote.value.index,
(res: any) => {
console.log(res);
// console.log(res);
if (res.status != 2) {
const data = JSON.parse(res.data);
@ -626,7 +641,8 @@ const tableItemPlus = (e: any) => {
message: `当前药物速率已超过设定的最大值${obj.total},不能增加只能减少`
})
return
};
}
;
const currRate = Number(e.row.change);
if (isNaN(currRate)) {
return
@ -994,7 +1010,7 @@ background-size: 100% 100%; */
.message-box {
width: 100%;
// height: 270px;
height: 149px;
height: 300px;
// margin-bottom: 5px;
.message-log {
@ -1105,4 +1121,6 @@ background-size: 100% 100%; */
}
}
}
}</style>
}
</style>