fix:tkx电石渣工序班组月度对比修改
This commit is contained in:
parent
4bad854f10
commit
11d38f5508
|
|
@ -95,23 +95,10 @@ export default {
|
|||
let year = myDate.getFullYear();
|
||||
this.timeStamp = myDate.getTime();
|
||||
that.query.year_s = year;
|
||||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "电石渣" })
|
||||
.then((res) => {
|
||||
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) => {
|
||||
if (res.length > 0) {
|
||||
res.forEach((item) => {
|
||||
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)") {
|
||||
that.getData(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
that.getGoalData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -121,16 +108,16 @@ export default {
|
|||
params.page = 0;
|
||||
params.year = self.query.year_s;
|
||||
params.mgroup = self.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
self.$API.mtm.goal.list.req(params).then((res) => {
|
||||
if (res.length > 0) {
|
||||
res.forEach((item) => {
|
||||
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)") {
|
||||
this.getData(item);
|
||||
if (item.goal_cate_name == "单位产品分布电耗(kW·h/t)") {
|
||||
console.log("目标数据:", item);
|
||||
self.getData(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
}).catch((error) => {
|
||||
console.error('获取目标数据失败:', error);
|
||||
});
|
||||
},
|
||||
|
|
@ -193,7 +180,6 @@ export default {
|
|||
arr[6] = (arr[4] - arr[5]).toFixed(2); //当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,
|
||||
huanqi = 0,
|
||||
huanqicha = 0,
|
||||
tongqi = 0,
|
||||
tongqicha = 0;
|
||||
if (n == 1) {
|
||||
|
|
@ -209,16 +195,15 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
arr[7] = huanqi; //环期值(KW·h/t)上个月的值
|
||||
arr[7] = Number(huanqi); //环期值(KW·h/t)上个月的值
|
||||
if (arr[6] !== "/"){
|
||||
arr[8] = (arr[4] - arr[7]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||
arr[8] = (Number(arr[4]) - arr[7]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||
}else{
|
||||
arr[8] = "/"; //当期与环期差值(KW·h/t)
|
||||
}
|
||||
// arr[8] = huanqicha; //当期与环期差值(KW·h/t)
|
||||
let growthRate = 0;
|
||||
if (arr[8]!== "/" && arr[7]!== 0 && arr[8]!== 0 ) {
|
||||
growthRate = ((arr[8] / arr[7]) * 100).toFixed(2);
|
||||
growthRate = ((Number(arr[8]) /arr[7]) * 100).toFixed(2);
|
||||
} else{
|
||||
growthRate = "/";
|
||||
}
|
||||
|
|
@ -278,13 +263,6 @@ export default {
|
|||
this.type = type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type, item) {
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT("#myReport");
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue