diff --git a/src/views/wpm_bx/mlog_form.vue b/src/views/wpm_bx/mlog_form.vue index 45a69502..9a2680d6 100644 --- a/src/views/wpm_bx/mlog_form.vue +++ b/src/views/wpm_bx/mlog_form.vue @@ -48,6 +48,7 @@ clearable filterable style="width: 100%" + @change="routeChange" > - + + + + + - 保存 + 保存 取消 @@ -260,6 +257,7 @@ export default { edit: "编辑日志", show: "查看日志", }, + imageUrl:'', test_file:'', fileList:[], //表单数据 @@ -387,6 +385,18 @@ export default { that.routeOptions = res; }); }, + routeChange(){ + let that = this; + if(that.route_code=='paiyicibang'){ + that.$API.mtm.route.item.req(that.form.route).then((res) => { + let json = res.params_json; + if(json.fileurl){ + let fileurl = JSON.parse(json.fileurl); + that.imageUrl = fileurl[0].path; + } + }) + } + }, //显示 open(mode = "add",type) { let that = this; @@ -424,6 +434,9 @@ export default { }); },500) } + if(that.route_code=='paiyicibang'&&data.oinfo_json.imageUrl){ + this.imageUrl = data.oinfo_json.imageUrl; + } } this.getRoute(data.id); }, @@ -450,6 +463,9 @@ export default { that.testitems.forEach((item) => { oinfo_json[item.id] = item.value; }) + if(that.mgroupName=='排一次棒'&&that.imageUrl!==''){ + oinfo_json.imageUrl = that.imageUrl; + } that.form.oinfo_json = oinfo_json; if (that.mode === "add") { that.$API.wpm.mlog.init.req(that.form).then((res) => {