|
@@ -76,11 +76,10 @@
|
|
|
:load="load"
|
|
|
:tree-props="{ children: 'children', hasChildren: 'sublevel' }"
|
|
|
show-summary
|
|
|
- :summary-method="getSummaries"
|
|
|
row-key="id"
|
|
|
>
|
|
|
<template #tableHeader>
|
|
|
- <el-select v-model="state.AreaCode" placeholder="请选择区域" @change="handleQuery" clearable>
|
|
|
+ <el-select v-model="state.AreaCode" placeholder="请选择区域" @change="handleQuery" clearable style="max-width: 220px;">
|
|
|
<el-option :label="item.areaName" :value="item.id" v-for="item in areaOptions" :key="item.id" />
|
|
|
</el-select>
|
|
|
</template>
|
|
@@ -189,25 +188,6 @@ const load = (row: any, treeNode: unknown, resolve: (date: any[]) => void) => {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
|
-// 合计
|
|
|
-const getSummaries = (param: any) => {
|
|
|
- const { columns } = param;
|
|
|
- const sums: string[] = [];
|
|
|
- columns.forEach((column: { property: string }, index: number) => {
|
|
|
- switch (column.property) {
|
|
|
- case 'name':
|
|
|
- sums[index] = state.totalCount?.name;
|
|
|
- break;
|
|
|
- case 'num':
|
|
|
- sums[index] = state.totalCount?.num;
|
|
|
- break;
|
|
|
- default:
|
|
|
- sums[index] = '';
|
|
|
- break;
|
|
|
- }
|
|
|
- });
|
|
|
- return sums;
|
|
|
-};
|
|
|
const areaOptions = ref<any>([]);
|
|
|
const getBaseData = async () => {
|
|
|
try {
|