easycomponentstools 1.0.0-dev.10 → 1.0.0-dev.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<slot name="moreActions"></slot>
|
|
43
43
|
<ExportData
|
|
44
44
|
v-if="showExportData"
|
|
45
|
-
ref="
|
|
45
|
+
ref="exportDataRef"
|
|
46
46
|
@loading="(v: boolean) => emit('loading', v)"
|
|
47
47
|
></ExportData>
|
|
48
48
|
</v-list>
|
|
@@ -65,6 +65,7 @@ import { nextTick, onMounted, ref, Ref } from 'vue'
|
|
|
65
65
|
import useHeadersStorage from '../../../composables/useHeadersStorage'
|
|
66
66
|
import Filters from './Filters.vue'
|
|
67
67
|
import DialogColumns from './DialogColumns.vue'
|
|
68
|
+
import ExportData from './ExportData.vue'
|
|
68
69
|
|
|
69
70
|
type propsType = {
|
|
70
71
|
id: string
|
|
@@ -83,7 +84,7 @@ const $i18n = useI18n()
|
|
|
83
84
|
const $useHeadersStorage = useHeadersStorage()
|
|
84
85
|
const emit = defineEmits(['loading', 'headers', 'search', 'hardFilters', 'multipleDelete'])
|
|
85
86
|
const active_hard_filters: Ref<any[]> = ref([])
|
|
86
|
-
const
|
|
87
|
+
const exportDataRef: any = ref(null)
|
|
87
88
|
|
|
88
89
|
const updateHardFilters = (hard_filters_keys: any) => {
|
|
89
90
|
const hard_filters: HardFiltersDTO[] = []
|
|
@@ -97,27 +98,27 @@ const updateHardFilters = (hard_filters_keys: any) => {
|
|
|
97
98
|
})
|
|
98
99
|
}
|
|
99
100
|
})
|
|
100
|
-
|
|
101
|
+
exportDataRef.value?.setHardFilters(hard_filters)
|
|
101
102
|
emit('hardFilters', hard_filters)
|
|
102
103
|
}
|
|
103
104
|
const multipleDelete = () => {
|
|
104
105
|
emit('multipleDelete', true)
|
|
105
106
|
}
|
|
106
107
|
const search = (filters: AdvancedFiltersDTO[]) => {
|
|
107
|
-
|
|
108
|
+
exportDataRef.value?.setFilters(filters)
|
|
108
109
|
emit('search', filters)
|
|
109
110
|
}
|
|
110
111
|
const submitHeaders = (headers: HeaderDTO[]) => {
|
|
111
112
|
$useHeadersStorage.submitHeaders(headers, props.id)
|
|
112
113
|
const displayHeaders = headers.filter((v) => !v.hidden)
|
|
113
114
|
emit('headers', displayHeaders)
|
|
114
|
-
|
|
115
|
+
exportDataRef.value?.setHeaders(displayHeaders)
|
|
115
116
|
}
|
|
116
117
|
const updateExportSortData = (sort: SortDTO) => {
|
|
117
|
-
|
|
118
|
+
exportDataRef.value?.setSort(sort)
|
|
118
119
|
}
|
|
119
120
|
const updateExportDataTotal = (total: number) => {
|
|
120
|
-
|
|
121
|
+
exportDataRef.value?.setTotal(total)
|
|
121
122
|
}
|
|
122
123
|
const updateExportData = (
|
|
123
124
|
api: string,
|
|
@@ -129,7 +130,14 @@ const updateExportData = (
|
|
|
129
130
|
) => {
|
|
130
131
|
const displayHeaders = headers.filter((header: HeaderDTO) => !header.hidden)
|
|
131
132
|
nextTick(() => {
|
|
132
|
-
|
|
133
|
+
exportDataRef.value?.setExportDataInfo(
|
|
134
|
+
api,
|
|
135
|
+
displayHeaders,
|
|
136
|
+
total,
|
|
137
|
+
sort,
|
|
138
|
+
filters,
|
|
139
|
+
hard_filters
|
|
140
|
+
)
|
|
133
141
|
})
|
|
134
142
|
}
|
|
135
143
|
|