EMS2.0-Documents/7.部署文档/Window安装/项目前端文件/IEMS/js/chunk-0d87864c.b5cef838.js

2 lines
3.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0d87864c"],{9128:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.alarmList.length>0?r("div",{staticClass:"alarm-container"},[r("div",{staticClass:"name"},[r("i",{staticClass:"iconfont icon-tongzhi"}),r("span",[t._v(t._s(t.$t("alarm.notification"))+"")])]),r("div",{ref:"msgBox",staticClass:"msg-box"},[r("div",{ref:"box",staticClass:"list"},t._l(t.alarmList,(function(e,a){return r("div",{key:a,ref:"list",refInFor:!0,staticClass:"msg"},[r("span",[t._v(" ["+t._s(t.getLevel(e.alarmLevel))+"] "+t._s(e.deviceName+": "+e.alarmInfo)+" ")])])})),0)])]):t._e()},i=[],n=(r("ac1f"),r("5319"),r("a9e3"),r("9e04")),s={name:"AppMain",computed:{cachedViews:function(){return this.$store.state.tagsView.cachedViews},key:function(){return this.$route.fullPath}},filters:{},data:function(){return{nowTime:null,disArr:[],alarmList:[]}},mounted:function(){var t=this;Object(n["i"])().then((function(e){t.alarmList=e.data.alarmList,t.$nextTick((function(){t.setAlarmList()}))}))},beforeDestroy:function(){clearInterval(this.nowTime),this.nowTime=null},methods:{getLevel:function(t){return 1==t?this.$t("alarm.leve1"):2==t?this.$t("alarm.leve2"):3==t?this.$t("alarm.leve3"):void 0},setAlarmList:function(){var t=this.$refs.list,e=this.$refs.msgBox,r=this.$refs.box;if(0!=this.alarmList.length&&!(e.offsetWidth>r.offsetWidth)){for(var a=this.alarmList.length,i=[],n=this.getMargin(t[0]),s=0;s<a;s++)i.push(t[s].clientWidth+n);this.disArr=i,this.moveLeft()}},getMargin:function(t){var e=window.getComputedStyle(t,null)["margin-right"];return e=e.replace("px",""),Number(e)},moveLeft:function(){var t=this,e=this.$refs.box,r=0;this.nowTime=setInterval((function(){r-=.5,Math.abs(r)>Math.abs(t.disArr[0])&&(t.disArr.push(t.disArr.shift()),t.alarmList.push(t.alarmList.shift()),r=0),e.style="transform: translateX(".concat(r,"px)")}),1e3/60)}}},c=s,u=(r("e4ed"),r("2877")),l=Object(u["a"])(c,a,i,!1,null,"5cace76c",null);e["default"]=l.exports},"9e04":function(t,e,r){"use strict";r.d(e,"g",(function(){return i})),r.d(e,"a",(function(){return n})),r.d(e,"c",(function(){return s})),r.d(e,"i",(function(){return c})),r.d(e,"j",(function(){return u})),r.d(e,"h",(function(){return l})),r.d(e,"b",(function(){return o})),r.d(e,"d",(function(){return m})),r.d(e,"e",(function(){return f})),r.d(e,"f",(function(){return d}));var a=r("b775");function i(t){return Object(a["a"])({url:"trajectory-service/deptAlarm/getTaskByAlarmId",method:"get",params:t})}function n(t){return Object(a["a"])({url:"alarm-service/alarm/clearAlarmStatus?alarmId="+t,method:"post"})}function s(t){return Object(a["a"])({url:"alarm-service/alarm/getAlarmList",method:"get",params:t})}function c(t){return Object(a["a"])({url:"alarm-service/alarm/getTipAlarmList",method:"get",params:t})}function u(t){return Object(a["a"])({url:"alarm-service/alarm/updateAlarmReadStatus",method:"post",params:t})}function l(t){return Object(a["a"])({url:"device-service/deviceLog/getDeviceLogList",method:"get",params:t})}function o(t){return Object(a["a"])({url:"alarm-service/statistics/getAlarmLevel",method:"get",params:t})}function m(t){return Object(a["a"])({url:"alarm-service/statistics/getAlarmStatus",method:"get",params:t})}function f(t){return Object(a["a"])({url:"alarm-service/statistics/getAlarmTypeLevel",method:"get",params:t})}function d(t){return Object(a["a"])({url:"alarm-service/statistics/getAlarmTypeStatus",method:"get",params:t})}},"9e9c":function(t,e,r){},e4ed:function(t,e,r){"use strict";r("9e9c")}}]);
//# sourceMappingURL=chunk-0d87864c.b5cef838.js.map