Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
b4bb7b0f9f
|
@ -113,14 +113,34 @@ export default {
|
|||
if (res.length > 0) {
|
||||
res.forEach((item) => {
|
||||
if (item.goal_cate_name == "单位产品分布电耗(KW·h/t)") {
|
||||
that.getData(item);
|
||||
that.getGoalData();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
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 = {};
|
||||
|
@ -320,7 +340,7 @@ export default {
|
|||
},
|
||||
handleQuery() {
|
||||
this.tableDatas = [];
|
||||
this.getData(this.goalDatas);
|
||||
this.getGoalData();
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
|
|
@ -239,14 +239,6 @@
|
|||
<td class="numCell" v-else>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">入窑生料细度合格率(%)</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-if="reportItem.入窑生料_细度_rate_pass"
|
||||
>
|
||||
{{reportItem.入窑生料_细度_rate_pass * 100}}
|
||||
</td>
|
||||
<td class="numCell" v-else>0</td>
|
||||
<td class="numCell">入窑生料CaO合格率(%)</td>
|
||||
<td
|
||||
class="numCell"
|
||||
|
@ -264,26 +256,14 @@
|
|||
>
|
||||
{{reportItem.入窑生料_Fe2O3_rate_pass *100}}
|
||||
</td>
|
||||
<td class="numCell" v-else>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">入窑生料水分合格率(%)</td>
|
||||
<td
|
||||
class="numCell"
|
||||
v-if="reportItem.入窑生料_水分_rate_pass"
|
||||
>
|
||||
{{
|
||||
reportItem.入窑生料_水分_rate_pass * 100
|
||||
}}
|
||||
</td>
|
||||
|
||||
<td class="numCell" v-else>0</td>
|
||||
<td class="numCell">单位成本(元/吨)</td>
|
||||
<td class="numCell">
|
||||
{{ reportItem.production_cost_unit }}
|
||||
</td>
|
||||
<td class="numCell"></td>
|
||||
<td class="numCell"></td>
|
||||
</tr>
|
||||
|
||||
<tr v-if="sflogexpList.length > 0">
|
||||
<td
|
||||
class="numCell"
|
||||
|
|
|
@ -320,7 +320,7 @@ export default {
|
|||
// 动态绑定Class
|
||||
bindClass(item, index) {
|
||||
let classInfo = { redColor: false, greenColor: false };
|
||||
if (index == 3 || index == 5) {
|
||||
if (index == 3 || index == 5|| index == 6) {
|
||||
if ( item != "/") {
|
||||
item = Number(item);
|
||||
if (item > 0) {
|
||||
|
@ -691,7 +691,7 @@ export default {
|
|||
: "/";
|
||||
}
|
||||
if (arrs4[1] !== "/" && lastNum4 !== "/") {
|
||||
lastDiff4 = arrs4[1] - lastNum4;
|
||||
lastDiff4 = (arrs4[1] - lastNum4).toFixed(2);
|
||||
} else {
|
||||
lastDiff4 = "/";
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
v-model="query.type"
|
||||
placeholder="查询类型"
|
||||
clearable
|
||||
@change="typeCange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
|
@ -97,7 +96,7 @@
|
|||
:key="1"
|
||||
id="myTable"
|
||||
class="myTable"
|
||||
v-else
|
||||
v-if="query.type == 2"
|
||||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
|
@ -128,7 +127,7 @@
|
|||
class="numCell"
|
||||
>
|
||||
<div :class="bindClass(item1, ind)">
|
||||
<span v-if="item1 < 0 && ind == 6"
|
||||
<span v-if="item1 > 0 && ind == 6"
|
||||
>▲</span
|
||||
>
|
||||
<span v-if="item1 < 0 && ind == 6"
|
||||
|
@ -314,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) => {
|
||||
|
@ -382,24 +385,21 @@ export default {
|
|||
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 = "/";
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ export default {
|
|||
: "/";
|
||||
}
|
||||
if (arrs2[1] !== "/" && lastNum2 !== "/") {
|
||||
lastDiff2 = arrs2[1] - lastNum2;
|
||||
lastDiff2 = (arrs2[1] - lastNum2).toFixed(2);
|
||||
} else {
|
||||
lastDiff2 = "/";
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate2 = 0;
|
||||
if (
|
||||
lastDiff2 == "/" &&
|
||||
lastDiff2 !== "/" &&
|
||||
lastNum2 !== "/" &&
|
||||
lastNum2 !== 0
|
||||
) {
|
||||
|
@ -456,8 +456,8 @@ export default {
|
|||
},
|
||||
handleQuery() {
|
||||
this.getMonthGoal();
|
||||
this.getData();
|
||||
},
|
||||
typeCange() {},
|
||||
handlePrint() {
|
||||
this.$PRINT("#myReport");
|
||||
},
|
||||
|
|
|
@ -267,7 +267,8 @@ export default {
|
|||
if (
|
||||
lastDiff !== "/" &&
|
||||
lastNum !== "/" &&
|
||||
lastNum !== 0
|
||||
lastNum != 0 &&
|
||||
lastDiff != 0
|
||||
) {
|
||||
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
||||
} else {
|
||||
|
|
|
@ -180,10 +180,12 @@
|
|||
// },
|
||||
dayChange(e){
|
||||
let that = this;
|
||||
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;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="9">生产月报</th>
|
||||
<th colspan="6">生产月报</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
|
@ -49,10 +49,10 @@
|
|||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell" v-if="index==0" rowspan="5">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==5" rowspan="9">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==14" rowspan="14">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==28" rowspan="5">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==33" rowspan="6">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==14" rowspan="11">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==25" rowspan="5">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==30" rowspan="6">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index>35">{{item[1]}}</td>
|
||||
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
|
||||
<td class="numCell" >{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
|
@ -95,27 +95,21 @@
|
|||
[21,'产量','月水泥产量(t)'],
|
||||
[22,'产量','月水泥产量完成率(%)'],
|
||||
[23,'产量','月熟料出厂量(t)'],
|
||||
[24,'产量','月熟料累计出厂量(t)'],
|
||||
[25,'产量','月散装水泥出厂量(t)'],
|
||||
[26,'产量','月散装水泥出厂量(t)'],
|
||||
[27,'产量','月袋装水泥出厂量(t)'],
|
||||
[28,'产量','月袋装水泥出厂量(t)'],
|
||||
[24,'产量','月散装水泥出厂量(t)'],
|
||||
[25,'产量','月袋装水泥出厂量(t)'],
|
||||
|
||||
[26,'成本','月电石渣成本(元/吨)'],
|
||||
[27,'成本','月生料成本(元/吨)'],
|
||||
[28,'成本','月熟料成本(元/吨)'],
|
||||
[29,'成本','月水泥粉磨成本(元/吨)'],
|
||||
[30,'成本','月水泥包装成本(元/吨)'],
|
||||
|
||||
|
||||
[29,'成本','月电石渣成本(元/吨)'],
|
||||
[30,'成本','月生料成本(元/吨)'],
|
||||
[31,'成本','月熟料成本(元/吨)'],
|
||||
[32,'成本','月水泥粉磨成本(元/吨)'],
|
||||
[33,'成本','月水泥包装成本(元/吨)'],
|
||||
|
||||
|
||||
[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){
|
||||
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=>{
|
||||
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=>{
|
||||
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() {
|
||||
|
|
|
@ -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 = "/";
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
link
|
||||
size="small"
|
||||
@click="postRoleDel(scope.row)"
|
||||
v-auth="'post.delete'"
|
||||
v-auth="'post.update'"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue