fix:enm 修改班组数据
This commit is contained in:
parent
83426cb8cd
commit
f0aa7a2d2f
|
@ -9,7 +9,7 @@
|
|||
<div class="top_block">
|
||||
<div class="top_block_time">
|
||||
<img src="img/photon_top_line.png" />
|
||||
<span>托克逊</span>
|
||||
<span>新疆中泰化学托克逊能化有限公司绿色建材分公司能源数据采集平台</span>
|
||||
{{ currentDay }}{{ currentWeek }}{{ currentTime }}
|
||||
<img
|
||||
src="img/photon_top_line.png"
|
||||
|
@ -107,7 +107,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexItem">
|
||||
<!-- <div class="flexItem">
|
||||
<div class="itemTitle">
|
||||
<div class="itemTitleIcon"></div>
|
||||
<div>数据采集</div>
|
||||
|
@ -147,13 +147,13 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="right_block">
|
||||
<div class="flexItem">
|
||||
<div class="itemTitle">
|
||||
<div class="itemTitleIcon"></div>
|
||||
<div>工序电耗</div>
|
||||
<div>主机设备电耗电耗</div>
|
||||
</div>
|
||||
<div class="itemBody itemBodyFlex">
|
||||
<div id="radar" style="height: 100%"></div>
|
||||
|
@ -200,32 +200,32 @@
|
|||
<div class="flexItem">
|
||||
<div class="itemTitle">
|
||||
<div class="itemTitleIcon"></div>
|
||||
<div>环保数据</div>
|
||||
<div>能源数据</div>
|
||||
</div>
|
||||
<div class="itemBody" style="padding: 5%">
|
||||
<div class="elecItem">
|
||||
<div class="elecItem_wrap">
|
||||
<span>当月发电量</span>
|
||||
<span>熟料综合电耗</span>
|
||||
<p class="elec_number">
|
||||
{{ hotData.total_production }}
|
||||
{{ hotData.celec_consume_unit }}
|
||||
<span class="elec_unit">kwh</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="elecItem">
|
||||
<div class="elecItem_wrap">
|
||||
<span>NOx折算值</span>
|
||||
<span>熟料综合煤耗</span>
|
||||
<p class="elec_number">
|
||||
{{ hotData.NOx }}
|
||||
<span class="elec_unit">mg/m³</span>
|
||||
{{ hotData.coal_consume_unit }}
|
||||
<span class="elec_unit">kwh</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="elecItem">
|
||||
<div class="elecItem_wrap">
|
||||
<span>发电量</span>
|
||||
<span>熟料综合能耗</span>
|
||||
<p class="elec_number">
|
||||
{{ hotData.production_elec_unit }}
|
||||
{{ hotData.cen_consume_unit }}
|
||||
<span class="elec_unit">kwh</span>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -233,28 +233,19 @@
|
|||
|
||||
<div class="elecItem">
|
||||
<div class="elecItem_wrap">
|
||||
<span>SO2折算值</span>
|
||||
<span>水泥综合能耗</span>
|
||||
<p class="elec_number">
|
||||
{{ hotData.SO2 }}
|
||||
<span class="elec_unit">mg/m³</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="elecItem">
|
||||
<div class="elecItem_wrap">
|
||||
<span>自用电量</span>
|
||||
<p class="elec_number">
|
||||
{{ hotData.elec_consume }}
|
||||
{{ hotData.sn_cen_consume_unit}}
|
||||
<span class="elec_unit">kwh</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="elecItem">
|
||||
<div class="elecItem_wrap">
|
||||
<span>颗粒物折算值</span>
|
||||
<span>水泥工序电耗</span>
|
||||
<p class="elec_number">
|
||||
{{ hotData.klw }}
|
||||
<span class="elec_unit">mg/m³</span>
|
||||
{{ hotData.sn_elec_consume_unit }}
|
||||
<span class="elec_unit">kwh</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -451,12 +442,11 @@ export default {
|
|||
{ name: "水泥包装", value: 0 },
|
||||
],
|
||||
hotData: {
|
||||
total_production: "",
|
||||
production_elec_unit: "",
|
||||
elec_consume: "",
|
||||
NOx: "",
|
||||
SO2: "",
|
||||
klw: "",
|
||||
celec_consume_unit: "", //综合电耗
|
||||
coal_consume_unit: "", //单位煤耗
|
||||
cen_consume_unit: "", //综合能耗
|
||||
sn_cen_consume_unit: "", //水泥综合能耗
|
||||
sn_elec_consume_unit: "",//水泥分布电耗
|
||||
},
|
||||
tableData: [],
|
||||
tezhongData: [],
|
||||
|
@ -824,9 +814,8 @@ export default {
|
|||
generation() {
|
||||
let that = this;
|
||||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "余热发电" })
|
||||
.req({ page: 0, search: "回转窑" })
|
||||
.then((res) => {
|
||||
// console.log("余热发电", res);
|
||||
that.yurefadianId = res[0].id;
|
||||
let params = {};
|
||||
params.page = 0;
|
||||
|
@ -835,51 +824,68 @@ export default {
|
|||
params.type = "month_s";
|
||||
params.mgroup = that.yurefadianId;
|
||||
this.$API.enm.enstat.req(params).then((ress) => {
|
||||
that.hotData.total_production =
|
||||
ress[0].total_production;
|
||||
that.hotData.production_elec_unit =
|
||||
ress[0].production_elec_unit;
|
||||
that.hotData.elec_consume = ress[0].elec_consume;
|
||||
that.hotData.celec_consume_unit =
|
||||
ress[0].celec_consume_unit;
|
||||
that.hotData.coal_consume_unit =
|
||||
ress[0].coal_consume_unit;
|
||||
that.hotData.cen_consume_unit = ress[0].cen_consume_unit;
|
||||
});
|
||||
});
|
||||
//环保数据
|
||||
this.$API.enm.mpoint.list
|
||||
.req({
|
||||
page: 0,
|
||||
code: "K_TX_IP20_TX_MD500", //nox
|
||||
query: " { id, name, code, last_data, gather_state }",
|
||||
})
|
||||
.then((res0) => {
|
||||
if (res0[0].last_data.last_val) {
|
||||
that.hotData.NOx =
|
||||
res0[0].last_data.last_val.toFixed(2);
|
||||
}
|
||||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "水泥磨" })
|
||||
.then((res) => {
|
||||
that.yurefadianId = res[0].id;
|
||||
let params = {};
|
||||
params.page = 0;
|
||||
params.year_s = that.currentYear;
|
||||
params.month_s = that.currentMonth;
|
||||
params.type = "month_s";
|
||||
params.mgroup = that.yurefadianId;
|
||||
this.$API.enm.enstat.req(params).then((ress) => {
|
||||
that.hotData.sn_elec_consume_unit =
|
||||
ress[0].elec_consume_unit;
|
||||
that.hotData.sn_cen_consume_unit = ress[0].cen_consume_unit;
|
||||
});
|
||||
this.$API.enm.mpoint.list
|
||||
.req({
|
||||
page: 0,
|
||||
code: "K_TX_IP20_TX_MD508", //so2
|
||||
query: "{ id, name, code, last_data, gather_state }",
|
||||
})
|
||||
.then((res1) => {
|
||||
if (res1[0].last_data.last_val) {
|
||||
that.hotData.SO2 =
|
||||
res1[0].last_data.last_val.toFixed(2);
|
||||
}
|
||||
});
|
||||
this.$API.enm.mpoint.list
|
||||
.req({
|
||||
page: 0,
|
||||
code: "K_TX_IP20_TX_MD504", //颗粒物
|
||||
query: "{ id, name, code, last_data, gather_state }",
|
||||
})
|
||||
.then((res2) => {
|
||||
if (res2[0].last_data.last_val) {
|
||||
that.hotData.klw =
|
||||
res2[0].last_data.last_val.toFixed(2);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// //环保数据
|
||||
// this.$API.enm.mpoint.list
|
||||
// .req({
|
||||
// page: 0,
|
||||
// code: "K_TX_IP20_TX_MD500", //nox
|
||||
// query: " { id, name, code, last_data, gather_state }",
|
||||
// })
|
||||
// .then((res0) => {
|
||||
// if (res0[0].last_data.last_val) {
|
||||
// that.hotData.NOx =
|
||||
// res0[0].last_data.last_val.toFixed(2);
|
||||
// }
|
||||
// });
|
||||
// this.$API.enm.mpoint.list
|
||||
// .req({
|
||||
// page: 0,
|
||||
// code: "K_TX_IP20_TX_MD508", //so2
|
||||
// query: "{ id, name, code, last_data, gather_state }",
|
||||
// })
|
||||
// .then((res1) => {
|
||||
// if (res1[0].last_data.last_val) {
|
||||
// that.hotData.SO2 =
|
||||
// res1[0].last_data.last_val.toFixed(2);
|
||||
// }
|
||||
// });
|
||||
// this.$API.enm.mpoint.list
|
||||
// .req({
|
||||
// page: 0,
|
||||
// code: "K_TX_IP20_TX_MD504", //颗粒物
|
||||
// query: "{ id, name, code, last_data, gather_state }",
|
||||
// })
|
||||
// .then((res2) => {
|
||||
// if (res2[0].last_data.last_val) {
|
||||
// that.hotData.klw =
|
||||
// res2[0].last_data.last_val.toFixed(2);
|
||||
// }
|
||||
// });
|
||||
|
||||
//工序电耗
|
||||
proceElec() {
|
||||
let that = this;
|
||||
|
@ -954,50 +960,50 @@ export default {
|
|||
});
|
||||
console.log("数据采集tableData", that.tableData);
|
||||
|
||||
let chartDom6 = document.getElementById("pieChart");
|
||||
let myChart6 = echarts.init(chartDom6);
|
||||
let colors = [];
|
||||
colors.push(that.linearGradientColors[0]);
|
||||
colors.push(that.linearGradientColors[3]);
|
||||
let option6 = {
|
||||
color: colors,
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
},
|
||||
legend: {
|
||||
top: "2%",
|
||||
left: "center",
|
||||
textStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "运行状态",
|
||||
type: "pie",
|
||||
radius: ["40%", "70%"],
|
||||
padAngle: 5,
|
||||
itemStyle: {
|
||||
borderRadius: 5,
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: "inner",
|
||||
fontSize: 16,
|
||||
formatter: "{d}%",
|
||||
color: "#fff",
|
||||
},
|
||||
labelLine: {
|
||||
show: false,
|
||||
},
|
||||
data: [
|
||||
{ value: success_num, name: "正常" },
|
||||
{ value: error_num, name: "掉线" },
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
myChart6.setOption(option6);
|
||||
// let chartDom6 = document.getElementById("pieChart");
|
||||
// let myChart6 = echarts.init(chartDom6);
|
||||
// let colors = [];
|
||||
// colors.push(that.linearGradientColors[0]);
|
||||
// colors.push(that.linearGradientColors[3]);
|
||||
// let option6 = {
|
||||
// color: colors,
|
||||
// tooltip: {
|
||||
// trigger: "item",
|
||||
// },
|
||||
// legend: {
|
||||
// top: "2%",
|
||||
// left: "center",
|
||||
// textStyle: {
|
||||
// color: "#fff",
|
||||
// },
|
||||
// },
|
||||
// series: [
|
||||
// {
|
||||
// name: "运行状态",
|
||||
// type: "pie",
|
||||
// radius: ["40%", "70%"],
|
||||
// padAngle: 5,
|
||||
// itemStyle: {
|
||||
// borderRadius: 5,
|
||||
// },
|
||||
// label: {
|
||||
// show: true,
|
||||
// position: "inner",
|
||||
// fontSize: 16,
|
||||
// formatter: "{d}%",
|
||||
// color: "#fff",
|
||||
// },
|
||||
// labelLine: {
|
||||
// show: false,
|
||||
// },
|
||||
// data: [
|
||||
// { value: success_num, name: "正常" },
|
||||
// { value: error_num, name: "掉线" },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// myChart6.setOption(option6);
|
||||
});
|
||||
},
|
||||
showTime() {
|
||||
|
@ -1029,8 +1035,8 @@ export default {
|
|||
var model = document.getElementsByClassName("model")[0];
|
||||
var left_block = document.getElementsByClassName("left_block")[0];
|
||||
var right_block = document.getElementsByClassName("right_block")[0];
|
||||
var pieChart = document.getElementById("pieChart");
|
||||
var elTable = document.getElementById("elTable");
|
||||
// var pieChart = document.getElementById("pieChart");
|
||||
// var elTable = document.getElementById("elTable");
|
||||
var radarChart = document.getElementById("radar");
|
||||
if (windowWidth > 960) {
|
||||
container.style.overflow = "hidden";
|
||||
|
@ -1056,10 +1062,10 @@ export default {
|
|||
var itemBody = itemBodys[i];
|
||||
itemBody.style.height = itemBodyHeight + "px";
|
||||
}
|
||||
elTable.style.height = itemBodyHeight - 20 + "px";
|
||||
// elTable.style.height = itemBodyHeight - 20 + "px";
|
||||
let pieWidth = Math.round(windowWidth / 100) * 22 - 180;
|
||||
let radarWidth = Math.round(windowWidth / 100) * 22 - 130;
|
||||
pieChart.style.width = pieWidth + "px";
|
||||
// pieChart.style.width = pieWidth + "px";
|
||||
radarChart.style.width = radarWidth + "px";
|
||||
} else {
|
||||
container.style.overflow = "auto";
|
||||
|
@ -1071,7 +1077,7 @@ export default {
|
|||
that.engine.resize();
|
||||
}
|
||||
that.resizeChart("line1");
|
||||
that.resizeChart("pieChart");
|
||||
// that.resizeChart("pieChart");
|
||||
that.resizeChart("radar");
|
||||
that.resizeChart("line3");
|
||||
},
|
||||
|
@ -2154,10 +2160,7 @@ export default {
|
|||
background: #0000ff;
|
||||
}
|
||||
/* // 表格——el-table 去除背景颜色*/
|
||||
#elTable {
|
||||
/* border-radius: 5px; */
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.successCircle {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
|
|
|
@ -111,9 +111,12 @@ export default {
|
|||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
// let data = [];
|
||||
if (res.length > 0) {
|
||||
this.goalDatas = res[0];
|
||||
res.forEach((item) => {
|
||||
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)") {
|
||||
that.getData(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
that.getData(this.goalDatas);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -187,13 +190,15 @@ export default {
|
|||
: "/";
|
||||
//设备
|
||||
arr[7] =
|
||||
item.煤磨排风机_consume_unit !== undefined && item.煤磨排风机_consume_unit !== null
|
||||
? item.煤磨排风机_consume_unit
|
||||
item.煤磨排风机主电机_consume_unit
|
||||
!== undefined && item.煤磨排风机主电机_consume_unit
|
||||
!== null
|
||||
? item.煤磨排风机主电机_consume_unit
|
||||
: "/";
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[8] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
arr[9] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
arr[10] = item.celec_consume_unit - arr[9]; //当期与目标差值(KW·h/t)
|
||||
arr[10] = (arr[8] - arr[9]).toFixed(2); //当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,
|
||||
huanqi = 0,
|
||||
huanqicha = 0,
|
||||
|
@ -214,9 +219,9 @@ export default {
|
|||
}
|
||||
arr[11] = huanqi; //环期值(KW·h/t)上个月的值
|
||||
if (huanqi !== "/") {
|
||||
huanqicha = item.celec_consume_unit - huanqi;
|
||||
huanqicha = (arr[8] - arr[11]).toFixed(2);
|
||||
} else {
|
||||
huanqicha = item.celec_consume_unit;
|
||||
huanqicha = 0;
|
||||
}
|
||||
arr[12] = huanqicha; //当期与环期差值(KW·h/t)
|
||||
// arr[13] =
|
||||
|
|
|
@ -248,9 +248,9 @@ export default {
|
|||
let keyValue = "goal_val_" + n;
|
||||
if (goalData.length > 0){
|
||||
goalData.forEach((item) => {
|
||||
if (item.id == "3638341891940192256") {
|
||||
if (item.goal_cate_name == "单位产品标煤耗(kgce/t)") {
|
||||
arr[13] = item[keyValue]; //目标值(KW·h/t)//需要接口获取
|
||||
}else if (item.id == "3637651365016526848"){
|
||||
}else if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)"){
|
||||
arr[25] = item[keyValue]; //目标值(KW·h/t)//需要接口获取
|
||||
}
|
||||
});
|
||||
|
|
|
@ -108,33 +108,19 @@ export default {
|
|||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "水泥磨" })
|
||||
.then((res) => {
|
||||
console.log("水泥磨", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
let params = {};
|
||||
params.page = 0;
|
||||
params.year = year;
|
||||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
let data = [];
|
||||
if (res.length > 0) {
|
||||
data = res[0];
|
||||
}
|
||||
that.getGoalData();
|
||||
});
|
||||
that.getData(res);
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getGoalData() {
|
||||
let that = this;
|
||||
let params = {};
|
||||
params.page = 0;
|
||||
params.year = that.query.year_s;
|
||||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
that.getData(res);
|
||||
});
|
||||
},
|
||||
getData(goalData) {
|
||||
console.log("goalData", goalData);
|
||||
let that = this;
|
||||
let query0 = {};
|
||||
query0.page = 0;
|
||||
|
@ -144,8 +130,7 @@ export default {
|
|||
let wrapArr = [],
|
||||
wrapArr0 = [],
|
||||
compareArr0 = [],
|
||||
month_obj = {},
|
||||
wrapArrs = [];
|
||||
month_obj = {};
|
||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||
let data0 = []; //去年的值
|
||||
data0 = res0;
|
||||
|
@ -226,7 +211,14 @@ export default {
|
|||
|
||||
// arr[13]=item.elec_consume_unit//当期值(KW·h/t)
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[12] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
// arr[12] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
if (goalData.length > 0){
|
||||
goalData.forEach((item) => {
|
||||
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)"){
|
||||
arr[12] = item[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
}
|
||||
});
|
||||
};
|
||||
arr[13] = arr[12] - item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,
|
||||
huanqi = 0,
|
||||
|
@ -269,7 +261,6 @@ export default {
|
|||
// arr[18] = 0.0; //同比增长率(%)
|
||||
arr[18] = 0;
|
||||
if (month_obj[n]) {
|
||||
console.log("month_obj[n]",month_obj[n])
|
||||
const monthData = month_obj[n];
|
||||
const itemValue = item.elec_consume_unit; // 单位产品电耗的值
|
||||
const sortedData = monthData.sort((a, b) => parseFloat(b.elec) - parseFloat(a.elec));
|
||||
|
@ -369,7 +360,7 @@ export default {
|
|||
CL_score= 10;
|
||||
} else if (CL_index === 1) {
|
||||
CL_score= 7;
|
||||
} else if (SO3_inCL_indexdex === 2) {
|
||||
} else if (CL_index === 2) {
|
||||
CL_score= 3;
|
||||
} else if (CL_index === 3) {
|
||||
CL_score= 0;
|
||||
|
@ -381,7 +372,6 @@ export default {
|
|||
let newArr = [];
|
||||
for (let i = 0; i < wrapArr.length; i++) {
|
||||
let item = wrapArr[i];
|
||||
console.log(item);
|
||||
if (item == undefined) {
|
||||
} else {
|
||||
newArr.push(wrapArr[i]);
|
||||
|
@ -406,7 +396,6 @@ export default {
|
|||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
// debugger;
|
||||
console.log(this.myOption);
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -142,14 +142,16 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.fim.feeset.list,
|
||||
apiObj: null,
|
||||
mgroup_name :["电石渣", "回转窑", "水泥磨"],
|
||||
query: {
|
||||
date: "",
|
||||
fee: "",
|
||||
mgroup: "",
|
||||
},
|
||||
params:{
|
||||
mgroup__cate:"section"
|
||||
mgroup__cate:"section",
|
||||
mgroup__name__in: "",
|
||||
},
|
||||
dialog: {
|
||||
save: false,
|
||||
|
@ -162,6 +164,8 @@ export default {
|
|||
mounted() {
|
||||
this.getFee();
|
||||
this.getMgroup();
|
||||
this.params.mgroup__name__in = this.mgroup_name.join(",");
|
||||
this.apiObj = this.$API.fim.feeset.list;
|
||||
},
|
||||
methods: {
|
||||
//获取集合列表
|
||||
|
@ -169,7 +173,6 @@ export default {
|
|||
this.$API.mtm.mgroup.list.req({ page: 0, cate:"section"}).then((res) => {
|
||||
//如果res.name=煤磨、原料磨、水泥包装,则不放入options中
|
||||
res.forEach(element => {
|
||||
// console.log(element.name);
|
||||
if(['煤磨','原料磨','水泥包装'].includes(element.name)){
|
||||
return;
|
||||
}
|
||||
|
@ -182,10 +185,10 @@ export default {
|
|||
getFee() {
|
||||
this.$API.fim.fee.req({ page: 0 }).then((res) => {
|
||||
res.forEach(element => {
|
||||
// console.log(element.name);
|
||||
if(['煤磨','原料磨','水泥包装'].includes(element.name)){
|
||||
return;
|
||||
}
|
||||
// console.log('element', element);
|
||||
// if(['煤磨','原料磨','水泥包装'].includes(element.name)){
|
||||
// return;
|
||||
// }
|
||||
this.feeOptions.push(element);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="24">原料磨工段班组月度对比分析</th>
|
||||
<th colspan="23">原料磨工段班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<th>运转率</th>
|
||||
<th>成本</th>
|
||||
<th colspan="7">质量</th>
|
||||
<th colspan="10">单位产品电耗</th>
|
||||
<th colspan="9">单位产品电耗</th>
|
||||
<th rowspan="2">得分</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -62,7 +62,6 @@
|
|||
<th>水分(%)</th>
|
||||
<th>CaO(%)</th>
|
||||
<th>循环风机(KW·h/t)</th>
|
||||
<th>尾排风机(KW·h/t)</th>
|
||||
<th>立磨主电机(KW·h/t)</th>
|
||||
|
||||
<th>当期值(KW·h/t)</th>
|
||||
|
@ -121,9 +120,12 @@ export default {
|
|||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
if (res.length > 0) {
|
||||
that.goalDatas = res[0];
|
||||
res.forEach((item) => {
|
||||
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)") {
|
||||
that.getData(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
that.getData(that.goalDatas);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -221,18 +223,14 @@ export default {
|
|||
? item.循环风机_consume_unit
|
||||
: "/";
|
||||
arr[14] =
|
||||
item.尾排风机_consume_unit != null
|
||||
? item.尾排风机_consume_unit
|
||||
: "/";
|
||||
arr[15] =
|
||||
item.立磨主电机_consume_unit != null
|
||||
? item.立磨主电机_consume_unit
|
||||
: "/";
|
||||
//
|
||||
arr[16] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
arr[15] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[17] = goalData[keyVale]?goalData[keyVale]:0; //目标值(KW·h/t)//需要接口获取
|
||||
arr[18] = item.celec_consume_unit - arr[16]; //当期与目标差值(KW·h/t)
|
||||
arr[16] = goalData[keyVale]?goalData[keyVale]:0; //目标值(KW·h/t)//需要接口获取
|
||||
arr[17] = item.celec_consume_unit - arr[16]; //当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,
|
||||
huanbi = 0;
|
||||
if (item.month_s == 1) {
|
||||
|
@ -248,22 +246,22 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
arr[19] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
arr[18] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
//当期与环期差值(KW·h/t)
|
||||
if (arr[19] !== "/"){
|
||||
arr[20] = (arr[16] - arr[19]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||
arr[19] = (arr[15] - arr[18]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||
}else{
|
||||
arr[20] = "/"; //当期与环期差值(KW·h/t)
|
||||
arr[19] = "/"; //当期与环期差值(KW·h/t)
|
||||
}
|
||||
arr[21] = item.celec_consume_unit; //环比增长率(%)
|
||||
if (arr[19] !=="/" && arr[20] !==0 && arr[20] !== "undefined"){
|
||||
arr[21] = ((arr[19]/arr[20])*100).toFixed(2);
|
||||
arr[20] = item.celec_consume_unit; //环比增长率(%)
|
||||
if (arr[18] !=="/" && arr[19] !==0 && arr[19] !== "undefined"){
|
||||
arr[20] = ((arr[18]/arr[19])*100).toFixed(2);
|
||||
}else{
|
||||
arr[21] = "/"; //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||
arr[20] = "/"; //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||
}
|
||||
arr[22] = item.celec_consume_unit; //同比增长率(%)
|
||||
arr[21] = item.celec_consume_unit; //同比增长率(%)
|
||||
|
||||
arr[23] = 0;
|
||||
arr[22] = 0;
|
||||
if (month_obj[n]) {
|
||||
console.log("month_obj[n]",month_obj[n])
|
||||
const monthData = month_obj[n];
|
||||
|
@ -280,7 +278,7 @@ export default {
|
|||
} else if (index === 3) {
|
||||
elec_score= 0;
|
||||
}
|
||||
arr[23] += elec_score;
|
||||
arr[22] += elec_score;
|
||||
|
||||
const run_rate_itemValue = item.run_rate; // 运转率的值
|
||||
const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
||||
|
@ -295,7 +293,7 @@ export default {
|
|||
} else if (run_rate_index === 3) {
|
||||
run_rate_score= 0;
|
||||
}
|
||||
arr[23] += run_rate_score;
|
||||
arr[22] += run_rate_score;
|
||||
|
||||
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
||||
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
||||
|
@ -310,7 +308,7 @@ export default {
|
|||
} else if (production_hour_index === 3) {
|
||||
production_hour_score= 0;
|
||||
}
|
||||
arr[23] += production_hour_score;
|
||||
arr[22] += production_hour_score;
|
||||
|
||||
const production_cost_unit_itemValue = item.production_cost_unit; // 单位产品成本的值
|
||||
const production_cost_unit_sortedData = monthData.sort((a, b) => parseFloat(b.production_cost_unit) - parseFloat(a.production_cost_unit));
|
||||
|
@ -325,7 +323,7 @@ export default {
|
|||
} else if (production_cost_unit_index === 3) {
|
||||
production_cost_unit_score= 0;
|
||||
}
|
||||
arr[23] += production_cost_unit_score;
|
||||
arr[22] += production_cost_unit_score;
|
||||
|
||||
const xidu_itemValue = item.辅料_细度_rate_pass; // 辅料细度的值
|
||||
const xidu_sortedData = monthData.sort((a, b) => parseFloat(b.xidu) - parseFloat(a.xidu));
|
||||
|
@ -340,7 +338,7 @@ export default {
|
|||
} else if (xidu_index === 3) {
|
||||
xidu_score= 0;
|
||||
}
|
||||
arr[23] += xidu_score;
|
||||
arr[22] += xidu_score;
|
||||
|
||||
const Fe203_itemValue = item.辅料_Fe2O3_rate_pass; // 辅料Fe203的值
|
||||
const Fe203_sortedData = monthData.sort((a, b) => parseFloat(b.Fe203) - parseFloat(a.Fe203));
|
||||
|
@ -355,7 +353,7 @@ export default {
|
|||
} else if (Fe203_index === 3) {
|
||||
Fe203_score= 0;
|
||||
}
|
||||
arr[23] += Fe203_score;
|
||||
arr[22] += Fe203_score;
|
||||
}
|
||||
wrapArr.push(arr);
|
||||
});
|
||||
|
|
|
@ -97,18 +97,19 @@ export default {
|
|||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "电石渣" })
|
||||
.then((res) => {
|
||||
console.log("电石渣", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
let params = {};
|
||||
params.page = 0;
|
||||
params.year = year;
|
||||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
let data = [];
|
||||
if (res.length > 0) {
|
||||
this.goalDatas = res[0];
|
||||
res.forEach((item) => {
|
||||
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)") {
|
||||
that.getData(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
that.getData(this.goalDatas);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -136,7 +137,6 @@ export default {
|
|||
});
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
let data = res;
|
||||
console.log("data", data);
|
||||
if (data.length > 0) {
|
||||
data.forEach((item, index) => {
|
||||
//先按月份排序,再按班组排序
|
||||
|
@ -219,7 +219,6 @@ export default {
|
|||
}
|
||||
wrapArr.push(arr);
|
||||
});
|
||||
// console.log(wrapArr);
|
||||
that.tableDatas = wrapArr;
|
||||
} else {
|
||||
}
|
||||
|
@ -237,8 +236,6 @@ export default {
|
|||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption);
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue