diff --git a/public/index.html b/public/index.html index a054add..6f52be6 100644 --- a/public/index.html +++ b/public/index.html @@ -39,8 +39,8 @@ <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> <% } %> diff --git a/src/components/360View/medicalRecord/index.vue b/src/components/360View/medicalRecord/index.vue index d7a0fbd..309dc25 100644 --- a/src/components/360View/medicalRecord/index.vue +++ b/src/components/360View/medicalRecord/index.vue @@ -18,14 +18,49 @@ />
- +
@@ -86,14 +121,38 @@ export default { created() { if (this.isSearch === '2') { this.getFormList() + this.getPatientData() } }, methods: { handleForm({ index, item }) { - this.curIndex = index - this.id = item.id - this.name = item.name - this.jsonText = item.jsonText + this.$confirmFun('是否保存数据,否则当前数据会丢弃!', '保存', '', '已取消保存数据!') + .then(() => { + this.$nextTick(() => { + switch (this.name) { + case '报告': + this.$refs.reportForm && this.$refs.reportForm.handleSaveTable() + break + case '眼科激光手术患者知情同意书': + this.$refs.informedConsent && this.$refs.informedConsent.handleSaveTable() + break + case '眼底血管造影知情同意书': + this.$refs.mraForm && this.$refs.mraForm.handleSaveTable() + break + case '眼科激光手术治疗': + this.$refs.laserSurgery && this.$refs.laserSurgery.handleSaveTable() + break + default: + this.$refs.ourPatient && this.$refs.ourPatient.handleSaveTable() + return + } + }) + }).finally(() => { + this.curIndex = index + this.id = item.id + this.name = item.name + this.jsonText = item.jsonText + }) }, getPatientData() { const params = { @@ -103,11 +162,17 @@ export default { this.patientData = data.data.data }) }, - async updateForm(data) { + updateForm(data) { + if (data) { + this.jsonText = JSON.stringify(data) + } + this.saveFormData(this.jsonText) + }, + async saveFormData(jsonText) { const params = { flag: 8, name: this.name, - jsonText: JSON.stringify(data), + jsonText, patientId: this.patientId, id: this.id, platform: this.isSearch @@ -132,10 +197,12 @@ export default { }) return } + const isMedical = name === '门急诊电子病历' const params = { flag: 8, name: name, createTime: date, + isMedical, patientId: this.patientId, platform: this.isSearch } @@ -167,23 +234,20 @@ export default { }) if (res.code === 0) { this.formList = res.data || [] + const date = this.$moment().format('YYYY-MM-DD') if (this.formList.length) { - if (mode) { - this.curIndex = this.formList.findIndex(item => item.id === this.id) - this.jsonText = this.formList[this.curIndex].jsonText - } else { + if (!mode) { this.name = this.formList[0].name this.id = this.formList[0].id - this.curIndex = this.formList.findIndex(item => item.id === this.id) - this.jsonText = this.formList[this.curIndex].jsonText } + this.curIndex = this.formList.findIndex(item => item.id === this.id) + this.jsonText = this.formList[this.curIndex].jsonText } else { this.addRecord('门急诊电子病历') } } else { this.$message.error(res.msg) } - this.getPatientData() } } } diff --git a/src/components/360View/medicalRecord/outPatientRecord/leftFormList.vue b/src/components/360View/medicalRecord/outPatientRecord/leftFormList.vue index cebe94a..847c48c 100644 --- a/src/components/360View/medicalRecord/outPatientRecord/leftFormList.vue +++ b/src/components/360View/medicalRecord/outPatientRecord/leftFormList.vue @@ -8,7 +8,7 @@ {{ item.name }}

- + diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index dd85637..c32cebf 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -3,7 +3,7 @@ const t = {} t.loading = '加载中...' t.brand = {} -t.brand.lg = '翔安医院屈光系统' +t.brand.lg = '眼科电子病历&科研' t.brand.mini = '屈光' t.add = '新增' diff --git a/src/page-subspecialty/views/main-navbar.vue b/src/page-subspecialty/views/main-navbar.vue index 47d278d..d9d7556 100644 --- a/src/page-subspecialty/views/main-navbar.vue +++ b/src/page-subspecialty/views/main-navbar.vue @@ -5,7 +5,7 @@

-
眼科电子病历系统
+
眼科电子病历&科研

@@ -55,7 +55,7 @@ - +