feat: 修改主要报表
This commit is contained in:
parent
e2595bf3c9
commit
a0b1659f10
|
@ -700,29 +700,42 @@ export default {
|
||||||
that.option.xAxis.data = datelist;
|
that.option.xAxis.data = datelist;
|
||||||
that.xAxisDate = datelist;
|
that.xAxisDate = datelist;
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
//获取熟料产量
|
|
||||||
that.productNum();
|
|
||||||
that.waterAirData();
|
|
||||||
that.getMonthData();
|
|
||||||
//获取设备运转率
|
|
||||||
that.eqRate();
|
|
||||||
//余热发电
|
|
||||||
that.generation();
|
|
||||||
//工序电耗
|
|
||||||
that.proceElec();
|
|
||||||
//质量分析
|
|
||||||
that.qualAnalys();
|
|
||||||
//数据采集
|
|
||||||
that.dataCollect();
|
|
||||||
|
|
||||||
that.initDomStyle();
|
that.initDomStyle();
|
||||||
that.initFactory();
|
that.initFactory();
|
||||||
|
this.productNum();
|
||||||
|
this.waterAirData();
|
||||||
|
this.getMonthData();
|
||||||
|
this.eqRate();
|
||||||
|
this.generation();
|
||||||
|
this.proceElec();
|
||||||
|
this.qualAnalys();
|
||||||
|
this.dataCollect();
|
||||||
that.timerTime = setInterval(() => {
|
that.timerTime = setInterval(() => {
|
||||||
that.showTime();
|
that.showTime();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
that.timerOther = setInterval(() => {
|
||||||
|
that.initializeData();
|
||||||
|
}, 180000); // 3分钟更新一次
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
// 清除所有定时器,避免内存泄漏
|
||||||
|
if (this.timerTime) {
|
||||||
|
clearInterval(this.timerTime);}
|
||||||
|
if (this.timerOther) {
|
||||||
|
clearInterval(this.timerOther);}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initializeData() {
|
||||||
|
this.productNum();
|
||||||
|
this.waterAirData();
|
||||||
|
this.getMonthData();
|
||||||
|
this.eqRate();
|
||||||
|
this.generation();
|
||||||
|
this.proceElec();
|
||||||
|
this.qualAnalys();
|
||||||
|
this.dataCollect();
|
||||||
|
},
|
||||||
productNum() {
|
productNum() {
|
||||||
let that = this;
|
let that = this;
|
||||||
// 初始化option1和图表
|
// 初始化option1和图表
|
||||||
|
@ -945,6 +958,7 @@ export default {
|
||||||
return this.$API.mtm.mgroup.list.req({ page: 0, search: "水泥包装" });
|
return this.$API.mtm.mgroup.list.req({ page: 0, search: "水泥包装" });
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
that.out_cement = res[0]?.id; //水泥包装id
|
that.out_cement = res[0]?.id; //水泥包装id
|
||||||
|
|
||||||
let query = {
|
let query = {
|
||||||
page: 0,
|
page: 0,
|
||||||
year_s: that.currentYear,
|
year_s: that.currentYear,
|
||||||
|
@ -952,11 +966,11 @@ export default {
|
||||||
type: "month_s",
|
type: "month_s",
|
||||||
mgroup: that.out_cement,
|
mgroup: that.out_cement,
|
||||||
};
|
};
|
||||||
return that.$API.enm.enstat.req(query);
|
return that.$API.enm.mpointstat.list.req(query);
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
response.forEach((item) => {
|
response.forEach((item) => {
|
||||||
if (item.month_s == that.currentMonth) {
|
if (item.mpoint_name == '出厂水泥') {
|
||||||
that.totalData.out_cement = item.total_production; //出厂水泥
|
that.totalData.out_cement = item.val || 0; //出厂水泥
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -1281,7 +1295,6 @@ export default {
|
||||||
let query2 = generateQueryMpoint("3631880992400515072");
|
let query2 = generateQueryMpoint("3631880992400515072");
|
||||||
return this.$API.enm.mpointstat.list.req(query2);
|
return this.$API.enm.mpointstat.list.req(query2);
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
console.log(response,'query2');
|
|
||||||
let maxId;
|
let maxId;
|
||||||
response.forEach((item) => {
|
response.forEach((item) => {
|
||||||
let ind = item.month - 1;
|
let ind = item.month - 1;
|
||||||
|
@ -2027,26 +2040,6 @@ export default {
|
||||||
return JSON.parse(JSON.stringify(obj));
|
return JSON.parse(JSON.stringify(obj));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
|
||||||
let that = this;
|
|
||||||
this.scene = null;
|
|
||||||
// clearInterval(that.timerTime);
|
|
||||||
// clearInterval(that.timerData);
|
|
||||||
// clearInterval(that.qualityTimer);
|
|
||||||
that.timerTime = null;
|
|
||||||
that.timerData = null;
|
|
||||||
that.qualityTimer = null;
|
|
||||||
},
|
|
||||||
beforeDestoryed() {
|
|
||||||
let that = this;
|
|
||||||
this.scene = null;
|
|
||||||
// clearInterval(that.timerTime);
|
|
||||||
// clearInterval(that.timerData);
|
|
||||||
// clearInterval(that.qualityTimer);
|
|
||||||
that.timerTime = null;
|
|
||||||
that.timerData = null;
|
|
||||||
that.qualityTimer = null;
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>本日</th>
|
||||||
<th>昨日</th>
|
<th>昨日</th>
|
||||||
<th>本月</th>
|
<th>本月</th>
|
||||||
<th>本年</th>
|
<th>本年</th>
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartWrap" v-show="typeRadio == 'day'">
|
<div class="chartWrap" v-show="typeRadio == 'day'">
|
||||||
<div class="chartTitle">小时生产参数统计图</div>
|
<div class="chartTitle">本日生产参数统计图</div>
|
||||||
<scEcharts
|
<scEcharts
|
||||||
height="400px"
|
height="400px"
|
||||||
width="1033px"
|
width="1033px"
|
||||||
|
@ -459,14 +459,13 @@ export default {
|
||||||
let year_d = year,
|
let year_d = year,
|
||||||
month_d = month,
|
month_d = month,
|
||||||
days_d = days;
|
days_d = days;
|
||||||
if (hours < 21) {
|
//8点前,查找昨日数据为前一天数据
|
||||||
//21点前,查找昨日数据为前一天数据
|
|
||||||
let newDate = timeDate - dayTime;
|
let newDate = timeDate - dayTime;
|
||||||
let lastDate = new Date(newDate);
|
let lastDate = new Date(newDate);
|
||||||
year_d = lastDate.getFullYear();
|
year_d = lastDate.getFullYear();
|
||||||
month_d = lastDate.getMonth() + 1;
|
month_d = lastDate.getMonth() + 1;
|
||||||
days_d = lastDate.getDate();
|
days_d = lastDate.getDate();
|
||||||
}
|
|
||||||
//上一小时的计算
|
//上一小时的计算
|
||||||
let hourTime = timeDate - 3600000;
|
let hourTime = timeDate - 3600000;
|
||||||
let hourDate = new Date(hourTime);
|
let hourDate = new Date(hourTime);
|
||||||
|
@ -477,7 +476,6 @@ export default {
|
||||||
this.$API.mtm.mgroup.list
|
this.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: "煤磨" })
|
.req({ page: 0, search: "煤磨" })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("煤磨", res);
|
|
||||||
that.query.mgroup = res[0].id;
|
that.query.mgroup = res[0].id;
|
||||||
//昨日
|
//昨日
|
||||||
let params3 = {};
|
let params3 = {};
|
||||||
|
@ -491,6 +489,11 @@ export default {
|
||||||
if (res3.length > 0) {
|
if (res3.length > 0) {
|
||||||
let data3 = res3[0];
|
let data3 = res3[0];
|
||||||
that.tableDatas[0][3] = data3.total_production;
|
that.tableDatas[0][3] = data3.total_production;
|
||||||
|
if(data3.total_production){
|
||||||
|
that.tableDatas[3][3] = 0;
|
||||||
|
that.tableDatas[4][3] = 0;
|
||||||
|
that.tableDatas[5][3] = 0;
|
||||||
|
}
|
||||||
that.tableDatas[1][3] = data3.production_hour;
|
that.tableDatas[1][3] = data3.production_hour;
|
||||||
that.tableDatas[2][3] = data3.run_hour;
|
that.tableDatas[2][3] = data3.run_hour;
|
||||||
that.tableDatas[3][3] = data3.run_rate;
|
that.tableDatas[3][3] = data3.run_rate;
|
||||||
|
@ -498,22 +501,35 @@ export default {
|
||||||
that.tableDatas[5][3] = data3.elec_consume;
|
that.tableDatas[5][3] = data3.elec_consume;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//上小时
|
//本日
|
||||||
let params4 = {};
|
let params4 = {};
|
||||||
params4.page = 0;
|
params4.page = 0;
|
||||||
params4.year = year_h;
|
params4.year_s = year_h;
|
||||||
params4.month = month_h;
|
params4.month_s = month_h;
|
||||||
params4.day = days_h;
|
params4.day_s = days_h;
|
||||||
params4.hour = hours_h;
|
params4.type = "day_s";
|
||||||
params4.type = "hour_s";
|
|
||||||
params4.mgroup = that.query.mgroup;
|
params4.mgroup = that.query.mgroup;
|
||||||
|
console.log("本日", params4);
|
||||||
that.$API.enm.enstat.req(params4).then((res4) => {
|
that.$API.enm.enstat.req(params4).then((res4) => {
|
||||||
if (res4.length > 0) {
|
if (res4) {
|
||||||
let data4 = res4[0];
|
let data4 = res4[0];
|
||||||
that.tableDatas[0][2] = data4.total_production;
|
that.tableDatas[0][2] = data4.total_production;
|
||||||
|
if (data4.total_production < 1 ){
|
||||||
|
that.tableDatas[0][2] = 0;
|
||||||
|
that.tableDatas[1][2] = 0;
|
||||||
|
that.tableDatas[2][2] = 0;
|
||||||
|
that.tableDatas[3][2] = 0;
|
||||||
|
that.tableDatas[4][2] = 0;
|
||||||
|
that.tableDatas[5][2] = 0;
|
||||||
|
}else{
|
||||||
|
that.tableDatas[1][2] = data4.production_hour;
|
||||||
|
that.tableDatas[2][2] = data4.run_hour;
|
||||||
|
that.tableDatas[3][2] = data4.run_rate;
|
||||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||||
that.tableDatas[5][2] = data4.elec_consume;
|
that.tableDatas[5][2] = data4.elec_consume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
//月目标
|
//月目标
|
||||||
let params5 = {};
|
let params5 = {};
|
||||||
|
|
|
@ -436,7 +436,7 @@ export default {
|
||||||
need_display: 1,
|
need_display: 1,
|
||||||
ordering: "report_sortstr",
|
ordering: "report_sortstr",
|
||||||
material__code__in: "elec,elec_0",
|
material__code__in: "elec,elec_0",
|
||||||
query: "{ id, name, nickname, mgroup_name, unit, report_sortstr }",
|
query: "{ id, name, nickname, mgroup_name, unit, report_sortstr, ep_monitored_name }",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// that.mpointList = that.mockDatas.filter((item) => {
|
// that.mpointList = that.mockDatas.filter((item) => {
|
||||||
|
@ -479,7 +479,7 @@ export default {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] =
|
arr[0] =
|
||||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||||
arr[1] = item.nickname != null ? item.nickname : item.name;
|
arr[1] = item.ep_monitored_name?item.ep_monitored_name:item.nickname?item.nickname:item.name;
|
||||||
arr[2] = item.unit;
|
arr[2] = item.unit;
|
||||||
for (let i = 0; i < 24; i++) {
|
for (let i = 0; i < 24; i++) {
|
||||||
arr[i + 3] = 0;
|
arr[i + 3] = 0;
|
||||||
|
@ -488,10 +488,7 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.mgroupName =
|
obj.mgroupName =
|
||||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||||
obj.nickname =
|
obj.nickname = item.ep_monitored_name?item.ep_monitored_name:item.nickname?item.nickname:item.name;
|
||||||
item.nickname != null && item.nickname != ""
|
|
||||||
? item.nickname
|
|
||||||
: item.name;
|
|
||||||
obj.unit = item.unit;
|
obj.unit = item.unit;
|
||||||
that.tableDatas2.push(obj);
|
that.tableDatas2.push(obj);
|
||||||
that.getData(item.id, index);
|
that.getData(item.id, index);
|
||||||
|
@ -554,7 +551,7 @@ export default {
|
||||||
: item.nickname != null
|
: item.nickname != null
|
||||||
? item.nickname
|
? item.nickname
|
||||||
: item.name;
|
: item.name;
|
||||||
arr[1] = item.nickname != null ? item.nickname : item.name;
|
arr[1] = item.ep_monitored_name?item.ep_monitored_name:item.nickname?item.nickname:item.name;
|
||||||
arr[2] = item.unit;
|
arr[2] = item.unit;
|
||||||
for (let i = 0; i < that.days; i++) {
|
for (let i = 0; i < that.days; i++) {
|
||||||
arr[i + 3] = 0;
|
arr[i + 3] = 0;
|
||||||
|
@ -563,10 +560,7 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.mgroupName =
|
obj.mgroupName =
|
||||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||||
obj.nickname =
|
obj.nickname = item.ep_monitored_name?item.ep_monitored_name:item.nickname?item.nickname:item.name;
|
||||||
item.nickname != null && item.nickname != ""
|
|
||||||
? item.nickname
|
|
||||||
: item.name;
|
|
||||||
obj.unit = item.unit;
|
obj.unit = item.unit;
|
||||||
|
|
||||||
that.tableDatas_day.push(obj);
|
that.tableDatas_day.push(obj);
|
||||||
|
@ -626,7 +620,7 @@ export default {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] =
|
arr[0] =
|
||||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||||
arr[1] = item.nickname != null ? item.nickname : item.name;
|
arr[1] = item.ep_monitored_name?item.ep_monitored_name:item.nickname?item.nickname:item.name;
|
||||||
arr[2] = item.unit;
|
arr[2] = item.unit;
|
||||||
for (let i = 0; i < 12; i++) {
|
for (let i = 0; i < 12; i++) {
|
||||||
arr[i + 3] = 0;
|
arr[i + 3] = 0;
|
||||||
|
@ -635,10 +629,7 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.mgroupName =
|
obj.mgroupName =
|
||||||
item.mgroup_name != null ? item.mgroup_name : item.name;
|
item.mgroup_name != null ? item.mgroup_name : item.name;
|
||||||
obj.nickname =
|
obj.nickname = item.ep_monitored_name?item.ep_monitored_name:item.nickname?item.nickname:item.name;
|
||||||
item.nickname != null && item.nickname != ""
|
|
||||||
? item.nickname
|
|
||||||
: item.name;
|
|
||||||
obj.unit = item.unit;
|
obj.unit = item.unit;
|
||||||
that.tableDatas_month.push(obj);
|
that.tableDatas_month.push(obj);
|
||||||
that.getData_month(item.id, index);
|
that.getData_month(item.id, index);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- 全厂水量统计 -->
|
<!-- 全厂水量统计 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container" id="app-container" style="height: 100%">
|
<div class="app-container" id="app-container" style="height: 50%">
|
||||||
<el-header id="app-header">
|
<el-header id="app-header">
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -202,6 +202,30 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="chartWrap" v-show="query.type==0">
|
||||||
|
<div class="chartTitle">本日生产参数统计图</div>
|
||||||
|
<scEcharts
|
||||||
|
height="400px"
|
||||||
|
width="1500px"
|
||||||
|
:option="optionHour"
|
||||||
|
></scEcharts>
|
||||||
|
</div>
|
||||||
|
<div class="chartWrap" v-show="query.type==1">
|
||||||
|
<div class="chartTitle">本月生产参数统计图</div>
|
||||||
|
<scEcharts
|
||||||
|
height="400px"
|
||||||
|
width="1500px"
|
||||||
|
:option="optionDay"
|
||||||
|
></scEcharts>
|
||||||
|
</div>
|
||||||
|
<div class="chartWrap" v-show="query.type==2">
|
||||||
|
<div class="chartTitle">本年生产参数统计图</div>
|
||||||
|
<scEcharts
|
||||||
|
height="400px"
|
||||||
|
width="1500px"
|
||||||
|
:option="optionMonth"
|
||||||
|
></scEcharts>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-dialog v-model="itemVisible" :title="itemChartTitle" width="1100px">
|
<el-dialog v-model="itemVisible" :title="itemChartTitle" width="1100px">
|
||||||
|
@ -243,6 +267,9 @@ export default {
|
||||||
indexList: [],
|
indexList: [],
|
||||||
mpointList: [],
|
mpointList: [],
|
||||||
tableDatas: [],
|
tableDatas: [],
|
||||||
|
optionHour: {},
|
||||||
|
optionDay: {},
|
||||||
|
optionMonth: {},
|
||||||
options: [
|
options: [
|
||||||
{id:0,name:'日统计'},
|
{id:0,name:'日统计'},
|
||||||
{id:1,name:'月统计'},
|
{id:1,name:'月统计'},
|
||||||
|
@ -467,15 +494,6 @@ export default {
|
||||||
that.dataLoop();
|
that.dataLoop();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getLengthData() {
|
|
||||||
let that = this;
|
|
||||||
let arrs = [];
|
|
||||||
that.mpointList.forEach((item, index) => {
|
|
||||||
if (arrs.indexOf(item.mgroup_name) == -1) {
|
|
||||||
arrs.push(item.mgroup_name);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
dataLoop() {
|
dataLoop() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.tableDatas = [];
|
that.tableDatas = [];
|
||||||
|
@ -531,12 +549,14 @@ export default {
|
||||||
obj.page = 0;
|
obj.page = 0;
|
||||||
this.$API.enm.mpoint.stat.req(obj).then((res) => {
|
this.$API.enm.mpoint.stat.req(obj).then((res) => {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
|
let seriesData = [];
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
let ind = item.hour + 3;
|
let ind = item.hour + 3;
|
||||||
that.tableDatas[index][ind] = item.val;
|
that.tableDatas[index][ind] = item.val;
|
||||||
sum += Number(item.val);
|
sum += Number(item.val);
|
||||||
let keyName = item.hour + "时";
|
let keyName = item.hour + "时";
|
||||||
that.tableDatas2[index][keyName] = item.val;
|
that.tableDatas2[index][keyName] = item.val;
|
||||||
|
seriesData.push({name: item.mpoint_nickname, value: item.val});
|
||||||
});
|
});
|
||||||
sum = sum * 100;
|
sum = sum * 100;
|
||||||
sum = Math.round(sum);
|
sum = Math.round(sum);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>本日</th>
|
||||||
<th>昨日</th>
|
<th>昨日</th>
|
||||||
<th>本月</th>
|
<th>本月</th>
|
||||||
<th>本年</th>
|
<th>本年</th>
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartWrap" v-show="typeRadio == 'day'">
|
<div class="chartWrap" v-show="typeRadio == 'day'">
|
||||||
<div class="chartTitle">小时生产参数统计图</div>
|
<div class="chartTitle">本日生产参数统计图</div>
|
||||||
<scEcharts
|
<scEcharts
|
||||||
height="400px"
|
height="400px"
|
||||||
width="1033px"
|
width="1033px"
|
||||||
|
@ -658,14 +658,13 @@ export default {
|
||||||
let year_d = year,
|
let year_d = year,
|
||||||
month_d = month,
|
month_d = month,
|
||||||
days_d = days;
|
days_d = days;
|
||||||
if (hours < 21) {
|
|
||||||
//21点前,查找昨日数据为前一天数据
|
//8点前,查找昨日数据为前一天数据
|
||||||
let newDate = timeDate - dayTime;
|
let newDate = timeDate - dayTime;
|
||||||
let lastDate = new Date(newDate);
|
let lastDate = new Date(newDate);
|
||||||
year_d = lastDate.getFullYear();
|
year_d = lastDate.getFullYear();
|
||||||
month_d = lastDate.getMonth() + 1;
|
month_d = lastDate.getMonth() + 1;
|
||||||
days_d = lastDate.getDate();
|
days_d = lastDate.getDate();
|
||||||
}
|
|
||||||
//上一小时的计算
|
//上一小时的计算
|
||||||
let hourTime = timeDate - 3600000;
|
let hourTime = timeDate - 3600000;
|
||||||
let hourDate = new Date(hourTime);
|
let hourDate = new Date(hourTime);
|
||||||
|
@ -703,19 +702,29 @@ export default {
|
||||||
that.tableDatas[11][3] = (data3.ammonia_consume*1000/data3.total_production).toFixed(2);
|
that.tableDatas[11][3] = (data3.ammonia_consume*1000/data3.total_production).toFixed(2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//上小时
|
//本日
|
||||||
let params4 = {};
|
let params4 = {};
|
||||||
params4.page = 0;
|
params4.page = 0;
|
||||||
params4.year = year_h;
|
params4.year_s = year_h;
|
||||||
params4.month = month_h;
|
params4.month_s = month_h;
|
||||||
params4.day = days_h;
|
params4.day_s = days_h;
|
||||||
params4.hour = hours_h;
|
params4.type = "day_s";
|
||||||
params4.type = "hour_s";
|
|
||||||
params4.mgroup = that.query.mgroup;
|
params4.mgroup = that.query.mgroup;
|
||||||
that.$API.enm.enstat.req(params4).then((res4) => {
|
that.$API.enm.enstat.req(params4).then((res4) => {
|
||||||
if (res4.length > 0) {
|
if (res4.length > 0) {
|
||||||
let data4 = res4[0];
|
let data4 = res4[0];
|
||||||
that.tableDatas[0][2] = data4.total_production;
|
that.tableDatas[0][2] = data4.total_production;
|
||||||
|
if (data4.total_production < 1){
|
||||||
|
that.tableDatas[4][2] = 0;
|
||||||
|
that.tableDatas[5][2] = 0;
|
||||||
|
that.tableDatas[6][2] = 0;
|
||||||
|
that.tableDatas[7][2] = 0;
|
||||||
|
that.tableDatas[8][2] = 0;
|
||||||
|
}else{
|
||||||
|
that.tableDatas[0][2] = data4.total_production;
|
||||||
|
that.tableDatas[1][2] = data4.production_hour;
|
||||||
|
that.tableDatas[2][2] = data4.run_hour;
|
||||||
|
that.tableDatas[3][2] = data4.run_rate;
|
||||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||||
that.tableDatas[5][2] = data4.celec_consume_unit;
|
that.tableDatas[5][2] = data4.celec_consume_unit;
|
||||||
that.tableDatas[6][2] = data4.coal_consume_unit;
|
that.tableDatas[6][2] = data4.coal_consume_unit;
|
||||||
|
@ -723,7 +732,9 @@ export default {
|
||||||
that.tableDatas[8][2] = data4.elec_consume;
|
that.tableDatas[8][2] = data4.elec_consume;
|
||||||
that.tableDatas[9][2] = data4.production_cost_unit;
|
that.tableDatas[9][2] = data4.production_cost_unit;
|
||||||
that.tableDatas[10][2] = data4.ammonia_consume;
|
that.tableDatas[10][2] = data4.ammonia_consume;
|
||||||
that.tableDatas[11][2] = (data4.ammonia_consume*1000/data4.total_production).toFixed(2);
|
that.tableDatas[11][2] = (data4.ammonia_consume*1000/data4.total_production).toFixed(2);}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let params5 = {};
|
let params5 = {};
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>本日</th>
|
||||||
<th>昨日</th>
|
<th>昨日</th>
|
||||||
<th>本月</th>
|
<th>本月</th>
|
||||||
<th>本年</th>
|
<th>本年</th>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chartWrap" v-show="typeRadio == 'day'">
|
<div class="chartWrap" v-show="typeRadio == 'day'">
|
||||||
<div class="chartTitle">小时生产参数统计图</div>
|
<div class="chartTitle">本日生产参数统计图</div>
|
||||||
<scEcharts
|
<scEcharts
|
||||||
height="400px"
|
height="400px"
|
||||||
width="1033px"
|
width="1033px"
|
||||||
|
@ -601,14 +601,14 @@ export default {
|
||||||
let year_d = year,
|
let year_d = year,
|
||||||
month_d = month,
|
month_d = month,
|
||||||
days_d = days;
|
days_d = days;
|
||||||
if (hours < 21) {
|
|
||||||
//21点前,查找昨日数据为前一天数据
|
//8点前,查找昨日数据为前一天数据
|
||||||
let newDate = timeDate - dayTime;
|
let newDate = timeDate - dayTime;
|
||||||
let lastDate = new Date(newDate);
|
let lastDate = new Date(newDate);
|
||||||
year_d = lastDate.getFullYear();
|
year_d = lastDate.getFullYear();
|
||||||
month_d = lastDate.getMonth() + 1;
|
month_d = lastDate.getMonth() + 1;
|
||||||
days_d = lastDate.getDate();
|
days_d = lastDate.getDate();
|
||||||
}
|
|
||||||
//上一小时的计算
|
//上一小时的计算
|
||||||
let hourTime = timeDate - 3600000;
|
let hourTime = timeDate - 3600000;
|
||||||
let hourDate = new Date(hourTime);
|
let hourDate = new Date(hourTime);
|
||||||
|
@ -633,32 +633,50 @@ export default {
|
||||||
if (res3.length > 0) {
|
if (res3.length > 0) {
|
||||||
let data3 = res3[0];
|
let data3 = res3[0];
|
||||||
that.tableDatas[0][3] = data3.total_production;
|
that.tableDatas[0][3] = data3.total_production;
|
||||||
|
if (data3.total_production == 0){
|
||||||
|
that.tableDatas[4][3] = 0;
|
||||||
|
that.tableDatas[5][3] = 0;
|
||||||
|
that.tableDatas[6][3] = 0;
|
||||||
|
that.tableDatas[7][3] = 0;
|
||||||
|
}else{
|
||||||
that.tableDatas[1][3] = data3.production_hour;
|
that.tableDatas[1][3] = data3.production_hour;
|
||||||
that.tableDatas[2][3] = data3.run_hour;
|
that.tableDatas[2][3] = data3.run_hour;
|
||||||
that.tableDatas[3][3] = data3.run_rate;
|
that.tableDatas[3][3] = data3.run_rate;
|
||||||
that.tableDatas[4][3] = data3.elec_consume_unit;
|
that.tableDatas[4][3] = data3.elec_consume_unit;
|
||||||
that.tableDatas[5][3] = data3.cen_consume_unit;
|
that.tableDatas[5][3] = data3.cen_consume_unit;
|
||||||
that.tableDatas[6][3] = data3.elec_consume;
|
that.tableDatas[6][3] = data3.elec_consume;
|
||||||
that.tableDatas[7][3] = data3.production_cost_unit;
|
that.tableDatas[7][3] = data3.production_cost_unit;}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//上小时
|
//本日
|
||||||
let params4 = {};
|
let params4 = {};
|
||||||
params4.page = 0;
|
params4.page = 0;
|
||||||
params4.year = year_h;
|
params4.year_s = year_h;
|
||||||
params4.month = month_h;
|
params4.month_s = month_h;
|
||||||
params4.day = days_h;
|
params4.day_s = days_h;
|
||||||
params4.hour = hours_h;
|
params4.type = "day_s";
|
||||||
params4.type = "hour_s";
|
|
||||||
params4.mgroup = that.query.mgroup;
|
params4.mgroup = that.query.mgroup;
|
||||||
that.$API.enm.enstat.req(params4).then((res4) => {
|
that.$API.enm.enstat.req(params4).then((res4) => {
|
||||||
if (res4.length > 0) {
|
if (res4.length > 0) {
|
||||||
let data4 = res4[0];
|
let data4 = res4[0];
|
||||||
that.tableDatas[0][2] = data4.total_production;
|
that.tableDatas[0][2] = data4.total_production;
|
||||||
|
if (data4.total_production < 1){
|
||||||
|
that.tableDatas[1][2] = 0;
|
||||||
|
that.tableDatas[2][2] = 0;
|
||||||
|
that.tableDatas[3][2] = 0;
|
||||||
|
that.tableDatas[4][2] = 0;
|
||||||
|
that.tableDatas[5][2] = 0;
|
||||||
|
that.tableDatas[6][2] = 0;
|
||||||
|
that.tableDatas[7][2] = 0;
|
||||||
|
}else{
|
||||||
|
that.tableDatas[1][2] = data4.production_hour;
|
||||||
|
that.tableDatas[2][2] = data4.run_hour;
|
||||||
|
that.tableDatas[3][2] = data4.run_rate;
|
||||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||||
that.tableDatas[5][2] = data4.cen_consume_unit;
|
that.tableDatas[5][2] = data4.cen_consume_unit;
|
||||||
that.tableDatas[6][2] = data4.elec_consume;
|
that.tableDatas[6][2] = data4.elec_consume;
|
||||||
that.tableDatas[7][2] = data4.production_cost_unit;
|
that.tableDatas[7][2] = data4.production_cost_unit;}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//月目标
|
//月目标
|
||||||
|
@ -732,16 +750,6 @@ export default {
|
||||||
that.tableDatas[1][5],
|
that.tableDatas[1][5],
|
||||||
that.tableDatas[1][8]
|
that.tableDatas[1][8]
|
||||||
);
|
);
|
||||||
// that.tableDatas[2][5] = data1.run_hour;
|
|
||||||
// that.tableDatas[2][9] = precen(
|
|
||||||
// that.tableDatas[2][5],
|
|
||||||
// that.tableDatas[2][8]
|
|
||||||
// );
|
|
||||||
// that.tableDatas[3][5] = data1.run_rate;
|
|
||||||
// that.tableDatas[3][9] = precen(
|
|
||||||
// that.tableDatas[3][5],
|
|
||||||
// that.tableDatas[3][8]
|
|
||||||
// );
|
|
||||||
that.tableDatas[4][5] = data1.elec_consume_unit;
|
that.tableDatas[4][5] = data1.elec_consume_unit;
|
||||||
that.tableDatas[4][9] = precen(
|
that.tableDatas[4][9] = precen(
|
||||||
that.tableDatas[4][5]-that.tableDatas[4][8],
|
that.tableDatas[4][5]-that.tableDatas[4][8],
|
||||||
|
|
|
@ -25,24 +25,20 @@
|
||||||
>
|
>
|
||||||
<thead class="myTableHead">
|
<thead class="myTableHead">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="9">水泥包装工序生产报告</th>
|
<th colspan="5">水泥包装工序生产报告</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>昨日</th>
|
<th>昨日</th>
|
||||||
<th>本月</th>
|
<th>本月</th>
|
||||||
<th>本年</th>
|
<th>本年</th>
|
||||||
<th>月目标值</th>
|
|
||||||
<th>月完成度</th>
|
|
||||||
<th>年目标值</th>
|
|
||||||
<th>年完成度</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(item, index) in tableDatas" :key="item">
|
<tr v-for="(item, index) in tableDatas" :key="item">
|
||||||
<td rowspan="8" v-if="index == 0" class="numCell">{{ item[0] }}</td>
|
<td rowspan="10" v-if="index == 0" class="numCell">{{ item[0] }}</td>
|
||||||
<td v-else-if="index==8" class="numCell">{{ item[0] }}</td>
|
<td v-else-if="index==10" class="numCell">{{ item[0] }}</td>
|
||||||
<td v-else-if="index==9" class="numCell"
|
<td v-else-if="index==11" class="numCell"
|
||||||
rowspan="2"
|
rowspan="2"
|
||||||
>{{ item[0] }}</td>
|
>{{ item[0] }}</td>
|
||||||
<td class="numCell">{{ item[1] }}</td>
|
<td class="numCell">{{ item[1] }}</td>
|
||||||
|
@ -64,10 +60,10 @@
|
||||||
>
|
>
|
||||||
{{ item[4] }}
|
{{ item[4] }}
|
||||||
</td>
|
</td>
|
||||||
<td class="numCell">{{ item[5] }}</td>
|
<!-- <td class="numCell">{{ item[5] }}</td>
|
||||||
<td class="numCell">{{ item[6] }}</td>
|
<td class="numCell">{{ item[6] }}</td>
|
||||||
<td class="numCell">{{ item[7] }}</td>
|
<td class="numCell">{{ item[7] }}</td>
|
||||||
<td class="numCell">{{ item[8] }}</td>
|
<td class="numCell">{{ item[8] }}</td> -->
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -331,17 +327,19 @@ export default {
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
},
|
},
|
||||||
tableDatas: [
|
tableDatas: [
|
||||||
["出厂水泥", "P.O42.5R 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "P.O42.5R 散装(t)", 0, 0, 0],
|
||||||
["出厂水泥", "P.O42.5R 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "P.O42.5R 袋装(t)", 0, 0, 0],
|
||||||
["出厂水泥", "P.O42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "P.O42.5 袋装(t)", 0, 0, 0],
|
||||||
["出厂水泥", "P.O42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "P.O42.5 散装(t)", 0, 0, 0],
|
||||||
["出厂水泥", "复合硅酸盐水泥;42.5R;袋装水泥(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "复合硅酸盐水泥;42.5R;袋装水泥(t)", 0, 0, 0],
|
||||||
["出厂水泥", "复合硅酸盐水泥;42.5R;散装水泥(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "复合硅酸盐水泥;42.5R;散装水泥(t)", 0, 0, 0],
|
||||||
["出厂水泥", "普通硅酸盐水泥;52.5;散装水泥(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂水泥", "普通硅酸盐水泥;52.5;散装水泥(t)", 0, 0, 0],
|
||||||
|
["出厂水泥", "散装水泥(t)", 0, 0, 0],
|
||||||
|
["出厂水泥", "袋装水泥(t)", 0, 0, 0],
|
||||||
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
||||||
["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"],
|
["出厂熟料", "熟料(t)", 0, 0, 0],
|
||||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0],
|
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0],
|
||||||
["能耗", "总电耗(KW·h)", 0, 0, 0, "/", "/", "/","/"],
|
["能耗", "总电耗(KW·h)", 0, 0, 0],
|
||||||
|
|
||||||
],
|
],
|
||||||
tableName: "生产报告",
|
tableName: "生产报告",
|
||||||
|
@ -567,13 +565,18 @@ export default {
|
||||||
that.tableDatas[5][4] = item.val;
|
that.tableDatas[5][4] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
that.tableDatas[6][4] = item.val;
|
that.tableDatas[6][4] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂水泥") {
|
}else if (item.mpoint_name == "散装水泥总和"){
|
||||||
that.tableDatas[7][4] = item.val;
|
that.tableDatas[7][4] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "袋装水泥总和") {
|
||||||
that.tableDatas[8][4] = item.val;
|
that.tableDatas[8][4] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}
|
||||||
that.tableDatas[9][4] = item.elec_consume_unit;
|
else if (item.mpoint_name == "出厂水泥") {
|
||||||
|
that.tableDatas[9][4] = item.val;
|
||||||
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[10][4] = item.val;
|
that.tableDatas[10][4] = item.val;
|
||||||
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
|
that.tableDatas[11][4] = item.elec_consume_unit;
|
||||||
|
that.tableDatas[12][4] = item.val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
@ -602,63 +605,23 @@ export default {
|
||||||
that.tableDatas[5][3] = item.val;
|
that.tableDatas[5][3] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
that.tableDatas[6][3] = item.val;
|
that.tableDatas[6][3] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂水泥") {
|
}else if (item.mpoint_name == "散装水泥总和"){
|
||||||
that.tableDatas[7][3] = item.val;
|
that.tableDatas[7][3] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "袋装水泥总和") {
|
||||||
that.tableDatas[8][3] = item.val;
|
that.tableDatas[8][3] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}
|
||||||
that.tableDatas[9][3] = item.elec_consume_unit;
|
else if (item.mpoint_name == "出厂水泥") {
|
||||||
|
that.tableDatas[9][3] = item.val;
|
||||||
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[10][3] = item.val;
|
that.tableDatas[10][3] = item.val;
|
||||||
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
|
that.tableDatas[11][3] = item.elec_consume_unit;
|
||||||
|
that.tableDatas[12][3] = item.val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
//月年目标
|
|
||||||
let params5 = {};
|
|
||||||
params5.page = 0;
|
|
||||||
params5.mgroup = that.query.mgroup;
|
|
||||||
this.$API.mtm.goal.list
|
|
||||||
.req(params5)
|
|
||||||
.then((res5) => {
|
|
||||||
if (res5.length > 0) {
|
|
||||||
let data5 = res5;
|
|
||||||
data5.forEach((item5) => {
|
|
||||||
let str = "goal_val_" + that.month;
|
|
||||||
if (item5.goal_cate_name == "总产量(t)") {
|
|
||||||
that.tableDatas[7][5] = item5[str];
|
|
||||||
that.tableDatas[7][7] = item5.goal_val;
|
|
||||||
that.tableDatas[7][8] = precen(
|
|
||||||
that.tableDatas[7][4],
|
|
||||||
that.tableDatas[7][7]
|
|
||||||
);//计算年完成度
|
|
||||||
that.tableDatas[7][6] = precen(
|
|
||||||
that.tableDatas[7][3],
|
|
||||||
that.tableDatas[7][5]
|
|
||||||
);// 计算月完成度
|
|
||||||
|
|
||||||
} else if (
|
|
||||||
item5.goal_cate_name ==
|
|
||||||
"单位产品分布电耗(KW·h/t)"
|
|
||||||
) {
|
|
||||||
that.tableDatas[9][5] = item5[str];
|
|
||||||
that.tableDatas[9][7] = item5.goal_val;
|
|
||||||
//计算月目标值
|
|
||||||
that.tableDatas[9][8] = precen(
|
|
||||||
that.tableDatas[9][4],
|
|
||||||
that.tableDatas[9][7]
|
|
||||||
);//计算年完成度
|
|
||||||
that.tableDatas[9][6] = precen(
|
|
||||||
that.tableDatas[9][3]-that.tableDatas[9][5],
|
|
||||||
that.tableDatas[9][5]
|
|
||||||
);// 计算月完成度
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
});
|
|
||||||
//昨日
|
//昨日
|
||||||
let params3 = {};
|
let params3 = {};
|
||||||
params3.page = 0;
|
params3.page = 0;
|
||||||
|
@ -684,64 +647,30 @@ export default {
|
||||||
that.tableDatas[5][2] = item.val;
|
that.tableDatas[5][2] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
that.tableDatas[6][2] = item.val;
|
that.tableDatas[6][2] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂水泥") {
|
}else if (item.mpoint_name == "散装水泥总和"){
|
||||||
that.tableDatas[7][2] = item.val;
|
that.tableDatas[7][2] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "袋装水泥总和") {
|
||||||
that.tableDatas[8][2] = item.val;
|
that.tableDatas[8][2] = item.val;
|
||||||
}else if (item.mpoint_name == "包装进线") {
|
}
|
||||||
that.tableDatas[9][2] = item.elec_consume_unit;
|
else if (item.mpoint_name == "出厂水泥") {
|
||||||
|
that.tableDatas[9][2] = item.val;
|
||||||
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[10][2] = item.val;
|
that.tableDatas[10][2] = item.val;
|
||||||
|
}else if (item.mpoint_name == "包装进线") {
|
||||||
|
that.tableDatas[11][2] = item.elec_consume_unit;
|
||||||
|
that.tableDatas[12][2] = item.val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// this.$API.mtm.goal.list
|
|
||||||
// .then((res) => {
|
}
|
||||||
// //月年完成度
|
)
|
||||||
// let params1 = {};
|
}
|
||||||
// params1.page = 0;
|
);
|
||||||
// params1.year_s = year;
|
|
||||||
// params1.type = "year_s";
|
|
||||||
// params1.mgroup = this.query.mgroup;
|
|
||||||
// this.$API.enm.enstat.req(params1).then((res1) => {
|
|
||||||
// if (res1.length > 0) {
|
|
||||||
// let data1 = res1[0];
|
|
||||||
// that.tableDatas[0][4] = data1.total_production;
|
|
||||||
// that.tableDatas[0][8] = precen(
|
|
||||||
// that.tableDatas[0][4],
|
|
||||||
// that.tableDatas[0][7]
|
|
||||||
// );
|
|
||||||
// that.tableDatas[1][4] = data1.elec_consume_unit;
|
|
||||||
// that.tableDatas[1][8] = precen(
|
|
||||||
// that.tableDatas[1][4],
|
|
||||||
// that.tableDatas[1][7]
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// //月
|
|
||||||
// let params2 = {};
|
|
||||||
// params2.page = 0;
|
|
||||||
// params2.year_s = year;
|
|
||||||
// params2.month_s = month;
|
|
||||||
// params2.type = "month_s";
|
|
||||||
// params2.mgroup = this.query.mgroup;
|
|
||||||
// this.$API.enm.enstat.req(params2).then((res2) => {
|
|
||||||
// if (res2.length > 0) {
|
|
||||||
// let data2 = res2[0];
|
|
||||||
// that.tableDatas[0][3] = data2.total_production;
|
|
||||||
// that.tableDatas[0][6] = precen(
|
|
||||||
// that.tableDatas[0][3],
|
|
||||||
// that.tableDatas[0][5]
|
|
||||||
// );
|
|
||||||
// that.tableDatas[1][3] = data2.elec_consume_unit;
|
|
||||||
// that.tableDatas[1][6] = precen(
|
|
||||||
// that.tableDatas[1][3],
|
|
||||||
// that.tableDatas[1][5]
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
that.getDayData(year, month);
|
that.getDayData(year, month);
|
||||||
that.getMonthData(year);
|
that.getMonthData(year);
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>本日</th>
|
||||||
<th>昨日</th>
|
<th>昨日</th>
|
||||||
<th>本月</th>
|
<th>本月</th>
|
||||||
<th>本年</th>
|
<th>本年</th>
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- <div id="main" style="width:1200px;height:600px;"></div> -->
|
<!-- <div id="main" style="width:1200px;height:600px;"></div> -->
|
||||||
<div class="chartWrap" v-show="typeRadio == 'day'">
|
<div class="chartWrap" v-show="typeRadio == 'day'">
|
||||||
<div class="chartTitle">小时生产参数统计图</div>
|
<div class="chartTitle">本日生产参数统计图</div>
|
||||||
<scEcharts
|
<scEcharts
|
||||||
height="400px"
|
height="400px"
|
||||||
width="1033px"
|
width="1033px"
|
||||||
|
@ -404,9 +404,9 @@ export default {
|
||||||
},
|
},
|
||||||
tableDatas: [
|
tableDatas: [
|
||||||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["产量", "台时产量(t/h)", "/", 0, 0, 0, 0, 0, 0, 0],
|
["产量", "台时产量(t/h)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["运转时间", "运转时间(h)", "/", 0, 0, "/", 0, 0, "/", "/"],
|
["运转时间", "运转时间(h)", 0, 0, 0, "/", 0, 0, "/", "/"],
|
||||||
["运转时间", "运转率(%)", "/", 0, 0, "/", 0, 0, "/", "/"],
|
["运转时间", "运转率(%)", 0, 0, 0, "/", 0, 0, "/", "/"],
|
||||||
["能耗", "生料分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["能耗", "生料分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, "/", "/", "/","/"],
|
["能耗", "总电耗(KW·h)", 0, 0, 0, 0, "/", "/", "/","/"],
|
||||||
["成本", "生料成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["成本", "生料成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
@ -796,14 +796,14 @@ export default {
|
||||||
let year_d = year,
|
let year_d = year,
|
||||||
month_d = month,
|
month_d = month,
|
||||||
days_d = days;
|
days_d = days;
|
||||||
if (hours < 21) {
|
|
||||||
//21点前,查找昨日数据为前一天数据
|
//8点前,查找昨日数据为前一天数据
|
||||||
let newDate = timeDate - dayTime;
|
let newDate = timeDate - dayTime;
|
||||||
let lastDate = new Date(newDate);
|
let lastDate = new Date(newDate);
|
||||||
year_d = lastDate.getFullYear();
|
year_d = lastDate.getFullYear();
|
||||||
month_d = lastDate.getMonth() + 1;
|
month_d = lastDate.getMonth() + 1;
|
||||||
days_d = lastDate.getDate();
|
days_d = lastDate.getDate();
|
||||||
}
|
|
||||||
//上一小时的计算
|
//上一小时的计算
|
||||||
let hourTime = timeDate - 3600000;
|
let hourTime = timeDate - 3600000;
|
||||||
let hourDate = new Date(hourTime);
|
let hourDate = new Date(hourTime);
|
||||||
|
@ -814,7 +814,6 @@ export default {
|
||||||
this.$API.mtm.mgroup.list
|
this.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: "原料磨" })
|
.req({ page: 0, search: "原料磨" })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("原料磨", res);
|
|
||||||
that.query.mgroup = res[0].id;
|
that.query.mgroup = res[0].id;
|
||||||
//昨日
|
//昨日
|
||||||
let params3 = {};
|
let params3 = {};
|
||||||
|
@ -828,30 +827,42 @@ export default {
|
||||||
if (res3.length > 0) {
|
if (res3.length > 0) {
|
||||||
let data3 = res3[0];
|
let data3 = res3[0];
|
||||||
that.tableDatas[0][3] = data3.total_production;
|
that.tableDatas[0][3] = data3.total_production;
|
||||||
|
if (data3.total_production == 0) {
|
||||||
|
that.tableDatas[4][3] = 0;
|
||||||
|
that.tableDatas[5][3] = 0;
|
||||||
|
that.tableDatas[6][3] = 0;
|
||||||
|
}else {
|
||||||
that.tableDatas[1][3] = data3.production_hour;
|
that.tableDatas[1][3] = data3.production_hour;
|
||||||
that.tableDatas[2][3] = data3.run_hour;
|
that.tableDatas[2][3] = data3.run_hour;
|
||||||
that.tableDatas[3][3] = data3.run_rate;
|
that.tableDatas[3][3] = data3.run_rate;
|
||||||
that.tableDatas[4][3] = data3.elec_consume_unit;
|
that.tableDatas[4][3] = data3.elec_consume_unit;
|
||||||
that.tableDatas[5][3] = data3.elec_consume;
|
that.tableDatas[5][3] = data3.elec_consume;
|
||||||
that.tableDatas[6][3] = data3.production_cost_unit;
|
that.tableDatas[6][3] = data3.production_cost_unit;}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//上小时
|
//本日
|
||||||
let params4 = {};
|
let params4 = {};
|
||||||
params4.page = 0;
|
params4.page = 0;
|
||||||
params4.year = year_h;
|
params4.year_s = year_h;
|
||||||
params4.month = month_h;
|
params4.month_s = month_h;
|
||||||
params4.day = days_h;
|
params4.day_s = days_h;
|
||||||
params4.hour = hours_h;
|
params4.type = "day_s";
|
||||||
params4.type = "hour_s";
|
|
||||||
params4.mgroup = this.query.mgroup;
|
params4.mgroup = this.query.mgroup;
|
||||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||||
if (res4.length > 0) {
|
if (res4.length > 0) {
|
||||||
let data4 = res4[0];
|
let data4 = res4[0];
|
||||||
that.tableDatas[0][2] = data4.total_production < 1 ? 0 : data4.total_production;
|
that.tableDatas[0][2] = data4.total_production < 1 ? 0 : data4.total_production;
|
||||||
|
if (data4.total_production == 0) {
|
||||||
|
that.tableDatas[4][2] = 0;
|
||||||
|
that.tableDatas[5][2] = 0;
|
||||||
|
that.tableDatas[6][2] = 0;
|
||||||
|
}else {
|
||||||
|
that.tableDatas[1][2] = data4.production_hour;
|
||||||
|
that.tableDatas[2][2] = data4.run_hour;
|
||||||
|
that.tableDatas[3][2] = data4.run_rate;
|
||||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||||
that.tableDatas[5][2] = data4.elec_consume;
|
that.tableDatas[5][2] = data4.elec_consume;
|
||||||
that.tableDatas[6][2] = data4.production_cost_unit;
|
that.tableDatas[6][2] = data4.production_cost_unit;}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//月目标
|
//月目标
|
||||||
|
@ -866,7 +877,6 @@ export default {
|
||||||
data5.forEach((item5) => {
|
data5.forEach((item5) => {
|
||||||
let str = "goal_val_" + that.month;
|
let str = "goal_val_" + that.month;
|
||||||
debugger;
|
debugger;
|
||||||
console.log(str, item5[str]);
|
|
||||||
|
|
||||||
if (item5.goal_cate_name == "总产量(t)") {
|
if (item5.goal_cate_name == "总产量(t)") {
|
||||||
that.tableDatas[0][6] = item5[str];
|
that.tableDatas[0][6] = item5[str];
|
||||||
|
@ -1017,7 +1027,6 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(val);
|
|
||||||
if (val !== null) {
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
|
@ -1057,7 +1066,6 @@ export default {
|
||||||
seriesData2 = [],
|
seriesData2 = [],
|
||||||
seriesData3 = [],
|
seriesData3 = [],
|
||||||
seriesData4 = [];
|
seriesData4 = [];
|
||||||
console.log("获取小时数据", response);
|
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.hour;
|
let ind = item.hour;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
>
|
>
|
||||||
<thead class="myTableHead">
|
<thead class="myTableHead">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="9">电石渣工序生产报告</th>
|
<th colspan="9">电石渣工段生产报告</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<sc-dialog v-model="chartShow" draggable title="电石渣工序">
|
<sc-dialog v-model="chartShow" draggable title="电石渣工段">
|
||||||
<div class="searchHead" v-if="type == 'hours'">
|
<div class="searchHead" v-if="type == 'hours'">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.start_time"
|
v-model="query.start_time"
|
||||||
|
@ -396,7 +396,7 @@ export default {
|
||||||
mgroup: "3346491835287007232",
|
mgroup: "3346491835287007232",
|
||||||
},
|
},
|
||||||
tableDatas: [
|
tableDatas: [
|
||||||
["电石干粉产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["能耗", "总电耗(KW·h)", 0, 0, 0, "/", "/", "/", "/", "/"],
|
["能耗", "总电耗(KW·h)", 0, 0, 0, "/", "/", "/", "/", "/"],
|
||||||
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
@ -408,7 +408,7 @@ export default {
|
||||||
tableName: "生产报告",
|
tableName: "生产报告",
|
||||||
modelValue: true,
|
modelValue: true,
|
||||||
type: "hour_s",
|
type: "hour_s",
|
||||||
title: "电石渣工序",
|
title: "电石渣工段",
|
||||||
showClose: true,
|
showClose: true,
|
||||||
echartType: "line",
|
echartType: "line",
|
||||||
asynDialog: false,
|
asynDialog: false,
|
||||||
|
|
Loading…
Reference in New Issue