fix:余热发电mgroup根据name获取
This commit is contained in:
parent
93f058997a
commit
4188ad2a8b
|
@ -247,17 +247,17 @@ export default {
|
|||
name: "sflog",
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wpm.sflog.list,
|
||||
apiObj: null,
|
||||
apiObj2: null,
|
||||
query: {
|
||||
shift: "",
|
||||
team: "",
|
||||
end_time__lt: "",
|
||||
start_time__gte: "",
|
||||
mgroup: "3347217246321065984",
|
||||
mgroup: "",
|
||||
},
|
||||
|
||||
deptId: "3347207082608115712",
|
||||
deptId: "",
|
||||
sflogItem: {},
|
||||
options: [],
|
||||
optionsShift: [],
|
||||
|
@ -267,8 +267,16 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "余热发电" })
|
||||
.then((res) => {
|
||||
console.log("余热发电", res);
|
||||
this.query.mgroup = res[0].id;
|
||||
this.apiObj = this.$API.wpm.sflog.list;
|
||||
this.deptId = res[0].belong_dept;
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getTeam() {
|
||||
|
|
|
@ -332,7 +332,9 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
timeStamp: null,
|
||||
chartShow: false,
|
||||
exportLoading: false,
|
||||
myOption: null,
|
||||
optionHour: {},
|
||||
optionDay: {},
|
||||
|
@ -536,6 +538,7 @@ export default {
|
|||
let days = (that.days = myDate.getDate());
|
||||
let hours = (that.hours = myDate.getHours());
|
||||
let timeDate = myDate.getTime();
|
||||
that.timeStamp = timeDate;
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
//昨天的计算
|
||||
let year_d = year,
|
||||
|
@ -556,218 +559,165 @@ export default {
|
|||
let month_h = hourDate.getMonth() + 1;
|
||||
let days_h = hourDate.getDate();
|
||||
let hours_h = hourDate.getHours();
|
||||
//昨日
|
||||
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 = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3] = data3.total_production;
|
||||
that.tableDatas[1][3] = data3.production_hour;
|
||||
that.tableDatas[2][3] = data3.run_hour;
|
||||
that.tableDatas[3][3] = data3.run_rate;
|
||||
that.tableDatas[4][3] = data3.elec_consume_unit;
|
||||
that.tableDatas[5][3] = data3.celec_consume_unit;
|
||||
that.tableDatas[6][3] = data3.coal_consume_unit;
|
||||
that.tableDatas[7][3] = data3.cen_consume_unit;
|
||||
that.tableDatas[8][3] = data3.production_cost_unit;
|
||||
}
|
||||
});
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = "hour_st";
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if (res4.length > 0) {
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2] = data4.total_production;
|
||||
that.tableDatas[4][2] = data4.elec_consume_unit;
|
||||
that.tableDatas[5][2] = data4.celec_consume_unit;
|
||||
that.tableDatas[6][2] = data4.coal_consume_unit;
|
||||
that.tableDatas[7][2] = data4.cen_consume_unit;
|
||||
that.tableDatas[8][2] = data4.production_cost_unit;
|
||||
}
|
||||
});
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.mgroup = "3346520558031773696";
|
||||
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[0][6] = item5[str];
|
||||
that.tableDatas[0][8] = item5.goal_val;
|
||||
} else if (item5.goal_cate_name == "台时产量(t/h)") {
|
||||
that.tableDatas[1][6] = item5[str];
|
||||
that.tableDatas[1][8] = item5.goal_val;
|
||||
} else if (item5.goal_cate_name == "运转时间(h)") {
|
||||
that.tableDatas[2][6] = item5[str];
|
||||
that.tableDatas[2][8] = item5.goal_val;
|
||||
} else if (item5.goal_cate_name == "运转率(%)") {
|
||||
that.tableDatas[3][6] = item5[str];
|
||||
that.tableDatas[3][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "单位产品分布电耗(KW·h/t)"
|
||||
) {
|
||||
that.tableDatas[4][6] = item5[str];
|
||||
that.tableDatas[4][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "单位产品综合电耗(KW·h/t)"
|
||||
) {
|
||||
that.tableDatas[5][6] = item5[str];
|
||||
that.tableDatas[5][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "单位产品标煤耗(kgce/t)"
|
||||
) {
|
||||
that.tableDatas[6][6] = item5[str];
|
||||
that.tableDatas[6][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "单位产品综合能耗(kgce/t)"
|
||||
) {
|
||||
that.tableDatas[7][6] = item5[str];
|
||||
that.tableDatas[7][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "单位产品成本(元/吨)"
|
||||
) {
|
||||
that.tableDatas[8][6] = item5[str];
|
||||
that.tableDatas[8][8] = item5.goal_val;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "余热发电" })
|
||||
.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][5] = data1.total_production;
|
||||
that.tableDatas[0][9] = precen(
|
||||
that.tableDatas[0][5],
|
||||
that.tableDatas[0][8]
|
||||
);
|
||||
that.tableDatas[1][5] = data1.production_hour;
|
||||
that.tableDatas[1][9] = precen(
|
||||
that.tableDatas[1][5],
|
||||
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][9] = precen(
|
||||
that.tableDatas[4][5],
|
||||
that.tableDatas[4][8]
|
||||
);
|
||||
that.tableDatas[5][5] = data1.celec_consume_unit;
|
||||
that.tableDatas[5][9] = precen(
|
||||
that.tableDatas[5][5],
|
||||
that.tableDatas[5][8]
|
||||
);
|
||||
that.tableDatas[6][5] = data1.coal_consume_unit;
|
||||
that.tableDatas[6][9] = precen(
|
||||
that.tableDatas[6][5],
|
||||
that.tableDatas[6][8]
|
||||
);
|
||||
that.tableDatas[7][5] = data1.cen_consume_unit;
|
||||
that.tableDatas[7][9] = precen(
|
||||
that.tableDatas[7][5],
|
||||
that.tableDatas[7][8]
|
||||
);
|
||||
that.tableDatas[8][5] = data1.production_cost_unit;
|
||||
that.tableDatas[8][9] = precen(
|
||||
that.tableDatas[8][5],
|
||||
that.tableDatas[8][8]
|
||||
);
|
||||
} else {
|
||||
console.log("余热发电", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
//昨日
|
||||
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 = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params3).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
let data3 = res3[0];
|
||||
that.tableDatas[0][3] = data3.total_production;
|
||||
that.tableDatas[1][3] = data3.production_hour;
|
||||
that.tableDatas[2][3] = data3.run_hour;
|
||||
that.tableDatas[3][3] = data3.run_rate;
|
||||
that.tableDatas[4][3] = data3.elec_coast;
|
||||
}
|
||||
});
|
||||
//月
|
||||
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][4] = data2.total_production;
|
||||
that.tableDatas[0][7] = precen(
|
||||
that.tableDatas[0][4],
|
||||
that.tableDatas[0][6]
|
||||
);
|
||||
that.tableDatas[1][4] = data2.production_hour;
|
||||
that.tableDatas[1][7] = precen(
|
||||
that.tableDatas[1][4],
|
||||
that.tableDatas[1][6]
|
||||
);
|
||||
that.tableDatas[2][4] = data2.run_hour;
|
||||
that.tableDatas[2][7] = precen(
|
||||
that.tableDatas[2][4],
|
||||
that.tableDatas[2][6]
|
||||
);
|
||||
that.tableDatas[3][4] = data2.run_rate;
|
||||
that.tableDatas[3][7] = precen(
|
||||
that.tableDatas[3][4],
|
||||
that.tableDatas[3][6]
|
||||
);
|
||||
that.tableDatas[4][4] = data2.elec_consume_unit;
|
||||
that.tableDatas[4][7] = precen(
|
||||
that.tableDatas[4][4],
|
||||
that.tableDatas[4][6]
|
||||
);
|
||||
that.tableDatas[5][4] = data2.celec_consume_unit;
|
||||
that.tableDatas[5][7] = precen(
|
||||
that.tableDatas[5][4],
|
||||
that.tableDatas[5][6]
|
||||
);
|
||||
that.tableDatas[6][4] = data2.coal_consume_unit;
|
||||
that.tableDatas[6][7] = precen(
|
||||
that.tableDatas[6][4],
|
||||
that.tableDatas[6][6]
|
||||
);
|
||||
that.tableDatas[7][4] = data2.cen_consume_unit;
|
||||
that.tableDatas[7][7] = precen(
|
||||
that.tableDatas[7][4],
|
||||
that.tableDatas[7][6]
|
||||
);
|
||||
that.tableDatas[8][4] = data2.production_cost_unit;
|
||||
that.tableDatas[8][7] = precen(
|
||||
that.tableDatas[8][4],
|
||||
that.tableDatas[8][6]
|
||||
);
|
||||
//上小时
|
||||
let params4 = {};
|
||||
params4.page = 0;
|
||||
params4.year = year_h;
|
||||
params4.month = month_h;
|
||||
params4.day = days_h;
|
||||
params4.hour = hours_h;
|
||||
params4.type = "hour_st";
|
||||
params4.mgroup = this.query.mgroup;
|
||||
this.$API.enm.enstat.req(params4).then((res4) => {
|
||||
if (res4.length > 0) {
|
||||
let data4 = res4[0];
|
||||
that.tableDatas[0][2] = data4.total_production;
|
||||
that.tableDatas[4][2] = data4.elec_coast;
|
||||
}
|
||||
});
|
||||
let params5 = {};
|
||||
params5.page = 0;
|
||||
params5.mgroup = this.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 == "总发电量(KW·h/t)"
|
||||
) {
|
||||
that.tableDatas[0][6] = item5[str];
|
||||
that.tableDatas[0][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name ==
|
||||
"单位发电量(KW·h/t)"
|
||||
) {
|
||||
that.tableDatas[1][6] = item5[str];
|
||||
that.tableDatas[1][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "运转时间(h)"
|
||||
) {
|
||||
that.tableDatas[2][6] = item5[str];
|
||||
that.tableDatas[2][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "运转率(%)"
|
||||
) {
|
||||
that.tableDatas[3][6] = item5[str];
|
||||
that.tableDatas[3][8] = item5.goal_val;
|
||||
} else if (
|
||||
item5.goal_cate_name == "用电量(KW·h)"
|
||||
) {
|
||||
that.tableDatas[4][6] = item5[str];
|
||||
that.tableDatas[4][8] = item5.goal_val;
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.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][5] = data1.total_production;
|
||||
that.tableDatas[0][9] = precen(
|
||||
that.tableDatas[0][5],
|
||||
that.tableDatas[0][8]
|
||||
);
|
||||
that.tableDatas[1][5] = data1.production_hour;
|
||||
that.tableDatas[1][9] = precen(
|
||||
that.tableDatas[1][5],
|
||||
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_coast;
|
||||
that.tableDatas[4][9] = precen(
|
||||
that.tableDatas[4][5],
|
||||
that.tableDatas[4][8]
|
||||
);
|
||||
} else {
|
||||
}
|
||||
});
|
||||
//月
|
||||
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][4] = data2.total_production;
|
||||
that.tableDatas[0][7] = precen(
|
||||
that.tableDatas[0][4],
|
||||
that.tableDatas[0][6]
|
||||
);
|
||||
that.tableDatas[1][4] = data2.production_hour;
|
||||
that.tableDatas[1][7] = precen(
|
||||
that.tableDatas[1][4],
|
||||
that.tableDatas[1][6]
|
||||
);
|
||||
that.tableDatas[2][4] = data2.run_hour;
|
||||
that.tableDatas[2][7] = precen(
|
||||
that.tableDatas[2][4],
|
||||
that.tableDatas[2][6]
|
||||
);
|
||||
that.tableDatas[3][4] = data2.run_rate;
|
||||
that.tableDatas[3][7] = precen(
|
||||
that.tableDatas[3][4],
|
||||
that.tableDatas[3][6]
|
||||
);
|
||||
that.tableDatas[4][4] = data2.elec_coast;
|
||||
that.tableDatas[4][7] = precen(
|
||||
that.tableDatas[4][4],
|
||||
that.tableDatas[4][6]
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
});
|
||||
that.getHourData();
|
||||
that.getDayData();
|
||||
that.getMonthData();
|
||||
},
|
||||
methods: {
|
||||
//获取小时数据
|
||||
|
|
|
@ -85,9 +85,10 @@ export default {
|
|||
year_s: "",
|
||||
page: 0,
|
||||
type: "month_st",
|
||||
mgroup: "3347217246321065984",
|
||||
mgroup: "",
|
||||
},
|
||||
tableDatas: [],
|
||||
exportLoading: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -95,7 +96,13 @@ export default {
|
|||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
this.getData();
|
||||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "余热发电" })
|
||||
.then((res) => {
|
||||
console.log("余热发电", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
this.getData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
|
@ -104,7 +111,7 @@ export default {
|
|||
query0.page = 0;
|
||||
query0.type = "month_st";
|
||||
query0.year_s = that.query.year_s - 1;
|
||||
query0.mgroup = "3347217246321065984";
|
||||
query0.mgroup = that.query.mgroup;
|
||||
let wrapArr = [],
|
||||
wrapArr0 = [],
|
||||
wrapArrs = [];
|
||||
|
@ -116,6 +123,7 @@ export default {
|
|||
//先按月份排序,再按班组排序
|
||||
let n0 = item0.month_s;
|
||||
let ind0 = 0;
|
||||
let team_name0 = item0.team_name;
|
||||
if (team_name0.indexOf("甲") > -1) {
|
||||
ind0 = (n0 - 1) * 3;
|
||||
} else if (team_name0.indexOf("乙") > -1) {
|
||||
|
@ -152,7 +160,7 @@ export default {
|
|||
arr.push(item.total_production);
|
||||
arr.push(item.production_hour);
|
||||
arr.push(item.run_rate);
|
||||
//煤耗
|
||||
//发电量
|
||||
arr[5] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
arr[6] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
||||
arr[7] = item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||
|
@ -175,51 +183,6 @@ export default {
|
|||
arr[9] = item.celec_consume_unit; //当期与环期差值(KW·h/t)
|
||||
arr[10] = item.celec_consume_unit; //环比增长率(%)
|
||||
arr[11] = item.celec_consume_unit; //同比增长率(%)
|
||||
//电耗
|
||||
//设备
|
||||
arr[12] =
|
||||
item.高温风机_consume_unit != null
|
||||
? item.高温风机_consume_unit
|
||||
: "/";
|
||||
arr[13] =
|
||||
item.篦冷机一室风机_consume_unit != null
|
||||
? item.篦冷机一室风机_consume_unit
|
||||
: "/";
|
||||
arr[14] =
|
||||
item.篦冷机三室风机_consume_unit != null
|
||||
? item.篦冷机三室风机_consume_unit
|
||||
: "/";
|
||||
arr[15] =
|
||||
item.篦冷机二室风机_consume_unit != null
|
||||
? item.篦冷机二室风机_consume_unit
|
||||
: "/";
|
||||
arr[16] =
|
||||
item.窑头排风机_consume_unit != null
|
||||
? item.窑头排风机_consume_unit
|
||||
: "/";
|
||||
arr[17] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
arr[18] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
||||
arr[19] = item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||
let ind_pre1 = 0,
|
||||
huanbi1 = 0;
|
||||
if (item.month_s == 1) {
|
||||
ind_pre1 = 12;
|
||||
huanbi1 = wrapArr0[ind_pre]
|
||||
? wrapArr0[ind_pre].elec_consume_unit
|
||||
: "/";
|
||||
} else {
|
||||
ind_pre1 = ind - 1;
|
||||
huanbi1 = wrapArr[ind_pre]
|
||||
? wrapArr[ind_pre].elec_consume_unit
|
||||
? wrapArr[ind_pre].elec_consume_unit
|
||||
: "/"
|
||||
: "/";
|
||||
}
|
||||
arr[20] = huanbi; //环期值(KW·h/t)上个月的值
|
||||
arr[21] = item.celec_consume_unit; //当期与环期差值(KW·h/t)
|
||||
arr[22] = item.celec_consume_unit; //环比增长率(%)
|
||||
arr[23] = item.celec_consume_unit; //同比增长率(%)
|
||||
arr[24] = item.celec_consume_unit; //同比增长率(%)
|
||||
wrapArr[ind] = arr;
|
||||
});
|
||||
console.log(wrapArr);
|
||||
|
|
|
@ -257,12 +257,13 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
exportLoading: false,
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
query: {
|
||||
type: 1,
|
||||
year_s: "",
|
||||
mgroup: "3347217246321065984",
|
||||
mgroup: "",
|
||||
},
|
||||
monthGoal: [],
|
||||
monthGoal2: [],
|
||||
|
@ -304,87 +305,13 @@ export default {
|
|||
var myDate = new Date();
|
||||
let year = myDate.getFullYear();
|
||||
that.query.year_s = year;
|
||||
//月目标
|
||||
let paramsGoal = {};
|
||||
paramsGoal.page = 0;
|
||||
paramsGoal.mgroup = that.query.mgroup;
|
||||
that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
|
||||
if (ress.length > 0) {
|
||||
let monthGoal = [],
|
||||
monthGoal2 = [],
|
||||
monthGoal3 = [],
|
||||
monthGoal4 = [];
|
||||
ress.forEach((goal) => {
|
||||
if (goal.goal_cate_name == "单位产品分布电耗(KW·h/t)") {
|
||||
monthGoal[0] = goal.goal_val;
|
||||
monthGoal[1] = goal.goal_val_2;
|
||||
monthGoal[2] = goal.goal_val_3;
|
||||
monthGoal[3] = goal.goal_val_4;
|
||||
monthGoal[4] = goal.goal_val_5;
|
||||
monthGoal[5] = goal.goal_val_6;
|
||||
monthGoal[6] = goal.goal_val_7;
|
||||
monthGoal[7] = goal.goal_val_8;
|
||||
monthGoal[8] = goal.goal_val_9;
|
||||
monthGoal[9] = goal.goal_val_10;
|
||||
monthGoal[10] = goal.goal_val_11;
|
||||
monthGoal[11] = goal.goal_val_12;
|
||||
monthGoal[12] = goal.goal_val_12;
|
||||
that.monthGoal = monthGoal;
|
||||
}
|
||||
if (goal.goal_cate_name == "单位产品综合电耗(KW·h/t)") {
|
||||
monthGoal2[0] = goal.goal_val;
|
||||
monthGoal2[1] = goal.goal_val_2;
|
||||
monthGoal2[2] = goal.goal_val_3;
|
||||
monthGoal2[3] = goal.goal_val_4;
|
||||
monthGoal2[4] = goal.goal_val_5;
|
||||
monthGoal2[5] = goal.goal_val_6;
|
||||
monthGoal2[6] = goal.goal_val_7;
|
||||
monthGoal2[7] = goal.goal_val_8;
|
||||
monthGoal2[8] = goal.goal_val_9;
|
||||
monthGoal2[9] = goal.goal_val_10;
|
||||
monthGoal2[10] = goal.goal_val_11;
|
||||
monthGoal2[11] = goal.goal_val_12;
|
||||
monthGoal2[12] = goal.goal_val_12;
|
||||
that.monthGoal2 = monthGoal2;
|
||||
}
|
||||
if (goal.goal_cate_name == "单位产品标煤耗(kgce/t)") {
|
||||
monthGoal3[0] = goal.goal_val;
|
||||
monthGoal3[1] = goal.goal_val_2;
|
||||
monthGoal3[2] = goal.goal_val_3;
|
||||
monthGoal3[3] = goal.goal_val_4;
|
||||
monthGoal3[4] = goal.goal_val_5;
|
||||
monthGoal3[5] = goal.goal_val_6;
|
||||
monthGoal3[6] = goal.goal_val_7;
|
||||
monthGoal3[7] = goal.goal_val_8;
|
||||
monthGoal3[8] = goal.goal_val_9;
|
||||
monthGoal3[9] = goal.goal_val_10;
|
||||
monthGoal3[10] = goal.goal_val_11;
|
||||
monthGoal3[11] = goal.goal_val_12;
|
||||
monthGoal3[12] = goal.goal_val_12;
|
||||
that.monthGoal3 = monthGoal3;
|
||||
}
|
||||
if (goal.goal_cate_name == "单位产品综合能耗(kgce/t)") {
|
||||
monthGoal4[0] = goal.goal_val;
|
||||
monthGoal4[1] = goal.goal_val_2;
|
||||
monthGoal4[2] = goal.goal_val_3;
|
||||
monthGoal4[3] = goal.goal_val_4;
|
||||
monthGoal4[4] = goal.goal_val_5;
|
||||
monthGoal4[5] = goal.goal_val_6;
|
||||
monthGoal4[6] = goal.goal_val_7;
|
||||
monthGoal4[7] = goal.goal_val_8;
|
||||
monthGoal4[8] = goal.goal_val_9;
|
||||
monthGoal4[9] = goal.goal_val_10;
|
||||
monthGoal4[10] = goal.goal_val_11;
|
||||
monthGoal4[11] = goal.goal_val_12;
|
||||
monthGoal4[12] = goal.goal_val_12;
|
||||
that.monthGoal4 = monthGoal4;
|
||||
}
|
||||
});
|
||||
this.getData();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
});
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "余热发电" })
|
||||
.then((res) => {
|
||||
console.log("余热发电", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
that.getMonthGoal();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 动态绑定Class
|
||||
|
@ -403,6 +330,96 @@ export default {
|
|||
}
|
||||
return classInfo;
|
||||
},
|
||||
//月目标
|
||||
getMonthGoal() {
|
||||
let that = this;
|
||||
let paramsGoal = {};
|
||||
paramsGoal.page = 0;
|
||||
paramsGoal.mgroup = that.query.mgroup;
|
||||
that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
|
||||
if (ress.length > 0) {
|
||||
let monthGoal = [],
|
||||
monthGoal2 = [],
|
||||
monthGoal3 = [],
|
||||
monthGoal4 = [];
|
||||
ress.forEach((goal) => {
|
||||
if (
|
||||
goal.goal_cate_name == "单位产品分布电耗(KW·h/t)"
|
||||
) {
|
||||
monthGoal[0] = goal.goal_val;
|
||||
monthGoal[1] = goal.goal_val_2;
|
||||
monthGoal[2] = goal.goal_val_3;
|
||||
monthGoal[3] = goal.goal_val_4;
|
||||
monthGoal[4] = goal.goal_val_5;
|
||||
monthGoal[5] = goal.goal_val_6;
|
||||
monthGoal[6] = goal.goal_val_7;
|
||||
monthGoal[7] = goal.goal_val_8;
|
||||
monthGoal[8] = goal.goal_val_9;
|
||||
monthGoal[9] = goal.goal_val_10;
|
||||
monthGoal[10] = goal.goal_val_11;
|
||||
monthGoal[11] = goal.goal_val_12;
|
||||
monthGoal[12] = goal.goal_val_12;
|
||||
that.monthGoal = monthGoal;
|
||||
}
|
||||
if (
|
||||
goal.goal_cate_name == "单位产品综合电耗(KW·h/t)"
|
||||
) {
|
||||
monthGoal2[0] = goal.goal_val;
|
||||
monthGoal2[1] = goal.goal_val_2;
|
||||
monthGoal2[2] = goal.goal_val_3;
|
||||
monthGoal2[3] = goal.goal_val_4;
|
||||
monthGoal2[4] = goal.goal_val_5;
|
||||
monthGoal2[5] = goal.goal_val_6;
|
||||
monthGoal2[6] = goal.goal_val_7;
|
||||
monthGoal2[7] = goal.goal_val_8;
|
||||
monthGoal2[8] = goal.goal_val_9;
|
||||
monthGoal2[9] = goal.goal_val_10;
|
||||
monthGoal2[10] = goal.goal_val_11;
|
||||
monthGoal2[11] = goal.goal_val_12;
|
||||
monthGoal2[12] = goal.goal_val_12;
|
||||
that.monthGoal2 = monthGoal2;
|
||||
}
|
||||
if (goal.goal_cate_name == "单位产品标煤耗(kgce/t)") {
|
||||
monthGoal3[0] = goal.goal_val;
|
||||
monthGoal3[1] = goal.goal_val_2;
|
||||
monthGoal3[2] = goal.goal_val_3;
|
||||
monthGoal3[3] = goal.goal_val_4;
|
||||
monthGoal3[4] = goal.goal_val_5;
|
||||
monthGoal3[5] = goal.goal_val_6;
|
||||
monthGoal3[6] = goal.goal_val_7;
|
||||
monthGoal3[7] = goal.goal_val_8;
|
||||
monthGoal3[8] = goal.goal_val_9;
|
||||
monthGoal3[9] = goal.goal_val_10;
|
||||
monthGoal3[10] = goal.goal_val_11;
|
||||
monthGoal3[11] = goal.goal_val_12;
|
||||
monthGoal3[12] = goal.goal_val_12;
|
||||
that.monthGoal3 = monthGoal3;
|
||||
}
|
||||
if (
|
||||
goal.goal_cate_name == "单位产品综合能耗(kgce/t)"
|
||||
) {
|
||||
monthGoal4[0] = goal.goal_val;
|
||||
monthGoal4[1] = goal.goal_val_2;
|
||||
monthGoal4[2] = goal.goal_val_3;
|
||||
monthGoal4[3] = goal.goal_val_4;
|
||||
monthGoal4[4] = goal.goal_val_5;
|
||||
monthGoal4[5] = goal.goal_val_6;
|
||||
monthGoal4[6] = goal.goal_val_7;
|
||||
monthGoal4[7] = goal.goal_val_8;
|
||||
monthGoal4[8] = goal.goal_val_9;
|
||||
monthGoal4[9] = goal.goal_val_10;
|
||||
monthGoal4[10] = goal.goal_val_11;
|
||||
monthGoal4[11] = goal.goal_val_12;
|
||||
monthGoal4[12] = goal.goal_val_12;
|
||||
that.monthGoal4 = monthGoal4;
|
||||
}
|
||||
});
|
||||
that.getData();
|
||||
} else {
|
||||
that.getData();
|
||||
}
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
let that = this;
|
||||
let query0 = {};
|
||||
|
@ -893,6 +910,10 @@ export default {
|
|||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
typeCange() {},
|
||||
handleQuery() {
|
||||
this.getMonthGoal();
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT("#myReport");
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue