fix tkx
This commit is contained in:
parent
7f135ed7e1
commit
9eb6ffeff5
|
@ -6,7 +6,7 @@ NODE_ENV = development
|
|||
VUE_APP_TITLE = '托克逊能源管理平台'
|
||||
# VUE_APP_TITLE = '中建材光子科技有限公司'
|
||||
# VUE_APP_TITLE = '超低排放系统'
|
||||
VUE_APP_PJ = 'pf'
|
||||
VUE_APP_PJ = ''
|
||||
|
||||
# 接口地址
|
||||
#VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||
|
@ -16,9 +16,9 @@ VUE_APP_PJ = 'pf'
|
|||
# VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||
|
||||
#测试环境
|
||||
VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||
VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||
#VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||
VUE_APP_BASEURL = http://49.232.14.174:2226
|
||||
VUE_APP_BASEURL = http://10.50.211.228:2250
|
||||
#VUE_APP_BASEURL = http://127.0.0.1:2226
|
||||
|
||||
# #光子
|
||||
|
|
|
@ -304,8 +304,9 @@ export default {
|
|||
this.visible = this.modelValue;
|
||||
this.option.legend.data.push(that.cate);
|
||||
this.option.series[0].name = that.cate;
|
||||
console.log(that.mgroup)
|
||||
if (that.mgroup) {
|
||||
if (that.cate == "总产量(t)") {
|
||||
if (that.cate == "总产量(t)"|| that.cate =="熟料(t)" ||that.cate == "出厂水泥合计(t)") {
|
||||
that.cateName = "total_production";
|
||||
} else if (
|
||||
that.cate == "单位产品分布电耗(KW·h/t)" ||
|
||||
|
|
|
@ -254,7 +254,7 @@ const routes = [
|
|||
name: "slag_power",
|
||||
path: "/enm_slag/power",
|
||||
meta: {
|
||||
title: "单位产品电耗",
|
||||
title: "主要设备单耗",
|
||||
// icon: "el-icon-odometer",
|
||||
perms: ["enm_slag"],
|
||||
},
|
||||
|
@ -360,7 +360,7 @@ const routes = [
|
|||
name: "power",
|
||||
path: "/enm_rm/power",
|
||||
meta: {
|
||||
title: "单位产品电耗",
|
||||
title: "主要设备单耗",
|
||||
// icon: "el-icon-odometer",
|
||||
perms: ["enm_rm"],
|
||||
},
|
||||
|
@ -486,7 +486,7 @@ const routes = [
|
|||
name: "coal_power",
|
||||
path: "/enm_coal/power",
|
||||
meta: {
|
||||
title: "单位产品电耗",
|
||||
title: "主要设备单耗",
|
||||
// icon: "el-icon-odometer",
|
||||
perms: ["enm_coal"],
|
||||
},
|
||||
|
@ -612,7 +612,7 @@ const routes = [
|
|||
name: "kiln_power",
|
||||
path: "/enm_kiln/power",
|
||||
meta: {
|
||||
title: "单位产品电耗",
|
||||
title: "主要设备单耗",
|
||||
// icon: "el-icon-odometer",
|
||||
perms: ["enm_kiln"],
|
||||
},
|
||||
|
@ -801,7 +801,7 @@ const routes = [
|
|||
name: "mill_power",
|
||||
path: "/enm_mill/power",
|
||||
meta: {
|
||||
title: "单位产品电耗",
|
||||
title: "主要设备单耗",
|
||||
// icon: "el-icon-odometer",
|
||||
perms: ["enm_mill"],
|
||||
},
|
||||
|
@ -920,7 +920,7 @@ const routes = [
|
|||
name: "enm_energy",
|
||||
path: "/enm_energy",
|
||||
meta: {
|
||||
title: "电量报表",
|
||||
title: "能源消耗报表",
|
||||
icon: "sc-icon-elec",
|
||||
type: "menu",
|
||||
perms: ["enm_energy"],
|
||||
|
@ -990,7 +990,7 @@ const routes = [
|
|||
name: "hourBase",
|
||||
path: "/enm_energy/hourBase",
|
||||
meta: {
|
||||
title: "电量消耗小时报表",
|
||||
title: "电量消耗逐时报表",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["hour_base"],
|
||||
},
|
||||
|
|
|
@ -246,21 +246,32 @@ export default {
|
|||
that.$emit("success", that.form, that.mode);
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
.catch((error) => {
|
||||
that.isSaveing = false;
|
||||
that.$message.error("操作失败,请稍后重试");
|
||||
console.error("Error creating mgroup:", error);
|
||||
});
|
||||
} else {
|
||||
res = that.$API.mtm.mgroup.update
|
||||
that.$API.mtm.mgroup.update
|
||||
.req(that.form.id, that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success", that.form, that.mode);
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
.catch((error) => {
|
||||
that.isSaveing = false;
|
||||
that.$message.error("操作失败,请稍后重试");
|
||||
console.error("Error updating mgroup:", error);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
|
|
|
@ -530,6 +530,9 @@ export default {
|
|||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
let ind = item.hour; //xAxis
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
|
@ -571,6 +574,9 @@ export default {
|
|||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
let ind = item.day_s - 1;
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
|
@ -613,6 +619,9 @@ export default {
|
|||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
|
|
|
@ -88,37 +88,41 @@
|
|||
</tr>
|
||||
<tr v-if="deptName=='原料车间'">
|
||||
<th colspan="4">电石渣</th>
|
||||
<th colspan="6">原料磨</th>
|
||||
<th colspan="4">原料磨</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th rowspan="2">车间用水(t)</th>
|
||||
</tr>
|
||||
<tr v-if="deptName=='烧成车间'">
|
||||
<th colspan="11">回转窑</th>
|
||||
<th colspan="4">煤磨</th>
|
||||
<th colspan="10">回转窑</th>
|
||||
<th colspan="3">煤磨</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th rowspan="2">车间用水(t)</th>
|
||||
</tr>
|
||||
<tr v-if="deptName=='水泥车间'">
|
||||
<th colspan="5">水泥磨</th>
|
||||
<th colspan="4">水泥磨</th>
|
||||
<th colspan="4">包装</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th rowspan="2">车间用水(t)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th v-if="deptName=='烧成车间'">煤粉(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">煤粉折标煤(tce)</th>
|
||||
<th v-if="deptName!='原料车间'">水(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">柴油(t)</th>
|
||||
<!-- <th v-if="deptName!='原料车间'">水(t)</th> -->
|
||||
<!-- <th v-if="deptName=='烧成车间'">柴油(t)</th> -->
|
||||
<th v-if="deptName=='烧成车间'">柴油折标煤(tce)</th>
|
||||
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽(t)</th>
|
||||
<th v-if="deptName=='烧成车间'">余热锅炉外送蒸汽折标煤(tce)</th>
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
<th v-if="deptName=='烧成车间'">单位产品综合能耗(tce/t)</th>
|
||||
<th v-else>单位产品能耗(tce/t)</th>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>电量折标煤(tce)</th>
|
||||
<th v-if="deptName=='原料车间'">水(t)</th>
|
||||
<th v-if="deptName=='原料车间'">窑尾余热利用(tce)</th>
|
||||
<!-- <th v-if="deptName=='原料车间'">水(t)</th> -->
|
||||
<!-- <th v-if="deptName=='原料车间'">窑尾余热利用(tce)</th> -->
|
||||
<th>产品产量(t)</th>
|
||||
<th>单位产品综合能耗(tce/t)</th>
|
||||
<th>单位产品能耗(tce/t)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
|
@ -234,27 +238,34 @@
|
|||
wrapArr[ind][1]=item
|
||||
}else if(item.mgroup_name=='原料压缩空气'){
|
||||
wrapArr[ind][2]=item
|
||||
}else if(item.mgroup_name=='原料车间用水'){
|
||||
wrapArr[ind][3]=item
|
||||
}
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
if(item.mgroup_name=='回转窑'){
|
||||
wrapArr[ind][1]=item
|
||||
wrapArr[ind][0]=item
|
||||
}else if (item.mgroup_name=='烧成压缩空气') {
|
||||
wrapArr[ind][2]=item
|
||||
}
|
||||
else if (item.mgroup_name=='烧成车间用水') {
|
||||
wrapArr[ind][3]=item
|
||||
}else{
|
||||
wrapArr[ind][0]=item
|
||||
wrapArr[ind][1]=item
|
||||
}
|
||||
}else{
|
||||
if(item.mgroup_name=='水泥磨'){
|
||||
wrapArr[ind][1]=item
|
||||
wrapArr[ind][0]=item
|
||||
}else if(item.mgroup_name=='水泥压缩空气'){
|
||||
wrapArr[ind][2]=item
|
||||
}else{
|
||||
wrapArr[ind][0]=item
|
||||
}else if(item.mgroup_name=='水泥车间用水'){
|
||||
wrapArr[ind][3]=item
|
||||
}else if(item.mgroup_name=='水泥包装'){
|
||||
wrapArr[ind][1]=item
|
||||
}
|
||||
}
|
||||
});
|
||||
// debugger;
|
||||
console.log(wrapArr);
|
||||
// console.log(wrapArr);
|
||||
wrapArr.forEach((item1)=>{
|
||||
//item1------一天的数据
|
||||
if(item1!=undefined){
|
||||
|
@ -270,16 +281,18 @@
|
|||
if(that.deptName=='烧成车间'){
|
||||
itemArr.push( item1[0].pcoal_consume)//煤粉(t)
|
||||
itemArr.push( item1[0].pcoal_coal_consume)//煤粉折标煤(tce)
|
||||
itemArr.push( item1[0].water_consume)//水(t)
|
||||
itemArr.push( item1[0].pcoal_consume)//柴油(t)
|
||||
// itemArr.push( item1[0].water_consume)//水(t)
|
||||
// itemArr.push( item1[0].pcoal_consume)//柴油(t)
|
||||
itemArr.push( item1[0].pcoal_coal_consume)//柴油折标煤(tce)
|
||||
itemArr.push( item1[0].out_steam)//余热锅炉外送蒸汽(t)
|
||||
itemArr.push( item1[0].out_steam_coal)//余热锅炉外送蒸汽折标煤(tce)
|
||||
}else if(that.deptName=='水泥车间'){
|
||||
itemArr.push( item1[0].water_consume)//水
|
||||
}
|
||||
itemArr.push( item1[0].total_production) //总产量
|
||||
itemArr.push( item1[0].cen_consume_unit) // 单位产品综合能耗
|
||||
if(item1[1].mgroup_name == '回转窑'){
|
||||
itemArr.push( item1[0].cen_consume_unit)
|
||||
}else{
|
||||
itemArr.push( item1[0].en_consume_unit) // 单位产品综合能耗
|
||||
}
|
||||
if (item1[1]){
|
||||
itemArr.push( item1[1].elec_consume)
|
||||
itemArr.push( item1[1].elec_coal_consume)
|
||||
|
@ -287,17 +300,22 @@
|
|||
itemArr.push( 0)
|
||||
itemArr.push( 0)
|
||||
}
|
||||
if(that.deptName=='原料车间'){
|
||||
itemArr.push( item1[1].water_consume)//水
|
||||
itemArr.push( item1[1].kiln_end_heat)//窑尾余热
|
||||
}
|
||||
// if(that.deptName=='原料车间'){
|
||||
// // itemArr.push( item1[1].water_consume)//水
|
||||
// // itemArr.push( item1[1].kiln_end_heat)//窑尾余热
|
||||
// }
|
||||
itemArr.push( item1[1].total_production)
|
||||
itemArr.push( item1[1].cen_consume_unit)
|
||||
itemArr.push( item1[1].en_consume_unit)
|
||||
if(item1 &&item1[2]){
|
||||
itemArr.push(item1[2].cair_consume)//压缩空气
|
||||
}else{
|
||||
itemArr.push( 0)
|
||||
}
|
||||
if(item1 &&item1[3]){
|
||||
itemArr.push(item1[3].water_consume)//水
|
||||
}else{
|
||||
itemArr.push(0)
|
||||
}
|
||||
innerArr.push(itemArr)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -297,20 +297,20 @@ export default {
|
|||
? item.高温风机_consume_unit
|
||||
: "/";
|
||||
arr[20] =
|
||||
item.篦冷机一室风机_consume_unit != null
|
||||
? item.篦冷机一室风机_consume_unit
|
||||
item.篦冷机一室风机电机_consume_unit != null
|
||||
? item.篦冷机一室风机电机_consume_unit
|
||||
: "/";
|
||||
arr[21] =
|
||||
item.篦冷机三室风机_consume_unit != null
|
||||
? item.篦冷机三室风机_consume_unit
|
||||
item.篦冷机三室风机电机_consume_unit != null
|
||||
? item.篦冷机三室风机电机_consume_unit
|
||||
: "/";
|
||||
arr[22] =
|
||||
item.篦冷机二室风机_consume_unit != null
|
||||
? item.篦冷机二室风机_consume_unit
|
||||
item.篦冷机二室风机电机_consume_unit != null
|
||||
? item.篦冷机二室风机电机_consume_unit
|
||||
: "/";
|
||||
arr[23] =
|
||||
item.窑头排风机_consume_unit != null
|
||||
? item.窑头排风机_consume_unit
|
||||
item.窑头排风机主电机_consume_unit != null
|
||||
? item.窑头排风机主电机_consume_unit
|
||||
: "/";
|
||||
arr[24] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
// arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取
|
||||
|
|
|
@ -516,11 +516,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate = 0;
|
||||
if (
|
||||
lastDiff == "/" &&
|
||||
lastDiff !== "/" &&
|
||||
lastNum !== "/" &&
|
||||
lastNum !== 0
|
||||
) {
|
||||
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
||||
lastRate = ((lastDiff / arrs[4]) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate = "/";
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ export default {
|
|||
: "/";
|
||||
}
|
||||
if (arrs2[1] !== "/" && lastNum2 !== "/") {
|
||||
lastDiff2 = arrs2[1] - lastNum2;
|
||||
lastDiff2 = (arrs2[1] - lastNum2).toFixed(2);
|
||||
} else {
|
||||
lastDiff2 = "/";
|
||||
}
|
||||
|
@ -576,11 +576,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate2 = 0;
|
||||
if (
|
||||
lastDiff2 == "/" &&
|
||||
lastDiff2 !== "/" &&
|
||||
lastNum2 !== "/" &&
|
||||
lastNum2 !== 0
|
||||
) {
|
||||
lastRate2 = (lastDiff2 / lastNum2) * 100;
|
||||
lastRate2 = ((lastDiff2 / lastNum2) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate2 = "/";
|
||||
}
|
||||
|
@ -637,11 +637,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate3 = 0;
|
||||
if (
|
||||
lastDiff3 == "/" &&
|
||||
lastDiff3 !== "/" &&
|
||||
lastNum3 !== "/" &&
|
||||
lastNum3 !== 0
|
||||
) {
|
||||
lastRate3 = (lastDiff3 / lastNum3) * 100;
|
||||
lastRate3 = ((lastDiff3 / lastNum3) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate3 = "/";
|
||||
}
|
||||
|
@ -698,11 +698,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate4 = 0;
|
||||
if (
|
||||
lastDiff4 == "/" &&
|
||||
lastDiff4 !== "/" &&
|
||||
lastNum4 !== "/" &&
|
||||
lastNum4 !== 0
|
||||
) {
|
||||
lastRate4 = (lastDiff4 / lastNum4) * 100;
|
||||
lastRate4 = ((lastDiff4 / lastNum4) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate4 = "/";
|
||||
}
|
||||
|
|
|
@ -602,6 +602,9 @@ export default {
|
|||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
let ind = item.hour; //xAxis
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
|
@ -644,6 +647,9 @@ export default {
|
|||
data.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
let ind = item.day_s - 1;
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = { ...that.option2 };
|
||||
|
|
|
@ -814,7 +814,6 @@ export default {
|
|||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
|
|
|
@ -119,11 +119,21 @@ export default {
|
|||
if (res.length > 0) {
|
||||
data = res[0];
|
||||
}
|
||||
that.getData(data);
|
||||
that.getGoalData();
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getGoalData() {
|
||||
let that = this;
|
||||
let params = {};
|
||||
params.page = 0;
|
||||
params.year = that.query.year_s;
|
||||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
that.getData(res);
|
||||
});
|
||||
},
|
||||
getData(goalData) {
|
||||
let that = this;
|
||||
let query0 = {};
|
||||
|
@ -195,8 +205,8 @@ export default {
|
|||
: "/";
|
||||
//设备
|
||||
arr[9] =
|
||||
item.循环风机1906_consume_unit != null
|
||||
? item.循环风机1906_consume_unit
|
||||
item.循环风机_consume_unit != null
|
||||
? item.循环风机_consume_unit
|
||||
: "/";
|
||||
arr[10] =
|
||||
item.系统风机_consume_unit != null
|
||||
|
@ -270,7 +280,7 @@ export default {
|
|||
},
|
||||
handleQuery() {
|
||||
this.tableDatas = [];
|
||||
this.getData();
|
||||
this.getGoalData();
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥磨工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥包装工段">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
@ -262,7 +262,7 @@ let toolbox = {
|
|||
};
|
||||
let legend = {
|
||||
top: "2%",
|
||||
data: ["总产量", "分布电耗"],
|
||||
data: ["熟料", "分布电耗"],
|
||||
};
|
||||
let yAxis = [
|
||||
{
|
||||
|
@ -334,8 +334,7 @@ export default {
|
|||
["出厂水泥", "P.C42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.C42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "P.O52.5 散装(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
|
||||
["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0],
|
||||
|
||||
|
@ -343,7 +342,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "水泥磨工段",
|
||||
title: "水包装工段",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
@ -539,7 +538,6 @@ export default {
|
|||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "水泥包装" })
|
||||
.then((res) => {
|
||||
console.log("水泥包装", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
//年
|
||||
let params1 = {};
|
||||
|
@ -569,7 +567,7 @@ export default {
|
|||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][4] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][4] = item.val;
|
||||
that.tableDatas[9][4] = item.elec_consume_unit;
|
||||
}
|
||||
}
|
||||
)}
|
||||
|
@ -603,7 +601,7 @@ export default {
|
|||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][3] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][3] = item.val;
|
||||
that.tableDatas[9][3] = item.elec_consume_unit;
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -684,7 +682,7 @@ export default {
|
|||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][2] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
that.tableDatas[9][2] = item.val;
|
||||
that.tableDatas[9][2] = item.elec_consume_unit;
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -746,7 +744,6 @@ export default {
|
|||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
|
@ -805,7 +802,7 @@ export default {
|
|||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
seriesData9[ind] = item.val;
|
||||
seriesData9[ind] = item.elec_consume_unit;
|
||||
}
|
||||
});
|
||||
let options = { ...that.option1 };
|
||||
|
@ -869,7 +866,7 @@ export default {
|
|||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
}else if (item.mpoint_name == "包装进线") {
|
||||
seriesData9[ind] = item.val;
|
||||
seriesData9[ind] = item.elec_consume_unit;
|
||||
}
|
||||
});
|
||||
let options = { ...that.option2 };
|
||||
|
@ -897,6 +894,14 @@ export default {
|
|||
this.cate = item[1];
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type, item) {
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT("#myReport");
|
||||
},
|
||||
|
|
|
@ -97,22 +97,29 @@ 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;
|
||||
params.year = year;
|
||||
params.mgroup = that.query.mgroup;
|
||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||
let data = [];
|
||||
if (res.length > 0) {
|
||||
data = res[0];
|
||||
}
|
||||
that.getData(data);
|
||||
});
|
||||
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) => {
|
||||
// let data = [];
|
||||
// if (res.length > 0) {
|
||||
// self.data = res[1];
|
||||
// console.log("目标数据", self.data);
|
||||
// }
|
||||
self.getData(res[1]);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('获取目标数据失败:', error);
|
||||
});
|
||||
},
|
||||
getData(goalData) {
|
||||
let that = this;
|
||||
let query0 = {};
|
||||
|
@ -139,7 +146,7 @@ export default {
|
|||
}
|
||||
wrapArr0[ind0] = item0;
|
||||
});
|
||||
console.log(wrapArr0);
|
||||
// console.log(wrapArr0);
|
||||
} else {
|
||||
}
|
||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||
|
@ -166,7 +173,7 @@ export default {
|
|||
arr[3] = item.elec_consume_unit; //当期值(KW·h/t)
|
||||
let keyVale = "goal_val_" + n;
|
||||
arr[4] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||
arr[5] = arr[3] - arr[4]; //当期与目标差值(KW·h/t)
|
||||
arr[5] = (arr[3] - arr[4]).toFixed(2); //当期与目标差值(KW·h/t)
|
||||
let ind_pre = 0,
|
||||
huanbi = 0;
|
||||
if (item.month_s == 1) {
|
||||
|
@ -183,17 +190,16 @@ export default {
|
|||
: "/";
|
||||
}
|
||||
arr[6] = huanbi; //环期值(KW·h/t)上个月的值\
|
||||
let diff = 0;
|
||||
if (arr[6] == "/"){
|
||||
diff == "/";
|
||||
if (arr[6] !== "/"){
|
||||
arr[7] = (arr[3] - arr[6]).toFixed(2); //当期与环期差值(KW·h/t)
|
||||
}else{
|
||||
diff = arr[3] - arr[6]; //当期与环期差值(KW·h/t)
|
||||
arr[7] = "/"; //当期与环期差值(KW·h/t)
|
||||
}
|
||||
arr[7] = diff;
|
||||
if (arr[7]=="/" || arr[6]=="/" || arr[6]==0){
|
||||
arr[8] == "/";
|
||||
console.log(arr[7], arr[6])
|
||||
if (arr[7] !=="/" && arr[6] !==0 && arr[7] !== "undefined"){
|
||||
arr[8] = ((arr[7]/arr[6])*100).toFixed(2);
|
||||
}else{
|
||||
arr[8] = (arr[7]/arr[6])*100 //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||
arr[8] = "/"; //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100%
|
||||
}
|
||||
let sameRate = 0;
|
||||
if (
|
||||
|
@ -201,7 +207,7 @@ export default {
|
|||
wrapArr0[ind].elec_consume_unit
|
||||
) {
|
||||
sameRate =
|
||||
((arrs[1] -
|
||||
((arr[3] -
|
||||
wrapArr0[ind].elec_consume_unit) /
|
||||
wrapArr0[ind].elec_consume_unit) *
|
||||
100;
|
||||
|
@ -220,7 +226,7 @@ export default {
|
|||
},
|
||||
handleQuery() {
|
||||
this.tableDatas = [];
|
||||
this.getData();
|
||||
this.getGoalData();
|
||||
},
|
||||
itemClick(type, item) {
|
||||
this.type = type;
|
||||
|
@ -231,7 +237,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;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -264,11 +264,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate = 0;
|
||||
if (
|
||||
lastDiff == "/" &&
|
||||
lastDiff !== "/" &&
|
||||
lastNum !== "/" &&
|
||||
lastNum !== 0
|
||||
) {
|
||||
lastRate = (lastDiff / lastNum) * 100;
|
||||
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate = "/";
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<th rowspan="3" v-if="query.type == 0">班次</th>
|
||||
<th rowspan="3" v-if="query.type == 0">班组</th>
|
||||
<th rowspan="3">实际产量(t)</th>
|
||||
<th rowspan="3">总成本(元)</th>
|
||||
<!-- <th rowspan="3">总成本(元)</th> -->
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
<th :colspan="materialList.length">直接材料</th>
|
||||
<th colspan="2">直接人工</th>
|
||||
|
@ -101,7 +101,7 @@ export default {
|
|||
mgroupOptions: [],
|
||||
tableName: '班组成本计算',
|
||||
options: [
|
||||
{ id: 0, name: '班统计' },
|
||||
// { id: 0, name: '班统计' },
|
||||
{ id: 1, name: '日统计' },
|
||||
{ id: 2, name: '月统计' },
|
||||
],
|
||||
|
@ -174,6 +174,7 @@ export default {
|
|||
},
|
||||
getData() {
|
||||
let that = this;
|
||||
that.tableData1 = [];
|
||||
that.data1 = 0;
|
||||
that.data2 = 0;
|
||||
that.data3 = 0;
|
||||
|
@ -200,27 +201,53 @@ export default {
|
|||
}
|
||||
that.$API.enm.enstat.req(params).then(res => {
|
||||
if (res.length > 0) {
|
||||
let materials = res[0].imaterial_data;
|
||||
let materials = res[res.length - 1].imaterial_data;
|
||||
let arr = [];
|
||||
let dataArr = [];
|
||||
materials.forEach(item => {
|
||||
if (item.material_type == 0) {//电水
|
||||
that.data2 = that.data2 + 4;
|
||||
} else if (item.material_type == 30 || item.material_type == 20) {//原材料
|
||||
if (item.material_name == "湿电石渣进厂"||item.material_name == "工业水"||item.material_name == "动力电") {
|
||||
// Skip adding item details to arr for "湿电石渣进厂"
|
||||
return;
|
||||
}
|
||||
if (item.material_type == 30 || item.material_type == 20) {//原材料
|
||||
that.data1 = that.data1 + 4;
|
||||
} else if (item.material_type == 40) {//辅助材料
|
||||
that.data3 = that.data3 + 4;
|
||||
}
|
||||
arr.push(item.material_name)
|
||||
let materialName = item.material_name
|
||||
if (materialName === "入窑生料") {
|
||||
materialName = "生料";
|
||||
} else if (materialName === "入窑煤粉") {
|
||||
materialName = "原煤";
|
||||
}
|
||||
arr.push(materialName)
|
||||
arr.push('单价(元/吨)')
|
||||
arr.push('总成本(元)')
|
||||
arr.push('单位成本(元/吨)')
|
||||
})
|
||||
materials.forEach(item => {
|
||||
if(item.material_name == "动力电"){
|
||||
that.data2 = that.data2 + 4
|
||||
arr.push(item.material_name)
|
||||
arr.push('单价(元/度)')
|
||||
arr.push('总成本(元)')
|
||||
arr.push('单位成本(元/吨)')
|
||||
}
|
||||
})
|
||||
materials.forEach(item => {
|
||||
if(item.material_name == "工业水"){
|
||||
that.data2 = that.data2 + 4
|
||||
arr.push(item.material_name)
|
||||
arr.push('单价(元/吨)')
|
||||
arr.push('总成本(元)')
|
||||
arr.push('单位成本(元/吨)')
|
||||
}
|
||||
})
|
||||
that.allCol = arr.length + 16
|
||||
that.materialList = arr;
|
||||
let dataArr = [];
|
||||
|
||||
res.forEach(itemData => {
|
||||
let time = '';
|
||||
dataArr = [];
|
||||
if (that.query.type == 0) {
|
||||
time = itemData.year_s + '.' + itemData.month_s + '.' + itemData.day_s;
|
||||
} else if (that.query.type == 1) {
|
||||
|
@ -234,20 +261,42 @@ export default {
|
|||
dataArr.push(itemData.team_name);
|
||||
}
|
||||
dataArr.push(itemData.total_production);
|
||||
dataArr.push(itemData.coal_consume_unit);
|
||||
dataArr.push(itemData.cen_consume_unit);
|
||||
// dataArr.push(itemData.coal_consume_unit);
|
||||
dataArr.push(itemData.production_cost_unit);
|
||||
let sub1data = itemData.imaterial_data;
|
||||
for (let i = 0; i < sub1data.length; i++) {
|
||||
dataArr.push(sub1data[i].cost)
|
||||
dataArr.push(sub1data[i].price_unit)
|
||||
dataArr.push(sub1data[i].amount_consume)
|
||||
dataArr.push(sub1data[i].cost_unit)
|
||||
if (sub1data[i].material_name === '湿电石渣进厂'|| sub1data[i].material_name === '动力电'|| sub1data[i].material_name === '工业水'){
|
||||
continue;
|
||||
}
|
||||
dataArr.push((sub1data[i].amount_consume).toFixed(2))
|
||||
dataArr.push((sub1data[i].price_unit).toFixed(2))
|
||||
dataArr.push((sub1data[i].cost).toFixed(2))
|
||||
dataArr.push((sub1data[i].cost_unit).toFixed(2))
|
||||
}
|
||||
for (let i = 0; i < sub1data.length; i++) {
|
||||
if (sub1data[i].material_name == '动力电') {
|
||||
dataArr.push((sub1data[i].amount_consume).toFixed(2));
|
||||
dataArr.push((sub1data[i].price_unit).toFixed(2))
|
||||
dataArr.push((sub1data[i].cost).toFixed(2));
|
||||
dataArr.push((sub1data[i].cost_unit).toFixed(2));
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < sub1data.length; i++) {
|
||||
if (sub1data[i].material_name == '工业水') {
|
||||
dataArr.push((sub1data[i].amount_consume).toFixed(2));
|
||||
dataArr.push((sub1data[i].price_unit).toFixed(2));
|
||||
dataArr.push((sub1data[i].cost).toFixed(2));
|
||||
dataArr.push((sub1data[i].cost_unit).toFixed(2));
|
||||
}
|
||||
}
|
||||
let otherdata = itemData.other_cost_data;
|
||||
for (let j = 0; j < otherdata.length; j++) {
|
||||
dataArr.push(otherdata[j].cost_unit)
|
||||
dataArr.push((otherdata[j].cost_unit).toFixed(2))
|
||||
}
|
||||
that.tableData1.push(dataArr)
|
||||
dataArr = [];
|
||||
arr = [];
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -204,22 +204,22 @@
|
|||
that.header2Obj=[{name:'辅料',lengths:3},{name:'干混生料',lengths:4}];
|
||||
that.header2 = ['辅料','干混生料'];//物料
|
||||
// that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率'];//检测项
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
that.header2Obj=[{name:'入窑生料',lengths:4},{name:'熟料',lengths:4}];
|
||||
that.header2 = ['入窑生料','熟料'];//物料
|
||||
// that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率'];//检测项
|
||||
}else{
|
||||
that.header2Obj=[{name:'出磨水泥',lengths:3}];
|
||||
that.header2 = ['出磨水泥'];//物料
|
||||
// that.header3 = ['比表面积','SO3','掺量'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项
|
||||
that.header4 = ['平均值','检次','合次','合格率','平均值','检次','合次','合格率','平均值','检次','合次','合格率'];//检测项
|
||||
}
|
||||
let params = {page: 0};
|
||||
let arr = [];
|
||||
|
||||
if(that.query.type==0){//日
|
||||
console.log(that.query.month)
|
||||
arr = that.query.month.split('-');
|
||||
params.year_s = arr[0];
|
||||
params.month_s = arr[1];
|
||||
|
@ -248,6 +248,7 @@
|
|||
}
|
||||
if(that.deptName=='原料车间'){
|
||||
wrapArr[ind].push(item)
|
||||
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
if(item.mgroup_name=='回转窑'){
|
||||
wrapArr[ind][1]=item
|
||||
|
@ -258,7 +259,6 @@
|
|||
wrapArr[ind].push(item)
|
||||
}
|
||||
});
|
||||
|
||||
wrapArr = wrapArr.filter(item=>{
|
||||
return item
|
||||
})
|
||||
|
@ -269,6 +269,7 @@
|
|||
let time =item1[0].day_s!=null? item1[0].year_s+'.'+item1[0].month_s+'.'+item1[0].day_s:item1[0].year_s+'.'+item1[0].month_s;
|
||||
itemArr.push(time)
|
||||
//遍历每个工段
|
||||
console.log(item1)
|
||||
item1.forEach(item2=>{
|
||||
let data2 =item2.qua_data;
|
||||
//遍历一个工段的物料检验数据
|
||||
|
@ -285,7 +286,7 @@
|
|||
header4tem.push('平均值')
|
||||
header4tem.push('检次')
|
||||
header4tem.push('合次')
|
||||
header4tem.push('及格率')
|
||||
header4tem.push('合格率')
|
||||
let indexObj = header2tem.indexOf(item3.material_name);
|
||||
if(indexObj>0&&index3==0){
|
||||
let inde = indexObj-1;
|
||||
|
@ -332,7 +333,6 @@
|
|||
if(header4.length>0){
|
||||
that.header4 = header4;
|
||||
}
|
||||
console.log(innerArr)
|
||||
this.$forceUpdate();
|
||||
innerArr.forEach(item=>{
|
||||
if(item.length>1){
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
<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==28" rowspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==32" rowspan="6">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
|
||||
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index<39" colspan="3">{{item[3]}}</td>
|
||||
|
@ -129,15 +129,15 @@
|
|||
[30,'成本','日生料成本(元/吨)'],
|
||||
[31,'成本','日熟料成本(元/吨)'],
|
||||
[32,'成本','日水泥粉磨成本(元/吨)'],
|
||||
[33,'成本','日水泥包装成本(元/吨)'],
|
||||
// [33,'成本','日水泥包装成本(元/吨)'],
|
||||
|
||||
|
||||
[34,'耗电量','日电石渣耗电量(kw.h)'],
|
||||
[35,'耗电量','日生料耗电量(kw.h)'],
|
||||
[36,'耗电量','日熟料耗电量(kw.h)'],
|
||||
[37,'耗电量','日水泥粉磨耗电量(kw.h)'],
|
||||
[38,'耗电量','日水泥包装耗电量(kw.h)'],
|
||||
[39,'耗电量','日生活区耗电量(kw.h)'],
|
||||
[33,'耗电量','日电石渣耗电量(kw.h)'],
|
||||
[34,'耗电量','日生料耗电量(kw.h)'],
|
||||
[35,'耗电量','日熟料耗电量(kw.h)'],
|
||||
[36,'耗电量','日水泥粉磨耗电量(kw.h)'],
|
||||
[37,'耗电量','日水泥包装耗电量(kw.h)'],
|
||||
[38,'耗电量','日生活区耗电量(kw.h)'],
|
||||
|
||||
|
||||
['生产异常动态','工段','类别','原因','处置措施','处置人'],
|
||||
|
@ -223,23 +223,23 @@
|
|||
that.tableDatas[12][3] = dataList.水泥磨.elec_consume_unit;
|
||||
that.tableDatas[13][3] = dataList.水泥包装.elec_consume_unit;
|
||||
//产量(t)
|
||||
that.tableDatas[14][3] = dataList.电石渣.production_hour;
|
||||
that.tableDatas[16][3] = dataList.原料磨.production_hour;
|
||||
that.tableDatas[18][3] = dataList.回转窑.production_hour;
|
||||
that.tableDatas[20][3] = dataList.水泥磨.production_hour;
|
||||
that.tableDatas[14][3] = dataList.电石渣.total_production;
|
||||
that.tableDatas[16][3] = dataList.原料磨.total_production;
|
||||
that.tableDatas[18][3] = dataList.回转窑.total_production;
|
||||
that.tableDatas[20][3] = dataList.水泥磨.total_production;
|
||||
//成本(元/吨)
|
||||
that.tableDatas[28][3] = dataList.电石渣.production_cost_unit;
|
||||
that.tableDatas[29][3] = dataList.原料磨.production_cost_unit;
|
||||
that.tableDatas[30][3] = dataList.回转窑.production_cost_unit;
|
||||
that.tableDatas[31][3] = dataList.水泥磨.production_cost_unit;
|
||||
that.tableDatas[32][3] = dataList.水泥包装.production_cost_unit;
|
||||
// that.tableDatas[32][3] = dataList.水泥包装.production_cost_unit;
|
||||
//耗电量(kw.h)
|
||||
that.tableDatas[33][3] = dataList.电石渣.elec_consume;
|
||||
that.tableDatas[34][3] = dataList.原料磨.elec_consume;
|
||||
that.tableDatas[35][3] = dataList.回转窑.elec_consume;
|
||||
that.tableDatas[36][3] = dataList.煤磨.elec_consume;
|
||||
that.tableDatas[37][3] = dataList.水泥磨.elec_consume;
|
||||
that.tableDatas[38][3] = dataList.水泥包装.elec_consume;
|
||||
that.tableDatas[32][3] = dataList.电石渣.elec_consume;
|
||||
that.tableDatas[33][3] = dataList.原料磨.elec_consume;
|
||||
that.tableDatas[34][3] = dataList.回转窑.elec_consume;
|
||||
that.tableDatas[35][3] = dataList.煤磨.elec_consume;
|
||||
that.tableDatas[36][3] = dataList.水泥磨.elec_consume;
|
||||
that.tableDatas[37][3] = dataList.水泥包装.elec_consume;
|
||||
// that.tableDatas[39][3] = dataList.生活区.elec_consume;
|
||||
}).then(res=>{
|
||||
//获取月和年目标
|
||||
|
@ -257,10 +257,10 @@
|
|||
if(this.type=='day'){
|
||||
ind = 'goal_val_'+that.month;
|
||||
}
|
||||
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣[ind]!==0&&dataList1.电石渣[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[14][3] /dataList1.电石渣[ind])*100:'/';
|
||||
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨[ind]!==0&&dataList1.原料磨[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[16][3] /dataList1.原料磨[ind])*100:'/';
|
||||
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑[ind]!==0&&dataList1.回转窑[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[18][3] /dataList1.回转窑[ind])*100:'/';
|
||||
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨[ind]!==0&&dataList1.水泥磨[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[20][3] /dataList1.水泥磨[ind])*100:'/';
|
||||
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣[ind]!==0&&dataList1.电石渣[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[14][3] /dataList1.电石渣[ind])*100).toFixed(2):'/';
|
||||
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨[ind]!==0&&dataList1.原料磨[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[16][3] /dataList1.原料磨[ind])*100).toFixed(2):'/';
|
||||
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑[ind]!==0&&dataList1.回转窑[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[18][3] /dataList1.回转窑[ind])*100).toFixed(2):'/';
|
||||
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨[ind]!==0&&dataList1.水泥磨[ind]!==''&&that.tableDatas[14][3]!==''?((that.tableDatas[20][3] /dataList1.水泥磨[ind])*100).toFixed(2):'/';
|
||||
})
|
||||
}).then(res=>{
|
||||
let obj1 = {};
|
||||
|
@ -271,7 +271,7 @@
|
|||
obj1.day_s = this.day;
|
||||
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
that.tableDatas[22][3]=res1[0].clinker_val;
|
||||
that.tableDatas[22][3]=res1[0].bulk_clinker_val;
|
||||
that.tableDatas[24][3] = res1[0].bulk_cement_val;
|
||||
that.tableDatas[26][3] = res1[0].bag_cement_val;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@
|
|||
obj2.page = 0;
|
||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
that.tableDatas[23][3] = res2[0].clinker_val;
|
||||
that.tableDatas[23][3] = res2[0].bulk_clinker_val;
|
||||
that.tableDatas[25][3] = res2[0].bulk_cement_val;
|
||||
that.tableDatas[27][3] = res2[0].bag_cement_val;
|
||||
}
|
||||
|
|
|
@ -35,13 +35,14 @@
|
|||
<table border="1" cellspacing="0" :key="timeStamp" id="numTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="7">生产月报</th>
|
||||
<th colspan="9">生产月报</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th colspan="2">项目</th>
|
||||
<th colspan="2">环比增长</th>
|
||||
<th colspan="2">同比增长</th>
|
||||
<th >月数据</th>
|
||||
<th>环比增长</th>
|
||||
<th>同比增长</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
|
@ -53,10 +54,9 @@
|
|||
<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" style="width: 180px !important;">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index<39" colspan="2">{{item[3]}}</td>
|
||||
<td class="numCell" v-else>{{item[3]}}</td>
|
||||
<td class="numCell" >{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index>38">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -177,38 +177,68 @@
|
|||
});
|
||||
//台产
|
||||
that.nowData[0] = dataList.原料磨.production_hour;
|
||||
that.tableDatas[0][3] = dataList.原料磨.production_hour;
|
||||
that.nowData[1] = dataList.电石渣.production_hour;
|
||||
that.tableDatas[1][3] = dataList.电石渣.production_hour;
|
||||
that.nowData[2] = dataList.煤磨.production_hour;
|
||||
that.tableDatas[2][3] = dataList.煤磨.production_hour;
|
||||
that.nowData[3] = dataList.回转窑.production_hour;
|
||||
that.tableDatas[3][3] = dataList.回转窑.production_hour;
|
||||
that.nowData[4] = dataList.水泥磨.production_hour;
|
||||
that.tableDatas[4][3] = dataList.水泥磨.production_hour;
|
||||
//能耗(kw.h/t)
|
||||
that.nowData[5] = dataList.回转窑.celec_consume_unit;
|
||||
that.tableDatas[5][3] = dataList.回转窑.celec_consume_unit;
|
||||
that.nowData[6] = dataList.回转窑.coal_consume_unit;
|
||||
that.tableDatas[6][3] = dataList.回转窑.coal_consume_unit;
|
||||
that.nowData[7] = dataList.回转窑.cen_consume_unit;
|
||||
that.tableDatas[7][3] = dataList.回转窑.cen_consume_unit;
|
||||
that.nowData[8] = dataList.水泥磨.cen_consume_unit;
|
||||
that.tableDatas[8][3] = dataList.水泥磨.cen_consume_unit;
|
||||
that.nowData[9] = dataList.电石渣.elec_consume_unit;
|
||||
that.tableDatas[9][3] = dataList.电石渣.elec_consume_unit;
|
||||
that.nowData[10] = dataList.原料磨.elec_consume_unit;
|
||||
that.tableDatas[10][3] = dataList.原料磨.elec_consume_unit;
|
||||
that.nowData[11] = dataList.回转窑.elec_consume_unit;
|
||||
that.tableDatas[11][3] = dataList.回转窑.elec_consume_unit;
|
||||
that.nowData[12] = dataList.水泥磨.elec_consume_unit;
|
||||
that.tableDatas[12][3] = dataList.水泥磨.elec_consume_unit;
|
||||
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[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;
|
||||
//耗电量(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[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[39] = dataList.生活区.elec_consume;
|
||||
}).then(res=>{
|
||||
//获取月和年目标
|
||||
|
@ -223,9 +253,13 @@
|
|||
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):'/';
|
||||
})
|
||||
}).then(res=>{
|
||||
let obj1 = {};
|
||||
|
@ -236,8 +270,11 @@
|
|||
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;
|
||||
}
|
||||
})
|
||||
let obj2 = {};
|
||||
|
@ -247,14 +284,30 @@
|
|||
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;
|
||||
if(b!=0&&b!=='/'&&b!==''&&b!==null){
|
||||
if(a!=='/'&&a!==''&&a!==null){
|
||||
a= Number(a)
|
||||
b= Number(b)
|
||||
let num =((a-b)/b*100).toFixed(2)
|
||||
return num
|
||||
}
|
||||
}else{
|
||||
return 0
|
||||
}
|
||||
},
|
||||
getHuanbiData(){
|
||||
let that = this;
|
||||
let params = {};
|
||||
|
@ -268,53 +321,41 @@
|
|||
let label = item.mgroup_name;
|
||||
dataList[label] = item;
|
||||
});
|
||||
function canCompute(a,b){
|
||||
debugger;
|
||||
if(b!=0&&b!=='/'&&b!==''&&b!==null){
|
||||
if(a!=='/'&&a!==''&&a!==null){
|
||||
a= Number(a)
|
||||
b= Number(b)
|
||||
let num =(a-b)/b*100
|
||||
return num
|
||||
}
|
||||
}else{
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
//台产
|
||||
that.tableDatas[0][3] = canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
||||
that.tableDatas[1][3] = canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
||||
that.tableDatas[2][3] = canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
||||
that.tableDatas[3][3] = canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
||||
that.tableDatas[4][3] = canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
||||
that.tableDatas[0][4] = this.canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
||||
that.tableDatas[1][4] = this.canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
||||
that.tableDatas[2][4] = this.canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
||||
that.tableDatas[3][4] = this.canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
||||
that.tableDatas[4][4] = this.canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
||||
//能耗(kw.h/t)
|
||||
that.tableDatas[5][3] = canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
||||
that.tableDatas[6][3] = canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
||||
that.tableDatas[7][3] = canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
||||
that.tableDatas[8][3] = canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
||||
that.tableDatas[9][3] = canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
||||
that.tableDatas[10][3] = canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
||||
that.tableDatas[11][3] = canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
||||
that.tableDatas[12][3] = canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
|
||||
that.tableDatas[13][3] = canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
|
||||
that.tableDatas[5][4] = this.canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
||||
that.tableDatas[6][4] = this.canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
||||
that.tableDatas[7][4] = this.canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
||||
that.tableDatas[8][4] = this.canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
||||
that.tableDatas[9][4] = this.canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
||||
that.tableDatas[10][4] = this.canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
||||
that.tableDatas[11][4] = this.canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
||||
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][3] = canCompute(that.nowData[14],dataList.电石渣.production_hour);
|
||||
that.tableDatas[16][3] = canCompute(that.nowData[16],dataList.原料磨.production_hour);
|
||||
that.tableDatas[18][3] = canCompute(that.nowData[18],dataList.回转窑.production_hour);
|
||||
that.tableDatas[20][3] = canCompute(that.nowData[20],dataList.水泥磨.production_hour);
|
||||
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[28][3] = canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
|
||||
that.tableDatas[29][3] = canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
|
||||
that.tableDatas[30][3] = canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
|
||||
that.tableDatas[31][3] = canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
|
||||
that.tableDatas[32][3] = canCompute(that.nowData[32],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);
|
||||
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);
|
||||
//耗电量(kw.h)
|
||||
that.tableDatas[33][3] = canCompute(that.nowData[33],dataList.电石渣.elec_consume);
|
||||
that.tableDatas[34][3] = canCompute(that.nowData[34],dataList.原料磨.elec_consume);
|
||||
that.tableDatas[35][3] = canCompute(that.nowData[35],dataList.回转窑.elec_consume);
|
||||
that.tableDatas[36][3] = canCompute(that.nowData[36],dataList.煤磨.elec_consume);
|
||||
that.tableDatas[37][3] = canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
|
||||
that.tableDatas[38][3] = canCompute(that.nowData[38],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[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[39][3] = dataList.生活区.elec_consume;
|
||||
}).then(res=>{
|
||||
//获取月和年目标
|
||||
|
@ -328,10 +369,10 @@
|
|||
let label = item1.mgroup_name;
|
||||
dataList1[label] = item1;
|
||||
});
|
||||
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[14][3] /dataList1.电石渣.goal_val)*100:'/';
|
||||
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[16][3] /dataList1.原料磨.goal_val)*100:'/';
|
||||
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[18][3] /dataList1.回转窑.goal_val)*100:'/';
|
||||
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[20][3] /dataList1.水泥磨.goal_val)*100:'/';
|
||||
that.tableDatas[15][4] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[14][4] /dataList1.电石渣.goal_val)*100:'/';
|
||||
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):'/';
|
||||
})
|
||||
}).then(res=>{
|
||||
let obj1 = {};
|
||||
|
@ -341,9 +382,9 @@
|
|||
obj1.type = 'month_s';
|
||||
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
that.tableDatas[22][3]= canCompute(that.nowData[22],res1[0].clinker_val);
|
||||
that.tableDatas[24][3] = canCompute(that.nowData[24],res1[0].bulk_cement_val);
|
||||
that.tableDatas[26][3] = canCompute(that.nowData[26],res1[0].bag_cement_val);
|
||||
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);
|
||||
}
|
||||
})
|
||||
let obj2 = {};
|
||||
|
@ -352,9 +393,9 @@
|
|||
obj2.year_s = this.year;
|
||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
that.tableDatas[23][3] = canCompute(that.nowData[23],res2[0].clinker_val);
|
||||
that.tableDatas[25][3] = canCompute(that.nowData[25],res2[0].bulk_cement_val);
|
||||
that.tableDatas[27][3] = canCompute(that.nowData[27],res2[0].bag_cement_val);
|
||||
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=>{
|
||||
|
@ -369,45 +410,47 @@
|
|||
params.month_s = that.month_t;
|
||||
params.type = 'month_s';
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
let dataList = {};
|
||||
res.forEach(item => {
|
||||
let label = item.mgroup_name;
|
||||
dataList[label] = item;
|
||||
});
|
||||
if (res.length>0){
|
||||
let dataList = {};
|
||||
res.forEach(item => {
|
||||
let label = item.mgroup_name;
|
||||
dataList[label] = item;
|
||||
});
|
||||
//台产
|
||||
that.tableDatas[0][4] = canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
||||
that.tableDatas[1][4] = canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
||||
that.tableDatas[2][4] = canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
||||
that.tableDatas[3][4] = canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
||||
that.tableDatas[4][4] = canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
||||
that.tableDatas[0][5] = this.canCompute(that.nowData[0],dataList.原料磨.production_hour);
|
||||
that.tableDatas[1][5] = this.canCompute(that.nowData[1],dataList.电石渣.production_hour);
|
||||
that.tableDatas[2][5] = this.canCompute(that.nowData[2],dataList.煤磨.production_hour);
|
||||
that.tableDatas[3][5] = this.canCompute(that.nowData[3],dataList.回转窑.production_hour);
|
||||
that.tableDatas[4][5] = this.canCompute(that.nowData[4],dataList.水泥磨.production_hour);
|
||||
//能耗(kw.h/t)
|
||||
that.tableDatas[5][4] = canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
||||
that.tableDatas[6][4] = canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
||||
that.tableDatas[7][4] = canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
||||
that.tableDatas[8][4] = canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
||||
that.tableDatas[9][4] = canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
||||
that.tableDatas[10][4] = canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
||||
that.tableDatas[11][4] = canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
||||
that.tableDatas[12][4] = canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
|
||||
that.tableDatas[13][4] = canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
|
||||
that.tableDatas[5][5] = this.canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
|
||||
that.tableDatas[6][5] = this.canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
|
||||
that.tableDatas[7][5] = this.canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
|
||||
that.tableDatas[8][5] = this.canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
|
||||
that.tableDatas[9][5] = this.canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
|
||||
that.tableDatas[10][5] = this.canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
|
||||
that.tableDatas[11][5] = this.canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
|
||||
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][4] = canCompute(that.nowData[14],dataList.电石渣.production_hour);
|
||||
that.tableDatas[16][4] = canCompute(that.nowData[16],dataList.原料磨.production_hour);
|
||||
that.tableDatas[18][4] = canCompute(that.nowData[18],dataList.回转窑.production_hour);
|
||||
that.tableDatas[20][4] = canCompute(that.nowData[20],dataList.水泥磨.production_hour);
|
||||
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[28][4] = canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
|
||||
that.tableDatas[29][4] = canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
|
||||
that.tableDatas[30][4] = canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
|
||||
that.tableDatas[31][4] = canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
|
||||
that.tableDatas[32][4] = canCompute(that.nowData[32],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);
|
||||
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);
|
||||
//耗电量(kw.h)
|
||||
that.tableDatas[33][4] = canCompute(that.nowData[33],dataList.电石渣.elec_consume);
|
||||
that.tableDatas[34][4] = canCompute(that.nowData[34],dataList.原料磨.elec_consume);
|
||||
that.tableDatas[35][4] = canCompute(that.nowData[35],dataList.回转窑.elec_consume);
|
||||
that.tableDatas[36][4] = canCompute(that.nowData[36],dataList.煤磨.elec_consume);
|
||||
that.tableDatas[37][4] = canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
|
||||
that.tableDatas[38][4] = canCompute(that.nowData[38],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[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[39][4] = dataList.生活区.elec_consume;
|
||||
}).then(res=>{
|
||||
//获取月和年目标
|
||||
|
@ -421,22 +464,22 @@
|
|||
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:'/';
|
||||
that.tableDatas[17][4] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[16][4] /dataList1.原料磨.goal_val)*100:'/';
|
||||
that.tableDatas[19][4] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[18][4] /dataList1.回转窑.goal_val)*100:'/';
|
||||
that.tableDatas[21][4] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[20][4] /dataList1.水泥磨.goal_val)*100:'/';
|
||||
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:'';
|
||||
})
|
||||
}).then(res=>{
|
||||
let obj1 = {};
|
||||
obj1.page = 0;
|
||||
obj1.year_s = this.year_h;
|
||||
obj1.year_s = this.year_t;
|
||||
obj1.month_s = this.month_h;
|
||||
obj1.type = 'month_s';
|
||||
that.$API.enm.enstat2.req(obj1).then((res1) => {
|
||||
if(res1.length>0){
|
||||
that.tableDatas[22][4]= canCompute(that.nowData[22],res1[0].clinker_val);
|
||||
that.tableDatas[24][4] = canCompute(that.nowData[24],res1[0].bulk_cement_val);
|
||||
that.tableDatas[26][4] = canCompute(that.nowData[26],res1[0].bag_cement_val);
|
||||
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 = {};
|
||||
|
@ -445,9 +488,9 @@
|
|||
obj2.year_s = this.year;
|
||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||
if(res2.length>0){
|
||||
that.tableDatas[23][4] = canCompute(that.nowData[23],res2[0].clinker_val);
|
||||
that.tableDatas[25][4] = canCompute(that.nowData[25],res2[0].bulk_cement_val);
|
||||
that.tableDatas[27][4] = canCompute(that.nowData[27],res2[0].bag_cement_val);
|
||||
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);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -457,7 +500,7 @@
|
|||
this.tableDatas[i][3] = '';
|
||||
this.tableDatas[i][4] = '';
|
||||
}
|
||||
this.getData();
|
||||
this.getNowData();
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
|
|
|
@ -467,7 +467,7 @@
|
|||
<el-button
|
||||
link
|
||||
size="small"
|
||||
@click="editStlog(scope.row)"
|
||||
@click.stop="editStlog(scope.row)"
|
||||
type="primary"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
@ -494,6 +494,7 @@
|
|||
:height="heightTable"
|
||||
hidePagination
|
||||
highlightCurrentRow
|
||||
hideDo
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="班组名称">
|
||||
|
@ -589,7 +590,7 @@
|
|||
ref="stlogDialog"
|
||||
:current_sflog="current_sflog"
|
||||
:mgroupId="mgroupId"
|
||||
@success="sflogExpSuccess"
|
||||
@success="stLogSuccess"
|
||||
@closed="stlogVisiable = false"
|
||||
></stlog-dialog>
|
||||
</el-tab-pane>
|
||||
|
@ -686,7 +687,6 @@ export default {
|
|||
this.form = JSON.parse(form);
|
||||
this.getMpoint();
|
||||
this.getTeam();
|
||||
this.getStlog();
|
||||
let height = document.getElementById("elMain").clientHeight;
|
||||
let heightdetail = document.getElementById("logDetail").clientHeight;
|
||||
let heightTabs = height - heightdetail - 40;
|
||||
|
@ -842,14 +842,14 @@ export default {
|
|||
});
|
||||
},
|
||||
//***** fourth 异常 ****** */
|
||||
//获取异常列表
|
||||
getStlog() {
|
||||
let obj = {};
|
||||
obj.page = 0;
|
||||
obj.mgroup = this.mgroupId;
|
||||
this.$API.wpm.stlog.list.req(obj).then((res) => {
|
||||
this.stlogList = res;
|
||||
});
|
||||
stLogSuccess(stlogid){
|
||||
this.$refs.stlogTable.refresh();
|
||||
if(stlogid != undefined || stlogid != null){
|
||||
this.getSflogexp(stlogid);
|
||||
}else{
|
||||
this.sflogexpList = [];
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//异常添加
|
||||
|
@ -897,11 +897,8 @@ export default {
|
|||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getStlog();
|
||||
this.stLogSuccess();
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.success(err);
|
||||
});
|
||||
});
|
||||
},
|
||||
//点击stlog,展示sflogexp
|
||||
|
|
|
@ -423,7 +423,6 @@ export default {
|
|||
obj.ordering = "report_sortstr";
|
||||
obj.material__code__in = "elec,elec_0";
|
||||
this.$API.enm.mpoint.list.req(obj).then((res) => {
|
||||
console.log("mpoints", res);
|
||||
let arr = [];
|
||||
res.forEach((item) => {
|
||||
arr.push(item.name);
|
||||
|
@ -581,6 +580,9 @@ export default {
|
|||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
let ind = item.hour; //xAxis
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
|
@ -622,6 +624,9 @@ export default {
|
|||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
let ind = item.day_s - 1;
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
|
@ -664,6 +669,9 @@ export default {
|
|||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint
|
||||
if(index==-1){
|
||||
return;
|
||||
}
|
||||
seriesData[index][ind] = item.elec_consume_unit;
|
||||
});
|
||||
let options = { ...that.option3 };
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="异常原因" prop="reason">
|
||||
<el-input
|
||||
:disabled="form.is_shutdown"
|
||||
v-model="form.reason"
|
||||
placeholder="异常原因"
|
||||
/>
|
||||
|
@ -178,7 +177,7 @@ export default {
|
|||
},
|
||||
],
|
||||
start_time: [{ required: true, message: "请选择发生时间" }],
|
||||
end_time: [{ required: true, message: "请选择结束时间" }],
|
||||
// end_time: [{ required: true, message: "请选择结束时间" }],
|
||||
current_note: [
|
||||
{ required: true, message: "请填写值班异常处理备注" },
|
||||
],
|
||||
|
@ -189,7 +188,9 @@ export default {
|
|||
setFiltersVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
console.log(this.current_sflog)
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
|
@ -203,14 +204,15 @@ export default {
|
|||
that.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
that.form.current_sflog = that.current_sflog;
|
||||
if (that.mode == "add") {
|
||||
that.form.mgroup = that.mgroupId;
|
||||
that.form.current_sflog = that.current_sflog;
|
||||
|
||||
that.$API.wpm.stlog.create
|
||||
.req(that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success", that.form, that.mode);
|
||||
that.$emit("success", res.id);
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
|
@ -222,7 +224,7 @@ export default {
|
|||
.req(that.form.id, that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success", that.form, that.mode);
|
||||
that.$emit("success", res.id);
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
|
|
|
@ -229,7 +229,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 = "/";
|
||||
}
|
||||
|
@ -264,11 +264,11 @@ export default {
|
|||
//环比增长率(%)
|
||||
let lastRate = 0;
|
||||
if (
|
||||
lastDiff == "/" &&
|
||||
lastDiff !== "/" &&
|
||||
lastNum !== "/" &&
|
||||
lastNum !== 0
|
||||
) {
|
||||
lastRate = (lastDiff / lastNum) * 100;
|
||||
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate = "/";
|
||||
}
|
||||
|
|
|
@ -39,7 +39,10 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in tableDatas" :key="item">
|
||||
<td class="numCell">{{ item[0] }}</td>
|
||||
<td class="numCell"
|
||||
>
|
||||
{{ item[0] }}
|
||||
</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
<td
|
||||
class="numCell hoursItem"
|
||||
|
@ -238,7 +241,7 @@
|
|||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666"];
|
||||
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC"];
|
||||
let tooltip = {
|
||||
show: true,
|
||||
trigger: "axis",
|
||||
|
@ -263,7 +266,7 @@ let toolbox = {
|
|||
};
|
||||
let legend = {
|
||||
top: "2%",
|
||||
data: ["总产量", "分布电耗", "成本"],
|
||||
data: ["总产量", "分布电耗", "成本", "消耗", "进厂"],
|
||||
};
|
||||
let yAxis = [
|
||||
{
|
||||
|
@ -312,6 +315,38 @@ let yAxis = [
|
|||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "消耗(t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
offset: 130,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[3],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "value",
|
||||
name: "进厂(t)",
|
||||
position: "right",
|
||||
alignTicks: true,
|
||||
offset: 180,
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: colors[4],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
},
|
||||
},
|
||||
];
|
||||
export default {
|
||||
components: {
|
||||
|
@ -340,6 +375,8 @@ export default {
|
|||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["湿电石渣", "消耗", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["湿电石渣", "进厂", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
],
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
|
@ -384,6 +421,18 @@ export default {
|
|||
yAxisIndex: 2,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "消耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "进厂",
|
||||
type: "bar",
|
||||
yAxisIndex: 4,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
option2: {
|
||||
|
@ -420,6 +469,18 @@ export default {
|
|||
yAxisIndex: 2,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "消耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 3,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "进厂",
|
||||
type: "bar",
|
||||
yAxisIndex: 4,
|
||||
data: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
@ -473,7 +534,16 @@ export default {
|
|||
that.tableDatas[0][2] = data3.total_production;
|
||||
that.tableDatas[1][2] = data3.elec_consume_unit;
|
||||
that.tableDatas[2][2] = data3.production_cost_unit;
|
||||
if (data3.imaterial_data.length > 0) {
|
||||
data3.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[3][2] = item.amount_consume;
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
that.tableDatas[4][2] = item.amount_consume;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
//月目标
|
||||
let params5 = {};
|
||||
|
@ -531,6 +601,15 @@ export default {
|
|||
that.tableDatas[2][4],
|
||||
that.tableDatas[2][7]
|
||||
);
|
||||
if (data1.imaterial_data.length > 0) {
|
||||
data1.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[3][4] = item.amount_consume;
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
that.tableDatas[4][4] = item.amount_consume;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
}
|
||||
});
|
||||
|
@ -560,6 +639,15 @@ export default {
|
|||
that.tableDatas[2][3],
|
||||
that.tableDatas[2][5]
|
||||
);
|
||||
if (data2.imaterial_data.length > 0) {
|
||||
data2.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[3][3] = item.amount_consume;
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
that.tableDatas[4][3] = item.amount_consume;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -573,7 +661,6 @@ export default {
|
|||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
|
@ -603,18 +690,31 @@ export default {
|
|||
this.$API.enm.enstat.req(query1).then((response) => {
|
||||
let seriesData0 = [],
|
||||
seriesData1 = [],
|
||||
seriesData2 = [];
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.day_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_cost_unit;
|
||||
seriesData2[ind] = item.elec_consume_unit;
|
||||
if (item.imaterial_data.length > 0) {
|
||||
item.imaterial_data.forEach((items_n) => {
|
||||
if (items_n.material_name == "湿电石渣消耗") {
|
||||
seriesData3[ind] = items_n.amount_consume;
|
||||
}else if(items_n.material_name == "湿电石渣进厂"){
|
||||
seriesData4[ind] = items_n.amount_consume;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
let options = { ...that.option1 };
|
||||
options.series[0].data = seriesData0;
|
||||
options.series[1].data = seriesData1;
|
||||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i + "日";
|
||||
|
@ -635,18 +735,31 @@ export default {
|
|||
this.$API.enm.enstat.req(query2).then((response) => {
|
||||
let seriesData0 = [],
|
||||
seriesData1 = [],
|
||||
seriesData2 = [];
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.month_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_cost_unit;
|
||||
seriesData2[ind] = item.elec_consume_unit;
|
||||
if (item.imaterial_data.length > 0) {
|
||||
item.imaterial_data.forEach((items_n) => {
|
||||
if (items_n.material_name == "湿电石渣消耗") {
|
||||
seriesData3[ind] = items_n.amount_consume;
|
||||
}else if(items_n.material_name == "湿电石渣进厂"){
|
||||
seriesData4[ind] = items_n.amount_consume;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
let options = { ...that.option2 };
|
||||
options.series[0].data = seriesData0;
|
||||
options.series[1].data = seriesData1;
|
||||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
let monthXAxis = [];
|
||||
for (let i = 1; i <= that.month; i++) {
|
||||
let item = i + "月";
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<!-- <div class="login-oauth" v-else>
|
||||
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
||||
</div> -->
|
||||
<div class="copyright">Copyright © 2024 {{ baseConfig.base_right }}</div>
|
||||
<!-- <div class="copyright">Copyright © 2024 {{ baseConfig.base_right }}</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -226,6 +226,9 @@ export default {
|
|||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("请求失败", error);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue