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-col :span="12" style="height: 26px">
<a-row style="height: 100%"> <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-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-key">OS Version:</a-col>
<a-col :span="12" class="basic-info-detail-content-val">{{ detailInfo.osVersion }}</a-col> --> <a-col :span="12" class="basic-info-detail-content-val">{{ detailInfo.osVersion }}</a-col> -->
</a-row> </a-row>
@ -174,7 +174,7 @@
<a-col :span="12" style="height: 26px"> <a-col :span="12" style="height: 26px">
<a-row style="height: 100%"> <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-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-row>
</a-col> </a-col>
</a-row> </a-row>
@ -205,7 +205,7 @@
<a-row style="height: 26px"> <a-row style="height: 26px">
<a-col :span="6" style="height: 26px" class="basic-info-detail-content-key">Manufacturer:</a-col> <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" <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>
<a-row style="height: 26px"> <a-row style="height: 26px">
@ -249,25 +249,22 @@
<a-row style="height: 26px"> <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="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" <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>
<a-row style="height: 26px"> <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="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"> <a-col :span="17" style="height: 26px" class="basic-info-detail-content-val">{{ detailInfo.startTime }}</a-col>
{{ detailInfo.osVersion }}
</a-col>
</a-row> </a-row>
<a-row style="height: 26px"> <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="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" <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>
<a-row style="height: 26px"> <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="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" <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-row>
</a-col> </a-col>

View File

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

View File

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