diff --git a/src/views/DisposalSuggestions/Form.vue b/src/views/DisposalSuggestions/Form.vue index ec7d5ad..db07307 100644 --- a/src/views/DisposalSuggestions/Form.vue +++ b/src/views/DisposalSuggestions/Form.vue @@ -1,201 +1,288 @@  diff --git a/src/views/baseInspectionReport/Form.vue b/src/views/baseInspectionReport/Form.vue index 57f46fd..051e07f 100644 --- a/src/views/baseInspectionReport/Form.vue +++ b/src/views/baseInspectionReport/Form.vue @@ -29,9 +29,9 @@ - + - + + + + @@ -56,19 +70,54 @@ - - + - + {{ item.fullName }} + 其他 + + - - - - - - - - - - - - + { + let list = []; + data.list.length && + data.list.forEach((item) => { + list.push({ + label: item.SysytemInfo.SystemName, + value: item.SysytemInfo.Id, + }); + }); + this.nameOptions = list; + this.name_loading = false; + }); + }, + questionTypeChange(v) { + this.showErrflag = Boolean(v == '错误表述'); + this.otherQuestion = Boolean(v == '其他'); + }, async getplatformTypeOptions() { let list = this.$store.state.meta.system; !list && @@ -224,20 +280,37 @@ export default { init(id, isDetail) { this.dataForm.id = id || 0; this.visible = true; + this.otherQuestion = false; + this.showErrflag = false; this.isDetail = isDetail || false; this.$nextTick(async () => { this.$refs["elForm"].resetFields(); if (this.dataForm.id) { let res = await getDetail(this.dataForm.id); this.dataForm = res.data; + if(this.questionTypeOptions.findIndex(v => v.fullName == this.dataForm.questionType) == -1) { + this.dataForm.otherQuestionType = res.data.questionType; + this.dataForm.questionType = '其他'; + } if (!this.dataForm.obtainEvidence) this.dataForm.obtainEvidence = []; if (!this.dataForm.annex) this.dataForm.annex = []; + this.$nextTick(() => { + this.questionTypeChange(this.dataForm.questionType); + }) } }); }, + getQuestionTypeName() { + if(this.dataForm.questionType == '其他') { + return this.dataForm.otherQuestionType; + } else { + return this.dataForm.questionType; + } + }, dataFormSubmit() { this.$refs["elForm"].validate(async (valid) => { if (valid) { + this.dataForm.questionType = this.getQuestionTypeName(); let res = !this.dataForm.id ? await addForm(this.dataForm) : await updataForm(this.dataForm); diff --git a/src/views/baseInspectionReport/index.vue b/src/views/baseInspectionReport/index.vue index c344ef9..3fb556d 100644 --- a/src/views/baseInspectionReport/index.vue +++ b/src/views/baseInspectionReport/index.vue @@ -1,6 +1,6 @@