alarm模块bug修复
This commit is contained in:
parent
925f5cf937
commit
2d5e81291d
|
@ -105,7 +105,8 @@ export default {
|
||||||
console.log("路由信息",this.menus);
|
console.log("路由信息",this.menus);
|
||||||
// this.initDefaultKeys(this.menus[0])
|
// this.initDefaultKeys(this.menus[0])
|
||||||
// 将从缓存中取出openKeys
|
// 将从缓存中取出openKeys
|
||||||
const openKeys = window.sessionStorage.getItem('openKeys')
|
// const openKeys = window.sessionStorage.getItem('openKeys')
|
||||||
|
// console.log(openKeys);
|
||||||
const selectedKeys = window.sessionStorage.getItem('currMenu')
|
const selectedKeys = window.sessionStorage.getItem('currMenu')
|
||||||
if (selectedKeys) {
|
if (selectedKeys) {
|
||||||
this.defaultSelectedKeys.push(selectedKeys)
|
this.defaultSelectedKeys.push(selectedKeys)
|
||||||
|
@ -113,14 +114,17 @@ export default {
|
||||||
|
|
||||||
this.initDefaultKeys(this.menus[0])
|
this.initDefaultKeys(this.menus[0])
|
||||||
}
|
}
|
||||||
if (openKeys) {
|
this.openKeys =this.defaultOpenKeys= this.menus.map(item => {
|
||||||
// 存在即赋值
|
return item.path
|
||||||
this.defaultOpenKeys = JSON.parse(openKeys)
|
})
|
||||||
}
|
// if (openKeys) {
|
||||||
if (openKeys) {
|
// // 存在即赋值
|
||||||
// 存在即赋值
|
// this.defaultOpenKeys = JSON.parse(openKeys)
|
||||||
this.openKeys = JSON.parse(openKeys)
|
// }
|
||||||
}
|
// if (openKeys) {
|
||||||
|
// // 存在即赋值
|
||||||
|
// this.openKeys = JSON.parse(openKeys)
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数
|
// 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数
|
||||||
|
@ -135,6 +139,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initDefaultKeys(data) {
|
initDefaultKeys(data) {
|
||||||
|
console.log("datadefaultOpenKeys",data);
|
||||||
this.defaultOpenKeys.push(data.path)
|
this.defaultOpenKeys.push(data.path)
|
||||||
data.children.some((f) => {
|
data.children.some((f) => {
|
||||||
if (f.children) {
|
if (f.children) {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<a-col flex="380px">
|
<a-col flex="380px">
|
||||||
<span class="item-label">Cacl date</span>
|
<span class="item-label">Cacl date</span>
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
:default-value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
|
:value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
|
||||||
@change="onRangeDateChange"
|
@change="onRangeDateChange"
|
||||||
/>
|
/>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
@cancel="onCancel"
|
@cancel="onCancel"
|
||||||
>
|
>
|
||||||
<a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }">
|
<a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 17 }">
|
||||||
<a-form-item label="Days">
|
<a-form-item label="Cycle">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-decorator="[
|
v-decorator="[
|
||||||
'days',
|
'days',
|
||||||
|
@ -56,10 +56,12 @@
|
||||||
initialVale: this.formVal.days
|
initialVale: this.formVal.days
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
/>
|
/>days
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="Index">
|
<a-form-item label="Index">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
|
:max="100"
|
||||||
|
:min="1"
|
||||||
v-decorator="[
|
v-decorator="[
|
||||||
'index',
|
'index',
|
||||||
{
|
{
|
||||||
|
@ -67,7 +69,7 @@
|
||||||
initialVale: this.formVal.index
|
initialVale: this.formVal.index
|
||||||
}
|
}
|
||||||
]"
|
]"
|
||||||
/>
|
/>%
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
|
@ -92,7 +94,7 @@ const columns = [
|
||||||
dataIndex: 'nuclide',
|
dataIndex: 'nuclide',
|
||||||
// width: 200,
|
// width: 200,
|
||||||
},{
|
},{
|
||||||
title: 'VAL',
|
title: 'VALUE',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'val',
|
dataIndex: 'val',
|
||||||
// width: 200,
|
// width: 200,
|
||||||
|
@ -102,7 +104,7 @@ const columns = [
|
||||||
dataIndex: 'cycle',
|
dataIndex: 'cycle',
|
||||||
// width: 200,
|
// width: 200,
|
||||||
},{
|
},{
|
||||||
title: 'DATA SOURCE TYPE',
|
title: 'SOURCE TYPE',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'datasource',
|
dataIndex: 'datasource',
|
||||||
// width: 200,
|
// width: 200,
|
||||||
|
@ -148,10 +150,35 @@ export default {
|
||||||
currId:""
|
currId:""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
this.queryParams.startDate = this.getBeforeDate(1)
|
||||||
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getNuclideAvgList();
|
this.getNuclideAvgList();
|
||||||
},
|
},
|
||||||
methods: {
|
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,
|
moment,
|
||||||
getNuclideAvgList() {
|
getNuclideAvgList() {
|
||||||
let params = {
|
let params = {
|
||||||
|
@ -277,7 +304,8 @@ export default {
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
.ant-input-number{
|
.ant-input-number{
|
||||||
width: 100%;
|
width: 85%;
|
||||||
|
margin-right: 10px;
|
||||||
background-color: #03353f !important
|
background-color: #03353f !important
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="height: 100%;">
|
<div style="height: 100%;">
|
||||||
<a-card :bordered="false" style="height:100%;margin-left: 20px;">
|
<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">
|
<a-tab-pane key="monitor" tab="MONITOR">
|
||||||
<Monitor></Monitor>
|
<Monitor></Monitor>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="height: 100%;">
|
<div style="height: 100%;">
|
||||||
|
<a-spin :spinning="spinning">
|
||||||
<div class="email-top">
|
<div class="email-top">
|
||||||
<BoxTitle title="Receiving information">
|
<BoxTitle title="Receiving information">
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
|
@ -113,7 +114,7 @@
|
||||||
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
|
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
|
||||||
</a-select>
|
</a-select>
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
style="width: 270px;"
|
style="width: 270px;padding: 0 0 0 15px;"
|
||||||
:value="[moment(startDate), moment(endDate)]"
|
:value="[moment(startDate), moment(endDate)]"
|
||||||
@change="onRangeDateChange"
|
@change="onRangeDateChange"
|
||||||
/>
|
/>
|
||||||
|
@ -122,6 +123,7 @@
|
||||||
</BoxTitle>
|
</BoxTitle>
|
||||||
<div class="email-footer-content" id="mailArea"></div>
|
<div class="email-footer-content" id="mailArea"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</a-spin>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -200,6 +202,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
spinning:false,
|
||||||
emailStatus: null,
|
emailStatus: null,
|
||||||
emailTotal: {},
|
emailTotal: {},
|
||||||
emailSpace: {},
|
emailSpace: {},
|
||||||
|
@ -285,6 +288,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onEmailChange(val) {
|
onEmailChange(val) {
|
||||||
|
this.spinning = true
|
||||||
this.guageStore.clear()
|
this.guageStore.clear()
|
||||||
this.emailId = val
|
this.emailId = val
|
||||||
},
|
},
|
||||||
|
@ -301,6 +305,7 @@ export default {
|
||||||
},
|
},
|
||||||
getEmailStatus() {
|
getEmailStatus() {
|
||||||
getAction("/sysEmailLog/status",{emailId:this.currId}).then(res => {
|
getAction("/sysEmailLog/status",{emailId:this.currId}).then(res => {
|
||||||
|
this.spinning = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.emailStatus = res.result
|
this.emailStatus = res.result
|
||||||
} else {
|
} else {
|
||||||
|
@ -309,7 +314,8 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getEmailTotal() {
|
getEmailTotal() {
|
||||||
getAction("/sysEmailLog/total",{emailId:this.currId}).then(res => {
|
getAction("/sysEmailLog/total", { emailId: this.currId }).then(res => {
|
||||||
|
this.spinning = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.emailTotal = res.result
|
this.emailTotal = res.result
|
||||||
} else {
|
} else {
|
||||||
|
@ -318,7 +324,8 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getEmailSpace() {
|
getEmailSpace() {
|
||||||
getAction("/sysEmailLog/space",{emailId:this.currId}).then(res => {
|
getAction("/sysEmailLog/space", { emailId: this.currId }).then(res => {
|
||||||
|
this.spinning = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let s = res.result.usage
|
let s = res.result.usage
|
||||||
s = s.substring(0, s.length - 1)
|
s = s.substring(0, s.length - 1)
|
||||||
|
@ -691,7 +698,7 @@ export default {
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: "number",
|
name: "count",
|
||||||
nameLocation: "middle",
|
nameLocation: "middle",
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: "#5b9cba",
|
color: "#5b9cba",
|
||||||
|
|
|
@ -49,6 +49,12 @@
|
||||||
<span :class="[record.online?'status-on':'status-off']">{{ record.online?"Connecting":"Disconnect" }}</span>
|
<span :class="[record.online?'status-on':'status-off']">{{ record.online?"Connecting":"Disconnect" }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</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}">
|
<template slot="today" slot-scope="{text}">
|
||||||
<span class="alarm-text">{{ text?text:"--" }}</span>
|
<span class="alarm-text">{{ text?text:"--" }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -199,9 +205,12 @@ const columns = [
|
||||||
customRender: 'status'
|
customRender: 'status'
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
title: 'ENABLE OR NOT',
|
title: 'ENABLE',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'enabled'
|
dataIndex: 'enabled',
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'enabled'
|
||||||
|
}
|
||||||
},{
|
},{
|
||||||
title: 'E-MAIL',
|
title: 'E-MAIL',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
|
@ -352,7 +352,6 @@ export default {
|
||||||
this.currLabel = val.label
|
this.currLabel = val.label
|
||||||
},
|
},
|
||||||
onTimeChange(val) {
|
onTimeChange(val) {
|
||||||
console.log(val);
|
|
||||||
this.getBeforeHours(val)
|
this.getBeforeHours(val)
|
||||||
},
|
},
|
||||||
onRangeDateChange(date, dateString) {
|
onRangeDateChange(date, dateString) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user