fix: 修改告警系统和监控项

This commit is contained in:
duwenyuan 2026-05-12 10:28:23 +08:00
parent 1c8de3ecfb
commit a5a53801c6
3 changed files with 57 additions and 65 deletions

View File

@ -158,7 +158,7 @@
<a-col :span="12" style="height: 26px">
<a-row style="height: 100%">
<a-col :span="12" class="basic-info-detail-content-key">Bios Version:</a-col>
<a-col :span="12" class="basic-info-detail-content-val">FX705GM.307</a-col>
<a-col :span="12" class="basic-info-detail-content-val">{{ detailInfo.biosVersion }}</a-col>
<!-- <a-col :span="12" class="basic-info-detail-content-key">OS Version:</a-col>
<a-col :span="12" class="basic-info-detail-content-val">{{ detailInfo.osVersion }}</a-col> -->
</a-row>
@ -174,7 +174,7 @@
<a-col :span="12" style="height: 26px">
<a-row style="height: 100%">
<a-col :span="12" class="basic-info-detail-content-key">Kernel version:</a-col>
<a-col :span="12" class="basic-info-detail-content-val">2000</a-col>
<a-col :span="12" class="basic-info-detail-content-val">{{ detailInfo.kernelVersion}}</a-col>
</a-row>
</a-col>
</a-row>
@ -205,7 +205,7 @@
<a-row style="height: 26px">
<a-col :span="6" style="height: 26px" class="basic-info-detail-content-key">Manufacturer:</a-col>
<a-col :span="18" style="height: 26px" class="basic-info-detail-content-val"
>ASUSTeK COMPUTER INC.</a-col
>{{ detailInfo.manufacturer }}</a-col
>
</a-row>
<a-row style="height: 26px">
@ -249,25 +249,22 @@
<a-row style="height: 26px">
<a-col :span="7" style="height: 26px" class="basic-info-detail-content-key">OS Version:</a-col>
<a-col :span="17" style="height: 26px" class="basic-info-detail-content-val"
>2023-03-01 14:00:01</a-col
>
>{{ detailInfo.osVersion }}</a-col>
</a-row>
<a-row style="height: 26px">
<a-col :span="7" style="height: 26px" class="basic-info-detail-content-key">Start Time:</a-col>
<a-col :span="17" style="height: 26px" class="basic-info-detail-content-val">
{{ detailInfo.osVersion }}
</a-col>
<a-col :span="17" style="height: 26px" class="basic-info-detail-content-val">{{ detailInfo.startTime }}</a-col>
</a-row>
<a-row style="height: 26px">
<a-col :span="7" style="height: 26px" class="basic-info-detail-content-key">Model Number:</a-col>
<a-col :span="17" style="height: 26px" class="basic-info-detail-content-val"
>TUF GamingFX705GM_FX86SM</a-col
>{{ detailInfo.modelNumber }}</a-col
>
</a-row>
<a-row style="height: 26px">
<a-col :span="7" style="height: 26px" class="basic-info-detail-content-key">Bios Supplier:</a-col>
<a-col :span="17" style="height: 26px" class="basic-info-detail-content-val"
>American Megatrends lnc.</a-col
>{{ detailInfo.biosSupplier }}</a-col
>
</a-row>
</a-col>

View File

@ -4,39 +4,21 @@
<a-row type="flex" :gutter="10">
<a-col flex="265px">
<span class="item-label">Server</span>
<a-select
style="width: 180px"
v-model="queryParams.server"
placeholder="select..."
:filter-option="filterOption"
show-arrow
allowClear
:options="serverOptions"
@change="onServerChange"
>
<a-select style="width: 180px" v-model="queryParams.server" placeholder="select..."
:filter-option="filterOption" show-arrow allowClear :options="serverOptions" @change="onServerChange">
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-col>
<a-col flex="265px">
<span class="item-label">Time</span>
<a-select
style="width: 180px"
v-model="queryParams.timer"
placeholder="select..."
show-arrow
allowClear
:options="timerOptions"
@change="onTimeChange"
>
<a-select style="width: 180px" v-model="queryParams.timer" placeholder="select..." show-arrow allowClear
:options="timerOptions" @change="onTimeChange">
<img slot="suffixIcon" src="@/assets/images/global/select-down.png" alt="" />
</a-select>
</a-col>
<a-col flex="265px">
<a-range-picker
:show-time="true"
:value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
@change="onRangeDateChange"
/>
<a-range-picker :show-time="true" :value="[moment(queryParams.startDate), moment(queryParams.endDate)]"
@change="onRangeDateChange" />
</a-col>
</a-row>
<div class="service-search-btns">
@ -44,16 +26,10 @@
<img class="icon-add" src="@/assets/images/global/reset-pwd.png" alt="" />
<span style="margin-left: 10px"> Refresh </span>
</a-button>
<a-button
:class="['service-search-btns-ant', type == 'cpu' ? 'service-search-btns-active' : '']"
@click="handleCpu"
>CPU</a-button
>
<a-button
:class="['service-search-btns-ant', type == 'memory' ? 'service-search-btns-active' : '']"
@click="handleMemory"
>Memory</a-button
>
<a-button :class="['service-search-btns-ant', type == 'cpu' ? 'service-search-btns-active' : '']"
@click="handleCpu">CPU</a-button>
<a-button :class="['service-search-btns-ant', type == 'memory' ? 'service-search-btns-active' : '']"
@click="handleMemory">Memory</a-button>
</div>
</div>
<div class="service-content">
@ -86,16 +62,8 @@
<div class="service-content-table">
<BoxTitle title="Service" />
<div style="padding-top: 10px">
<TableList
size="middle"
rowKey="id"
:columns="columns"
:list="dataSource"
:loading="loading"
:pagination="false"
:canSelect="false"
:scroll="{ y: 186 }"
>
<TableList size="middle" rowKey="id" :columns="columns" :list="dataSource" :loading="loading"
:pagination="false" :canSelect="false" :scroll="{ y: 186 }">
</TableList>
<!-- <a-pagination
size="small"
@ -212,6 +180,7 @@ export default {
},
data() {
return {
list: null,
spinning: false,
type: 'cpu',
queryParams: {
@ -283,7 +252,7 @@ export default {
mounted() {
this.getServerList()
this.$nextTick(() => {
setTimeout(() => {}, 0)
setTimeout(() => { }, 0)
})
},
watch: {
@ -319,6 +288,10 @@ export default {
this.spinning = true
getAction('/systemMonitor/queryHostDetails', params)
.then((res) => {
if (!res.result || !res.result.cpu || !res.result.memory) {
this.$message.warning('No data available')
return
}
this.list = res.result
this.listData = {
list: this.num === 0 ? this.list.cpu : this.list.memory,
@ -536,7 +509,7 @@ export default {
})
}
this.ranked.content.setOption(option)
window.addEventListener('resize', function () {
window.addEventListener('resize', () => {
this.ranked.content.resize()
})
},
@ -593,16 +566,17 @@ export default {
series: [],
}
option.series = this.processCpu.data.map((item, index) => {
const colorIndex = index % this.processCpu.color.length
return {
type: 'line',
name: item.name,
symbol: 'none',
itemStyle: { normal: { color: this.processCpu.color[index][0] } },
itemStyle: { normal: { color: this.processCpu.color[colorIndex][0] } },
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: this.processCpu.color[index][0] },
{ offset: 1, color: this.processCpu.color[index][1] },
{ offset: 0, color: this.processCpu.color[colorIndex][0] },
{ offset: 1, color: this.processCpu.color[colorIndex][1] },
]),
},
},
@ -610,7 +584,7 @@ export default {
}
})
this.processCpu.content.setOption(option)
window.addEventListener('resize', function () {
window.addEventListener('resize', () => {
this.processCpu.content.resize()
})
},
@ -667,16 +641,17 @@ export default {
series: [],
}
option.series = this.processMenbry.data.map((item, index) => {
const colorIndex = index % this.processMenbry.color.length
return {
type: 'line',
name: item.name,
symbol: 'none',
itemStyle: { normal: { color: this.processMenbry.color[index][0] } },
itemStyle: { normal: { color: this.processMenbry.color[colorIndex][0] } },
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: this.processMenbry.color[index][0] },
{ offset: 1, color: this.processMenbry.color[index][1] },
{ offset: 0, color: this.processMenbry.color[colorIndex][0] },
{ offset: 1, color: this.processMenbry.color[colorIndex][1] },
]),
},
},
@ -684,7 +659,7 @@ export default {
}
})
this.processMenbry.content.setOption(option)
window.addEventListener('resize', function () {
window.addEventListener('resize', () => {
this.processMenbry.content.resize()
})
},
@ -712,9 +687,11 @@ export default {
justify-content: space-between;
padding: 0 10px;
background: rgba(12, 235, 201, 0.05);
.ant-row-flex {
flex-flow: nowrap;
}
.item-label {
display: inline-block;
font-size: 16px;
@ -724,36 +701,45 @@ export default {
height: 32px;
margin-right: 10px;
}
&-btns {
&-ant {
background: #406979;
border: none;
margin-left: 10px;
}
&-active {
background: #1397a3;
}
}
}
.service-content {
height: calc(100% - 60px);
margin-top: 10px;
overflow: hidden;
&-ranked {
height: 210px;
&-box {
height: 170px;
}
}
&-center {
height: 210px;
&-item {
height: 170px;
}
}
&-table {
height: calc(100% - 415px);
position: relative;
.ant-pagination {
position: absolute;
left: 50%;
@ -761,8 +747,10 @@ export default {
transform: translateX(-50%);
}
}
.legend-list {
list-style: none;
li {
float: left;
font-size: 14px;
@ -770,6 +758,7 @@ export default {
font-family: MicrosoftYaHei;
font-weight: normal;
color: #ade6ee;
.li-icon {
display: inline-block;
vertical-align: middle;
@ -781,6 +770,7 @@ export default {
}
}
}
.view-btn {
background-color: #1397a3;
font-family: ArialMT;

View File

@ -293,8 +293,13 @@ export default {
const { inputFileName } = this.sample
const userId = store.getters.userInfo.id
this.isLoading = true
const params = this.roiParamList.map(([startChannel, endChannel], index) => ({
startChannel,
endChannel,
roiNum: index + 1
}))
const formData = new FormData()
formData.append('roiParams', JSON.stringify(params))
formData.append('fileName', inputFileName)
formData.append('processKey', `${userId}_${this.timerStamp}`)
const { success, result, message } = await postAction('/selfStation/Reprocessing', formData)