0) {
classInfo.greenColor = true;
classInfo.redColor = false;
@@ -690,7 +691,7 @@ export default {
: "/";
}
if (arrs4[1] !== "/" && lastNum4 !== "/") {
- lastDiff4 = arrs4[1] - lastNum4;
+ lastDiff4 = (arrs4[1] - lastNum4).toFixed(2);
} else {
lastDiff4 = "/";
}
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..f64a4a05 100644
--- a/src/views/enm_mill/workshopAnalysis.vue
+++ b/src/views/enm_mill/workshopAnalysis.vue
@@ -14,7 +14,6 @@
v-model="query.type"
placeholder="查询类型"
clearable
- @change="typeCange"
>
@@ -128,7 +127,7 @@
class="numCell"
>
- ▲
0) {
classInfo.greenColor = true;
classInfo.redColor = false;
@@ -313,6 +313,10 @@ export default {
that.monthGoal[ind] !== undefined
? that.monthGoal[ind]
: "/";
+ arr.push(item.cen_consume_unit); //综合能耗当期值(KW·h/t)
+ arr[4] = that.monthGoal2[ind] !== undefined
+ ? that.monthGoal2[ind]
+ : "/";
wrapArr.push(arr);
});
wrapArr.forEach((item, index) => {
@@ -354,8 +358,9 @@ export default {
let lastRate = 0;
if (
lastDiff !== "/" &&
+ lastDiff !=0 &&
lastNum !== "/" &&
- lastNum !== 0
+ lastNum != 0
) {
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
} else {
@@ -378,26 +383,23 @@ export default {
}
arrs[8] = sameRate;
wrapArrs.push(arrs);
-
+
arrs2[0] = item[0];
- arrs2[1] = item.cen_consume_unit;
- arrs2[2] =
- that.monthGoal2[ind] !== undefined
- ? that.monthGoal2[ind]
- : "/";
+ arrs2[1] = item[3];
+ arrs2[2] = item[4];
arrs2[3] = 80;
arrs2[4] = 87;
arrs2[5] = 94;
//当期与环期差值(KW·h/t)
let lastNum2 = 0,
lastDiff2 = 0;
- if (index > 1) {
+ if (index >= 1) {
let num = index - 1;
if (
wrapArr[num] &&
- wrapArr[num].cen_consume_unit
+ wrapArr[num][3]
) {
- lastNum2 = wrapArr[num].cen_consume_unit;
+ lastNum2 = wrapArr[num][3];
} else {
lastNum2 = "/";
}
@@ -407,7 +409,7 @@ export default {
: "/";
}
if (arrs2[1] !== "/" && lastNum2 !== "/") {
- lastDiff2 = arrs2[1] - lastNum2;
+ lastDiff2 = (arrs2[1] - lastNum2).toFixed(2);
} else {
lastDiff2 = "/";
}
@@ -415,7 +417,7 @@ export default {
//环比增长率(%)
let lastRate2 = 0;
if (
- lastDiff2 == "/" &&
+ lastDiff2 !== "/" &&
lastNum2 !== "/" &&
lastNum2 !== 0
) {
@@ -454,8 +456,8 @@ export default {
},
handleQuery() {
this.getMonthGoal();
+ this.getData();
},
- typeCange() {},
handlePrint() {
this.$PRINT("#myReport");
},
diff --git a/src/views/enm_pack/workshopAnalysis.vue b/src/views/enm_pack/workshopAnalysis.vue
index 89a5e098..a228539b 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;
@@ -266,7 +267,8 @@ export default {
if (
lastDiff !== "/" &&
lastNum !== "/" &&
- lastNum !== 0
+ lastNum != 0 &&
+ lastDiff != 0
) {
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
} else {
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_report/reportDay.vue b/src/views/enm_report/reportDay.vue
index 8fa6492e..8428a970 100644
--- a/src/views/enm_report/reportDay.vue
+++ b/src/views/enm_report/reportDay.vue
@@ -180,10 +180,12 @@
// },
dayChange(e){
let that = this;
- let arr = e.split('-')
- that.year = Number(arr[0]);
- that.month = Number(arr[1]);
- that.day = Number(arr[2]);
+ if(e){
+ let arr = e.split('-')
+ that.year = Number(arr[0]);
+ that.month = Number(arr[1]);
+ that.day = Number(arr[2]);
+ }
},
getData(){
let that = this;
@@ -195,6 +197,9 @@
params.type = 'day_s';
this.$API.enm.enstat.req(params).then((res) => {
let dataList = {};
+ if(res.length <= 0){
+ return;
+ }
res.forEach(item => {
let label = item.mgroup_name;
dataList[label] = item;
diff --git a/src/views/enm_report/reportMonth.vue b/src/views/enm_report/reportMonth.vue
index 37112060..ef41dd04 100644
--- a/src/views/enm_report/reportMonth.vue
+++ b/src/views/enm_report/reportMonth.vue
@@ -35,7 +35,7 @@
- | 生产月报 |
+ 生产月报 |
| 序号 |
@@ -49,10 +49,10 @@
{{item[0]}} |
{{item[1]}} |
{{item[1]}} |
- {{item[1]}} |
- {{item[1]}} |
- {{item[1]}} |
- {{item[1]}} |
+ {{item[1]}} |
+ {{item[1]}} |
+ {{item[1]}} |
+ {{item[1]}} |
{{item[2]}} |
{{item[3]}} |
{{item[4]}} |
@@ -95,27 +95,21 @@
[21,'产量','月水泥产量(t)'],
[22,'产量','月水泥产量完成率(%)'],
[23,'产量','月熟料出厂量(t)'],
- [24,'产量','月熟料累计出厂量(t)'],
- [25,'产量','月散装水泥出厂量(t)'],
- [26,'产量','月散装水泥出厂量(t)'],
- [27,'产量','月袋装水泥出厂量(t)'],
- [28,'产量','月袋装水泥出厂量(t)'],
-
-
-
- [29,'成本','月电石渣成本(元/吨)'],
- [30,'成本','月生料成本(元/吨)'],
- [31,'成本','月熟料成本(元/吨)'],
- [32,'成本','月水泥粉磨成本(元/吨)'],
- [33,'成本','月水泥包装成本(元/吨)'],
+ [24,'产量','月散装水泥出厂量(t)'],
+ [25,'产量','月袋装水泥出厂量(t)'],
+ [26,'成本','月电石渣成本(元/吨)'],
+ [27,'成本','月生料成本(元/吨)'],
+ [28,'成本','月熟料成本(元/吨)'],
+ [29,'成本','月水泥粉磨成本(元/吨)'],
+ [30,'成本','月水泥包装成本(元/吨)'],
- [34,'耗电量','月电石渣耗电量(kw.h)'],
- [35,'耗电量','月生料耗电量(kw.h)'],
- [36,'耗电量','月熟料耗电量(kw.h)'],
- [37,'耗电量','月水泥粉磨耗电量(kw.h)'],
- [38,'耗电量','月水泥包装耗电量(kw.h)'],
- [39,'耗电量','月生活区耗电量(kw.h)'],
+ [31,'耗电量','月电石渣耗电量(kw.h)'],
+ [32,'耗电量','月生料耗电量(kw.h)'],
+ [33,'耗电量','月熟料耗电量(kw.h)'],
+ [34,'耗电量','月水泥粉磨耗电量(kw.h)'],
+ [35,'耗电量','月水泥包装耗电量(kw.h)'],
+ [36,'耗电量','月生活区耗电量(kw.h)'],
],
year:'',
month:'',
@@ -149,10 +143,13 @@
},
methods: {
monthChange(e){
- let that = this;
- let arr = e.split('-')
- that.year = Number(arr[0]);
- that.month = Number(arr[1]);
+ if(e){
+ let that = this;
+ let arr = e.split('-')
+ that.year = Number(arr[0]);
+ that.month = Number(arr[1]);
+ }
+
},
getNowData(){
let that = this;
@@ -161,6 +158,7 @@
params.year_s = that.year;
params.month_s = that.month;
params.type = 'month_s';
+ let m_goal_val = "goal_val_" + that.month
this.$API.enm.enstat.req(params).then((res) => {
let dataList = {};
res.forEach(item => {
@@ -198,61 +196,64 @@
that.nowData[13] = dataList.水泥包装.elec_consume_unit;
that.tableDatas[13][3] = dataList.水泥磨.elec_consume_unit;
//产量(t)
- that.nowData[14] = dataList.电石渣.production_hour;
- that.tableDatas[14][3] = dataList.电石渣.production_hour;
- that.nowData[16] = dataList.原料磨.production_hour;
- that.tableDatas[16][3] = dataList.原料磨.production_hour;
- that.nowData[18] = dataList.回转窑.production_hour;
- that.tableDatas[18][3] = dataList.回转窑.production_hour;
- that.nowData[20] = dataList.水泥磨.production_hour;
- that.tableDatas[20][3] = dataList.水泥磨.production_hour;
+ that.nowData[14] = dataList.电石渣.total_production;
+ that.tableDatas[14][3] = dataList.电石渣.total_production;
+ that.nowData[16] = dataList.原料磨.total_production;
+ that.tableDatas[16][3] = dataList.原料磨.total_production;
+ that.nowData[18] = dataList.回转窑.total_production;
+ that.tableDatas[18][3] = dataList.回转窑.total_production;
+ that.nowData[20] = dataList.水泥磨.total_production;
+ that.tableDatas[20][3] = dataList.水泥磨.total_production;
//成本(元/吨)
- that.nowData[28] = dataList.电石渣.production_cost_unit;
- that.tableDatas[28][3] = dataList.电石渣.production_cost_unit;
- that.nowData[29] = dataList.原料磨.production_cost_unit;
- that.tableDatas[29][3] = dataList.原料磨.production_cost_unit;
- that.nowData[30] = dataList.回转窑.production_cost_unit;
- that.tableDatas[30][3] = dataList.回转窑.production_cost_unit;
- that.nowData[31] = dataList.水泥磨.production_cost_unit;
- that.tableDatas[31][3] = dataList.水泥磨.production_cost_unit;
- that.nowData[32] = dataList.水泥包装.production_cost_unit;
- that.tableDatas[32][3] = dataList.水泥包装.production_cost_unit;
+ that.nowData[25] = dataList.电石渣.production_cost_unit;
+ that.tableDatas[25][3] = dataList.电石渣.production_cost_unit;
+ that.nowData[26] = dataList.原料磨.production_cost_unit;
+ that.tableDatas[26][3] = dataList.原料磨.production_cost_unit;
+ that.nowData[27] = dataList.回转窑.production_cost_unit;
+ that.tableDatas[27][3] = dataList.回转窑.production_cost_unit;
+ that.nowData[28] = dataList.水泥磨.production_cost_unit;
+ that.tableDatas[28][3] = dataList.水泥磨.production_cost_unit;
+ that.nowData[29] = dataList.水泥包装.production_cost_unit;
+ that.tableDatas[29][3] = dataList.水泥包装.production_cost_unit;
//耗电量(kw.h)
- that.nowData[33] = dataList.电石渣.elec_consume;
- that.tableDatas[33][3] = dataList.电石渣.elec_consume;
- that.nowData[34] = dataList.原料磨.elec_consume;
- that.tableDatas[34][3] = dataList.原料磨.elec_consume;
- that.nowData[35] = dataList.回转窑.elec_consume;
- that.tableDatas[35][3] = dataList.回转窑.elec_consume;
+ that.nowData[30] = dataList.电石渣.elec_consume;
+ that.tableDatas[30][3] = dataList.电石渣.elec_consume;
+ that.nowData[31] = dataList.原料磨.elec_consume;
+ that.tableDatas[31][3] = dataList.原料磨.elec_consume;
+ that.nowData[32] = dataList.回转窑.elec_consume;
+ that.tableDatas[32][3] = dataList.回转窑.elec_consume;
// that.nowData[36] = dataList.煤磨.elec_consume;
// that.tableDatas[36][3] = dataList.煤磨.elec_consume;
- that.nowData[36] = dataList.水泥磨.elec_consume;
- that.tableDatas[36][3] = dataList.水泥磨.elec_consume;
- that.nowData[37] = dataList.水泥包装.elec_consume;
- that.tableDatas[37][3] = dataList.水泥包装.elec_consume;
- that.nowData[38] = dataList.生活区.elec_consume;
- that.tableDatas[38][3] = dataList.生活区.elec_consume;
+ that.nowData[33] = dataList.水泥磨.elec_consume;
+ that.tableDatas[33][3] = dataList.水泥磨.elec_consume;
+ that.nowData[34] = dataList.水泥包装.elec_consume;
+ that.tableDatas[34][3] = dataList.水泥包装.elec_consume;
+ that.nowData[35] = dataList.生活区.elec_consume;
+ that.tableDatas[35][3] = dataList.生活区.elec_consume;
}).then(res=>{
//获取月和年目标
let params1 = {};
params1.page = 0;
params1.goal_cate__code = 'total_production';
params1.year = that.year;
+
+ console.log('m_goal_val', m_goal_val)
this.$API.mtm.goal.list.req(params1).then((res1) => {
let dataList1 = {};//目标
res1.forEach(item1 => {
let label = item1.mgroup_name;
dataList1[label] = item1;
});
- that.nowData[15] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.nowData[14]!==''?(that.nowData[14] /dataList1.电石渣.goal_val)*100:'/';
- that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.nowData[14]!==''?((that.nowData[14] /dataList1.电石渣.goal_val)*100).toFixed(2):'/';
- that.nowData[17] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[16] /dataList1.原料磨.goal_val)*100:'/';
- that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.nowData[14]!==''?((that.nowData[16] /dataList1.原料磨.goal_val)*100).toFixed(2):'/';
- that.nowData[19] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.nowData[14]!==''?(that.nowData[18] /dataList1.回转窑.goal_val)*100:'/';
- that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.nowData[14]!==''?((that.nowData[18] /dataList1.回转窑.goal_val)*100).toFixed(2):'/';
- that.nowData[21] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[20] /dataList1.水泥磨.goal_val)*100:'/';
- that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.nowData[14]!==''?((that.nowData[20] /dataList1.水泥磨.goal_val)*100).toFixed(2):'/';
+
+ that.nowData[15] = dataList1.电石渣&&dataList1.电石渣[m_goal_val]!==0&&dataList1.电石渣[m_goal_val]!==''&&that.nowData[14]!==''?(that.nowData[14] /dataList1.电石渣[m_goal_val])*100:'/';
+ that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣[m_goal_val]!==0&&dataList1.电石渣[m_goal_val]!==''&&that.nowData[14]!==''?((that.nowData[14] /dataList1.电石渣[m_goal_val])*100).toFixed(2):'/';
+ that.nowData[17] = dataList1.原料磨&&dataList1.原料磨[m_goal_val]!==0&&dataList1.原料磨[m_goal_val]!==''&&that.nowData[14]!==''?(that.nowData[16] /dataList1.原料磨[m_goal_val])*100:'/';
+ that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨[m_goal_val]!==0&&dataList1.原料磨[m_goal_val]!==''&&that.nowData[14]!==''?((that.nowData[16] /dataList1.原料磨[m_goal_val])*100).toFixed(2):'/';
+ that.nowData[19] = dataList1.回转窑&&dataList1.回转窑[m_goal_val]!==0&&dataList1.回转窑[m_goal_val]!==''&&that.nowData[14]!==''?(that.nowData[18] /dataList1.回转窑[m_goal_val])*100:'/';
+ that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑[m_goal_val]!==0&&dataList1.回转窑[m_goal_val]!==''&&that.nowData[14]!==''?((that.nowData[18] /dataList1.回转窑[m_goal_val])*100).toFixed(2):'/';
+ that.nowData[21] = dataList1.水泥磨&&dataList1.水泥磨[m_goal_val]!==0&&dataList1.水泥磨[m_goal_val]!==''&&that.nowData[14]!==''?(that.nowData[20] /dataList1.水泥磨[m_goal_val])*100:'/';
+ that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨[m_goal_val]!==0&&dataList1.水泥磨[m_goal_val]!==''&&that.nowData[14]!==''?((that.nowData[20] /dataList1.水泥磨[m_goal_val])*100).toFixed(2):'/';
})
}).then(res=>{
let obj1 = {};
@@ -262,31 +263,16 @@
obj1.type = 'month_s';
that.$API.enm.enstat2.req(obj1).then((res1) => {
if(res1.length>0){
- that.nowData[22]=res1[0].clinker_val;
- that.tableDatas[22][3]=res1[0].clinker_val;
- that.nowData[24] = res1[0].bulk_cement_val;
- that.tableDatas[24][3] = res1[0].bulk_cement_val;
- that.nowData[26] = res1[0].bag_cement_val;
- that.tableDatas[26][3] = res1[0].bag_cement_val;
+ that.nowData[22]=res1[0].bulk_clinker_val;
+ that.tableDatas[22][3]=res1[0].bulk_clinker_val;
+ that.nowData[23] = res1[0].bulk_cement_val;
+ that.tableDatas[23][3] = res1[0].bulk_cement_val;
+ that.nowData[24] = res1[0].bag_cement_val;
+ that.tableDatas[24][3] = res1[0].bag_cement_val;
}
- })
- let obj2 = {};
- obj2.page = 0;
- obj2.type = 'year_s';
- obj2.year_s = this.year;
- that.$API.enm.enstat2.req(obj2).then((res2) => {
- if(res2.length>0){
- that.nowData[23] = res2[0].clinker_val;
- that.tableDatas[23][3] = res2[0].clinker_val;
- that.nowData[25] = res2[0].bulk_cement_val;
- that.tableDatas[25][3] = res2[0].bulk_cement_val;
- that.nowData[27] = res2[0].bag_cement_val;
- that.tableDatas[27][3] = res2[0].bag_cement_val;
- }
- })
- }).then(res=>{
+ }).then(res=>{
this.getHuanbiData();
- });
+ })});
},
canCompute(a,b){
debugger;
@@ -307,6 +293,7 @@
params.page = 0;
params.year_s = that.year_h;
params.month_s = that.month_h;
+ let m_goal_val = "goal_val_" + that.month
params.type = 'month_s';
this.$API.enm.enstat.req(params).then((res) => {
let dataList = {};
@@ -332,23 +319,23 @@
that.tableDatas[12][4] = this.canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
that.tableDatas[13][4] = this.canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
//产量(t)
- that.tableDatas[14][4] = this.canCompute(that.nowData[14],dataList.电石渣.production_hour);
- that.tableDatas[16][4] = this.canCompute(that.nowData[16],dataList.原料磨.production_hour);
- that.tableDatas[18][4] = this.canCompute(that.nowData[18],dataList.回转窑.production_hour);
- that.tableDatas[20][4] = this.canCompute(that.nowData[20],dataList.水泥磨.production_hour);
+ that.tableDatas[14][4] = this.canCompute(that.nowData[14],dataList.电石渣.total_production);
+ that.tableDatas[16][4] = this.canCompute(that.nowData[16],dataList.原料磨.total_production);
+ that.tableDatas[18][4] = this.canCompute(that.nowData[18],dataList.回转窑.total_production);
+ that.tableDatas[20][4] = this.canCompute(that.nowData[20],dataList.水泥磨.total_production);
//成本(元/吨)
- that.tableDatas[28][4] = this.canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
- that.tableDatas[29][4] = this.canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
- that.tableDatas[30][4] = this.canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
- that.tableDatas[31][4] = this.canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
- that.tableDatas[32][4] = this.canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
+ that.tableDatas[25][4] = this.canCompute(that.nowData[25],dataList.电石渣.production_cost_unit);
+ that.tableDatas[26][4] = this.canCompute(that.nowData[26],dataList.原料磨.production_cost_unit);
+ that.tableDatas[27][4] = this.canCompute(that.nowData[27],dataList.回转窑.production_cost_unit);
+ that.tableDatas[28][4] = this.canCompute(that.nowData[28],dataList.水泥磨.production_cost_unit);
+ that.tableDatas[29][4] = this.canCompute(that.nowData[29],dataList.水泥包装.production_cost_unit);
//耗电量(kw.h)
- that.tableDatas[33][4] = this.canCompute(that.nowData[33],dataList.电石渣.elec_consume);
- that.tableDatas[34][4] = this.canCompute(that.nowData[34],dataList.原料磨.elec_consume);
- that.tableDatas[35][4] = this.canCompute(that.nowData[35],dataList.回转窑.elec_consume);
- that.tableDatas[36][4] = this.canCompute(that.nowData[36],dataList.水泥磨.elec_consume);
- that.tableDatas[37][4] = this.canCompute(that.nowData[37],dataList.水泥包装.elec_consume);
- that.tableDatas[38][4] = this.canCompute(that.nowData[38],dataList.生活区.elec_consume);
+ that.tableDatas[30][4] = this.canCompute(that.nowData[30],dataList.电石渣.elec_consume);
+ that.tableDatas[31][4] = this.canCompute(that.nowData[31],dataList.原料磨.elec_consume);
+ that.tableDatas[32][4] = this.canCompute(that.nowData[32],dataList.回转窑.elec_consume);
+ that.tableDatas[33][4] = this.canCompute(that.nowData[33],dataList.水泥磨.elec_consume);
+ that.tableDatas[34][4] = this.canCompute(that.nowData[34],dataList.水泥包装.elec_consume);
+ that.tableDatas[35][4] = this.canCompute(that.nowData[35],dataList.生活区.elec_consume);
// that.tableDatas[39][3] = dataList.生活区.elec_consume;
}).then(res=>{
//获取月和年目标
@@ -362,10 +349,10 @@
let label = item1.mgroup_name;
dataList1[label] = item1;
});
- that.tableDatas[15][4] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[14][4] /dataList1.电石渣.goal_val)*100).toFixed(2):'/';
- that.tableDatas[17][4] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[16][4] /dataList1.原料磨.goal_val)*100).toFixed(5):'/';
- that.tableDatas[19][4] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[18][4] /dataList1.回转窑.goal_val)*100).toFixed(2):'/';
- that.tableDatas[21][4] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[20][4] /dataList1.水泥磨.goal_val)*100).toFixed(2):'/';
+ that.tableDatas[15][4] = dataList1.电石渣&&dataList1.电石渣[m_goal_val]!==0&&dataList1.电石渣[m_goal_val]!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[14][4] /dataList1.电石渣[m_goal_val])*100).toFixed(2):'/';
+ that.tableDatas[17][4] = dataList1.原料磨&&dataList1.原料磨[m_goal_val]!==0&&dataList1.原料磨[m_goal_val]!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[16][4] /dataList1.原料磨[m_goal_val])*100).toFixed(5):'/';
+ that.tableDatas[19][4] = dataList1.回转窑&&dataList1.回转窑[m_goal_val]!==0&&dataList1.回转窑[m_goal_val]!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[18][4] /dataList1.回转窑[m_goal_val])*100).toFixed(2):'/';
+ that.tableDatas[21][4] = dataList1.水泥磨&&dataList1.水泥磨[m_goal_val]!==0&&dataList1.水泥磨[m_goal_val]!==''&&that.tableDatas[14][4]!==''?((that.tableDatas[20][4] /dataList1.水泥磨[m_goal_val])*100).toFixed(2):'/';
})
}).then(res=>{
let obj1 = {};
@@ -376,24 +363,12 @@
that.$API.enm.enstat2.req(obj1).then((res1) => {
if(res1.length>0){
that.tableDatas[22][4]= this.canCompute(that.nowData[22],res1[0].clinker_val);
- that.tableDatas[24][4] = this.canCompute(that.nowData[24],res1[0].bulk_cement_val);
- that.tableDatas[26][4] = this.canCompute(that.nowData[26],res1[0].bag_cement_val);
+ that.tableDatas[23][4] = this.canCompute(that.nowData[23],res1[0].bulk_cement_val);
+ that.tableDatas[24][4] = this.canCompute(that.nowData[24],res1[0].bag_cement_val);
}
- })
- let obj2 = {};
- obj2.page = 0;
- obj2.type = 'year_s';
- obj2.year_s = this.year;
- that.$API.enm.enstat2.req(obj2).then((res2) => {
- if(res2.length>0){
- that.tableDatas[23][4] = this.canCompute(that.nowData[23],res2[0].clinker_val);
- that.tableDatas[25][4] = this.canCompute(that.nowData[25],res2[0].bulk_cement_val);
- that.tableDatas[27][4] = this.canCompute(that.nowData[27],res2[0].bag_cement_val);
- }
- })
- }).then(res=>{
+ }).then(res=>{
this.getTongbiData();
- });
+ })});
},
getTongbiData(){
let that = this;
@@ -401,6 +376,7 @@
params.page = 0;
params.year_s = that.year_t;
params.month_s = that.month_t;
+ let m_goal_val = "goal_val_" + that.month
params.type = 'month_s';
this.$API.enm.enstat.req(params).then((res) => {
if (res.length>0){
@@ -426,23 +402,23 @@
that.tableDatas[12][5] = this.canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
that.tableDatas[13][5] = this.canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
//产量(t)
- that.tableDatas[14][5] = this.canCompute(that.nowData[14],dataList.电石渣.production_hour);
- that.tableDatas[16][5] = this.canCompute(that.nowData[16],dataList.原料磨.production_hour);
- that.tableDatas[18][5] = this.canCompute(that.nowData[18],dataList.回转窑.production_hour);
- that.tableDatas[20][5] = this.canCompute(that.nowData[20],dataList.水泥磨.production_hour);
+ that.tableDatas[14][5] = this.canCompute(that.nowData[14],dataList.电石渣.total_production);
+ that.tableDatas[16][5] = this.canCompute(that.nowData[16],dataList.原料磨.total_production);
+ that.tableDatas[18][5] = this.canCompute(that.nowData[18],dataList.回转窑.total_production);
+ that.tableDatas[20][5] = this.canCompute(that.nowData[20],dataList.水泥磨.total_production);
//成本(元/吨)
- that.tableDatas[28][5] = this.canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
- that.tableDatas[29][5] = this.canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
- that.tableDatas[30][5] = this.canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
- that.tableDatas[31][5] = this.canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
- that.tableDatas[32][5] = this.canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
+ that.tableDatas[25][5] = this.canCompute(that.nowData[25],dataList.电石渣.production_cost_unit);
+ that.tableDatas[26][5] = this.canCompute(that.nowData[26],dataList.原料磨.production_cost_unit);
+ that.tableDatas[27][5] = this.canCompute(that.nowData[27],dataList.回转窑.production_cost_unit);
+ that.tableDatas[28][5] = this.canCompute(that.nowData[28],dataList.水泥磨.production_cost_unit);
+ that.tableDatas[29][5] = this.canCompute(that.nowData[29],dataList.水泥包装.production_cost_unit);
//耗电量(kw.h)
- that.tableDatas[33][5] = this.canCompute(that.nowData[33],dataList.电石渣.elec_consume);
- that.tableDatas[34][5] = this.canCompute(that.nowData[34],dataList.原料磨.elec_consume);
- that.tableDatas[35][5] = this.canCompute(that.nowData[35],dataList.回转窑.elec_consume);
- that.tableDatas[36][5] = this.canCompute(that.nowData[36],dataList.水泥磨.elec_consume);
- that.tableDatas[37][5] = this.canCompute(that.nowData[37],dataList.水泥包装.elec_consume);
- that.tableDatas[38][5] = this.canCompute(that.nowData[38],dataList.生活区.elec_consume);
+ that.tableDatas[30][5] = this.canCompute(that.nowData[30],dataList.电石渣.elec_consume);
+ that.tableDatas[31][5] = this.canCompute(that.nowData[31],dataList.原料磨.elec_consume);
+ that.tableDatas[32][5] = this.canCompute(that.nowData[32],dataList.回转窑.elec_consume);
+ that.tableDatas[33][5] = this.canCompute(that.nowData[33],dataList.水泥磨.elec_consume);
+ that.tableDatas[34][5] = this.canCompute(that.nowData[34],dataList.水泥包装.elec_consume);
+ that.tableDatas[35][5] = this.canCompute(that.nowData[35],dataList.生活区.elec_consume);
}
// that.tableDatas[39][4] = dataList.生活区.elec_consume;
}).then(res=>{
@@ -457,10 +433,10 @@
let label = item1.mgroup_name;
dataList1[label] = item1;
});
- that.tableDatas[15][5] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[14][5] /dataList1.电石渣.goal_val)*100:'';
- that.tableDatas[17][5] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[16][5] /dataList1.原料磨.goal_val)*100:'';
- that.tableDatas[19][5] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[18][5] /dataList1.回转窑.goal_val)*100:'';
- that.tableDatas[21][5] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[20][5] /dataList1.水泥磨.goal_val)*100:'';
+ that.tableDatas[15][5] = dataList1.电石渣&&dataList1.电石渣[m_goal_val]!==0&&dataList1.电石渣[m_goal_val]!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[14][5] /dataList1.电石渣[m_goal_val])*100:'';
+ that.tableDatas[17][5] = dataList1.原料磨&&dataList1.原料磨[m_goal_val]!==0&&dataList1.原料磨[m_goal_val]!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[16][5] /dataList1.原料磨[m_goal_val])*100:'';
+ that.tableDatas[19][5] = dataList1.回转窑&&dataList1.回转窑[m_goal_val]!==0&&dataList1.回转窑[m_goal_val]!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[18][5] /dataList1.回转窑[m_goal_val])*100:'';
+ that.tableDatas[21][5] = dataList1.水泥磨&&dataList1.水泥磨[m_goal_val]!==0&&dataList1.水泥磨[m_goal_val]!==''&&that.tableDatas[14][5]!==''&&that.tableDatas[14][5]!==undefined?(that.tableDatas[20][5] /dataList1.水泥磨[m_goal_val])*100:'';
})
}).then(res=>{
let obj1 = {};
@@ -471,28 +447,17 @@
that.$API.enm.enstat2.req(obj1).then((res1) => {
if(res1.length>0){
that.tableDatas[22][5]= this.canCompute(that.nowData[22],res1[0].clinker_val);
- that.tableDatas[24][5] = this.canCompute(that.nowData[24],res1[0].bulk_cement_val);
- that.tableDatas[26][5] = this.canCompute(that.nowData[26],res1[0].bag_cement_val);
- }
- })
- let obj2 = {};
- obj2.page = 0;
- obj2.type = 'year_s';
- obj2.year_s = this.year;
- that.$API.enm.enstat2.req(obj2).then((res2) => {
- if(res2.length>0){
- that.tableDatas[23][5] = this.canCompute(that.nowData[23],res2[0].clinker_val);
- that.tableDatas[25][5] = this.canCompute(that.nowData[25],res2[0].bulk_cement_val);
- that.tableDatas[27][5] = this.canCompute(that.nowData[27],res2[0].bag_cement_val);
+ that.tableDatas[23][5] = this.canCompute(that.nowData[23],res1[0].bulk_cement_val);
+ that.tableDatas[24][5] = this.canCompute(that.nowData[24],res1[0].bag_cement_val);
}
})
})
},
getTableData(){
- for(let i=0;i<39;i++){
- this.tableDatas[i][3] = '';
- this.tableDatas[i][4] = '';
- }
+ // for(let i=0;i<39;i++){
+ // this.tableDatas[i][3] = '';
+ // this.tableDatas[i][4] = '';
+ // }
this.getNowData();
},
handlePrint() {
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;
diff --git a/src/views/enm_slag/workshopAnalysis.vue b/src/views/enm_slag/workshopAnalysis.vue
index 05f8dfd2..2225396f 100644
--- a/src/views/enm_slag/workshopAnalysis.vue
+++ b/src/views/enm_slag/workshopAnalysis.vue
@@ -166,7 +166,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;
@@ -227,7 +228,7 @@ export default {
//当期与目标差值(KW·h/t)
let diff = 0;
if (item[2] !== "/") {
- diff = item[1] - item[2];
+ diff = (item[1] - item[2]).toFixed(2);
} else {
diff = "/";
}
@@ -262,11 +263,11 @@ export default {
//环比增长率(%)
let lastRate = 0;
if (
- lastDiff == "/" &&
+ lastDiff !== "/" &&
lastNum !== "/" &&
- lastNum !== 0
+ lastNum != 0
) {
- lastRate = (lastDiff / lastNum) * 100;
+ lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
} else {
lastRate = "/";
}
diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue
index f7761a94..1767a17a 100644
--- a/src/views/inm/mioitem.vue
+++ b/src/views/inm/mioitem.vue
@@ -9,6 +9,7 @@
+ 打印
{{
mioObj.number
@@ -208,15 +209,20 @@
@closed="dialog.check = false"
>
+
+
+
diff --git a/src/views/sam/orderitem.vue b/src/views/sam/orderitem.vue
index 5a8ac221..d066006e 100644
--- a/src/views/sam/orderitem.vue
+++ b/src/views/sam/orderitem.vue
@@ -9,19 +9,20 @@
+ 打印
- {{
- orderObj.number
- }}
- {{
- orderObj.customer_name
- }}
- {{
- orderObj.state
- }}
- {{
- orderObj.delivery_date
- }}
+
+ {{orderObj.number}}
+
+
+ {{orderObj.customer_name}}
+
+
+ {{stateOption[orderObj.state]}}
+
+
+ {{orderObj.delivery_date}}
+
@@ -33,6 +34,7 @@
type="primary"
icon="el-icon-plus"
@click="table_add"
+ v-if="orderObj.state == 10"
v-auth="'order.update'"
>
@@ -110,13 +112,18 @@
@success="handleSaveSuccess"
@closed="dialog.save = false"
>
+
+
+
|