Merge branch 'feature-Alarm-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
35978b7b43
|
@ -285,9 +285,9 @@
|
|||
<a-list :dataSource="dataSource_alarm_info">
|
||||
<a-list-item slot="renderItem" slot-scope="item">
|
||||
<img class="alarm-info-list-img" src="@/assets/images/abnormalAlarm/icon-r.png" alt="" />
|
||||
<div class="alarm-info-list-info">{{ JSON.parse(item.alarmInfo).info }}</div>
|
||||
<div class="alarm-info-list-info">{{ JSON.parse(item.alarmInfo).value }}</div>
|
||||
<div class="alarm-info-list-date">{{ item.alarmStartDate }}</div>
|
||||
<a slot="actions" class="alarm-info-list-actions">Detail</a>
|
||||
<!-- <a slot="actions" class="alarm-info-list-actions">Detail</a> -->
|
||||
</a-list-item>
|
||||
<div v-if="loading_alarm_info && !busy" class="demo-loading-container">
|
||||
<a-spin />
|
||||
|
@ -363,7 +363,6 @@
|
|||
|
||||
<script>
|
||||
var data1 = []
|
||||
// var dataCount = 3
|
||||
var startTime, endTime
|
||||
var categories = ['cpu']
|
||||
var types = [
|
||||
|
@ -374,24 +373,6 @@ var types = [
|
|||
var legendData = types.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
// Generate mock data
|
||||
// categories.forEach((category, index) => {
|
||||
// var baseTime = startTime
|
||||
// for (var i = 0; i < dataCount; i++) {
|
||||
// var typeItem = types[i]
|
||||
// var duration = Math.round(Math.random() * 10000)
|
||||
// data1.push({
|
||||
// name: typeItem.name,
|
||||
// value: [index, baseTime, (baseTime += duration), duration],
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: typeItem.color,
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
// baseTime += Math.round(Math.random() * 2000)
|
||||
// }
|
||||
// })
|
||||
function renderItem1(params, api) {
|
||||
var categoryIndex = api.value(0)
|
||||
var start = api.coord([api.value(1), categoryIndex])
|
||||
|
@ -425,7 +406,7 @@ import infiniteScroll from 'vue-infinite-scroll'
|
|||
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
|
||||
import * as echarts from 'echarts'
|
||||
import dateFormat from '@/components/jeecg/JEasyCron/format-date'
|
||||
import { Bar, G2 } from '@antv/g2plot'
|
||||
// import { Bar, G2 } from '@antv/g2plot'
|
||||
import moment from 'moment'
|
||||
import { log } from '@antv/g2plot/lib/utils'
|
||||
export default {
|
||||
|
@ -457,7 +438,8 @@ export default {
|
|||
guageCpu: null,
|
||||
guageMemory: null,
|
||||
guageLoads: null,
|
||||
currId: '',
|
||||
currHostId: '',
|
||||
currSourceId: '',
|
||||
detailInfo: {},
|
||||
currItemId: '',
|
||||
// cpu
|
||||
|
@ -470,7 +452,6 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.currId = this.$route.query.serverId||""
|
||||
this.getSysServer((res) => {
|
||||
this.loading = false
|
||||
if (res.success) {
|
||||
|
@ -479,14 +460,16 @@ export default {
|
|||
if (this.$route.query.serverId) {
|
||||
this.serverId = this.$route.query.serverId
|
||||
this.currIndex = this.dataSource.findIndex((item) => item.sourceId === this.serverId)
|
||||
this.currId = this.dataSource.find((item) => item.sourceId === this.serverId).hostId
|
||||
this.currHostId = this.dataSource.find((item) => item.sourceId === this.serverId).hostId
|
||||
this.currSourceId = this.dataSource.find((item) => item.sourceId === this.serverId).sourceId
|
||||
this.currItemId = this.dataSource.find((item) => item.sourceId === this.serverId).cpuUsedItemId
|
||||
} else {
|
||||
this.currId = this.dataSource[0].hostId
|
||||
this.currHostId = this.dataSource[0].hostId
|
||||
this.currSourceId = this.dataSource[0].sourceId
|
||||
this.currItemId = this.dataSource[0].cpuUsedItemId
|
||||
this.currIndex = 0
|
||||
}
|
||||
this.getBasiclnfo(this.currId)
|
||||
this.getBasiclnfo(this.currHostId)
|
||||
this.getCpuUtilizationData()
|
||||
this.getTimeLineData()
|
||||
// this.EchartsTimeline()
|
||||
|
@ -494,7 +477,7 @@ export default {
|
|||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
this.getServerAlarmHistory((res) => {
|
||||
this.getDetailsAlarmInfo((res) => {
|
||||
this.loading_alarm_info = false
|
||||
if (res.success) {
|
||||
this.ipagination_alarm_info.total = res.result.total
|
||||
|
@ -744,19 +727,20 @@ export default {
|
|||
handleBasicItem(i, item) {
|
||||
this.currIndex = i
|
||||
this.currItemId = item.cpuUsedItemId
|
||||
this.currSourceId = item.sourceId
|
||||
this.getBasiclnfo(item.hostId)
|
||||
this.getCpuUtilizationData()
|
||||
this.getTimeLineData()
|
||||
},
|
||||
getServerAlarmHistory(callBack) {
|
||||
getDetailsAlarmInfo(callBack) {
|
||||
this.loading = true
|
||||
let params = {
|
||||
startDate: '2022-08-01',
|
||||
endDate: '2023-08-07',
|
||||
// sourceId:this.currSourceId,
|
||||
sourceId: 'e2',
|
||||
pageNo: this.ipagination_alarm_info.current,
|
||||
pageSize: this.ipagination_alarm_info.pageSize,
|
||||
}
|
||||
getAction('/sysServer/findAlarmHistory', params).then((res) => {
|
||||
getAction('/sysServer/detailsAlarmInfo', params).then((res) => {
|
||||
callBack(res)
|
||||
})
|
||||
},
|
||||
|
@ -771,7 +755,7 @@ export default {
|
|||
return
|
||||
} else {
|
||||
this.ipagination_alarm_info.current += 1
|
||||
this.getServerAlarmHistory((res) => {
|
||||
this.getDetailsAlarmInfo((res) => {
|
||||
this.ipagination_alarm_info.total = res.result.total
|
||||
this.dataSource_alarm_info = dataSource_alarm_info.concat(res.result.records)
|
||||
this.loading_alarm_info = false
|
||||
|
|
Loading…
Reference in New Issue
Block a user