Merge branch 'master-dev' into feature-Beta-dev-renpy
# Conflicts: # src/views/stationOperation/components/MapMarker.vue # src/views/stationOperation/components/MapPane.vue # src/views/stationOperation/index.vue
This commit is contained in:
commit
a1ba381170
|
@ -28,6 +28,23 @@ export function postAction(url, parameter) {
|
|||
headers: signHeader
|
||||
})
|
||||
}
|
||||
|
||||
//post
|
||||
export function postActionWithTimeOut(url, parameter, timeout) {
|
||||
let sign = signMd5Utils.getSign(url, parameter);
|
||||
//将签名和时间戳,添加在请求接口 Header
|
||||
// update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
|
||||
let signHeader = { "X-Sign": sign, "X-TIMESTAMP": signMd5Utils.getTimestamp() };
|
||||
// update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
|
||||
|
||||
return axios({
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: parameter,
|
||||
headers: signHeader,
|
||||
timeout
|
||||
})
|
||||
}
|
||||
export function postFileAction(url, parameter) {
|
||||
let sign = signMd5Utils.getSign(url, parameter);
|
||||
//将签名和时间戳,添加在请求接口 Header
|
||||
|
|
|
@ -87,7 +87,7 @@ export const zipFile = async (fileList, zipName) => {
|
|||
result.forEach(res => {
|
||||
zip.file(res.fileName, res.data)
|
||||
})
|
||||
const content = await zip.generateAsync({ type: 'blob' })
|
||||
const content = await zip.generateAsync({ type: 'blob', compression: 'DEFLATE' })
|
||||
return new File([content], zipName, { type: content.type })
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div style="height: 100%">
|
||||
<SearchBar type="alarmAnalysis" @search="handleSearch"></SearchBar>
|
||||
<a-spin :spinning="spinning">
|
||||
<div class="chart-layout" id="analysisChartBar"></div>
|
||||
<div class="chart-box">
|
||||
<div class="chart-box-left">
|
||||
|
@ -12,6 +13,7 @@
|
|||
<div class="chart-box-right-pie" id="chartRight"></div>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -29,6 +31,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
spinning: false,
|
||||
xData: [],
|
||||
yData: [],
|
||||
xData_left: [],
|
||||
|
@ -50,6 +53,7 @@ export default {
|
|||
endDate,
|
||||
types,
|
||||
}
|
||||
this.spinning = true
|
||||
this.getAnalysisLogBar({ startDate, endDate })
|
||||
this.getStationNum({ startDate, endDate })
|
||||
this.getAnalysisSource({ startDate, endDate })
|
||||
|
@ -59,7 +63,9 @@ export default {
|
|||
startDate: obj.startDate,
|
||||
endDate: obj.endDate,
|
||||
}
|
||||
getAction('/alarmAnalysisLog/byTime', params).then((res) => {
|
||||
getAction('/alarmAnalysisLog/byTime', params)
|
||||
.then((res) => {
|
||||
this.spinning = false
|
||||
if (res.success) {
|
||||
this.xData = res.result.xData
|
||||
this.yData = res.result.yData
|
||||
|
@ -68,13 +74,18 @@ export default {
|
|||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
getStationNum(obj) {
|
||||
let params = {
|
||||
startDate: obj.startDate,
|
||||
endDate: obj.endDate,
|
||||
}
|
||||
getAction('/alarmAnalysisLog/byStatoin', params).then((res) => {
|
||||
getAction('/alarmAnalysisLog/byStatoin', params)
|
||||
.then((res) => {
|
||||
this.spinning = false
|
||||
if (res.success) {
|
||||
this.xData_left = res.result.xData
|
||||
this.yData_left = res.result.yData
|
||||
|
@ -83,13 +94,18 @@ export default {
|
|||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
getAnalysisSource(obj) {
|
||||
let params = {
|
||||
startDate: obj.startDate,
|
||||
endDate: obj.endDate,
|
||||
}
|
||||
getAction('/alarmAnalysisLog/bySource', params).then((res) => {
|
||||
getAction('/alarmAnalysisLog/bySource', params)
|
||||
.then((res) => {
|
||||
this.spinning = false
|
||||
if (res.success) {
|
||||
this.pieData = res.result.pieData
|
||||
this.pieTotal = res.result.pieTotal
|
||||
|
@ -98,6 +114,9 @@ export default {
|
|||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
drawAnalysis_bar() {
|
||||
let myChart = echarts.init(document.getElementById('analysisChartBar'))
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<div style="height: 100%">
|
||||
<ConditionBox :value="queryParams" @change="getData" @refresh="getData"></ConditionBox>
|
||||
<div class="monitor-content">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-row :gutter="10" style="height: 100%">
|
||||
<a-col :span="12" style="height: 33.3333%" v-for="(el, i) in chartData" :key="i">
|
||||
<div class="monitor-content-item">
|
||||
|
@ -17,6 +18,7 @@
|
|||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-spin>
|
||||
<!-- <div style="height: auto; margin-top: 15px; padding-right: 10px">
|
||||
<BoxTitle title="Connect List"></BoxTitle>
|
||||
<a-row :gutter="20" style="height: auto; margin-top: 15px">
|
||||
|
@ -60,6 +62,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
spinning: false,
|
||||
queryParams: {
|
||||
hostId: '',
|
||||
start: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
||||
|
@ -360,7 +363,8 @@ export default {
|
|||
methods: {
|
||||
// 获取数据
|
||||
async getData() {
|
||||
const hide = this.$message.loading('loading...', 0)
|
||||
// const hide = this.$message.loading('loading...', 0)
|
||||
this.spinning = true
|
||||
try {
|
||||
const { success, result, message } = await getAction('/systemMonitor/dbDetail', this.queryParams)
|
||||
if (success) {
|
||||
|
@ -383,8 +387,10 @@ export default {
|
|||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
this.spinning = false
|
||||
} finally {
|
||||
hide()
|
||||
// hide()
|
||||
this.spinning = false
|
||||
}
|
||||
},
|
||||
//生成图表(运管系统代码)
|
||||
|
@ -455,6 +461,14 @@ export default {
|
|||
margin-top: 10px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
/deep/.ant-spin-nested-loading {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
/deep/.ant-spin-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
@ -193,11 +193,11 @@ const columns = [
|
|||
ellipsis: true,
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
title: 'SLOW QUERY',
|
||||
align: 'center',
|
||||
dataIndex: 'slowQuery',
|
||||
},
|
||||
// {
|
||||
// title: 'SLOW QUERY',
|
||||
// align: 'center',
|
||||
// dataIndex: 'slowQuery',
|
||||
// },
|
||||
{
|
||||
title: 'ALARMS',
|
||||
align: 'center',
|
||||
|
|
|
@ -271,18 +271,18 @@ export default {
|
|||
},
|
||||
onEmailChange(val) {
|
||||
this.spinning = true
|
||||
this.guageStore.clear()
|
||||
if (this.guageStore) this.guageStore.clear()
|
||||
this.emailId = val
|
||||
},
|
||||
onDateChange(val) {
|
||||
this.spinning = true
|
||||
this.areaMailLine.clear()
|
||||
if (this.areaMailLine) this.areaMailLine.clear()
|
||||
this.startDate = this.getBeforeDate(val - 1)
|
||||
this.getEmailStatistics()
|
||||
},
|
||||
onRangeDateChange(date, dateString) {
|
||||
this.spinning = true
|
||||
this.areaMailLine.clear()
|
||||
if (this.areaMailLine) this.areaMailLine.clear()
|
||||
this.startDate = dateString[0]
|
||||
this.endDate = dateString[1]
|
||||
this.getEmailStatistics()
|
||||
|
@ -315,7 +315,7 @@ export default {
|
|||
s = s.substring(0, s.length - 1)
|
||||
res.result.usage = s
|
||||
this.emailSpace = res.result
|
||||
this.drawGuageStore()
|
||||
// this.drawGuageStore()
|
||||
} else {
|
||||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="cpu-content">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-row :gutter="[20, 15]" style="height: 100%">
|
||||
<a-col :span="12" style="height: calc(50% + 10px)">
|
||||
<div class="cpu-content-item">
|
||||
|
@ -155,6 +156,7 @@
|
|||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-spin>
|
||||
</div>
|
||||
<a-modal :title="modalTitle" :width="1200" v-model="visible" :maskClosable="false" @cancel="onCancel">
|
||||
<div class="modal-content" id="common_cpu"></div>
|
||||
|
@ -176,7 +178,7 @@ import * as echarts from 'echarts'
|
|||
import dateFormat from '@/components/jeecg/JEasyCron/format-date'
|
||||
import BoxTitle from '../../components/boxTitle.vue'
|
||||
import CreateRules from './createRules.vue'
|
||||
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
export default {
|
||||
components: {
|
||||
BoxTitle,
|
||||
|
@ -184,6 +186,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
spinning: false,
|
||||
currId: '',
|
||||
visible_rule: false,
|
||||
currLabel: '',
|
||||
|
@ -251,7 +254,9 @@ export default {
|
|||
start: this.queryParams.startDate,
|
||||
end: this.queryParams.endDate,
|
||||
}
|
||||
getAction('/systemMonitor/queryHostDetails', params).then((res) => {
|
||||
this.spinning = true
|
||||
getAction('/systemMonitor/queryHostDetails', params)
|
||||
.then((res) => {
|
||||
const data = res.result
|
||||
//CPU utilizatior
|
||||
this.cpuUtilization = data.find((item) => item.name === 'cpuUtilization')
|
||||
|
@ -303,6 +308,9 @@ export default {
|
|||
this.drawChart3()
|
||||
this.drawChart4()
|
||||
})
|
||||
.finally(() => {
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
getBeforeHours(num) {
|
||||
let currentTime = moment()
|
||||
|
@ -828,6 +836,14 @@ export default {
|
|||
height: calc(100% - 60px);
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
/deep/.ant-spin-nested-loading {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
/deep/.ant-spin-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div style="height: 100%">
|
||||
<a-spin :spinning="spinning">
|
||||
<div class="content-top">
|
||||
<div style="width: calc(100% - 562px)">
|
||||
<BoxTitle title="Basic lnformation"></BoxTitle>
|
||||
|
@ -297,12 +298,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="Timeline">
|
||||
<p>事件时间线</p>
|
||||
<div>
|
||||
<div id="timeL" style="width: 100%; height: 140px"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content-center">
|
||||
<BoxTitle title="Event Timelinen">
|
||||
<template slot="right">
|
||||
|
@ -359,6 +354,7 @@
|
|||
<div class="bar-disk" id="disk"></div>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -417,6 +413,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
spinning: false,
|
||||
types,
|
||||
dataSource: [],
|
||||
loading: false,
|
||||
|
@ -496,120 +493,12 @@ export default {
|
|||
// })
|
||||
},
|
||||
methods: {
|
||||
// Echarts (时间线)
|
||||
// EchartsTimeline() {
|
||||
// const params = {
|
||||
// itemId: '37550',
|
||||
// itemType: 0,
|
||||
// start: '2023-09-21 00:00:00',
|
||||
// end: '2023-09-21 18:54:00',
|
||||
// }
|
||||
// getAction('/systemMonitor/queryItemHistoryData', params).then((res) => {
|
||||
// let data = res.result
|
||||
// const percentage = 100 / data.length
|
||||
// let indexArr = [[0, 0]]
|
||||
// for (let i = 1; i < data.length; i++) {
|
||||
// const num = i + 1
|
||||
// if (i === data.length - 1) {
|
||||
// indexArr[0][1] = data.length
|
||||
// }
|
||||
// if (data[i - 1].value != data[i].value) {
|
||||
// indexArr[0][1] = i
|
||||
// indexArr.unshift([i, num])
|
||||
// }
|
||||
// }
|
||||
// let objArr = [],
|
||||
// echartData = []
|
||||
// indexArr.map((item) => {
|
||||
// objArr.push(data.slice(item[0], item[1]))
|
||||
// })
|
||||
// const statusConversion = (val) => {
|
||||
// if (val == 1) {
|
||||
// return '正常'
|
||||
// } else if (val == 2) {
|
||||
// return '警告'
|
||||
// } else {
|
||||
// return '离线'
|
||||
// }
|
||||
// }
|
||||
// objArr.map((item, index) => {
|
||||
// let obj = null
|
||||
// if (index === 0) {
|
||||
// const arr = objArr[index + 1]
|
||||
// let timeInterval
|
||||
// if (arr) {
|
||||
// timeInterval = [item[0].date, arr[arr.length - 1].date]
|
||||
// } else {
|
||||
// timeInterval = [item[0].date, item[item.length - 1].date]
|
||||
// }
|
||||
// obj = {
|
||||
// type: 'Cpu',
|
||||
// value: statusConversion(item[0].value),
|
||||
// valueInterval: [0, item.length * percentage],
|
||||
// timeInterval: timeInterval, // 时间区间
|
||||
// }
|
||||
// } else if (index === objArr.length - 1) {
|
||||
// const arr = echartData[echartData.length - 1]
|
||||
// obj = {
|
||||
// type: 'Cpu',
|
||||
// value: statusConversion(item[0].value),
|
||||
// valueInterval: [arr.valueInterval[1], 100],
|
||||
// timeInterval: [arr.timeInterval[1], item[0].date], // 时间区间
|
||||
// }
|
||||
// } else {
|
||||
// const arr = echartData[echartData.length - 1],
|
||||
// arr1 = objArr[index + 1],
|
||||
// num = arr.valueInterval[1],
|
||||
// length = item.length * percentage
|
||||
// obj = {
|
||||
// type: 'Cpu',
|
||||
// value: statusConversion(item[0].value),
|
||||
// valueInterval: [num, length + num],
|
||||
// timeInterval: [arr.timeInterval[1], arr1[arr1.length - 1].date], // 时间区间
|
||||
// }
|
||||
// }
|
||||
// echartData.push(obj)
|
||||
// })
|
||||
// if (this.barPlot) {
|
||||
// this.barPlot.changeData(echartData)
|
||||
// return
|
||||
// }
|
||||
// const timeDateHours = (val) => {
|
||||
// return moment(val).format('HH:mm')
|
||||
// }
|
||||
// this.barPlot = new Bar('timeL', {
|
||||
// data: echartData.reverse(),
|
||||
// xField: 'valueInterval',
|
||||
// yField: 'type',
|
||||
// isRange: true,
|
||||
// seriesField: 'value',
|
||||
// padding: 20,
|
||||
// yAxis: {
|
||||
// label: null,
|
||||
// },
|
||||
// xAxis: {
|
||||
// label: {
|
||||
// formatter: (params) => {
|
||||
// const percentage = params / 100,
|
||||
// index = parseInt((data.length - 1) * percentage)
|
||||
|
||||
// return timeDateHours(data[index].date)
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// legend: {
|
||||
// position: "top-left'",
|
||||
// },
|
||||
// tooltip: false,
|
||||
// })
|
||||
// this.barPlot.render()
|
||||
// })
|
||||
// },
|
||||
moment,
|
||||
// Basic lnformation
|
||||
getBasiclnfo(sourceId) {
|
||||
let params = { hostId: sourceId }
|
||||
getAction('/sysServer/detailsBasicInfo', params).then((res) => {
|
||||
this.spinning = false
|
||||
if (res.success) {
|
||||
this.detailInfo = res.result
|
||||
this.drawGuageCpu()
|
||||
|
@ -630,6 +519,7 @@ export default {
|
|||
end: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
||||
}
|
||||
getAction('/systemMonitor/queryItemHistoryData', params).then((res) => {
|
||||
this.spinning = false
|
||||
const arr = res.result.map((x) => x.value)
|
||||
this.cpuData.max = Math.max(...arr).toFixed(2)
|
||||
this.cpuData.min = Math.min(...arr).toFixed(2)
|
||||
|
@ -654,6 +544,7 @@ export default {
|
|||
end: `${dateFormat(new Date(), 'yyyy-MM-dd')} 23:59:59`,
|
||||
}
|
||||
getAction('/systemMonitor/queryItemHistoryData', params).then((res) => {
|
||||
this.spinning = false
|
||||
let data = res.result
|
||||
startTime = data[0].clock * 1000
|
||||
let indexArr = [[0, 0]]
|
||||
|
@ -727,6 +618,7 @@ export default {
|
|||
}
|
||||
},
|
||||
handleBasicItem(i, item) {
|
||||
this.spinning = true
|
||||
this.currIndex = i
|
||||
this.currItemId = item.cpuUsedItemId
|
||||
this.currSourceId = item.sourceId
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div style="height: 100%;">
|
||||
<a-card :bordered="false" style="height:100%;margin-left: 20px;">
|
||||
<div style="height: 100%">
|
||||
<a-card :bordered="false" style="height: 100%; margin-left: 20px">
|
||||
<a-tabs default-active-key="detais" @change="handleTabChange">
|
||||
<a-tab-pane key="detais" tab="DETAILS">
|
||||
<Details></Details>
|
||||
|
@ -14,22 +14,22 @@
|
|||
<a-tab-pane key="cpu" tab="CPU">
|
||||
<Cpu></Cpu>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="memory" tab="MEMORY">
|
||||
<!-- <a-tab-pane key="memory" tab="MEMORY">
|
||||
MEMORY
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="disk" tab="DISK">
|
||||
DISK
|
||||
</a-tab-pane>
|
||||
</a-tab-pane> -->
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Details from './details.vue';
|
||||
import ServiceProcess from './serviceProcess.vue';
|
||||
import Monitor from './monitor.vue';
|
||||
import Cpu from './cpu.vue';
|
||||
import Details from './details.vue'
|
||||
import ServiceProcess from './serviceProcess.vue'
|
||||
import Monitor from './monitor.vue'
|
||||
import Cpu from './cpu.vue'
|
||||
export default {
|
||||
components: {
|
||||
Details,
|
||||
|
@ -39,13 +39,12 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleTabChange(key) {
|
||||
console.log(key);
|
||||
console.log(key)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import "~@/assets/less/TabMenu.less";
|
||||
|
||||
@import '~@/assets/less/TabMenu.less';
|
||||
</style>
|
|
@ -49,6 +49,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="monitor-content">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-row :gutter="[20, 15]" style="height: 100%">
|
||||
<a-col v-for="(item, index) in chartDatas" :key="item.title" :span="8" style="height: 34%">
|
||||
<div class="monitor-content-item">
|
||||
|
@ -65,6 +66,7 @@
|
|||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-spin>
|
||||
</div>
|
||||
<a-modal :title="modalTitle" :width="1200" v-model="visible" :maskClosable="false" @cancel="onCancel">
|
||||
<div class="modal-content" id="common"></div>
|
||||
|
@ -85,7 +87,7 @@ import moment from 'moment'
|
|||
import * as echarts from 'echarts'
|
||||
import dateFormat from '@/components/jeecg/JEasyCron/format-date'
|
||||
import BoxTitle from '../../components/boxTitle.vue'
|
||||
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import LineChart from './lineChart.vue'
|
||||
import CreateRules from './createRules.vue'
|
||||
export default {
|
||||
|
@ -100,11 +102,11 @@ export default {
|
|||
if (units === 'Kb') {
|
||||
number = number * 1024
|
||||
}
|
||||
if (number < 1024 ) return "B"
|
||||
if (number < 1024) return 'B'
|
||||
number = number / 1024
|
||||
if (number < 1024) return "KB"
|
||||
if (number < 1024) return 'KB'
|
||||
number = number / 1024
|
||||
if (number < 1024) return "MB"
|
||||
if (number < 1024) return 'MB'
|
||||
number = number / 1024
|
||||
console.log('TB', number)
|
||||
if (number < 1024) return 'GB'
|
||||
|
@ -129,10 +131,11 @@ export default {
|
|||
// console.log(obj[units],number / obj[units])
|
||||
return (number / obj[units]).toFixed(2)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
spinning: false,
|
||||
currId: '',
|
||||
visible_rule: false,
|
||||
currLabel: '',
|
||||
|
@ -176,10 +179,11 @@ export default {
|
|||
sourceType: 'Server',
|
||||
sourceId: this.currId,
|
||||
}
|
||||
this.spinning = true
|
||||
getAction('/alarmRule/getItems', params).then((res) => {
|
||||
if (res.success) {
|
||||
this.MonitorItem = res.result
|
||||
this.chartDatas = this.MonitorItem.map(f=>({
|
||||
this.chartDatas = this.MonitorItem.map((f) => ({
|
||||
title: f.name,
|
||||
value: f.itemId,
|
||||
type: f.valueType,
|
||||
|
@ -207,7 +211,8 @@ export default {
|
|||
}
|
||||
try {
|
||||
const res = await this.getMonitorItemData(params)
|
||||
console.log("getMonitorItemData>",res);
|
||||
this.spinning = false
|
||||
console.log('getMonitorItemData>', res)
|
||||
item.xData = res.xData
|
||||
item.data = [
|
||||
{
|
||||
|
@ -219,6 +224,7 @@ export default {
|
|||
item.newUnits = res.newUnits
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
this.spinning = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -234,19 +240,19 @@ export default {
|
|||
return dateFormat(new Date(item.date * 1000), 'hh:mm')
|
||||
})
|
||||
|
||||
let item = res.result;
|
||||
let item = res.result
|
||||
if (item.units === 'B' || item.units === 'Kb') {
|
||||
item.newUnits = this.unitConversion(item.min, item.units)
|
||||
newUnits = item.newUnits
|
||||
item.list.map(val =>{
|
||||
item.list.map((val) => {
|
||||
let number = val.value
|
||||
if(item.units ==="Kb"){
|
||||
if (item.units === 'Kb') {
|
||||
number = val.value * 1024
|
||||
}
|
||||
val.value = Number(this.dataConversion(number, item.newUnits))
|
||||
data.push({
|
||||
value: Number(val.value),
|
||||
Date: moment(val.date * 1000).format('hh:mm')
|
||||
Date: moment(val.date * 1000).format('hh:mm'),
|
||||
})
|
||||
})
|
||||
console.log(item)
|
||||
|
@ -260,7 +266,7 @@ export default {
|
|||
xData,
|
||||
data,
|
||||
units,
|
||||
newUnits
|
||||
newUnits,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -402,6 +408,14 @@ export default {
|
|||
height: calc(100% - 60px);
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
/deep/.ant-spin-nested-loading {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
/deep/.ant-spin-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&-item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="service-content">
|
||||
<a-spin :spinning="spinning">
|
||||
<div class="service-content-ranked">
|
||||
<BoxTitle title="Top-ranked processes in the last hour">
|
||||
<template slot="right">
|
||||
|
@ -131,6 +132,7 @@
|
|||
/> -->
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -140,7 +142,7 @@ import moment from 'moment'
|
|||
import BoxTitle from '../../components/boxTitle.vue'
|
||||
import TableList from '../../components/tableList.vue'
|
||||
import dateFormat from '@/components/jeecg/JEasyCron/format-date'
|
||||
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
|
||||
import { getAction } from '@/api/manage'
|
||||
import * as echarts from 'echarts'
|
||||
// const columns = [
|
||||
// {
|
||||
|
@ -193,27 +195,33 @@ import * as echarts from 'echarts'
|
|||
// },
|
||||
// ]
|
||||
|
||||
const columns = [{
|
||||
const columns = [
|
||||
{
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
width: '20%'
|
||||
}, {
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
title: 'Min(%)',
|
||||
dataIndex: 'min',
|
||||
width: '20%'
|
||||
}, {
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
title: 'Max(%)',
|
||||
dataIndex: 'max',
|
||||
width: '20%'
|
||||
}, {
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
title: 'Avg(%)',
|
||||
dataIndex: 'avg',
|
||||
width: '20%'
|
||||
}, {
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
title: 'Now(%)',
|
||||
dataIndex: 'now',
|
||||
width: '20%'
|
||||
}]
|
||||
width: '20%',
|
||||
},
|
||||
]
|
||||
export default {
|
||||
components: {
|
||||
BoxTitle,
|
||||
|
@ -221,6 +229,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
spinning: false,
|
||||
type: 'cpu',
|
||||
queryParams: {
|
||||
server: undefined,
|
||||
|
@ -312,8 +321,10 @@ export default {
|
|||
start: this.queryParams.startDate,
|
||||
end: this.queryParams.endDate,
|
||||
}
|
||||
const hide = this.$message.loading('loading...', 0)
|
||||
getAction('/systemMonitor/queryHostDetails', params).then((res) => {
|
||||
// const hide = this.$message.loading('loading...', 0)
|
||||
this.spinning = true
|
||||
getAction('/systemMonitor/queryHostDetails', params)
|
||||
.then((res) => {
|
||||
this.list = res.result
|
||||
this.listData = {
|
||||
list: this.num === 0 ? this.list.cpu : this.list.memory,
|
||||
|
@ -374,8 +385,10 @@ export default {
|
|||
this.drawRanked()
|
||||
this.drawProcesCpu()
|
||||
this.drawProcesMenbry()
|
||||
}).finally(() => {
|
||||
hide()
|
||||
})
|
||||
.finally(() => {
|
||||
// hide()
|
||||
this.spinning = false
|
||||
})
|
||||
},
|
||||
getBeforeHours(num) {
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
:dataSource="list"
|
||||
:list-style="{
|
||||
width: '200px',
|
||||
height: '400px'
|
||||
height: '400px',
|
||||
}"
|
||||
:target-keys="targetKeys"
|
||||
:render="item => item.title"
|
||||
:render="(item) => item.title"
|
||||
:showSearch="true"
|
||||
:showSelectAll="false"
|
||||
@change="handleChange"
|
||||
></a-transfer>
|
||||
|
||||
<div class="config-user-library-btns">
|
||||
<!--<div class="config-user-library-btns">
|
||||
<div>
|
||||
<a-button type="primary" @click="handleDefault">Default</a-button>
|
||||
<a-button type="primary">Load</a-button>
|
||||
|
@ -25,6 +25,10 @@
|
|||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
<a-button type="primary">Apply</a-button>
|
||||
</div>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
</div>-->
|
||||
<div style="margin-top: 20px; display: flex; justify-content: end">
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSave">Save</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
|
@ -43,7 +47,7 @@ export default {
|
|||
return {
|
||||
list: [],
|
||||
targetKeys: [],
|
||||
isSaving: false
|
||||
isSaving: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -58,17 +62,17 @@ export default {
|
|||
const { sampleId, inputFileName: fileName } = this.sampleData
|
||||
const { success, result, message } = await getAction('/gamma/configUserLibrary', {
|
||||
sampleId,
|
||||
fileName
|
||||
fileName,
|
||||
})
|
||||
if (success) {
|
||||
this.isLoading = false
|
||||
const { AllNuclides, UserNuclides } = result
|
||||
this.list = AllNuclides.map(item => ({
|
||||
this.list = AllNuclides.map((item) => ({
|
||||
key: item,
|
||||
title: item
|
||||
title: item,
|
||||
}))
|
||||
|
||||
this.targetKeys = UserNuclides.map(item => item)
|
||||
this.targetKeys = UserNuclides.map((item) => item)
|
||||
|
||||
this.initialTargetKeys = cloneDeep(this.targetKeys)
|
||||
} else {
|
||||
|
@ -95,7 +99,7 @@ export default {
|
|||
const { inputFileName: fileName } = this.sampleData
|
||||
const { success, result, message } = await postAction('/gamma/saveUserLibrary', {
|
||||
fileName,
|
||||
userLibraryName: this.targetKeys
|
||||
userLibraryName: this.targetKeys,
|
||||
})
|
||||
if (success) {
|
||||
this.$message.success('Save Success')
|
||||
|
@ -107,8 +111,8 @@ export default {
|
|||
} finally {
|
||||
this.isSaving = false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -162,6 +162,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
loadData(arg) {
|
||||
debugger
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = this.getQueryParams() //查询条件
|
||||
const { startDate, endDate, menuTypes } = params
|
||||
if (!menuTypes) {
|
||||
|
@ -179,11 +184,6 @@ export default {
|
|||
return
|
||||
}
|
||||
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
|
||||
params.AllUsers = this.allUsersValue
|
||||
params.CollectStopB = this.collectStopValue
|
||||
params.AcqStartB = this.acqStartValue
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '../../../../api/manage'
|
||||
import { getAction, postActionWithTimeOut } from '../../../../api/manage'
|
||||
import { FilePicker } from '@/utils/FilePicker'
|
||||
import { readFile, zipFile } from '@/utils/file'
|
||||
import { isSample, PHDParser, PHD_DATA_TYPE } from '@/utils/phdHelper'
|
||||
|
@ -657,7 +657,7 @@ export default {
|
|||
async uploadZipFile(file) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
const res = await postAction('/spectrumFile/upload', formData)
|
||||
const res = await postActionWithTimeOut('/spectrumFile/upload', formData, 0)
|
||||
return res
|
||||
},
|
||||
|
||||
|
|
|
@ -217,7 +217,11 @@ export default {
|
|||
// 获取站点详情
|
||||
async _getStationInfo(stationInfo) {
|
||||
try {
|
||||
<<<<<<< HEAD
|
||||
const { success, result, message } = await getAction('/stationOperation/findInfo', {
|
||||
=======
|
||||
const { success, result, message } = await getAction('/armd-station-operation/stationOperation/findInfo', {
|
||||
>>>>>>> master-dev
|
||||
stationId: stationInfo.stationId,
|
||||
type: stationInfo.stationType,
|
||||
})
|
||||
|
|
|
@ -695,13 +695,10 @@ export default {
|
|||
try {
|
||||
const stationIds = this.dataStatusCheckedKeys.filter((key) => -1 == key.toString().indexOf('root_'))
|
||||
this.isSavingDataRecieveSettings = true
|
||||
const { success, message } = await postAction(
|
||||
'/sysUserFocusStation/saveUserFocusByUserId',
|
||||
{
|
||||
const { success, message } = await postAction('/sysUserFocusStation/saveUserFocusByUserId', {
|
||||
stationIds,
|
||||
...this.dataRecieveStatusModel,
|
||||
}
|
||||
)
|
||||
})
|
||||
if (success) {
|
||||
this.$message.success('Save Success')
|
||||
await this.getDataRecieveSettings()
|
||||
|
@ -738,12 +735,9 @@ export default {
|
|||
// 获取数据接收状态配置
|
||||
async getDataRecieveSettings() {
|
||||
try {
|
||||
const { success, result, message } = await getAction(
|
||||
'/sysUserFocusStation/findUserFocusByUserId',
|
||||
{
|
||||
const { success, result, message } = await getAction('/sysUserFocusStation/findUserFocusByUserId', {
|
||||
userId: this.$store.getters.userInfo.id,
|
||||
}
|
||||
)
|
||||
})
|
||||
if (success) {
|
||||
this.initialDataRecieveSettings = result
|
||||
} else {
|
||||
|
@ -774,13 +768,10 @@ export default {
|
|||
this.spinLoading = true
|
||||
try {
|
||||
this.isGettingStatusList = true
|
||||
const { success, result, message } = await getAction(
|
||||
'/stationOperation/getDataReceivingStatus',
|
||||
{
|
||||
const { success, result, message } = await getAction('/stationOperation/getDataReceivingStatus', {
|
||||
userId: this.$store.getters.userInfo.id,
|
||||
oneStationId: (this.stationInfo && this.stationInfo.stationId) || '',
|
||||
}
|
||||
)
|
||||
})
|
||||
this.maskVisi = false
|
||||
this.spinLoading = false
|
||||
if (success) {
|
||||
|
|
|
@ -71,7 +71,11 @@ const legendList = [
|
|||
const initialOption = {
|
||||
tooltip: {
|
||||
formatter: (params) => {
|
||||
return `${params.marker}${params.name}: ${(params.value[3] / 1000 / 60).toFixed()}min`
|
||||
return `
|
||||
<div>${params.marker}${params.name}</div>
|
||||
<div>START:${dayjs(new Date(params.value[1])).format('YYYY-MM-DD HH:mm:ss')}</div>
|
||||
<div>END:${dayjs(new Date(params.value[2])).format('YYYY-MM-DD HH:mm:ss')}</div>
|
||||
`
|
||||
},
|
||||
},
|
||||
grid: [],
|
||||
|
|
|
@ -253,7 +253,11 @@ export default {
|
|||
async getStationList() {
|
||||
try {
|
||||
this.isGettingDataList = true
|
||||
<<<<<<< HEAD
|
||||
const res = await getAction('/stationOperation/findList')
|
||||
=======
|
||||
const res = await getAction('/armd-station-operation/stationOperation/findList')
|
||||
>>>>>>> master-dev
|
||||
res.forEach((item) => {
|
||||
const { stationId, stationName, stationType } = item
|
||||
item._stationId = `${stationId}${stationName}${stationType}`
|
||||
|
@ -364,7 +368,11 @@ export default {
|
|||
async getFollowedStationList() {
|
||||
try {
|
||||
this.isGettingFollowedDataList = true
|
||||
<<<<<<< HEAD
|
||||
const res = await getAction('/sysUserFocusStation/findList')
|
||||
=======
|
||||
const res = await getAction('/armd-station-operation/sysUserFocusStation/findList')
|
||||
>>>>>>> master-dev
|
||||
this.followedDataList = res
|
||||
|
||||
const scrollContainer2Ref = this.$refs.scrollContainer2Ref
|
||||
|
@ -383,7 +391,11 @@ export default {
|
|||
// 获取站点类型
|
||||
async getStationTypeList() {
|
||||
try {
|
||||
<<<<<<< HEAD
|
||||
const res = await getAction('/stationOperation/findStationType')
|
||||
=======
|
||||
const res = await getAction('/armd-station-operation/stationOperation/findStationType')
|
||||
>>>>>>> master-dev
|
||||
this.stationTypeList = res.filter((item) => item).map((item) => ({ label: item, value: item }))
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div class="scheduling">
|
||||
<a-spin :spinning="spinningMain">
|
||||
<!-- 左侧日程列表 -->
|
||||
<a-card class="scheduling-list">
|
||||
<!-- 标题 -->
|
||||
|
@ -80,7 +81,7 @@
|
|||
Download Template
|
||||
</a-button>
|
||||
<a-upload :custom-request="onImport" accept=".xlsx, .xls" :show-upload-list="false">
|
||||
<a-button type="primary">
|
||||
<a-button :loading="isImport" type="primary">
|
||||
<img src="@/assets/images/global/import.png" alt="" />
|
||||
Import
|
||||
</a-button>
|
||||
|
@ -109,6 +110,7 @@
|
|||
</a-calendar>
|
||||
<!-- 日历结束 -->
|
||||
</div>
|
||||
</a-spin>
|
||||
|
||||
<!-- 增加/编辑排班弹窗 -->
|
||||
<custom-modal :title="isAdd ? 'Add' : 'Edit'" :width="845" v-model="visible" :okHandler="submit" destroy-on-close>
|
||||
|
@ -217,6 +219,8 @@ export default {
|
|||
data() {
|
||||
this.dateFormat = dateFormat
|
||||
return {
|
||||
isImport: false,
|
||||
spinningMain: false,
|
||||
currentMonth: moment(), // 当前月份
|
||||
|
||||
currentDate: moment(), // 当前日期
|
||||
|
@ -255,6 +259,7 @@ export default {
|
|||
methods: {
|
||||
// 获取该月日程列表
|
||||
async getList() {
|
||||
this.spinningMain = true
|
||||
try {
|
||||
this.isGettingList = true
|
||||
const { result } = await getAction(`/sysTask/findList?yearMonth=${this.currentMonth.format('YYYY-MM')}`)
|
||||
|
@ -262,8 +267,10 @@ export default {
|
|||
this.schedulingInfo = this.scheduleList[this.currentDate.format(dateFormat)]
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
this.spinningMain = false
|
||||
} finally {
|
||||
this.isGettingList = false
|
||||
this.spinningMain = false
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -407,14 +414,17 @@ export default {
|
|||
},
|
||||
|
||||
async onImport({ file }) {
|
||||
this.isImport = true
|
||||
try {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
const { success, failure } = await postAction('/sysTask/importExcel', formData)
|
||||
this.$message.success(`${success} Success, ${failure} Fail`)
|
||||
this.isImport = false
|
||||
this.getList()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
this.isImport = false
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -645,7 +655,11 @@ export default {
|
|||
.scheduling {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
//display: flex;
|
||||
/deep/.ant-spin-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
}
|
||||
&-list {
|
||||
flex-shrink: 0;
|
||||
width: 350px;
|
||||
|
|
Loading…
Reference in New Issue
Block a user