Files
starRiverProperty/frontend-source/decompiled/cwos-portal/static/js/17.cb196b09ae99ad63e7e7.js
T
反编译工作区 4f79e10bd6 chore: cleanup stray nested directories in frontend-source
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
2026-04-29 13:07:40 +08:00

1 line
17 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
webpackJsonp([17],{"+9FS":function(t,e,n){t.exports=n.p+"static/img/img_gjbackground@2x.5f3318e.png"},"+jKA":function(t,e,n){var a=n("YBwr");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("482dcfdc",a,!0)},"38PI":function(t,e,n){var a=n("5lzo");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("20be58ee",a,!0)},"5lzo":function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n.container[data-v-650c92f5] {\n width: 100%;\n height: 100%;\n}\n.container .yb-table[data-v-650c92f5] {\n height: calc(100% - 1rem);\n}\n.container .yb-table .table-point-warn[data-v-650c92f5] {\n width: 0.375rem;\n height: 0.375rem;\n border-radius: 100%;\n background: #fe9835;\n margin-right: 0.625rem;\n}\n.container .yb-table .table-header-warn[data-v-650c92f5] {\n width: 1rem;\n height: 1rem;\n fill: #f34a4a;\n margin-right: 0.5rem;\n}\n.container .yb-table .table-header-info[data-v-650c92f5] {\n width: 1rem;\n height: 1rem;\n margin-left: 0.5rem;\n}\n.container .yb-table .alarm-table-empty[data-v-650c92f5] {\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.container .yb-table .alarm-table-empty img[data-v-650c92f5] {\n width: 16.3125rem;\n height: 9.625rem;\n margin-bottom: 1.5rem;\n}\n",""])},"9Sev":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("Xxa5"),r=n.n(a),i=n("exGp"),o=n.n(i),s=n("MzsS"),l=n("fZjL"),c=n.n(l),f=n("BO1k"),d=n.n(f),u=n("bOdI"),m=n.n(u),h=n("XLwt"),p=n.n(h),v=n("yOY3"),b={name:"MonitorDevice",data:function(){return{chartOption:{tooltip:m()({trigger:"item",formatter:"{b} <br/>占比: {d}%"},"formatter",function(t){return t.name+"<br/>"+t.marker+"占比&nbsp;&nbsp;"+t.percent+"%"}),title:{text:"128",textStyle:{fontSize:22},subtext:"监控设备总数",subtextStyle:{fontSize:14},top:"43%",left:"29%",textAlign:"center"},legend:{orient:"vertical",selectedMode:!1,right:25,top:"center",itemGap:30,data:["在线","离线"],textStyle:{rich:{name:{color:"#27272B",fontSize:14},online:{color:"#25C093",fontSize:24},offline:{color:"#F34A4A",fontSize:24},percent:{color:"#6D707C",fontSize:14}}}},series:[{type:"pie",radius:["50%","70%"],center:["30%","50%"],avoidLabelOverlap:!1,itemStyle:{normal:{color:function(t){return["#4BE3B7","#F34A4A"][t.dataIndex]}}},label:{normal:{show:!1,position:"center"}},labelLine:{normal:{show:!1}},data:[]}]},charts:{},resizeObserver:null}},mounted:function(){var t=this;this.resizeObserver=new ResizeObserver(function(e){var n=!0,a=!1,r=void 0;try{for(var i,o=d()(e);!(n=(i=o.next()).done);n=!0){var s=i.value;t.charts&&t.charts[s.target.id]&&t.charts[s.target.id].resize()}}catch(t){a=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(a)throw r}}}),this.resizeObserver.observe(this.$refs.deviceChart),this.loadDeviceData()},methods:{loadDeviceData:function(){var t=this;return o()(r.a.mark(function e(){var n,a,i,o;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.a.get("/metrics/device/resource-all-count");case 3:(n=e.sent)&&n.data&&(a=n.data.online+n.data.offline,i=[{value:n.data.online,name:"在线"},{value:n.data.offline,name:"离线"}],o=function(t){var e=i.find(function(e){return e.name===t}).value,n="在线"===t?"online":"offline",r=a>0?(e/a*100).toFixed(2):0;return["{name|"+t+"}","{"+n+"|"+e+"} ","{percent|占比"+r+"%}"].join("")},t.chartOption.legend.formatter=o,t.chartOption.title.text=a,t.chartOption.series[0].data=i,t.charts[t.$refs.deviceChart.id]=p.a.init(t.$refs.deviceChart),t.charts[t.$refs.deviceChart.id].setOption(t.chartOption)),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}},e,t,[[0,7]])}))()}},destory:function(){var t=this;this.resizeObserver&&this.resizeObserver.disconnect(),c()(this.charts).map(function(e){t.charts[e].dispose()})}},x={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"container"},[e("div",{ref:"deviceChart",staticStyle:{height:"100%",width:"100%"},attrs:{id:"deviceChart"}})])},staticRenderFns:[]};var g=n("VU/8")(b,x,!1,function(t){n("+jKA")},"data-v-84704580",null).exports,y={name:"AlarmTrend",data:function(){return{option1:{grid:{top:"10%",bottom:"10%",left:"3%",right:"6%",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{type:"shadow",shadowStyle:{opacity:.95}}},xAxis:{type:"category",data:[],axisTick:{alignWithLabel:!0}},yAxis:{type:"value",name:"次数/日期",boundaryGap:!1,minInterval:1,splitLine:{show:!0,lineStyle:{type:"dashed",color:"#EEF1F6"}}},series:[{data:[],type:"bar",barWidth:"40%",itemStyle:{color:"#F34A4A"}}]},option2:{grid:{top:"10%",bottom:"10%",left:"3%",right:"6%",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{show:!1}}},xAxis:{type:"category",boundaryGap:!1,data:[],axisTick:{show:!1,alignWithLabel:!1}},yAxis:{type:"value",name:"次数/日期",boundaryGap:!1,minInterval:1,splitLine:{show:!0,lineStyle:{type:"dashed",color:"#EEF1F6"}}},series:[{data:[],type:"line",areaStyle:{color:new p.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#F34A4A"},{offset:1,color:"#FFFFFF"}])}}]},charts:{},resizeObserver:null}},mounted:function(){var t=this;this.resizeObserver=new ResizeObserver(function(e){var n=!0,a=!1,r=void 0;try{for(var i,o=d()(e);!(n=(i=o.next()).done);n=!0){var s=i.value;t.charts&&t.charts[s.target.id]&&t.charts[s.target.id].resize()}}catch(t){a=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(a)throw r}}}),this.resizeObserver.observe(this.$refs.alarmChart1),this.resizeObserver.observe(this.$refs.alarmChart2),this.getAlarmCount(),this.getAlarmDevice()},methods:{getAlarmCount:function(){var t=this;return o()(r.a.mark(function e(){var n,a,i;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.a.get("/metrics/device/resource-alert-count");case 3:(n=e.sent).data&&n.data.length>0&&(a=[],i=[],n.data.forEach(function(t){a.push(t.createTime),i.push(t.iCount)}),t.option1.xAxis.data=a,t.option1.series[0].data=i,t.charts[t.$refs.alarmChart1.id]=p.a.init(t.$refs.alarmChart1),t.charts[t.$refs.alarmChart1.id].setOption(t.option1)),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}},e,t,[[0,7]])}))()},getAlarmDevice:function(){var t=this;return o()(r.a.mark(function e(){var n,a,i;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.a.get("/metrics/device/resource-device-count");case 3:(n=e.sent).data&&n.data.length>0&&(a=[],i=[],n.data.forEach(function(t){a.push(t.createTime),i.push(t.iCount)}),t.option2.xAxis.data=a,t.option2.series[0].data=i,t.charts[t.$refs.alarmChart2.id]=p.a.init(t.$refs.alarmChart2),t.charts[t.$refs.alarmChart2.id].setOption(t.option2)),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}},e,t,[[0,7]])}))()}},destory:function(){var t=this;this.resizeObserver&&this.resizeObserver.disconnect(),c()(this.charts).map(function(e){t.charts[e].dispose()})}},w={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"container"},[e("div",{staticClass:"half-box-vertical"},[this._m(0),this._v(" "),e("div",{ref:"alarmChart1",staticClass:"chart-box",attrs:{id:"alarmChart1"}})]),this._v(" "),e("div",{staticClass:"half-box-vertical"},[this._m(1),this._v(" "),e("div",{ref:"alarmChart2",staticClass:"chart-box",attrs:{id:"alarmChart2"}})])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title-box"},[e("span",{staticClass:"title-icon"}),this._v("日累计告警警报次数(次数/日期)\n ")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title-box"},[e("span",{staticClass:"title-icon"}),this._v("日累计告警设备数(次数/日期)\n ")])}]};var C=n("VU/8")(y,w,!1,function(t){n("ZRKG")},"data-v-ff9ebea0",null).exports,_=n("M4fF"),k=n("PJh5"),z=n.n(k),E={name:"LatestAlarm",data:function(){return{alarmData:[]}},mounted:function(){this.getLatestAlarmList()},methods:{getLatestAlarmList:function(){var t=this;return o()(r.a.mark(function e(){var n;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.a.get("/metrics/device/resource-lastten",{params:{status:3}});case 3:(n=e.sent).data&&n.data.length>0&&(t.alarmData=n.data),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}},e,t,[[0,7]])}))()}},computed:{tableData:function(){return Object(_.cloneDeep)(this.alarmData).map(function(t){switch(null!==t.alertStartTime&&(t.alertStartTime=z()(t.alertStartTime).format("YYYY-MM-DD HH:mm:ss")),null!==t.alertEndTime&&(t.alertEndTime=z()(t.alertEndTime).format("YYYY-MM-DD HH:mm:ss")),t.status){case"3":t.alertEndTime?t.status="已解除":t.status="告警中";break;default:t.status="已解除"}return c()(t).forEach(function(e){null===t[e]&&(t[e]="-")}),t})}}},O={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("yb-table",{staticClass:"yb-table",attrs:{data:t.tableData}},[a("yb-table-column",{attrs:{prop:"alertStartTime",label:"告警时间"}}),t._v(" "),a("yb-table-column",{attrs:{prop:"resourceCode",label:"设备编号"}}),t._v(" "),a("yb-table-column",{attrs:{prop:"typeName",label:"设备类型"}}),t._v(" "),a("yb-table-column",{attrs:{prop:"alertTypeName",label:"警报类型"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.value;return["离线警报"===n?a("span",{staticClass:"table-point-warn"}):t._e(),t._v("\n "+t._s(n)+"\n ")]}}])}),t._v(" "),a("yb-table-column",{attrs:{prop:"status",label:"当前状态"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.value;return["告警中"===n?a("svg",{staticClass:"table-header-warn"},[a("use",{attrs:{"xlink:href":"#icon-warning1"}})]):t._e(),t._v("\n "+t._s(n)+"\n ")]}}])}),t._v(" "),t.tableData&&0!==t.tableData.length?t._e():a("div",{staticClass:"alarm-table-empty",attrs:{slot:"empty"},slot:"empty"},[a("img",{attrs:{src:n("hP0F"),alt:""}}),t._v(" "),a("div",[t._v("尚未触发过告警")])])],1)],1)},staticRenderFns:[]};var A=n("VU/8")(E,O,!1,function(t){n("38PI")},"data-v-650c92f5",null).exports,F={components:{SettingBox:s.a,MonitorDevice:g,AlarmTrend:C,LatestAlarm:A},data:function(){return{offlineCount:0}},mounted:function(){this.getDeviceOfflineCount()},methods:{getDeviceOfflineCount:function(){var t=this;return o()(r.a.mark(function e(){var n;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.a.get("/metrics/device/resource-offline-count");case 3:(n=e.sent)&&n.data&&(t.offlineCount=n.data.iCount),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}},e,t,[[0,7]])}))()}}},S={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"EquipmentMonitor"}},[n("div",{staticClass:"device-monitor-content"},[n("el-row",{staticClass:"row-content",attrs:{gutter:"24"}},[n("el-col",{staticClass:"col-full",attrs:{span:12}},[n("setting-box",{staticClass:"clear-margin-top",attrs:{title:"监控设备总数"}},[n("div",{staticClass:"setting-box-full"},[n("monitor-device")],1)])],1),t._v(" "),n("el-col",{staticClass:"col-full",attrs:{span:12}},[n("setting-box",{staticClass:"clear-margin-top",attrs:{title:"近7日告警趋势"}},[n("div",{staticClass:"setting-box-full"},[n("alarm-trend")],1)])],1)],1),t._v(" "),n("el-row",{staticClass:"row-content",attrs:{gutter:"24"}},[n("el-col",{staticClass:"col-full",attrs:{span:16}},[n("setting-box",[n("div",{staticClass:"setting-box-title"},[n("div",[t._v("\n 最近警报事件\n "),n("span",{staticClass:"subtitle"},[t._v("显示最近六条")])]),t._v(" "),n("div",{staticClass:"extra"},[n("router-link",{attrs:{to:"/alarmManagement/alarmList"}},[t._v("前往警报列表 >")])],1)]),t._v(" "),n("div",{staticClass:"setting-box-full"},[n("latest-alarm")],1)])],1),t._v(" "),n("el-col",{staticClass:"col-full",attrs:{span:8}},[n("setting-box",{staticClass:"alarm-statistics-box"},[n("div",{staticClass:"statistics-info"},[n("span",{staticClass:"total"},[t._v(t._s(t.offlineCount))]),t._v(" 次\n "),n("br"),t._v(" "),n("span",{staticClass:"desc"},[t._v("离线告警总次数")])])])],1)],1)],1)])},staticRenderFns:[]};var M=n("VU/8")(F,S,!1,function(t){n("pfrN")},null,null);e.default=M.exports},CTCy:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n.container[data-v-ff9ebea0] {\n width: 100%;\n height: 100%;\n}\n.container .half-box-vertical[data-v-ff9ebea0] {\n width: 100%;\n height: 50%;\n}\n.container .half-box-vertical .title-box[data-v-ff9ebea0] {\n font-size: 14px;\n height: 2rem;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.container .half-box-vertical .title-box .title-icon[data-v-ff9ebea0] {\n height: 14px;\n width: 2px;\n background: #3399ff;\n margin-right: 6px;\n display: inline-block;\n}\n.container .half-box-vertical .chart-box[data-v-ff9ebea0] {\n width: 100%;\n height: calc(100% - 2rem);\n}\n",""])},OUaN:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n#EquipmentMonitor {\n width: 100%;\n height: calc(100vh - 120px);\n background: #f4f5f6;\n color: #2c2d2f;\n font-size: 0.875rem;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n min-width: 75rem;\n min-height: 37.5rem;\n}\n#EquipmentMonitor .device-monitor-content {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 1rem 1.5rem 0;\n margin-bottom: 1rem;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n height: 0;\n overflow: auto;\n}\n#EquipmentMonitor .device-monitor-content .row-content {\n height: calc((100% - 1.5rem) / 2);\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full {\n height: 100%;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .setting-box {\n height: 100%;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .setting-box .setting-box-title {\n font-size: 1rem;\n height: 3.5rem;\n width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-weight: bold;\n border-bottom: 1px solid #e4e6e9;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .setting-box .setting-box-title .subtitle {\n font-size: 0.85rem;\n font-weight: normal;\n color: #6d707c;\n margin-left: 20px;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .setting-box .setting-box-title .extra {\n color: #3399ff;\n font-size: 0.85rem;\n font-weight: normal;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .setting-box .setting-box-full {\n height: calc(100% - 3.5rem);\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .alarm-statistics-box {\n height: 100%;\n width: 100%;\n background-image: url("+n("+9FS")+");\n background-repeat: no-repeat;\n background-size: cover;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .alarm-statistics-box .statistics-info {\n padding-top: 1.5rem;\n padding-left: 1rem;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .alarm-statistics-box .statistics-info .total {\n color: #f34a4a;\n font-size: 22px;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .alarm-statistics-box .statistics-info .desc {\n color: #2c2d2f;\n font-size: 14px;\n display: inline-block;\n margin-top: 10px;\n}\n#EquipmentMonitor .device-monitor-content .row-content .col-full .clear-margin-top {\n margin-top: 0;\n}\n",""])},YBwr:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n.container[data-v-84704580] {\n width: 100%;\n height: 100%;\n}\n",""])},ZRKG:function(t,e,n){var a=n("CTCy");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("c9642c28",a,!0)},pfrN:function(t,e,n){var a=n("OUaN");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("2625586d",a,!0)}});