fix:degra完善,batch_statistics传参修改,
This commit is contained in:
parent
833eba96c5
commit
5e9c79e0a5
|
@ -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"); // 否则恢复白色
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</el-side>
|
||||
<el-main id="elMain">
|
||||
<el-container>
|
||||
<el-header style="height: 40%;flex-direction: column;align-items: start;overflow: scroll;">
|
||||
<el-header style="height: 50%;flex-direction: column;align-items: start;overflow: scroll;">
|
||||
<p style="position: fixed;">批次流转图</p>
|
||||
<scDegra
|
||||
style="margin-top: 50px;"
|
||||
|
@ -55,7 +55,7 @@
|
|||
>
|
||||
</scDegra>
|
||||
</el-header>
|
||||
<el-main style="height: 60%;background: #fff;">
|
||||
<el-main style="height: 50%;background: #fff;">
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane name="mlog" label="生产日志">
|
||||
<scTable
|
||||
|
@ -72,11 +72,15 @@
|
|||
<span v-else>返工</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="生产设备"
|
||||
prop="equipment_name"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="生产设备" prop="equipment_name" min-width="150"></el-table-column>
|
||||
<el-table-column label="加工数" prop="count_real"></el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok"></el-table-column>
|
||||
<el-table-column label="类型">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.is_fix" type="warning">返修</el-tag>
|
||||
<el-tag v-else type="primary">正常</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门/工段">
|
||||
<template #default="scope">
|
||||
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||
|
@ -92,18 +96,16 @@
|
|||
{{ getRemaTime(scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
prop="work_start_time"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
prop="work_end_time"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="提交时间"
|
||||
prop="submit_time"
|
||||
<el-table-column
|
||||
label="操作日期"
|
||||
prop="handle_date"
|
||||
></el-table-column>
|
||||
<el-table-column label="是否提交" prop="submit_time">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.submit_time!==null" style="color: green;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="handover" label="交接记录">
|
||||
|
@ -203,8 +205,8 @@
|
|||
ref="tableWinm"
|
||||
:apiObj="apiObj_winm"
|
||||
row-key="id"
|
||||
:query="params"
|
||||
:params="params"
|
||||
:query="params2"
|
||||
:params="params2"
|
||||
>
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue