whychw
2021-05-24 8e85954e958bcb1bba811884dbc9cde65e94aa04
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7d9b04dc"],{"3a5e":function(t,i,e){"use strict";var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"loading_container flexR_center",class:{fixed:t.forBody}},[e("div",{ref:"wraper",staticClass:"wraper"}),e("div",{staticClass:"loading-mask"})])},a=[],n=(e("cb29"),e("fb6a"),function(){});function r(t){this.converter=t.converter,this.data=t.path||t.data,this.imageData=[],this.multiplier=t.multiplier||1,this.padding=t.padding||0,this.fps=t.fps||25,this.stepsPerFrame=~~t.stepsPerFrame||1,this.trailLength=t.trailLength||1,this.pointDistance=t.pointDistance||.05,this.domClass=t.domClass||"sonic",this.backgroundColor=t.backgroundColor||"rgba(0,0,0,0)",this.fillColor=t.fillColor,this.strokeColor=t.strokeColor,this.stepMethod="string"==typeof t.step?c[t.step]:t.step||c.square,this._setup=t.setup||n,this._teardown=t.teardown||n,this._preStep=t.preStep||n,this.pixelRatio=t.pixelRatio||null,this.width=t.width,this.height=t.height,this.fullWidth=this.width+2*this.padding,this.fullHeight=this.height+2*this.padding,this.domClass=t.domClass||"sonic",this.setup()}var o=r.argTypes={DIM:1,DEGREE:2,RADIUS:3,OTHER:0},l=r.argSignatures={arc:[1,1,3,2,2,0],bezier:[1,1,1,1,1,1,1,1],line:[1,1,1,1]},h=r.pathMethods={bezier:function(t,i,e,s,a,n,r,o,l){t=1-t;var h=1-t,c=t*t,f=h*h,u=c*t,d=3*c*h,p=3*t*f,v=f*h;return[u*i+d*n+p*o+v*s,u*e+d*r+p*l+v*a]},arc:function(t,i,e,s,a,n){var r=(n-a)*t+a,o=[Math.cos(r)*s+i,Math.sin(r)*s+e];return o.angle=r,o.t=t,o},line:function(t,i,e,s,a){return[(s-i)*t+i,(a-e)*t+e]}},c=r.stepMethods={square:function(t,i,e,s,a){this._.fillRect(t.x-3,t.y-3,6,6)},fader:function(t,i,e,s,a){this._.beginPath(),this._last&&this._.moveTo(this._last.x,this._last.y),this._.lineTo(t.x,t.y),this._.closePath(),this._.stroke(),this._last=t}};r.prototype={calculatePixelRatio:function(){var t=window.devicePixelRatio||1,i=this._.webkitBackingStorePixelRatio||this._.mozBackingStorePixelRatio||this._.msBackingStorePixelRatio||this._.oBackingStorePixelRatio||this._.backingStorePixelRatio||1;return t/i},setup:function(){var t,i,e,s,a=this.data;this.canvas=document.createElement("canvas"),this._=this.canvas.getContext("2d"),null==this.pixelRatio&&(this.pixelRatio=this.calculatePixelRatio()),this.canvas.className=this.domClass,1!=this.pixelRatio?(this.canvas.style.height=this.fullHeight+"px",this.canvas.style.width=this.fullWidth+"px",this.fullHeight*=this.pixelRatio,this.fullWidth*=this.pixelRatio,this.canvas.height=this.fullHeight,this.canvas.width=this.fullWidth,this._.scale(this.pixelRatio,this.pixelRatio)):(this.canvas.height=this.fullHeight,this.canvas.width=this.fullWidth),this.points=[];for(var n=-1,r=a.length;++n<r;){if(t=a[n].slice(1),e=a[n][0],e in l)for(var c=-1,f=t.length;++c<f;){switch(i=l[e][c],s=t[c],i){case o.RADIUS:s*=this.multiplier;break;case o.DIM:s*=this.multiplier,s+=this.padding;break;case o.DEGREE:s*=Math.PI/180;break}t[c]=s}t.unshift(0);for(var u,d=this.pointDistance,p=d;p<=1;p+=d)p=Math.round(1*p/d)/(1/d),t[0]=p,u=h[e].apply(null,t),this.points.push({x:u[0],y:u[1],progress:p})}this.frame=0,this.converter&&this.converter.setup&&this.converter.setup(this)},prep:function(t){if(!(t in this.imageData)){this._.clearRect(0,0,this.fullWidth,this.fullHeight),this._.fillStyle=this.backgroundColor,this._.fillRect(0,0,this.fullWidth,this.fullHeight);var i,e,s,a,n=this.points,r=n.length;this.pointDistance;this._setup();for(var o=-1,l=r*this.trailLength;++o<l&&!this.stopped;)e=t+o,i=n[e]||n[e-r],i&&(this.alpha=Math.round(o/(l-1)*1e3)/1e3,this._.globalAlpha=this.alpha,this.fillColor&&(this._.fillStyle=this.fillColor),this.strokeColor&&(this._.strokeStyle=this.strokeColor),a=t/(this.points.length-1),s=o/(l-1),this._preStep(i,s,a),this.stepMethod(i,s,a));return this._teardown(),this.imageData[t]=this._.getImageData(0,0,this.fullWidth,this.fullWidth),!0}},draw:function(){this.prep(this.frame)||(this._.clearRect(0,0,this.fullWidth,this.fullWidth),this._.putImageData(this.imageData[this.frame],0,0)),this.converter&&this.converter.step&&this.converter.step(this),this.iterateFrame()||this.converter&&this.converter.teardown&&(this.converter.teardown(this),this.converter=null)},iterateFrame:function(){return this.frame+=this.stepsPerFrame,!(this.frame>=this.points.length)||(this.frame=0,!1)},play:function(){this.stopped=!1;var t=this;this.timer=setInterval((function(){t.draw()}),1e3/this.fps)},stop:function(){this.stopped=!0,this.timer&&clearInterval(this.timer)}};var f=r,u={width:100,height:100,stepsPerFrame:4,trailLength:1,pointDistance:.01,fps:25,fillColor:"#ff7b24",setup:function(){this._.lineWidth=10},step:function(t,i,e){var s=t.progress,a=360*s,n=Math.PI/180*a,r=Math.PI/180*(a-180),o=5*i;this._.fillRect(25*Math.cos(n)+(50-o/2),15*Math.sin(n)+(50-o/2),o,o),this._.fillStyle="#63D3FF",this._.fillRect(15*Math.cos(r)+(50-o/2),25*Math.sin(r)+(50-o/2),o,o),1==t.progress&&(this._.globalAlpha=e<.5?1-e:e,this._.fillStyle="#EEE",this._.beginPath(),this._.arc(50,50,5,0,360,0),this._.closePath(),this._.fill())},path:[["line",40,10,60,90]]},d={name:"Loading",props:{forBody:{type:Boolean,default:!1},show:{type:Boolean,default:!1}},data:function(){return{}},methods:{init:function(){var t=new f(u);this.$refs.wraper.appendChild(t.canvas),t.play()}},mounted:function(){this.init()},destroyed:function(){}},p=d,v=(e("f101"),e("2877")),g=Object(v["a"])(p,s,a,!1,null,"d59a481c",null);i["a"]=g.exports},"4bac":function(t,i,e){},"5692a":function(t,i,e){"use strict";var s=e("8c68"),a=e.n(s);a.a},"6f7d":function(t,i,e){"use strict";var s=e("aaa0"),a=e.n(s);a.a},"7f94":function(t,i,e){"use strict";e.r(i);var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{attrs:{id:"app"}},[e("div",{staticClass:"page-container"},[e("page-header"),e("page-nav"),e("div",{staticClass:"page-content"},[e("div",{staticClass:"page-content-container"},[e("div",{staticClass:"page-content-right"},[e("content-box",{attrs:{"title-left":!0}},[e("div",{staticClass:"whyc-breadcrumb",attrs:{slot:"title"},slot:"title"},[e("span",{staticClass:"icon"},[t._v("»")]),t._v("当前位置:"),e("span",{staticClass:"txt-bold"},[t._v(t._s(t.$store.getters.getCrumb))])]),e("div",{staticClass:"banner_right",attrs:{slot:"titleBarRight"},slot:"titleBarRight"},[t.showStatus()?e("div",{staticClass:"status flexR_center"},[t._v("通信状态: "),t._l(t.status,(function(t,i){return e("div",{key:i,class:["indicator",{status_normal:t,status_off:!t}]})}))],2):t._e()]),e("router-view",{key:t.$route.fullPath})],1)],1)])]),e("loading",{attrs:{"for-body":!0,show:t.showLoading}}),e("div",{},[e("scroll-ad",{attrs:{datalist:t.list}})],1)],1)])},a=[],n=(e("4160"),e("b64b"),e("4d63"),e("ac1f"),e("25f0"),e("159b"),e("36ad")),r=e("ce2f"),o=e("c770"),l=(e("7f69"),function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{ref:"root",staticClass:"contain"},[e("div",{staticClass:"inner"},[e("div",{ref:"move",staticClass:"wraper"},[e("ul",{ref:"con1",staticClass:"con1 anim clearfix"},[t._l(t.datalist,(function(i,s){return e("li",{key:"list1_"+s},[t._v(t._s(i.text))])})),t.datalist.length?t._e():e("li",[t._v(t._s(t.default_text))])],2),e("ul",{ref:"con2",staticClass:"con1 anim clearfix"},[t._l(t.datalist,(function(i,s){return e("li",{key:"list2_"+s},[t._v(t._s(i.text))])})),t.datalist.length?t._e():e("li",[t._v(t._s(t.default_text))])],2)])])])}),h=[],c=e("fbf4"),f=30,u=["con1","con2"],d={0:0,1:0},p=0,v={name:"ScrollAd",data:function(){return{remainder:0,timer:new c["a"],default_text:"暂无告警"}},props:{datalist:{type:Array,default:function(){return[]}}},mounted:function(){var t=this;this.move();var i=this.$refs.root;i.addEventListener("mouseenter",(function(){t.stop()})),i.addEventListener("mouseleave",(function(){t.timer.open()}))},updated:function(){},methods:{getWidth:function(){var t=this.$refs.root,i=t.offsetWidth;return i},move:function(){var t=this;this.timer.start((function(){t.scroll(),t.timer.open()}),1e3)},stop:function(){this.timer.stop()},positionReset:function(){var t=this,i=(p+1)%2;setTimeout((function(){t.$refs[u[i]].style.opacity=0,t.$refs[u[i]].style.zIndex=-1,d[i]=0,t.$refs[u[i]].style.transform="translateX(0)",t.$refs[u[i]].style.webkitTransform="translateX(0)"}),1e3)},scroll:function(){var t=(p+1)%2,i=this.$refs[u[p]],e=this.$refs[u[t]],s=this.$refs.root,a=i.offsetWidth,n=s.offsetWidth,r=Math.ceil(n/f),o=n+a,l=o%r;this.remainder=l,d[p]-=r,i.style.transform="translateX("+d[p]+"px)",i.style.webkitTransform="translateX("+d[p]+"px)",0==d[t]&&setTimeout((function(){e.style.opacity=1,e.style.zIndex=0}),1e3),a>n+5*r?Math.abs(d[p])>=a+r&&(d[t]-=r,e.style.transform="translateX("+d[t]+"px)",e.style.webkitTransform="translateX("+d[t]+"px)"):Math.abs(d[p])>=n+2*r&&(d[t]-=r,e.style.transform="translateX("+d[t]+"px)",e.style.webkitTransform="translateX("+d[t]+"px)"),Math.abs(d[p])>=o&&(p++,p%=2,this.positionReset())}},destroyed:function(){this.stop()}},g=v,m=(e("5692a"),e("2877")),_=Object(m["a"])(g,l,h,!1,null,"1e969808",null),w=_.exports,b=e("3a5e"),y={1:"electric_id",2:"electric_id",3:"motor_id",4:"water_id",5:"BattGroupId"},x={1001:"水冷负载1",1002:"水冷负载2",1003:"水冷负载3",1004:"水冷负载4",2001:"加载电机系统",4001:"1号2号大功率整流电源A套电源",4002:"1号2号大功率整流电源B套电源",4003:"1号2号大功率整流电源C套电源",4004:"1号2号大功率整流电源D套电源",5001:"2号水冷装置",5002:"3号水冷装置",5003:"1号水冷装置",6001:"3号大功率整流电源A机组电源",6002:"3号大功率整流电源B机组电源",1000004:"蓄电池组1#",1000005:"蓄电池组2#",1000006:"蓄电池组3#",1000007:"蓄电池组4#"},C=!1,k={name:"Main",components:{PageHeader:n["a"],PageNav:r["a"],ContentBox:o["a"],ScrollAd:w,Loading:b["a"]},data:function(){return{timer:new this.$common.Timeout,status:[],list:[],showLoading:!1}},methods:{showStatus:function(){var t=this.$route.path,i=/watercooling|load|rectifier|chargepower|motor/g;return i.test(t)},getConnect:function(){var t=this,i=this.$route.path,e=/watercooling|load|rectifier|chargepower|motor/g,s=e.test(i);if(!s)return!1;var a=RegExp.lastMatch;this.$api.common.getConnect().then((function(i){var e=JSON.parse(i.data.result);if(1==e.code){var s,n=e.data,r=[];switch(a){case"watercooling":s=/^50/,C=!0;break;case"load":s=/^10/,C=!1;break;case"rectifier":s=/^40/,C=!1;break;case"chargepower":C=!1,s=/^60/;break;case"motor":C=!1,s=/^20/;break}var o=[];n.forEach((function(t){if(C)switch(t.dev_id){case 5001:o[1]=t.connect_en;break;case 5002:o[2]=t.connect_en;break;case 5003:o[0]=t.connect_en;break}s.test(t.dev_id)&&r.push(t.connect_en)})),t.status=C?o:r}}))},loop:function(){var t=this;this.timer.start((function(){t.getConnect(),t.getAllRtAlarm(),t.timer.open()}),1e3)},getAllRtAlarm:function(){var t=this;this.$api.common.getAllRtAlarm().then((function(i){i=JSON.parse(i.data.result);var e=[];if(i.code){var s=i.data;Object.keys(s).forEach((function(t,i,a){var n=s[t];n.length&&n.forEach((function(i){var s=i[y[t]],a=x[s],n=i.alarm_name||i.alm_name;i["text"]=a+" - "+n,e.push(i)}))}))}t.list=e}))}},created:function(){var t=this;this.$event.$on("rootLoadingShow",(function(){t.showLoading=!0})),this.$event.$on("rootLoadingHide",(function(){t.showLoading=!1}))},mounted:function(){var t=this;this.loop(),this.$router.afterEach((function(i,e){t.loop()}))},destroyed:function(){this.timer.stop()}},R=k,S=(e("6f7d"),Object(m["a"])(R,s,a,!1,null,"5212e74f",null));i["default"]=S.exports},"81d5":function(t,i,e){"use strict";var s=e("7b0b"),a=e("23cb"),n=e("50c4");t.exports=function(t){var i=s(this),e=n(i.length),r=arguments.length,o=a(r>1?arguments[1]:void 0,e),l=r>2?arguments[2]:void 0,h=void 0===l?e:a(l,e);while(h>o)i[o++]=t;return i}},"8c68":function(t,i,e){},aaa0:function(t,i,e){},cb29:function(t,i,e){var s=e("23e7"),a=e("81d5"),n=e("44d2");s({target:"Array",proto:!0},{fill:a}),n("fill")},f101:function(t,i,e){"use strict";var s=e("4bac"),a=e.n(s);a.a},fb6a:function(t,i,e){"use strict";var s=e("23e7"),a=e("861d"),n=e("e8b5"),r=e("23cb"),o=e("50c4"),l=e("fc6a"),h=e("8418"),c=e("b622"),f=e("1dde"),u=e("ae40"),d=f("slice"),p=u("slice",{ACCESSORS:!0,0:0,1:2}),v=c("species"),g=[].slice,m=Math.max;s({target:"Array",proto:!0,forced:!d||!p},{slice:function(t,i){var e,s,c,f=l(this),u=o(f.length),d=r(t,u),p=r(void 0===i?u:i,u);if(n(f)&&(e=f.constructor,"function"!=typeof e||e!==Array&&!n(e.prototype)?a(e)&&(e=e[v],null===e&&(e=void 0)):e=void 0,e===Array||void 0===e))return g.call(f,d,p);for(s=new(void 0===e?Array:e)(m(p-d,0)),c=0;d<p;d++,c++)d in f&&h(s,c,f[d]);return s.length=c,s}})}}]);