diff --git a/src/components/Cards/SummaryCard/index.vue b/src/components/Cards/SummaryCard/index.vue index 2c80101a0..b85b3ce55 100644 --- a/src/components/Cards/SummaryCard/index.vue +++ b/src/components/Cards/SummaryCard/index.vue @@ -1,19 +1,19 @@ @@ -76,10 +70,11 @@ export default { }, data() { return { - iFilters: this.cleanFilters(), - iSummary: this.cleanSummary(), + iFilters: [], + iSummary: [], filtered: {}, - activeFilters: [] + activeFilters: [], + reCount: false } }, computed: { @@ -92,7 +87,32 @@ export default { } } }, + watch: { + tableUrl() { + this.generateCount() + } + }, + mounted() { + this.iFilters = this.cleanFilters() + this.iSummary = this.cleanSummary() + this.generateCount() + }, methods: { + async generateCount() { + this.iFilters.forEach(category => { + category.options.forEach(option => { + if (option.hasCount) { + option.count = null + this.getCount(option) + } + }) + }) + + this.iSummary.forEach(item => { + item.count = null + this.getCount(item) + }) + }, async getCount(item) { if (item.count || item.count === 0) { return item.count @@ -117,6 +137,7 @@ export default { category: 'summary', label: item.title, ...item, + count: null, filter: item.filter || {}, active: false } @@ -170,138 +191,138 @@ export default { } diff --git a/src/components/Table/TreeTable/index.vue b/src/components/Table/TreeTable/index.vue index e97879b1b..63458212b 100644 --- a/src/components/Table/TreeTable/index.vue +++ b/src/components/Table/TreeTable/index.vue @@ -7,7 +7,9 @@ :style="{width: treeWidth}" class="left" > - {{ $t('AssetTree') }} + + {{ $t('AssetTree') }} +