From 5a34700b6bdd74435cdec706f4631ab6b0a4ca78 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Thu, 1 Aug 2024 18:59:30 +0800 Subject: [PATCH] speechConnect --- public/sysConfig.json | 2 +- src/components/doctorCheck/CheckSumSug.vue | 5 ++ src/components/doctorCheck/QueueCheckList.vue | 65 ++++++++++++++----- src/components/report/BtnReport.vue | 2 +- .../report/PatientRegisterListNobtn.vue | 15 ++++- src/components/sumDoctorCheck/SumSug.vue | 4 +- src/views/charge/charge.vue | 6 +- 7 files changed, 73 insertions(+), 26 deletions(-) diff --git a/public/sysConfig.json b/public/sysConfig.json index 28b264b..5cf6547 100644 --- a/public/sysConfig.json +++ b/public/sysConfig.json @@ -1,4 +1,4 @@ { - "apiurl": "http://localhost:9530", + "apiurl": "http://140.143.162.39:9529", "softName": "神豚体检管理系统" } \ No newline at end of file diff --git a/src/components/doctorCheck/CheckSumSug.vue b/src/components/doctorCheck/CheckSumSug.vue index 3ed555a..a9556c5 100644 --- a/src/components/doctorCheck/CheckSumSug.vue +++ b/src/components/doctorCheck/CheckSumSug.vue @@ -51,7 +51,12 @@ 排队 +
+ 危急值 +
+
diff --git a/src/components/doctorCheck/QueueCheckList.vue b/src/components/doctorCheck/QueueCheckList.vue index 8ab90c7..d1e8c50 100644 --- a/src/components/doctorCheck/QueueCheckList.vue +++ b/src/components/doctorCheck/QueueCheckList.vue @@ -93,7 +93,7 @@ style="width: 40px;min-width: 40px;height: 26px;">重呼
- 退回
@@ -142,7 +142,7 @@ export default { } }, LocalConfigInit: {}, - isInterval: 'N', // 是否启动过定时任务 + interval: null, // 定时器句柄 queue_refresh_interval: 15, // 叫号刷新时间间隔(秒) queue_play_voice_repeate_times: 2, // 语音重复播放次数 @@ -161,6 +161,12 @@ export default { this.fnMounted() }, + destroyed() { + console.log('this.interval', JSON.stringify(this.interval)) + if (this.interval) clearInterval(this.interval) + console.log('this.interval clearInterval', JSON.stringify(this.interval)) + }, + computed: { ...mapState(['window', 'dialogWin', 'dataTransOpts', 'dict', 'doctorCheck']), @@ -210,7 +216,7 @@ export default { this.queue_refresh_interval = Number(sysParam.data || 15) } catch (error) { console.log(error) - } + } // 壳端 if (this.$peisAPI) { @@ -224,34 +230,43 @@ export default { .then(res => { if (res.code > -1) this.queue_play_voice_repeate_interval = Number(res.data || 1) }) - } - if (this.isInterval == 'N') { - this.isInterval = 'Y' - setInterval(() => { + if (!this.interval) { + this.interval = setInterval(() => { this.getQueueRegisterList(this.LocalConfig.doctorCheck.queueRoom, this.LocalConfig.doctorCheck.queueItemTypeIds) }, this.queue_refresh_interval * 1000); - } } }, - btnCall(queueRegisterId, completeFlag) { + btnCall(refQueueRegisterId, completeFlag) { + let queueRegisterId = refQueueRegisterId switch (completeFlag) { case "0": // 退回 - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '请选择过号人员' }) + if (!queueRegisterId) { + if (this.overNumberDetail.length > 0) queueRegisterId = this.overNumberDetail[0].queueRegisterId + } + if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择过号人员' }) break; case "1": // 呼叫 - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '请选择候诊人员' }) + if (!queueRegisterId) { + if (this.waitDetail.length > 0) queueRegisterId = this.waitDetail[0].queueRegisterId + } + if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择候诊人员' }) break; case "2": // 过号 - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '请选择已呼人员' }) + if (!queueRegisterId) { + if (this.alreadyCalledDetail.length > 0) queueRegisterId = this.alreadyCalledDetail[0].queueRegisterId + } + if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择已呼人员' }) break; case "9": // 重呼 - if (!queueRegisterId) this.$message.warning({ showClose: true, message: '请选择过号人员' }) + if (!queueRegisterId) { + if (this.overNumberDetail.length > 0) queueRegisterId = this.overNumberDetail[0].queueRegisterId + } + if (!queueRegisterId) this.$message.warning({ showClose: true, message: '未可操作的数据,或未选择过号人员' }) break; - } if (queueRegisterId && completeFlag != '9') { @@ -259,14 +274,32 @@ 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() } }) + } else if (completeFlag == '9') { + if (this.$peisAPI) this.outShellCall() } }, + // 调用壳呼叫 api + outShellCall() { + // /api/app/Room/Get + // { + // "roomId": "3a13f191-1c1a-0749-fda4-5b10b0b10c15" + // } - refuseItem() { - + this.$peisAPI.getIsSpeechEnable() + .then(res => { + if (res == 'Y') return this.$peisAPI.speechConnect() + }) + .then(res => { + let toOutShell = { SendText: "欢迎光临", RepatPlayNum: 2, Delay: 1 } + return this.$peisAPI.speechSendText(JSON.stringify(toOutShell)) + }) + .catch(err => { + console.log('呼叫失败', err) + }) }, dictInit() { diff --git a/src/components/report/BtnReport.vue b/src/components/report/BtnReport.vue index f182019..f17be90 100644 --- a/src/components/report/BtnReport.vue +++ b/src/components/report/BtnReport.vue @@ -338,7 +338,7 @@ export default { try { if (e.completeFlag == '3') { toOutShell.BusinessCode = e.patientRegisterId - toOutShell.ExportDirectory = `${path}\\${e.patientRegisterNo + e.patientName}.pdf` + toOutShell.ExportDirectory = `${path}\\${e.patientRegisterNo}_${patientName}.pdf` let jsonToOutShell = JSON.stringify(toOutShell) console.log('toOutShell', jsonToOutShell) let res = await this.$peisAPI.exportToPdfPre(jsonToOutShell) diff --git a/src/components/report/PatientRegisterListNobtn.vue b/src/components/report/PatientRegisterListNobtn.vue index 321f0e4..0ec55ed 100644 --- a/src/components/report/PatientRegisterListNobtn.vue +++ b/src/components/report/PatientRegisterListNobtn.vue @@ -11,6 +11,13 @@ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }} + + + + + - +