feat:修改班组得分
This commit is contained in:
parent
ce9e15f83d
commit
6584c82499
|
@ -269,43 +269,43 @@ export default {
|
||||||
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
||||||
let elec_score = 0;
|
let elec_score = 0;
|
||||||
if (index === 0){
|
if (index === 0){
|
||||||
elec_score= 20;
|
|
||||||
} else if (index === 1) {
|
|
||||||
elec_score= 15;
|
elec_score= 15;
|
||||||
|
} else if (index === 1) {
|
||||||
|
elec_score= 10;
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
elec_score= 5;
|
elec_score= 8;
|
||||||
} else if (index === 3) {
|
} else if (index === 3) {
|
||||||
elec_score= 0;
|
elec_score= 5;
|
||||||
}
|
}
|
||||||
arr[15] += elec_score;
|
arr[15] += elec_score;
|
||||||
|
|
||||||
const run_rate_itemValue = item.run_rate; // 运转率的值
|
// const run_rate_itemValue = item.run_rate; // 运转率的值
|
||||||
const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
// const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
||||||
const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
// const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
||||||
let run_rate_score = 0;
|
// let run_rate_score = 0;
|
||||||
if (run_rate_index === 0){
|
// if (run_rate_index === 0){
|
||||||
run_rate_score= 20;
|
// run_rate_score= 20;
|
||||||
} else if (run_rate_index === 1) {
|
// } else if (run_rate_index === 1) {
|
||||||
run_rate_score= 15;
|
// run_rate_score= 15;
|
||||||
} else if (run_rate_index === 2) {
|
// } else if (run_rate_index === 2) {
|
||||||
run_rate_score= 5;
|
// run_rate_score= 5;
|
||||||
} else if (run_rate_index === 3) {
|
// } else if (run_rate_index === 3) {
|
||||||
run_rate_score= 0;
|
// run_rate_score= 0;
|
||||||
}
|
// }
|
||||||
arr[15] += run_rate_score;
|
// arr[15] += run_rate_score;
|
||||||
|
|
||||||
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
||||||
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
||||||
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
||||||
let production_hour_score = 0;
|
let production_hour_score = 0;
|
||||||
if (production_hour_index === 0){
|
if (production_hour_index === 0){
|
||||||
production_hour_score= 20;
|
production_hour_score= 10;
|
||||||
} else if (production_hour_index === 1) {
|
} else if (production_hour_index === 1) {
|
||||||
production_hour_score= 15;
|
production_hour_score= 8;
|
||||||
} else if (production_hour_index === 2) {
|
} else if (production_hour_index === 2) {
|
||||||
production_hour_score= 5;
|
production_hour_score= 6;
|
||||||
} else if (production_hour_index === 3) {
|
} else if (production_hour_index === 3) {
|
||||||
production_hour_score= 0;
|
production_hour_score= 4;
|
||||||
}
|
}
|
||||||
arr[15] += production_hour_score;
|
arr[15] += production_hour_score;
|
||||||
|
|
||||||
|
@ -314,13 +314,13 @@ export default {
|
||||||
const xidu_index = xidu_sortedData.findIndex(obj => parseFloat(obj.xidu) === parseFloat(xidu_itemValue));
|
const xidu_index = xidu_sortedData.findIndex(obj => parseFloat(obj.xidu) === parseFloat(xidu_itemValue));
|
||||||
let xidu_score = 0;
|
let xidu_score = 0;
|
||||||
if (xidu_index === 0){
|
if (xidu_index === 0){
|
||||||
xidu_score= 20;
|
xidu_score= 8;
|
||||||
} else if (xidu_index === 1) {
|
} else if (xidu_index === 1) {
|
||||||
xidu_score= 15;
|
xidu_score= 6;
|
||||||
} else if (xidu_index === 2) {
|
} else if (xidu_index === 2) {
|
||||||
xidu_score= 5;
|
xidu_score= 5;
|
||||||
} else if (xidu_index === 3) {
|
} else if (xidu_index === 3) {
|
||||||
xidu_score= 0;
|
xidu_score= 3;
|
||||||
}
|
}
|
||||||
arr[15] += xidu_score;
|
arr[15] += xidu_score;
|
||||||
|
|
||||||
|
@ -329,15 +329,16 @@ export default {
|
||||||
const coal_powder_index = coal_powder_sortedData.findIndex(obj => parseFloat(obj.coal_powder) === parseFloat(coal_powder_itemValue));
|
const coal_powder_index = coal_powder_sortedData.findIndex(obj => parseFloat(obj.coal_powder) === parseFloat(coal_powder_itemValue));
|
||||||
let coal_powder_score = 0;
|
let coal_powder_score = 0;
|
||||||
if (coal_powder_index === 0){
|
if (coal_powder_index === 0){
|
||||||
coal_powder_score= 20;
|
coal_powder_score= 7;
|
||||||
} else if (coal_powder_index === 1) {
|
} else if (coal_powder_index === 1) {
|
||||||
coal_powder_score= 15;
|
coal_powder_score= 4;
|
||||||
} else if (coal_powder_index === 2) {
|
} else if (coal_powder_index === 2) {
|
||||||
coal_powder_score= 5;
|
coal_powder_score= 3;
|
||||||
} else if (coal_powder_index === 3) {
|
} else if (coal_powder_index === 3) {
|
||||||
coal_powder_score= 0;
|
coal_powder_score= 2;
|
||||||
}
|
}
|
||||||
arr[15] += coal_powder_score;
|
arr[15] += coal_powder_score;
|
||||||
|
arr[15] += 60;
|
||||||
}
|
}
|
||||||
wrapArr.push(arr);
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
|
|
|
@ -200,6 +200,7 @@ export default {
|
||||||
production_cost_unit:item.production_cost_unit,
|
production_cost_unit:item.production_cost_unit,
|
||||||
CaO:item.出窑熟料_fCaO_rate_pass,
|
CaO:item.出窑熟料_fCaO_rate_pass,
|
||||||
coal_consume_unit:item.coal_consume_unit,
|
coal_consume_unit:item.coal_consume_unit,
|
||||||
|
Fe2o3:item.入窑生料_Fe2O3_rate_pass,
|
||||||
elec:item.elec_consume_unit,
|
elec:item.elec_consume_unit,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -370,90 +371,91 @@ export default {
|
||||||
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
||||||
let elec_score = 0;
|
let elec_score = 0;
|
||||||
if (index === 0){
|
if (index === 0){
|
||||||
elec_score= 20;
|
|
||||||
} else if (index === 1) {
|
|
||||||
elec_score= 15;
|
elec_score= 15;
|
||||||
|
} else if (index === 1) {
|
||||||
|
elec_score= 10;
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
elec_score= 5;
|
elec_score= 8;
|
||||||
} else if (index === 3) {
|
} else if (index === 3) {
|
||||||
elec_score= 0;
|
elec_score= 5;
|
||||||
}
|
}
|
||||||
arr[29] += elec_score;
|
arr[29] += elec_score;
|
||||||
|
|
||||||
const run_rate_itemValue = item.run_rate; // 运转率的值
|
// const run_rate_itemValue = item.run_rate; // 运转率的值
|
||||||
const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
// const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
||||||
const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
// const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
||||||
let run_rate_score = 0;
|
// let run_rate_score = 0;
|
||||||
if (run_rate_index === 0){
|
// if (run_rate_index === 0){
|
||||||
run_rate_score= 10;
|
// run_rate_score= 10;
|
||||||
} else if (run_rate_index === 1) {
|
// } else if (run_rate_index === 1) {
|
||||||
run_rate_score= 7;
|
// run_rate_score= 7;
|
||||||
} else if (run_rate_index === 2) {
|
// } else if (run_rate_index === 2) {
|
||||||
run_rate_score= 3;
|
// run_rate_score= 3;
|
||||||
} else if (run_rate_index === 3) {
|
// } else if (run_rate_index === 3) {
|
||||||
run_rate_score= 0;
|
// run_rate_score= 0;
|
||||||
}
|
// }
|
||||||
arr[29] += run_rate_score;
|
// arr[29] += run_rate_score;
|
||||||
|
|
||||||
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
||||||
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
||||||
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
||||||
let production_hour_score = 0;
|
let production_hour_score = 0;
|
||||||
if (production_hour_index === 0){
|
if (production_hour_index === 0){
|
||||||
production_hour_score= 20;
|
production_hour_score= 10;
|
||||||
} else if (production_hour_index === 1) {
|
} else if (production_hour_index === 1) {
|
||||||
production_hour_score= 15;
|
production_hour_score= 8;
|
||||||
} else if (production_hour_index === 2) {
|
} else if (production_hour_index === 2) {
|
||||||
production_hour_score= 5;
|
production_hour_score= 6;
|
||||||
} else if (production_hour_index === 3) {
|
} else if (production_hour_index === 3) {
|
||||||
production_hour_score= 0;
|
production_hour_score= 4;
|
||||||
}
|
}
|
||||||
arr[29] += production_hour_score;
|
arr[29] += production_hour_score;
|
||||||
|
|
||||||
const production_cost_unit_itemValue = item.production_cost_unit; // 单位产品成本的值
|
// 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));
|
// const production_cost_unit_sortedData = monthData.sort((a, b) => parseFloat(b.production_cost_unit) - parseFloat(a.production_cost_unit));
|
||||||
const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
// const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
||||||
let production_cost_unit_score = 0;
|
// let production_cost_unit_score = 0;
|
||||||
if (production_cost_unit_index === 0){
|
// if (production_cost_unit_index === 0){
|
||||||
production_cost_unit_score= 10;
|
// production_cost_unit_score= 10;
|
||||||
} else if (production_cost_unit_index === 1) {
|
// } else if (production_cost_unit_index === 1) {
|
||||||
production_cost_unit_score= 7;
|
// production_cost_unit_score= 7;
|
||||||
} else if (production_cost_unit_index === 2) {
|
// } else if (production_cost_unit_index === 2) {
|
||||||
production_cost_unit_score= 3;
|
// production_cost_unit_score= 3;
|
||||||
} else if (production_cost_unit_index === 3) {
|
// } else if (production_cost_unit_index === 3) {
|
||||||
production_cost_unit_score= 0;
|
// production_cost_unit_score= 0;
|
||||||
}
|
// }
|
||||||
arr[29] += production_cost_unit_score;
|
// arr[29] += production_cost_unit_score;
|
||||||
|
|
||||||
const CaO_itemValue = item.出窑熟料_fCaO_rate_pass; // CaO的值
|
const CaO_itemValue = item.出窑熟料_fCaO_rate_pass; // CaO的值
|
||||||
const CaO_sortedData = monthData.sort((a, b) => parseFloat(b.CaO) - parseFloat(a.CaO));
|
const CaO_sortedData = monthData.sort((a, b) => parseFloat(b.CaO) - parseFloat(a.CaO));
|
||||||
const CaO_index = CaO_sortedData.findIndex(obj => parseFloat(obj.CaO) === parseFloat(CaO_itemValue));
|
const CaO_index = CaO_sortedData.findIndex(obj => parseFloat(obj.CaO) === parseFloat(CaO_itemValue));
|
||||||
let CaO_score = 0;
|
let CaO_score = 0;
|
||||||
if (CaO_index === 0){
|
if (CaO_index === 0){
|
||||||
CaO_score= 20;
|
CaO_score= 8;
|
||||||
} else if (CaO_index === 1) {
|
} else if (CaO_index === 1) {
|
||||||
CaO_score= 15;
|
CaO_score= 6;
|
||||||
} else if (CaO_index === 2) {
|
} else if (CaO_index === 2) {
|
||||||
CaO_score= 5;
|
CaO_score= 5;
|
||||||
} else if (CaO_index === 3) {
|
} else if (CaO_index === 3) {
|
||||||
CaO_score= 0;
|
CaO_score= 3;
|
||||||
}
|
}
|
||||||
arr[29] += CaO_score;
|
arr[29] += CaO_score;
|
||||||
|
arr [29] += 60;
|
||||||
|
|
||||||
const coal_itemValue = item.coal_consume_unit; // 当期单位产品标煤耗的值
|
// const coal_itemValue = item.coal_consume_unit; // 当期单位产品标煤耗的值
|
||||||
const coal_sortedData = monthData.sort((a, b) => parseFloat(b.coal_consume_unit) - parseFloat(a.coal_consume_unit));
|
// const coal_sortedData = monthData.sort((a, b) => parseFloat(b.coal_consume_unit) - parseFloat(a.coal_consume_unit));
|
||||||
const coal_index = coal_sortedData.findIndex(obj => parseFloat(obj.coal_consume_unit) === parseFloat(coal_itemValue));
|
// const coal_index = coal_sortedData.findIndex(obj => parseFloat(obj.coal_consume_unit) === parseFloat(coal_itemValue));
|
||||||
let coal_score = 0;
|
// let coal_score = 0;
|
||||||
if (coal_index === 0){
|
// if (coal_index === 0){
|
||||||
coal_score= 20;
|
// coal_score= 20;
|
||||||
} else if (coal_index === 1) {
|
// } else if (coal_index === 1) {
|
||||||
coal_score= 15;
|
// coal_score= 15;
|
||||||
} else if (coal_index === 2) {
|
// } else if (coal_index === 2) {
|
||||||
coal_score= 5;
|
// coal_score= 5;
|
||||||
} else if (coal_index === 3) {
|
// } else if (coal_index === 3) {
|
||||||
coal_score= 0;
|
// coal_score= 0;
|
||||||
}
|
// }
|
||||||
arr[29] += coal_score;
|
// arr[29] += coal_score;
|
||||||
}
|
}
|
||||||
wrapArr.push(arr);
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
|
|
|
@ -295,63 +295,63 @@ export default {
|
||||||
}
|
}
|
||||||
arr[18] += elec_score;
|
arr[18] += elec_score;
|
||||||
|
|
||||||
const run_rate_itemValue = item.run_rate; // 运转率的值
|
// const run_rate_itemValue = item.run_rate; // 运转率的值
|
||||||
const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
// const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
||||||
const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
// const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
||||||
let run_rate_score = 0;
|
// let run_rate_score = 0;
|
||||||
if (run_rate_index === 0){
|
// if (run_rate_index === 0){
|
||||||
run_rate_score= 10;
|
// run_rate_score= 10;
|
||||||
} else if (run_rate_index === 1) {
|
// } else if (run_rate_index === 1) {
|
||||||
run_rate_score= 7;
|
// run_rate_score= 7;
|
||||||
} else if (run_rate_index === 2) {
|
// } else if (run_rate_index === 2) {
|
||||||
run_rate_score= 3;
|
// run_rate_score= 3;
|
||||||
} else if (run_rate_index === 3) {
|
// } else if (run_rate_index === 3) {
|
||||||
run_rate_score= 0;
|
// run_rate_score= 0;
|
||||||
}
|
// }
|
||||||
arr[18] += run_rate_score;
|
// arr[18] += run_rate_score;
|
||||||
|
|
||||||
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
||||||
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
||||||
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
||||||
let production_hour_score = 0;
|
let production_hour_score = 0;
|
||||||
if (production_hour_index === 0){
|
if (production_hour_index === 0){
|
||||||
production_hour_score= 20;
|
production_hour_score= 10;
|
||||||
} else if (production_hour_index === 1) {
|
} else if (production_hour_index === 1) {
|
||||||
production_hour_score= 15;
|
production_hour_score= 8;
|
||||||
} else if (production_hour_index === 2) {
|
} else if (production_hour_index === 2) {
|
||||||
production_hour_score= 5;
|
production_hour_score= 6;
|
||||||
} else if (production_hour_index === 3) {
|
} else if (production_hour_index === 3) {
|
||||||
production_hour_score= 0;
|
production_hour_score= 4;
|
||||||
}
|
}
|
||||||
arr[18] += production_hour_score;
|
arr[18] += production_hour_score;
|
||||||
|
|
||||||
const production_cost_unit_itemValue = item.production_cost_unit; // 单位产品成本的值
|
// 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));
|
// const production_cost_unit_sortedData = monthData.sort((a, b) => parseFloat(b.production_cost_unit) - parseFloat(a.production_cost_unit));
|
||||||
const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
// const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
||||||
let production_cost_unit_score = 0;
|
// let production_cost_unit_score = 0;
|
||||||
if (production_cost_unit_index === 0){
|
// if (production_cost_unit_index === 0){
|
||||||
production_cost_unit_score= 10;
|
// production_cost_unit_score= 10;
|
||||||
} else if (production_cost_unit_index === 1) {
|
// } else if (production_cost_unit_index === 1) {
|
||||||
production_cost_unit_score= 7;
|
// production_cost_unit_score= 7;
|
||||||
} else if (production_cost_unit_index === 2) {
|
// } else if (production_cost_unit_index === 2) {
|
||||||
production_cost_unit_score= 3;
|
// production_cost_unit_score= 3;
|
||||||
} else if (production_cost_unit_index === 3) {
|
// } else if (production_cost_unit_index === 3) {
|
||||||
production_cost_unit_score= 0;
|
// production_cost_unit_score= 0;
|
||||||
}
|
// }
|
||||||
arr[18] += production_cost_unit_score;
|
// arr[18] += production_cost_unit_score;
|
||||||
|
|
||||||
const surface_area_itemValue = item.出磨水泥_比表面积_rate_pass; // 比表面积的值
|
const surface_area_itemValue = item.出磨水泥_比表面积_rate_pass; // 比表面积的值
|
||||||
const surface_area_sortedData = monthData.sort((a, b) => parseFloat(b.surface_area) - parseFloat(a.surface_area));
|
const surface_area_sortedData = monthData.sort((a, b) => parseFloat(b.surface_area) - parseFloat(a.surface_area));
|
||||||
const surface_area_index = surface_area_sortedData.findIndex(obj => parseFloat(obj.surface_area) === parseFloat(surface_area_itemValue));
|
const surface_area_index = surface_area_sortedData.findIndex(obj => parseFloat(obj.surface_area) === parseFloat(surface_area_itemValue));
|
||||||
let surface_area_score = 0;
|
let surface_area_score = 0;
|
||||||
if (surface_area_index === 0){
|
if (surface_area_index === 0){
|
||||||
surface_area_score= 20;
|
surface_area_score= 6;
|
||||||
} else if (surface_area_index === 1) {
|
} else if (surface_area_index === 1) {
|
||||||
surface_area_score= 15;
|
surface_area_score= 4;
|
||||||
} else if (surface_area_index === 2) {
|
} else if (surface_area_index === 2) {
|
||||||
surface_area_score= 5;
|
surface_area_score= 3;
|
||||||
} else if (surface_area_index === 3) {
|
} else if (surface_area_index === 3) {
|
||||||
surface_area_score= 0;
|
surface_area_score= 2;
|
||||||
}
|
}
|
||||||
arr[18] += surface_area_score;
|
arr[18] += surface_area_score;
|
||||||
|
|
||||||
|
@ -360,13 +360,13 @@ export default {
|
||||||
const SO3_index = SO3_sortedData.findIndex(obj => parseFloat(obj.SO3) === parseFloat(SO3_itemValue));
|
const SO3_index = SO3_sortedData.findIndex(obj => parseFloat(obj.SO3) === parseFloat(SO3_itemValue));
|
||||||
let SO3_score = 0;
|
let SO3_score = 0;
|
||||||
if (SO3_index === 0){
|
if (SO3_index === 0){
|
||||||
SO3_score= 20;
|
SO3_score= 4;
|
||||||
} else if (SO3_index === 1) {
|
} else if (SO3_index === 1) {
|
||||||
SO3_score= 15;
|
SO3_score= 3;
|
||||||
} else if (SO3_index === 2) {
|
} else if (SO3_index === 2) {
|
||||||
SO3_score= 5;
|
SO3_score= 2;
|
||||||
} else if (SO3_index === 3) {
|
} else if (SO3_index === 3) {
|
||||||
SO3_score= 0;
|
SO3_score= 1;
|
||||||
}
|
}
|
||||||
arr[18] += SO3_score;
|
arr[18] += SO3_score;
|
||||||
|
|
||||||
|
@ -375,15 +375,16 @@ export default {
|
||||||
const CL_index = CL_sortedData.findIndex(obj => parseFloat(obj.chanliang) === parseFloat(CLitemValue));
|
const CL_index = CL_sortedData.findIndex(obj => parseFloat(obj.chanliang) === parseFloat(CLitemValue));
|
||||||
let CL_score = 0;
|
let CL_score = 0;
|
||||||
if (CL_index === 0){
|
if (CL_index === 0){
|
||||||
CL_score= 10;
|
CL_score= 5;
|
||||||
} else if (CL_index === 1) {
|
} else if (CL_index === 1) {
|
||||||
CL_score= 7;
|
CL_score= 3;
|
||||||
} else if (CL_index === 2) {
|
} else if (CL_index === 2) {
|
||||||
CL_score= 3;
|
CL_score= 3;
|
||||||
} else if (CL_index === 3) {
|
} else if (CL_index === 3) {
|
||||||
CL_score= 0;
|
CL_score= 2;
|
||||||
}
|
}
|
||||||
arr[18] += CL_score;
|
arr[18] += CL_score;
|
||||||
|
arr[18] += 60;
|
||||||
}
|
}
|
||||||
wrapArr.push(arr);
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
|
|
|
@ -277,73 +277,73 @@ export default {
|
||||||
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
||||||
let elec_score = 0;
|
let elec_score = 0;
|
||||||
if (index === 0){
|
if (index === 0){
|
||||||
elec_score= 20;
|
|
||||||
} else if (index === 1) {
|
|
||||||
elec_score= 15;
|
elec_score= 15;
|
||||||
|
} else if (index === 1) {
|
||||||
|
elec_score= 10;
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
elec_score= 5;
|
elec_score= 8;
|
||||||
} else if (index === 3) {
|
} else if (index === 3) {
|
||||||
elec_score= 0;
|
elec_score= 5;
|
||||||
}
|
}
|
||||||
arr[17] += elec_score;
|
arr[17] += elec_score;
|
||||||
|
|
||||||
const run_rate_itemValue = item.run_rate; // 运转率的值
|
// const run_rate_itemValue = item.run_rate; // 运转率的值
|
||||||
const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
// const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
||||||
const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
// const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
||||||
let run_rate_score = 0;
|
// let run_rate_score = 0;
|
||||||
if (run_rate_index === 0){
|
// if (run_rate_index === 0){
|
||||||
run_rate_score= 10;
|
// run_rate_score= 10;
|
||||||
} else if (run_rate_index === 1) {
|
// } else if (run_rate_index === 1) {
|
||||||
run_rate_score= 7;
|
// run_rate_score= 7;
|
||||||
} else if (run_rate_index === 2) {
|
// } else if (run_rate_index === 2) {
|
||||||
run_rate_score= 3;
|
// run_rate_score= 3;
|
||||||
} else if (run_rate_index === 3) {
|
// } else if (run_rate_index === 3) {
|
||||||
run_rate_score= 0;
|
// run_rate_score= 0;
|
||||||
}
|
// }
|
||||||
arr[17] += run_rate_score;
|
// arr[17] += run_rate_score;
|
||||||
|
|
||||||
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
||||||
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
||||||
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
||||||
let production_hour_score = 0;
|
let production_hour_score = 0;
|
||||||
if (production_hour_index === 0){
|
if (production_hour_index === 0){
|
||||||
production_hour_score= 20;
|
production_hour_score= 10;
|
||||||
} else if (production_hour_index === 1) {
|
} else if (production_hour_index === 1) {
|
||||||
production_hour_score= 15;
|
production_hour_score= 8;
|
||||||
} else if (production_hour_index === 2) {
|
} else if (production_hour_index === 2) {
|
||||||
production_hour_score= 5;
|
production_hour_score= 6;
|
||||||
} else if (production_hour_index === 3) {
|
} else if (production_hour_index === 3) {
|
||||||
production_hour_score= 0;
|
production_hour_score= 4;
|
||||||
}
|
}
|
||||||
arr[17] += production_hour_score;
|
arr[17] += production_hour_score;
|
||||||
|
|
||||||
const production_cost_unit_itemValue = item.production_cost_unit; // 单位产品成本的值
|
// 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));
|
// const production_cost_unit_sortedData = monthData.sort((a, b) => parseFloat(b.production_cost_unit) - parseFloat(a.production_cost_unit));
|
||||||
const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
// const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
||||||
let production_cost_unit_score = 0;
|
// let production_cost_unit_score = 0;
|
||||||
if (production_cost_unit_index === 0){
|
// if (production_cost_unit_index === 0){
|
||||||
production_cost_unit_score= 10;
|
// production_cost_unit_score= 10;
|
||||||
} else if (production_cost_unit_index === 1) {
|
// } else if (production_cost_unit_index === 1) {
|
||||||
production_cost_unit_score= 7;
|
// production_cost_unit_score= 7;
|
||||||
} else if (production_cost_unit_index === 2) {
|
// } else if (production_cost_unit_index === 2) {
|
||||||
production_cost_unit_score= 3;
|
// production_cost_unit_score= 3;
|
||||||
} else if (production_cost_unit_index === 3) {
|
// } else if (production_cost_unit_index === 3) {
|
||||||
production_cost_unit_score= 0;
|
// production_cost_unit_score= 0;
|
||||||
}
|
// }
|
||||||
arr[17] += production_cost_unit_score;
|
// arr[17] += production_cost_unit_score;
|
||||||
|
|
||||||
const xidu_itemValue = item.辅料_细度_rate_pass; // 辅料细度的值
|
const xidu_itemValue = item.辅料_细度_rate_pass; // 辅料细度的值
|
||||||
const xidu_sortedData = monthData.sort((a, b) => parseFloat(b.xidu) - parseFloat(a.xidu));
|
const xidu_sortedData = monthData.sort((a, b) => parseFloat(b.xidu) - parseFloat(a.xidu));
|
||||||
const xidu_index = xidu_sortedData.findIndex(obj => parseFloat(obj.xidu) === parseFloat(xidu_itemValue));
|
const xidu_index = xidu_sortedData.findIndex(obj => parseFloat(obj.xidu) === parseFloat(xidu_itemValue));
|
||||||
let xidu_score = 0;
|
let xidu_score = 0;
|
||||||
if (xidu_index === 0){
|
if (xidu_index === 0){
|
||||||
xidu_score= 20;
|
xidu_score= 8;
|
||||||
} else if (xidu_index === 1) {
|
} else if (xidu_index === 1) {
|
||||||
xidu_score= 15;
|
xidu_score= 6;
|
||||||
} else if (xidu_index === 2) {
|
} else if (xidu_index === 2) {
|
||||||
xidu_score= 5;
|
xidu_score= 5;
|
||||||
} else if (xidu_index === 3) {
|
} else if (xidu_index === 3) {
|
||||||
xidu_score= 0;
|
xidu_score= 3;
|
||||||
}
|
}
|
||||||
arr[17] += xidu_score;
|
arr[17] += xidu_score;
|
||||||
|
|
||||||
|
@ -352,15 +352,16 @@ export default {
|
||||||
const Fe203_index = Fe203_sortedData.findIndex(obj => parseFloat(obj.Fe203) === parseFloat(Fe203_itemValue));
|
const Fe203_index = Fe203_sortedData.findIndex(obj => parseFloat(obj.Fe203) === parseFloat(Fe203_itemValue));
|
||||||
let Fe203_score = 0;
|
let Fe203_score = 0;
|
||||||
if (Fe203_index === 0){
|
if (Fe203_index === 0){
|
||||||
Fe203_score= 20;
|
Fe203_score= 7;
|
||||||
} else if (Fe203_index === 1) {
|
} else if (Fe203_index === 1) {
|
||||||
Fe203_score= 15;
|
Fe203_score= 4;
|
||||||
} else if (Fe203_index === 2) {
|
} else if (Fe203_index === 2) {
|
||||||
Fe203_score= 5;
|
Fe203_score= 3;
|
||||||
} else if (Fe203_index === 3) {
|
} else if (Fe203_index === 3) {
|
||||||
Fe203_score= 0;
|
Fe203_score= 2;
|
||||||
}
|
}
|
||||||
arr[17] += Fe203_score;
|
arr[17] += Fe203_score;
|
||||||
|
arr[17] += 60; // 加上基础分
|
||||||
}
|
}
|
||||||
wrapArr.push(arr);
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
|
|
|
@ -188,8 +188,8 @@ export default {
|
||||||
production_hour: item.production_hour,
|
production_hour: item.production_hour,
|
||||||
run_rate:item.run_rate,
|
run_rate:item.run_rate,
|
||||||
production_cost_unit:item.production_cost_unit,
|
production_cost_unit:item.production_cost_unit,
|
||||||
xidu:item.干混生料_细度_rate_pass ,
|
xidu:item.干混生料_CaO_rate_pass ,
|
||||||
Fe203:item.干混生料_Fe2O3_rate_pass ,
|
Fe203:item.干混生料_Fe2O3_rate_pass ,
|
||||||
elec:item.elec_consume_unit,
|
elec:item.elec_consume_unit,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -281,90 +281,91 @@ export default {
|
||||||
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue));
|
||||||
let elec_score = 0;
|
let elec_score = 0;
|
||||||
if (index === 0){
|
if (index === 0){
|
||||||
elec_score= 20;
|
|
||||||
} else if (index === 1) {
|
|
||||||
elec_score= 15;
|
elec_score= 15;
|
||||||
|
} else if (index === 1) {
|
||||||
|
elec_score= 10;
|
||||||
} else if (index === 2) {
|
} else if (index === 2) {
|
||||||
elec_score= 5;
|
elec_score= 8;
|
||||||
} else if (index === 3) {
|
} else if (index === 3) {
|
||||||
elec_score= 0;
|
elec_score= 5;
|
||||||
}
|
}
|
||||||
arr[17] += elec_score;
|
arr[17] += elec_score;
|
||||||
|
|
||||||
const run_rate_itemValue = item.run_rate; // 运转率的值
|
// const run_rate_itemValue = item.run_rate; // 运转率的值
|
||||||
const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
// const run_rate_sortedData = monthData.sort((a, b) => parseFloat(b.run_rate) - parseFloat(a.run_rate));
|
||||||
const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
// const run_rate_index = run_rate_sortedData.findIndex(obj => parseFloat(obj.run_rate) === parseFloat(run_rate_itemValue));
|
||||||
let run_rate_score = 0;
|
// let run_rate_score = 0;
|
||||||
if (run_rate_index === 0){
|
// if (run_rate_index === 0){
|
||||||
run_rate_score= 10;
|
// run_rate_score= 10;
|
||||||
} else if (run_rate_index === 1) {
|
// } else if (run_rate_index === 1) {
|
||||||
run_rate_score= 7;
|
// run_rate_score= 7;
|
||||||
} else if (run_rate_index === 2) {
|
// } else if (run_rate_index === 2) {
|
||||||
run_rate_score= 3;
|
// run_rate_score= 3;
|
||||||
} else if (run_rate_index === 3) {
|
// } else if (run_rate_index === 3) {
|
||||||
run_rate_score= 0;
|
// run_rate_score= 0;
|
||||||
}
|
// }
|
||||||
arr[17] += run_rate_score;
|
// arr[17] += run_rate_score;
|
||||||
|
|
||||||
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
const production_hour_itemValue = item.production_hour; // 台时产量的值
|
||||||
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
const production_hour_sortedData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
||||||
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
const production_hour_index = production_hour_sortedData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(production_hour_itemValue));
|
||||||
let production_hour_score = 0;
|
let production_hour_score = 0;
|
||||||
if (production_hour_index === 0){
|
if (production_hour_index === 0){
|
||||||
production_hour_score= 20;
|
production_hour_score= 10;
|
||||||
} else if (production_hour_index === 1) {
|
} else if (production_hour_index === 1) {
|
||||||
production_hour_score= 15;
|
production_hour_score= 8;
|
||||||
} else if (production_hour_index === 2) {
|
} else if (production_hour_index === 2) {
|
||||||
production_hour_score= 5;
|
production_hour_score= 6;
|
||||||
} else if (production_hour_index === 3) {
|
} else if (production_hour_index === 3) {
|
||||||
production_hour_score= 0;
|
production_hour_score= 4;
|
||||||
}
|
}
|
||||||
arr[17] += production_hour_score;
|
arr[17] += production_hour_score;
|
||||||
|
|
||||||
const production_cost_unit_itemValue = item.production_cost_unit; // 单位产品成本的值
|
// 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));
|
// const production_cost_unit_sortedData = monthData.sort((a, b) => parseFloat(b.production_cost_unit) - parseFloat(a.production_cost_unit));
|
||||||
const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
// const production_cost_unit_index = production_cost_unit_sortedData.findIndex(obj => parseFloat(obj.production_cost_unit) === parseFloat(production_cost_unit_itemValue));
|
||||||
let production_cost_unit_score = 0;
|
// let production_cost_unit_score = 0;
|
||||||
if (production_cost_unit_index === 0){
|
// if (production_cost_unit_index === 0){
|
||||||
production_cost_unit_score= 10;
|
// production_cost_unit_score= 10;
|
||||||
} else if (production_cost_unit_index === 1) {
|
// } else if (production_cost_unit_index === 1) {
|
||||||
production_cost_unit_score= 7;
|
// production_cost_unit_score= 7;
|
||||||
} else if (production_cost_unit_index === 2) {
|
// } else if (production_cost_unit_index === 2) {
|
||||||
production_cost_unit_score= 3;
|
// production_cost_unit_score= 3;
|
||||||
} else if (production_cost_unit_index === 3) {
|
// } else if (production_cost_unit_index === 3) {
|
||||||
production_cost_unit_score= 0;
|
// production_cost_unit_score= 0;
|
||||||
}
|
// }
|
||||||
arr[17] += production_cost_unit_score;
|
// arr[17] += production_cost_unit_score;
|
||||||
|
|
||||||
const xidu_itemValue = item.辅料_细度_rate_pass; // 辅料细度的值
|
const xidu_itemValue = item.干混生料_CaO_rate_pass;
|
||||||
const xidu_sortedData = monthData.sort((a, b) => parseFloat(b.xidu) - parseFloat(a.xidu));
|
const xidu_sortedData = monthData.sort((a, b) => parseFloat(b.xidu) - parseFloat(a.xidu));
|
||||||
const xidu_index = xidu_sortedData.findIndex(obj => parseFloat(obj.xidu) === parseFloat(xidu_itemValue));
|
const xidu_index = xidu_sortedData.findIndex(obj => parseFloat(obj.xidu) === parseFloat(xidu_itemValue));
|
||||||
let xidu_score = 0;
|
let xidu_score = 0;
|
||||||
if (xidu_index === 0){
|
if (xidu_index === 0){
|
||||||
xidu_score= 20;
|
xidu_score= 8;
|
||||||
} else if (xidu_index === 1) {
|
} else if (xidu_index === 1) {
|
||||||
xidu_score= 15;
|
xidu_score= 6;
|
||||||
} else if (xidu_index === 2) {
|
} else if (xidu_index === 2) {
|
||||||
xidu_score= 5;
|
xidu_score= 5;
|
||||||
} else if (xidu_index === 3) {
|
} else if (xidu_index === 3) {
|
||||||
xidu_score= 0;
|
xidu_score= 3;
|
||||||
}
|
}
|
||||||
arr[17] += xidu_score;
|
arr[17] += xidu_score;
|
||||||
|
|
||||||
const Fe203_itemValue = item.辅料_Fe2O3_rate_pass; // 辅料Fe203的值
|
const Fe203_itemValue = item.干混生料_Fe2O3_rate_pass;
|
||||||
const Fe203_sortedData = monthData.sort((a, b) => parseFloat(b.Fe203) - parseFloat(a.Fe203));
|
const Fe203_sortedData = monthData.sort((a, b) => parseFloat(b.Fe203) - parseFloat(a.Fe203));
|
||||||
const Fe203_index = Fe203_sortedData.findIndex(obj => parseFloat(obj.Fe203) === parseFloat(Fe203_itemValue));
|
const Fe203_index = Fe203_sortedData.findIndex(obj => parseFloat(obj.Fe203) === parseFloat(Fe203_itemValue));
|
||||||
let Fe203_score = 0;
|
let Fe203_score = 0;
|
||||||
if (Fe203_index === 0){
|
if (Fe203_index === 0){
|
||||||
Fe203_score= 20;
|
Fe203_score= 7;
|
||||||
} else if (Fe203_index === 1) {
|
} else if (Fe203_index === 1) {
|
||||||
Fe203_score= 15;
|
Fe203_score= 4;
|
||||||
} else if (Fe203_index === 2) {
|
} else if (Fe203_index === 2) {
|
||||||
Fe203_score= 5;
|
Fe203_score= 3;
|
||||||
} else if (Fe203_index === 3) {
|
} else if (Fe203_index === 3) {
|
||||||
Fe203_score= 0;
|
Fe203_score= 2;
|
||||||
}
|
}
|
||||||
arr[17] += Fe203_score;
|
arr[17] += Fe203_score;
|
||||||
|
arr[17] += 60; // 加上60分,表示绩效得分
|
||||||
}
|
}
|
||||||
wrapArr.push(arr);
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
|
|
|
@ -133,16 +133,17 @@ export default {
|
||||||
month_obj = {},
|
month_obj = {},
|
||||||
compareArr0 = [];
|
compareArr0 = [];
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let data0 = res0;
|
if (res0.length > 0) {
|
||||||
if (data0.length > 0) {
|
res0.forEach((item0) => {
|
||||||
data0.forEach((item0) => {
|
|
||||||
//先按月份排序,再按班组排序
|
//先按月份排序,再按班组排序
|
||||||
wrapArr0[ind0] = item0;
|
let month = item0.month_s;
|
||||||
|
if (!wrapArr0[month]) {
|
||||||
|
wrapArr0[month] = [];
|
||||||
|
}
|
||||||
|
wrapArr0[month].push(item0);
|
||||||
});
|
});
|
||||||
} else {
|
} else { console.log('No data received.');}
|
||||||
}
|
}).then(() =>{this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
});
|
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
|
||||||
let data = res;
|
let data = res;
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
data.forEach((item, index) => {
|
data.forEach((item, index) => {
|
||||||
|
@ -159,7 +160,8 @@ export default {
|
||||||
{
|
{
|
||||||
team:item.team_name,
|
team:item.team_name,
|
||||||
value: item.elec_consume_unit,
|
value: item.elec_consume_unit,
|
||||||
elec_consume: item.elec_consume
|
elec_consume: item.elec_consume,
|
||||||
|
production_hour: item.production_hour,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// month_list.push(month_obj)
|
// month_list.push(month_obj)
|
||||||
|
@ -184,9 +186,14 @@ export default {
|
||||||
tongqicha = 0;
|
tongqicha = 0;
|
||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
ind_pre = 12;
|
ind_pre = 12;
|
||||||
huanqi = wrapArr0[ind_pre]
|
if (wrapArr0[ind_pre]) {
|
||||||
? wrapArr0[ind_pre].elec_consume_unit
|
wrapArr0[ind_pre].forEach((item0) => {
|
||||||
: "/";
|
if (item0.team_name == item.team_name) {
|
||||||
|
huanqi = item0.elec_consume_unit;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
// 如果 wrapArr数组长度大于0,那么循环遍历wrapArr数组,找到与item.month_s相差1的元素 而 item.name相同,并赋值给huanbi
|
||||||
compareArr0.forEach((item0) => {
|
compareArr0.forEach((item0) => {
|
||||||
|
@ -225,35 +232,37 @@ export default {
|
||||||
const sortedData = monthData.sort((a, b) => parseFloat(b.value) - parseFloat(a.value));
|
const sortedData = monthData.sort((a, b) => parseFloat(b.value) - parseFloat(a.value));
|
||||||
const index = sortedData.findIndex(obj => parseFloat(obj.value) === parseFloat(itemValue));
|
const index = sortedData.findIndex(obj => parseFloat(obj.value) === parseFloat(itemValue));
|
||||||
if (index === 0){
|
if (index === 0){
|
||||||
arr[11] = 50;
|
|
||||||
} else if (index === 1) {
|
|
||||||
arr[11] = 40;
|
|
||||||
} else if (index === 2) {
|
|
||||||
arr[11] = 30;
|
|
||||||
} else if (index === 3) {
|
|
||||||
arr[11] = 20;
|
arr[11] = 20;
|
||||||
|
} else if (index === 1) {
|
||||||
|
arr[11] = 15;
|
||||||
|
} else if (index === 2) {
|
||||||
|
arr[11] = 10;
|
||||||
|
} else if (index === 3) {
|
||||||
|
arr[11] = 5;
|
||||||
}
|
}
|
||||||
const total_elec_consume = item.elec_consume;
|
const total_elec_consume = item.production_hour;
|
||||||
const sortedTotalData = monthData.sort((a, b) => parseFloat(b.elec_consume) - parseFloat(a.elec_consume));
|
const sortedTotalData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour));
|
||||||
const totalIndex = sortedTotalData.findIndex(obj => parseFloat(obj.elec_consume) === parseFloat(total_elec_consume));
|
const totalIndex = sortedTotalData.findIndex(obj => parseFloat(obj.production_hour) === parseFloat(total_elec_consume));
|
||||||
let total_elec_consume_score = 0;
|
let total_elec_consume_score = 0;
|
||||||
if (totalIndex === 0){
|
if (totalIndex === 0){
|
||||||
total_elec_consume_score = 50;
|
|
||||||
} else if (totalIndex === 1) {
|
|
||||||
total_elec_consume_score = 40;
|
|
||||||
} else if (totalIndex === 2) {
|
|
||||||
total_elec_consume_score = 30;
|
|
||||||
} else if (totalIndex === 3) {
|
|
||||||
total_elec_consume_score = 20;
|
total_elec_consume_score = 20;
|
||||||
|
} else if (totalIndex === 1) {
|
||||||
|
total_elec_consume_score = 15;
|
||||||
|
} else if (totalIndex === 2) {
|
||||||
|
total_elec_consume_score = 10;
|
||||||
|
} else if (totalIndex === 3) {
|
||||||
|
total_elec_consume_score = 5;
|
||||||
}
|
}
|
||||||
arr[11] += total_elec_consume_score; // 电耗得分
|
arr[11] += total_elec_consume_score; // 电耗得分
|
||||||
|
arr[11] +=60
|
||||||
}
|
}
|
||||||
wrapArr.push(arr);
|
wrapArr.push(arr);
|
||||||
});
|
});
|
||||||
that.tableDatas = wrapArr;
|
that.tableDatas = wrapArr;
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});});
|
||||||
|
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.tableDatas = [];
|
this.tableDatas = [];
|
||||||
|
|
Loading…
Reference in New Issue