(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-62611c3c"],{1148:function(t,e,a){"use strict";var n=a("a691"),r=a("1d80");t.exports="".repeat||function(t){var e=String(r(this)),a="",o=n(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(a+=e);return a}},"15cf":function(t,e,a){},"268b":function(t,e,a){},"36ad":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page-header"},[a("div",{staticClass:"page-header-left"},[a("div",{staticClass:"page-header-btn",on:{click:t.back}},[a("i",{staticClass:"el-icon-arrow-left"}),a("span",[t._v("返回")])])]),a("div",{staticClass:"page-header-content"},[t._v(" "+t._s(t.title)+" ")]),a("div",{staticClass:"page-header-right"},[a("div",{staticClass:"page-header-btn"},[t._t("right")],2)])])},r=[],o={props:{title:{type:String,default:"标题"}},methods:{back:function(){this.$router.back()}}},i=o,s=(a("6715"),a("2877")),l=Object(s["a"])(i,n,r,!1,null,"0ba23414",null);e["a"]=l.exports},"408a":function(t,e,a){var n=a("c6b6");t.exports=function(t){if("number"!=typeof t&&"Number"!=n(t))throw TypeError("Incorrect invocation");return+t}},6715:function(t,e,a){"use strict";var n=a("15cf"),r=a.n(n);r.a},a9e3:function(t,e,a){"use strict";var n=a("83ab"),r=a("da84"),o=a("94ca"),i=a("6eeb"),s=a("5135"),l=a("c6b6"),m=a("7156"),c=a("c04e"),u=a("d039"),h=a("7c73"),p=a("241c").f,f=a("06cf").f,v=a("9bf2").f,d=a("58a8").trim,b="Number",g=r[b],_=g.prototype,x=l(h(_))==b,S=function(t){var e,a,n,r,o,i,s,l,m=c(t,!1);if("string"==typeof m&&m.length>2)if(m=d(m),e=m.charCodeAt(0),43===e||45===e){if(a=m.charCodeAt(2),88===a||120===a)return NaN}else if(48===e){switch(m.charCodeAt(1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+m}for(o=m.slice(2),i=o.length,s=0;s<i;s++)if(l=o.charCodeAt(s),l<48||l>r)return NaN;return parseInt(o,n)}return+m};if(o(b,!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var w,N=function(t){var e=arguments.length<1?0:t,a=this;return a instanceof N&&(x?u((function(){_.valueOf.call(a)})):l(a)!=b)?m(new g(S(e)),a,N):S(e)},C=n?p(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),I=0;C.length>I;I++)s(g,w=C[I])&&!s(N,w)&&v(N,w,f(g,w));N.prototype=_,_.constructor=N,i(r,b,N)}},b465:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page"},[a("div",{staticClass:"page-header"},[a("page-header",{attrs:{title:t.getTitle}})],1),a("div",{ref:"pageContent",staticClass:"page-content"},[a("div",{ref:"rtState",staticClass:"tbl-container bg-white"},[a("div",{staticClass:"tbl-content"},[a("table",{staticClass:"bui-table"},[a("tbody",[a("tr",[a("td",[t._v("电池状态:"),a("span",{domProps:{textContent:t._s(t.getBattState)}})]),a("td",[t._v("在线电压:"),a("span",{domProps:{textContent:t._s(t.rtState.online_vol)}}),t._v("V")]),a("td",[t._v("组端电压:"),a("span",{domProps:{textContent:t._s(t.rtState.group_vol)}}),t._v("V")]),a("td",[t._v("组端电流:"),a("span",{domProps:{textContent:t._s(t.rtState.group_curr)}}),t._v("A")])]),a("tr",[a("td",[t._v("测试容量:"),a("span",{domProps:{textContent:t._s(t.rtState.batt_test_cap)}}),t._v("AH")]),a("td",[t._v("更新时间:"),a("span",{domProps:{textContent:t._s(t.rtState.rec_datetime)}})]),a("td",[t._v("测试时长:"),a("span",{domProps:{textContent:t._s(t.getTestTimeLong)}})])])])])])]),a("div",{staticClass:"tabs-container tab-pane20"},[a("el-tabs",{on:{"tab-click":t.tabClick},model:{value:t.tabsActiveName,callback:function(e){t.tabsActiveName=e},expression:"tabsActiveName"}},[a("el-tab-pane",{attrs:{label:"统计信息",name:"total"}},[a("el-table",{attrs:{data:t.tbls.totalInfo.data,"max-height":t.main.height+"px",stripe:"",border:"",size:"mini","header-row-class-name":"header-primary"}},[a("el-table-column",{attrs:{prop:"type",label:"类型",align:"center","min-width":"90"}}),a("el-table-column",{attrs:{prop:"high",label:"较高单体",align:"center"}}),a("el-table-column",{attrs:{prop:"low",label:"较低单体",align:"center"}}),a("el-table-column",{attrs:{prop:"avg",label:"平均值",align:"center","min-width":"100"}})],1)],1),a("el-tab-pane",{attrs:{label:"单体列表",name:"monList"}},[a("el-table",{attrs:{data:t.tbls.monList.data,"max-height":t.main.height+"px",stripe:"",border:"",size:"mini","header-row-class-name":"header-primary"}},[a("el-table-column",{attrs:{prop:"num1",label:"单体",align:"center","min-width":"70"}}),a("el-table-column",{attrs:{prop:"vol1",label:"电压(V)",align:"center"}}),a("el-table-column",{attrs:{prop:"res1",label:"内阻(mΩ)",align:"center"}}),a("el-table-column",{attrs:{prop:"tmp1",label:"温度(℃)",align:"center"}}),a("el-table-column",{attrs:{prop:"splite1",label:"",align:"center",width:"4"}}),a("el-table-column",{attrs:{prop:"num2",label:"单体",align:"center","min-width":"70"}}),a("el-table-column",{attrs:{prop:"vol2",label:"电压(V)",align:"center"}}),a("el-table-column",{attrs:{prop:"res2",label:"内阻(mΩ)",align:"center"}}),a("el-table-column",{attrs:{prop:"tmp2",label:"温度(℃)",align:"center"}}),a("el-table-column",{attrs:{prop:"splite2",label:"",align:"center",width:"4"}}),a("el-table-column",{attrs:{prop:"num3",label:"单体",align:"center","min-width":"70"}}),a("el-table-column",{attrs:{prop:"vol3",label:"电压(V)",align:"center"}}),a("el-table-column",{attrs:{prop:"res3",label:"内阻(mΩ)",align:"center"}}),a("el-table-column",{attrs:{prop:"tmp3",label:"温度(℃)",align:"center"}})],1)],1),a("el-tab-pane",{attrs:{label:"单体电压图",name:"monVol"}},[a("canvas",{ref:"monVol",style:t.getGraphStyle,attrs:{id:"monVol"}})]),a("el-tab-pane",{attrs:{label:"单体内阻图",name:"monRes"}},[a("canvas",{ref:"monRes",style:t.getGraphStyle,attrs:{id:"monRes"}})]),a("el-tab-pane",{attrs:{label:"单体温度图",name:"monTmp"}},[a("canvas",{ref:"monTmp",style:t.getGraphStyle,attrs:{id:"monTmp"}})])],1)],1)])])},r=[],o=(a("a9e3"),a("b680"),a("36ad")),i=a("a7fe"),s="",l="",m="",c={name:"pages-monitor-batt",components:{PageHeader:o["a"]},data:function(){var t=this.$router.currentRoute.params;return{title:"??",params:t,main:{width:100,height:100},tabsActiveName:"total",rtStateTime:new i["c"],rtState:{batt_test_type:"",group_vol:"",online_vol:"",group_curr:"",batt_test_cap:"",rec_datetime:"",batt_test_tlong:0},tbls:{timer:new i["c"],allData:[],monList:{data:[]},totalInfo:{data:[]}}}},methods:{setMain:function(){var t=this,e=this.$refs.pageContent.offsetWidth,a=this.$refs.pageContent.offsetHeight,n=this.$refs.rtState.offsetHeight;this.main.width=e,this.main.height=a-n-40,this.$nextTick((function(){s=new i["a"](t.$refs.monVol),l=new i["a"](t.$refs.monRes),m=new i["a"](t.$refs.monTmp),l.setColors({min:"green",max:"red"}),m.setColors({min:"green",max:"red"})}))},searchDevInfo:function(){var t=this,e={FBSDeviceId:this.params.devId};this.$axios({method:"post",url:"BattInfAction!serchByInfo",data:"json="+JSON.stringify(e)}).then((function(e){var a=JSON.parse(e.data.result);if(1==a.code){var n=a.data[0];t.title=n.StationName}}))},startSearchRtState:function(){var t=this;this.rtStateTime.start((function(){t.searchRtState()}),4e3)},searchRtState:function(){var t=this,e={BattGroupId:this.params.groupId};this.$axios({method:"post",url:"Batt_rtstateAction!serchByCondition",data:"json="+JSON.stringify(e)}).then((function(e){var a=JSON.parse(e.data.result);if(1==a.code){var n=a.data[0];n.batt_test_cap=Number(n.batt_test_cap.toFixed(1)),t.rtState=n}t.rtStateTime.open()})).catch((function(){t.rtStateTime.open()}))},tabClick:function(){this.setData()},startSearchRtData:function(){var t=this;this.tbls.timer.start((function(){t.searchRtData()}),4e3)},searchRtData:function(){var t=this,e=JSON.stringify({BattGroupId:this.params.groupId});this.$axios({method:"post",url:"Batt_rtdataAction!serchByCondition",data:"json="+e}).then((function(e){var a=JSON.parse(e.data.result),n=[];1==a.code&&(n=a.data),t.tbls.allData=n,t.setData(),t.tbls.timer.open()})).catch((function(){}))},setData:function(){this.setMonList(),this.setTotal(),this.setGraph()},setMonList:function(){if("monList"==this.tabsActiveName){for(var t=this.tbls.allData,e=[],a=0;a<t.length;a+=3){var n={},r=t[a];n.num1="#"+r.mon_num,n.vol1=r.mon_vol,n.res1=r.mon_res,n.tmp1=r.mon_tmp;var o=a+1;if(o==t.length){e.push(n);break}var i=t[a+1];n.num2="#"+i.mon_num,n.vol2=i.mon_vol,n.res2=i.mon_res,n.tmp2=i.mon_tmp;var s=a+2;if(s==t.length){e.push(n);break}var l=t[a+2];n.num3="#"+l.mon_num,n.vol3=l.mon_vol,n.res3=l.mon_res,n.tmp3=l.mon_tmp,e.push(n)}this.tbls.monList.data=e}},setTotal:function(){if("total"==this.tabsActiveName){for(var t=[{type:"电压",avg:"0V"},{type:"内阻",avg:"0mΩ"},{type:"温度",avg:"0℃"}],e=this.tbls.allData,a=e[0],n={max:{mon_num:[a.mon_num],value:a.mon_vol},min:{mon_num:[a.mon_num],value:a.mon_vol}},r={max:{mon_num:[a.mon_num],value:a.mon_res},min:{mon_num:[a.mon_num],value:a.mon_res}},o={max:{mon_num:[a.mon_num],value:a.mon_tmp},min:{mon_num:[a.mon_num],value:a.mon_tmp}},i={vol:a.mon_vol,res:a.mon_res,tmp:a.mon_tmp},s=e.length,l=1;l<s;l++){var m=e[l];this.setTotalMaxMin(n,m,"mon_vol"),this.setTotalMaxMin(r,m,"mon_res"),this.setTotalMaxMin(o,m,"mon_tmp"),i.vol+=m.mon_vol,i.res+=m.mon_res,i.tmp+=m.mon_tmp}var c=this.formatMaxMin(n,"V");t[0].high=c.max,t[0].low=c.min,t[0].avg=this.getAvg(i.vol,s,"V");var u=this.formatMaxMin(r,"mΩ");t[1].high=u.max,t[1].low=u.min,t[1].avg=this.getAvg(i.res,s,"mΩ");var h=this.formatMaxMin(o,"℃");t[2].high=h.max,t[2].low=h.min,t[2].avg=this.getAvg(i.tmp,s,"℃"),this.tbls.totalInfo.data=t}},setTotalMaxMin:function(t,e,a){e[a]>t.max.value?(t.max.mon_num=[e.mon_num],t.max.value=e[a]):e[a]==t.max.value&&t.max.mon_num.push(e.mon_num),e[a]<t.min.value?(t.min.mon_num=[e.mon_num],t.min.value=e[a]):e[a]==t.min.value&&t.min.mon_num.push(e.mon_num)},formatMaxMin:function(t,e){for(var a={max:"",min:""},n=t.max,r="#"+n.mon_num[0],o=1;o<n.mon_num.length;o++)r+=",#"+n.mon_num[o];a.max=r+":"+n.value+e;for(var i=t.min,s="#"+i.mon_num[0],l=1;l<i.mon_num.length;l++)s+=",#"+i.mon_num[l];return a.min=s+":"+i.value+e,a},getAvg:function(t,e,a){return Number((t/e).toFixed(2))+a},setGraph:function(){this.setMonVol(),this.setMonRes(),this.setMonTmp()},setMonVol:function(){if("monVol"==this.tabsActiveName){for(var t=this.tbls.allData,e=[],a=[],n=0;n<t.length;n++){var r=t[n];e.push("#"+r.mon_num),a.push({x:"#"+r.mon_num,y:r.mon_vol})}s.changeData(a)}},setMonRes:function(){if("monRes"==this.tabsActiveName){for(var t=this.tbls.allData,e=[],a=[],n=0;n<t.length;n++){var r=t[n];e.push("#"+r.mon_num),a.push({x:"#"+r.mon_num,y:r.mon_res})}l.changeData(a)}},setMonTmp:function(){if("monTmp"==this.tabsActiveName){for(var t=this.tbls.allData,e=[],a=[],n=0;n<t.length;n++){var r=t[n];e.push("#"+r.mon_num),a.push({x:"#"+r.mon_num,y:r.mon_tmp})}m.changeData(a)}}},computed:{getTitle:function(){return this.title+"-"+this.params.groupName+"-监测数据"},getTestTimeLong:function(){var t=this.rtState.batt_test_tlong;return Object(i["d"])(t)},getBattState:function(){var t=this.rtState.batt_state,e=Object(i["e"])(t);return e},getGraphStyle:function(){return{width:this.main.width+"px",height:this.main.height+"px"}}},activated:function(){this.setMain(),this.startSearchRtState(),this.startSearchRtData(),this.searchDevInfo()},deactivated:function(){s.destroy(),l.destroy(),m.destroy(),this.rtStateTime.stop(),this.tbls.timer.stop()}},u=c,h=(a("f072"),a("2877")),p=Object(h["a"])(u,n,r,!1,null,"c55d5634",null);e["default"]=p.exports},b680:function(t,e,a){"use strict";var n=a("23e7"),r=a("a691"),o=a("408a"),i=a("1148"),s=a("d039"),l=1..toFixed,m=Math.floor,c=function(t,e,a){return 0===e?a:e%2===1?c(t,e-1,a*t):c(t*t,e/2,a)},u=function(t){var e=0,a=t;while(a>=4096)e+=12,a/=4096;while(a>=2)e+=1,a/=2;return e},h=l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){l.call({})}));n({target:"Number",proto:!0,forced:h},{toFixed:function(t){var e,a,n,s,l=o(this),h=r(t),p=[0,0,0,0,0,0],f="",v="0",d=function(t,e){var a=-1,n=e;while(++a<6)n+=t*p[a],p[a]=n%1e7,n=m(n/1e7)},b=function(t){var e=6,a=0;while(--e>=0)a+=p[e],p[e]=m(a/t),a=a%t*1e7},g=function(){var t=6,e="";while(--t>=0)if(""!==e||0===t||0!==p[t]){var a=String(p[t]);e=""===e?a:e+i.call("0",7-a.length)+a}return e};if(h<0||h>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(f="-",l=-l),l>1e-21)if(e=u(l*c(2,69,1))-69,a=e<0?l*c(2,-e,1):l/c(2,e,1),a*=4503599627370496,e=52-e,e>0){d(0,a),n=h;while(n>=7)d(1e7,0),n-=7;d(c(10,n,1),0),n=e-1;while(n>=23)b(1<<23),n-=23;b(1<<n),d(1,1),b(2),v=g()}else d(0,a),d(1<<-e,0),v=g()+i.call("0",h);return h>0?(s=v.length,v=f+(s<=h?"0."+i.call("0",h-s)+v:v.slice(0,s-h)+"."+v.slice(s-h))):v=f+v,v}})},f072:function(t,e,a){"use strict";var n=a("268b"),r=a.n(n);r.a}}]);
|