diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 1107216..200b961 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -57,21 +57,25 @@
- -
-
- 退出急救 -
-
-
终止急救
-
暂停急救
-
-
- -
- + + +

是否结束本次急救?

+
+
@@ -131,7 +135,8 @@ import store from '@/store'; import { loginInfo, - messageQuery + messageQuery, + saveAidRecord, } from 'api'; import icon01 from '@/assets/images/slice/icon01.png' import icon01H from '@/assets/images/slice/icon01H.png' @@ -207,7 +212,7 @@ }); }, methods: { - ...mapMutations('patient', ['setPatientData', 'setPatientDataCur']), + ...mapMutations('patient', ['setPatientData', 'setTimerData', 'setPatientDataCur']), handleClickMenu(item, index) { if (index != this.current) { this.current_ = this.current @@ -256,10 +261,21 @@ }, - async handleTermin(status) { - this.$message.info('结束急救,类型: ' + status) - // this.termVisible = true; - + async handleTermin(finishStatus) { + const { firstAidId } = this.patientData; + let res = await saveAidRecord({ + firstAidId, + finishStatus + }); + const { code, data, msg } = res; + if (code === 200) { + this.setPatientData({}) + this.setTimerData({}); + this.$router.replace('/firstaid/patientList') + } else { + this.$message.error(msg); + } + this.onTermClose() }, showDrawer() { @@ -287,7 +303,28 @@ this.current = this.current_ }, logout() { - this.$router.replace('/login') + this.$confirm({ + title: '提示', + content: '退出登录后回终止本次急救, 确认要退出登录吗?', + onOk: async () => { + const { firstAidId } = this.patientData; + let res = await saveAidRecord({ + firstAidId, + finishStatus: 1 + }); + const { code, data, msg } = res; + if (code === 200) { + this.setPatientData({}) + this.setTimerData({}); + this.$router.replace('/login') + } else { + this.$message.error(msg); + } + }, + onCancel() {}, + }); + + } } } diff --git a/src/views/thrombolysis/index.vue b/src/views/thrombolysis/index.vue index 05a427d..c5b7131 100644 --- a/src/views/thrombolysis/index.vue +++ b/src/views/thrombolysis/index.vue @@ -77,12 +77,10 @@ }, computed: { ...mapState('patient', ['patientData']), - isrs() { - console.log('isrs', this.patientData?.recordValDict?.['JBXX-ISRS']?.[0]?.answer[0]) + isrs() { return !(this.patientData?.recordValDict?.['JBXX-ISRS']?.[0]?.answer[0] == '否') }, - isjr() { - console.log('isjr', this.patientData?.recordValDict?.['JBXX-ISJR']?.[0]?.answer[0]) + isjr() { return !(this.patientData?.recordValDict?.['JBXX-ISJR']?.[0]?.answer[0] == '否') } },