|
|
@ -242,12 +242,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) |
|
|
|
} |
|
|
|