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){