fix: 水泥磨
This commit is contained in:
parent
11491e1394
commit
7f135ed7e1
|
@ -171,6 +171,14 @@ export default {
|
|||
}
|
||||
return classInfo;
|
||||
},
|
||||
precen(a, b) {
|
||||
if (b !== 0 && b !== null && a !== null) {
|
||||
let precen = (a / b)* 100;
|
||||
return precen.toFixed(2) + "%";
|
||||
} else {
|
||||
return "/";
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
let that = this;
|
||||
let query0 = {};
|
||||
|
@ -255,11 +263,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate = 0;
|
||||
if (
|
||||
lastDiff == "/" &&
|
||||
lastDiff !== "/" &&
|
||||
lastNum !== "/" &&
|
||||
lastNum !== 0
|
||||
) {
|
||||
lastRate = (lastDiff / lastNum) * 100;
|
||||
lastRate = this.precen(lastDiff, lastNum);
|
||||
} else {
|
||||
lastRate = "/";
|
||||
}
|
||||
|
|
|
@ -136,11 +136,11 @@ export default {
|
|||
params.year = that.query.year_s;
|
||||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
let data = [];
|
||||
if (res.length > 0) {
|
||||
data = res[0];
|
||||
}
|
||||
that.getData(data);
|
||||
// let data = [];
|
||||
// if (res.length > 0) {
|
||||
// this.data = res;
|
||||
// }
|
||||
that.getData(res);
|
||||
});
|
||||
},
|
||||
getData(goalData) {
|
||||
|
@ -215,46 +215,81 @@ export default {
|
|||
? item.入窑生料_Fe2O3_rate_pass
|
||||
: "/";
|
||||
arr[8] =
|
||||
item.入窑生料_细度_rate_pass != null
|
||||
? item.入窑生料_细度_rate_pass
|
||||
item.出磨煤粉_细度_rate_pass != null
|
||||
? item.出磨煤粉_细度_rate_pass
|
||||
: "/";
|
||||
arr[9] =
|
||||
item.入窑生料_水分_rate_pass != null
|
||||
? item.入窑生料_水分_rate_pass
|
||||
item.出磨煤粉_水分_rate_pass != null
|
||||
? item.出磨煤粉_水分_rate_pass
|
||||
: "/";
|
||||
arr[10] =
|
||||
item.熟料_立升重_rate_pass != null
|
||||
? item.熟料_立升重_rate_pass
|
||||
item.出窑熟料_立升重_rate_pass != null
|
||||
? item.出窑熟料_立升重_rate_pass
|
||||
: "/";
|
||||
arr[11] =
|
||||
item.熟料_fCaO_rate_pass != null
|
||||
? item.熟料_fCaO_rate_pass
|
||||
item.出窑熟料_fCaO_rate_pass != null
|
||||
? item.出窑熟料_fCaO_rate_pass
|
||||
: "/";
|
||||
|
||||
//煤耗
|
||||
arr[12] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[5] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
arr[6] = arr[4] - item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||
arr[12] = item.coal_consume_unit; //当期值(KW·h/t)
|
||||
let keyValue = "goal_val_" + n;
|
||||
if (goalData.length > 0){
|
||||
goalData.forEach((item) => {
|
||||
if (item.id == "3638341891940192256") {
|
||||
arr[13] = item[keyValue]; //目标值(KW·h/t)//需要接口获取
|
||||
}else if (item.id == "3637651365016526848"){
|
||||
arr[25] = item[keyValue]; //目标值(KW·h/t)//需要接口获取
|
||||
}
|
||||
});
|
||||
};
|
||||
let dq = 0
|
||||
if (arr[13] !== null && arr[13] !== undefined){
|
||||
dq = arr[12] - arr[13]; //当期与目标差值(KW·h/t)
|
||||
}else{
|
||||
dq == "/"
|
||||
};
|
||||
arr[14] = dq; //当期与目标差值
|
||||
let ind_pre = 0,
|
||||
huanbi = 0;
|
||||
if (item.month_s == 1) {
|
||||
ind_pre = 12;
|
||||
huanbi = wrapArr0[ind_pre]
|
||||
? wrapArr0[ind_pre].elec_consume_unit
|
||||
? wrapArr0[ind_pre].coal_consume_unit
|
||||
: "/";
|
||||
} else {
|
||||
ind_pre = ind - 1;
|
||||
huanbi = wrapArr[ind_pre]
|
||||
? wrapArr[ind_pre].elec_consume_unit
|
||||
? wrapArr[ind_pre].elec_consume_unit
|
||||
? wrapArr[ind_pre].coal_consume_unit
|
||||
? wrapArr[ind_pre].coal_consume_unit
|
||||
: "/"
|
||||
: "/";
|
||||
}
|
||||
arr[15] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
arr[16] = item.celec_consume_unit; //当期与环期差值(KW·h/t)
|
||||
arr[17] = item.celec_consume_unit; //环比增长率(%)
|
||||
arr[18] = item.celec_consume_unit; //同比增长率(%)
|
||||
if(huanbi !=="/"){
|
||||
arr[16] = arr[12] - huanbi; //当期与环期差值(KW·h/t)
|
||||
}else{
|
||||
arr[16] = "/"
|
||||
};
|
||||
if (arr[15] !== "/"&& arr[15]!== 0 && arr[16]!=="/") {
|
||||
arr[17] = (arr[16] / arr[15]) * 100; //环比增长率(%)
|
||||
} else{
|
||||
arr[17] = "/"
|
||||
};
|
||||
let sameRate = 0;
|
||||
if (
|
||||
wrapArr0[ind] &&
|
||||
wrapArr0[ind].coal_consume_unit
|
||||
) {
|
||||
sameRate =
|
||||
((arrs[1] -
|
||||
wrapArr0[ind].coal_consume_unit) /
|
||||
wrapArr0[ind].coal_consume_unit) *
|
||||
100;
|
||||
} else {
|
||||
sameRate = "/";
|
||||
}
|
||||
arr[18] = sameRate; ///同比增长率(%)需要当前值/ 上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||
//电耗
|
||||
//设备
|
||||
arr[19] =
|
||||
|
@ -278,8 +313,10 @@ export default {
|
|||
? item.窑头排风机_consume_unit
|
||||
: "/";
|
||||
arr[24] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
||||
arr[26] = item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||
// arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
||||
if (item.elec_consume_unit != null &&item.elec_consume_unit !== "/"){
|
||||
arr[26] = arr[24]-arr[25] //当期与目标差值(KW·h/t)
|
||||
}
|
||||
let ind_pre1 = 0,
|
||||
huanbi1 = 0;
|
||||
if (item.month_s == 1) {
|
||||
|
@ -296,13 +333,18 @@ export default {
|
|||
: "/";
|
||||
}
|
||||
arr[27] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
arr[28] = item.celec_consume_unit; //当期与环期差值(KW·h/t)
|
||||
arr[29] = item.celec_consume_unit; //环比增长率(%)
|
||||
if(arr[27]!=="/" && huanbi1!=="/"){
|
||||
arr[28] = arr[24] - huanbi1; //当期与环期差值(KW·h/t)
|
||||
}else{
|
||||
arr[28] = "/"
|
||||
}
|
||||
if(arr[28]!=="/" && huanbi1!=="/"){
|
||||
arr[29] = (arr[28] / huanbi1) * 100; //环比增长率(%)
|
||||
}else{
|
||||
arr[29] = "/"}; //环比增长率(%)
|
||||
arr[30] = item.celec_consume_unit; //同比增长率(%)
|
||||
arr[31] = item.celec_consume_unit; //同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr);
|
||||
that.tableDatas = wrapArr;
|
||||
} else {
|
||||
}
|
||||
|
|
|
@ -38,8 +38,9 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<td class="numCell">{{ item[0] }}</td>
|
||||
<tr v-for="(item, index) in tableDatas" :key="item">
|
||||
<td rowspan="8" v-if="index == 0" class="numCell">{{ item[0] }}</td>
|
||||
<td v-else-if="index==8||index==9" class="numCell">{{ item[0] }}</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
<td
|
||||
class="numCell hoursItem"
|
||||
|
@ -59,9 +60,9 @@
|
|||
>
|
||||
{{ item[4] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[5].toFixed(2) }}</td>
|
||||
<td class="numCell">{{ item[5] }}</td>
|
||||
<td class="numCell">{{ item[6] }}</td>
|
||||
<td class="numCell">{{ item[7].toFixed(2) }}</td>
|
||||
<td class="numCell">{{ item[7] }}</td>
|
||||
<td class="numCell">{{ item[8] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -326,8 +327,18 @@ export default {
|
|||
mgroup: "",
|
||||
},
|
||||
tableDatas: [
|
||||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 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.C42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.C42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.O52.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
|
||||
["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
|
||||
],
|
||||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
|
@ -360,6 +371,54 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O52.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "熟料",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
|
@ -390,6 +449,54 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5R 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 袋装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.C42.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "P.O52.5 散装",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "熟料",
|
||||
type: "bar",
|
||||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
|
@ -440,13 +547,33 @@ export default {
|
|||
params1.year_s = year;
|
||||
params1.type = "year_s";
|
||||
params1.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(params1).then((res1) => {
|
||||
this.$API.enm.mpointstat.list.req(params1).then((res1) => {
|
||||
if (res1.length > 0) {
|
||||
let data1 = res1[0];
|
||||
that.tableDatas[0][4] = data1.total_production;
|
||||
that.tableDatas[1][4] = data1.elec_consume_unit;
|
||||
res1.forEach((item) => {
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
that.tableDatas[4][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
that.tableDatas[5][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][4] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
that.tableDatas[7][4] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][4] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][4] = item.val;
|
||||
}
|
||||
});
|
||||
}
|
||||
)}
|
||||
}).then(()=>{
|
||||
//月
|
||||
let params2 = {};
|
||||
params2.page = 0;
|
||||
|
@ -454,29 +581,35 @@ export default {
|
|||
params2.month_s = month;
|
||||
params2.type = "month_s";
|
||||
params2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(params2).then((res2) => {
|
||||
this.$API.enm.mpointstat.list.req(params2).then((res2) => {
|
||||
if (res2.length > 0) {
|
||||
let data2 = res2[0];
|
||||
that.tableDatas[0][3] = data2.total_production;
|
||||
that.tableDatas[1][3] = data2.elec_consume_unit;
|
||||
res2.forEach((item) => {
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
that.tableDatas[4][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
that.tableDatas[5][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][3] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
that.tableDatas[7][3] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][3] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][3] = item.val;
|
||||
}
|
||||
});
|
||||
//昨日
|
||||
let params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = "day_s";
|
||||
params3.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][2] = data3.total_production;
|
||||
that.tableDatas[1][2] = data3.elec_consume_unit;
|
||||
}
|
||||
});
|
||||
//月目标
|
||||
)
|
||||
}
|
||||
}).then(() => {
|
||||
//月年目标
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.mgroup = that.query.mgroup;
|
||||
|
@ -488,63 +621,121 @@ export default {
|
|||
data5.forEach((item5) => {
|
||||
let str = "goal_val_" + that.month;
|
||||
if (item5.goal_cate_name == "总产量(t)") {
|
||||
that.tableDatas[0][5] = item5[str];
|
||||
that.tableDatas[0][7] = item5.goal_val;
|
||||
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[1][5] = item5[str];
|
||||
that.tableDatas[1][7] = item5.goal_val;
|
||||
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]
|
||||
);// 计算月完成度
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.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 params3 = {};
|
||||
params3.page = 0;
|
||||
params3.year_s = year_d;
|
||||
params3.month_s = month_d;
|
||||
params3.day_s = days_d;
|
||||
params3.type = "day_s";
|
||||
params3.mgroup = that.query.mgroup;
|
||||
this.$API.enm.mpointstat.list.req(params3).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
res3.forEach((item) => {
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
that.tableDatas[4][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
that.tableDatas[5][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][2] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
that.tableDatas[7][2] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][2] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][2] = item.val;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
//月
|
||||
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]
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
// 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.getMonthData(year);
|
||||
});
|
||||
|
@ -572,7 +763,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
//获取天数据
|
||||
//获取天数据-图表
|
||||
getDayData(year, month) {
|
||||
let that = this;
|
||||
let query1 = {};
|
||||
|
@ -581,19 +772,53 @@ export default {
|
|||
query1.month_s = month;
|
||||
query1.type = "day_s";
|
||||
query1.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
this.$API.enm.mpointstat.list.req(query1).then((response) => {
|
||||
let seriesData0 = [],
|
||||
seriesData1 = [];
|
||||
|
||||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [],
|
||||
seriesData5 = [],
|
||||
seriesData6 = [],
|
||||
seriesData7 = [],
|
||||
seriesData8 = [],
|
||||
seriesData9 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.day_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.elec_consume_unit;
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
seriesData1[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
seriesData2[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
seriesData3[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
seriesData4[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
seriesData5[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
seriesData6[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
seriesData7[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
seriesData0[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
seriesData9[ind] = item.val;
|
||||
}
|
||||
});
|
||||
let options = { ...that.option1 };
|
||||
options.series[0].data = seriesData0;
|
||||
options.series[1].data = seriesData1;
|
||||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
options.series[6].data = seriesData6;
|
||||
options.series[7].data = seriesData7;
|
||||
options.series[8].data = seriesData8;
|
||||
options.series[9].data = seriesData9;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i + "日";
|
||||
|
@ -603,7 +828,7 @@ export default {
|
|||
that.optionDay = options;
|
||||
});
|
||||
},
|
||||
//获取月数据
|
||||
//获取月数据-图表
|
||||
getMonthData(year) {
|
||||
let that = this;
|
||||
let query2 = {};
|
||||
|
@ -611,18 +836,53 @@ export default {
|
|||
query2.year_s = year;
|
||||
query2.type = "month_s";
|
||||
query2.mgroup = that.query.mgroup;
|
||||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
this.$API.enm.mpointstat.list.req(query2).then((response) => {
|
||||
let seriesData0 = [],
|
||||
seriesData1 = [];
|
||||
seriesData1 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [],
|
||||
seriesData5 = [],
|
||||
seriesData6 = [],
|
||||
seriesData7 = [],
|
||||
seriesData8 = [],
|
||||
seriesData9 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.elec_consume_unit;
|
||||
if (item.mpoint_name == "水泥+P.O42.5R 散装") {
|
||||
seriesData1[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
|
||||
seriesData2[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
|
||||
seriesData3[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O42.5 散装") {
|
||||
seriesData4[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 袋装") {
|
||||
seriesData5[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.C42.5 散装") {
|
||||
seriesData6[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
seriesData7[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
seriesData0[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
seriesData9[ind] = item.val;
|
||||
}
|
||||
});
|
||||
let options = { ...that.option2 };
|
||||
options.series[0].data = seriesData0;
|
||||
options.series[1].data = seriesData1;
|
||||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
options.series[6].data = seriesData6;
|
||||
options.series[7].data = seriesData7;
|
||||
options.series[8].data = seriesData8;
|
||||
options.series[9].data = seriesData9;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
|
|
|
@ -182,7 +182,7 @@ export default {
|
|||
: "/"
|
||||
: "/";
|
||||
}
|
||||
arr[6] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
arr[6] = huanbi; //环期值(KW·h/t)上个月的值\
|
||||
let diff = 0;
|
||||
if (arr[6] == "/"){
|
||||
diff == "/";
|
||||
|
@ -191,7 +191,7 @@ export default {
|
|||
}
|
||||
arr[7] = diff;
|
||||
if (arr[7]=="/" || arr[6]=="/" || arr[6]==0){
|
||||
arr[8] = "/";
|
||||
arr[8] == "/";
|
||||
}else{
|
||||
arr[8] = (arr[7]/arr[6])*100 //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ export default {
|
|||
//当期与目标差值(KW·h/t)
|
||||
let diff = 0;
|
||||
if (item[2] !== "/") {
|
||||
diff = item[1] - item[2];
|
||||
diff = (item[1] - item[2]).toFixed(2);
|
||||
} else {
|
||||
diff = "/";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue