2 lines
9.4 KiB
JavaScript
2 lines
9.4 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6ba2df64"],{4381:function(t,e,a){"use strict";a("d3b7"),a("caad"),a("2532"),a("d9e2");var i=a("4360"),r={inserted:function(t,e){var a=e.value,r=i["a"].getters&&i["a"].getters.butPermission;if(console.log(r,"roles"),!(a&&a instanceof Array&&a.length>0))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");var n=a,s=r.some((function(t){return n.includes(t)}));if(console.log(s,"hasPermission"),s)i["a"].state.user.permissionFlag[n]=!1;else{i["a"].state.user.permissionFlag[n]=!0,console.log(i["a"].state.user.permissionFlag[n],"permissionRoles");var o=document.createElement("div");o.style.cursor="not-allowed",o.style.display="inline-block",t.style.pointerEvents="none",t.parentNode.insertBefore(o,t),t.parentNode&&t.parentNode.removeChild(t),o.appendChild(t),console.log(t,"permissionRoles")}}},n=function(t){t.directive("permission",r)};window.Vue&&(window["permission"]=r,Vue.use(n)),r.install=n;e["a"]=r},"4b79":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"decorate"}),a("div",{staticClass:"top"},[a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[t._v(t._s(t.$t("alarm.alarmStatus")))])]),a("div",{staticClass:"echart",attrs:{id:"statusEchart"}})]),a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[t._v(t._s(t.$t("alarm.alarmLevelP")))])]),a("div",{staticClass:"echart",attrs:{id:"levelEchart"}})]),a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[t._v(t._s(t.$t("alarm.alarmLevelP")))])]),a("div",{staticClass:"echart",attrs:{id:"disEchart"}})])]),a("div",{staticClass:"bottom"},[a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[t._v(t._s(t.$t("alarm.alarmStatusD")))])]),a("div",{staticClass:"echart",attrs:{id:"statusDEchart"}})]),a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[t._v(t._s(t.$t("alarm.deviceAlarmLevelD")))])]),a("div",{staticClass:"echart",attrs:{id:"levelDEchart"}})])])])},r=[],n=a("2909"),s=(a("d81d"),a("99af"),a("9e04")),o=a("61f7"),l=a("4381"),c=a("313e"),u={directives:{permission:l["a"]},data:function(){return{}},created:function(){this.getList(),this.getAlarmDeviceTypeList()},watch:{arrayTime:function(t){this.listQuery.startTime=t&&t&&t[0],this.listQuery.endTime=t&&t&&t[1]}},filters:{filterNull:function(t){var e=Object(o["a"])(t);return e}},methods:{getList:function(){var t=this;Object(s["b"])().then((function(e){var a=e.data||[],i=a.map((function(e){return{name:t.$t("alarm.leve".concat(e.alarmLevel+1)),value:e.alarmTotal}})),r=["#EC6941","#FF9100","#FDF879"];t.getBarChert(i,r,"levelEchart")})),Object(s["d"])().then((function(e){var a=e.data||{},i=[{name:t.$t("alarm.processed")+t.$t("alarm.alarms"),value:a.handledCount},{name:t.$t("alarm.unprocessed")+t.$t("alarm.alarms"),value:a.untreatedCount}],r=["#01FFE9","#FDF879"];t.getBarChert(i,r,"statusEchart")})),Object(s["e"])().then((function(e){var a=e.data||[],i=a.map((function(t){return[t.typeName,t.level1Count,t.level2Count,t.level3Count]}));t.getBarsChert(i);var r=a.map((function(t){return t.typeName})),n=[{name:t.$t("alarm.leve1"),type:"bar",stack:"machine",barWidth:30,data:a.map((function(t){return t.level1Count}))},{name:t.$t("alarm.leve2"),type:"bar",stack:"machine",data:a.map((function(t){return t.level2Count}))},{name:t.$t("alarm.leve3"),type:"bar",stack:"machine",data:a.map((function(t){return t.level3Count}))}],s=["#EC6941","#FF9100","#FDF879"];t.getBChert(r,n,s,"levelDEchart")})),Object(s["f"])().then((function(e){var a=e.data||[],i=a.map((function(t){return t.typeName})),r=[{name:t.$t("alarm.processed"),type:"bar",stack:"machine",barWidth:30,data:a.map((function(t){return t.handledCount}))},{name:t.$t("alarm.unprocessed"),type:"bar",stack:"machine",data:a.map((function(t){return t.untreatedCount}))}],n=["#01FFE9","#FDF879"];t.getBChert(i,r,n,"statusDEchart")}))},getBarChert:function(t,e,a){var i=c["a"](document.getElementById(a)),r={title:{x:"center",y:"45%"},color:e,grid:{left:0},series:[{type:"pie",silent:!0,clockwise:!0,radius:["7%","8%"],center:["50%","50%"],label:{show:!1},labelLine:{show:!1},itemStyle:{color:"#00BFAD"},data:[0]},{name:"",roseType:!0,type:"pie",radius:["22%","60%"],center:["50%","50%"],label:{normal:{formatter:"{b|{b}}\n{c|{c}}{d| / {d}%}",rich:{icon:{fontSize:14},b:{fontSize:14,padding:[0,0,5,0],color:"#00BFAD"},d:{fontSize:14,padding:[0,0,0,0],color:"#DEFFFF"},c:{fontSize:14,padding:[0,0,0,0],color:"#DEFFFF"}}}},labelLine:{normal:{length:10,length2:25}},data:t}]};i.setOption(r,!0)},getBarsChert:function(t){var e=c["a"](document.getElementById("disEchart")),a={textStyle:{fontFamily:"Microsoft YaHei"},color:["#00BFAD","#F19149","#837CEC","#EC6941","#FFDD61","#F8B551","#4C8CEE","#CCE198","#7FD9FB","#73FFBE","#15C9C8","#03C9A9","#CFA972"],legend:{show:!0,orient:"vertical",left:"70%",align:"left",top:"middle",itemWidth:16,itemHeight:8,icon:"path://M150,171H250a50,50,0,0,1,0,100H150A50,50,0,0,1,150,171Z",textStyle:{fontSize:14,fontWeight:400,color:"#00BFAD"}},tooltip:{show:!0},polar:{radius:"62%",center:["35%","50%"]},angleAxis:{min:0,max:100,axisLabel:{show:!1}},radiusAxis:[{type:"category",axisLabel:{interval:0,fontSize:16,fontWeight:"bold",color:"#DEFFFF"},data:[this.$t("alarm.leve1"),this.$t("alarm.leve2"),this.$t("alarm.leve3")]}],dataset:[{source:[["level",this.$t("alarm.leve1"),this.$t("alarm.leve2"),this.$t("alarm.leve3")]].concat(Object(n["a"])(t))}],series:[{name:this.$t("alarm.leve1"),type:"pie",radius:["45%","60%"],center:["35%","50%"],z:0,label:{show:!1,position:"outside",fontFamily:"Microsoft YaHei",fontWeight:400,fontSize:16,color:"#DEFFFF"},labelLine:{show:!0},emphasis:{scale:!1,scaleSize:10,focus:"self"},datasetIndex:0,seriesLayoutBy:"column",encode:{itemName:0,value:1}},{name:this.$t("alarm.leve2"),type:"pie",radius:["25%","40%"],center:["35%","50%"],z:0,label:{show:!1},emphasis:{scale:!1,scaleSize:10,focus:"self"},datasetIndex:0,seriesLayoutBy:"column",encode:{itemName:0,value:2}},{name:this.$t("alarm.leve3"),type:"pie",radius:["5%","20%"],center:["35%","50%"],z:0,label:{show:!1},emphasis:{scale:!1,scaleSize:10,focus:"self"},datasetIndex:0,seriesLayoutBy:"column",encode:{itemName:0,value:3}}]};e.setOption(a,!0)},getBChert:function(t,e,a,i){var r=c["a"](document.getElementById(i)),n={title:{textStyle:{color:"#222"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},color:a,legend:{show:!0,top:"10%",right:"5%",icon:"rect",itemWidth:15,itemHeight:15,textStyle:{color:"#00BFAD",fontSize:14,padding:[0,8,0,8]}},grid:{top:"25%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:[{type:"category",axisLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)"}},axisLabel:{textStyle:{color:"#00BFAD",fontSize:12}},axisTick:{show:!1},data:t}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)",type:"soiled"}},axisLabel:{show:!0,textStyle:{color:"#00BFAD",fontSize:14}},axisTick:{show:!1}}],series:e};r.setOption(n,!0)}}},m=u,d=(a("f4b7"),a("2877")),f=Object(d["a"])(m,i,r,!1,null,"94da6194",null);e["default"]=f.exports},"61f7":function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return n}));a("ac1f"),a("00b4"),a("d9e2"),a("a9e3"),a("5319");function i(t,e,a){""===e?a(new Error("请输入手机号码")):/^[0-9-]+$/.test(e)?a():a(new Error("手机号码格式不对"))}function r(t){if(t||0===t){if(t.length>0){var e=t.replace(/(^\s*)|(\s*$)/g,"");return e||"--"}return t}return"--"}function n(t){if(!t)return"";var e=new Date(t),a=e.getFullYear(),i=e.getMonth()+1,r=e.getDate(),n=e.getHours(),o=e.getMinutes(),l=e.getSeconds();return a+"-"+s(i)+"-"+s(r)+"\n"+s(n)+":"+s(o)+":"+s(l)}function s(t){return t<10?"0"+t:t}},"9e04":function(t,e,a){"use strict";a.d(e,"g",(function(){return r})),a.d(e,"a",(function(){return n})),a.d(e,"c",(function(){return s})),a.d(e,"i",(function(){return o})),a.d(e,"j",(function(){return l})),a.d(e,"h",(function(){return c})),a.d(e,"b",(function(){return u})),a.d(e,"d",(function(){return m})),a.d(e,"e",(function(){return d})),a.d(e,"f",(function(){return f}));var i=a("b775");function r(t){return Object(i["a"])({url:"trajectory-service/deptAlarm/getTaskByAlarmId",method:"get",params:t})}function n(t){return Object(i["a"])({url:"alarm-service/alarm/clearAlarmStatus?alarmId="+t,method:"post"})}function s(t){return Object(i["a"])({url:"alarm-service/alarm/getAlarmList",method:"get",params:t})}function o(t){return Object(i["a"])({url:"alarm-service/alarm/getTipAlarmList",method:"get",params:t})}function l(t){return Object(i["a"])({url:"alarm-service/alarm/updateAlarmReadStatus",method:"post",params:t})}function c(t){return Object(i["a"])({url:"device-service/deviceLog/getDeviceLogList",method:"get",params:t})}function u(t){return Object(i["a"])({url:"alarm-service/statistics/getAlarmLevel",method:"get",params:t})}function m(t){return Object(i["a"])({url:"alarm-service/statistics/getAlarmStatus",method:"get",params:t})}function d(t){return Object(i["a"])({url:"alarm-service/statistics/getAlarmTypeLevel",method:"get",params:t})}function f(t){return Object(i["a"])({url:"alarm-service/statistics/getAlarmTypeStatus",method:"get",params:t})}},dab4:function(t,e,a){},f4b7:function(t,e,a){"use strict";a("dab4")}}]);
|
|
//# sourceMappingURL=chunk-6ba2df64.c35b0bf1.js.map
|