feat:禅道149,黑化车间看板变更
This commit is contained in:
parent
3ae9e207f3
commit
14a41a29f0
|
|
@ -6,8 +6,9 @@
|
|||
</el-header>
|
||||
<el-main>
|
||||
<!-- 黑化 -->
|
||||
<el-row style="height: 30%" :gutter="10">
|
||||
<el-col :span="10" style="height: 100%">
|
||||
<el-row style="height: 60%" :gutter="10">
|
||||
<el-col :span="12" style="height: 100%">
|
||||
<el-col style="height: 50%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">
|
||||
|
|
@ -40,22 +41,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">黑化任务进度</div>
|
||||
</div>
|
||||
<div style="height: 2px"></div>
|
||||
<div class="boxmain" id="scrollContainer">
|
||||
<dv-scroll-board :config="configData1" style="width:98%;margin:auto" />
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="height: 0.3%"></div>
|
||||
<!-- 退火 -->
|
||||
<el-row style="height: 30%" :gutter="10">
|
||||
<el-col :span="10" style="height: 100%">
|
||||
<el-col style="height: 50%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">
|
||||
|
|
@ -88,7 +74,56 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14" style="height: 100%">
|
||||
</el-col>
|
||||
<el-col :span="12" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">合格数统计</div>
|
||||
</div>
|
||||
<div style="height: 2px"></div>
|
||||
<div class="boxmain" id="scrollContainer">
|
||||
<div class="boxmain boxmaintop" id="chart3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="height: 0.3%"></div>
|
||||
<!-- 退火 -->
|
||||
<!-- <el-row style="height: 30%" :gutter="10">
|
||||
<el-col :span="12" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">
|
||||
退火设备
|
||||
</div>
|
||||
<div class="boxlabel">
|
||||
<span class="stateIcon bwIcon"></span>
|
||||
<span>保温中</span>
|
||||
<span class="eqNum">{{th.bw}}台</span>
|
||||
</div>
|
||||
<div class="boxlabel">
|
||||
<span class="stateIcon lqIcon"></span>
|
||||
<span>冷却中</span>
|
||||
<span class="eqNum">{{th.lq}}台</span>
|
||||
</div>
|
||||
<div class="boxlabel">
|
||||
<span class="stateIcon wyxIcon"></span>
|
||||
<span>未运行</span>
|
||||
<span class="eqNum">{{th.wyx}}台</span>
|
||||
</div>
|
||||
<div class="boxlabel">
|
||||
<span class="stateIcon gzIcon"></span>
|
||||
<span>故障</span>
|
||||
<span class="eqNum">{{th.gz}}台</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 2px"></div>
|
||||
<div class="boxmain" id="scrollContainer">
|
||||
<dv-scroll-board :config="configData02" style="width:98%;margin:auto" />
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" style="height: 100%">
|
||||
<div class="box">
|
||||
<div class="boxtitle">
|
||||
<div class="boxlabel">退火任务进度</div>
|
||||
|
|
@ -99,7 +134,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<!-- 投产/生产 分析 -->
|
||||
<div style="height: 0.3%"></div>
|
||||
<el-row style="height: 39%" :gutter="10">
|
||||
|
|
@ -191,11 +226,7 @@ export default {
|
|||
backgroundColor: "rgb(1,235,239)",
|
||||
name: "黑化",
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
color: new echarts.graphic.LinearGradient(0,0,0,1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
|
|
@ -216,11 +247,7 @@ export default {
|
|||
backgroundColor: "rgb(250,205,0)",
|
||||
name: "退火",
|
||||
itemStyle: {
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
color: new echarts.graphic.LinearGradient(0,0,0,1,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
|
|
@ -239,11 +266,6 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
// saveAsImage: {}
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: "3%",
|
||||
right: "2%",
|
||||
|
|
@ -394,18 +416,18 @@ export default {
|
|||
waitTime:1000,
|
||||
// columnWidth: [,,50]
|
||||
},
|
||||
configData1:{
|
||||
headerBGC:'#0a3f44',
|
||||
header:['产出名称','规格','型号','开始时间','结束时间','完成进度','产量','状态'],
|
||||
headerHeight:40,
|
||||
data:[]
|
||||
},
|
||||
configData2:{
|
||||
headerBGC:'#0a3f44',
|
||||
header:['产出名称','规格','型号','开始时间','结束时间','完成进度','产量','状态'],
|
||||
headerHeight:40,
|
||||
data:[]
|
||||
},
|
||||
// configData1:{
|
||||
// headerBGC:'#0a3f44',
|
||||
// header:['产出名称','规格','型号','开始时间','结束时间','完成进度','产量','状态'],
|
||||
// headerHeight:40,
|
||||
// data:[]
|
||||
// },
|
||||
// configData2:{
|
||||
// headerBGC:'#0a3f44',
|
||||
// header:['产出名称','规格','型号','开始时间','结束时间','完成进度','产量','状态'],
|
||||
// headerHeight:40,
|
||||
// data:[]
|
||||
// },
|
||||
configData01:{
|
||||
headerBGC:'#0a3f44',
|
||||
header:['设备名称','设备编号','设备状态','生产进度','物料数量','保温剩余时间'],
|
||||
|
|
@ -423,6 +445,8 @@ export default {
|
|||
today: "",
|
||||
end_time:'',
|
||||
start_time:'',
|
||||
end_date:'',
|
||||
start_date:'',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -448,14 +472,10 @@ export default {
|
|||
let end_time = this.$TOOL.dateFormat(new Date(endDate), "yyyy-MM-dd hh:mm:ss");
|
||||
this.start_time = start_time;
|
||||
this.end_time = end_time;
|
||||
this.start_date = daysArr[0];
|
||||
this.end_date = daysArr[6];
|
||||
this.getMgroups();
|
||||
this.$nextTick(() => {
|
||||
//设备数据
|
||||
// this.getEqState1();
|
||||
// this.getEqState2();
|
||||
//任务进度
|
||||
this.getMtask1();
|
||||
this.getMtask2();
|
||||
//投产/生产分析
|
||||
this.getProductLine1();
|
||||
this.getProductLine2();
|
||||
|
|
@ -465,6 +485,7 @@ export default {
|
|||
this.getLeftBottomNum();
|
||||
//工段生产数量
|
||||
this.getMgroupCount();
|
||||
this.getCountOkNok();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -611,75 +632,20 @@ export default {
|
|||
res.forEach((item) => {
|
||||
if(item.name == '黑化'){
|
||||
that.mgroup_hh = item.id;
|
||||
console.log('黑化',item.id);
|
||||
that.getEqState1();
|
||||
}
|
||||
if(item.name == '退火'){
|
||||
that.mgroup_th = item.id;
|
||||
console.log('退火',item.id);
|
||||
that.getEqState2();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
//黑化设备运行状态0
|
||||
getEqState10() {
|
||||
let that = this;
|
||||
that.$API.wpm.ana.equipLastMlog.req({mgroup_name: '黑化'}).then((res) => {
|
||||
console.log('黑化设备运行状态',res);
|
||||
that.hh.bw = res.保温;
|
||||
that.hh.lq = res.冷却;
|
||||
that.hh.wyx = res.未运行;
|
||||
that.hh.gz = res.故障;
|
||||
let processData = [];
|
||||
let now = new Date(res.now).getTime();
|
||||
if(res.rows.length>0){
|
||||
res.rows.forEach((item) => {
|
||||
let arr = [],obj1 = {},obj2 = {},obj3 = {},obj4 = {},obj5 = {};
|
||||
obj1.elType = "primary";
|
||||
obj1.value = item.name;
|
||||
obj2.elType = "primary";
|
||||
obj2.value = item.number;
|
||||
obj3.elType = "elicon";
|
||||
obj3.value = item.mstate;
|
||||
obj4.elType = "progress";
|
||||
let process = 0;
|
||||
let startTime = new Date(item.work_start_time).getTime();
|
||||
let endTime = new Date(item.work_end_time).getTime();
|
||||
let sumTime =0;
|
||||
if(item.reminder_interval_list&&item.reminder_interval_list>0){
|
||||
sumTime = item.reminder_interval_list[0]+item.reminder_interval_list[1];
|
||||
}else{
|
||||
sumTime = endTime - startTime;
|
||||
}
|
||||
if(now>startTime&&now<endTime){
|
||||
process = Math.round((now - startTime)/sumTime*100);
|
||||
}else if(now<startTime){
|
||||
process = 0;
|
||||
}else if(now>endTime){
|
||||
process = 100;
|
||||
}
|
||||
obj4.value = process;
|
||||
obj5.elType = "primary";
|
||||
obj5.value = item.t_count_use;
|
||||
arr.push(obj1);
|
||||
arr.push(obj2);
|
||||
arr.push(obj3);
|
||||
arr.push(obj4);
|
||||
arr.push(obj5);
|
||||
processData.push(arr);
|
||||
});
|
||||
this.processData01 = processData;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//黑化设备运行状态
|
||||
getEqState1() {
|
||||
let that = this;
|
||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:that.mgroup_hh}).then((res) => {
|
||||
console.log('黑化设备运行状态',res);
|
||||
that.hh.bw = res.保温;
|
||||
that.hh.lq = res.冷却;
|
||||
that.hh.wyx = res.未运行;
|
||||
|
|
@ -727,40 +693,10 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
//黑化任务进度
|
||||
getMtask1() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.mgroup__name = that.mgroup_hh;
|
||||
obj.page = 0;
|
||||
that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||
that.configData1.data = [];
|
||||
res.forEach((item) => {
|
||||
let arr = [];
|
||||
arr[0] = item.material_out_.name;
|
||||
arr[1] = item.material_out_.specification;
|
||||
arr[2] = item.material_out_.model;
|
||||
arr[3] = item.start_date;
|
||||
arr[4] = item.end_date;
|
||||
let process = Math.round((item.count_ok / item.count) * 100)+'%';
|
||||
arr[5] = process;
|
||||
arr[6] = item.count_ok;
|
||||
if(item.state==20){
|
||||
arr[7]='<span style="color:rgb(0,163,245);displaydisplay:inline-block;padding:2px 6px;background:rgb(226,241,245);border:1px solid rgb(0,163,245);border-radius:3px">已下达</span>';
|
||||
}else if(item.state==34){
|
||||
arr[7]='<span style="color:rgb(222,60,54);displaydisplay:inline-block;padding:2px 6px;background:rgb(247,231,231);border:1px solid rgb(222,60,54);border-radius:3px">已停止</span>';
|
||||
}else if(item.state==40){
|
||||
arr[7]='<span style="color:rgb(69,176,118);displaydisplay:inline-block;padding:2px 6px;background:rgb(231,247,232);border:1px solid rgb(69,176,118);border-radius:3px">已提交</span>';
|
||||
}
|
||||
that.configData1.data.push(arr);
|
||||
});
|
||||
});
|
||||
},
|
||||
//退火设备运行状态
|
||||
getEqState2() {
|
||||
let that = this;
|
||||
that.$API.wpm.ana.equipLastMlog.req({mgroup:that.mgroup_th}).then((res) => {
|
||||
console.log('退火设备运行状态',res);
|
||||
that.th.bw = res.保温;
|
||||
that.th.lq = res.冷却;
|
||||
that.th.wyx = res.未运行;
|
||||
|
|
@ -808,35 +744,6 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
//退火任务进度
|
||||
getMtask2() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.mgroup__name = '退火';
|
||||
obj.page = 0;
|
||||
that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||
that.configData2.data = [];
|
||||
res.forEach((item) => {
|
||||
let arr = [];
|
||||
arr[0] = item.material_out_.name;
|
||||
arr[1] = item.material_out_.specification;
|
||||
arr[2] = item.material_out_.model;
|
||||
arr[3] = item.start_date;
|
||||
arr[4] = item.end_date;
|
||||
let process = Math.round((item.count_ok / item.count) * 100)+'%';
|
||||
arr[5] = process;
|
||||
arr[6] = item.count_ok;
|
||||
if(item.state==20){
|
||||
arr[7]='<span style="color:rgb(0,163,245);displaydisplay:inline-block;padding:2px 6px;background:rgb(226,241,245);border:1px solid rgb(0,163,245);border-radius:3px">已下达</span>';
|
||||
}else if(item.state==34){
|
||||
arr[7]='<span style="color:rgb(222,60,54);displaydisplay:inline-block;padding:2px 6px;background:rgb(247,231,231);border:1px solid rgb(222,60,54);border-radius:3px">已停止</span>';
|
||||
}else if(item.state==40){
|
||||
arr[7]='<span style="color:rgb(69,176,118);displaydisplay:inline-block;padding:2px 6px;background:rgb(231,247,232);border:1px solid rgb(69,176,118);border-radius:3px">已提交</span>';
|
||||
}
|
||||
that.configData2.data.push(arr);
|
||||
});
|
||||
});
|
||||
},
|
||||
getLeftBottomNum(){
|
||||
let that = this;
|
||||
this.$API.wpm.ana.put_prod.req().then((res) => {
|
||||
|
|
@ -865,7 +772,6 @@ export default {
|
|||
let that = this;
|
||||
that.$API.bi.dataset.exec.req(" gdscs").then((res) => {
|
||||
let arr = res.data2.ds0;
|
||||
console.log('工段生产数量',arr)
|
||||
arr.forEach((item) => {
|
||||
if(item.工段=='退火'){
|
||||
that.kctj.thz = item.生产中数;
|
||||
|
|
@ -877,6 +783,82 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
//合格不合格统计
|
||||
getCountOkNok(){
|
||||
let that = this;
|
||||
let chart3Option = deepCopy(this.basicOption);
|
||||
chart3Option.xAxis.data = that.xAxisData;
|
||||
chart3Option.series[0].name = '合格数';
|
||||
chart3Option.series[1].name = '不合格数';
|
||||
let seriesData1 = [0,0,0,0,0,0,0],seriesData2 = [0,0,0,0,0,0,0];
|
||||
let params = {
|
||||
query: {
|
||||
end_date: that.end_date,
|
||||
start_date: that.start_date,
|
||||
mgroup_name: "黑化",
|
||||
group_bys_date: ", 月, 日",
|
||||
order_bys_date: ", 月, 日",
|
||||
select_cols_date: ",EXTRACT(MONTH FROM mlog.handle_date) AS 月,EXTRACT(DAY FROM mlog.handle_date) AS 日"
|
||||
},
|
||||
};
|
||||
that.$API.bi.dataset.exec.req("lineDay_m2",params).then((res) => {
|
||||
let arr = res.data2.ds0;
|
||||
arr.forEach((item) => {
|
||||
let month = item.月<10?'0'+item.月:item.月;
|
||||
let day = item.日<10?'0'+item.日:item.日;
|
||||
let date = month+'-'+day;
|
||||
let index = that.xAxisData.indexOf(date);
|
||||
seriesData1[index] += item.合格数;
|
||||
seriesData2[index] += item.不合格数;
|
||||
})
|
||||
let params2 = {
|
||||
query: {
|
||||
end_date: that.end_date,
|
||||
start_date: that.start_date,
|
||||
mgroup_name: "退火",
|
||||
group_bys_date: ", 月, 日",
|
||||
order_bys_date: ", 月, 日",
|
||||
select_cols_date: ",EXTRACT(MONTH FROM mlog.handle_date) AS 月,EXTRACT(DAY FROM mlog.handle_date) AS 日"
|
||||
},
|
||||
};
|
||||
that.$API.bi.dataset.exec.req("lineDay_m2",params2).then((res) => {
|
||||
let arr2 = res.data2.ds0;
|
||||
arr2.forEach((item2) => {
|
||||
let month2 = item2.月<10?'0'+item2.月:item2.月;
|
||||
let day2 = item2.日<10?'0'+item2.日:item2.日;
|
||||
let date2 = month2 +'-'+day2;
|
||||
let index2 = that.xAxisData.indexOf(date2);
|
||||
seriesData1[index2] += item2.合格数;
|
||||
seriesData2[index2] += item2.不合格数;
|
||||
})
|
||||
chart3Option.series[0].data = seriesData1;
|
||||
chart3Option.series[1].data = seriesData2;
|
||||
let chart3 = this.setChart("chart3", chart3Option);
|
||||
let index3 = 0;
|
||||
this.chartInterval2 = setInterval(function () {
|
||||
if (index3 < chart3Option.series[0].data.length) {
|
||||
chart3.dispatchAction({
|
||||
type: "downplay",
|
||||
seriesIndex: 0,
|
||||
});
|
||||
chart3.dispatchAction({
|
||||
type: "highlight",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index3,
|
||||
});
|
||||
chart3.dispatchAction({
|
||||
type: "showTip",
|
||||
seriesIndex: 0,
|
||||
dataIndex: index3,
|
||||
});
|
||||
index3++;
|
||||
} else {
|
||||
index3 = 0;
|
||||
}
|
||||
}, 3000);
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -973,6 +955,9 @@ export default {
|
|||
.boxmain.boxmainbottom{
|
||||
height: calc(100% - 120px);
|
||||
}
|
||||
.boxmain.boxmaintop{
|
||||
height: calc(100% - 10px);
|
||||
}
|
||||
.lineDiv {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue