alarm模块bug修复
This commit is contained in:
parent
925f5cf937
commit
2d5e81291d
|
@ -105,22 +105,26 @@ export default {
|
|||
console.log("路由信息",this.menus);
|
||||
// this.initDefaultKeys(this.menus[0])
|
||||
// 将从缓存中取出openKeys
|
||||
const openKeys = window.sessionStorage.getItem('openKeys')
|
||||
// const openKeys = window.sessionStorage.getItem('openKeys')
|
||||
// console.log(openKeys);
|
||||
const selectedKeys = window.sessionStorage.getItem('currMenu')
|
||||
if (selectedKeys) {
|
||||
this.defaultSelectedKeys.push(selectedKeys)
|
||||
} else {
|
||||
|
||||
this.initDefaultKeys(this.menus[0])
|
||||
}
|
||||
if (openKeys) {
|
||||
// 存在即赋值
|
||||
this.defaultOpenKeys = JSON.parse(openKeys)
|
||||
}
|
||||
if (openKeys) {
|
||||
// 存在即赋值
|
||||
this.openKeys = JSON.parse(openKeys)
|
||||
}
|
||||
this.openKeys =this.defaultOpenKeys= this.menus.map(item => {
|
||||
return item.path
|
||||
})
|
||||
// if (openKeys) {
|
||||
// // 存在即赋值
|
||||
// this.defaultOpenKeys = JSON.parse(openKeys)
|
||||
// }
|
||||
// if (openKeys) {
|
||||
// // 存在即赋值
|
||||
// this.openKeys = JSON.parse(openKeys)
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
// 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数
|
||||
|
@ -135,6 +139,7 @@ export default {
|
|||
})
|
||||
},
|
||||
initDefaultKeys(data) {
|
||||
console.log("datadefaultOpenKeys",data);
|
||||
this.defaultOpenKeys.push(data.path)
|
||||
data.children.some((f) => {
|
||||
if (f.children) {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<a-col flex="380px">
|
||||
<span class="item-label">Cacl date</span>
|
||||
<a-range-picker
|
||||
:default-value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
|
||||
:value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
|
||||
@change="onRangeDateChange"
|
||||
/>
|
||||
</a-col>
|
||||
|
@ -46,8 +46,8 @@
|
|||
v-model="visible"
|
||||
@cancel="onCancel"
|
||||
>
|
||||
<a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
|
||||
<a-form-item label="Days">
|
||||
<a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 17 }">
|
||||
<a-form-item label="Cycle">
|
||||
<a-input-number
|
||||
v-decorator="[
|
||||
'days',
|
||||
|
@ -56,10 +56,12 @@
|
|||
initialVale: this.formVal.days
|
||||
}
|
||||
]"
|
||||
/>
|
||||
/>days
|
||||
</a-form-item>
|
||||
<a-form-item label="Index">
|
||||
<a-input-number
|
||||
:max="100"
|
||||
:min="1"
|
||||
v-decorator="[
|
||||
'index',
|
||||
{
|
||||
|
@ -67,7 +69,7 @@
|
|||
initialVale: this.formVal.index
|
||||
}
|
||||
]"
|
||||
/>
|
||||
/>%
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<template slot="footer">
|
||||
|
@ -92,7 +94,7 @@ const columns = [
|
|||
dataIndex: 'nuclide',
|
||||
// width: 200,
|
||||
},{
|
||||
title: 'VAL',
|
||||
title: 'VALUE',
|
||||
align: 'center',
|
||||
dataIndex: 'val',
|
||||
// width: 200,
|
||||
|
@ -102,7 +104,7 @@ const columns = [
|
|||
dataIndex: 'cycle',
|
||||
// width: 200,
|
||||
},{
|
||||
title: 'DATA SOURCE TYPE',
|
||||
title: 'SOURCE TYPE',
|
||||
align: 'center',
|
||||
dataIndex: 'datasource',
|
||||
// width: 200,
|
||||
|
@ -148,10 +150,35 @@ export default {
|
|||
currId:""
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.queryParams.startDate = this.getBeforeDate(1)
|
||||
},
|
||||
mounted () {
|
||||
this.getNuclideAvgList();
|
||||
},
|
||||
methods: {
|
||||
// 获取n天前的日期
|
||||
getBeforeDate(n){
|
||||
var n = n;
|
||||
var d = new Date();
|
||||
var year = d.getFullYear();
|
||||
var mon=d.getMonth()+1;
|
||||
var day=d.getDate();
|
||||
if(day <= n){
|
||||
if(mon>1) {
|
||||
mon=mon-1;
|
||||
} else {
|
||||
year = year-1;
|
||||
mon = 12;
|
||||
}
|
||||
}
|
||||
d.setDate(d.getDate()-n);
|
||||
year = d.getFullYear();
|
||||
mon=d.getMonth()+1;
|
||||
day=d.getDate();
|
||||
var s = year+"-"+(mon<10?('0'+mon):mon)+"-"+(day<10?('0'+day):day);
|
||||
return s;
|
||||
},
|
||||
moment,
|
||||
getNuclideAvgList() {
|
||||
let params = {
|
||||
|
@ -277,7 +304,8 @@ export default {
|
|||
letter-spacing: 1px;
|
||||
}
|
||||
.ant-input-number{
|
||||
width: 100%;
|
||||
width: 85%;
|
||||
margin-right: 10px;
|
||||
background-color: #03353f !important
|
||||
}
|
||||
</style>
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div style="height: 100%;">
|
||||
<a-card :bordered="false" style="height:100%;margin-left: 20px;">
|
||||
<a-tabs default-active-key="tableSpace" @change="handleTabChange">
|
||||
<a-tabs default-active-key="monitor" @change="handleTabChange">
|
||||
<a-tab-pane key="monitor" tab="MONITOR">
|
||||
<Monitor></Monitor>
|
||||
</a-tab-pane>
|
||||
|
|
|
@ -1,127 +1,129 @@
|
|||
<template>
|
||||
<div style="height: 100%;">
|
||||
<div class="email-top">
|
||||
<BoxTitle title="Receiving information">
|
||||
<template slot="right">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<span class="item-label">Email</span>
|
||||
<a-select style="width:160px"
|
||||
v-model="emailId"
|
||||
placeholder="select..."
|
||||
:filter-option="filterOption"
|
||||
show-arrow
|
||||
:options="emailOptions"
|
||||
@change="onEmailChange"
|
||||
>
|
||||
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
|
||||
</a-select>
|
||||
</div>
|
||||
</template>
|
||||
</BoxTitle>
|
||||
<div class="email-top-content">
|
||||
<div class="email-top-content-li email-top-content-item0">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon0.png" alt="">
|
||||
<a-spin :spinning="spinning">
|
||||
<div class="email-top">
|
||||
<BoxTitle title="Receiving information">
|
||||
<template slot="right">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<span class="item-label">Email</span>
|
||||
<a-select style="width:160px"
|
||||
v-model="emailId"
|
||||
placeholder="select..."
|
||||
:filter-option="filterOption"
|
||||
show-arrow
|
||||
:options="emailOptions"
|
||||
@change="onEmailChange"
|
||||
>
|
||||
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
|
||||
</a-select>
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Mailbox connection status</div>
|
||||
<div class="email-top-content-li-right-val">{{ emailStatus?"NORMAL":"ABNORMAL" }}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #24d870;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li email-top-content-item1">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon1.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Total mail volume for today</div>
|
||||
<div class="email-top-content-li-right-val" style="color: #ade6ee;font-size: 30px;">{{emailTotal.today||0}}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #00ddfe;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li email-top-content-item2">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon2.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Total mail volume of yesterday</div>
|
||||
<div class="email-top-content-li-right-val" style="color: #ade6ee;font-size: 30px;">{{emailTotal.yesterday||0}}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #7c9da2;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li email-top-content-item3">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon3.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Total mail volume of the past week</div>
|
||||
<div class="email-top-content-li-right-val" style="color: #ade6ee;font-size: 30px;">{{emailTotal.week||0}}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #cca817;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li email-top-content-item4">
|
||||
<div class="email-top-content-item4-left">
|
||||
<div class="email-top-content-item4-left-info">
|
||||
<div class="email-top-content-item4-left-info-title">Store capacity</div>
|
||||
<div class="email-top-content-item4-left-info-val">
|
||||
<h3>total:<span>{{ emailSpace.total||0 }}</span></h3>
|
||||
<h3>residue:<span>{{ emailSpace.residue||0 }}</span></h3>
|
||||
</template>
|
||||
</BoxTitle>
|
||||
<div class="email-top-content">
|
||||
<div class="email-top-content-li email-top-content-item0">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon0.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Mailbox connection status</div>
|
||||
<div class="email-top-content-li-right-val">{{ emailStatus?"NORMAL":"ABNORMAL" }}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #24d870;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-item4-right">
|
||||
<div class="email-top-content-item4-right-chart" id="store"></div>
|
||||
<div class="email-top-content-li email-top-content-item1">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon1.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Total mail volume for today</div>
|
||||
<div class="email-top-content-li-right-val" style="color: #ade6ee;font-size: 30px;">{{emailTotal.today||0}}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #00ddfe;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li email-top-content-item2">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon2.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Total mail volume of yesterday</div>
|
||||
<div class="email-top-content-li-right-val" style="color: #ade6ee;font-size: 30px;">{{emailTotal.yesterday||0}}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #7c9da2;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li email-top-content-item3">
|
||||
<div class="email-top-content-li-left">
|
||||
<div class="email-top-content-li-left-icon">
|
||||
<img src="@/assets/images/abnormalAlarm/email-icon3.png" alt="">
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-li-right">
|
||||
<div class="email-top-content-li-right-title">Total mail volume of the past week</div>
|
||||
<div class="email-top-content-li-right-val" style="color: #ade6ee;font-size: 30px;">{{emailTotal.week||0}}</div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #cca817;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li email-top-content-item4">
|
||||
<div class="email-top-content-item4-left">
|
||||
<div class="email-top-content-item4-left-info">
|
||||
<div class="email-top-content-item4-left-info-title">Store capacity</div>
|
||||
<div class="email-top-content-item4-left-info-val">
|
||||
<h3>total:<span>{{ emailSpace.total||0 }}</span></h3>
|
||||
<h3>residue:<span>{{ emailSpace.residue||0 }}</span></h3>
|
||||
</div>
|
||||
</div>
|
||||
<img src="@/assets/images/abnormalAlarm/email-split.png" alt="">
|
||||
</div>
|
||||
<div class="email-top-content-item4-right">
|
||||
<div class="email-top-content-item4-right-chart" id="store"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #e54f0d;"></div>
|
||||
</div>
|
||||
<div class="email-top-content-li-rect" style="background: #e54f0d;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="email-center">
|
||||
<BoxTitle title="Mail reception today"></BoxTitle>
|
||||
<div class="line-bg">
|
||||
<ul v-for="(u,i) in emailToday" :key="i">
|
||||
<li v-for="(m,j) in u" :key="i+j" :class="[m>0?'li-active':'']"></li>
|
||||
<span class="ul-label">{{ timeList[i] }}</span>
|
||||
</ul>
|
||||
<div class="email-center">
|
||||
<BoxTitle title="Mail reception today"></BoxTitle>
|
||||
<div class="line-bg">
|
||||
<ul v-for="(u,i) in emailToday" :key="i">
|
||||
<li v-for="(m,j) in u" :key="i+j" :class="[m>0?'li-active':'']"></li>
|
||||
<span class="ul-label">{{ timeList[i] }}</span>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <div class="time-line" id="timeLine"></div> -->
|
||||
</div>
|
||||
<!-- <div class="time-line" id="timeLine"></div> -->
|
||||
</div>
|
||||
<div class="email-footer">
|
||||
<BoxTitle title="Mail reception statistics">
|
||||
<template slot="right">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<a-select style="width:160px"
|
||||
v-model="date"
|
||||
placeholder="select..."
|
||||
show-arrow
|
||||
:options="dateOptions"
|
||||
@change="onDateChange"
|
||||
>
|
||||
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
|
||||
</a-select>
|
||||
<a-range-picker
|
||||
style="width: 270px;"
|
||||
:value="[moment(startDate), moment(endDate)]"
|
||||
@change="onRangeDateChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</BoxTitle>
|
||||
<div class="email-footer-content" id="mailArea"></div>
|
||||
</div>
|
||||
<div class="email-footer">
|
||||
<BoxTitle title="Mail reception statistics">
|
||||
<template slot="right">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<a-select style="width:160px"
|
||||
v-model="date"
|
||||
placeholder="select..."
|
||||
show-arrow
|
||||
:options="dateOptions"
|
||||
@change="onDateChange"
|
||||
>
|
||||
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
|
||||
</a-select>
|
||||
<a-range-picker
|
||||
style="width: 270px;padding: 0 0 0 15px;"
|
||||
:value="[moment(startDate), moment(endDate)]"
|
||||
@change="onRangeDateChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</BoxTitle>
|
||||
<div class="email-footer-content" id="mailArea"></div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -200,6 +202,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
spinning:false,
|
||||
emailStatus: null,
|
||||
emailTotal: {},
|
||||
emailSpace: {},
|
||||
|
@ -285,6 +288,7 @@ export default {
|
|||
})
|
||||
},
|
||||
onEmailChange(val) {
|
||||
this.spinning = true
|
||||
this.guageStore.clear()
|
||||
this.emailId = val
|
||||
},
|
||||
|
@ -301,6 +305,7 @@ export default {
|
|||
},
|
||||
getEmailStatus() {
|
||||
getAction("/sysEmailLog/status",{emailId:this.currId}).then(res => {
|
||||
this.spinning = false
|
||||
if (res.success) {
|
||||
this.emailStatus = res.result
|
||||
} else {
|
||||
|
@ -309,7 +314,8 @@ export default {
|
|||
})
|
||||
},
|
||||
getEmailTotal() {
|
||||
getAction("/sysEmailLog/total",{emailId:this.currId}).then(res => {
|
||||
getAction("/sysEmailLog/total", { emailId: this.currId }).then(res => {
|
||||
this.spinning = false
|
||||
if (res.success) {
|
||||
this.emailTotal = res.result
|
||||
} else {
|
||||
|
@ -318,7 +324,8 @@ export default {
|
|||
})
|
||||
},
|
||||
getEmailSpace() {
|
||||
getAction("/sysEmailLog/space",{emailId:this.currId}).then(res => {
|
||||
getAction("/sysEmailLog/space", { emailId: this.currId }).then(res => {
|
||||
this.spinning = false
|
||||
if (res.success) {
|
||||
let s = res.result.usage
|
||||
s = s.substring(0, s.length - 1)
|
||||
|
@ -691,7 +698,7 @@ export default {
|
|||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: "number",
|
||||
name: "count",
|
||||
nameLocation: "middle",
|
||||
nameTextStyle: {
|
||||
color: "#5b9cba",
|
||||
|
|
|
@ -49,6 +49,12 @@
|
|||
<span :class="[record.online?'status-on':'status-off']">{{ record.online?"Connecting":"Disconnect" }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="enabled" slot-scope="{text}">
|
||||
<div>
|
||||
<img v-if="text==1" src="@/assets/images/abnormalAlarm/on.png" alt="">
|
||||
<img v-else src="@/assets/images/abnormalAlarm/off.png" alt="">
|
||||
</div>
|
||||
</template>
|
||||
<template slot="today" slot-scope="{text}">
|
||||
<span class="alarm-text">{{ text?text:"--" }}</span>
|
||||
</template>
|
||||
|
@ -199,9 +205,12 @@ const columns = [
|
|||
customRender: 'status'
|
||||
}
|
||||
},{
|
||||
title: 'ENABLE OR NOT',
|
||||
title: 'ENABLE',
|
||||
align: 'left',
|
||||
dataIndex: 'enabled'
|
||||
dataIndex: 'enabled',
|
||||
scopedSlots: {
|
||||
customRender: 'enabled'
|
||||
}
|
||||
},{
|
||||
title: 'E-MAIL',
|
||||
align: 'left',
|
||||
|
|
|
@ -352,7 +352,6 @@ export default {
|
|||
this.currLabel = val.label
|
||||
},
|
||||
onTimeChange(val) {
|
||||
console.log(val);
|
||||
this.getBeforeHours(val)
|
||||
},
|
||||
onRangeDateChange(date, dateString) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user