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

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