-

+
<%= VUE_APP_TITLE %>
diff --git a/src/App.vue b/src/App.vue
index 2b426512..d46a78fd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -51,6 +51,7 @@
color:#ffffff;
}
.myTable th{
+ width: 80px;
height: 40px;
font-weight: 500;
}
diff --git a/src/config/route.js b/src/config/route.js
index e09ac75f..ee3e9628 100644
--- a/src/config/route.js
+++ b/src/config/route.js
@@ -1107,7 +1107,7 @@ const routes = [
"path": "/base",
"meta": {
"title": "基础配置",
- "icon": "el-icon-question-filled",
+ "icon": "el-icon-management",
"type": "menu",
"perms": ["bi"]
},
@@ -1160,7 +1160,7 @@ const routes = [
"path": "/month",
"meta": {
"title": "每月配置",
- "icon": "el-icon-question-filled",
+ "icon": "el-icon-checked",
"type": "menu",
"perms": ["bi"]
},
@@ -1202,7 +1202,7 @@ const routes = [
"path": "/energy",
"meta": {
"title": "全厂能源",
- "icon": "el-icon-question-filled",
+ "icon": "el-icon-share",
"type": "menu",
"perms": ["bi"]
},
@@ -1245,7 +1245,7 @@ const routes = [
"path": "/rforms",
"meta": {
"title": "全厂报表",
- "icon": "el-icon-question-filled",
+ "icon": "el-icon-histogram",
"type": "menu",
"perms": ["bi"]
},
@@ -1274,22 +1274,22 @@ const routes = [
"name": "reportAll",
"path": "/ungrouped/report",
"meta": {
- "title": "全厂报表",
+ "title": "生产报表",
"icon": "el-icon-grid",
"perms": ["dataset"]
},
"component": "ungrouped/report"
}
- ,{
- "name": "echart",
- "path": "/ungrouped/echart",
- "meta": {
- "title": "图表",
- "icon": "el-icon-grid",
- "perms": ["dataset"]
- },
- "component": "ungrouped/echart"
- }
+ // ,{
+ // "name": "echart",
+ // "path": "/ungrouped/echart",
+ // "meta": {
+ // "title": "图表",
+ // "icon": "el-icon-grid",
+ // "perms": ["dataset"]
+ // },
+ // "component": "ungrouped/echart"
+ // }
]
},
{
diff --git a/src/views/enm_coal/handoverLog.vue b/src/views/enm_coal/handoverLog.vue
index bd6d66fe..c02e341d 100644
--- a/src/views/enm_coal/handoverLog.vue
+++ b/src/views/enm_coal/handoverLog.vue
@@ -141,6 +141,7 @@
@@ -175,6 +176,7 @@
query: {
mgroup:'3347217512021835776',
},
+ deptId :'3347207082608115712',
query2: {},
dialog: {
save: false,
diff --git a/src/views/enm_coal/report.vue b/src/views/enm_coal/report.vue
index 43a7f654..e49f9c56 100644
--- a/src/views/enm_coal/report.vue
+++ b/src/views/enm_coal/report.vue
@@ -392,7 +392,8 @@ const colors =['#647bfe','#8698fe','#a9b6fe','#91CC75','#EE6666'];
mounted() {
function precen(a,b){
if(b!==0&&b!==null&&a!==null){
- return a/b
+ let precen = (a/b).toFixed(2)
+ return precen*100+'%'
}else{
return '/'
}
diff --git a/src/views/enm_coal/teamAnalysis.vue b/src/views/enm_coal/teamAnalysis.vue
index 714939d0..f79d49dc 100644
--- a/src/views/enm_coal/teamAnalysis.vue
+++ b/src/views/enm_coal/teamAnalysis.vue
@@ -199,8 +199,8 @@
}
};
-
\ No newline at end of file
diff --git a/src/views/enm_coal/workshopAnalysis.vue b/src/views/enm_coal/workshopAnalysis.vue
index aec8d0da..8d844532 100644
--- a/src/views/enm_coal/workshopAnalysis.vue
+++ b/src/views/enm_coal/workshopAnalysis.vue
@@ -48,15 +48,16 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
+
+ |
+
+ ↑
+ ↓
+ ▲
+ ▼
+ {{item1}}
+
+ |
@@ -76,20 +77,11 @@
return {
chartShow: false,
myOption: null,
- timeStamp:0,
- listQuery:{
- belong_dept:'',
- task2__year:'',
- page:0
- },
query:{
- time:''
+ mgroup:'3347217512021835776',
},
- tableDatas:[
- {month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- ],
+ monthGoal:[],
+ tableDatas:[],
modelValue:true,
type:'hours',
title:'title',
@@ -100,9 +92,153 @@
};
},
mounted() {
+ let that = this;
+ var myDate = new Date();
+ let year = myDate.getFullYear();
+ that.query.year_s = year;
+ //月目标
+ let paramsGoal = {};
+ paramsGoal.page=0;
+ paramsGoal.mgroup=that.query.mgroup;
+ that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
+ if(ress.length>0){
+ let monthGoal = [];
+ ress.forEach(goal=>{
+ if(goal.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
+ monthGoal[0]=goal.goal_val;
+ monthGoal[1]=goal.goal_val_2;
+ monthGoal[2]=goal.goal_val_3;
+ monthGoal[3]=goal.goal_val_4;
+ monthGoal[4]=goal.goal_val_5;
+ monthGoal[5]=goal.goal_val_6;
+ monthGoal[6]=goal.goal_val_7;
+ monthGoal[7]=goal.goal_val_8;
+ monthGoal[8]=goal.goal_val_9;
+ monthGoal[9]=goal.goal_val_10;
+ monthGoal[10]=goal.goal_val_11;
+ monthGoal[11]=goal.goal_val_12;
+ monthGoal[12]=goal.goal_val_12;
+ that.monthGoal = monthGoal;
+ }
+ })
+ this.getData();
+ }else{
+ this.getData();
+ }
+ })
},
methods: {
-
+ // 动态绑定Class
+ bindClass(item,index){
+ let classInfo = { redColor: false, greenColor: false }
+ if(index==3||index==5){
+ if( typeof(item)=='number'){
+ if(item>0){
+ classInfo.greenColor = true;
+ classInfo.redColor = false;
+ }else if(item<0){
+ classInfo.redColor = true;
+ classInfo.greenColor = false
+ }
+ }
+ }
+ return classInfo
+ },
+ getData(){
+ let that = this;
+ let query0={};
+ query0.page = 0;
+ query0.type='month_s';
+ 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;
+ if(data0.length>0){
+ data0.forEach(item0 => {
+ //先按月份排序,再按班组排序
+ let ind0 = item0.month_s;
+ wrapArr0[ind0] = item0;
+ });
+ }
+ let query={};
+ query.page = 0;
+ query.type='month_s';
+ query.year_s = that.query.year_s;
+ query.mgroup=that.query.mgroup;
+ that.$API.enm.enstat.req(query).then((res) => {
+ let data = res;
+ if(data.length>0){
+ data.forEach(item => {
+ //先按月份排序,再按班组排序
+ let ind = item.month_s;
+ let arr = [];
+ let time = ''+item.year_s+'.'+item.month_s;
+ arr.push(time);
+ arr.push(item.elec_consume_unit);//当期值(KW·h/t)
+ arr[2] = that.monthGoal[ind]!==undefined?that.monthGoal[ind]:'/';
+ wrapArr[ind] = arr;
+ });
+ wrapArr.forEach((item,index)=>{
+ let arrs = [];
+ arrs[0]=item[0];
+ arrs[1]=item[1];
+ arrs[2]=item[2];
+ //目标值(KW·h/t)//需要接口获取
+ //当期与目标差值(KW·h/t)
+ let diff = 0;
+ if(item[2]!=='/'){
+ diff = item[1]-item[2];
+ }else{
+ diff = '/';
+ }
+ arrs[3]=diff;
+ //环期值(KW·h/t)上个月的值
+ let lastNum = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ lastNum = wrapArr[num].elec_consume_unit;
+ }else{
+ lastNum='/'
+ }
+ }else{
+ lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ }
+ arrs[4]=lastNum;
+ //当期与环期差值(KW·h/t)
+ let lastDiff = 0;
+
+ if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ lastDiff =arrs[1]- arrs[4];
+ }else{
+ lastDiff = '/';
+ }
+ arrs[5]=lastDiff;
+ //环比增长率(%)
+ let lastRate = 0;
+ if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ lastRate = (lastDiff/lastNum)*100;
+ }else{
+ lastRate = '/'
+ }
+ arrs[6]=lastRate;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate =0;
+ if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ }else{
+ sameRate='/';
+ }
+ arrs[7]=sameRate;
+ wrapArrs.push(arrs);
+ })
+ that.tableDatas = wrapArrs;
+ }else{
+ }
+ })
+ })
+ },
itemClick(type,item){
this.type=type;
this.asynDialog = true;
@@ -133,4 +269,12 @@
.printContainer{
width: 1075px;
}
+ .redColor{
+ font-weight: bold;
+ color: #ff0000;
+ }
+ .greenColor{
+ font-weight: bold;
+ color: #008000;
+ }
\ No newline at end of file
diff --git a/src/views/enm_kiln/handoverLog.vue b/src/views/enm_kiln/handoverLog.vue
index 8582c40f..5dd89b68 100644
--- a/src/views/enm_kiln/handoverLog.vue
+++ b/src/views/enm_kiln/handoverLog.vue
@@ -159,6 +159,7 @@
@@ -193,6 +194,8 @@ import otherDialog from "./../enm_rm/other_form.vue";
query: {
mgroup:'3347217246321065984',
},
+
+ deptId :'3347207082608115712',
query2: {},
dialog: {
save: false,
diff --git a/src/views/enm_kiln/report.vue b/src/views/enm_kiln/report.vue
index ba78d0d4..469a4e7d 100644
--- a/src/views/enm_kiln/report.vue
+++ b/src/views/enm_kiln/report.vue
@@ -465,7 +465,8 @@ const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
mounted() {
function precen(a,b){
if(b!==0&&b!==null&&a!==null){
- return a/b
+ let precen = (a/b).toFixed(2)
+ return precen*100+'%'
}else{
return '/'
}
diff --git a/src/views/enm_kiln/teamAnalysis.vue b/src/views/enm_kiln/teamAnalysis.vue
index 68cb26f3..c9f3176d 100644
--- a/src/views/enm_kiln/teamAnalysis.vue
+++ b/src/views/enm_kiln/teamAnalysis.vue
@@ -48,7 +48,7 @@
运转率 |
成本 |
质量 |
-
产品单位能耗 |
+
产品单位能耗 |
得分 |
@@ -245,8 +245,8 @@
}
};
-
\ No newline at end of file
diff --git a/src/views/enm_kiln/workshopAnalysis.vue b/src/views/enm_kiln/workshopAnalysis.vue
index 155a8505..8d295779 100644
--- a/src/views/enm_kiln/workshopAnalysis.vue
+++ b/src/views/enm_kiln/workshopAnalysis.vue
@@ -2,7 +2,7 @@
-
+ > -->
+
+
+
-
+
| 车间单位产品电耗月度分析表 |
@@ -48,19 +61,20 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
+
+ |
+
+ ↑
+ ↓
+ ▲
+ ▼
+ {{item1}}
+
+ |
-
+
| 车间单位产品综合电耗月度分析表 |
@@ -81,20 +95,18 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
- {{item.value7}} |
+
+ |
+
+ ▲
+ ▼
+ {{item1}}
+
+ |
-
+
| 车间单位产品标煤耗月度分析表 |
@@ -115,20 +127,18 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
- {{item.value7}} |
+
+ |
+
+ ▲
+ ▼
+ {{item1}}
+
+ |
-
+
| 车间单位产品综合能耗月度分析表 |
@@ -149,16 +159,14 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
- {{item.value7}} |
+
+ |
+
+ ▲
+ ▼
+ {{item1}}
+
+ |
@@ -178,20 +186,27 @@
return {
chartShow: false,
myOption: null,
- timeStamp:0,
- listQuery:{
- belong_dept:'',
- task2__year:'',
- page:0
+ query: {
+ type:1,
+ mgroup:'3347217246321065984',
},
- query:{
- time:''
- },
- tableDatas:[
- {month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- ],
+ monthGoal:[],
+ monthGoal2:[],
+ monthGoal3:[],
+ monthGoal4:[],
+ tableDatas:[],
+ tableDatas2:[],
+ tableDatas3:[],
+ tableDatas4:[],
+ options:[{
+ name:'电耗',id:1,
+ },{
+ name:'综合电耗',id:2,
+ },{
+ name:'标煤耗',id:3,
+ },{
+ name:'综合能耗',id:4,
+ }],
modelValue:true,
type:'hours',
title:'title',
@@ -202,9 +217,497 @@
};
},
mounted() {
+ let that = this;
+ var myDate = new Date();
+ let year = myDate.getFullYear();
+ that.query.year_s = year;
+ //月目标
+ let paramsGoal = {};
+ paramsGoal.page=0;
+ paramsGoal.mgroup=that.query.mgroup;
+ that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
+ if(ress.length>0){
+ let monthGoal = [],monthGoal2 = [],monthGoal3 = [],monthGoal4 = [];
+ ress.forEach(goal=>{
+ if(goal.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
+ monthGoal[0]=goal.goal_val;
+ monthGoal[1]=goal.goal_val_2;
+ monthGoal[2]=goal.goal_val_3;
+ monthGoal[3]=goal.goal_val_4;
+ monthGoal[4]=goal.goal_val_5;
+ monthGoal[5]=goal.goal_val_6;
+ monthGoal[6]=goal.goal_val_7;
+ monthGoal[7]=goal.goal_val_8;
+ monthGoal[8]=goal.goal_val_9;
+ monthGoal[9]=goal.goal_val_10;
+ monthGoal[10]=goal.goal_val_11;
+ monthGoal[11]=goal.goal_val_12;
+ monthGoal[12]=goal.goal_val_12;
+ that.monthGoal = monthGoal;
+ }
+ if(goal.goal_cate_name=='单位产品综合电耗(KW·h/t)'){
+ monthGoal2[0]=goal.goal_val;
+ monthGoal2[1]=goal.goal_val_2;
+ monthGoal2[2]=goal.goal_val_3;
+ monthGoal2[3]=goal.goal_val_4;
+ monthGoal2[4]=goal.goal_val_5;
+ monthGoal2[5]=goal.goal_val_6;
+ monthGoal2[6]=goal.goal_val_7;
+ monthGoal2[7]=goal.goal_val_8;
+ monthGoal2[8]=goal.goal_val_9;
+ monthGoal2[9]=goal.goal_val_10;
+ monthGoal2[10]=goal.goal_val_11;
+ monthGoal2[11]=goal.goal_val_12;
+ monthGoal2[12]=goal.goal_val_12;
+ that.monthGoal2 = monthGoal2;
+ }
+ if(goal.goal_cate_name=='单位产品标煤耗(kgce/t)'){
+ monthGoal3[0]=goal.goal_val;
+ monthGoal3[1]=goal.goal_val_2;
+ monthGoal3[2]=goal.goal_val_3;
+ monthGoal3[3]=goal.goal_val_4;
+ monthGoal3[4]=goal.goal_val_5;
+ monthGoal3[5]=goal.goal_val_6;
+ monthGoal3[6]=goal.goal_val_7;
+ monthGoal3[7]=goal.goal_val_8;
+ monthGoal3[8]=goal.goal_val_9;
+ monthGoal3[9]=goal.goal_val_10;
+ monthGoal3[10]=goal.goal_val_11;
+ monthGoal3[11]=goal.goal_val_12;
+ monthGoal3[12]=goal.goal_val_12;
+ that.monthGoal3 = monthGoal3;
+ }
+ if(goal.goal_cate_name=='单位产品综合能耗(kgce/t)'){
+ monthGoal4[0]=goal.goal_val;
+ monthGoal4[1]=goal.goal_val_2;
+ monthGoal4[2]=goal.goal_val_3;
+ monthGoal4[3]=goal.goal_val_4;
+ monthGoal4[4]=goal.goal_val_5;
+ monthGoal4[5]=goal.goal_val_6;
+ monthGoal4[6]=goal.goal_val_7;
+ monthGoal4[7]=goal.goal_val_8;
+ monthGoal4[8]=goal.goal_val_9;
+ monthGoal4[9]=goal.goal_val_10;
+ monthGoal4[10]=goal.goal_val_11;
+ monthGoal4[11]=goal.goal_val_12;
+ monthGoal4[12]=goal.goal_val_12;
+ that.monthGoal4 = monthGoal4;
+ }
+ })
+ this.getData();
+ }else{
+ this.getData();
+ }
+ })
},
methods: {
-
+ // 动态绑定Class
+ bindClass(item,index){
+ let classInfo = { redColor: false, greenColor: false }
+ if(index==3||index==5){
+ if( typeof(item)=='number'){
+ if(item>0){
+ classInfo.greenColor = true;
+ classInfo.redColor = false;
+ }else if(item<0){
+ classInfo.redColor = true;
+ classInfo.greenColor = false
+ }
+ }
+ }
+ return classInfo
+ },
+ getData(){
+ let that = this;
+ let query0={};
+ query0.page = 0;
+ query0.type='month_s';
+ query0.year_s = that.query.year_s-1;
+ query0.mgroup=that.query.mgroup;
+ let wrapArr = [],wrapArr0 = [] ,wrapArrs = [],wrapArrs2=[],wrapArrs3=[],wrapArrs4=[];
+ this.$API.enm.enstat.req(query0).then((res0) => {
+ let data0 = res0;
+ if(data0.length>0){
+ data0.forEach(item0 => {
+ //先按月份排序,再按班组排序
+ let ind0 = item0.month_s;
+ wrapArr0[ind0] = item0;
+ });
+ }
+ let query={};
+ query.page = 0;
+ query.type='month_s';
+ query.year_s = that.query.year_s;
+ query.mgroup=that.query.mgroup;
+ that.$API.enm.enstat.req(query).then((res) => {
+ let data = res;
+ if(data.length>0){
+ data.forEach(item => {
+ //先按月份排序,再按班组排序
+ let ind = item.month_s;
+ let arr = item;
+ let time = ''+item.year_s+'.'+item.month_s;
+ arr.time=time;
+ wrapArr[ind] = arr;
+ });
+ //type==1
+ wrapArr.forEach((item,index)=>{
+ let ind = item.month_s;
+ let arrs = [],arrs2 = [],arrs3 = [],arrs4 = [];
+ arrs[0]=item.time;
+ arrs2[0]=item.time;
+ arrs3[0]=item.time;
+ arrs4[0]=item.time;
+ arrs[1]=item.elec_consume_unit;
+ arrs[2]=that.monthGoal[ind]!==undefined?that.monthGoal[ind]:'/';
+ //当期与目标差值(KW·h/t)
+ let diff = 0;
+ if(arrs[2]!=='/'){
+ diff = arrs[1]-arrs[2];
+ }else{
+ diff = '/';
+ }
+ arrs[3]=diff;
+ //环期值(KW·h/t)上个月的值
+ let lastNum = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ lastNum = wrapArr[num].elec_consume_unit;
+ }else{
+ lastNum='/'
+ }
+ }else{
+ lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ }
+ arrs[4]=lastNum;
+ //当期与环期差值(KW·h/t)
+ let lastDiff = 0;
+
+ if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ lastDiff =arrs[1]- arrs[4];
+ }else{
+ lastDiff = '/';
+ }
+ arrs[5]=lastDiff;
+ //环比增长率(%)
+ let lastRate = 0;
+ if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ lastRate = (lastDiff/lastNum)*100;
+ }else{
+ lastRate = '/'
+ }
+ arrs[6]=lastRate;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate =0;
+ if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ }else{
+ sameRate='/';
+ }
+ arrs[7]=sameRate;
+ wrapArrs.push(arrs);
+ arrs2[1]=item.celec_consume_unit;
+ arrs2[2]=that.monthGoal2[ind]!==undefined?that.monthGoal2[ind]:'/';
+ arrs2[3]=48;
+ arrs2[4]=57;
+ arrs2[5]=61;
+ //当期与环期差值(KW·h/t)
+ let lastNum2 = 0,lastDiff2 = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].celec_consume_unit){
+ lastNum2 = wrapArr[num].celec_consume_unit;
+ }else{
+ lastNum2='/'
+ }
+ }else{
+ lastNum2 = wrapArr0[12]?wrapArr0[12].celec_consume_unit:'/';
+ }
+ if(arrs2[1]!=='/'&&lastNum2!=='/'){
+ lastDiff2 =arrs2[1]- lastNum2;
+ }else{
+ lastDiff2 = '/';
+ }
+ arrs2[6]=lastDiff2;
+ //环比增长率(%)
+ let lastRate2 = 0;
+ if(lastDiff2=='/'&&lastNum2!=='/'&&lastNum2!==0){
+ lastRate2 = (lastDiff2/lastNum2)*100;
+ }else{
+ lastRate2 = '/'
+ }
+ arrs2[7]=lastRate2;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate2 =0;
+ if(wrapArr0[index]&&wrapArr0[index].celec_consume_unit){
+ sameRate2 =((arrs[1]- wrapArr0[index].celec_consume_unit)/wrapArr0[index].celec_consume_unit)*100
+ }else{
+ sameRate2='/';
+ }
+ arrs2[8]=sameRate2;
+ wrapArrs2.push(arrs2);
+
+ arrs3[1]=item.coal_consume_unit;
+ arrs3[2]=that.monthGoal3[ind]!==undefined?that.monthGoal3[ind]:'/';
+ arrs3[3]=94;
+ arrs3[4]=100;
+ arrs3[5]=109;
+ //当期与环期差值(KW·h/t)
+ let lastNum3 = 0,lastDiff3 = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].coal_consume_unit){
+ lastNum3 = wrapArr[num].coal_consume_unit;
+ }else{
+ lastNum3='/'
+ }
+ }else{
+ lastNum3 = wrapArr0[12]?wrapArr0[12].coal_consume_unit:'/';
+ }
+ if(arrs3[1]!=='/'&&lastNum3!=='/'){
+ lastDiff3 =arrs3[1]- lastNum3;
+ }else{
+ lastDiff3 = '/';
+ }
+ arrs3[6]=lastDiff3;
+ //环比增长率(%)
+ let lastRate3 = 0;
+ if(lastDiff3=='/'&&lastNum3!=='/'&&lastNum3!==0){
+ lastRate3 = (lastDiff3/lastNum3)*100;
+ }else{
+ lastRate3 = '/'
+ }
+ arrs3[7]=lastRate3;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate3 =0;
+ if(wrapArr0[index]&&wrapArr0[index].coal_consume_unit){
+ sameRate3 =((arrs[1]- wrapArr0[index].coal_consume_unit)/wrapArr0[index].coal_consume_unit)*100
+ }else{
+ sameRate3='/';
+ }
+ arrs3[8]=sameRate3;
+ wrapArrs3.push(arrs3);
+
+
+ arrs4[1]=item.cen_consume_unit;
+ arrs4[2]=that.monthGoal4[ind]!==undefined?that.monthGoal4[ind]:'/';
+ arrs4[3]=100;
+ arrs4[4]=107;
+ arrs4[5]=117;
+ //当期与环期差值(KW·h/t)
+ let lastNum4 = 0,lastDiff4 = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].cen_consume_unit){
+ lastNum4 = wrapArr[num].cen_consume_unit;
+ }else{
+ lastNum4='/'
+ }
+ }else{
+ lastNum4 = wrapArr0[12]?wrapArr0[12].cen_consume_unit:'/';
+ }
+ if(arrs4[1]!=='/'&&lastNum4!=='/'){
+ lastDiff4 =arrs4[1]- lastNum4;
+ }else{
+ lastDiff4 = '/';
+ }
+ arrs4[6]=lastDiff4;
+ //环比增长率(%)
+ let lastRate4 = 0;
+ if(lastDiff4=='/'&&lastNum4!=='/'&&lastNum4!==0){
+ lastRate4 = (lastDiff4/lastNum4)*100;
+ }else{
+ lastRate4 = '/'
+ }
+ arrs4[7]=lastRate4;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate4 =0;
+ if(wrapArr0[index]&&wrapArr0[index].cen_consume_unit){
+ sameRate4 =((arrs[1]- wrapArr0[index].cen_consume_unit)/wrapArr0[index].cen_consume_unit)*100
+ }else{
+ sameRate4='/';
+ }
+ arrs4[8]=sameRate4;
+ wrapArrs4.push(arrs4);
+ })
+ that.tableDatas = wrapArrs;
+ that.tableDatas2 = wrapArrs2;
+ that.tableDatas3 = wrapArrs3;
+ that.tableDatas4 = wrapArrs4;
+ // //type==2
+ // wrapArr.forEach((item,index)=>{
+ // let arrs = [];
+ // arrs[0]=item[0];
+ // arrs[1]=item[1];
+ // arrs[2]=item[2];
+ // //目标值(KW·h/t)//需要接口获取
+ // //当期与目标差值(KW·h/t)
+ // let diff = 0;
+ // if(item[2]!=='/'){
+ // diff = item[1]-item[2];
+ // }else{
+ // diff = '/';
+ // }
+ // arrs[3]=diff;
+ // //环期值(KW·h/t)上个月的值
+ // let lastNum = 0;
+ // if(index>1){
+ // let num = index-1;
+ // if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ // lastNum = wrapArr[num].elec_consume_unit;
+ // }else{
+ // lastNum='/'
+ // }
+ // }else{
+ // lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ // }
+ // arrs[4]=lastNum;
+ // //当期与环期差值(KW·h/t)
+ // let lastDiff = 0;
+
+ // if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ // lastDiff =arrs[1]- arrs[4];
+ // }else{
+ // lastDiff = '/';
+ // }
+ // arrs[5]=lastDiff;
+ // //环比增长率(%)
+ // let lastRate = 0;
+ // if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ // lastRate = (lastDiff/lastNum)*100;
+ // }else{
+ // lastRate = '/'
+ // }
+ // arrs[6]=lastRate;
+ // //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ // let sameRate =0;
+ // if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ // sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ // }else{
+ // sameRate='/';
+ // }
+ // arrs[7]=sameRate;
+ // wrapArrs.push(arrs);
+ // })
+ // that.tableDatas2 = wrapArrs2;
+ // //type==3
+ // wrapArr.forEach((item,index)=>{
+ // let arrs = [];
+ // arrs[0]=item[0];
+ // arrs[1]=item[1];
+ // arrs[2]=item[2];
+ // //目标值(KW·h/t)//需要接口获取
+ // //当期与目标差值(KW·h/t)
+ // let diff = 0;
+ // if(item[2]!=='/'){
+ // diff = item[1]-item[2];
+ // }else{
+ // diff = '/';
+ // }
+ // arrs[3]=diff;
+ // //环期值(KW·h/t)上个月的值
+ // let lastNum = 0;
+ // if(index>1){
+ // let num = index-1;
+ // if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ // lastNum = wrapArr[num].elec_consume_unit;
+ // }else{
+ // lastNum='/'
+ // }
+ // }else{
+ // lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ // }
+ // arrs[4]=lastNum;
+ // //当期与环期差值(KW·h/t)
+ // let lastDiff = 0;
+
+ // if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ // lastDiff =arrs[1]- arrs[4];
+ // }else{
+ // lastDiff = '/';
+ // }
+ // arrs[5]=lastDiff;
+ // //环比增长率(%)
+ // let lastRate = 0;
+ // if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ // lastRate = (lastDiff/lastNum)*100;
+ // }else{
+ // lastRate = '/'
+ // }
+ // arrs[6]=lastRate;
+ // //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ // let sameRate =0;
+ // if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ // sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ // }else{
+ // sameRate='/';
+ // }
+ // arrs[7]=sameRate;
+ // wrapArrs.push(arrs);
+ // })
+ // that.tableDatas3 = wrapArrs3;
+ // //type==3
+ // wrapArr.forEach((item,index)=>{
+ // let arrs = [];
+ // arrs[0]=item[0];
+ // arrs[1]=item[1];
+ // arrs[2]=item[2];
+ // //目标值(KW·h/t)//需要接口获取
+ // //当期与目标差值(KW·h/t)
+ // let diff = 0;
+ // if(item[2]!=='/'){
+ // diff = item[1]-item[2];
+ // }else{
+ // diff = '/';
+ // }
+ // arrs[3]=diff;
+ // //环期值(KW·h/t)上个月的值
+ // let lastNum = 0;
+ // if(index>1){
+ // let num = index-1;
+ // if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ // lastNum = wrapArr[num].elec_consume_unit;
+ // }else{
+ // lastNum='/'
+ // }
+ // }else{
+ // lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ // }
+ // arrs[4]=lastNum;
+ // //当期与环期差值(KW·h/t)
+ // let lastDiff = 0;
+
+ // if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ // lastDiff =arrs[1]- arrs[4];
+ // }else{
+ // lastDiff = '/';
+ // }
+ // arrs[5]=lastDiff;
+ // //环比增长率(%)
+ // let lastRate = 0;
+ // if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ // lastRate = (lastDiff/lastNum)*100;
+ // }else{
+ // lastRate = '/'
+ // }
+ // arrs[6]=lastRate;
+ // //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ // let sameRate =0;
+ // if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ // sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ // }else{
+ // sameRate='/';
+ // }
+ // arrs[7]=sameRate;
+ // wrapArrs.push(arrs);
+ // })
+ // that.tableDatas3 = wrapArrs3;
+ }else{
+ }
+ })
+ })
+ },
itemClick(type,item){
this.type=type;
this.asynDialog = true;
@@ -235,4 +738,12 @@
.printContainer{
width: 1075px;
}
+ .redColor{
+ font-weight: bold;
+ color: #ff0000;
+ }
+ .greenColor{
+ font-weight: bold;
+ color: #008000;
+ }
\ No newline at end of file
diff --git a/src/views/enm_mill/handoverLog.vue b/src/views/enm_mill/handoverLog.vue
index a2ff391f..72f61af2 100644
--- a/src/views/enm_mill/handoverLog.vue
+++ b/src/views/enm_mill/handoverLog.vue
@@ -141,6 +141,7 @@
@@ -175,6 +176,7 @@
query: {
mgroup:'3347217651339837440',
},
+ deptId:'3347207316583170048',
query2: {},
dialog: {
save: false,
diff --git a/src/views/enm_mill/report.vue b/src/views/enm_mill/report.vue
index 63e9fae7..aa7811d9 100644
--- a/src/views/enm_mill/report.vue
+++ b/src/views/enm_mill/report.vue
@@ -427,7 +427,8 @@ const colors =['#647bfe','#8698fe','#a9b6fe','#cbd3fe','#91CC75','#EE6666'];
mounted() {
function precen(a,b){
if(b!==0&&b!==null&&a!==null){
- return a/b
+ let precen = (a/b).toFixed(2)
+ return precen*100+'%'
}else{
return '/'
}
diff --git a/src/views/enm_mill/workshopAnalysis.vue b/src/views/enm_mill/workshopAnalysis.vue
index b1ff08f1..f481bfe2 100644
--- a/src/views/enm_mill/workshopAnalysis.vue
+++ b/src/views/enm_mill/workshopAnalysis.vue
@@ -2,7 +2,20 @@
-
+
+
+
+
-
+
| 水泥磨工段车间单位产品电耗月度分析表 |
@@ -52,20 +65,18 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
- {{item.value7}} |
+
+ |
+
+ ▲
+ ▼
+ {{item1}}
+
+ |
-
+
| 水泥磨工段车间单位产品综合能耗月度分析表 |
@@ -86,16 +97,14 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
- {{item.value7}} |
+
+ |
+
+ ▲
+ ▼
+ {{item1}}
+
+ |
@@ -115,20 +124,19 @@
return {
chartShow: false,
myOption: null,
- timeStamp:0,
- listQuery:{
- belong_dept:'',
- task2__year:'',
- page:0
+ query: {
+ type:1,
+ mgroup:'3347217651339837440',
},
- query:{
- time:''
- },
- tableDatas:[
- {month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- ],
+ monthGoal:[],
+ monthGoal2:[],
+ tableDatas:[],
+ tableDatas2:[],
+ options:[{
+ name:'电耗',id:1,
+ },{
+ name:'综合能耗',id:2,
+ }],
modelValue:true,
type:'hours',
title:'title',
@@ -139,9 +147,203 @@
};
},
mounted() {
+ let that = this;
+ var myDate = new Date();
+ let year = myDate.getFullYear();
+ that.query.year_s = year;
+ //月目标
+ let paramsGoal = {};
+ paramsGoal.page=0;
+ paramsGoal.mgroup=that.query.mgroup;
+ that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
+ if(ress.length>0){
+ let monthGoal = [];
+ ress.forEach(goal=>{
+ if(goal.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
+ monthGoal[0]=goal.goal_val;
+ monthGoal[1]=goal.goal_val_2;
+ monthGoal[2]=goal.goal_val_3;
+ monthGoal[3]=goal.goal_val_4;
+ monthGoal[4]=goal.goal_val_5;
+ monthGoal[5]=goal.goal_val_6;
+ monthGoal[6]=goal.goal_val_7;
+ monthGoal[7]=goal.goal_val_8;
+ monthGoal[8]=goal.goal_val_9;
+ monthGoal[9]=goal.goal_val_10;
+ monthGoal[10]=goal.goal_val_11;
+ monthGoal[11]=goal.goal_val_12;
+ monthGoal[12]=goal.goal_val_12;
+ that.monthGoal = monthGoal;
+ }
+ if(goal.goal_cate_name=='单位产品综合能耗(kgce/t)'){
+ monthGoal2[0]=goal.goal_val;
+ monthGoal2[1]=goal.goal_val_2;
+ monthGoal2[2]=goal.goal_val_3;
+ monthGoal2[3]=goal.goal_val_4;
+ monthGoal2[4]=goal.goal_val_5;
+ monthGoal2[5]=goal.goal_val_6;
+ monthGoal2[6]=goal.goal_val_7;
+ monthGoal2[7]=goal.goal_val_8;
+ monthGoal2[8]=goal.goal_val_9;
+ monthGoal2[9]=goal.goal_val_10;
+ monthGoal2[10]=goal.goal_val_11;
+ monthGoal2[11]=goal.goal_val_12;
+ monthGoal2[12]=goal.goal_val_12;
+ that.monthGoal2 = monthGoal2;
+ }
+ })
+ this.getData();
+ }else{
+ this.getData();
+ }
+ })
},
methods: {
-
+ // 动态绑定Class
+ bindClass(item,index){
+ let classInfo = { redColor: false, greenColor: false }
+ if(index==6){
+ if( typeof(item)=='number'){
+ if(item>0){
+ classInfo.greenColor = true;
+ classInfo.redColor = false;
+ }else if(item<0){
+ classInfo.redColor = true;
+ classInfo.greenColor = false
+ }
+ }
+ }
+ return classInfo
+ },
+ getData(){
+ let that = this;
+ let query0={};
+ query0.page = 0;
+ query0.type='month_s';
+ query0.year_s = that.query.year_s-1;
+ query0.mgroup=that.query.mgroup;
+ let wrapArr = [],wrapArr0 = [] ,wrapArrs = [],wrapArrs2 = [];
+ this.$API.enm.enstat.req(query0).then((res0) => {
+ let data0 = res0;
+ if(data0.length>0){
+ data0.forEach(item0 => {
+ //先按月份排序,再按班组排序
+ let ind0 = item0.month_s;
+ wrapArr0[ind0] = item0;
+ });
+ }
+ let query={};
+ query.page = 0;
+ query.type='month_s';
+ query.year_s = that.query.year_s;
+ query.mgroup=that.query.mgroup;
+ that.$API.enm.enstat.req(query).then((res) => {
+ let data = res;
+ if(data.length>0){
+ data.forEach(item => {
+ //先按月份排序,再按班组排序
+ let ind = item.month_s;
+ let arr = [];
+ let time = ''+item.year_s+'.'+item.month_s;
+ arr.push(time);
+ arr.push(item.elec_consume_unit);//当期值(KW·h/t)
+ arr[2] = that.monthGoal[ind]!==undefined?that.monthGoal[ind]:'/';
+ wrapArr[ind] = arr;
+ });
+ wrapArr.forEach((item,index)=>{
+ let ind = item.month_s;
+ let arrs = [],arrs2=[];
+ arrs[0]=item[0];
+ arrs[1]=item[1];
+ arrs[2]=item[2];
+ arrs[3]=26;
+ arrs[4]=29;
+ arrs[5]=34;
+ //当期与环期差值(KW·h/t)
+ let lastNum = 0,lastDiff = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ lastNum = wrapArr[num].elec_consume_unit;
+ }else{
+ lastNum='/'
+ }
+ }else{
+ lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ }
+ if(arrs[1]!=='/'&&lastNum!=='/'){
+ lastDiff =arrs[1]- lastNum;
+ }else{
+ lastDiff = '/';
+ }
+ arrs[6]=lastDiff;
+ //环比增长率(%)
+ let lastRate = 0;
+ if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ lastRate = (lastDiff/lastNum)*100;
+ }else{
+ lastRate = '/'
+ }
+ arrs[7]=lastRate;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate =0;
+ if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ }else{
+ sameRate='/';
+ }
+ arrs[8]=sameRate;
+ wrapArrs.push(arrs);
+
+ arrs2[0]=item[0];
+ arrs2[1]=item.cen_consume_unit;
+ arrs2[2]=that.monthGoal2[ind]!==undefined?that.monthGoal2[ind]:'/';
+ arrs2[3]=80;
+ arrs2[4]=87;
+ arrs2[5]=94;
+ //当期与环期差值(KW·h/t)
+ let lastNum2 = 0,lastDiff2 = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].cen_consume_unit){
+ lastNum2 = wrapArr[num].cen_consume_unit;
+ }else{
+ lastNum2='/'
+ }
+ }else{
+ lastNum2 = wrapArr0[12]?wrapArr0[12].cen_consume_unit:'/';
+ }
+ if(arrs2[1]!=='/'&&lastNum2!=='/'){
+ lastDiff2 =arrs2[1]- lastNum2;
+ }else{
+ lastDiff2 = '/';
+ }
+ arrs2[6]=lastDiff2;
+ //环比增长率(%)
+ let lastRate2 = 0;
+ if(lastDiff2=='/'&&lastNum2!=='/'&&lastNum2!==0){
+ lastRate2 = (lastDiff2/lastNum2)*100;
+ }else{
+ lastRate2 = '/'
+ }
+ arrs2[7]=lastRate2;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate2 =0;
+ if(wrapArr0[index]&&wrapArr0[index].cen_consume_unit){
+ sameRate2 =((arrs[1]- wrapArr0[index].cen_consume_unit)/wrapArr0[index].cen_consume_unit)*100
+ }else{
+ sameRate2='/';
+ }
+ arrs2[8]=sameRate2;
+ wrapArrs2.push(arrs2);
+ })
+ that.tableDatas = wrapArrs;
+ that.tableDatas2 = wrapArrs2;
+ }else{
+ }
+ })
+ })
+ },
itemClick(type,item){
this.type=type;
this.asynDialog = true;
@@ -172,4 +374,12 @@
.printContainer{
width: 1075px;
}
+ .redColor{
+ font-weight: bold;
+ color: #ff0000;
+ }
+ .greenColor{
+ font-weight: bold;
+ color: #008000;
+ }
\ No newline at end of file
diff --git a/src/views/enm_pack/handoverLog.vue b/src/views/enm_pack/handoverLog.vue
index 9761f659..a52df52e 100644
--- a/src/views/enm_pack/handoverLog.vue
+++ b/src/views/enm_pack/handoverLog.vue
@@ -125,6 +125,7 @@
@@ -148,8 +149,9 @@ import saveDialog from "./../enm_rm/handover_form.vue";
apiObj: this.$API.wpm.sflog.list,
apiObj2: null,
query: {
- mgroup:'3346491835287007232',
+ mgroup:'3347217757455728640',
},
+ deptId:'3347207316583170048',
query2: {},
dialog: {
save: false,
diff --git a/src/views/enm_pack/report.vue b/src/views/enm_pack/report.vue
index 0c9e37e0..bdc81d34 100644
--- a/src/views/enm_pack/report.vue
+++ b/src/views/enm_pack/report.vue
@@ -225,7 +225,7 @@
page:0
},
query: {
- mgroup:'3346491835287007232',
+ mgroup:'3347217757455728640',
},
tableDatas:[
['产量','总产量(t)',0,0,0,0,0,0,0,0],
@@ -304,7 +304,8 @@
mounted() {
function precen(a,b){
if(b!==0&&b!==null&&a!==null){
- return a/b
+ let precen = (a/b).toFixed(2)
+ return precen*100+'%'
}else{
return '/'
}
diff --git a/src/views/enm_pack/teamAnalysis.vue b/src/views/enm_pack/teamAnalysis.vue
index 92bd27dc..24d5f1c9 100644
--- a/src/views/enm_pack/teamAnalysis.vue
+++ b/src/views/enm_pack/teamAnalysis.vue
@@ -71,7 +71,7 @@
year_s:'',
page : 0,
type : 'month_st',
- mgroup:'3346491835287007232',
+ mgroup:'3347217757455728640',
},
tableDatas:[],
};
diff --git a/src/views/enm_pack/workshopAnalysis.vue b/src/views/enm_pack/workshopAnalysis.vue
index 5308db59..0a99866a 100644
--- a/src/views/enm_pack/workshopAnalysis.vue
+++ b/src/views/enm_pack/workshopAnalysis.vue
@@ -48,15 +48,16 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
+
+ |
+
+ ↑
+ ↓
+ ▲
+ ▼
+ {{item1}}
+
+ |
@@ -76,20 +77,11 @@
return {
chartShow: false,
myOption: null,
- timeStamp:0,
- listQuery:{
- belong_dept:'',
- task2__year:'',
- page:0
- },
query:{
- time:''
+ mgroup:'3347217757455728640',
},
- tableDatas:[
- {month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- ],
+ monthGoal:[],
+ tableDatas:[],
modelValue:true,
type:'hours',
title:'title',
@@ -100,9 +92,153 @@
};
},
mounted() {
+ let that = this;
+ var myDate = new Date();
+ let year = myDate.getFullYear();
+ that.query.year_s = year;
+ //月目标
+ let paramsGoal = {};
+ paramsGoal.page=0;
+ paramsGoal.mgroup=that.query.mgroup;
+ that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
+ if(ress.length>0){
+ let monthGoal = [];
+ ress.forEach(goal=>{
+ if(goal.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
+ monthGoal[0]=goal.goal_val;
+ monthGoal[1]=goal.goal_val_2;
+ monthGoal[2]=goal.goal_val_3;
+ monthGoal[3]=goal.goal_val_4;
+ monthGoal[4]=goal.goal_val_5;
+ monthGoal[5]=goal.goal_val_6;
+ monthGoal[6]=goal.goal_val_7;
+ monthGoal[7]=goal.goal_val_8;
+ monthGoal[8]=goal.goal_val_9;
+ monthGoal[9]=goal.goal_val_10;
+ monthGoal[10]=goal.goal_val_11;
+ monthGoal[11]=goal.goal_val_12;
+ monthGoal[12]=goal.goal_val_12;
+ that.monthGoal = monthGoal;
+ }
+ })
+ this.getData();
+ }else{
+ this.getData();
+ }
+ })
},
methods: {
-
+ // 动态绑定Class
+ bindClass(item,index){
+ let classInfo = { redColor: false, greenColor: false }
+ if(index==3||index==5){
+ if( typeof(item)=='number'){
+ if(item>0){
+ classInfo.greenColor = true;
+ classInfo.redColor = false;
+ }else if(item<0){
+ classInfo.redColor = true;
+ classInfo.greenColor = false
+ }
+ }
+ }
+ return classInfo
+ },
+ getData(){
+ let that = this;
+ let query0={};
+ query0.page = 0;
+ query0.type='month_s';
+ 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;
+ if(data0.length>0){
+ data0.forEach(item0 => {
+ //先按月份排序,再按班组排序
+ let ind0 = item0.month_s;
+ wrapArr0[ind0] = item0;
+ });
+ }
+ let query={};
+ query.page = 0;
+ query.type='month_s';
+ query.year_s = that.query.year_s;
+ query.mgroup=that.query.mgroup;
+ that.$API.enm.enstat.req(query).then((res) => {
+ let data = res;
+ if(data.length>0){
+ data.forEach(item => {
+ //先按月份排序,再按班组排序
+ let ind = item.month_s;
+ let arr = [];
+ let time = ''+item.year_s+'.'+item.month_s;
+ arr.push(time);
+ arr.push(item.elec_consume_unit);//当期值(KW·h/t)
+ arr[2] = that.monthGoal[ind]!==undefined?that.monthGoal[ind]:'/';
+ wrapArr[ind] = arr;
+ });
+ wrapArr.forEach((item,index)=>{
+ let arrs = [];
+ arrs[0]=item[0];
+ arrs[1]=item[1];
+ arrs[2]=item[2];
+ //目标值(KW·h/t)//需要接口获取
+ //当期与目标差值(KW·h/t)
+ let diff = 0;
+ if(item[2]!=='/'){
+ diff = item[1]-item[2];
+ }else{
+ diff = '/';
+ }
+ arrs[3]=diff;
+ //环期值(KW·h/t)上个月的值
+ let lastNum = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ lastNum = wrapArr[num].elec_consume_unit;
+ }else{
+ lastNum='/'
+ }
+ }else{
+ lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ }
+ arrs[4]=lastNum;
+ //当期与环期差值(KW·h/t)
+ let lastDiff = 0;
+
+ if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ lastDiff =arrs[1]- arrs[4];
+ }else{
+ lastDiff = '/';
+ }
+ arrs[5]=lastDiff;
+ //环比增长率(%)
+ let lastRate = 0;
+ if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ lastRate = (lastDiff/lastNum)*100;
+ }else{
+ lastRate = '/'
+ }
+ arrs[6]=lastRate;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate =0;
+ if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ }else{
+ sameRate='/';
+ }
+ arrs[7]=sameRate;
+ wrapArrs.push(arrs);
+ })
+ that.tableDatas = wrapArrs;
+ }else{
+ }
+ })
+ })
+ },
itemClick(type,item){
this.type=type;
this.asynDialog = true;
@@ -133,4 +269,12 @@
.printContainer{
width: 1075px;
}
+ .redColor{
+ font-weight: bold;
+ color: #ff0000;
+ }
+ .greenColor{
+ font-weight: bold;
+ color: #008000;
+ }
\ No newline at end of file
diff --git a/src/views/enm_rm/report.vue b/src/views/enm_rm/report.vue
index 45c4f4cc..1582a7e2 100644
--- a/src/views/enm_rm/report.vue
+++ b/src/views/enm_rm/report.vue
@@ -434,7 +434,8 @@
mounted() {
function precen(a,b){
if(b!==0&&b!==null&&a!==null){
- return a/b
+ let precen = (a/b).toFixed(2)
+ return precen*100+'%'
}else{
return '/'
}
@@ -573,6 +574,9 @@
if(res2.length>0){
let data2 = res2[0];
that.tableDatas[0][4]=data2.total_production;
+ if(that.tableDatas[0][4]>that.tableDatas[0][6]){
+ that.wraning = true;
+ }
that.tableDatas[0][7]=precen(that.tableDatas[0][4],that.tableDatas[0][6])
that.tableDatas[1][4]=data2.production_hour;
that.tableDatas[1][7]=precen(that.tableDatas[1][4],that.tableDatas[1][6])
diff --git a/src/views/enm_rm/teamAnalysis.vue b/src/views/enm_rm/teamAnalysis.vue
index a3fcb5e4..4a9a521b 100644
--- a/src/views/enm_rm/teamAnalysis.vue
+++ b/src/views/enm_rm/teamAnalysis.vue
@@ -2,12 +2,6 @@
-
-
-
\ No newline at end of file
diff --git a/src/views/enm_rm/workshopAnalysis.vue b/src/views/enm_rm/workshopAnalysis.vue
index 2d3dc457..580fb57e 100644
--- a/src/views/enm_rm/workshopAnalysis.vue
+++ b/src/views/enm_rm/workshopAnalysis.vue
@@ -48,15 +48,16 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
+
+ |
+
+ ↑
+ ↓
+ ▲
+ ▼
+ {{item1}}
+
+ |
@@ -76,20 +77,10 @@
return {
chartShow: false,
myOption: null,
- timeStamp:0,
- listQuery:{
- belong_dept:'',
- task2__year:'',
- page:0
- },
query:{
- time:''
+ mgroup:'3346520558031773696',
},
- tableDatas:[
- {month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- ],
+ tableDatas:[],
modelValue:true,
type:'hours',
title:'title',
@@ -97,12 +88,157 @@
showClose:true,
echartType:'line',
asynDialog:false,
+ monthGoal:[],
};
},
mounted() {
+ let that = this;
+ var myDate = new Date();
+ let year = myDate.getFullYear();
+ that.query.year_s = year;
+ //月目标
+ let paramsGoal = {};
+ paramsGoal.page=0;
+ paramsGoal.mgroup=that.query.mgroup;
+ that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
+ if(ress.length>0){
+ let monthGoal = [];
+ ress.forEach(goal=>{
+ if(goal.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
+ monthGoal[0]=goal.goal_val;
+ monthGoal[1]=goal.goal_val_2;
+ monthGoal[2]=goal.goal_val_3;
+ monthGoal[3]=goal.goal_val_4;
+ monthGoal[4]=goal.goal_val_5;
+ monthGoal[5]=goal.goal_val_6;
+ monthGoal[6]=goal.goal_val_7;
+ monthGoal[7]=goal.goal_val_8;
+ monthGoal[8]=goal.goal_val_9;
+ monthGoal[9]=goal.goal_val_10;
+ monthGoal[10]=goal.goal_val_11;
+ monthGoal[11]=goal.goal_val_12;
+ monthGoal[12]=goal.goal_val_12;
+ that.monthGoal = monthGoal;
+ }
+ })
+ this.getData();
+ }else{
+ this.getData();
+ }
+ })
},
methods: {
-
+ // 动态绑定Class
+ bindClass(item,index){
+ let classInfo = { redColor: false, greenColor: false }
+ if(index==3||index==5){
+ if( typeof(item)=='number'){
+ if(item>0){
+ classInfo.greenColor = true;
+ classInfo.redColor = false;
+ }else if(item<0){
+ classInfo.redColor = true;
+ classInfo.greenColor = false
+ }
+ }
+ }
+ return classInfo
+ },
+ getData(){
+ let that = this;
+ let query0={};
+ query0.page = 0;
+ query0.type='month_s';
+ 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;
+ if(data0.length>0){
+ data0.forEach(item0 => {
+ //先按月份排序,再按班组排序
+ let ind0 = item0.month_s;
+ wrapArr0[ind0] = item0;
+ });
+ }
+ let query={};
+ query.page = 0;
+ query.type='month_s';
+ query.year_s = that.query.year_s;
+ query.mgroup=that.query.mgroup;
+ that.$API.enm.enstat.req(query).then((res) => {
+ let data = res;
+ if(data.length>0){
+ data.forEach(item => {
+ //先按月份排序,再按班组排序
+ let ind = item.month_s;
+ let arr = [];
+ let time = ''+item.year_s+'.'+item.month_s;
+ arr.push(time);
+ arr.push(item.elec_consume_unit);//当期值(KW·h/t)
+ arr[2] = that.monthGoal[ind]!==undefined?that.monthGoal[ind]:'/';
+ wrapArr[ind] = arr;
+ });
+ wrapArr.forEach((item,index)=>{
+ let arrs = [];
+ arrs[0]=item[0];
+ arrs[1]=item[1];
+ arrs[2]=item[2];
+ //目标值(KW·h/t)//需要接口获取
+ //当期与目标差值(KW·h/t)
+ let diff = 0;
+ if(item[2]!=='/'){
+ diff = item[1]-item[2];
+ }else{
+ diff = '/';
+ }
+ arrs[3]=diff;
+ //环期值(KW·h/t)上个月的值
+ let lastNum = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ lastNum = wrapArr[num].elec_consume_unit;
+ }else{
+ lastNum='/'
+ }
+ }else{
+ lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ }
+ arrs[4]=lastNum;
+ //当期与环期差值(KW·h/t)
+ let lastDiff = 0;
+
+ if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ lastDiff =arrs[1]- arrs[4];
+ }else{
+ lastDiff = '/';
+ }
+ arrs[5]=lastDiff;
+ //环比增长率(%)
+ let lastRate = 0;
+ if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ lastRate = (lastDiff/lastNum)*100;
+ }else{
+ lastRate = '/'
+ }
+ arrs[6]=lastRate;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate =0;
+ if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ }else{
+ sameRate='/';
+ }
+ arrs[7]=sameRate;
+ wrapArrs.push(arrs);
+ })
+ that.tableDatas = wrapArrs;
+ }else{
+ }
+ })
+ })
+ },
itemClick(type,item){
this.type=type;
this.asynDialog = true;
@@ -133,4 +269,12 @@
.printContainer{
width: 1075px;
}
+ .redColor{
+ font-weight: bold;
+ color: #ff0000;
+ }
+ .greenColor{
+ font-weight: bold;
+ color: #008000;
+ }
\ No newline at end of file
diff --git a/src/views/enm_slag/handoverLog.vue b/src/views/enm_slag/handoverLog.vue
index 4257c66a..92289bcc 100644
--- a/src/views/enm_slag/handoverLog.vue
+++ b/src/views/enm_slag/handoverLog.vue
@@ -127,6 +127,7 @@
@@ -152,6 +153,7 @@
query: {
mgroup:'3346491835287007232',
},
+ deptId:'3345780809943797760',
query2: {},
dialog: {
save: false,
diff --git a/src/views/enm_slag/report.vue b/src/views/enm_slag/report.vue
index 8088d62e..7738bed7 100644
--- a/src/views/enm_slag/report.vue
+++ b/src/views/enm_slag/report.vue
@@ -330,7 +330,8 @@
mounted() {
function precen(a,b){
if(b!==0&&b!==null&&a!==null){
- return a/b
+ let precen = (a/b).toFixed(2)
+ return precen*100+'%'
}else{
return '/'
}
diff --git a/src/views/enm_slag/workshopAnalysis.vue b/src/views/enm_slag/workshopAnalysis.vue
index 77c4cf06..8b951f17 100644
--- a/src/views/enm_slag/workshopAnalysis.vue
+++ b/src/views/enm_slag/workshopAnalysis.vue
@@ -48,15 +48,16 @@
-
- | {{item.month}} |
- {{item.value1}} |
- {{item.value2}} |
- {{item.value3}} |
- {{item.value4}} |
- {{item.value5}} |
- {{item.value6}} |
- {{item.value7}} |
+
+ |
+
+ ↑
+ ↓
+ ▲
+ ▼
+ {{item1}}
+
+ |
@@ -76,20 +77,11 @@
return {
chartShow: false,
myOption: null,
- timeStamp:0,
- listQuery:{
- belong_dept:'',
- task2__year:'',
- page:0
- },
query:{
- time:''
+ mgroup:'3346491835287007232',
},
- tableDatas:[
- {month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- {month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
- ],
+ monthGoal:[],
+ tableDatas:[],
modelValue:true,
type:'hours',
title:'title',
@@ -100,9 +92,153 @@
};
},
mounted() {
+ let that = this;
+ var myDate = new Date();
+ let year = myDate.getFullYear();
+ that.query.year_s = year;
+ //月目标
+ let paramsGoal = {};
+ paramsGoal.page=0;
+ paramsGoal.mgroup=that.query.mgroup;
+ that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
+ if(ress.length>0){
+ let monthGoal = [];
+ ress.forEach(goal=>{
+ if(goal.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
+ monthGoal[0]=goal.goal_val;
+ monthGoal[1]=goal.goal_val_2;
+ monthGoal[2]=goal.goal_val_3;
+ monthGoal[3]=goal.goal_val_4;
+ monthGoal[4]=goal.goal_val_5;
+ monthGoal[5]=goal.goal_val_6;
+ monthGoal[6]=goal.goal_val_7;
+ monthGoal[7]=goal.goal_val_8;
+ monthGoal[8]=goal.goal_val_9;
+ monthGoal[9]=goal.goal_val_10;
+ monthGoal[10]=goal.goal_val_11;
+ monthGoal[11]=goal.goal_val_12;
+ monthGoal[12]=goal.goal_val_12;
+ that.monthGoal = monthGoal;
+ }
+ })
+ this.getData();
+ }else{
+ this.getData();
+ }
+ })
},
methods: {
-
+ // 动态绑定Class
+ bindClass(item,index){
+ let classInfo = { redColor: false, greenColor: false }
+ if(index==3||index==5){
+ if( typeof(item)=='number'){
+ if(item>0){
+ classInfo.greenColor = true;
+ classInfo.redColor = false;
+ }else if(item<0){
+ classInfo.redColor = true;
+ classInfo.greenColor = false
+ }
+ }
+ }
+ return classInfo
+ },
+ getData(){
+ let that = this;
+ let query0={};
+ query0.page = 0;
+ query0.type='month_s';
+ 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;
+ if(data0.length>0){
+ data0.forEach(item0 => {
+ //先按月份排序,再按班组排序
+ let ind0 = item0.month_s;
+ wrapArr0[ind0] = item0;
+ });
+ }
+ let query={};
+ query.page = 0;
+ query.type='month_s';
+ query.year_s = that.query.year_s;
+ query.mgroup=that.query.mgroup;
+ that.$API.enm.enstat.req(query).then((res) => {
+ let data = res;
+ if(data.length>0){
+ data.forEach(item => {
+ //先按月份排序,再按班组排序
+ let ind = item.month_s;
+ let arr = [];
+ let time = ''+item.year_s+'.'+item.month_s;
+ arr.push(time);
+ arr.push(item.elec_consume_unit);//当期值(KW·h/t)
+ arr[2] = that.monthGoal[ind]!==undefined?that.monthGoal[ind]:'/';
+ wrapArr[ind] = arr;
+ });
+ wrapArr.forEach((item,index)=>{
+ let arrs = [];
+ arrs[0]=item[0];
+ arrs[1]=item[1];
+ arrs[2]=item[2];
+ //目标值(KW·h/t)//需要接口获取
+ //当期与目标差值(KW·h/t)
+ let diff = 0;
+ if(item[2]!=='/'){
+ diff = item[1]-item[2];
+ }else{
+ diff = '/';
+ }
+ arrs[3]=diff;
+ //环期值(KW·h/t)上个月的值
+ let lastNum = 0;
+ if(index>1){
+ let num = index-1;
+ if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
+ lastNum = wrapArr[num].elec_consume_unit;
+ }else{
+ lastNum='/'
+ }
+ }else{
+ lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
+ }
+ arrs[4]=lastNum;
+ //当期与环期差值(KW·h/t)
+ let lastDiff = 0;
+
+ if(arrs[1]!=='/'&&arrs[4]!=='/'){
+ lastDiff =arrs[1]- arrs[4];
+ }else{
+ lastDiff = '/';
+ }
+ arrs[5]=lastDiff;
+ //环比增长率(%)
+ let lastRate = 0;
+ if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
+ lastRate = (lastDiff/lastNum)*100;
+ }else{
+ lastRate = '/'
+ }
+ arrs[6]=lastRate;
+ //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
+ let sameRate =0;
+ if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
+ sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
+ }else{
+ sameRate='/';
+ }
+ arrs[7]=sameRate;
+ wrapArrs.push(arrs);
+ })
+ that.tableDatas = wrapArrs;
+ }else{
+ }
+ })
+ })
+ },
itemClick(type,item){
this.type=type;
this.asynDialog = true;
@@ -133,4 +269,12 @@
.printContainer{
width: 1075px;
}
+ .redColor{
+ font-weight: bold;
+ color: #ff0000;
+ }
+ .greenColor{
+ font-weight: bold;
+ color: #008000;
+ }
\ No newline at end of file
diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue
index 473c1560..54fa1ddc 100644
--- a/src/views/login/components/passwordForm.vue
+++ b/src/views/login/components/passwordForm.vue
@@ -168,7 +168,7 @@ export default {
that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms));
debugger;
console.log(this.$TOOL.data.get('BASE_INFO').base.base_name)
- if(this.$TOOL.data.get('BASE_INFO').base.base_name=='托克逊能源管理平台'){//托克逊
+ if(this.$TOOL.data.get('BASE_INFO').base.base_name_short=='托克逊能管'){//托克逊
this.$router.replace({
path: "/dashboard_enm",
});
diff --git a/src/views/ungrouped/costing.vue b/src/views/ungrouped/costing.vue
index e60a63b1..e76a04f2 100644
--- a/src/views/ungrouped/costing.vue
+++ b/src/views/ungrouped/costing.vue
@@ -187,8 +187,13 @@
//获取工段列表
getMgroup(){
this.$API.mtm.mgroup.list.req({page:0}).then(res=>{
- this.mgroupOptions = res;
- this.query.mgroup = res[8].id;
+ res.forEach(item=>{
+ if(item.name!=='煤磨'&&item.name!=='水泥包装'){
+ this.mgroupOptions.push(item);
+ }
+ })
+ this.mgroupOptions = this.mgroupOptions.reverse();
+ this.query.mgroup = this.mgroupOptions[0].id;
this.tableName = '电石渣干粉核算'
})
},
diff --git a/src/views/ungrouped/electric.vue b/src/views/ungrouped/electric.vue
index 123500a9..112d918e 100644
--- a/src/views/ungrouped/electric.vue
+++ b/src/views/ungrouped/electric.vue
@@ -1,6 +1,21 @@
+
+
+ 导出xlsx
+
+ 打印
+
+
+
@@ -127,7 +142,11 @@
})
},
-
+ exportExcel() {
+ this.exportLoading = true;
+ this.$XLSX('#myTable', this.tableName)
+ this.exportLoading = false;
+ },
handlePrint() {
this.$PRINT('#myReport');
},
diff --git a/src/views/ungrouped/report.vue b/src/views/ungrouped/report.vue
index fa501f83..b14a1b9f 100644
--- a/src/views/ungrouped/report.vue
+++ b/src/views/ungrouped/report.vue
@@ -1,12 +1,46 @@
+
+
+
+
+
+
+ 导出xlsx
+
+ 打印
+
+
+
- | 全厂报表 |
+ 生产日报 |
+ 生产月报 |
| 序号 |
@@ -37,11 +71,14 @@
export default {
data() {
return {
- query:{
- year:'',
- month:'',
- days:'',
- },
+ type:'day',
+ options:[{
+ name:'生产日报',
+ id:'day'
+ },{
+ name:'生产月报',
+ id:'month'
+ }],
tableDatas:[
[1,'主机设备台产','立磨台产(t/h)',''],
[2,'主机设备台产','烘干破台产(t/h)'],
diff --git a/src/views/ungrouped/value.vue b/src/views/ungrouped/value.vue
index 7c69bcbe..bb46b75b 100644
--- a/src/views/ungrouped/value.vue
+++ b/src/views/ungrouped/value.vue
@@ -1,6 +1,20 @@
-
+
+
+ 导出xlsx
+
+ 打印
+
+
+
@@ -61,6 +75,14 @@
mounted() {
},
methods: {
+ exportExcel() {
+ this.exportLoading = true;
+ this.$XLSX('#myTable', this.tableName)
+ this.exportLoading = false;
+ },
+ handlePrint() {
+ this.$PRINT('#myReport');
+ },
}
};