| | |
| | | |
| | | updateFormContent(selection) { |
| | | // if (!selection.length) return; |
| | | console.log(selection, 123456); |
| | | |
| | | this.updateData(this.proResult, this.conclusion); |
| | | // 如果处于检查状态,使用传入的值 |
| | | // if (this.checkStatus === "1") { |
| | |
| | | // .join(","); |
| | | }, |
| | | |
| | | /* handleOk() { |
| | | handleOk() { |
| | | if (!this.form.desc && !this.form.jcsj) { |
| | | this.$message.warning("请选择数据"); |
| | | return; |
| | | } |
| | | } else { |
| | | const desc = this.form.desc?.trim(); |
| | | const jcsj = this.form.jcsj?.trim(); |
| | | |
| | | try { |
| | | this.$emit("add", this.form.desc, this.form.jcsj); |
| | | this.resetForm(); |
| | | this.open = false; |
| | | } catch (error) { |
| | | console.error("处理数据失败:", error); |
| | | this.$message.error("操作失败"); |
| | | } |
| | | }, */ |
| | | |
| | | handleOk() { |
| | | const jcsjTrim = this.form.jcsj?.trim(); |
| | | const descTrim = this.form.desc?.trim(); |
| | | |
| | | if (!jcsjTrim || !descTrim) { |
| | | this.$message.warning("检查所见和检查结论不能为空"); |
| | | return; |
| | | // 如果没有选中表格项 |
| | | if (!this.list || this.list.length === 0) { |
| | | if (!desc && !jcsj) { |
| | | this.$message.warning( |
| | | "请填写有效的检查所见和检查结论,或选择表格数据" |
| | | ); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | try { |