处理 Database Monitor 页面跳转后,下拉框不对应问题

This commit is contained in:
任珮宇 2024-02-05 14:41:21 +08:00
parent d59fd9a75e
commit 864ad75ce3
3 changed files with 15 additions and 26 deletions

View File

@ -11,8 +11,9 @@
:customRow="customRow"
:rowClassName="() => (canSelect ? 'custom-table-row' : '')"
@change="handleTableChange"
:scroll="{ y: 186 }"
:scroll="scroll"
>
<!-- :scroll="{ y: 186 }" -->
<!-- 处理 scopedSlots -->
<template v-for="slotName of scopedSlotsKeys" :slot="slotName" slot-scope="text, record, index">
<slot :name="slotName" :text="text" :record="record" :index="index"></slot>
@ -58,6 +59,7 @@ export default {
type: Boolean,
default: false,
},
scroll: { type: Object },
},
data() {
return {

View File

@ -49,8 +49,7 @@
<script>
import moment from 'moment'
import dateFormat from '@/components/jeecg/JEasyCron/format-date'
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
import { getAction } from '@/api/manage'
export default {
props: {
value: {
@ -76,6 +75,9 @@ export default {
mounted() {
this.getDbList()
},
activated() {
this.getDbList()
},
methods: {
getBeforeHours(num) {
let currentTime = moment()
@ -94,8 +96,10 @@ export default {
// urlsourceId
if (sourceId) {
const find = res.result.find((item) => item.sourceId == sourceId)
if (find) {
if (find && find.hostId) {
this.value.hostId = find.hostId
} else {
this.value.hostId = `my${find.sourceId}`
}
}
if (!this.value.hostId) {
@ -103,7 +107,7 @@ export default {
}
this.DbOptions = res.result.map((item, index) => {
let str = `my${index}`
let str = `my${item.sourceId}`
return {
label: item.sourceName,
value: item.hostId || str,

View File

@ -74,35 +74,17 @@
<div class="service-content-center">
<a-row :gutter="20">
<a-col :span="12">
<BoxTitle title="Process CPU usage(%)">
<!-- <template slot="right">
<ul class="legend-list">
<li v-for="(item, index) in processCpu.legend" :key="index">
<div :style="`background:${processCpu.color[index]}`" class="li-icon"></div>
{{ item }}
</li>
</ul>
</template> -->
</BoxTitle>
<BoxTitle title="Process CPU usage(%)" />
<div class="service-content-center-item" id="processCpu"></div>
</a-col>
<a-col :span="12">
<BoxTitle title="Process memory usage(%)">
<!-- <template slot="right">
<ul class="legend-list">
<li v-for="(item, index) in processMenbry.legend" :key="index">
<div :style="`background:${processMenbry.color[index]}`" class="li-icon"></div>
{{ item }}
</li>
</ul>
</template> -->
</BoxTitle>
<BoxTitle title="Process memory usage(%)" />
<div class="service-content-center-item" id="menbry"></div>
</a-col>
</a-row>
</div>
<div class="service-content-table">
<BoxTitle title="Service"></BoxTitle>
<BoxTitle title="Service" />
<div style="padding-top: 10px">
<TableList
size="middle"
@ -112,6 +94,7 @@
:loading="loading"
:pagination="false"
:canSelect="false"
:scroll="{ y: 186 }"
>
</TableList>
<!-- <a-pagination