From 9c6fa00272adfeebe02a637d76bf2056ca48b23d Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 15 Aug 2023 14:12:59 +0800 Subject: [PATCH] =?UTF-8?q?fixd:=E6=8F=90=E4=BA=A48.10=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=88=E8=BF=98=E5=B7=AE=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E6=9D=A1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/enm.ico | Bin 0 -> 11862 bytes public/index.html | 4 +- src/App.vue | 1 + src/config/route.js | 30 +- src/views/enm_coal/handoverLog.vue | 2 + src/views/enm_coal/report.vue | 3 +- src/views/enm_coal/teamAnalysis.vue | 4 +- src/views/enm_coal/workshopAnalysis.vue | 188 +++++- src/views/enm_kiln/handoverLog.vue | 3 + src/views/enm_kiln/report.vue | 3 +- src/views/enm_kiln/teamAnalysis.vue | 6 +- src/views/enm_kiln/workshopAnalysis.vue | 629 ++++++++++++++++++-- src/views/enm_mill/handoverLog.vue | 2 + src/views/enm_mill/report.vue | 3 +- src/views/enm_mill/workshopAnalysis.vue | 290 +++++++-- src/views/enm_pack/handoverLog.vue | 4 +- src/views/enm_pack/report.vue | 5 +- src/views/enm_pack/teamAnalysis.vue | 2 +- src/views/enm_pack/workshopAnalysis.vue | 188 +++++- src/views/enm_rm/report.vue | 6 +- src/views/enm_rm/teamAnalysis.vue | 10 +- src/views/enm_rm/workshopAnalysis.vue | 188 +++++- src/views/enm_slag/handoverLog.vue | 2 + src/views/enm_slag/report.vue | 3 +- src/views/enm_slag/workshopAnalysis.vue | 188 +++++- src/views/login/components/passwordForm.vue | 2 +- src/views/ungrouped/costing.vue | 9 +- src/views/ungrouped/electric.vue | 21 +- src/views/ungrouped/report.vue | 49 +- src/views/ungrouped/value.vue | 24 +- 30 files changed, 1632 insertions(+), 237 deletions(-) create mode 100644 public/enm.ico diff --git a/public/enm.ico b/public/enm.ico new file mode 100644 index 0000000000000000000000000000000000000000..68e3d2ee91d7c2c0f64abe7bca56db3afd5965fe GIT binary patch literal 11862 zcmc(l30PBC7JyF(5SEevVGE0BRf>vIltmr)PKPQ~X{Ainac!-&I(862g9t%IK(x|L zW{Mx`6kA6+1rY&jRjOmvDz+|kzL|EE@td*E(rP>6l9!h^_dHA*!%g0MA)(>BIq#l( za_{-?dGBry02%okGZM&mf0#4^AOrwnNg6}aizJ~QKV@+MCzRcZS4j8@Q9)$pSXf#z z8yd8e;nFJ!aAjFMTwR{f2Z^+^bfnjnv}d2b7?%6n4}8*>ERhF>X(YHWXqq+(=I_mc zj?0avVx7PIn9QC%yHojx9<5pw`#Qr44WnxKjg#s zwG+msTrjLj1mjP_NbZ?+NqGNwvcq_KNEJC_)HRG zS)UDh!f4bc_bn&JaBZ?LoA7oc6MXE)7@A_~zoep)3SvWx2_&rAB;7*xQt8dOnBNtRYqBF1h&y2AZL) zE?!QBjY52;^7cyL-d_q#-Y61F7p(`@k#VhPq$fLe^G+t{s6Y%K%p=IGe16SZD>Obk zFbswtUJtiS3_|iVa?hTs0JeM@=<{4O{;Vf4ocH`Rz2?wuGFLFvXV5y1m=Alm^SXP) z;229z8Cmd_%!N83F6;91B$oSg$b6X$th48m?)l!E%=dp{LXMJq)W$eNV?>?*t5wyO zjFaNv*-tjY9cu=mJkBNL*)+bHNyZ;1#xkFbrMlr@%viQuA1pM^SlpwQyy1=C-&e#> znu45u-r!%o3{DF1*eb{I=Wrn~g=4{>b;ewRe5AitPVR3Qu=gt_?6B}SW65TD9aMI> zO{Vbi$r=YMZ22!%fBtpgb}w{JEOCEQ=Tjjx748;B2fKG6tz&`eT8RAt?nwMyv{E3=H+lh$*hU*uAfyuV-xW(DXQ8md}TJ zDJ=GENi2UD76qd%$1|zdj|@%vd0^}9E}FlN=mPR~?TPOXt_k@rwjApU^M`(>`o&0GmuPldGSh4*bny(J&$i3kE)S|`K?cu(0*9tf%#(yz3hl}C6;nDo@ zr*%_3@`|{hjSsKCdDkHx$~q^wwDpM0+t05@Lqsud2&8{n21YRqVr+2Cc9(+(tu2#I z=I-GUTz2TFv-l$FzwPo$Or2_~-&&$SCBK4wV*D3tGkG}7v~I^T@B8Guh0Yvj0$1&P z*Rp=v_0T9t!uw1tgOFYAZ{Px169>@R!Z88oXlKPReD6R1W4))MwTrqH>99q}cPZub zCc_$9Tgo{FI%n}=J+}77w6^igp=*kp(I0k}>n%!1uCpQY-MvAr1XWaebHDx2=!i)_9x`V7im zy#1GKd0i-0Lgn~wr&S04mC8i3zfcBTL*;NTW`CzKsFj>|Q`RU_bYV4rx$3TYbf6G} zm~wmvN%L8%4rAG|5sa&<^YqGA))>(&{ydS!?)S{AE5-OP#zy4>>fdL>7gCw5?N1TL z^X24Rq%_cwRCkt9w{l#RgRuoK2n%`1&mq{#ZD@QT?n!YuJw2D7}!?lseqw$a1^Ru^Q&N>&tSY9ZR zv5R+Y)~m?-s0fjBiE4gv3CPH-=E4u2VKl6PPN{LTw#Vo43o@6qRP%V4#$@ufo zGe;SVLaRHzlB>fbT!?3`de(TzK3NW|wck?n$a%R0jO(gizON$VPn19`Y3CPar<{C& z`@!nva7ro@&HgNzOHP&hu;c!4oC)N|ANm@Pe|O>O<>h1)yVZ>!3e%l2mmoLJB~@>x zG9fK@*{~Kvk9(GX2Q^~CB)bl|sL)yGBIigf&u@~mGi!J2l_ZwdYgztXBH53*2*Yl* zgEbKEjI}I2mlsJa_iY=-3^;JZ5NffO)x3A@hDTKF5W9}JxbT&!P)d8w9MOGAIDcKE z<6~)B<0)rp3tWsKSbeBJM2Y!d5HZZSmTfCn8%BJ1S&wr`==S!@ZoVp&pc8#ykdXo} ziD3|9)3FJ-@^|KO>J~luUz_Lb{;y3RpqZQSkb`I0T=?)n0bH-w!qwiS#x-#DP@%_- zxMevzft)X!8|lRb*G7IU<8+)3D?8Aqm}CUT5n|!FAUy=Q?>4UXprb=&Ft+B4xZJI&80qoDe;bygw5F6guK3kt&pt zC}+p(jRR^VE>?$6WRGdqLY|MsUVUx1S$)O9T!dV*nmk+ RBzf%MB1@?w&0xM;{vY!?C3gS- literal 0 HcmV?d00001 diff --git a/public/index.html b/public/index.html index 881a32cb..ad21be8c 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - + <%= VUE_APP_TITLE %> @@ -32,7 +32,7 @@
<%= 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 @@