From 21449091b676b8dce0cf347e88ec6061de0381ed Mon Sep 17 00:00:00 2001 From: nicky Date: Sun, 2 Mar 2025 12:53:20 +0800 Subject: [PATCH] 20250302 --- .../components/throm-result-baseInfo.vue | 30 +++++++++++----- .../components/throm-result-firstInfo.vue | 35 +++++++++++++++---- 2 files changed, 50 insertions(+), 15 deletions(-) diff --git a/src/views/thrombolysis/components/throm-result-baseInfo.vue b/src/views/thrombolysis/components/throm-result-baseInfo.vue index 7957b89..e5db692 100644 --- a/src/views/thrombolysis/components/throm-result-baseInfo.vue +++ b/src/views/thrombolysis/components/throm-result-baseInfo.vue @@ -112,7 +112,8 @@ import { uploadIdcard, updateFirstAid, - queryAidRecord + queryAidRecord, + saveAidRecord } from 'api' import { mapMutations, @@ -154,7 +155,8 @@ 'JBXX-LYFS': '', }, firstAidZlType: 0, //疑似诊断 - selectCode: '' // 当前选中code + selectCode: '' ,// 当前选中code, + form: {} } }, props: ['patientId'], @@ -184,7 +186,9 @@ }, methods: { echo(data) { + this.form = JSON.parse(JSON.stringify(data)) const { + firstAidId, recordValDict, patientName, patientGender, @@ -314,7 +318,7 @@ }, async onSubmit(e) { e.preventDefault(); - let firstAidId = this.patientData.firstAidId + let firstAidId = this.form.firstAidId let codeAndAnswerList = [], params = { firstAidId @@ -339,11 +343,21 @@ params[`${k}`] = values[k] } } - var res = await updateFirstAid(params) - await this.home.updateAidCode({ - codeAndAnswerList - }, false) - this.$message.success(res.msg) + if(!this.patientId) { + await this.home.updateAidCode({ + codeAndAnswerList + }, false) + }else{ + const res = await updateFirstAid({ + codeAndAnswerList, + ...params + }) + // const res = await saveAidRecord({ + // codeAndAnswerList, + // ...params + // }); + this.$message.success(res.msg) + } this.$emit('next') }) }) diff --git a/src/views/thrombolysis/components/throm-result-firstInfo.vue b/src/views/thrombolysis/components/throm-result-firstInfo.vue index e7cbbdf..455146a 100644 --- a/src/views/thrombolysis/components/throm-result-firstInfo.vue +++ b/src/views/thrombolysis/components/throm-result-firstInfo.vue @@ -250,7 +250,9 @@ // import headTitle from '@/Patient/components/title' import { idcardInfo, - queryAidRecord + queryAidRecord, + updateFirstAid, + saveAidRecord } from 'api'; import { mapMutations, @@ -339,6 +341,7 @@ 'XGZL-BFZ-ELSE': '', }, selectCode: '', // 当前选中code + form: {} }; }, props: ['patientId'], @@ -388,6 +391,7 @@ }); }, echo(data) { + this.form = JSON.parse(JSON.stringify(data)) const { recordValDict, patientGender @@ -515,7 +519,7 @@ this.firstForm.validateFields(async (err, values) => { let codeAndAnswerList = [], params = {}; - const { firstAidId } = this.patientData + const { firstAidId } = this.form console.log('firstinfo handleSubmit', firstAidId) let adverseSubmit = this.$refs.adverse; if (adverseSubmit) { @@ -545,14 +549,31 @@ params[`${k}`] = values[k]; } } - await this.home.updateAidCode({ + if(!this.patientId) { + await this.home.updateAidCode({ ...params, codeAndAnswerList, finishStatus - }, - false - ); - this.$message.success("操作成功") + }, false) + }else{ + console.log('3902390293023', this.patientId) + // var res = await updateFirstAid(params) + const res = await updateFirstAid({ + firstAidId, + codeAndAnswerList, + ...params + }) + // const res = await saveAidRecord(param); + this.$message.success(res.msg) + } + // await this.home.updateAidCode({ + // ...params, + // codeAndAnswerList, + // finishStatus + // }, + // false + // ); + // this.$message.success("操作成功") if(finishStatus === 1) { console.log('firstinfo', firstAidId) this.$emit('next', {firstAidId})