From cbc940b8df13e891456546806a75f1085a98804d Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 7 Jan 2026 15:46:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=B7=A5=E8=89=BA=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E6=8E=92=E4=B8=80=E6=AC=A1=E6=A3=92=E6=97=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=B7=A5=E8=89=BA=E5=9B=BE=E7=BA=B8=EF=BC=8C=E5=B9=B6=E5=9C=A8?= =?UTF-8?q?=E2=80=98=E6=8E=92=E4=B8=80=E6=AC=A1=E6=A3=92=E2=80=98=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E4=B8=AD=E5=B1=95=E7=A4=BA=E7=AC=AC=E4=B8=80=E5=BC=A0?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mtm/route_form.vue | 37 ++++++++++++++++++++++++++++++++ src/views/wpm_bx/mlog_detail.vue | 15 +++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/views/mtm/route_form.vue b/src/views/mtm/route_form.vue index bf92744f..a4a8b7c4 100644 --- a/src/views/mtm/route_form.vue +++ b/src/views/mtm/route_form.vue @@ -194,6 +194,11 @@ + + + + + @@ -331,9 +336,12 @@ export default { divDisable:false, materialsIn: [], materialsOut: [], + fileIds: [], + fileurl:[], mgroups: [], options: [], routemats:[], + paramsJsonFileurl:[], materialOptions:[], titleMap: { add: "新增", edit: "编辑" }, setFiltersVisible: false, @@ -424,6 +432,27 @@ export default { } }) }, + //合并新增的图片Ids + imagesChange(data,data1){ + let files = []; + this.fileIds = data; + data1.forEach((item)=>{ + let obj = {}; + obj.id = item.id; + obj.file = item.file; + obj.name = item.name; + obj.path = item.path; + files.push(obj); + }) + this.paramsJsonFileurl = files; + this.params_json.fileurl = JSON.stringify(files); + }, + //合并新增的图片Ids + imagesDel(index){ + this.fileIds.splice(index,1); + this.paramsJsonFileurl.splice(index,1); + this.params_json.fileurl = JSON.stringify(this.paramsJsonFileurl); + }, //显示 open(mode = "add") { let that = this; @@ -453,6 +482,13 @@ export default { } if(data.process_name=='排一次棒'){ that.params_json=that.form.params_json; + console.log('that.params_json',that.params_json); + let fileurl = JSON.parse(that.params_json.fileurl); + console.log('fileurl',fileurl); + fileurl.forEach((item)=>{ + item.url = item.path; + that.fileurl.push(item); + }) } setTimeout(() => { that.options.forEach((item) => { @@ -475,6 +511,7 @@ export default { if(that.processName=='捆棒'){ that.form.params_json = that.params_json2; } + console.log('that.form',that.form); if (that.mode === "add") { that.$API.mtm.route.create.req(that.form).then((res) => { that.isSaveing = false; diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 4a973cef..e2573af0 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -31,6 +31,13 @@ 查看 + + +
{ + let params_json = routeRes.params_json; + if(params_json.fileurl){ + let fileurl = JSON.parse(params_json.fileurl); + that.imageUrl = fileurl[0].file; + } + }) } that.oinfo_json = []; if(res.oinfo_json_&&res.oinfo_json_!==null){