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

首页调整弹出资源

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