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("height", mySvgHeight);
|
||||||
document.getElementById('mySvg').setAttribute("width", mySvgWdith);
|
document.getElementById('mySvg').setAttribute("width", mySvgWdith);
|
||||||
svg.selectAll("g.node").on("click", function(event, d) {
|
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 node = d3.select(this);
|
||||||
const currentColor = node.select("rect").style("fill");
|
const currentColor = node.select("rect").style("fill")
|
||||||
|
|
||||||
// 判断当前颜色,如果是默认颜色,就修改为新的颜色
|
// 判断当前颜色,如果是默认颜色,就修改为新的颜色
|
||||||
if (currentColor === "rgb(255, 255, 255)") { // 如果当前是白色
|
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"); // 修改为红色
|
node.select("rect").style("fill", "#f00"); // 修改为红色
|
||||||
} else {
|
} else {
|
||||||
node.select("rect").style("fill", "#fff"); // 否则恢复白色
|
node.select("rect").style("fill", "#fff"); // 否则恢复白色
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</el-side>
|
</el-side>
|
||||||
<el-main id="elMain">
|
<el-main id="elMain">
|
||||||
<el-container>
|
<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>
|
<p style="position: fixed;">批次流转图</p>
|
||||||
<scDegra
|
<scDegra
|
||||||
style="margin-top: 50px;"
|
style="margin-top: 50px;"
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
>
|
>
|
||||||
</scDegra>
|
</scDegra>
|
||||||
</el-header>
|
</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-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane name="mlog" label="生产日志">
|
<el-tab-pane name="mlog" label="生产日志">
|
||||||
<scTable
|
<scTable
|
||||||
|
@ -72,11 +72,15 @@
|
||||||
<span v-else>返工</span>
|
<span v-else>返工</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="生产设备" prop="equipment_name" min-width="150"></el-table-column>
|
||||||
label="生产设备"
|
<el-table-column label="加工数" prop="count_real"></el-table-column>
|
||||||
prop="equipment_name"
|
<el-table-column label="合格数" prop="count_ok"></el-table-column>
|
||||||
min-width="150"
|
<el-table-column label="类型">
|
||||||
></el-table-column>
|
<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="部门/工段">
|
<el-table-column label="部门/工段">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
|
@ -92,18 +96,16 @@
|
||||||
{{ getRemaTime(scope.row) }}
|
{{ getRemaTime(scope.row) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="开始时间"
|
label="操作日期"
|
||||||
prop="work_start_time"
|
prop="handle_date"
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="结束时间"
|
|
||||||
prop="work_end_time"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="提交时间"
|
|
||||||
prop="submit_time"
|
|
||||||
></el-table-column>
|
></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>
|
</scTable>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="handover" label="交接记录">
|
<el-tab-pane name="handover" label="交接记录">
|
||||||
|
@ -203,8 +205,8 @@
|
||||||
ref="tableWinm"
|
ref="tableWinm"
|
||||||
:apiObj="apiObj_winm"
|
:apiObj="apiObj_winm"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:query="params"
|
:query="params2"
|
||||||
:params="params"
|
:params="params2"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection"></el-table-column>
|
<el-table-column type="selection"></el-table-column>
|
||||||
<el-table-column label="状态" prop="state">
|
<el-table-column label="状态" prop="state">
|
||||||
|
@ -291,8 +293,12 @@ export default {
|
||||||
apiObj_binm:null,
|
apiObj_binm:null,
|
||||||
nodes: [],
|
nodes: [],
|
||||||
edges: [],
|
edges: [],
|
||||||
|
//mlog\handover
|
||||||
params:{
|
params:{
|
||||||
batch:'',
|
cbatch:'',
|
||||||
|
},
|
||||||
|
params2:{
|
||||||
|
batch:'',
|
||||||
},
|
},
|
||||||
query:{
|
query:{
|
||||||
batch:'',
|
batch:'',
|
||||||
|
@ -314,6 +320,7 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.nodes =[];
|
that.nodes =[];
|
||||||
that.edges = [];
|
that.edges = [];
|
||||||
|
that.limitedWatch = false;
|
||||||
that.$API.wpm.batchlog.dag.req({batch:row.batch,version:row.version}).then((res) => {
|
that.$API.wpm.batchlog.dag.req({batch:row.batch,version:row.version}).then((res) => {
|
||||||
res.nodes.forEach(item => {
|
res.nodes.forEach(item => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
@ -332,13 +339,14 @@ export default {
|
||||||
},
|
},
|
||||||
nodeClick(data){
|
nodeClick(data){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.params.batch = data;
|
that.params.cbatch = data;
|
||||||
|
that.params2.batch = data;
|
||||||
that.params_binm.search = data;
|
that.params_binm.search = data;
|
||||||
that.activeName = 'mlog';
|
that.activeName = 'mlog';
|
||||||
if( that.apiObj_mlog !==null){
|
if( that.apiObj_mlog !==null){
|
||||||
that.$refs.tableMlog.queryData(that.params);
|
that.$refs.tableMlog.queryData(that.params);
|
||||||
that.$refs.tableHandover.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);
|
that.$refs.tableBinm.queryData(that.params_binm);
|
||||||
}else{
|
}else{
|
||||||
that.apiObj_mlog = that.$API.wpm.mlog.list;
|
that.apiObj_mlog = that.$API.wpm.mlog.list;
|
||||||
|
|
Loading…
Reference in New Issue