fixd:8.17

This commit is contained in:
shijing 2023-08-17 09:36:51 +08:00
parent 10656c643a
commit 3cdee248c9
18 changed files with 1220 additions and 785 deletions

View File

@ -3,18 +3,12 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.time"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="基础月份"
/>
<el-date-picker
v-model="query.time2"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="对比月份"
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
@ -91,89 +85,97 @@
var myDate = new Date();
let year = myDate.getFullYear();
that.query.year_s = year;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = year-1;
query0.mgroup='3347217512021835776';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
debugger;
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.煤粉_细度_rate_pass!=null?item.煤粉_细度_rate_pass:'/';
arr[7]=item.煤粉_水分_rate_pass!=null?item.煤粉_水分_rate_pass:'/';
//
arr[8]=item.煤磨排风机_consume_unit!=null?item.煤磨排风机_consume_unit:'/';
arr[9]=item.elec_consume_unit//KW·h/t
arr[10]=item.celec_consume_unit;//KW·h/t//
arr[11]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[12]=huanbi;//KW·h/t
arr[13]=item.celec_consume_unit;//KW·h/t
arr[14]=item.celec_consume_unit;//%
arr[15]=item.celec_consume_unit;//%
arr[16]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
this.getData();
},
methods: {
getData(){
let that = this;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = that.query.year_s-1;
query0.mgroup=that.query.mgroup;
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
debugger;
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.煤粉_细度_rate_pass!=null?item.煤粉_细度_rate_pass:'/';
arr[7]=item.煤粉_水分_rate_pass!=null?item.煤粉_水分_rate_pass:'/';
//
arr[8]=item.煤磨排风机_consume_unit!=null?item.煤磨排风机_consume_unit:'/';
arr[9]=item.elec_consume_unit//KW·h/t
arr[10]=item.celec_consume_unit;//KW·h/t//
arr[11]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[12]=huanbi;//KW·h/t
arr[13]=item.celec_consume_unit;//KW·h/t
arr[14]=item.celec_consume_unit;//%
arr[15]=item.celec_consume_unit;//%
arr[16]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
},
handleQuery(){
this.tableDatas = [];
this.getData();
},
itemClick(type,item){
this.type=type;
this.asynDialog = true;

View File

@ -3,18 +3,17 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="monthrange"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="YYYY-MM"
format="YYYY-MM"
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button
type="primary"
@ -78,6 +77,7 @@
chartShow: false,
myOption: null,
query:{
year_s:'',
mgroup:'3347217512021835776',
},
monthGoal:[],

View File

@ -160,6 +160,7 @@
v-if="dialog.save"
ref="saveDialog"
:deptId ="deptId"
:mgroupId="query.mgroup"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>

View File

@ -3,18 +3,12 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.time"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="基础月份"
/>
<el-date-picker
v-model="query.time2"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="对比月份"
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
@ -112,115 +106,123 @@
var myDate = new Date();
let year = myDate.getFullYear();
that.query.year_s = year;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = year-1;
query0.mgroup='3347217246321065984';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
debugger;
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.入窑生料_CaO_rate_pass!=null?item.入窑生料_CaO_rate_pass:'/';
arr[7]=item.入窑生料_Fe2O3_rate_pass!=null?item.入窑生料_Fe2O3_rate_pass:'/';
arr[8]=item.入窑生料_细度_rate_pass!=null?item.入窑生料_细度_rate_pass:'/';
arr[9]=item.入窑生料_水分_rate_pass!=null?item.入窑生料_水分_rate_pass:'/';
arr[10]=item.熟料_立升重_rate_pass!=null?item.熟料_立升重_rate_pass:'/';
arr[11]=item.熟料_fCaO_rate_pass!=null?item.熟料_fCaO_rate_pass:'/';
//
arr[12]=item.高温风机_consume_unit!=null?item.高温风机_consume_unit:'/';
arr[13]=item.篦冷机一室风机_consume_unit!=null?item.篦冷机一室风机_consume_unit:'/';
arr[14]=item.篦冷机三室风机_consume_unit!=null?item.篦冷机三室风机_consume_unit:'/';
arr[15]=item.篦冷机二室风机_consume_unit!=null?item.篦冷机二室风机_consume_unit:'/';
arr[16]=item.窑头排风机_consume_unit!=null?item.窑头排风机_consume_unit:'/';
//
arr[17]=item.elec_consume_unit//KW·h/t
arr[18]=item.celec_consume_unit;//KW·h/t//
arr[19]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[20]=huanbi;//KW·h/t
arr[21]=item.celec_consume_unit;//KW·h/t
arr[22]=item.celec_consume_unit;//%
arr[23]=item.celec_consume_unit;//%
//
arr[24]=item.elec_consume_unit//KW·h/t
arr[25]=item.celec_consume_unit;//KW·h/t//
arr[26]=item.celec_consume_unit;//KW·h/t
let ind_pre1 = 0,huanbi1 = 0;
if(item.month_s==1){
ind_pre1 = 12;
huanbi1 = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre1=ind-1;
huanbi1 = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[27]=huanbi;//KW·h/t
arr[28]=item.celec_consume_unit;//KW·h/t
arr[29]=item.celec_consume_unit;//%
arr[30]=item.celec_consume_unit;//%
arr[31]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
this.getData();
},
methods: {
getData(){
let that = this;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = that.query.year_s-1;
query0.mgroup='3347217246321065984';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
debugger;
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.入窑生料_CaO_rate_pass!=null?item.入窑生料_CaO_rate_pass:'/';
arr[7]=item.入窑生料_Fe2O3_rate_pass!=null?item.入窑生料_Fe2O3_rate_pass:'/';
arr[8]=item.入窑生料_细度_rate_pass!=null?item.入窑生料_细度_rate_pass:'/';
arr[9]=item.入窑生料_水分_rate_pass!=null?item.入窑生料_水分_rate_pass:'/';
arr[10]=item.熟料_立升重_rate_pass!=null?item.熟料_立升重_rate_pass:'/';
arr[11]=item.熟料_fCaO_rate_pass!=null?item.熟料_fCaO_rate_pass:'/';
//
arr[12]=item.高温风机_consume_unit!=null?item.高温风机_consume_unit:'/';
arr[13]=item.篦冷机一室风机_consume_unit!=null?item.篦冷机一室风机_consume_unit:'/';
arr[14]=item.篦冷机三室风机_consume_unit!=null?item.篦冷机三室风机_consume_unit:'/';
arr[15]=item.篦冷机二室风机_consume_unit!=null?item.篦冷机二室风机_consume_unit:'/';
arr[16]=item.窑头排风机_consume_unit!=null?item.窑头排风机_consume_unit:'/';
//
arr[17]=item.elec_consume_unit//KW·h/t
arr[18]=item.celec_consume_unit;//KW·h/t//
arr[19]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[20]=huanbi;//KW·h/t
arr[21]=item.celec_consume_unit;//KW·h/t
arr[22]=item.celec_consume_unit;//%
arr[23]=item.celec_consume_unit;//%
//
arr[24]=item.elec_consume_unit//KW·h/t
arr[25]=item.celec_consume_unit;//KW·h/t//
arr[26]=item.celec_consume_unit;//KW·h/t
let ind_pre1 = 0,huanbi1 = 0;
if(item.month_s==1){
ind_pre1 = 12;
huanbi1 = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre1=ind-1;
huanbi1 = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[27]=huanbi;//KW·h/t
arr[28]=item.celec_consume_unit;//KW·h/t
arr[29]=item.celec_consume_unit;//%
arr[30]=item.celec_consume_unit;//%
arr[31]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
},
handleQuery(){
this.tableDatas = [];
this.getData();
},
itemClick(type,item){
this.type=type;
this.asynDialog = true;

View File

@ -2,20 +2,19 @@
<div class="app-container">
<el-header>
<div class="left-panel">
<!-- <el-date-picker
v-model="monthrange"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="YYYY-MM"
format="YYYY-MM"
<el-date-picker
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button> -->
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-select
v-model="query.type"
placeholder="查询类型"
@ -188,6 +187,7 @@
myOption: null,
query: {
type:1,
year_s:'',
mgroup:'3347217246321065984',
},
monthGoal:[],

View File

@ -3,18 +3,12 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.time"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="基础月份"
/>
<el-date-picker
v-model="query.time2"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="对比月份"
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
@ -97,92 +91,100 @@
var myDate = new Date();
let year = myDate.getFullYear();
that.query.year_s = year;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = year-1;
query0.mgroup='3346520558031773696';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.出磨水泥_比表面积_rate_pass!=null?item.出磨水泥_比表面积_rate_pass:'/';
arr[7]=item.出磨水泥_SO3_rate_pass!=null?item.出磨水泥_SO3_rate_pass:'/';
arr[8]=item.出磨水泥_掺量_rate_pass!=null?item.出磨水泥_掺量_rate_pass:'/';
//
arr[9]=item.循环风机1906_consume_unit!=null?item.循环风机1906_consume_unit:'/';
arr[10]=item.系统风机_consume_unit!=null?item.系统风机_consume_unit:'/';
arr[11]=item.水平涡流选粉机1915_consume_unit!=null?item.水平涡流选粉机1915_consume_unit:'/';
arr[12]=item.新增磨尾风机_consume_unit!=null?item.新增磨尾风机_consume_unit:'/';
arr[13]=item.elec_consume_unit//KW·h/t
arr[14]=item.celec_consume_unit;//KW·h/t//
arr[15]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[16]=huanbi;//KW·h/t
arr[17]=item.celec_consume_unit;//KW·h/t
arr[18]=item.celec_consume_unit;//%
arr[19]=item.celec_consume_unit;//%
arr[20]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
that.tableDatas = wrapArr;
}else{
}
})
})
that.getData();
},
methods: {
getData(){
let that = this;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = that.query.year_s-1;
query0.mgroup='3346520558031773696';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.出磨水泥_比表面积_rate_pass!=null?item.出磨水泥_比表面积_rate_pass:'/';
arr[7]=item.出磨水泥_SO3_rate_pass!=null?item.出磨水泥_SO3_rate_pass:'/';
arr[8]=item.出磨水泥_掺量_rate_pass!=null?item.出磨水泥_掺量_rate_pass:'/';
//
arr[9]=item.循环风机1906_consume_unit!=null?item.循环风机1906_consume_unit:'/';
arr[10]=item.系统风机_consume_unit!=null?item.系统风机_consume_unit:'/';
arr[11]=item.水平涡流选粉机1915_consume_unit!=null?item.水平涡流选粉机1915_consume_unit:'/';
arr[12]=item.新增磨尾风机_consume_unit!=null?item.新增磨尾风机_consume_unit:'/';
arr[13]=item.elec_consume_unit//KW·h/t
arr[14]=item.celec_consume_unit;//KW·h/t//
arr[15]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[16]=huanbi;//KW·h/t
arr[17]=item.celec_consume_unit;//KW·h/t
arr[18]=item.celec_consume_unit;//%
arr[19]=item.celec_consume_unit;//%
arr[20]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
that.tableDatas = wrapArr;
}else{
}
})
})
},
handleQuery(){
this.tableDatas = [];
this.getData();
},
itemClick(type,item){
this.type=type;
this.asynDialog = true;

View File

@ -2,7 +2,15 @@
<div class="app-container">
<el-header>
<div class="left-panel">
<el-select
<el-date-picker
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-select
v-model="query.type"
placeholder="查询类型"
clearable
@ -15,20 +23,11 @@
:value="item.id"
></el-option>
</el-select>
<!-- <el-date-picker
v-model="monthrange"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="YYYY-MM"
format="YYYY-MM"
/> -->
<!-- <el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button> -->
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button
type="primary"
@click="exportExcel()"
@ -126,6 +125,7 @@
myOption: null,
query: {
type:1,
year_s:'',
mgroup:'3347217651339837440',
},
monthGoal:[],

View File

@ -3,18 +3,12 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.time"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="基础月份"
/>
<el-date-picker
v-model="query.time2"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="对比月份"
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
@ -84,80 +78,88 @@
var myDate = new Date();
let year = myDate.getFullYear();
that.query.year_s = year;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = year-1;
query0.mgroup='3346520558031773696';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr[3]=item.elec_consume_unit//KW·h/t
arr[4]=item.celec_consume_unit;//KW·h/t//
arr[5]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[6]=huanbi;//KW·h/t
arr[7]=item.celec_consume_unit;//KW·h/t
arr[8]=item.celec_consume_unit;//%
arr[9]=item.celec_consume_unit;//%
arr[10]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
that.getData();
},
methods: {
getData(){
let that = this;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = that.query.year_s-1;
query0.mgroup='3346520558031773696';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr[3]=item.elec_consume_unit//KW·h/t
arr[4]=item.celec_consume_unit;//KW·h/t//
arr[5]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[6]=huanbi;//KW·h/t
arr[7]=item.celec_consume_unit;//KW·h/t
arr[8]=item.celec_consume_unit;//%
arr[9]=item.celec_consume_unit;//%
arr[10]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
},
handleQuery(){
this.tableDatas = [];
this.getData();
},
itemClick(type,item){
this.type=type;
this.asynDialog = true;

View File

@ -3,13 +3,12 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="monthrange"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="YYYY-MM"
format="YYYY-MM"
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"

View File

@ -230,6 +230,15 @@ import otherDialog from "./other_form.vue";
},
//
sflog_edit(row) {
// let jsonStr = JSON.stringify(row);
// this.$TOOL.data.remove("sflogItem")
// this.$TOOL.data.set('sflogItem',jsonStr)
// this.$router.push({
// name: "logDetail",
// query: {
// mgroupId: row.mgroup
// },
// });
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);

View File

@ -33,7 +33,7 @@
v-model="form.start_time"
type="datetime"
format="YYYY-MM-DD HH:mm"
placeholder="基础月份"
placeholder="开始时间"
style="width: 100%;"
/>
</el-form-item>
@ -45,7 +45,7 @@
v-model="form.end_time"
type="datetime"
format="YYYY-MM-DD HH:mm"
placeholder="对比月份"
placeholder="结束时间"
style="width: 100%;"
/>
</el-form-item>
@ -73,7 +73,7 @@
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="form.shift_name=='夜班'">
<el-col :md="12" :sm="24" v-if="form.shift_name=='夜班'&&mgroupId=='3347217246321065984'">
<el-form-item label="煤粉热值">
<el-input-number v-model="form.pcoal_heat" controls-position="right" placeholder="煤粉热值" />
</el-form-item>
@ -107,6 +107,11 @@
type: [String],
default: "",
},
mgroupId: {
// v-model
type: [String],
default: "",
},
},
data() {
return {
@ -137,6 +142,10 @@
};
},
mounted() {
this.mgroup = this.mgroupId;
debugger;
console.log(this.deptId)
console.log(this.mgroupId)
//
this.getTeam();
this.getShfit();

View File

@ -0,0 +1,249 @@
<template>
<el-container>
<el-main class="nopadding">
<el-card style="margin: 6px;position:relative">
<el-descriptions title="日志信息" :column="3">
<el-descriptions-item label="所属工段:">
<span>{{sflogItem.mgroup_name}}</span>
</el-descriptions-item>
<el-descriptions-item label="工作班次:" :span="3">
{{ sflogItem.shift_name }}
</el-descriptions-item>
<el-descriptions-item label="开始时间:">
<span>{{sflogItem.start_time}}</span>
</el-descriptions-item>
<el-descriptions-item label="结束时间:" :span="3">
{{ sflogItem.end_time }}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card style="margin: 6px;position:relative">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="班组" name="first">
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rule1"
style="width: 600px;"
>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="当班班组" prop="team">
<el-select
v-model="form.team"
placeholder="当班班组"
clearable
style="width: 100%;"
@change="teamChange"
>
<el-option
v-for="item in teamOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="班组班长" prop="leader_name">
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="sflogItem.shift_name=='夜班'">
<el-form-item label="煤粉热值">
<el-input-number v-model="form.pcoal_heat" controls-position="right" placeholder="煤粉热值" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="width: 600px;text-align: center;">
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-tab-pane>
<el-tab-pane label="检验" name="second">Config</el-tab-pane>
<el-tab-pane label="能源" name="third">Role</el-tab-pane>
<el-tab-pane label="异常" name="fourth">Task</el-tab-pane>
</el-tabs>
</el-card>
</el-main>
</el-container>
</template>
<script>
import saveDialog from "./handover_form.vue";
import quastatDialog from "./quastat_form.vue";
import otherDialog from "./other_form.vue";
export default {
name: "listSon",
components: {
saveDialog,
otherDialog,
quastatDialog
},
props: {
mgroupId: {
type: [String],
default: "",
},
item: {
type: [String],
default: "",
},
},
data() {
return {
activeName:'',
sflogItem:{},
form:{
}
};
},
mounted(){
let sflogItem = this.$TOOL.data.get("sflogItem")
this.sflogItem = JSON.parse(sflogItem);
debugger;
console.log(sflogItem)
this.getLogDetail();
},
methods: {
handleClick(){
},
getLogDetail(){
},
sflog_export(){
this.limitedExport = true;
},
rowClick(row) {
this.sflogId = row.id;
this.sflogItem = row;
// this.$refs.table2.queryData({post: row.id});
},
//
sflog_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
getTeam(){
let form ={};
form.page = 0;
form.belong_dept = this.deptId;
this.$API.mtm.team.list.req(form).then(res=>{
this.teamOptions = res;
})
},
//
sflog_check(row){
this.dialog.check = true;
this.$nextTick(() => {
this.$refs.checkDialog.open("edit").setData(row);
});
},
//
sflog_other(row){
this.dialog.other = true;
this.$nextTick(() => {
this.$refs.otherDialog.open("edit").setData(row);
});
},
// //
// table_show(row) {
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.checkDialog.open("edit").setData(row);
// });
// },
//
async table_del(row) {
this.$API.wpm.sflog.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
},
//
handleSaveSuccess(data, mode) {
this.$refs.table.refresh()
this.dialog.save = false;
},
handleOtherSuccess(){
this.dialog.other = false;
},
handleCheckSuccess(){
this.dialog.check = false;
},
closed() {
this.dialog.save = false;
this.$refs.table2.refresh();
},
handleDel(row) {
this.$confirm(`确定删除选中的记录吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wpm.shift.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
// const loading = this.$loading();
// this.$refs.table2.refresh();
// loading.close();
// this.$message.success("");
}
});
})
.catch(() => {});
},
handlePrint() {
this.$PRINT('#myReport');
},
exportExcel() {
this.exportLoading = true;
this.$XLSX('#myTable', this.tableName)
this.exportLoading = false;
},
},
};
</script>
<style scoped>
.printContainer{
width: 1075px;
}
#numTable{
margin-left: 37px;
}
#numTable td{
height: 32px;
padding-left: 5px;
}
.numCell{
width: 80px;
}
.numCell.numCell_last{
width: 100px;
}
.searchHead{
display:flex
}
.middleText{
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn{
margin-left: 5px;
}
</style>

View File

@ -50,6 +50,7 @@
</tr>
</tbody>
</table>
<div id="main" style="width:1200px;height:600px;"></div>
<scEcharts height="400px" width="1074px" :option="optionHour"></scEcharts>
<scEcharts height="400px" width="1074px" :option="optionDay"></scEcharts>
<scEcharts height="400px" width="1074px" :option="optionMonth"></scEcharts>
@ -243,6 +244,7 @@
},
];
import * as echarts from 'echarts';
import scEcharts from "@/components/scEcharts";
import { defineAsyncComponent } from 'vue'
export default {
@ -427,6 +429,202 @@
data: []
}
]
},
list: [
{
x: 1,
y: 1,
z: 99,
k: 11
},
{
x: 2,
y: 2,
z: 70,
k: 11
},
{
x: 3,
y: 3,
z: 1,
k: 11
},
{
x: 4,
y: 4,
z: 30,
k: 11
},
{
x: 5,
y: 1,
z: 20,
k: 11
},
{
x: 6,
y: 0,
z: 18,
k: 11
},
{
x: 7,
y: 10,
z: 12,
k: 11
}
],
dataX: [],
dataY: [],
dataY2: [],
option : {
color: [ '#647bfe', '#8698fe', '#a9b6fe','#cbd3fe','#91CC75', '#EE6666'],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
grid: {
right: '20%',
left:'20%'
},
toolbox: {
feature: {
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true }
}
},
legend: {
data: ['总产量', '台时产量', '运转率', '分布电耗', '单位产品标煤耗', '成本']
},
xAxis: [
{
type: 'category',
axisTick: {
alignWithLabel: true
},
// prettier-ignore
data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
}
],
yAxis: [
{
type: 'value',
name: '产量 (t)',
position: 'right',
alignTicks: true,
axisLine: {
show: true,
lineStyle: {
color: colors[0]
}
},
axisLabel: {
formatter: '{value}'
}
},
{
type: 'value',
name: '运转率 (%)',
position: 'right',
alignTicks: true,
offset: 80,
axisLine: {
show: true,
lineStyle: {
color: colors[1]
}
},
axisLabel: {
formatter: '{value}'
}
},
{
type: 'value',
name: '成本(元)',
position: 'right',
alignTicks: true,
offset: 160,
axisLine: {
show: true,
lineStyle: {
color: colors[2]
}
},
axisLabel: {
formatter: '{value}'
}
},
{
type: 'value',
name: '分布电耗(KW.h)',
position: 'left',
alignTicks: true,
axisLine: {
show: true,
lineStyle: {
color: colors[3]
}
},
axisLabel: {
formatter: '{value} '
}
},
{
type: 'value',
name: '标煤耗 (t)',
position: 'left',
alignTicks: true,
offset: 80,
min:0,max:180,
axisLine: {
show: true,
lineStyle: {
color: colors[4]
}
},
axisLabel: {
formatter: '{value}'
}
}
],
series: [
{
name: '总产量',
type: 'bar',
yAxisIndex:0,
data: [100, 120, 110, 130, 140, 120, 110, 120, 100,150, 120, 160]
},
{
name: '台时产量',
type: 'bar',
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
]
},
{
name: '运转率',
type: 'bar',
yAxisIndex: 1,
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
]
},
{
name: '分布电耗',
type: 'line',
yAxisIndex: 2,
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
},
{
name: '单位产品标煤耗',
type: 'bar',
yAxisIndex: 2,
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
}
]
}
};
},
@ -441,6 +639,34 @@
}
}
let that = this;
this.$nextTick(() => {
this.dataX = this.list.map(item => item.x);
// 1Y
this.dataY.push({
name: "AA",
type: "line", // 线
yAxisIndex: 0, // Y
symbolSize: '10',
// lineStyle: { color: '#4485f4' },
data: this.list.map(item => item.y)
});
// 2Y
this.dataY.push({
name: "BB",
type: "line",
yAxisIndex: 1, // Y
data: this.list.map(item => item.z)
});
// 3Y
this.dataY.push({
name: "CC",
type: "line",
yAxisIndex: 2, // Y
data: this.list.map(item => item.k)
});
this.init(this.dataX, this.dataY);
});
this.$nextTick(() => {
var myDate = new Date();
let year =that.year = myDate.getFullYear();
@ -597,6 +823,11 @@
})
},
methods: {
init(dataX, dataY) {
this.myChart = echarts.init(document.getElementById("main"));
// 使
this.myChart.setOption(this.option);
},
//
getHourData(){
let that = this;
@ -607,15 +838,14 @@
query.day_s = that.days;
query.type = 'hour_s';
query.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query).then((response) => {
// debugger;
this.$API.enm.enstat.req(query).then((response) => {
let seriesData0 = [],seriesData1 = [], seriesData2 = [],seriesData3 = [],seriesData4 = [];
console.log(response)
let data = response;
data.forEach(item => {
let ind = item.hour;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_hour;
seriesData1[ind] = item.production_hour.toFixed(2);
seriesData2[ind] = item.run_rate;
seriesData3[ind] = item.production_cost_unit;
seriesData4[ind] = item.elec_consume_unit;
@ -653,7 +883,7 @@
// debugger;
let ind = item.day_s;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_hour;
seriesData1[ind] = item.production_hour.toFixed(2);
seriesData2[ind] = item.run_rate;
seriesData3[ind] = item.production_cost_unit;
seriesData4[ind] = item.elec_consume_unit;
@ -689,7 +919,7 @@
data.forEach(item => {
let ind = item.month_s;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_hour;
seriesData1[ind] = item.production_hour.toFixed(2);
seriesData2[ind] = item.run_rate;
seriesData3[ind] = item.production_cost_unit;
seriesData4[ind] = item.elec_consume_unit;

View File

@ -2,6 +2,19 @@
<div class="app-container">
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
<el-button
type="primary"
@click="exportExcel()"
@ -84,98 +97,106 @@
var myDate = new Date();
let year = myDate.getFullYear();
that.query.year_s = year;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = year-1;
query0.mgroup='3346520558031773696';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
debugger;
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.辅料_细度_rate_pass!=null?item.辅料_细度_rate_pass:'/';
arr[7]=item.辅料_Fe2O3_rate_pass!=null?item.辅料_Fe2O3_rate_pass:'/';
arr[8]=item.辅料_水分_rate_pass!=null?item.辅料_水分_rate_pass:'/';
arr[9]=item.干混生料_细度_rate_pass!=null?item.干混生料_细度_rate_pass:'/';
arr[10]=item.干混生料_Fe2O3_rate_pass!=null?item.干混生料_Fe2O3_rate_pass:'/';
arr[11]=item.干混生料_水分_rate_pass!=null?item.干混生料_水分_rate_pass:'/';
arr[12]=item.干混生料_CaO_rate_pass!=null?item.干混生料_CaO_rate_pass:'/';
//
arr[13]=item.循环风机_consume_unit!=null?item.循环风机_consume_unit:'/';
arr[13]=item.尾排风机_consume_unit!=null?item.尾排风机_consume_unit:'/';
arr[13]=item.废气风机_consume_unit!=null?item.废气风机_consume_unit:'/';
//
arr[16]=item.elec_consume_unit//KW·h/t
arr[17]=item.celec_consume_unit;//KW·h/t//
arr[18]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[19]=huanbi;//KW·h/t
arr[20]=item.celec_consume_unit;//KW·h/t
arr[21]=item.celec_consume_unit;//%
arr[22]=item.celec_consume_unit;//%
arr[23]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
this.getData();
},
methods: {
getData(){
let that = this;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = that.query.year_s-1;
query0.mgroup='3346520558031773696';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
debugger;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
debugger;
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr.push(item.run_rate);
arr.push(item.production_cost_unit);
//
arr[6]=item.辅料_细度_rate_pass!=null?item.辅料_细度_rate_pass:'/';
arr[7]=item.辅料_Fe2O3_rate_pass!=null?item.辅料_Fe2O3_rate_pass:'/';
arr[8]=item.辅料_水分_rate_pass!=null?item.辅料_水分_rate_pass:'/';
arr[9]=item.干混生料_细度_rate_pass!=null?item.干混生料_细度_rate_pass:'/';
arr[10]=item.干混生料_Fe2O3_rate_pass!=null?item.干混生料_Fe2O3_rate_pass:'/';
arr[11]=item.干混生料_水分_rate_pass!=null?item.干混生料_水分_rate_pass:'/';
arr[12]=item.干混生料_CaO_rate_pass!=null?item.干混生料_CaO_rate_pass:'/';
//
arr[13]=item.循环风机_consume_unit!=null?item.循环风机_consume_unit:'/';
arr[13]=item.尾排风机_consume_unit!=null?item.尾排风机_consume_unit:'/';
arr[13]=item.废气风机_consume_unit!=null?item.废气风机_consume_unit:'/';
//
arr[16]=item.elec_consume_unit//KW·h/t
arr[17]=item.celec_consume_unit;//KW·h/t//
arr[18]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[19]=huanbi;//KW·h/t
arr[20]=item.celec_consume_unit;//KW·h/t
arr[21]=item.celec_consume_unit;//%
arr[22]=item.celec_consume_unit;//%
arr[23]=item.celec_consume_unit;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
},
handleQuery(){
this.tableDatas = [];
this.getData();
},
itemClick(type,item){
this.type=type;
this.asynDialog = true;

View File

@ -3,14 +3,13 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="monthrange"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="YYYY-MM"
format="YYYY-MM"
/>
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
icon="el-icon-search"

View File

@ -3,18 +3,12 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="query.time"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="基础月份"
/>
<el-date-picker
v-model="query.time2"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="对比月份"
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
@ -85,81 +79,89 @@
var myDate = new Date();
let year = myDate.getFullYear();
that.query.year_s = year;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = year-1;
query0.mgroup='3346491835287007232';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr[4]=item.elec_consume_unit//KW·h/t
arr[5]=item.celec_consume_unit;//KW·h/t//
arr[6]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[7]=huanbi;//KW·h/t
arr[8]=item.celec_consume_unit;//KW·h/t
arr[9]=item.celec_consume_unit;//%
arr[10]=item.celec_consume_unit;//%
arr[11]=0;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
this.getData();
},
methods: {
getData(){
let that = this;
let query0={};
query0.page = 0;
query0.type='month_st';
query0.year_s = that.query.year_s-1;
query0.mgroup='3346491835287007232';
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
this.$API.enm.enstat.req(query0).then((res0) => {
let data0 = res0;
if(data0.length>0){
data0.forEach(item0 => {
//
let n0 = item0.month_s;
let ind0 = 0;
if(team_name0.indexOf('甲')>-1){
ind0 = (n0-1)*3;
}else if(team_name0.indexOf('乙')>-1){
ind0 = (n0-1)*3+1;
}else if(team_name0.indexOf('丙')>-1){
ind0 = (n0-1)*3+2;
}
wrapArr0[ind0] = item0;
});
console.log(wrapArr0)
}else{
}
this.$API.enm.enstat.req(that.query).then((res) => {
let data = res;
if(data.length>0){
data.forEach(item => {
//
let n = item.month_s;
let team_name = item.team_name;
let ind = 0;
if(team_name.indexOf('甲')>-1){
ind = (n-1)*3;
}else if(team_name.indexOf('乙')>-1){
ind = (n-1)*3+1;
}else if(team_name.indexOf('丙')>-1){
ind = (n-1)*3+2;
}
wrapArrs[ind] = item;
let arr = [];
let time = ''+item.year_s+'.'+item.month_s;
arr.push(time);
arr.push(item.team_name);
arr.push(item.total_production);
arr.push(item.production_hour);
arr[4]=item.elec_consume_unit//KW·h/t
arr[5]=item.celec_consume_unit;//KW·h/t//
arr[6]=item.celec_consume_unit;//KW·h/t
let ind_pre = 0,huanbi = 0;
if(item.month_s==1){
ind_pre = 12;
huanbi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
}else{
ind_pre=ind-1;
huanbi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
}
arr[7]=huanbi;//KW·h/t
arr[8]=item.celec_consume_unit;//KW·h/t
arr[9]=item.celec_consume_unit;//%
arr[10]=item.celec_consume_unit;//%
arr[11]=0;//%
wrapArr[ind] = arr;
});
console.log(wrapArr)
that.tableDatas = wrapArr;
}else{
}
})
})
},
handleQuery(){
this.tableDatas = [];
this.getData();
},
itemClick(type,item){
this.type=type;
this.asynDialog = true;

View File

@ -3,14 +3,13 @@
<el-header>
<div class="left-panel">
<el-date-picker
v-model="monthrange"
type="monthrange"
range-separator="至"
start-placeholder="开始月份"
end-placeholder="结束月份"
value-format="YYYY-MM"
format="YYYY-MM"
/>
v-model="query.year_s"
type="year"
value-format="YYYY"
format="YYYY"
placeholder="查询年份"
style="margin-right: 6px;"
/>
<el-button
type="primary"
icon="el-icon-search"

View File

@ -6,6 +6,7 @@
v-model="query.belong_dept"
placeholder="车间"
clearable
@change="deptChange"
style="margin-left: 2px; width: 200px"
>
<el-option
@ -73,51 +74,21 @@
</div>
</el-header>
<el-card style="margin-top:5px">
<!-- <div ref="print" id="myReport" class="printContainer">
<h3 style="text-align: center;">{{tableTime}}</h3>
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
<thead class="myTableHead">
<tr colspan="7"> <th colspan="7">{{tableName}}</th></tr>
<tr>
<template v-for="(date,ind) in tableHead" :key="ind">
<th>{{date}}</th>
</template>
</tr>
</thead>
<tr v-for="(item,index) in tableDatas" :key="index">
<td v-if="index==0" rowspan="7">{{item[0]}}</td>
<td v-else-if="index==7" rowspan="8">{{item[0]}}</td>
<td v-else-if="index==15" rowspan="3">{{item[0]}}</td>
<td class="numCell" v-if="index==11||index==13" rowspan="2">{{item[1]}}</td>
<td class="numCell" v-if="index==0||index==15" rowspan="3">{{item[1]}}</td>
<td class="numCell" v-else-if="index==3||index==7" rowspan="4">{{item[1]}}</td>
<td class="numCell">{{item[2]}}</td>
<td class="numCell">{{item[3]}}</td>
<td class="numCell">{{item[4]}}</td>
<td class="numCell">{{item[5]}}</td>
<td class="numCell">{{item[6]}}</td>
</tr>
</table>
</div> -->
<div class="tableContainer">
<table border="1" cellspacing="0" :key="timeStamp" id="myTable1" class="myTable">
<thead class="myTableHead">
<tr>
<th :colspan="titleLength">{{ tableName }}</th>
</tr>
<tr>
<th rowspan="41">日期</th>
<th :colspan="header4.length">{{deptName}}</th>
<th :colspan="header4.length">{{tableName}}</th>
</tr>
<tr>
<th :colspan="item.lengths*4" v-for="(item,index) in header2Obj" :key="index">{{ item.name }}</th>
<th :colspan="item2.lengths*4" v-for="(item2,index) in header2Obj" :key="index">{{ item2.name }}</th>
</tr>
<tr>
<th colspan="4" v-for="item in header3" :key="item">{{item}}</th>
<th colspan="4" v-for="item3 in header3" :key="item3">{{item3}}</th>
</tr>
<tr>
<th v-for="item in header4" :key="item">{{item}}</th>
<th v-for="item4 in header4" :key="item4">{{item4}}</th>
</tr>
</thead>
<tr v-for="(item,index) in tableDatas3" :key="index">
@ -146,8 +117,9 @@
titleLength:1,
mgroupOptions:[],
tableTime:'',
tableName:'质检日报表',
tableHead:['车间','物料','检验项目','平均值','检次','合次','合格率'],
deptName:'',
typeName:'质检日报表',
tableName:'',
tableDatas:[
['原料车间','辅料','细度', , , , , , ],
['原料车间','辅料','Fe2O3', , , , , , ],
@ -170,6 +142,7 @@
['水泥车间','出磨水泥','SO3'],
['水泥车间','出磨水泥','掺量'],
],
tableDatas3:[],
exportLoading:false,
header2:[],
header3:[],
@ -177,9 +150,15 @@
tableData:[],
header2Obj:[],
deptOptions:[],
arrLength:[0,0,0],
};
},
watch: {
header3: {
handler(newV, OldV) {
this.header3 = newV;
}
}
},
mounted() {
var myDate = new Date();
let month = myDate.getMonth()+1;
@ -195,19 +174,20 @@
},
methods: {
typeCange(value){
let that = this;
if(value==1){
this.tableName = '质检日报表'
this.typeName = '质检日报表'
}else if(value==1){
this.tableName = '质检月报表'
}else{
this.tableName = '质检年报表'
this.typeName = '质检月报表'
}
that.tableName = that.deptName+that.typeName;
},
deptChange(e){
let that = this;
that.deptOptions.forEach(item=>{
if(item.id==e){
that.deptName = item.name;
that.tableName = item.name+that.typeName;
}
})
},
@ -216,6 +196,7 @@
that.$API.system.dept.list.req({ page_size: 3 , type:'dept'}).then(res=>{
that.deptOptions = res.results;
that.deptName = res.results[0].name;
that.tableName =that.deptName+that.typeName;
that.query.belong_dept = res.results[0].id;
this.getTableData();
});
@ -223,10 +204,24 @@
getTableData(){
let that = this;
that.tableDatas3 = [];
that.header2Obj=[];
that.header2 = [];//
that.header3 = [];//
that.header4 = [];//
that.header3 = [];
if(that.deptName=='原料车间'){
that.header2Obj=[{name:'辅料',lengths:3},{name:'干混生料',lengths:4}];
that.header2 = ['辅料','干混生料'];//
that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//
}else if(that.deptName=='烧成车间'){
that.header2Obj=[{name:'入窑生料',lengths:4},{name:'熟料',lengths:4}];
that.header2 = ['入窑生料','熟料'];//
that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//
}else{
that.header2Obj=[{name:'出磨水泥',lengths:3}];
that.header2 = ['出磨水泥'];//
that.header3 = ['比表面积','SO3','掺量'];//
that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//
}
let params = {};
let arr = [];
if(that.query.type==0){//
@ -239,96 +234,6 @@
params.year_s = that.query.year;
}
params.mgroup__belong_dept = that.query.belong_dept;
// that.$API.enm.enstat.req(params).then(res=>{
// let data = res.results;
// let list = [];
// data.forEach(item => {
// let index = item.day_s;
// if(list[index]){}else{
// list[index] = [];
// }
// list[index].push(item);
// })
// let header2=[],header2Obj=[],header3=[],header4=[];
// list = list.filter(item=>{
// return item
// })
// console.log(list)
// console.log('000000000000000')
// //list
// list.forEach((item0,index0)=>{
// //data1
// let data1 = item0;
// let dayData=[],wrapData = [[],[],[]];
// dayData[0]= data1[0].day_s!=null?data1[0].year_s+'.'+data1[0].month_s+'.'+data1[0].day_s:data1[0].year_s+'.'+data1[0].month_s;
// data1.forEach(item1 => {
// if(item1.belong_dept_name==''){
// wrapData[0].push(item1)
// }else if(item1.belong_dept_name==''){
// wrapData[1].push(item1)
// }else if(item1.belong_dept_name==''){
// wrapData[2].push(item1)
// }
// });
// //wrapData
// for(let i=0;i<wrapData.length;i++){
// let data2 = wrapData[i];
// //
// for(let j=0;j<data2.length;j++){
// //
// let data3 = data2[j].qua_data;
// //
// data3.forEach(item3=>{
// if(index0==0){
// header3.push(item3.testitem_name)
// if(header2.indexOf(item3.material_name)>-1){
// let indexObj = header2.indexOf(item3.material_name);
// header2Obj[indexObj].length = header2Obj[indexObj].length+1;
// }else{
// header2.push(item3.material_name);
// header2Obj.push({name:item3.material_name,length:1})
// }
// console.log(header2)
// console.log(header2Obj)
// header4.push('')
// header4.push('')
// header4.push('')
// header4.push('')
// }
// dayData.push(item3.val_avg)
// dayData.push(item3.num_test)
// dayData.push(item3.num_ok)
// let pass = item3.rate_pass*100+'%'
// dayData.push(pass)
// })
// }
// }
// if(index0==0){
// that.header2Obj=header2Obj;
// that.header2 = header2;//
// that.header3 = header3;//
// that.header4 = header4;//
// console.log(header2)
// console.log(header3)
// console.log(header4)
// }
// that.tableData.push(dayData)
// })
// // debugger;
// // console.log(that.tableData)
// // that.time =
// // that.tableName = res.name;
// // let data = res.data.ds0;
// // that.tableHead = data[0];
// // that.tableDatas = data.slice(1,data.length);
// // for(let i=0;i<that.tableDatas.length;i++){
// // that.tableDatas[i][3] = that.tableDatas[i][3].tofixed(2);
// // that.tableDatas[i][4] = that.tableDatas[i][4].tofixed(2);
// // that.tableDatas[i][5] = that.tableDatas[i][5].tofixed(2);
// // that.tableDatas[i][6] = that.tableDatas[i][6].tofixed(2);
// // }
// // that.tableDatas;
// })
this.$API.enm.enstat.req(params).then((res) => {
let data = res.results;
let wrapArr = [];
@ -358,12 +263,12 @@
wrapArr[ind].push(item)
}
});
wrapArr = wrapArr.filter(item=>{
return item
})
wrapArr.forEach((item1,index1)=>{
if(item1!=undefined){
console.log(item1)//
if(item1!=undefined){//
let itemArr = [];
let header2tem=[],header2Objtem=[],header3tem=[],header4tem=[];
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;
@ -387,7 +292,6 @@
header4tem.push('合次')
header4tem.push('及格率')
let indexObj = header2tem.indexOf(item3.material_name);
debugger;
if(indexObj>0&&index3==0){
let inde = indexObj-1;
let ind =header2Objtem[inde].lengths*4+1;
@ -409,13 +313,6 @@
})
})
innerArr.push(itemArr)
console.log('0000000000000');
console.log(itemArr);
console.log(header2tem);
console.log(header2Objtem);
console.log(header3tem);
console.log(header4tem);
console.log('1111111111111');
if(header2tem.length>header2.length){
header2 = header2tem;
}
@ -430,11 +327,23 @@
}
}
})
that.tableDatas3 = innerArr;
that.header2Obj=header2Obj;
that.header2 = header2;//
that.header3 = header3;//
that.header4 = header4;//
if(header2Obj.length>0){
that.header2Obj=header2Obj;
}
that.header2 = header2.length>0?header2:that.header2;//
if(header3.length>0){
that.header3 =header3;//
}
if(header4.length>0){
that.header4 = header4;
}
console.log(innerArr)
this.$forceUpdate();
innerArr.forEach(item=>{
if(item.length>1){
that.tableDatas3.push(item)
}
})
});
},
handlePrint() {