12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b5ccf4a"],{"20a5":function(e,t,a){"use strict";var r=a("1c8b"),o=a("3da3"),i=a("e1d9"),n=a("c7e6"),s=a("efe2"),p=1..toFixed,l=Math.floor,c=function(e,t,a){return 0===t?a:t%2===1?c(e,t-1,a*e):c(e*e,t/2,a)},d=function(e){var t=0,a=e;while(a>=4096)t+=12,a/=4096;while(a>=2)t+=1,a/=2;return t},m=p&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){p.call({})}));r({target:"Number",proto:!0,forced:m},{toFixed:function(e){var t,a,r,s,p=i(this),m=o(e),h=[0,0,0,0,0,0],u="",v="0",y=function(e,t){var a=-1,r=t;while(++a<6)r+=e*h[a],h[a]=r%1e7,r=l(r/1e7)},g=function(e){var t=6,a=0;while(--t>=0)a+=h[t],h[t]=l(a/e),a=a%e*1e7},b=function(){var e=6,t="";while(--e>=0)if(""!==t||0===e||0!==h[e]){var a=String(h[e]);t=""===t?a:t+n.call("0",7-a.length)+a}return t};if(m<0||m>20)throw RangeError("Incorrect fraction digits");if(p!=p)return"NaN";if(p<=-1e21||p>=1e21)return String(p);if(p<0&&(u="-",p=-p),p>1e-21)if(t=d(p*c(2,69,1))-69,a=t<0?p*c(2,-t,1):p/c(2,t,1),a*=4503599627370496,t=52-t,t>0){y(0,a),r=m;while(r>=7)y(1e7,0),r-=7;y(c(10,r,1),0),r=t-1;while(r>=23)g(1<<23),r-=23;g(1<<r),y(1,1),g(2),v=b()}else y(0,a),y(1<<-t,0),v=b()+n.call("0",m);return m>0?(s=v.length,v=u+(s<=m?"0."+n.call("0",m-s)+v:v.slice(0,s-m)+"."+v.slice(s-m))):v=u+v,v}})},"369d":function(e,t,a){"use strict";(function(e){a("053b"),a("20a5"),a("e35a"),a("0d7a");var r=a("b443"),o=a("0eaa"),i=a("ae8c"),n=a("fb72"),s=a("a417"),p=a("7e21");t["a"]={data:function(){return{reportModelType:"month",reportLabelType:"月报",month:"",year:"",monthReport:new Date,yearReport:new Date,projectNav:[],roadId:"",projectId:"",companyId:"",projectSelect:"",sideBarType:"off",keyword:"",reportList:[{label:"发/用电量报表",value:"power"},{label:"电流报表",value:"current"},{label:"温度报表",value:"temper"},{label:"功率报表",value:"capacity"},{label:"电压报表",value:"voltage"}],reportListEN:[{label:"Power Generation/Power Consumption Report",value:"power"},{label:"Current report",value:"current"},{label:"Temperature report",value:"temper"},{label:"Power report",value:"capacity"},{label:"Voltage report",value:"voltage"}],reportDropDownType:"power",tableList:[],powerTableList:[{prop:"number",label:"路灯编号"},{prop:"projectname",label:"项目名称"},{prop:"section",label:"路段"},{prop:"daygeneration",label:"当日发电量(kWh)"},{prop:"dayconsumption",label:"当日用电量(kWh)"},{prop:"monthgeneration",label:"当月发电量(kWh)"},{prop:"monthconsumption",label:"当月用电量(kWh)"},{prop:"yeargeneration",label:"当年发电量(kWh)"},{prop:"yearconsumption",label:"当年用电量(kWh)"},{prop:"totalgeneration",label:"累计发电量(kWh)"},{prop:"totalconsumption",label:"累计用电量(kWh)"},{prop:"updatetime",label:"数据更新时间"}],powerTableListEN:[{prop:"number",label:"Lamp number"},{prop:"projectname",label:"Project name"},{prop:"section",label:"Road"},{prop:"daygeneration",label:"Daily Power generation(kWh)"},{prop:"dayconsumption",label:"Day electricity consumption(kWh)"},{prop:"monthgeneration",label:"Monthly Power generation(kWh)"},{prop:"monthconsumption",label:"Monthly electricity consumption(kWh)"},{prop:"yeargeneration",label:"Year Power generation(kWh)"},{prop:"yearconsumption",label:"Year electricity consumptio(kWh)"},{prop:"totalgeneration",label:"Cumulative power generation(kWh)"},{prop:"totalconsumption",label:"Cumulative electricity consumption(kWh)"},{prop:"updatetime",label:"Update time"}],currentTableList:[{prop:"number",label:"路灯编号"},{prop:"projectname",label:"项目名称"},{prop:"section",label:"路段"},{prop:"daycharmaxcurrent",label:"当天充电最大电流(A)"},{prop:"daydischarmaxcurrent",label:"当天放电最大电流(A)"},{prop:"monthcharmaxcurrent",label:"当月充电最大电流(A)"},{prop:"monthdischarmaxcurrent",label:"当月放电最大电流(A)"},{prop:"yearcharmaxcurrent",label:"当年充电最大电流(A)"},{prop:"yeardischarmaxcurrent",label:"当年放电最大电流(A)"},{prop:"updatetime",label:"数据更新时间"}],currentTableListEN:[{prop:"number",label:"Lamp number"},{prop:"projectname",label:"Project name"},{prop:"section",label:"Road"},{prop:"daycharmaxcurrent",label:"Highest charging current(A)"},{prop:"daydischarmaxcurrent",label:"Highest discharging current(A)"},{prop:"monthcharmaxcurrent",label:"Month charging maximum current(A)"},{prop:"monthdischarmaxcurrent",label:"Current discharge maximum current(A)"},{prop:"yearcharmaxcurrent",label:"Current charging maximum current(A)"},{prop:"yeardischarmaxcurrent",label:"Current discharge maximum current(A)"},{prop:"updatetime",label:"Update time"}],capacityTableList:[{prop:"number",label:"路灯编号"},{prop:"projectname",label:"项目名称"},{prop:"section",label:"路段"},{prop:"daychargemaxpow",label:"当天充电最大功率(w)"},{prop:"daydischarmaxpow",label:"当天放电最大功率(w)"},{prop:"monthchargemaxpow",label:"当月充电最大功率(w)"},{prop:"monthdischarmaxpow",label:"当月放电最大功率(w)"},{prop:"yearchargemaxpow",label:"当年充电最大功率(w)"},{prop:"yeardischarmaxpow",label:"当年放电最大功率(w)"},{prop:"updatetime",label:"数据更新时间"}],capacityTableListEN:[{prop:"number",label:"Lamp number"},{prop:"projectname",label:"Project name"},{prop:"section",label:"Road"},{prop:"daychargemaxpow",label:"Charging maximum power(w)"},{prop:"daydischarmaxpow",label:"Discharging maximum power(w)"},{prop:"monthchargemaxpow",label:"Month charging maximum power(w)"},{prop:"monthdischarmaxpow",label:"Monthly discharge maximum power(w)"},{prop:"yearchargemaxpow",label:"Year charging maximum power(w)"},{prop:"yeardischarmaxpow",label:"Year discharge maximum powe(w)"},{prop:"updatetime",label:"Update time"}],voltageTableList:[{prop:"number",label:"路灯编号"},{prop:"projectname",label:"项目名称"},{prop:"section",label:"路段"},{prop:"voltagedaymin",label:"当天最低电压(V)"},{prop:"voltagedaymax",label:"当天最高电压(V)"},{prop:"monthvoltagedaymin",label:"当月最低电压(V)"},{prop:"monthvoltagedaymax",label:"当月最高电压(V)"},{prop:"yearvoltagedaymin",label:"当年最低电压(V)"},{prop:"yearvoltagedaymax",label:"当年最高电压(V)"},{prop:"updatetime",label:"数据更新时间"}],voltageTableListEN:[{prop:"number",label:"Lamp number"},{prop:"projectname",label:"Project name"},{prop:"section",label:"Road"},{prop:"voltagedaymin",label:"Day lowest voltage(V)"},{prop:"voltagedaymax",label:"Day highest voltage(V)"},{prop:"monthvoltagedaymin",label:"Month lowest voltage(V)"},{prop:"monthvoltagedaymax",label:"Month highest voltage(V)"},{prop:"yearvoltagedaymin",label:"Year lowest voltage(V)"},{prop:"yearvoltagedaymax",label:"Year highest voltage(V)"},{prop:"updatetime",label:"Update time"}],temperTableList:[{prop:"number",label:"路灯编号"},{prop:"projectname",label:"项目名称"},{prop:"section",label:"路段"},{prop:"daybattmintemper",label:"当天蓄电池最低温度(℃)"},{prop:"daybattmaxtemper",label:"当天蓄电池最高温度(℃)"},{prop:"monthbattmintemper",label:"当月蓄电池最低温度(℃)"},{prop:"monthbattmaxtemper",label:"当月蓄电池最高温度(℃)"},{prop:"yearbattmintemper",label:"当年蓄电池最低温度(℃)"},{prop:"yearbattmaxtemper",label:"当年蓄电池最高温度(℃)"},{prop:"updatetime",label:"数据更新时间"}],temperTableListEN:[{prop:"number",label:"Lamp number"},{prop:"projectname",label:"Project name"},{prop:"section",label:"Road"},{prop:"daybattmintemper",label:"Battery minimum temperature(℃)"},{prop:"daybattmaxtemper",label:"Battery highest temperature(℃)"},{prop:"monthbattmintemper",label:"Month Battery minimum temperature(℃)"},{prop:"monthbattmaxtemper",label:"Month Battery highest temperature(℃)"},{prop:"yearbattmintemper",label:"Year Battery highest temperature(℃)"},{prop:"yearbattmaxtemper",label:"Year Battery minimum temperature(℃)"},{prop:"updatetime",label:"Update time"}],tableData:[],report1:"",report2:"",multipleSelection:[],multipleSelectionHC:[],currentPage:1,pageSize:20,total:0,reportNavList:[{name:"柱状图"},{name:"列表"},{name:"折线图"}],reportNavListEN:[{name:"Histogram"},{name:"Lists"},{name:"line chart"}],reportNavName:"",reportType:"table",reportNav:"列表",reportTypeBt:"查看选中路灯",loading:{table:!1,exportExcel:!1,generationCapacity:!1,electricityConsumption:!1,current:!1,temper:!1,capacity:!1,voltage:!1},projectName:"",reportNavFunIsTrue:!0,currentType:"max",temperType:"max",capacityType:"max",voltageType:"max",powerData:{},currentData:{},temperData:{},capacityData:{},voltageData:{}}},components:{sideBarIdcol:n["a"]},computed:Object(o["a"])({},Object(i["b"])({token:"token",username:"username",client_key:"client_key",projectsId:"projectsId",version:"version",role:"role"})),mounted:function(){var e=new Date;this.tableList=this.powerTableList,1==this.version&&(this.reportNav="Lists",this.reportLabelType="Month report",this.reportTypeBt="See selected street lights",this.tableList=this.powerTableListEN),this.month=e.toDateString().split(" ")[1],this.year=e.getFullYear()},methods:{sideBarCompanyList:function(e,t,a){var r=this;s["a"].ajax_post(p["a"].project.projectNav,{username:this.username,client_key:this.client_key,token:this.token,type:t,keyword:e},{},(function(e){if(console.log(a),a)for(var o in e.data)e.data.length>0&&(r.projectId=e.data[0].id,r.$set(e.data[0],"isOpen",!0)),console.log(o);else if(0==t)for(var i in e.data)e.data.length>0&&(r.projectId=e.data[0].id,r.$set(e.data[0],"isOpen",!0)),console.log(i);r.projectNav=e.data}),this)},search:function(){var e=this;this.reportHome(this.currentPage,0,(function(t){e.tableData=t.data.list}))},exportExcel:function(){this.loading.exportExcel=!0,"table"==this.reportType?this.reportHome(this.currentPage,1,(function(){})):"report"==this.reportType&&this.reportData(1,1,(function(){}))},refresh:function(){var e=this;"table"==this.reportType?this.reportHome(this.currentPage,0,(function(t){e.tableData=t.data.list})):this.reportData(this.currentPage,0,(function(){}))},reportDateType:function(){this.$refs.inputRef.selectOption()},reportDate:function(){"month"==this.reportModelType?this.$refs.inputMonthRef.focus():this.$refs.inputYearRef.focus()},handleSelectionChange:function(e){this.multipleSelection=e},reportHome:function(t,a,r){var o=this;0==a&&(this.loading.table=!0),s["a"].ajax_post(p["a"].history.reportHome,{username:this.username,client_key:this.client_key,token:this.token,type:this.reportDropDownType,keyword:this.keyword,download:a,projectid:this.projectId,page:t,count:this.pageSize,section:this.roadId},{},(function(i){if(0==a)r&&(o.currentPage=t,o.total=i.data.total*o.pageSize,o.loading.table=!1,r(i));else if(1==a){o.loading.exportExcel=!1;var n=e("<form method='get'></form>");n.attr("action",i.data.path),e(document.body).append(n),n.submit()}}),this)},getProjectNav:function(e){var t=this;s["a"].ajax_post(p["a"].device.projectNav,{username:this.username,client_key:this.client_key,token:this.token},{},(function(a){t.projectNav=a.data;var o=window.localStorage,i=o.getItem("projectId");for(var n in t.companyId=o.getItem("companyId"),a.data){if(t.$set(a.data[n],"type","展开"),1==t.version&&t.$set(a.data[n],"type","Unfold"),a.data[n].project_list){var s,p=Object(r["a"])(a.data[n].project_list);try{for(p.s();!(s=p.n()).done;){var l=s.value;t.$set(l,"companyId",a.data[n].id)}}catch(h){p.e(h)}finally{p.f()}}if("false"!=t.companyId&&t.companyId){if(a.data[n].id==t.companyId){t.$set(a.data[n],"type","收起"),1==t.version&&t.$set(a.data[n],"type","Collapse"),t.projectId=i;var c,d=Object(r["a"])(a.data[n].project_list);try{for(d.s();!(c=d.n()).done;){var m=c.value;t.projectId==m.id&&(t.projectName=m.projectname)}}catch(h){d.e(h)}finally{d.f()}t.reportHome(1,0,(function(e){0==t.version?t.tableList=t.powerTableList:t.tableList=t.powerTableListEN,t.tableData=e.data.list}))}}else"默认"==e&&0==n&&(t.$set(a.data[n],"type","收起"),1==t.version&&t.$set(a.data[n],"type","Collapse"),a.data[n].project_list.length>0&&(t.companyId=a.data[n].project_list[0].companyId,t.projectId=a.data[n].project_list[0].id,t.projectName=a.data[n].project_list[0].projectname,t.reportHome(1,0,(function(e){t.tableList=t.powerTableList,1==t.version&&(t.tableList=t.powerTableListEN),t.tableData=e.data.list}))))}}),this)},sideBarIsOn:function(){"table"!=this.reportType&&"on"!=this.sideBarType||("on"==this.sideBarType?(this.sideBarType="off",document.getElementsByClassName("sideBar")[0]&&document.getElementsByClassName("sideBar")[0].setAttribute("style","width: 0px ;transition:all 0.6s;")):(this.sideBarType="on",document.getElementsByClassName("sideBar")[0]&&document.getElementsByClassName("sideBar")[0].setAttribute("style","width: 300px ;transition:all 0.6s;")))},sideBarListIsOpen:function(e){"收起"==e.type?e.type="展开":"展开"==e.type&&(e.type="收起"),1==this.version&&("Collapse"==e.type?e.type="Unfold":e.type="Collapse")},projectSelectFun:function(e){var t=this,a=window.localStorage;a.setItem("projectId",e.id),a.setItem("companyId",e.companyId),this.companyId=e.companyId,this.projectId=e.id,this.projectName=e.projectname,e.isOpen?this.$set(e,"isOpen",!1):(this.$set(e,"isOpen",!0),this.sectionNavGet(this.projectId,e)),this.roadId="",this.reportHome(1,0,(function(e){t.tableData=e.data.list})),console.log(e)},roadSelectFun:function(e){var t=this,a=window.localStorage;d.id!=this.companyId&&(a.setItem("companyId",d.id),this.companyId=d.id),obj.id!=this.projectId&&(a.setItem("projectId",e.id),this.projectId=obj.id),this.roadId=e.value,this.reportHome(1,0,(function(e){t.tableData=e.data.list}))},sectionNavGet:function(e,t){var a=this;console.log(e,t),s["a"].ajax_post(p["a"].gisMap.section_nav,{username:this.username,client_key:this.client_key,token:this.token,projectid:e},{},(function(e){a.$set(t,"roadList",e.data.list),console.log(e)}),this)},tableRowClassName:function(e){var t=e.rowIndex;return t%2==0?"row_bg":""},handleSizeChange:function(e){var t=this;this.pageSize=e,"table"==this.reportType?this.reportHome(this.currentPage,0,(function(e){t.tableData=e.data.list})):this.reportData(this.currentPage,0,(function(){}))},handleCurrentChange:function(e){var t=this;"table"==this.reportType?this.reportHome(e,0,(function(e){t.tableData=e.data.list})):this.reportData(e,0,(function(){}))},reportNavFun:function(e){var t=this;if(!this.loading.table)if(this.reportNav=e,"列表"!=e&&"Lists"!=e)if(this.reportNavFunIsTrue){this.reportNavFunIsTrue=!1,this.loading.generationCapacity=!0,this.loading.electricityConsumption=!0,this.reportData(1,0,(function(e){t.powerData=e.data,t.loading.generationCapacity=!1,t.loading.electricityConsumption=!1,t.report(t.reportNav,"power",e.data)}),"power");for(var a=["current","temper","capacity","voltage"],r=function(){var e=i[o];t.loading[e]=!0,t.reportData(1,0,(function(a){t.loading[e]=!1,t[e+"Data"]=a.data,t.report(t.reportNav,e,a.data,t[e+"Type"])}),e)},o=0,i=a;o<i.length;o++)r()}else{var n=["current","temper","capacity","voltage"];this.report(this.reportNav,"power",this.powerData);for(var s=0,p=n;s<p.length;s++){var l=p[s];this.report(this.reportNav,l,this[l+"Data"],this[l+"Type"])}}else this.reportType="report",1==this.version?this.reportTypeBt="return":this.reportTypeBt="返回",this.reportData(1,0,(function(){}))},reportTypeFun:function(){var e=this;"table"==this.reportType?(this.currentPage=1,this.multipleSelectionHC=this.multipleSelection,0==this.multipleSelection.length?0==this.version?this.$message({showClose:!0,message:0==this.version?"请先勾选数据":"Please check the data first",type:"warning"}):this.$message({showClose:!0,message:"Please select the data first",type:"warning"}):this.multipleSelection.length>4?0==this.version?this.$message({showClose:!0,message:0==this.version?"最多勾选4个路灯":"A maximum of four Lamp",type:"warning"}):this.$message({showClose:!0,message:"Select up to four street lights",type:"warning"}):this.reportData(1,0,(function(){e.reportType="report",1==e.version?e.reportTypeBt="return":e.reportTypeBt="返回"}))):(this.reportType="table",this.reportNav="列表",1==this.version&&(this.reportNav="Lists"),this.reportTypeBt="查看选中路灯",1==this.version&&(this.reportTypeBt="See selected street lights"),this.currentPage=1,this.reportHome(this.currentPage,0,(function(t){e.tableData=t.data.list})),this.reportNavFunIsTrue=!0)},reportData:function(t,a,o,i){var n=this;i||(i=this.reportDropDownType);var l,c="",d=Object(r["a"])(this.multipleSelectionHC);try{for(d.s();!(l=d.n()).done;){var m=l.value;""==c?c=m.id:c+=","+m.id}}catch(u){d.e(u)}finally{d.f()}var h="";h="month"==this.reportModelType?this.monthReport.getFullYear()+"-"+(this.monthReport.getMonth()+1):this.yearReport.getFullYear(),0==a&&(this.loading.table=!0),s["a"].ajax_post(p["a"].history.reportData,{username:this.username,client_key:this.client_key,token:this.token,type:i,show_type:"lamp",item_ids:c,date_type:this.reportModelType,date:h,page:t,count:this.pageSize,download:a},{},(function(r){if(0==a){if(o){if("列表"==n.reportNav||"Lists"==a)n.tableData=r.data.list,n.currentPage=t,n.total=r.data.total*n.pageSize,1==n.version?n.tableList=n[n.reportDropDownType+"TableListEN"]:n.tableList=n[n.reportDropDownType+"TableList"],o(r);else{var i={data:{list:r.data.list,reportMin:r.data.report1,reportMax:r.data.report2}};o(i)}n.loading.table=!1}}else if(1==a){n.loading.exportExcel=!1;var s=e("<form method='get'></form>");s.attr("action",r.data.path),e(document.body).append(s),s.submit()}}),this)},report:function(e,t,a,o){this.$nextTick((function(){var i,n,s;function p(e){var p,l=[],c=[],d=[],m=[],h=[],u=[],v=[],y=0,g=0,b=0,f=["#15CA56","#F3BC12","#E36016","#EEA378"],x=["#48DE7E","#FCD458","#FC8440","#FFCAAC"],_=0;if("bar"==e)if("power"==t){for(var w in a.reportMin.series)d.push({type:e,color:f[_],name:a.reportMax.series[w].name,data:a.reportMax.series[w].data,stack:"x"}),c.push({type:e,color:x[_],name:a.reportMin.series[w].name,data:a.reportMin.series[w].data,stack:"y"}),_++,v.push({name:a.reportMax.series[w].name,icon:"circle"}),u.push({name:a.reportMin.series[w].name,icon:"circle"});for(var T=0;T<a.reportMax.series[0].data.length;T++){var C=0;for(var N in console.log(),a.reportMax.series)C+=a.reportMax.series[N].data[T];console.log(C,"-------1--------",T),C>b&&(b=C)}for(var k=0;k<a.reportMin.series[0].data.length;k++){var M=0;for(var D in a.reportMin.series)M+=a.reportMin.series[D].data[k];M>g&&(g=M)}}else{for(var j in a.reportMin.series)o&&"max"==o?l.push({type:e,color:f[_],name:a.reportMax.series[j].name,data:a.reportMax.series[j].data,stack:"x"}):"min"==o&&l.push({type:e,color:x[_],name:a.reportMin.series[j].name,data:a.reportMin.series[j].data,stack:"y"}),_++,h.push({name:a.reportMax.series[j].name,icon:"circle"}),h.push({name:a.reportMin.series[j].name,icon:"circle"});if("max"==o)for(var L=0;L<a.reportMax.series[0].data.length;L++){var I=0;for(var S in console.log(),a.reportMax.series)I+=a.reportMax.series[S].data[L];console.log(I,"-------1--------",L),I>y&&(y=I)}else for(var F=0;F<a.reportMin.series[0].data.length;F++){var B=0;for(var E in console.log(),a.reportMin.series)B+=a.reportMin.series[E].data[F];console.log(B,"-------1--------",F),B>y&&(y=B)}}else if("power"==t)for(var R in a.reportMin.series){for(var P in d.push({type:e,color:f[_],name:a.reportMax.series[R].name,data:a.reportMax.series[R].data,smooth:!0,smoothMonotone:"x"}),c.push({type:e,color:x[_],name:a.reportMin.series[R].name,data:a.reportMin.series[R].data,smooth:!0,smoothMonotone:"x"}),_++,a.reportMax.series[R].data)a.reportMax.series[R].data[P]>b&&(b=a.reportMax.series[R].data[P]);for(var $ in a.reportMin.series[R].data)a.reportMin.series[R].data[$]>g&&(g=a.reportMin.series[R].data[$]);v.push({name:a.reportMax.series[R].name,icon:"circle"}),u.push({name:a.reportMin.series[R].name,icon:"circle"})}else for(var W in a.reportMin.series){if(o&&"max"==o)for(var A in l.push({type:e,color:f[_],name:a.reportMax.series[W].name,data:a.reportMax.series[W].data,smooth:!0,smoothMonotone:"x"}),a.reportMax.series[W].data)a.reportMax.series[W].data[A]>y&&(y=a.reportMax.series[W].data[A]);else if("min"==o)for(var H in l.push({type:e,color:x[_],name:a.reportMin.series[W].name,data:a.reportMin.series[W].data,smooth:!0,smoothMonotone:"x"}),a.reportMin.series[W].data)a.reportMin.series[W].data[H]>y&&(y=a.reportMin.series[W].data[H]);_++,h.push({name:a.reportMax.series[W].name,icon:"circle"}),h.push({name:a.reportMin.series[W].name,icon:"circle"})}function O(e,t,a,o){p={backgroundColor:"#fff",tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#283b56"}},formatter:function(e){var t,a="<h1>"+e[0].name+"</h1></br>",o=Object(r["a"])(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;a+=i.marker+i.seriesName+" "+i.data+" "+unit+"</span></br>"}}catch(n){o.e(n)}finally{o.f()}return a},padding:[10,25]},legend:{data:a,type:"scroll",left:"4%",top:"5%",itemWidth:12,itemHeight:12,textStyle:{color:"rgba(102,102,102,1)",fontSize:14,fontWeight:500}},xAxis:{type:"category",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:12,fontWeight:500,color:"rgba(136,136,136,1)"},data:m},yAxis:[{axisLine:{show:!1},axisTick:{show:!1},type:"value",max:t,splitLine:{lineStyle:{type:"dashed"}},splitNumber:4,axisLabel:{formatter:"{value} ",fontSize:12,fontWeight:500,color:"rgba(136,136,136,1)"}}],series:o},e.setOption(p)}y=(y+y/10).toFixed(2),g=(g+g/10).toFixed(2),b=(b+b/10).toFixed(2),m=a.reportMin.categories,"power"==t?(O(n,g,u,c,tbType1),O(s,b,v,d,tbType2)):O(i,y,h,l,tbType)}"power"==t?(n=this.$echarts.init(document.getElementsByClassName("generation_capacity")[0]),s=this.$echarts.init(document.getElementsByClassName("electricity_consumption")[0])):i=this.$echarts.init(document.getElementsByClassName(t)[0]),"柱状图"==e||"Histogram"==e?p("bar"):"折线图"!=e&&"line chart"!=e||p("line")}))},reportDataCK:function(){var e=this;this.loading.generationCapacity=!0,this.loading.electricityConsumption=!0,this.reportData(1,0,(function(t){e.loading.generationCapacity=!1,e.loading.electricityConsumption=!1,e.powerData=t.data,e.report(e.reportNav,"power",t.data)}),"power");for(var t=["current","temper","capacity","voltage"],a=function(){var t=o[r];e.loading[t]=!0,e.reportData(1,0,(function(a){e.loading[t]=!1,e[t+"Data"]=a.data,e.report(e.reportNav,t,a.data,e[t+"Type"])}),t)},r=0,o=t;r<o.length;r++)a()},currentTypeFun:function(e){this.loading.current||(this.currentType=e,console.log(this.currentData,e,"-------"),this.report(this.reportNav,"current",this.currentData,e))},temperTypeFun:function(e){this.loading.temper||(this.temperType=e,this.report(this.reportNav,"temper",this.temperData,e))},capacityTypeFun:function(e){this.loading.capacity||(this.capacityType=e,this.report(this.reportNav,"capacity",this.capacityData,e))},voltageTypeFun:function(e){this.loading.voltage||(this.voltageType=e,this.report(this.reportNav,"voltage",this.voltageData,e))}},watch:{reportDropDownType:function(e){var t=this;"table"==this.reportType?this.reportHome(1,0,(function(a){1==t.version?t.tableList=t[e+"TableListEN"]:t.tableList=t[e+"TableList"],t.tableData=a.data.list})):this.reportData(1,0,(function(){}))},reportModelType:function(e){var t=this;"month"==e?(this.reportLabelType="月报",1==this.version&&(this.reportLabelType="Month report"),this.monthReport=this.yearReport):(this.yearReport=this.monthReport,this.reportLabelType="年报",1==this.version&&(this.reportLabelType="Year report")),this.loading.generationCapacity=!0,this.loading.electricityConsumption=!0,this.reportData(1,0,(function(e){t.loading.generationCapacity=!1,t.loading.electricityConsumption=!1,t.powerData=e.data,t.report(t.reportNav,"power",e.data)}),"power");for(var a=["current","temper","capacity","voltage"],r=function(){var e=i[o];t.loading[e]=!0,t.reportData(1,0,(function(a){t.loading[e]=!1,t[e+"Data"]=a.data,t.report(t.reportNav,e,a.data,t[e+"Type"])}),e)},o=0,i=a;o<i.length;o++)r()},monthReport:function(e){var t=this;this.month=e.toDateString().split(" ")[1],this.year=e.getFullYear(),this.loading.generationCapacity=!0,this.loading.electricityConsumption=!0,this.reportData(1,0,(function(e){t.loading.generationCapacity=!1,t.loading.electricityConsumption=!1,t.powerData=e.data,t.report(t.reportNav,"power",e.data)}),"power");for(var a=["current","temper","capacity","voltage"],r=function(){var e=i[o];t.loading[e]=!0,t.reportData(1,0,(function(a){t.loading[e]=!1,t[e+"Data"]=a.data,t.report(t.reportNav,e,a.data,t[e+"Type"])}),e)},o=0,i=a;o<i.length;o++)r()},yearReport:function(e){var t=this;this.month=e.toDateString().split(" ")[1],this.year=e.getFullYear(),this.loading.generationCapacity=!0,this.loading.electricityConsumption=!0,this.reportData(1,0,(function(e){t.loading.generationCapacity=!1,t.loading.electricityConsumption=!1,t.powerData=e.data,t.report(t.reportNav,"power",e.data)}),"power");for(var a=["current","temper","capacity","voltage"],r=function(){var e=i[o];t.loading[e]=!0,t.reportData(1,0,(function(a){t.loading[e]=!1,t[e+"Data"]=a.data,t.report(t.reportNav,e,a.data,t[e+"Type"])}),e)},o=0,i=a;o<i.length;o++)r()}}}}).call(this,a("a336"))},"8bdd":function(e,t,a){},c7f5:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"historical_data_mina"},[a("div",[a("div",{staticClass:"main_top_bg"}),a("side-bar-idcol",{staticClass:"side_bar_left",attrs:{sideBarList:e.projectNav,projectId:e.projectId,roadId:e.roadId,sideBarListIsOpen:e.sideBarListIsOpen,projectSelectFun:e.projectSelectFun,roadSelectFun:e.roadSelectFun,sideBarIsOn:e.sideBarIsOn,sideBarType:e.sideBarType,sideBarCompanyList:e.sideBarCompanyList}}),e.projectId?e._e():a("div",{staticStyle:{"text-align":"center","padding-top":"50px"}},[a("p",[e._v(e._s(0==e.version?"当前公司下无项目":"There is no project under the current company"))])]),e.projectId?a("div",{staticClass:"wrap"},[a("div",{staticClass:"main_top clearfix"},["report"!=e.reportType?a("div",{staticClass:"search_box"},[a("el-input",{staticClass:"search",attrs:{placeholder:0==e.version?"- 输入关键词进行搜索":"- Enter keywords to search"},on:{change:function(t){return e.search()}},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}},[a("template",{slot:"prepend"},[e._v(e._s(0==e.version?"搜索":"Search"))])],2)],1):e._e(),a("div",{staticClass:"button_box"},["table"==e.reportType||"report"==e.reportType&&("列表"==e.reportNav||"Lists"==e.reportNav)?a("el-select",{attrs:{placeholder:""},model:{value:e.reportDropDownType,callback:function(t){e.reportDropDownType=t},expression:"reportDropDownType"}},e._l(e.reportListEN,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e(),"report"==e.reportType&&"列表"!=e.reportNav&&"Lists"!=e.reportNav?a("div",{staticClass:"monthly_report"},[a("p",[a("span",[a("span",{on:{click:function(t){return e.reportDateType()}}},[e._v(e._s(e.reportLabelType)+" ")]),a("span",{on:{click:function(t){return e.reportDate()}}},["month"==e.reportModelType?a("span",[e._v(e._s(e.month))]):e._e(),e._v(" "+e._s(e.year)+" ")])]),a("span",{on:{click:function(t){return e.reportDataCK()}}},[e._v(e._s(0==e.version?"查看":"See")),a("i",{staticClass:"el-icon-arrow-right"})]),a("el-select",{ref:"inputRef",model:{value:e.reportModelType,callback:function(t){e.reportModelType=t},expression:"reportModelType"}},[0==e.version?a("el-option",{key:"month",attrs:{label:"月报",value:"month"}}):e._e(),0==e.version?a("el-option",{key:"year",attrs:{label:"年报",value:"year"}}):e._e(),1==e.version?a("el-option",{key:"month",attrs:{label:"Month report",value:"month"}}):e._e(),1==e.version?a("el-option",{key:"year",attrs:{label:"Year report",value:"year"}}):e._e()],1),"month"==e.reportModelType?a("el-date-picker",{ref:"inputMonthRef",attrs:{type:"month",placeholder:0==e.version?"月":"Month"},model:{value:e.monthReport,callback:function(t){e.monthReport=t},expression:"monthReport"}}):e._e(),"year"==e.reportModelType?a("el-date-picker",{ref:"inputYearRef",attrs:{type:"year",placeholder:0==e.version?"年":"Year"},model:{value:e.yearReport,callback:function(t){e.yearReport=t},expression:"yearReport"}}):e._e()],1)]):e._e(),"table"==e.reportType||"report"==e.reportType&&("列表"==e.reportNav||"Lists"==e.reportNav)?a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.exportExcel,expression:"loading.exportExcel"}],attrs:{round:""},on:{click:function(t){return e.exportExcel()}}},[e._v(e._s(0==e.version?"导出Excel":"Export Excel"))]):e._e(),"table"==e.reportType?a("el-button",{attrs:{round:"",icon:"el-icon-refresh"},on:{click:function(t){return e.refresh()}}},[e._v(e._s(0==e.version?"刷新":"Refresh"))]):e._e()],1),"report"==e.reportType&&0==e.version?a("ul",{staticClass:"report_nav clearfix",class:{report_nav_en:1==e.version}},e._l(e.reportNavList,(function(t){return a("li",{key:t.name,class:{report_nav_select:e.reportNav==t.name},on:{click:function(a){return e.reportNavFun(t.name)}}},[a("span",[e._v(e._s(t.name))])])})),0):e._e(),"report"==e.reportType&&1==e.version?a("ul",{staticClass:"report_nav clearfix",class:{report_nav_en:1==e.version}},e._l(e.reportNavListEN,(function(t){return a("li",{key:t.name,class:{report_nav_select:e.reportNav==t.name},on:{click:function(a){return e.reportNavFun(t.name)}}},[a("span",[e._v(e._s(t.name))])])})),0):e._e()]),a("div",{staticClass:"information_box"},["table"==e.reportType||"report"==e.reportType&&("列表"==e.reportNav||"Lists"==e.reportNav)?a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.table,expression:"loading.table"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.tableData,border:"",height:"calc(100% - 106px)","row-class-name":e.tableRowClassName},on:{"selection-change":e.handleSelectionChange}},["report"!=e.reportType?a("el-table-column",{attrs:{type:"selection","min-width":"50"}}):e._e(),e._l(e.tableList,(function(e){return a("el-table-column",{key:e.id,attrs:{"show-overflow-tooltip":!0,prop:e.prop,label:e.label,"min-width":9*(e.label.length+1)+15}})}))],2):e._e(),"report"==e.reportType&&"列表"!=e.reportNav&&"Lists"!=e.reportNav?a("div",{staticClass:"echarts_box"},[a("div",{staticClass:"box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"sapn"},[e._v(e._s(0==e.version?"发电量报表":"Generation capacity Report")+"(kWh)")])]),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.generationCapacity,expression:"loading.generationCapacity"}],staticClass:"echarts generation_capacity"})]),a("div",{staticClass:"box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"span"},[e._v(e._s(0==e.version?"用电量报表":"Electricity consumption Report")+"(kWh)")])]),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.electricityConsumption,expression:"loading.electricityConsumption"}],staticClass:"echarts electricity_consumption"})]),a("div",{staticClass:"box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"span"},[e._v(e._s(0==e.version?"电流报表":"Current Report")+"(A)")]),a("div",{staticClass:"right_box"},[a("div",{staticClass:"nav_box"},[a("div",{staticClass:"nav_li",class:{select_nav:"max"==e.currentType},on:{click:function(t){return e.currentTypeFun("max")}}},[a("span",[e._v(e._s(0==e.version?"放电最大值":"Maximum"))])]),a("div",{staticClass:"nav_li",class:{select_nav:"min"==e.currentType},on:{click:function(t){return e.currentTypeFun("min")}}},[a("span",[e._v(e._s(0==e.version?"充电最大值":"Minimum "))])])])])]),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.current,expression:"loading.current"}],staticClass:"echarts current"})]),a("div",{staticClass:"box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"span"},[e._v(e._s(0==e.version?"温度报表":"Temperature Report")+"(℃)")]),a("div",{staticClass:"right_box"},[a("div",{staticClass:"nav_box"},[a("div",{staticClass:"nav_li",class:{select_nav:"max"==e.temperType},on:{click:function(t){return e.temperTypeFun("max")}}},[a("span",[e._v(e._s(0==e.version?"最大值":"Maximum"))])]),a("div",{staticClass:"nav_li",class:{select_nav:"min"==e.temperType},on:{click:function(t){return e.temperTypeFun("min")}}},[a("span",[e._v(e._s(0==e.version?"最小值":"Minimum "))])])])])]),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.temper,expression:"loading.temper"}],staticClass:"echarts temper"})]),a("div",{staticClass:"box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"span"},[e._v(e._s(0==e.version?"功率报表":"Power Report")+"(W)")]),a("div",{staticClass:"right_box"},[a("div",{staticClass:"nav_box"},[a("div",{staticClass:"nav_li",class:{select_nav:"max"==e.capacityType},on:{click:function(t){return e.capacityTypeFun("max")}}},[a("span",[e._v(e._s(0==e.version?"放电最大值":"Maximum"))])]),a("div",{staticClass:"nav_li",class:{select_nav:"min"==e.capacityType},on:{click:function(t){return e.capacityTypeFun("min")}}},[a("span",[e._v(e._s(0==e.version?"充电最大值":"Minimum "))])])])])]),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.capacity,expression:"loading.capacity"}],staticClass:"echarts capacity"})]),a("div",{staticClass:"box"},[a("div",{staticClass:"title"},[a("span",{staticClass:"span"},[e._v(e._s(0==e.version?"电压报表":"Voltage Report")+"(V)")]),a("div",{staticClass:"right_box"},[a("div",{staticClass:"nav_box"},[a("div",{staticClass:"nav_li",class:{select_nav:"max"==e.voltageType},on:{click:function(t){return e.voltageTypeFun("max")}}},[a("span",[e._v(e._s(0==e.version?"最大值":"Maximum"))])]),a("div",{staticClass:"nav_li",class:{select_nav:"min"==e.voltageType},on:{click:function(t){return e.voltageTypeFun("min")}}},[a("span",[e._v(e._s(0==e.version?"最小值":"Minimum "))])])])])]),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading.voltage,expression:"loading.voltage"}],staticClass:"echarts voltage"})])]):e._e(),a("div",{staticClass:"paging_box"},[0!=e.version||"table"!=e.reportType&&("report"!=e.reportType||"列表"!=e.reportNav&&"Lists"!=e.reportNav)?e._e():a("el-button",{class:{report_bottton:"report"==e.reportType},attrs:{type:"primary",icon:"el-icon-check",round:""},on:{click:function(t){return e.reportTypeFun()}}},[e._v(e._s(e.reportTypeBt))]),1!=e.version||"table"!=e.reportType&&("report"!=e.reportType||"列表"!=e.reportNav&&"Lists"!=e.reportNav)?e._e():a("el-button",{class:{report_bottton:"report"==e.reportType},staticStyle:{width:"230px"},attrs:{type:"primary",icon:"el-icon-check",round:""},on:{click:function(t){return e.reportTypeFun()}}},[e._v(e._s(e.reportTypeBt))]),"table"==e.reportType||"report"==e.reportType&&("列表"==e.reportNav||"Lists"==e.reportNav)?a("el-pagination",{attrs:{"current-page":e.currentPage,"page-size":e.pageSize,"page-sizes":[20,40,60,100],layout:"sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t}}}):e._e()],1)],1)]):e._e(),a("button",{staticStyle:{display:"none"},attrs:{type:"button",id:"btn2"}})],1)])},o=[],i=a("369d"),n=i["a"],s=(a("e6ee"),a("4023")),p=Object(s["a"])(n,r,o,!1,null,null,null);t["default"]=p.exports},e1d9:function(e,t,a){var r=a("2118");e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},e6ee:function(e,t,a){"use strict";var r=a("8bdd"),o=a.n(r);o.a}}]);
- //# sourceMappingURL=chunk-2b5ccf4a.4579a31f.js.map
|