Commit cc0bbc47 authored by 李苏's avatar 李苏 💬

首页调整弹出资源

parent 070e72db
...@@ -137,19 +137,19 @@ ...@@ -137,19 +137,19 @@
<div class="com-count-body" style=" height:calc(100% - 0px);overflow: hidden;"> <div class="com-count-body" style=" height:calc(100% - 0px);overflow: hidden;">
<!-- 标题--> <!-- 标题-->
<div class="lbbt" style="font-size: 13px;"> <div class="lbbt" style="font-size: 13px;">
<div class=" text-center " style="width: 15%;" > <div class=" text-center " style="width: 15%;">
资产IP 资产IP
</div> </div>
<div class=" text-center " style="width: 15%;"> <div class=" text-center " style="width: 15%;">
告警等级 告警等级
</div> </div>
<div class=" text-center " style="width: 15%;" > <div class=" text-center " style="width: 15%;">
告警状态 告警状态
</div> </div>
<div class=" text-center " style="width: 20%;" > <div class=" text-center " style="width: 20%;">
最新发现时间 最新发现时间
</div> </div>
<div class=" text-center " style="width: 35%;" > <div class=" text-center " style="width: 35%;">
告警内容 告警内容
</div> </div>
...@@ -288,19 +288,18 @@ ...@@ -288,19 +288,18 @@
}, },
data() { data() {
return { return {
aqts:0, aqts: 0,
/* 看板时间*/ /* 看板时间*/
newTime: '', newTime: '',
timer: null, timer: null,
timer1: null, timer1: null,
apiTimer:null, apiTimer: null,
ssList: [ ssList: [],
],
showList: [] showList: []
} }
}, },
mounted() { mounted() {
this.$nextTick(()=>{ this.$nextTick(() => {
document.getElementById("dpkb").addEventListener('dblclick', function(e) { document.getElementById("dpkb").addEventListener('dblclick', function(e) {
fullScreen(document.getElementById("dpkb")); fullScreen(document.getElementById("dpkb"));
}, false); }, false);
...@@ -352,7 +351,7 @@ ...@@ -352,7 +351,7 @@
this.qcbjtjChart.resize() this.qcbjtjChart.resize()
}, 1000) }, 1000)
/* 定时器*/ /* 定时器*/
this.apiTimer = setInterval(()=>{ this.apiTimer = setInterval(() => {
/* 获取各个系统的看板*/ /* 获取各个系统的看板*/
this.initDevCount() this.initDevCount()
/* 实时数据*/ /* 实时数据*/
...@@ -368,7 +367,7 @@ ...@@ -368,7 +367,7 @@
this.qcczl2Init(this.qcczl2Chart) this.qcczl2Init(this.qcczl2Chart)
this.qcbjtjInit(this.qcbjtjChart) this.qcbjtjInit(this.qcbjtjChart)
},1000*60*60*30) }, 1000 * 60 * 60 * 30)
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer) clearInterval(this.timer)
...@@ -376,52 +375,54 @@ ...@@ -376,52 +375,54 @@
clearInterval(this.apiTimer) clearInterval(this.apiTimer)
}, },
methods: { methods: {
initAqts(){ initAqts() {
this.$post('ksh/aqts').then(res=>{ this.$post('ksh/aqts').then(res => {
this.aqts = res.data.records||0 this.aqts = res.data.records || 0
}) })
}, },
initDevCount(){ initDevCount() {
this.$post('ksh/system/device/count',{}).then(res=>{ this.$post('ksh/system/device/count', {}).then(res => {
let records=res.data.records||[] let records = res.data.records || []
this.showList = records.map(item=>{ this.showList = records.map(item => {
return { return {
zsl:item.deviceCount, zsl: item.deviceCount,
ycsl:item.alarmCount||0, ycsl: item.alarmCount || 0,
name:item.name name: item.name
} }
}) })
}) })
}, },
initSsList(){ initSsList() {
this.$post('ksh/real/gj',{dateType:'D'}).then(res=>{ this.$post('ksh/real/gj', {
let records = res.data.records||[] dateType: 'D'
console.log(records,'sslist') }).then(res => {
this.ssList = records.map(item=>{ let records = res.data.records || []
return{ console.log(records, 'sslist')
alarmLevelName:item.alarmLevelName,//告警等级 this.ssList = records.map(item => {
assetIp:item.assetIp,//告警等级 return {
content:item.content,//告警等级 alarmLevelName: item.alarmLevelName, //告警等级
pubTime:item.pubTime,//首次发现时间 assetIp: item.assetIp, //告警等级
newTime:item.newTime,//最新发现时间 content: item.content, //告警等级
stateName:item.stateName//告警状态名称 pubTime: item.pubTime, //首次发现时间
newTime: item.newTime, //最新发现时间
stateName: item.stateName //告警状态名称
} }
}) })
}) })
}, },
wltpt(){ wltpt() {
window.open('/拓扑图.pdf') window.open('/蒲城清洁能源工控项目部署图.pdf')
}, },
toFullPage(url){ toFullPage(url) {
window.open(url) window.open(url)
}, },
qcbjtjInit(myChart) { qcbjtjInit(myChart) {
this.$post('ksh/all/alarm/level/count',{}).then(res=>{ this.$post('ksh/all/alarm/level/count', {}).then(res => {
let records = res.data.records let records = res.data.records
let nameList = records.map(item=>item.name) let nameList = records.map(item => item.name)
let countList = records.map(item=>item.count) let countList = records.map(item => item.count)
let option = { let option = {
color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e025", "#e646a6", "#8784e6"], color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e025", "#e646a6", "#8784e6"],
...@@ -492,10 +493,10 @@ ...@@ -492,10 +493,10 @@
}, },
qcczl2Init(myChart) { qcczl2Init(myChart) {
this.$post('ksh/all/cz/radio',{}).then(res=>{ this.$post('ksh/all/cz/radio', {}).then(res => {
let records = res.data.records||[] let records = res.data.records || []
let countList = records.map(item=>item.count) let countList = records.map(item => item.count)
let nameList = records.map(item=>item.name) let nameList = records.map(item => item.name)
let option = { let option = {
color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"], color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"],
tooltip: { tooltip: {
...@@ -566,15 +567,15 @@ ...@@ -566,15 +567,15 @@
}, },
qcczl1Init(myChart) { qcczl1Init(myChart) {
this.$post('ksh/all/cz/radio',{}).then(res=>{ this.$post('ksh/all/cz/radio', {}).then(res => {
let records = res.data.records||[] let records = res.data.records || []
let countList = records.map(item=>item.count) let countList = records.map(item => item.count)
let nameList = records.map(item=>item.name) let nameList = records.map(item => item.name)
let ratioList = records.map(item=>item.ratio) let ratioList = records.map(item => item.ratio)
let dataList = records.map(item=>{ let dataList = records.map(item => {
return{ return {
name:item.name, name: item.name,
value:item.count value: item.count
} }
}) })
...@@ -593,7 +594,7 @@ ...@@ -593,7 +594,7 @@
// }, // },
// ], // ],
color: ['#ee6666', '#fcd74f', '#3ba272' ], color: ['#ee6666', '#fcd74f', '#3ba272'],
tooltip: { tooltip: {
trigger: 'item' trigger: 'item'
}, },
...@@ -641,12 +642,12 @@ ...@@ -641,12 +642,12 @@
}, },
bjtjrInit(myChart) { bjtjrInit(myChart) {
this.$post('ksh/alarm/count',{ this.$post('ksh/alarm/count', {
dateType:'D' dateType: 'D'
}).then(res=>{ }).then(res => {
let records =res.data.records let records = res.data.records
let dateList =records.map(item=>item.date) let dateList = records.map(item => item.date)
let countList =records.map(item=>item.count) let countList = records.map(item => item.count)
let option = { let option = {
color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"], color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"],
tooltip: { tooltip: {
...@@ -708,7 +709,7 @@ ...@@ -708,7 +709,7 @@
}], }],
series: [{ series: [{
type: 'line', type: 'line',
data:countList, data: countList,
label: { label: {
color: '#fff', color: '#fff',
show: true, show: true,
...@@ -727,12 +728,12 @@ ...@@ -727,12 +728,12 @@
}, },
bjtjyInit(myChart) { bjtjyInit(myChart) {
this.$post('ksh/alarm/count',{ this.$post('ksh/alarm/count', {
dateType:'M' dateType: 'M'
}).then(res=>{ }).then(res => {
let records = res.data.records let records = res.data.records
let dateList = records.map(item=>item.date) let dateList = records.map(item => item.date)
let countList = records.map(item=>item.count) let countList = records.map(item => item.count)
let option = { let option = {
color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"], color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"],
...@@ -813,10 +814,12 @@ ...@@ -813,10 +814,12 @@
}, },
ypcInit(myChart) { ypcInit(myChart) {
this.$post('ksh/all/factory/alarm/pl',{dateType:'M'}).then(res=>{ this.$post('ksh/all/factory/alarm/pl', {
dateType: 'M'
}).then(res => {
let records = res.data.records let records = res.data.records
let systemNameList = records.map(item=>item.systemName) let systemNameList = records.map(item => item.systemName)
let countList = records.map(item=>item.count) let countList = records.map(item => item.count)
let option = { let option = {
color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"], color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"],
...@@ -862,7 +865,7 @@ ...@@ -862,7 +865,7 @@
show: true, show: true,
color: 'white', color: 'white',
interval: 0, // 确保所有标签都显示 interval: 0, // 确保所有标签都显示
rotate:8, rotate: 8,
fontSize: 10, fontSize: 10,
} }
}], }],
...@@ -892,10 +895,12 @@ ...@@ -892,10 +895,12 @@
/* 周频次*/ /* 周频次*/
zpcInit(myChart) { zpcInit(myChart) {
this.$post('ksh/all/factory/alarm/pl',{dateType:'W'}).then(res=>{ this.$post('ksh/all/factory/alarm/pl', {
dateType: 'W'
}).then(res => {
let records = res.data.records let records = res.data.records
let systemNameList = records.map(item=>item.systemName) let systemNameList = records.map(item => item.systemName)
let countList = records.map(item=>item.count) let countList = records.map(item => item.count)
let option = { let option = {
color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"], color: ["#15c9ff", "#748b89", "#e68642", "#e6b332", "#e6e143", "#e646a6", "#8784e6"],
...@@ -940,7 +945,7 @@ ...@@ -940,7 +945,7 @@
show: true, show: true,
color: 'white', color: 'white',
interval: 0, // 确保所有标签都显示 interval: 0, // 确保所有标签都显示
rotate:8, rotate: 8,
fontSize: 10, fontSize: 10,
} }
}], }],
...@@ -967,10 +972,10 @@ ...@@ -967,10 +972,10 @@
}, },
sbbjpcInit(myChart) { sbbjpcInit(myChart) {
this.$post('ksh/device/alarm/pc/top10',{}).then(res=>{ this.$post('ksh/device/alarm/pc/top10', {}).then(res => {
let records = res.data.records let records = res.data.records
let deviceNameList = records.map(item=>item.deviceName).reverse() let deviceNameList = records.map(item => item.deviceName).reverse()
let countList = records.map(item=>item.count).reverse() let countList = records.map(item => item.count).reverse()
/* */ /* */
var option = { var option = {
color: ["#36a5d8", "#15c9ff"], color: ["#36a5d8", "#15c9ff"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment