From b7346856cbd164f1954bc7cd38ba0c622a809bf1 Mon Sep 17 00:00:00 2001 From: nicky Date: Thu, 13 Mar 2025 00:27:21 +0800 Subject: [PATCH] 20250313 --- src/components/keyboard.vue | 11 +++++++++-- src/config/code.js | 18 +++++++++--------- .../Patient/components/patient-detail.vue | 5 +++-- src/views/Patient/components/patient-list.vue | 2 ++ .../components/throm-result-sop.vue | 18 +++++++++++++++++- 5 files changed, 40 insertions(+), 14 deletions(-) diff --git a/src/components/keyboard.vue b/src/components/keyboard.vue index 7419b1e..a44006b 100644 --- a/src/components/keyboard.vue +++ b/src/components/keyboard.vue @@ -321,8 +321,15 @@ const tempEle = event.currentTarget const nodeName = event.currentTarget.nextSibling.nodeName const temp = event.currentTarget.previousSibling - const ele = inputArea.replaceChild(temp, cursor) //把光标替换成当前元素 - inputArea.insertBefore(ele, event.currentTarget) + if(temp == cursor){ + const ele = inputArea.replaceChild(document.createTextNode(''), temp) //把光标替换成当前元素 + inputArea.appendChild(temp); + } + else { + const ele = inputArea.replaceChild(temp, cursor) //把光标替换成当前元素 + inputArea.insertBefore(ele, event.currentTarget) + } + } }, // 删除 diff --git a/src/config/code.js b/src/config/code.js index 4f950e6..d48518c 100644 --- a/src/config/code.js +++ b/src/config/code.js @@ -533,15 +533,15 @@ export const EMERGENCY_CODE = { default: undefined, range: [0, 100], }, - 'BQPG-GCS': { - text: '格拉斯评分', - description: '', - type: 'pageNumer', - inputType: 'number', - rightArrow: true, - default: undefined, - range: [0, 15], - }, + // 'BQPG-GCS': { + // text: '格拉斯评分', + // description: '', + // type: 'pageNumer', + // inputType: 'number', + // rightArrow: true, + // default: undefined, + // range: [0, 15], + // }, }; //0min export const EMERGENCY_Q_CODE = { diff --git a/src/views/Patient/components/patient-detail.vue b/src/views/Patient/components/patient-detail.vue index 9c62df2..c23d195 100644 --- a/src/views/Patient/components/patient-detail.vue +++ b/src/views/Patient/components/patient-detail.vue @@ -109,7 +109,8 @@ -
{{patientDataCur.greenRoadFlag}}
+ +
@@ -186,7 +187,7 @@ ...mapState('patient', ['patientData', 'timerData', 'patientDataCur']), }, async created() { - + // console.log('patientDataCur', this.patientDataCur) }, watch: { patientData() { diff --git a/src/views/Patient/components/patient-list.vue b/src/views/Patient/components/patient-list.vue index abb9a95..9699965 100644 --- a/src/views/Patient/components/patient-list.vue +++ b/src/views/Patient/components/patient-list.vue @@ -170,6 +170,7 @@ contactPhone, deptCode, height, + greenRoadFlag, id, identity, identityNo, @@ -207,6 +208,7 @@ contactPhone, deptCode, height, + greenRoadFlag, id, identity, identityNo, diff --git a/src/views/thrombolysis/components/throm-result-sop.vue b/src/views/thrombolysis/components/throm-result-sop.vue index db24760..4d63abb 100644 --- a/src/views/thrombolysis/components/throm-result-sop.vue +++ b/src/views/thrombolysis/components/throm-result-sop.vue @@ -60,6 +60,7 @@ return { currentIndex: 0, processNodeIndex: 0, + timer: null, nodeInfo: { fbsj: '', jfbSeconds: '', @@ -86,7 +87,8 @@ } }, async mounted() { - console.log(this.reportType, this.firstAidId) + // console.log(this.reportType, this.firstAidId) + console.log('mounted') if (this.reportType == 'modal') { this.init(this.dataSource.firstAidId); } else if (this.firstAidId) { @@ -110,6 +112,12 @@ //初始化数据 async init(firstAidId) { this.getNextNode(firstAidId); + this.timer = null; + this.timer = setInterval(()=>{ + console.log('10mmin') + this.getNextNode(firstAidId); + }, 10000) + }, async getNextNode(firstAidId) { let res = await getNextNode({ @@ -131,6 +139,14 @@ onSubmit() { this.$emit('next') } + }, + beforeDestroy() { + console.log("beforeDestroy") + // 清除定时器 + if(this.timer){ + clearInterval(this.timer); + this.timer = null + } } }