第二步:标题会显示所有数据的总数
This commit is contained in:
@@ -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; // 所有数据的总数
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 接收父组件方法
|
// 接收父组件方法
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
:table-data-list="tableDatas"
|
:table-data-list="tableDatas"
|
||||||
:table-columns="tableColumns"
|
:table-columns="tableColumns"
|
||||||
:page-option="paginationConfig"
|
:page-option="paginationConfig"
|
||||||
|
:total-data-count="allDataCount"
|
||||||
@change-conditions="changeConditions"
|
@change-conditions="changeConditions"
|
||||||
@change-current-page="changeCurrentPage"
|
@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([
|
||||||
|
|||||||
Reference in New Issue
Block a user