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;