diff --git a/src/views/enm_base/mgroup_form.vue b/src/views/enm_base/mgroup_form.vue
index b6984122..8c1a908a 100644
--- a/src/views/enm_base/mgroup_form.vue
+++ b/src/views/enm_base/mgroup_form.vue
@@ -57,6 +57,23 @@
placeholder="主要产品"
clearable
style="width: 100%"
+ @clear="() => { form.product=null } "
+ >
+
+
+
+
+ { form.product_cost=null } "
>
parseFloat(b.elec) - parseFloat(a.elec));
@@ -332,7 +331,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;
});
},
diff --git a/src/views/enm_coal/workshopAnalysis.vue b/src/views/enm_coal/workshopAnalysis.vue
index aab4a16d..dfb6fb22 100644
--- a/src/views/enm_coal/workshopAnalysis.vue
+++ b/src/views/enm_coal/workshopAnalysis.vue
@@ -159,7 +159,8 @@ export default {
bindClass(item, index) {
let classInfo = { redColor: false, greenColor: false };
if (index == 3 || index == 5) {
- if (typeof item == "number") {
+ if ( item != "/") {
+ item = Number(item);
if (item > 0) {
classInfo.greenColor = true;
classInfo.redColor = false;
@@ -290,6 +291,7 @@ export default {
wrapArrs.push(arrs);
});
that.tableDatas = wrapArrs;
+ console.log(that.tableDatas);
} else {
}
});
diff --git a/src/views/enm_kiln/workshopAnalysis.vue b/src/views/enm_kiln/workshopAnalysis.vue
index 629e59ef..e6f65487 100644
--- a/src/views/enm_kiln/workshopAnalysis.vue
+++ b/src/views/enm_kiln/workshopAnalysis.vue
@@ -321,7 +321,8 @@ export default {
bindClass(item, index) {
let classInfo = { redColor: false, greenColor: false };
if (index == 3 || index == 5) {
- if (typeof item == "number") {
+ if ( item != "/") {
+ item = Number(item);
if (item > 0) {
classInfo.greenColor = true;
classInfo.redColor = false;
diff --git a/src/views/enm_mill/teamAnalysis.vue b/src/views/enm_mill/teamAnalysis.vue
index 1b847e95..96171706 100644
--- a/src/views/enm_mill/teamAnalysis.vue
+++ b/src/views/enm_mill/teamAnalysis.vue
@@ -37,7 +37,7 @@
>
- 水泥磨工段班组月度对比分析 |
+ 水泥磨工段班组月度对比分析 |
月份 |
@@ -46,7 +46,7 @@
运转率 |
成本 |
质量 |
- 单位产品电耗 |
+ 单位产品电耗 |
得分 |
@@ -60,6 +60,7 @@
循环风机1906(KW·h/t) |
系统风机(KW·h/t) |
目标值(kW·h/t) |
+ 当期值(kW·h/t) |
当期与目标值差值(kW·h/t) |
环期值(kW·h/t) |
当期与环期差值(kW·h/t) |
@@ -118,8 +119,26 @@ export default {
});
},
methods: {
+ getGoalData() {
+ const self = this;
+ let params = {};
+ params.page = 0;
+ params.year = self.query.year_s;
+ params.mgroup = self.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)") {
+ this.getData(item);
+ }
+ })
+ }
+ })
+ .catch((error) => {
+ console.error('获取目标数据失败:', error);
+ });
+ },
getData(goalData) {
- console.log("goalData", goalData);
let that = this;
let query0 = {};
query0.page = 0;
@@ -202,23 +221,16 @@ export default {
item.系统风机_consume_unit != null
? item.系统风机_consume_unit
: "/";
- // arr[11] =
- // item.水平涡流选粉机1915_consume_unit != null
- // ? item.水平涡流选粉机1915_consume_unit
- // : "/";
- // arr[12]=item.新增磨尾风机_consume_unit!=null?item.新增磨尾风机_consume_unit:'/';
-
- // arr[13]=item.elec_consume_unit//当期值(KW·h/t)
let keyVale = "goal_val_" + n;
- // arr[12] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
if (goalData.length > 0){
goalData.forEach((item) => {
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)"){
arr[11] = item[keyVale]; //目标值(KW·h/t)//需要接口获取
}
});
- };
- arr[12] = item.celec_consume_unit - arr[11]; //当期与目标差值(KW·h/t)
+ };
+ arr[12] = item.elec_consume_unit; //当期值(KW·h/t)
+ arr[13] = (item.elec_consume_unit - arr[11]).toFixed(2); //当期与目标差值(KW·h/t)
let ind_pre = 0,
huanqi = 0,
huanqicha = 0,
@@ -237,15 +249,15 @@ export default {
}
})
}
- arr[13] = huanqi; //环期值(KW·h/t)上个月的值
+ arr[14] = huanqi; //环期值(KW·h/t)上个月的值
if (huanqi !== "/") {
- huanqicha = item.celec_consume_unit - huanqi;
+ huanqicha = (item.elec_consume_unit - huanqi).toFixed(2);
} else {
- huanqicha = item.celec_consume_unit;
+ huanqicha = item.elec_consume_unit;
}
- arr[14] = huanqicha; //当期与环期差值(KW·h/t)
- arr[15] =
- huanqi != "/" ? (huanqicha / huanqi) * 100 : 0; //环比增长率(%)
+ arr[15] = huanqicha; //当期与环期差值(KW·h/t)
+ arr[16] =
+ huanqi != "/" && huanqicha!=0 && huanqi!=0 ? ((huanqicha / huanqi) * 100).toFixed(2) :"/" ; //环比增长率(%)
if (wrapArr0[n]) {
tongqicha =
item.celec_consume_unit -
@@ -256,9 +268,9 @@ export default {
tongqi = 0;
}
- arr[16] = tongqi; //同比增长率(%):本月-去年本月/去年
+ arr[17] = tongqi; //同比增长率(%):本月-去年本月/去年
// arr[18] = 0.0; //同比增长率(%)
- arr[17] = 0;
+ arr[18] = 0;
if (month_obj[n]) {
const monthData = month_obj[n];
const itemValue = item.elec_consume_unit; // 单位产品电耗的值
@@ -274,7 +286,7 @@ export default {
} else if (index === 3) {
elec_score= 0;
}
- arr[17] += elec_score;
+ arr[18] += 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));
@@ -289,7 +301,7 @@ export default {
} else if (run_rate_index === 3) {
run_rate_score= 0;
}
- arr[17] += run_rate_score;
+ arr[18] += 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));
@@ -304,7 +316,7 @@ export default {
} else if (production_hour_index === 3) {
production_hour_score= 0;
}
- arr[17] += production_hour_score;
+ arr[18] += 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));
@@ -319,7 +331,7 @@ export default {
} else if (production_cost_unit_index === 3) {
production_cost_unit_score= 0;
}
- arr[17] += production_cost_unit_score;
+ arr[18] += production_cost_unit_score;
const surface_area_itemValue = item.出磨水泥_比表面积_rate_pass; // 比表面积的值
const surface_area_sortedData = monthData.sort((a, b) => parseFloat(b.surface_area) - parseFloat(a.surface_area));
@@ -334,7 +346,7 @@ export default {
} else if (surface_area_index === 3) {
surface_area_score= 0;
}
- arr[17] += surface_area_score;
+ arr[18] += surface_area_score;
const SO3_itemValue = item.出磨水泥_SO3_rate_pass; // SO3的值
const SO3_sortedData = monthData.sort((a, b) => parseFloat(b.SO3) - parseFloat(a.SO3));
@@ -349,7 +361,7 @@ export default {
} else if (SO3_index === 3) {
SO3_score= 0;
}
- arr[17] += SO3_score;
+ arr[18] += SO3_score;
const CLitemValue = item.出磨水泥_掺量_rate_pass; // SO3的值
const CL_sortedData = monthData.sort((a, b) => parseFloat(b.chanliang) - parseFloat(a.chanliang));
@@ -364,7 +376,7 @@ export default {
} else if (CL_index === 3) {
CL_score= 0;
}
- arr[17] += CL_score;
+ arr[18] += CL_score;
}
wrapArr.push(arr);
});
diff --git a/src/views/enm_mill/workshopAnalysis.vue b/src/views/enm_mill/workshopAnalysis.vue
index 6b2975c5..e7cce3ba 100644
--- a/src/views/enm_mill/workshopAnalysis.vue
+++ b/src/views/enm_mill/workshopAnalysis.vue
@@ -208,8 +208,9 @@ export default {
// 动态绑定Class
bindClass(item, index) {
let classInfo = { redColor: false, greenColor: false };
- if (index == 6) {
- if (typeof item == "number") {
+ if (index == 6 || index == 7) {
+ if ( item != "/") {
+ item = Number(item);
if (item > 0) {
classInfo.greenColor = true;
classInfo.redColor = false;
@@ -354,8 +355,9 @@ export default {
let lastRate = 0;
if (
lastDiff !== "/" &&
+ lastDiff !=0 &&
lastNum !== "/" &&
- lastNum !== 0
+ lastNum != 0
) {
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
} else {
diff --git a/src/views/enm_pack/workshopAnalysis.vue b/src/views/enm_pack/workshopAnalysis.vue
index 89a5e098..b370e632 100644
--- a/src/views/enm_pack/workshopAnalysis.vue
+++ b/src/views/enm_pack/workshopAnalysis.vue
@@ -133,7 +133,8 @@ export default {
bindClass(item, index) {
let classInfo = { redColor: false, greenColor: false };
if (index == 3 || index == 5) {
- if (typeof item == "number") {
+ if ( item != "/") {
+ item = Number(item);
if (item > 0) {
classInfo.greenColor = true;
classInfo.redColor = false;
diff --git a/src/views/enm_report/costing.vue b/src/views/enm_report/costing.vue
index 5a3d3553..2dcfb94d 100644
--- a/src/views/enm_report/costing.vue
+++ b/src/views/enm_report/costing.vue
@@ -105,7 +105,6 @@ export default {
{ id: 1, name: '日统计' },
{ id: 2, name: '月统计' },
],
- tableNmae: '',
tableData1: [],
optionsShift: [],
sourceData: {}
@@ -133,6 +132,7 @@ export default {
})
this.mgroupOptions = this.mgroupOptions.reverse();
this.query.mgroup = this.mgroupOptions[0].id;
+ this.query.mgroup_name = this.mgroupOptions[0].name;
this.tableName = this.mgroupOptions[0].name;
this.getTableData();
})
@@ -184,6 +184,7 @@ export default {
let arr = [];
params.page = 0;
params.mgroup = that.query.mgroup;
+ params.mgroup_name = that.query.mgroup_name;
if (that.query.type == 0) {//班
arr = that.query.day.split('-');
params.year_s = Number(arr[0]);
@@ -264,7 +265,12 @@ export default {
dataArr.push(itemData.shift);
dataArr.push(itemData.team_name);
}
- dataArr.push(itemData.total_production);
+ if (itemData.mgroup_name === "原料磨"){
+ dataArr.push(itemData.total_production_cost
+ );
+ } else {
+ dataArr.push(itemData.total_production);
+ }
// dataArr.push(itemData.coal_consume_unit);
dataArr.push(itemData.production_cost_unit);
let sub1data = itemData.imaterial_data;
diff --git a/src/views/enm_rm/teamAnalysis.vue b/src/views/enm_rm/teamAnalysis.vue
index a6e47f2a..50b190ce 100644
--- a/src/views/enm_rm/teamAnalysis.vue
+++ b/src/views/enm_rm/teamAnalysis.vue
@@ -112,7 +112,6 @@ 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;
@@ -130,6 +129,26 @@ export default {
});
},
methods: {
+
+ getGoalData() {
+ const self = this;
+ let params = {};
+ params.page = 0;
+ params.year = self.query.year_s;
+ params.mgroup = self.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)") {
+ this.getData(item);
+ }
+ })
+ }
+ })
+ .catch((error) => {
+ console.error('获取目标数据失败:', error);
+ });
+ },
getData(goalData) {
let that = this;
let query0 = {};
@@ -230,7 +249,7 @@ export default {
arr[15] = item.elec_consume_unit; //当期值(KW·h/t)
let keyVale = "goal_val_" + n;
arr[16] = goalData[keyVale]?goalData[keyVale]:0; //目标值(KW·h/t)//需要接口获取
- arr[17] = item.celec_consume_unit - arr[16]; //当期与目标差值(KW·h/t)
+ arr[17] = (arr[15] - arr[16]).toFixed(2); //当期与目标差值(KW·h/t)
let ind_pre = 0,
huanbi = 0;
if (item.month_s == 1) {
@@ -253,9 +272,9 @@ export default {
}else{
arr[19] = "/"; //当期与环期差值(KW·h/t)
}
- arr[20] = item.celec_consume_unit; //环比增长率(%)
- if (arr[18] !=="/" && arr[19] !==0 && arr[19] !== "undefined"){
- arr[20] = ((arr[18]/arr[19])*100).toFixed(2);
+ arr[20] = 0; //环比增长率(%)
+ if (arr[18] !=="/" && arr[19] !==0 && arr[19] !== "undefined" && arr[18] !== 0){
+ arr[20] = ((arr[19]/arr[18])*100).toFixed(2);
}else{
arr[20] = "/"; //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
}
@@ -263,7 +282,6 @@ export default {
arr[22] = 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));
@@ -364,7 +382,7 @@ export default {
},
handleQuery() {
this.tableDatas = [];
- this.getData(this.goalDatas);
+ this.getGoalData();
},
itemClick(type, item) {
this.type = type;
diff --git a/src/views/enm_slag/teamAnalysis.vue b/src/views/enm_slag/teamAnalysis.vue
index 19c5fca4..a3ca9e4a 100644
--- a/src/views/enm_slag/teamAnalysis.vue
+++ b/src/views/enm_slag/teamAnalysis.vue
@@ -114,6 +114,25 @@ export default {
});
},
methods: {
+ getGoalData() {
+ const self = this;
+ let params = {};
+ params.page = 0;
+ params.year = self.query.year_s;
+ params.mgroup = self.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)") {
+ this.getData(item);
+ }
+ })
+ }
+ })
+ .catch((error) => {
+ console.error('获取目标数据失败:', error);
+ });
+ },
getData(goalData) {
let that = this;
let query0 = {};
@@ -164,7 +183,7 @@ export default {
arr[4] = item.elec_consume_unit; //当期值(KW·h/t)
let keyVale = "goal_val_" + n;
arr[5] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
- arr[6] = arr[4] - item.celec_consume_unit; //当期与目标差值(KW·h/t)
+ arr[6] = arr[4] - arr[5]; //当期与目标差值(KW·h/t)
let ind_pre = 0,
huanqi = 0,
huanqicha = 0,
@@ -190,7 +209,13 @@ export default {
arr[8] = "/"; //当期与环期差值(KW·h/t)
}
// arr[8] = huanqicha; //当期与环期差值(KW·h/t)
- arr[9] = arr[8] != "/" ? ((arr[7] / arr[8]) * 100).toFixed(2) : 0; //环比增长率(%)
+ let growthRate = 0;
+ if (arr[8]!== "/" && arr[7]!== 0 && arr[8]!== 0 ) {
+ growthRate = ((arr[8] / arr[7]) * 100).toFixed(2);
+ } else{
+ growthRate = "/";
+ }
+ arr[9] = growthRate; //环比增长率(%)
if (wrapArr0[n]) {
tongqicha =
item.celec_consume_unit -
@@ -226,7 +251,7 @@ export default {
},
handleQuery() {
this.tableDatas = [];
- this.getData(this.goalDatas);
+ this.getGoalData();
},
itemClick(type, item) {
this.type = type;