|
|
|
@ -93,7 +93,7 @@ |
|
|
|
style="width: 40px;min-width: 40px;height: 26px;">重呼</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin: 10px 0;"> |
|
|
|
<el-button type="primary" class="commonbutton" @click="btnCall(overQueueRegisterId, '1')" |
|
|
|
<el-button type="primary" class="commonbutton" @click="btnCall(overQueueRegisterId, '0')" |
|
|
|
style="width: 40px;min-width: 40px;height: 26px;">退回</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -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() { |
|
|
|
|