add: 添加发送ping的 id,name,date字段

This commit is contained in:
zhaoyz 2024-08-06 14:54:35 +08:00
parent 631e67fa6b
commit dbb4bd5da2
4 changed files with 7 additions and 2 deletions

View File

@ -347,6 +347,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
if (patient) {
patient.medicineWS.send(JSON.stringify({msgType: "ping",patientName: name,
idNum: id,
date: date,
msg: + new Date()}))
}
},
@ -380,6 +381,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
}
},
sendMedicine(args: {
msgType: string,
name: string,
id: string,
date: string,
@ -392,6 +394,7 @@ export const useRemoteWsStore = defineStore("remoteWs", {
const patient: any = this.patient[args.name + args.id + args.date + args.index]
if (patient) {
const params = {
msgType: args.msgType,
patientName: args.name,
idNum: args.id,
date: args.date,

View File

@ -12,7 +12,7 @@
<div v-if="!isShowRegister" class="login-block move_2">
<div class="login-way">
<span :class="passwordLogin && 'active'" @click="passwordLogin = true">密码登录</span>
<!-- <span :class="!passwordLogin && 'active'" @click="passwordLogin = false">验证码登录</span>-->
<span :class="!passwordLogin && 'active'" @click="passwordLogin = false">验证码登录</span>
</div>
<el-form ref="loginFormRef" :model="loginParams" :rules="loginRules" label-width="0" size="small">
<div class="login-form password-login" v-if="passwordLogin">

View File

@ -331,7 +331,6 @@ watch(subscribeMedicineData,(newValue:any,oldValue:any)=>{
case 'pong':
timeDiffPing.value=newValue.msg;
break;
default:
break;
}
@ -717,6 +716,7 @@ const tableItemConfirm = (e: any, tableData: any) => {
//
if (tableData.length < 1) return;
const params = {
msgType: "addMedicine",
name: currentRemote.value.patient,
id: currentRemote.value.patientId,
date: currentRemote.value.date,

View File

@ -24,6 +24,7 @@ export default defineConfig({
proxy: {
'/api': {
// target: 'http://localhost:9999', // 目标服务器地址
// target: 'http://localhost:6379', // 目标服务器地址
target: 'http://110.41.142.124:6379', // 目标服务器地址
ws: true, // 是否启用 WebSocket
changeOrigin: true, // 是否修改请求头中的 Origin 字段
@ -31,6 +32,7 @@ export default defineConfig({
},
'/socket.io': {
// target: 'ws://localhost:9999',
// target: 'ws://localhost:6379',
target: 'ws://110.41.142.124:6379',
ws: true,
changeOrigin: true,