diff --git a/dbm-ui/frontend/src/components/db-table/index.vue b/dbm-ui/frontend/src/components/db-table/index.vue index ddbeb19785..77595e71e7 100644 --- a/dbm-ui/frontend/src/components/db-table/index.vue +++ b/dbm-ui/frontend/src/components/db-table/index.vue @@ -123,7 +123,6 @@ releateUrlQuery?: boolean, // 没提供默认使用浏览器窗口的高度 window.innerHeight containerHeight?: number, - pageOffsetBottom?: number, } interface Emits { @@ -153,7 +152,6 @@ primaryKey: 'id', releateUrlQuery: false, containerHeight: undefined, - pageOffsetBottom: 48, }); const emits = defineEmits(); @@ -498,7 +496,7 @@ const totalHeight = props.containerHeight ? props.containerHeight : window.innerHeight; const tableHeaderHeight = 42; const paginationHeight = 60; - const pageOffsetBottom = props.containerHeight ? 0 : props.pageOffsetBottom; + const pageOffsetBottom = props.containerHeight ? 0 : 20; const tableRowHeight = 42; const tableRowTotalHeight = totalHeight - top - tableHeaderHeight - paginationHeight - pageOffsetBottom; diff --git a/dbm-ui/frontend/src/views/monitor-alarm-db/monitor-strategy/components/content/Index.vue b/dbm-ui/frontend/src/views/monitor-alarm-db/monitor-strategy/components/content/Index.vue index 47cebe6b89..d756728ab1 100644 --- a/dbm-ui/frontend/src/views/monitor-alarm-db/monitor-strategy/components/content/Index.vue +++ b/dbm-ui/frontend/src/views/monitor-alarm-db/monitor-strategy/components/content/Index.vue @@ -25,8 +25,7 @@ ref="tableRef" class="table-box" :columns="columns" - :data-source="queryMonitorPolicyList" - :page-offset-bottom="35" /> + :data-source="queryMonitorPolicyList" /> { - const isNotActive = row.status === RuleStatus.TERMINATED || row.status === RuleStatus.EXPIRED; + const isNotActive = [RuleStatus.TERMINATED, RuleStatus.EXPIRED].includes(row.status as RuleStatus); const color = (isNotActive || !row.is_enabled) ? '#63656E' : '#3A84FF'; return { - contactList.value = res.results.filter(item => !tagsList.value?.includes(item.username)) - .map(item => ({ label: item.username, value: item.username })); + contactList.value = res.results.reduce((results, item) => { + if (!tagsList.value?.includes(item.username)) { + const obj = { label: item.username, value: item.username }; + results.push(obj); + } + return results; + }, [] as { label: string, value: string }[]); }, });