From f338070e9ae39cd1d047221ad7387526bffcb28d Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 11 May 2026 16:50:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=A6=85=E9=81=93385=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8A=A0=E6=9F=A5=E8=AF=A2=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E7=9A=84=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/batch_statistics.vue | 52 ++++++++++++++++++++--- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/src/views/statistics/batch_statistics.vue b/src/views/statistics/batch_statistics.vue index 07b7904a..a8ba129b 100644 --- a/src/views/statistics/batch_statistics.vue +++ b/src/views/statistics/batch_statistics.vue @@ -31,11 +31,11 @@ - +
批次流转图
- + +
{{ searchBatch }}
+ + + {{batchItem.belong_dept_name}}/{{batchItem.mgroup_name}} + + + [{{mlogItem.belong_dept_name}}/{{mlogItem.mgroup_name}}] + {{mlogItem.submit_user_name}} + {{mlogItem.update_time}}提交 + + + [{{handoverItem.send_mgroup_name}}]{{handoverItem.send_user_name}}交送,[{{handoverItem.recive_mgroup_name}}]{{handoverItem.recive_user_name}}{{ handoverItem.submit_time }}接收 + + +
+ @@ -327,6 +343,10 @@ export default { apiObj_mio:null, nodes: [], edges: [], + batchItem: {}, + mlogItem: null, + handoverItem: null, + searchBatch:'', stateDict: { 10: "创建中", 20: "已提交", @@ -342,7 +362,7 @@ export default { //mlog\handover params_mlog:{ cbatch:'', - ordering:'create_time', + ordering:'-create_time', with_mlogb:'yes', query: " { id,material_out_name,mlogb_full,count_real,count_ok,is_fix,belong_dept_name,mgroup_name,handle_user_name,handle_date,reminder_interval_list,mstate_json,work_start_time,work_end_time,oinfo_json,submit_time,submit_user_name}" }, @@ -370,9 +390,13 @@ export default { methods: { rowClick(row){ let that = this; - that.nodes =[]; + that.nodes = []; that.edges = []; that.limitedWatch = false; + that.batchItem = {}; + that.mlogItem = null; + that.handoverItem = null; + that.searchBatch = row.batch; that.$API.wpm.batchlog.dag.req({batch:row.batch,method:'direct'}).then((res) => { that.limitedWatch = true; res.nodes.forEach(item => { @@ -384,9 +408,12 @@ export default { that.nodes.push(obj); }); that.edges = res.edges; + that.$nextTick(() => { + that.nodeClick(row.batch,'first'); + }); }) }, - nodeClick(data){ + nodeClick(data,tag){ let that = this; that.params.cbatch = data; that.params_mlog.cbatch = data; @@ -405,6 +432,17 @@ export default { that.apiObj_binm = that.$API.inm.warehouse.batch; that.apiObj_mio = that.$API.inm.mio.list; } + if(tag&&tag==='first'){ + that.$API.wpm.wmaterial.list.req({batch: data, page: 1, page_size: 1}).then(res => { + if(res.results && res.results.length > 0) that.batchItem = res.results[0]; + }); + that.$API.wpm.mlog.list.req({cbatch: data, page: 1, page_size: 1}).then(res => { + if(res.results && res.results.length > 0) that.mlogItem = res.results[0]; + }); + that.$API.wpm.handover.list.req({cbatch: data, page: 1, page_size: 1}).then(res => { + if(res.results && res.results.length > 0) that.handoverItem = res.results[0]; + }); + } }, search(){ this.$refs.tablets.queryData(this.query)