From c261aed5449b8bfb9283f11bb9c55422fec7ee78 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 25 Aug 2025 15:39:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=8E=BB=E7=BA=A4=E6=8E=92=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=A3=92=E5=B7=A5=E8=89=BA=E6=AD=A5=E9=AA=A4=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=B7=A5=E8=89=BA=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mtm/route_form.vue | 115 ++++++++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 23 deletions(-) diff --git a/src/views/mtm/route_form.vue b/src/views/mtm/route_form.vue index 999ef2b3..6dbf22c4 100644 --- a/src/views/mtm/route_form.vue +++ b/src/views/mtm/route_form.vue @@ -24,6 +24,7 @@ clearable filterable style="width: 100%" + @change="processChange" > - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {}); }, + processChange(){ + let that = this; + that.options.forEach((item) => { + if (item.id == that.form.process) { + that.processName = item.name; + } + }) + }, //显示 open(mode = "add") { this.mode = mode; @@ -371,10 +428,19 @@ export default { }, //表单注入数据 setData(data) { - Object.assign(this.form, data); - this.routeId = data.id; - this.addTemplate.route = data.id; - this.getroutemats(); + let that = this; + Object.assign(that.form, data); + that.routeId = data.id; + that.addTemplate.route = data.id; + that.params_json=that.form.params_json; + setTimeout(() => { + that.options.forEach((item) => { + if (item.id == data.process) { + that.processName = item.name; + } + }) + },500) + that.getroutemats(); }, //表单提交方法 submit() { @@ -382,6 +448,9 @@ export default { that.$refs.dialogForm.validate(async (valid) => { if (valid) { that.isSaveing = true; + if(that.processName=='排一次棒'){ + that.form.params_json = that.params_json; + } if (that.mode === "add") { that.$API.mtm.route.create.req(that.form).then((res) => { that.isSaveing = false;