| | |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="检查所见" prop="proResult"> |
| | | <el-input v-model="form.proResult" clearable type="textarea" /> |
| | | <el-input |
| | | v-model="form.proResult" |
| | | clearable |
| | | type="textarea" |
| | | @focus="submiepilog" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="检查结论" prop="conclusion"> |
| | | <el-input |
| | |
| | | /> |
| | | </div> |
| | | |
| | | <Public ref="aaa" :last-desc="form.conclusion" @add="handleChanges" /> |
| | | <Public ref="aaa" :check-status="checkStatus" :pro-result="form.proResult" :conclusion="form.conclusion" @add="handleChanges" /> |
| | | <!-- :last-desc="form.conclusion" --> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | console.log(res, 222); |
| | | this.tableList = res.data; |
| | | this.loading = false; |
| | | this.$nextTick(() => { |
| | | if (this.tableList.length > 0) { |
| | | const firstRow = this.tableList[0]; |
| | | this.$refs.mu.toggleRowSelection(firstRow, true); |
| | | this.handleChange([firstRow]); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | /* handleSelectionChange(selection) { |
| | | this.imgsrc = selection[0].picturePath; |
| | | this.tjNumber = selection[0].customer.tjNumber; |
| | | this.ids = selection.map((item) => item.id); |
| | |
| | | } |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | }, */ |
| | | handleSelectionChange(selection) { |
| | | this.imgsrc = selection[0].picturePath; |
| | | this.tjNumber = selection[0].customer.tjNumber; |
| | | this.ids = selection.map((item) => item.id); |
| | | |
| | | if (selection.length > 1) { |
| | | let del_row = selection.shift(); |
| | | this.$refs.tb.toggleRowSelection(del_row, false); |
| | | } |
| | | |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | |
| | | selection.forEach((element) => { |
| | | this.tableList = element.list; |
| | | |
| | | if (this.tableList.length !== 0) { |
| | | // ✅ 提前赋值 selectedRow,避免 handleChange 时未赋值 |
| | | this.selectedRow = this.tableList[0]; |
| | | this.form.proResult = this.tableList[0].proResult; |
| | | this.form.conclusion = this.tableList[0].conclusion; |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.mu.toggleRowSelection(this.tableList[0], true); |
| | | }); |
| | | } else { |
| | | this.selectedRow = null; |
| | | this.$refs.mu.clearSelection(); |
| | | } |
| | | }); |
| | | }, |
| | | handleChange(selection) { |
| | | if (selection && selection.length > 0) { |
| | | const proId = selection[0].proId; |
| | | |
| | | // ✅ 确保 selectedRow 存在且有 tjNumber |
| | | if (this.selectedRow && this.selectedRow.tjNumber) { |
| | | const tjNumber = this.selectedRow.tjNumber; |
| | | getYxJcXxJg(tjNumber, proId).then((res) => { |
| | | this.form.proResult = res.data.jcsj; |
| | | this.form.conclusion = res.data.jcjl; |
| | | this.$refs.aaa.updateData(res.data.jcsj, res.data.jcjl); |
| | | }); |
| | | } else { |
| | | console.warn("selectedRow 未准备好,跳过接口调用"); |
| | | } |
| | | |
| | | // ✅ 同时更新 selectedRow |
| | | this.selectedRow = selection[0]; |
| | | } |
| | | }, |
| | | |
| | | handleChange(selection) { |
| | | /* handleChange(selection) { |
| | | // console.log(selection, 123); |
| | | if (selection && selection.length > 0) { |
| | | const proId = selection[0].proId; |
| | |
| | | this.form.conclusion = res.data.jcjl; |
| | | }); |
| | | } |
| | | }, |
| | | }, */ |
| | | |
| | | handleChanges(value,yxbx) { |
| | | handleChanges(value, yxbx) { |
| | | this.form.conclusion = value; |
| | | this.form.proResult = yxbx; |
| | | }, |
| | |
| | | submiepilog() { |
| | | this.$refs.aaa.open = true; |
| | | let proId = "1633660948860522585"; |
| | | // let proId = null |
| | | // let proId = null |
| | | this.$refs.aaa.getList(proId); |
| | | |
| | | }, |
| | | tupian() { |
| | | this.dialogVisible = true; |