From 24ab308a85aadcc3d275cf8a36ae437167fc3db4 Mon Sep 17 00:00:00 2001 From: newPeter7 Date: Mon, 17 Apr 2023 16:57:29 +0800 Subject: [PATCH] peter --- src/components/360View/medicalRecord/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/360View/medicalRecord/index.vue b/src/components/360View/medicalRecord/index.vue index 2ce826b..adf1876 100644 --- a/src/components/360View/medicalRecord/index.vue +++ b/src/components/360View/medicalRecord/index.vue @@ -239,12 +239,12 @@ export default { }) if (res.code === 0) { this.formList = res.data || [] - if (!mode) { + if (this.formList.length && !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.$message.error(res.msg) }