diff --git a/src/components/scDegra.vue b/src/components/scDegra.vue index f2a3bde3..a1a538e4 100644 --- a/src/components/scDegra.vue +++ b/src/components/scDegra.vue @@ -105,16 +105,16 @@ export default { document.getElementById('mySvg').setAttribute("height", mySvgHeight); document.getElementById('mySvg').setAttribute("width", mySvgWdith); svg.selectAll("g.node").on("click", function(event, d) { + svg.selectAll("g.node").style("fill", "white"); + svg.selectAll("g.node")._groups[0].forEach(item=>{ + console.log('item',item); + d3.select(item).select("rect").style("fill", "#fff"); // 修改为白色 + }) // 改变节点的颜色 const node = d3.select(this); - const currentColor = node.select("rect").style("fill"); - + const currentColor = node.select("rect").style("fill") // 判断当前颜色,如果是默认颜色,就修改为新的颜色 if (currentColor === "rgb(255, 255, 255)") { // 如果当前是白色 - // svg.selectAll("g.node").forEach(item=>{ - // item.select("rect").style("fill", "#fff"); - // // d3.select(item).select("rect").style("fill", "#fff"); // 修改为白色 - // }); node.select("rect").style("fill", "#f00"); // 修改为红色 } else { node.select("rect").style("fill", "#fff"); // 否则恢复白色 diff --git a/src/views/statistics/batch_statistics.vue b/src/views/statistics/batch_statistics.vue index 27592c93..a672bb9e 100644 --- a/src/views/statistics/batch_statistics.vue +++ b/src/views/statistics/batch_statistics.vue @@ -41,7 +41,7 @@ - +

批次流转图

- + 返工 - + + + + + + - - - + + + @@ -203,8 +205,8 @@ ref="tableWinm" :apiObj="apiObj_winm" row-key="id" - :query="params" - :params="params" + :query="params2" + :params="params2" > @@ -291,8 +293,12 @@ export default { apiObj_binm:null, nodes: [], edges: [], + //mlog\handover params:{ - batch:'', + cbatch:'', + }, + params2:{ + batch:'', }, query:{ batch:'', @@ -314,6 +320,7 @@ export default { let that = this; that.nodes =[]; that.edges = []; + that.limitedWatch = false; that.$API.wpm.batchlog.dag.req({batch:row.batch,version:row.version}).then((res) => { res.nodes.forEach(item => { let obj = {}; @@ -332,13 +339,14 @@ export default { }, nodeClick(data){ let that = this; - that.params.batch = data; + that.params.cbatch = data; + that.params2.batch = data; that.params_binm.search = data; that.activeName = 'mlog'; if( that.apiObj_mlog !==null){ that.$refs.tableMlog.queryData(that.params); that.$refs.tableHandover.queryData(that.params); - that.$refs.tableWinm.queryData(that.params); + that.$refs.tableWinm.queryData(that.params2); that.$refs.tableBinm.queryData(that.params_binm); }else{ that.apiObj_mlog = that.$API.wpm.mlog.list;