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) }