From accbf4c831ced1c91cbc149a8726506ef9b0665a Mon Sep 17 00:00:00 2001 From: newPeter7 Date: Wed, 19 Apr 2023 20:19:55 +0800 Subject: [PATCH] peter --- .../360View/commonForm/eyesVision.vue | 57 +++++++++++++++++-- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/src/components/360View/commonForm/eyesVision.vue b/src/components/360View/commonForm/eyesVision.vue index 08f4a9e..f59e24a 100644 --- a/src/components/360View/commonForm/eyesVision.vue +++ b/src/components/360View/commonForm/eyesVision.vue @@ -186,7 +186,7 @@
- +
@@ -326,7 +326,7 @@
- 斜              视: + 斜               视:
@@ -503,6 +503,7 @@ export default { data() { return { formData: { + idList: [], patientId: '', patientName: '', patientSex: '', @@ -701,7 +702,7 @@ export default { name: '散开过度', isSelect: false }, { - name: `内隐科`, + name: '内隐科', isSelect: false }, { name: '外隐科', @@ -814,6 +815,7 @@ export default { const form = data.data.data this.formData = form if (!this.formData.id) { + this.queryProject() this.formData.ctYuan = this.formData.ctJin = '正位' this.formData.ctYqyd = '正常' this.formData.worth1 = this.formData.worth3 = '4个' @@ -859,6 +861,35 @@ export default { this.$message.error(res.msg) } }, + // 获取报告单id + async queryProject() { + const project = window.localStorage.getItem('projectItem') ? JSON.parse(window.localStorage.getItem('projectItem')) : [] + const { data: res } = await this.$http.get( + '/patient/getZlItemDict', + { + params: { + caseName: '双眼视功能检查报告单' + } + } + ) + if (res.code === 0) { + const data = res.data || [] + const list = [] + if (data.length) { + for (let i = 0; i < data.length; i++) { + for (let j = 0; j < project.length; j++) { + if (data[i].itemId === project[j].porjectCode) { + list.push(project[j].id) + } + } + } + console.log('list', list) + this.formData.idList = list + } + } else { + this.$message.error(res.msg) + } + }, // 处理字符串 handleStr(string, array) { if (string) { @@ -1001,7 +1032,7 @@ export default { } } .center { - text-align: center; + text-align: left; } .left { text-align: left; @@ -1034,7 +1065,23 @@ export default { }