fix: 能管页面更改

This commit is contained in:
zty 2024-08-16 18:42:42 +08:00
parent 048a2339d4
commit 4aaad74a6a
4 changed files with 24 additions and 15 deletions

View File

@ -485,9 +485,10 @@ export default {
obj.mgroup__name = "回转窑"; obj.mgroup__name = "回转窑";
obj.page = 0; obj.page = 0;
obj.enabled = 1; obj.enabled = 1;
obj.material__code__in = "elec,elec_0";
obj.ep_monitored__isnull = 0;
obj.need_display = 1; obj.need_display = 1;
obj.ordering = "report_sortstr"; obj.ordering = "report_sortstr";
obj.material__code__in = "elec,elec_0";
this.$API.enm.mpoint.list.req(obj).then((res) => { this.$API.enm.mpoint.list.req(obj).then((res) => {
console.log("mpoints", res); console.log("mpoints", res);
let arr = []; let arr = [];
@ -730,7 +731,10 @@ export default {
data.forEach((item) => { data.forEach((item) => {
let ind = item.month_s - 1; let ind = item.month_s - 1;
let index = that.mpoints.indexOf(item.mpoint_name); //mpoint let index = that.mpoints.indexOf(item.mpoint_name); //mpoint
if(index != undefined){
seriesData[index][ind] = item.elec_consume_unit; seriesData[index][ind] = item.elec_consume_unit;
}
}); });
let options = { ...that.option3 }; let options = { ...that.option3 };
for (let j = 0; j < that.mpoints.length; j++) { for (let j = 0; j < that.mpoints.length; j++) {

View File

@ -125,7 +125,7 @@ export default {
methods: { methods: {
// //
getMgroup() { getMgroup() {
this.$API.mtm.mgroup.list.req({ page: 0 }).then(res => { this.$API.mtm.mgroup.list.req({ page: 0, cate: 'section' }).then(res => {
res.forEach(item => { res.forEach(item => {
if (item.name !== '煤磨' && item.name !== '水泥包装') { if (item.name !== '煤磨' && item.name !== '水泥包装') {
this.mgroupOptions.push(item); this.mgroupOptions.push(item);
@ -133,7 +133,8 @@ export default {
}) })
this.mgroupOptions = this.mgroupOptions.reverse(); this.mgroupOptions = this.mgroupOptions.reverse();
this.query.mgroup = this.mgroupOptions[0].id; this.query.mgroup = this.mgroupOptions[0].id;
this.tableName = '电石渣干粉核算' this.tableName = this.mgroupOptions[0].name;
this.getTableData();
}) })
}, },
// //
@ -143,6 +144,7 @@ export default {
}) })
}, },
mgroupChange(value) { mgroupChange(value) {
if(value){
let arr = this.mgroupOptions.filter(item => { let arr = this.mgroupOptions.filter(item => {
return item.id == value return item.id == value
}) })
@ -156,6 +158,8 @@ export default {
} else if (name == '水泥磨') { } else if (name == '水泥磨') {
this.tableName = '水泥核算' this.tableName = '水泥核算'
} }
}
}, },
// //

View File

@ -216,8 +216,9 @@
that.header3 = ['比表面积','SO3','掺量'];// that.header3 = ['比表面积','SO3','掺量'];//
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];// that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//
} }
let params = {}; let params = {page: 0};
let arr = []; let arr = [];
if(that.query.type==0){// if(that.query.type==0){//
arr = that.query.month.split('-'); arr = that.query.month.split('-');
params.year_s = arr[0]; params.year_s = arr[0];
@ -229,7 +230,7 @@
} }
params.mgroup__belong_dept = that.query.belong_dept; params.mgroup__belong_dept = that.query.belong_dept;
this.$API.enm.enstat.req(params).then((res) => { this.$API.enm.enstat.req(params).then((res) => {
let data = res.results; let data = res;
let wrapArr = []; let wrapArr = [];
let innerArr = []; let innerArr = [];
let ind = 0; let ind = 0;
@ -292,14 +293,14 @@
itemArr[ind] = item3.val_avg.toFixed(2); itemArr[ind] = item3.val_avg.toFixed(2);
itemArr.push(item3.num_test) itemArr.push(item3.num_test)
itemArr.push(item3.num_ok) itemArr.push(item3.num_ok)
let pass = (item3.rate_pass*100).toFixed(2); let pass = (item3.rate_pass).toFixed(2);
pass= pass+'%'; pass= pass+'%';
itemArr.push(pass) itemArr.push(pass)
}else{ }else{
itemArr.push(item3.val_avg.toFixed(2)) itemArr.push(item3.val_avg.toFixed(2))
itemArr.push(item3.num_test) itemArr.push(item3.num_test)
itemArr.push(item3.num_ok) itemArr.push(item3.num_ok)
let pass = (item3.rate_pass*100).toFixed(2); let pass = (item3.rate_pass).toFixed(2);
pass= pass+'%'; pass= pass+'%';
itemArr.push(pass) itemArr.push(pass)
} }

View File

@ -63,7 +63,7 @@
<th>CaO%</th> <th>CaO%</th>
<th>循环风机KW·h/t</th> <th>循环风机KW·h/t</th>
<th>尾排风机KW·h/t</th> <th>尾排风机KW·h/t</th>
<th>废气风KW·h/t</th> <th>立磨主电KW·h/t</th>
<th>当期值KW·h/t</th> <th>当期值KW·h/t</th>
<th>目标值KW·h/t</th> <th>目标值KW·h/t</th>
@ -216,18 +216,18 @@ export default {
item.循环风机_consume_unit != null item.循环风机_consume_unit != null
? item.循环风机_consume_unit ? item.循环风机_consume_unit
: "/"; : "/";
arr[13] = arr[14] =
item.尾排风机_consume_unit != null item.尾排风机_consume_unit != null
? item.尾排风机_consume_unit ? item.尾排风机_consume_unit
: "/"; : "/";
arr[13] = arr[15] =
item.废气风_consume_unit != null item.立磨主电_consume_unit != null
? item.废气风_consume_unit ? item.立磨主电_consume_unit
: "/"; : "/";
// //
arr[16] = item.elec_consume_unit; //KW·h/t arr[16] = item.elec_consume_unit; //KW·h/t
let keyVale = "goal_val_" + n; let keyVale = "goal_val_" + n;
arr[17] = goalData[keyVale]; //KW·h/t// arr[17] = goalData[keyVale]?goalData[keyVale]:0; //KW·h/t//
arr[18] = item.celec_consume_unit - arr[16]; //KW·h/t arr[18] = item.celec_consume_unit - arr[16]; //KW·h/t
let ind_pre = 0, let ind_pre = 0,
huanbi = 0; huanbi = 0;