第二步:标题会显示所有数据的总数

This commit is contained in:
2026-06-26 10:08:34 +08:00
parent 20de7f99ca
commit 4fa650b584
2 changed files with 16 additions and 9 deletions
@@ -17,7 +17,7 @@
v-show="statusStore.uiComponents.disasterChainPointShow.show"
>
<header class="table-title">
<span>灾害链影响点列表</span>
<span>灾害链影响点列表({{ props.totalDataCount ?? props.tableDataList.length }})</span>
</header>
<!-- 搜索 -->
@@ -92,6 +92,7 @@
tableDataList: Point[];
tableColumns: { title: string; key: string }[];
pageOption: PaginationType;
totalDataCount?: number; // 所有数据的总数
}>();
// 接收父组件方法
+14 -8
View File
@@ -8,16 +8,17 @@
<!-- 灾害链影响列表组件 -->
<DisasterChainPointComponent
v-if="
v-if="
statusStore.appLoadingCompleted &&
statusStore.uiComponents.disasterChainPointShow.loading
"
:select-options="selectOptions"
:table-data-list="tableDatas"
:table-columns="tableColumns"
:page-option="paginationConfig"
@change-conditions="changeConditions"
@change-current-page="changeCurrentPage"
:select-options="selectOptions"
:table-data-list="tableDatas"
:table-columns="tableColumns"
:page-option="paginationConfig"
:total-data-count="allDataCount"
@change-conditions="changeConditions"
@change-current-page="changeCurrentPage"
/>
<!-- 左侧按钮组件 -->
@@ -85,7 +86,7 @@
PointType,
HiddenDangerPointTypeMap,
} from '@/types/common/DisasterType.ts';
import { onBeforeMount, watch, provide } from 'vue';
import {onBeforeMount, watch, provide, computed} from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
@@ -113,6 +114,11 @@
setTableDatas,
} = useDisasterChainTable();
// 所有数据的总数(所有类型的脉冲点总和)
const allDataCount = computed(() => {
return aroundAnalysisState.pulsePoints.value?.length || 0;
});
onBeforeMount(() => {
// 设置下拉选项
setSelectOptions([