diff --git a/src/api/manage.js b/src/api/manage.js
index 124e071..f88f6d8 100644
--- a/src/api/manage.js
+++ b/src/api/manage.js
@@ -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
diff --git a/src/utils/file.js b/src/utils/file.js
index 08cf671..09ef907 100644
--- a/src/utils/file.js
+++ b/src/utils/file.js
@@ -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 })
}
diff --git a/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue b/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue
index 1659ec2..ba9886e 100644
--- a/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue
+++ b/src/views/abnormalAlarm/analysisMonitor/alarmAnalysis/index.vue
@@ -1,17 +1,19 @@
-
-
@@ -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,45 +63,60 @@ export default {
startDate: obj.startDate,
endDate: obj.endDate,
}
- getAction('/alarmAnalysisLog/byTime', params).then((res) => {
- if (res.success) {
- this.xData = res.result.xData
- this.yData = res.result.yData
- this.drawAnalysis_bar()
- } else {
- this.$message.warning('This operation fails. Contact your system administrator')
- }
- })
+ getAction('/alarmAnalysisLog/byTime', params)
+ .then((res) => {
+ this.spinning = false
+ if (res.success) {
+ this.xData = res.result.xData
+ this.yData = res.result.yData
+ this.drawAnalysis_bar()
+ } else {
+ 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) => {
- if (res.success) {
- this.xData_left = res.result.xData
- this.yData_left = res.result.yData
- this.drawLeftChart()
- } else {
- this.$message.warning('This operation fails. Contact your system administrator')
- }
- })
+ getAction('/alarmAnalysisLog/byStatoin', params)
+ .then((res) => {
+ this.spinning = false
+ if (res.success) {
+ this.xData_left = res.result.xData
+ this.yData_left = res.result.yData
+ this.drawLeftChart()
+ } else {
+ 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) => {
- if (res.success) {
- this.pieData = res.result.pieData
- this.pieTotal = res.result.pieTotal
- this.drawRightChart()
- } else {
- this.$message.warning('This operation fails. Contact your system administrator')
- }
- })
+ getAction('/alarmAnalysisLog/bySource', params)
+ .then((res) => {
+ this.spinning = false
+ if (res.success) {
+ this.pieData = res.result.pieData
+ this.pieTotal = res.result.pieTotal
+ this.drawRightChart()
+ } else {
+ this.$message.warning('This operation fails. Contact your system administrator')
+ }
+ })
+ .finally(() => {
+ this.spinning = false
+ })
},
drawAnalysis_bar() {
let myChart = echarts.init(document.getElementById('analysisChartBar'))
diff --git a/src/views/abnormalAlarm/databaseMonitor/instances/monitor.vue b/src/views/abnormalAlarm/databaseMonitor/instances/monitor.vue
index 2695d99..a6c7c9d 100644
--- a/src/views/abnormalAlarm/databaseMonitor/instances/monitor.vue
+++ b/src/views/abnormalAlarm/databaseMonitor/instances/monitor.vue
@@ -2,21 +2,23 @@
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
- IP Address:
- {{ detailInfo.ip }}
-
-
-
-
- Kernel version:
- 2000
-
-
-
-
- OS Name:
-
- {{ detailInfo.osName }}
-
-
-
-
-
- CPU:
-
- {{ detailInfo.cpuType }}
-
-
-
- Manufacturer:
- ASUSTeK COMPUTER INC.
-
-
- Server Agent Path:
- C:\Agent\Default\Desktop
-
-
-
-
-
-
- Network Lnterface:
- {{ detailInfo.network }}
-
-
-
-
- Location:
- {{ detailInfo.location }}
-
-
-
-
-
-
- Time Zone:
- {{ detailInfo.zone }}
-
-
-
-
- Server Agent User:
- LocalSystem
-
-
-
-
- OS Version:
- 2023-03-01 14:00:01
-
-
- Start Time:
-
- {{ detailInfo.osVersion }}
-
-
-
- Model Number:
- TUF GamingFX705GM_FX86SM
-
-
- Bios Supplier:
- American Megatrends lnc.
-
-
-
+
+
+ CPU:
+
+ {{ detailInfo.cpuType }}
+
+
+
+ Manufacturer:
+ ASUSTeK COMPUTER INC.
+
+
+ Server Agent Path:
+ C:\Agent\Default\Desktop
+
+
+
+
+
+
+ Network Lnterface:
+ {{ detailInfo.network }}
+
+
+
+
+ Location:
+ {{ detailInfo.location }}
+
+
+
+
+
+
+ Time Zone:
+ {{ detailInfo.zone }}
+
+
+
+
+ Server Agent User:
+ LocalSystem
+
+
+
+
+ OS Version:
+ 2023-03-01 14:00:01
+
+
+ Start Time:
+
+ {{ detailInfo.osVersion }}
+
+
+
+ Model Number:
+ TUF GamingFX705GM_FX86SM
+
+
+ Bios Supplier:
+ American Megatrends lnc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.alarmInfo }}
+ {{ item.alarmStartDate }}
+
+
+
+
-
-
-
-
-
-
- {{ item.alarmInfo }}
- {{ item.alarmStartDate }}
-
-
-
-
-
+
+
+
+
+ -
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ average value:{{ cpuData.avg }}%
+
+
+ minimum value:{{ cpuData.min }}%
+
+
+ Maximum value:{{ cpuData.max }}%
+
+
+
+
+
-
-
-
-
-
-
-
- -
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- average value:{{ cpuData.avg }}%
-
-
- minimum value:{{ cpuData.min }}%
-
-
- Maximum value:{{ cpuData.max }}%
-
-
-
-
-
+
-
-
+
@@ -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
diff --git a/src/views/abnormalAlarm/serverMonitor/instances/index.vue b/src/views/abnormalAlarm/serverMonitor/instances/index.vue
index 95c87be..829086b 100644
--- a/src/views/abnormalAlarm/serverMonitor/instances/index.vue
+++ b/src/views/abnormalAlarm/serverMonitor/instances/index.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -14,22 +14,22 @@
-
+
\ No newline at end of file
diff --git a/src/views/abnormalAlarm/serverMonitor/instances/monitor.vue b/src/views/abnormalAlarm/serverMonitor/instances/monitor.vue
index f78a800..c384d95 100644
--- a/src/views/abnormalAlarm/serverMonitor/instances/monitor.vue
+++ b/src/views/abnormalAlarm/serverMonitor/instances/monitor.vue
@@ -49,22 +49,24 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -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 {
@@ -94,19 +96,19 @@ export default {
LineChart,
CreateRules,
},
- computed:{
- unitConversion(){
- return function(number,units){
- if( units === 'Kb') {
- number = number *1024
+ computed: {
+ unitConversion() {
+ return function (number, units) {
+ 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)
+ console.log('TB', number)
if (number < 1024) return 'GB'
number = number / 1024
if (number < 1024) return 'TB'
@@ -116,23 +118,24 @@ export default {
if (number < 1024) return 'EB'
}
},
- dataConversion(){
- return function(number,units){
+ dataConversion() {
+ return function (number, units) {
const obj = {
KB: 1024,
- MB: Math.pow(1024,2),
- GB: Math.pow(1024,3),
- TB: Math.pow(1024,4),
- PB: Math.pow(1024,5),
- EB: Math.pow(1024,6),
+ MB: Math.pow(1024, 2),
+ GB: Math.pow(1024, 3),
+ TB: Math.pow(1024, 4),
+ PB: Math.pow(1024, 5),
+ EB: Math.pow(1024, 6),
}
// 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,21 +240,21 @@ export default {
return dateFormat(new Date(item.date * 1000), 'hh:mm')
})
- 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 =>{
+ 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) => {
let number = val.value
- if(item.units ==="Kb"){
- number = val.value *1024
+ 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')
- })
+ val.value = Number(this.dataConversion(number, item.newUnits))
+ data.push({
+ value: Number(val.value),
+ Date: moment(val.date * 1000).format('hh:mm'),
})
+ })
console.log(item)
} else {
data = res.result.list.map((item_1) => {
@@ -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%;
diff --git a/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue b/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue
index dd4d9bf..4f7b47a 100644
--- a/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue
+++ b/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue
@@ -57,24 +57,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -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 = [{
- title: 'Name',
- dataIndex: 'name',
- width: '20%'
-}, {
- title: 'Min(%)',
- dataIndex: 'min',
- width: '20%'
-}, {
- title: 'Max(%)',
- dataIndex: 'max',
- width: '20%'
-}, {
- title: 'Avg(%)',
- dataIndex: 'avg',
- width: '20%'
-}, {
- title: 'Now(%)',
- dataIndex: 'now',
- width: '20%'
-}]
+const columns = [
+ {
+ title: 'Name',
+ dataIndex: 'name',
+ width: '20%',
+ },
+ {
+ title: 'Min(%)',
+ dataIndex: 'min',
+ width: '20%',
+ },
+ {
+ title: 'Max(%)',
+ dataIndex: 'max',
+ width: '20%',
+ },
+ {
+ title: 'Avg(%)',
+ dataIndex: 'avg',
+ width: '20%',
+ },
+ {
+ title: 'Now(%)',
+ dataIndex: 'now',
+ width: '20%',
+ },
+]
export default {
components: {
BoxTitle,
@@ -221,6 +229,7 @@ export default {
},
data() {
return {
+ spinning: false,
type: 'cpu',
queryParams: {
server: undefined,
@@ -312,71 +321,75 @@ export default {
start: this.queryParams.startDate,
end: this.queryParams.endDate,
}
- const hide = this.$message.loading('loading...', 0)
- getAction('/systemMonitor/queryHostDetails', params).then((res) => {
- this.list = res.result
- this.listData = {
- list: this.num === 0 ? this.list.cpu : this.list.memory,
- type: this.num === 0 ? 'CPU' : '内存',
- }
-
- this.setTableData()
-
- let cpu_xData = res.result.cpu[0].list.map((item) => {
- return dateFormat(new Date(item.date * 1000), 'hh:mm')
- })
- let cpu_Data = res.result.cpu.map((item) => {
- return {
- name: item.name,
- data: item.list.map((el) => Number((el.value * 100).toFixed(2))),
+ // 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,
+ type: this.num === 0 ? 'CPU' : '内存',
}
- })
- let cpu_legend = res.result.cpu.map((item) => {
- return item.name
- })
- let memory_xData = res.result.memory[0].list.map((item) => {
- return dateFormat(new Date(item.date * 1000), 'hh:mm')
- })
- let memory_Data = res.result.memory.map((item) => {
- return {
- name: item.name,
- data: item.list.map((el) => Number((el.value * 100).toFixed(2))),
- }
- })
- let memory_legend = res.result.memory.map((item) => {
- return item.name
- })
- this.rankData = {
- type: this.type === 'cpu' ? 'CPU' : 'Memory',
- cpu_xData,
- cpu_Data,
- memory_xData,
- memory_Data,
- }
- this.ranked.legend = this.type === 'cpu' ? cpu_legend : memory_legend
- this.processCpu.xData = cpu_xData
- // this.processCpu.data = res.result.cpu.map((item) => {
- // return {
- // name: item.name,
- // data: item.list.map((el) => el.value),
- // }
- // })
- this.processCpu.data = cpu_Data
- this.processMenbry.xData = memory_xData
- // this.processMenbry.data = res.result.memory.map((item) => {
- // return {
- // name: item.name,
- // data: item.list.map((el) => el.value),
- // }
- // })
- this.processMenbry.data = memory_Data
- this.drawRanked()
- this.drawProcesCpu()
- this.drawProcesMenbry()
- }).finally(() => {
- hide()
- })
+ this.setTableData()
+
+ let cpu_xData = res.result.cpu[0].list.map((item) => {
+ return dateFormat(new Date(item.date * 1000), 'hh:mm')
+ })
+ let cpu_Data = res.result.cpu.map((item) => {
+ return {
+ name: item.name,
+ data: item.list.map((el) => Number((el.value * 100).toFixed(2))),
+ }
+ })
+ let cpu_legend = res.result.cpu.map((item) => {
+ return item.name
+ })
+ let memory_xData = res.result.memory[0].list.map((item) => {
+ return dateFormat(new Date(item.date * 1000), 'hh:mm')
+ })
+ let memory_Data = res.result.memory.map((item) => {
+ return {
+ name: item.name,
+ data: item.list.map((el) => Number((el.value * 100).toFixed(2))),
+ }
+ })
+ let memory_legend = res.result.memory.map((item) => {
+ return item.name
+ })
+
+ this.rankData = {
+ type: this.type === 'cpu' ? 'CPU' : 'Memory',
+ cpu_xData,
+ cpu_Data,
+ memory_xData,
+ memory_Data,
+ }
+ this.ranked.legend = this.type === 'cpu' ? cpu_legend : memory_legend
+ this.processCpu.xData = cpu_xData
+ // this.processCpu.data = res.result.cpu.map((item) => {
+ // return {
+ // name: item.name,
+ // data: item.list.map((el) => el.value),
+ // }
+ // })
+ this.processCpu.data = cpu_Data
+ this.processMenbry.xData = memory_xData
+ // this.processMenbry.data = res.result.memory.map((item) => {
+ // return {
+ // name: item.name,
+ // data: item.list.map((el) => el.value),
+ // }
+ // })
+ this.processMenbry.data = memory_Data
+ this.drawRanked()
+ this.drawProcesCpu()
+ this.drawProcesMenbry()
+ })
+ .finally(() => {
+ // hide()
+ this.spinning = false
+ })
},
getBeforeHours(num) {
let currentTime = moment()
diff --git a/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue b/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue
index 62c74fe..2a7ec0b 100644
--- a/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/ConfigUserLibraryModal.vue
@@ -7,24 +7,28 @@
: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"
>
-
-
@@ -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
}
- }
- }
+ },
+ },
}
diff --git a/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue b/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue
index e8f25a4..b356b6b 100644
--- a/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/LoadFromDBModal.vue
@@ -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
diff --git a/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue b/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue
index 1b15adf..7c2ede9 100644
--- a/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue
+++ b/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue
@@ -202,7 +202,7 @@