From a43507f1f5bb8f23a351390de3abbb71b7dd8e1a Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Mon, 5 Aug 2024 14:19:18 +0800 Subject: [PATCH] queue --- src/components/doctorCheck/QueueCheckList.vue | 78 +++--- src/components/occDisease/occReport.vue | 224 +++++++++--------- src/components/queue/Queue.vue | 4 +- 3 files changed, 158 insertions(+), 148 deletions(-) diff --git a/src/components/doctorCheck/QueueCheckList.vue b/src/components/doctorCheck/QueueCheckList.vue index d1e8c50..bfc5366 100644 --- a/src/components/doctorCheck/QueueCheckList.vue +++ b/src/components/doctorCheck/QueueCheckList.vue @@ -38,7 +38,7 @@
- 呼叫
@@ -68,7 +68,7 @@
- 过号
@@ -89,11 +89,11 @@
- 重呼
- 退回
@@ -129,9 +129,10 @@ export default { alreadyCalledDetail: [], overNumberDetail: [], - waitQueueRegisterId: '', - alreadyQueueRegisterId: '', - overQueueRegisterId: '', + + waitRow: {}, + alreadyRow: {}, + overRow: {}, LocalConfig: { doctorCheck: { // 医生诊台 @@ -232,7 +233,8 @@ export default { }) } - if (!this.interval) { + // 启动自动刷新 + if (!this.interval && this.queue_refresh_interval != 0) { this.interval = setInterval(() => { this.getQueueRegisterList(this.LocalConfig.doctorCheck.queueRoom, this.LocalConfig.doctorCheck.queueItemTypeIds) }, this.queue_refresh_interval * 1000); @@ -240,32 +242,32 @@ export default { } }, - btnCall(refQueueRegisterId, completeFlag) { - let queueRegisterId = refQueueRegisterId + btnCall(refRow, completeFlag) { + let row = Object.assign({}, refRow) switch (completeFlag) { case "0": // 退回 - if (!queueRegisterId) { - if (this.overNumberDetail.length > 0) queueRegisterId = this.overNumberDetail[0].queueRegisterId + if (!row.queueRegisterId) { + if (this.overNumberDetail.length > 0) row = this.overNumberDetail[0] } - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择过号人员' }) + if (!row.queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择过号人员' }) break; case "1": // 呼叫 - if (!queueRegisterId) { - if (this.waitDetail.length > 0) queueRegisterId = this.waitDetail[0].queueRegisterId + if (!row.queueRegisterId) { + if (this.waitDetail.length > 0) row = this.waitDetail[0] } - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择候诊人员' }) + if (!row.queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择候诊人员' }) break; case "2": // 过号 - if (!queueRegisterId) { - if (this.alreadyCalledDetail.length > 0) queueRegisterId = this.alreadyCalledDetail[0].queueRegisterId + if (!row.queueRegisterId) { + if (this.alreadyCalledDetail.length > 0) row = this.alreadyCalledDetail[0] } - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择已呼人员' }) + if (!row.queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择已呼人员' }) break; case "9": // 重呼 - if (!queueRegisterId) { - if (this.overNumberDetail.length > 0) queueRegisterId = this.overNumberDetail[0].queueRegisterId + if (!row.queueRegisterId) { + if (this.overNumberDetail.length > 0) queueRegisterId = this.overNumberDetail[0] } - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择过号人员' }) + if (!row.queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择过号人员' }) break; } @@ -274,7 +276,7 @@ export default { .then(res => { if (res.code > -1) { this.getQueueRegisterList(this.LocalConfig.doctorCheck.queueRoom, this.LocalConfig.doctorCheck.queueItemTypeIds) - if (this.$peisAPI && completeFlag == '1') this.outShellCall() + if (this.$peisAPI && completeFlag == '1') this.outShellCall(row) } }) } else if (completeFlag == '9') { @@ -283,18 +285,20 @@ export default { }, // 调用壳呼叫 api - outShellCall() { - // /api/app/Room/Get - // { - // "roomId": "3a13f191-1c1a-0749-fda4-5b10b0b10c15" - // } - - this.$peisAPI.getIsSpeechEnable() + outShellCall(row) { + let roomName = '' + postapi('/api/app/Room/Get', { roomId: this.LocalConfig.doctorCheck.queueRoom }) + .then(res => { + if (res.code > -1) { + roomName = res.data.displayName + return this.$peisAPI.getIsSpeechEnable() + } + }) .then(res => { if (res == 'Y') return this.$peisAPI.speechConnect() }) .then(res => { - let toOutShell = { SendText: "欢迎光临", RepatPlayNum: 2, Delay: 1 } + let toOutShell = { SendText: `请${row.patientName}到${roomName}检查`, RepatPlayNum: 3, Delay: 1 } return this.$peisAPI.speechSendText(JSON.stringify(toOutShell)) }) .catch(err => { @@ -330,9 +334,9 @@ export default { this.alreadyCalledDetail = [] this.overNumberDetail = [] - this.waitQueueRegisterId = '' - this.alreadyQueueRegisterId = '' - this.overQueueRegisterId = '' + this.waitRow = {} + this.alreadyRow = {} + this.overRow = {} let itemTypeIds = [] itemType.forEach(e => { @@ -394,17 +398,17 @@ export default { // 选择候诊人员 rowClickWait(row) { - this.waitQueueRegisterId = row.queueRegisterId + this.waitRow = row }, // 选择过号人员 rowClickAlready(row) { - this.alreadyQueueRegisterId = row.queueRegisterId + this.alreadyRow = row }, // 选择过号人员 rowClickOver(row) { - this.overQueueRegisterId = row.queueRegisterId + this.overRow = row }, }, diff --git a/src/components/occDisease/occReport.vue b/src/components/occDisease/occReport.vue index dad48f5..bbb0c4a 100644 --- a/src/components/occDisease/occReport.vue +++ b/src/components/occDisease/occReport.vue @@ -34,7 +34,8 @@
- 查询 + 预览 + 打印