fix: 问题优化

This commit is contained in:
GranceWang 2024-08-05 14:09:35 +08:00
parent 1e6116d01f
commit 9c58812420
2 changed files with 3 additions and 5 deletions

View File

@ -288,6 +288,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
date: date,
msgType: "init"
}))
this.loopSendMedicinePing(name,id,date,index,()=>{})
}
}
},

View File

@ -47,10 +47,10 @@
</el-text>
</el-space>
<el-button color="#C77000" @click="viewPatientInfo">患者信息</el-button>
<el-button type="text" color="#C77000">ping{{timeDiffPing||'-'}}</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 type="text" color="#C77000">ping{{timeDiffPing||'-'}}</el-button>
<el-button color="#C77000" @click="connectionUnity('0')">断开远程控制</el-button>
</template>
</div>
@ -276,7 +276,7 @@ let currentDocMedicine: any;
const medicineSpeedTemp: any = {};
const connectionUnityLoading=ref(false);
onMounted(() => {
if (!currentRemote.value.isRemote) {
if (!currentRemote.value?.isRemote) {
router.replace('/remote-manage/remote-manage');
return;
}
@ -360,9 +360,6 @@ function createConnect() {
}
function loopSendMedicinePing(){
if (!whetherControl.value) {
return
}
remoteWsStore.loopSendMedicinePing(currentRemote.value.patient, currentRemote.value.patientId, currentRemote.value.date, currentRemote.value.index,(res:any)=>{})
if (cachePingFirstTime.value) {
return;