@aplus-frontend/ui 7.13.9 → 7.13.10
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/es/src/ag-grid/hooks/use-columns.d.ts +2 -0
- package/es/src/ag-grid/hooks/use-columns.mjs +35 -17
- package/es/src/ag-grid/index.vue.mjs +323 -292
- package/es/src/ap-field/date-range/index.vue.mjs +18 -18
- package/es/src/ap-field/date-range/read.vue2.mjs +3 -3
- package/es/src/ap-field/hooks/use-default-presets.mjs +59 -16
- package/es/src/ap-field/interface.d.ts +46 -1
- package/es/src/ap-table/hooks/use-sorted-filtered.d.ts +18 -2
- package/es/src/ap-table/hooks/use-sorted-filtered.mjs +13 -11
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +17 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +148 -142
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +119 -112
- package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -1
- package/es/src/business/ap-export-group/handleExportDownload.mjs +2 -2
- package/es/src/business/ap-export-group/interface.d.ts +9 -0
- package/es/src/config-provider/config-provider-props.d.ts +1 -1
- package/es/src/config-provider/config-provider.d.ts +3 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +1 -0
- package/es/src/config-provider/index.d.ts +6 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-columns.d.ts +2 -0
- package/lib/src/ag-grid/hooks/use-columns.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
- package/lib/src/ap-field/interface.d.ts +46 -1
- package/lib/src/ap-table/hooks/use-sorted-filtered.d.ts +18 -2
- package/lib/src/ap-table/hooks/use-sorted-filtered.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +17 -2
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.js +1 -1
- package/lib/src/business/ap-export-group/interface.d.ts +9 -0
- package/lib/src/config-provider/config-provider-props.d.ts +1 -1
- package/lib/src/config-provider/config-provider.d.ts +3 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -0
- package/lib/src/config-provider/index.d.ts +6 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DownOutlined as
|
|
3
|
-
import { message as
|
|
4
|
-
import { usePermission as
|
|
1
|
+
import { defineComponent as ye, computed as f, ref as Q, watch as ge, createVNode as m, createElementBlock as X, openBlock as d, Fragment as Y, createBlock as g, createCommentVNode as G, unref as t, mergeProps as F, withCtx as c, createTextVNode as _, toDisplayString as P, normalizeClass as V } from "vue";
|
|
2
|
+
import { DownOutlined as xe } from "@ant-design/icons-vue";
|
|
3
|
+
import { message as q, Space as ve, Tooltip as K, Dropdown as he, Menu as ke, MenuItem as Z } from "@aplus-frontend/antdv";
|
|
4
|
+
import { usePermission as be } from "@aplus-frontend/hooks";
|
|
5
5
|
import { IconApAdLineAnnotation as j } from "@aplus-frontend/icon";
|
|
6
|
-
import { transformTableParamsNoTimezone as
|
|
7
|
-
import { merge as
|
|
6
|
+
import { transformTableParamsNoTimezone as Ee, isObjectWithContent as A } from "@aplus-frontend/utils";
|
|
7
|
+
import { merge as N } from "lodash-unified";
|
|
8
8
|
import "../../ap-button/index.mjs";
|
|
9
|
-
import { useInjectApTable as
|
|
9
|
+
import { useInjectApTable as we } from "../../ap-table/context.mjs";
|
|
10
10
|
import "../../config-provider/index.mjs";
|
|
11
|
-
import { ApBatchActionGroup as
|
|
12
|
-
import { convertExportField as
|
|
13
|
-
import { handleExportDownload as
|
|
11
|
+
import { ApBatchActionGroup as De } from "../ap-batch-action-group/index.mjs";
|
|
12
|
+
import { convertExportField as Le } from "./convertExportField.mjs";
|
|
13
|
+
import { handleExportDownload as Re } from "./handleExportDownload.mjs";
|
|
14
14
|
import { ApExportGroupActionType as x } from "./interface.mjs";
|
|
15
|
-
import
|
|
16
|
-
import { useNamespace as
|
|
17
|
-
import { useLocale as
|
|
18
|
-
import { useGlobalConfig as
|
|
19
|
-
import
|
|
20
|
-
const
|
|
15
|
+
import Se from "./style/index.mjs";
|
|
16
|
+
import { useNamespace as Ce } from "../../config-provider/hooks/use-namespace.mjs";
|
|
17
|
+
import { useLocale as Ge } from "../../config-provider/hooks/use-locale.mjs";
|
|
18
|
+
import { useGlobalConfig as Me } from "../../config-provider/hooks/use-global-config.mjs";
|
|
19
|
+
import $ from "../../ap-button/ap-button.vue.mjs";
|
|
20
|
+
const Xe = /* @__PURE__ */ ye({
|
|
21
21
|
__name: "ApExportGroup",
|
|
22
22
|
props: {
|
|
23
23
|
type: {
|
|
@@ -48,44 +48,47 @@ const He = /* @__PURE__ */ fe({
|
|
|
48
48
|
dateValidate: {
|
|
49
49
|
type: [Object, Boolean],
|
|
50
50
|
default: void 0
|
|
51
|
-
}
|
|
51
|
+
},
|
|
52
|
+
handleExported: {}
|
|
52
53
|
},
|
|
53
54
|
setup(ee) {
|
|
54
55
|
const {
|
|
55
|
-
hasPermission:
|
|
56
|
-
} =
|
|
57
|
-
columns:
|
|
58
|
-
dataSource:
|
|
56
|
+
hasPermission: z
|
|
57
|
+
} = be(), s = ee, {
|
|
58
|
+
columns: U,
|
|
59
|
+
dataSource: W,
|
|
59
60
|
getSearchFormValues: te,
|
|
60
61
|
getLastParams: ae
|
|
61
|
-
} =
|
|
62
|
+
} = we(), {
|
|
62
63
|
b: v
|
|
63
|
-
} =
|
|
64
|
+
} = Ce("ap-export-group"), h = Se("ap-export-group"), {
|
|
64
65
|
t: i
|
|
65
|
-
} =
|
|
66
|
+
} = Ge(), B = Me("apExportGroup"), H = f(() => B?.value?.exportField), J = f(() => B?.value?.dateValidate), oe = f(() => B?.value?.handleExported), k = f(() => J.value === !0 ? {
|
|
66
67
|
maxDayRange: 90,
|
|
67
|
-
smartIdentify: !0
|
|
68
|
-
|
|
68
|
+
smartIdentify: !0,
|
|
69
|
+
enableMessage: !0
|
|
70
|
+
} : J.value), b = f(() => s?.dateValidate === !0 ? {
|
|
69
71
|
maxDayRange: 90,
|
|
70
|
-
smartIdentify: !0
|
|
71
|
-
|
|
72
|
+
smartIdentify: !0,
|
|
73
|
+
enableMessage: !0
|
|
74
|
+
} : s?.dateValidate), S = Q(!1), I = Q(!1), C = f(() => !!s?.disabled || (W !== void 0 ? !W?.value?.length : !1) || S.value), ne = (e) => e === void 0 ? !1 : typeof e == "object" ? N({}, e) : e === !0 ? {} : e, E = (...e) => {
|
|
72
75
|
let a = !1;
|
|
73
76
|
for (const o of e)
|
|
74
77
|
if (o !== void 0)
|
|
75
78
|
if (o === !1)
|
|
76
79
|
a = !1;
|
|
77
80
|
else {
|
|
78
|
-
const r =
|
|
79
|
-
r !== !1 && (a = a === !1 ? r :
|
|
81
|
+
const r = ne(o);
|
|
82
|
+
r !== !1 && (a = a === !1 ? r : N({}, a, r));
|
|
80
83
|
}
|
|
81
84
|
return a;
|
|
82
85
|
};
|
|
83
|
-
|
|
84
|
-
C.value && (
|
|
86
|
+
ge(() => C.value, () => {
|
|
87
|
+
C.value && (I.value = !1);
|
|
85
88
|
}, {
|
|
86
89
|
immediate: !0
|
|
87
90
|
});
|
|
88
|
-
const
|
|
91
|
+
const se = f(() => s?.successMessage === !0 ? i("ap.apExportGroup.exportSuccess") : s?.successMessage ? s.successMessage : ""), re = (e = s?.exportField) => {
|
|
89
92
|
const a = "exportFieldList", o = e ?? (H.value === "" ? !0 : H.value) ?? !1;
|
|
90
93
|
return o === !0 ? {
|
|
91
94
|
key: a
|
|
@@ -93,56 +96,58 @@ const He = /* @__PURE__ */ fe({
|
|
|
93
96
|
...o,
|
|
94
97
|
key: o.key ?? a
|
|
95
98
|
} : o;
|
|
96
|
-
},
|
|
99
|
+
}, le = {
|
|
97
100
|
textAlign: "center"
|
|
98
|
-
}, T =
|
|
101
|
+
}, T = f(() => s?.selectedRowKeys || []), O = f(() => {
|
|
99
102
|
let e = s?.ifShow;
|
|
100
|
-
return !s?.ifShow && s?.auth && (e = () =>
|
|
103
|
+
return !s?.ifShow && s?.auth && (e = () => z(s.auth)), e?.() ?? !0;
|
|
101
104
|
});
|
|
102
|
-
async function
|
|
103
|
-
T.value.length > 0 ?
|
|
105
|
+
async function ue() {
|
|
106
|
+
T.value.length > 0 ? M({
|
|
104
107
|
key: x.SELECT
|
|
105
|
-
}) :
|
|
108
|
+
}) : M({
|
|
106
109
|
key: x.ALL
|
|
107
110
|
});
|
|
108
111
|
}
|
|
109
|
-
async function
|
|
112
|
+
async function M({
|
|
110
113
|
key: e,
|
|
111
114
|
option: a
|
|
112
115
|
}) {
|
|
113
|
-
const o =
|
|
116
|
+
const o = N({}, s, a || {}), {
|
|
114
117
|
getRequestParams: r,
|
|
115
118
|
request: D
|
|
116
|
-
} = o || {}, n = ae?.()?.sort, l = n ?
|
|
119
|
+
} = o || {}, n = ae?.()?.sort, l = n ? Ee({
|
|
117
120
|
sort: n
|
|
118
|
-
}) : {}, u =
|
|
121
|
+
}) : {}, u = re(o?.exportField);
|
|
119
122
|
let p = {};
|
|
120
123
|
e === x.SELECT ? p = {
|
|
121
124
|
[o?.idKey || "ids"]: T.value
|
|
122
125
|
} : e === x.ALL && (p = r?.() || te?.(!0) || {});
|
|
123
|
-
const
|
|
126
|
+
const y = o?.getInitialParams?.() || {};
|
|
124
127
|
try {
|
|
125
|
-
|
|
126
|
-
let
|
|
128
|
+
S.value = !0;
|
|
129
|
+
let L = Object.assign({
|
|
127
130
|
...p,
|
|
128
|
-
...
|
|
131
|
+
...y,
|
|
129
132
|
...l
|
|
130
|
-
}, u &&
|
|
131
|
-
[u.key]:
|
|
133
|
+
}, u && U?.value ? {
|
|
134
|
+
[u.key]: Le(U.value, u?.convertField)
|
|
132
135
|
} : {});
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
params:
|
|
137
|
-
dateValidate:
|
|
138
|
-
})
|
|
136
|
+
L = o?.beforeRequest?.(L) || L;
|
|
137
|
+
const R = E(k.value, b.value, a?.dateValidate);
|
|
138
|
+
A(R) && e === x.ALL && fe({
|
|
139
|
+
params: L,
|
|
140
|
+
dateValidate: R
|
|
141
|
+
});
|
|
142
|
+
const me = await Re(async () => await D?.(L));
|
|
143
|
+
o?.successMessage && q.success(se.value), (o?.handleExported || oe.value)?.(me, L);
|
|
139
144
|
} finally {
|
|
140
|
-
|
|
145
|
+
S.value = !1;
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
|
-
const w =
|
|
148
|
+
const w = f(() => s?.groupList?.filter((e) => {
|
|
144
149
|
let a = e?.ifShow;
|
|
145
|
-
return !e?.ifShow && e?.auth && (a = () =>
|
|
150
|
+
return !e?.ifShow && e?.auth && (a = () => z(e.auth)), a?.() ?? !0;
|
|
146
151
|
})?.map((e, a) => ({
|
|
147
152
|
key: a,
|
|
148
153
|
content: e?.text,
|
|
@@ -151,44 +156,44 @@ const He = /* @__PURE__ */ fe({
|
|
|
151
156
|
disabled: e?.disabled,
|
|
152
157
|
dateValidate: e?.dateValidate,
|
|
153
158
|
onClick: () => {
|
|
154
|
-
T.value.length > 0 ?
|
|
159
|
+
T.value.length > 0 ? M({
|
|
155
160
|
key: x.SELECT,
|
|
156
161
|
option: e
|
|
157
|
-
}) :
|
|
162
|
+
}) : M({
|
|
158
163
|
key: x.ALL,
|
|
159
164
|
option: e
|
|
160
165
|
});
|
|
161
166
|
}
|
|
162
|
-
})) || []),
|
|
167
|
+
})) || []), ie = () => {
|
|
163
168
|
const e = E(k.value, b.value, ...w.value.map((a) => a.dateValidate));
|
|
164
|
-
return
|
|
169
|
+
return m(ve, {
|
|
165
170
|
size: 4
|
|
166
171
|
}, {
|
|
167
|
-
default: () => [
|
|
172
|
+
default: () => [m("span", null, [s?.buttonProps?.content ?? i("ap.apExportGroup.export")]), e !== !1 && A(e) ? m(K, {
|
|
168
173
|
title: i("ap.apExportGroup.maxMessage", {
|
|
169
174
|
maxDayRange: e.maxDayRange ?? 90
|
|
170
175
|
})
|
|
171
176
|
}, {
|
|
172
|
-
default: () => [
|
|
177
|
+
default: () => [m(j, {
|
|
173
178
|
class: [v("icon"), h.value]
|
|
174
179
|
}, null)]
|
|
175
180
|
}) : null]
|
|
176
181
|
});
|
|
177
|
-
},
|
|
182
|
+
}, pe = (e) => Object.keys(e).reduce((a, o) => typeof e?.[o] == "number" && e?.[o] > 1e4 ? {
|
|
178
183
|
...a,
|
|
179
184
|
[o]: e?.[o]
|
|
180
|
-
} : a, {}),
|
|
185
|
+
} : a, {}), de = (e) => {
|
|
181
186
|
const a = Object.keys(e), o = [], r = /* @__PURE__ */ new Set(), D = [];
|
|
182
187
|
for (let n = 0; n < a.length; n++)
|
|
183
188
|
for (let l = n + 1; l < a.length; l++) {
|
|
184
189
|
const u = a[n], p = a[l];
|
|
185
|
-
let
|
|
186
|
-
const
|
|
187
|
-
for (let
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
prefix:
|
|
191
|
-
length:
|
|
190
|
+
let y = "";
|
|
191
|
+
const L = Math.min(u.length, p.length);
|
|
192
|
+
for (let R = 0; R < L && u[R] === p[R]; R++)
|
|
193
|
+
y += u[R];
|
|
194
|
+
y.length >= 3 && D.push({
|
|
195
|
+
prefix: y,
|
|
196
|
+
length: y.length,
|
|
192
197
|
key1: u,
|
|
193
198
|
key2: p,
|
|
194
199
|
diff: Math.abs(e[u] - e[p])
|
|
@@ -204,17 +209,19 @@ const He = /* @__PURE__ */ fe({
|
|
|
204
209
|
}), r.add(n.key1), r.add(n.key2);
|
|
205
210
|
}
|
|
206
211
|
return o;
|
|
207
|
-
},
|
|
212
|
+
}, ce = ({
|
|
208
213
|
startTime: e,
|
|
209
214
|
endTime: a,
|
|
210
215
|
maxDayRange: o
|
|
211
|
-
}) => Math.abs(a - e) <= (o * 24 + 1) * 60 * 60 * 1e3,
|
|
216
|
+
}) => Math.abs(a - e) <= (o * 24 + 1) * 60 * 60 * 1e3, fe = ({
|
|
212
217
|
params: e,
|
|
213
218
|
dateValidate: a
|
|
214
219
|
}) => {
|
|
215
|
-
|
|
220
|
+
if (a.enableMessage === !1)
|
|
221
|
+
return;
|
|
222
|
+
const o = a.maxDayRange ?? 90, r = pe(e), D = [...a.smartIdentify ?? !0 ? de(r) : [], ...a.dateKeyList?.filter((n) => r[n.startKey || ""] && r[n.endKey || ""]) ?? []];
|
|
216
223
|
if (D.length === 0) {
|
|
217
|
-
|
|
224
|
+
q.warn(a?.emptyTooltip ?? i("ap.apExportGroup.emptyTooltip", {
|
|
218
225
|
maxDayRange: o
|
|
219
226
|
}));
|
|
220
227
|
return;
|
|
@@ -222,122 +229,122 @@ const He = /* @__PURE__ */ fe({
|
|
|
222
229
|
startKey: l,
|
|
223
230
|
endKey: u
|
|
224
231
|
}) => {
|
|
225
|
-
const p = r[l || ""],
|
|
226
|
-
return p !== void 0 &&
|
|
232
|
+
const p = r[l || ""], y = r[u || ""];
|
|
233
|
+
return p !== void 0 && y !== void 0 && !ce({
|
|
227
234
|
startTime: p,
|
|
228
|
-
endTime:
|
|
235
|
+
endTime: y,
|
|
229
236
|
maxDayRange: o
|
|
230
237
|
});
|
|
231
238
|
})) {
|
|
232
|
-
|
|
239
|
+
q.warn(a?.maxDayRangeTooltip ?? i("ap.apExportGroup.maxDayRangeTooltip", {
|
|
233
240
|
maxDayRange: o
|
|
234
241
|
}));
|
|
235
242
|
return;
|
|
236
243
|
}
|
|
237
244
|
};
|
|
238
|
-
return (e, a) => (d(), X(Y, null, [
|
|
245
|
+
return (e, a) => (d(), X(Y, null, [O.value && s.type === "button" ? (d(), g(t($), F({
|
|
239
246
|
key: 0
|
|
240
247
|
}, {
|
|
241
248
|
...e.$attrs
|
|
242
249
|
}, {
|
|
243
250
|
class: [t(v)(), t(h)],
|
|
244
251
|
disabled: C.value,
|
|
245
|
-
loading:
|
|
252
|
+
loading: S.value,
|
|
246
253
|
"min-width": "",
|
|
247
|
-
onClick:
|
|
254
|
+
onClick: ue
|
|
248
255
|
}), {
|
|
249
|
-
default: c(() => [_(
|
|
256
|
+
default: c(() => [_(P(s?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(A)(E(k.value, b.value)) ? (d(), g(t(K), {
|
|
250
257
|
key: 0,
|
|
251
258
|
title: t(i)("ap.apExportGroup.maxMessage", {
|
|
252
259
|
maxDayRange: E(k.value, b.value).maxDayRange ?? 90
|
|
253
260
|
})
|
|
254
261
|
}, {
|
|
255
|
-
default: c(() => [
|
|
256
|
-
class:
|
|
262
|
+
default: c(() => [m(t(j), {
|
|
263
|
+
class: V([t(v)("icon"), t(h)])
|
|
257
264
|
}, null, 8, ["class"])]),
|
|
258
265
|
_: 1
|
|
259
266
|
}, 8, ["title"])) : G("", !0)]),
|
|
260
267
|
_: 1
|
|
261
|
-
}, 16, ["class", "disabled", "loading"])) : G("", !0),
|
|
268
|
+
}, 16, ["class", "disabled", "loading"])) : G("", !0), O.value && s.type === "dropdown" ? (d(), g(t(he), {
|
|
262
269
|
key: 1,
|
|
263
|
-
open:
|
|
264
|
-
"onUpdate:open": a[0] || (a[0] = (o) =>
|
|
265
|
-
class:
|
|
266
|
-
"overlay-style":
|
|
270
|
+
open: I.value,
|
|
271
|
+
"onUpdate:open": a[0] || (a[0] = (o) => I.value = o),
|
|
272
|
+
class: V([t(v)(), t(h)]),
|
|
273
|
+
"overlay-style": le,
|
|
267
274
|
disabled: C.value
|
|
268
275
|
}, {
|
|
269
|
-
overlay: c(() => [
|
|
270
|
-
onClick:
|
|
276
|
+
overlay: c(() => [m(t(ke), {
|
|
277
|
+
onClick: M
|
|
271
278
|
}, {
|
|
272
279
|
default: c(() => [(d(), g(t(Z), {
|
|
273
280
|
key: t(x).SELECT,
|
|
274
281
|
disabled: T.value?.length === 0
|
|
275
282
|
}, {
|
|
276
|
-
default: c(() => [_(
|
|
283
|
+
default: c(() => [_(P(t(i)("ap.apExportGroup.exportSelected")), 1)]),
|
|
277
284
|
_: 1
|
|
278
285
|
}, 8, ["disabled"])), (d(), g(t(Z), {
|
|
279
286
|
key: t(x).ALL
|
|
280
287
|
}, {
|
|
281
|
-
default: c(() => [_(
|
|
288
|
+
default: c(() => [_(P(t(i)("ap.apExportGroup.exportAll")), 1)]),
|
|
282
289
|
_: 1
|
|
283
290
|
}))]),
|
|
284
291
|
_: 1
|
|
285
292
|
})]),
|
|
286
|
-
default: c(() => [
|
|
293
|
+
default: c(() => [m(t($), F({
|
|
287
294
|
...e.$attrs
|
|
288
295
|
}, {
|
|
289
|
-
loading:
|
|
296
|
+
loading: S.value
|
|
290
297
|
}), {
|
|
291
|
-
default: c(() => [_(
|
|
298
|
+
default: c(() => [_(P(s?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(A)(E(k.value, b.value)) ? (d(), g(t(K), {
|
|
292
299
|
key: 0,
|
|
293
300
|
title: t(i)("ap.apExportGroup.maxMessage", {
|
|
294
301
|
maxDayRange: E(k.value, b.value).maxDayRange ?? 90
|
|
295
302
|
})
|
|
296
303
|
}, {
|
|
297
|
-
default: c(() => [
|
|
298
|
-
class:
|
|
304
|
+
default: c(() => [m(t(j), {
|
|
305
|
+
class: V([t(v)("icon"), t(h)])
|
|
299
306
|
}, null, 8, ["class"])]),
|
|
300
307
|
_: 1
|
|
301
|
-
}, 8, ["title"])) : G("", !0),
|
|
308
|
+
}, 8, ["title"])) : G("", !0), m(t(xe))]),
|
|
302
309
|
_: 1
|
|
303
310
|
}, 16, ["loading"])]),
|
|
304
311
|
_: 1
|
|
305
|
-
}, 8, ["open", "class", "disabled"])) : G("", !0),
|
|
312
|
+
}, 8, ["open", "class", "disabled"])) : G("", !0), O.value && s.type === "group" ? (d(), X(Y, {
|
|
306
313
|
key: 2
|
|
307
|
-
}, [w.value.length === 1 ? (d(), g(t(
|
|
314
|
+
}, [w.value.length === 1 ? (d(), g(t($), F({
|
|
308
315
|
key: 0
|
|
309
316
|
}, {
|
|
310
317
|
...e.$attrs
|
|
311
318
|
}, {
|
|
312
319
|
class: [t(v)(), t(h)],
|
|
313
320
|
disabled: C.value || w.value?.[0]?.disabled,
|
|
314
|
-
loading:
|
|
321
|
+
loading: S.value,
|
|
315
322
|
"min-width": "",
|
|
316
323
|
onClick: w.value?.[0]?.onClick
|
|
317
324
|
}), {
|
|
318
|
-
default: c(() => [_(
|
|
325
|
+
default: c(() => [_(P(w.value?.[0]?.content ?? s?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(A)(E(k.value, b.value, w.value?.[0]?.dateValidate)) ? (d(), g(t(K), {
|
|
319
326
|
key: 0,
|
|
320
327
|
title: t(i)("ap.apExportGroup.maxMessage", {
|
|
321
328
|
maxDayRange: E(k.value, b.value, w.value?.[0]?.dateValidate).maxDayRange ?? 90
|
|
322
329
|
})
|
|
323
330
|
}, {
|
|
324
|
-
default: c(() => [
|
|
325
|
-
class:
|
|
331
|
+
default: c(() => [m(t(j), {
|
|
332
|
+
class: V([t(v)("icon"), t(h)])
|
|
326
333
|
}, null, 8, ["class"])]),
|
|
327
334
|
_: 1
|
|
328
335
|
}, 8, ["title"])) : G("", !0)]),
|
|
329
336
|
_: 1
|
|
330
|
-
}, 16, ["class", "disabled", "loading", "onClick"])) : (d(), g(t(
|
|
337
|
+
}, 16, ["class", "disabled", "loading", "onClick"])) : (d(), g(t(De), F({
|
|
331
338
|
key: 1
|
|
332
339
|
}, {
|
|
333
340
|
...e.$attrs
|
|
334
341
|
}, {
|
|
335
342
|
class: [t(v)(), t(h)],
|
|
336
343
|
disabled: C.value,
|
|
337
|
-
loading:
|
|
344
|
+
loading: S.value,
|
|
338
345
|
"button-props": {
|
|
339
346
|
...s.buttonProps,
|
|
340
|
-
content:
|
|
347
|
+
content: ie(),
|
|
341
348
|
type: s?.buttonProps?.type ?? "default"
|
|
342
349
|
},
|
|
343
350
|
"menu-list": w.value
|
|
@@ -345,5 +352,5 @@ const He = /* @__PURE__ */ fe({
|
|
|
345
352
|
}
|
|
346
353
|
});
|
|
347
354
|
export {
|
|
348
|
-
|
|
355
|
+
Xe as default
|
|
349
356
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function handleExportDownload(request?: () => Promise<any> | undefined): Promise<
|
|
1
|
+
export declare function handleExportDownload(request?: () => Promise<any> | undefined): Promise<any>;
|
|
@@ -2,12 +2,12 @@ import { Modal as e } from "@aplus-frontend/antdv";
|
|
|
2
2
|
import { formatFileNameAndDownloadFile as a } from "@aplus-frontend/utils";
|
|
3
3
|
async function c(o) {
|
|
4
4
|
const t = await o?.();
|
|
5
|
-
Object.prototype.toString.call(t?.data)
|
|
5
|
+
return Object.prototype.toString.call(t?.data) !== "[object Blob]" || a(t).catch((r) => {
|
|
6
6
|
e.error({
|
|
7
7
|
title: r,
|
|
8
8
|
centered: !0
|
|
9
9
|
});
|
|
10
|
-
});
|
|
10
|
+
}), t;
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
13
|
c as handleExportDownload
|
|
@@ -25,6 +25,11 @@ export type ApExportGroupDateValidate = {
|
|
|
25
25
|
* 筛选日期超出最大天数提示语
|
|
26
26
|
*/
|
|
27
27
|
maxDayRangeTooltip?: string;
|
|
28
|
+
/**
|
|
29
|
+
* 是否开启提示
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
enableMessage?: boolean;
|
|
28
33
|
} | boolean;
|
|
29
34
|
export type ApExportGroupProps = {
|
|
30
35
|
/**
|
|
@@ -92,6 +97,10 @@ export interface ApExportGroupListItem {
|
|
|
92
97
|
* 日期校验配置
|
|
93
98
|
*/
|
|
94
99
|
dateValidate?: ApExportGroupDateValidate;
|
|
100
|
+
/**
|
|
101
|
+
* 导出完成回调
|
|
102
|
+
*/
|
|
103
|
+
handleExported?: (res: any, params: any) => void;
|
|
95
104
|
}
|
|
96
105
|
export declare enum ApExportGroupActionType {
|
|
97
106
|
ALL = "ALL",
|
|
@@ -21,7 +21,7 @@ type ApProCardConfig = {
|
|
|
21
21
|
type ApImageConfig = Pick<ApImageProps, 'uiMode'>;
|
|
22
22
|
type ApTitleConfig = Pick<ApTitleProps, 'uiMode'>;
|
|
23
23
|
type ApFilePreviewConfig = Pick<ApFilePreviewProps, 'parserPlugin'>;
|
|
24
|
-
type ApExportGroupConfig = Pick<ApExportGroupListItem, 'dateValidate' | 'exportField'>;
|
|
24
|
+
type ApExportGroupConfig = Pick<ApExportGroupListItem, 'dateValidate' | 'exportField' | 'handleExported'>;
|
|
25
25
|
export declare const configProviderProps: () => {
|
|
26
26
|
iconPrefixCls: StringConstructor;
|
|
27
27
|
getTargetContainer: {
|
|
@@ -224,6 +224,7 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
224
224
|
[key: string]: string[];
|
|
225
225
|
};
|
|
226
226
|
} | undefined;
|
|
227
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
227
228
|
}>;
|
|
228
229
|
default: () => {};
|
|
229
230
|
};
|
|
@@ -470,6 +471,7 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
470
471
|
[key: string]: string[];
|
|
471
472
|
};
|
|
472
473
|
} | undefined;
|
|
474
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
473
475
|
}>;
|
|
474
476
|
default: () => {};
|
|
475
477
|
};
|
|
@@ -556,6 +558,7 @@ export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
|
|
|
556
558
|
[key: string]: string[];
|
|
557
559
|
};
|
|
558
560
|
} | undefined;
|
|
561
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
559
562
|
};
|
|
560
563
|
api: ApiType;
|
|
561
564
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
@@ -229,6 +229,7 @@ export declare const APConfigProvider: {
|
|
|
229
229
|
[key: string]: string[];
|
|
230
230
|
};
|
|
231
231
|
} | undefined;
|
|
232
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
232
233
|
}>;
|
|
233
234
|
default: () => {};
|
|
234
235
|
};
|
|
@@ -315,6 +316,7 @@ export declare const APConfigProvider: {
|
|
|
315
316
|
[key: string]: string[];
|
|
316
317
|
};
|
|
317
318
|
} | undefined;
|
|
319
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
318
320
|
};
|
|
319
321
|
api: ApiType;
|
|
320
322
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
@@ -539,6 +541,7 @@ export declare const APConfigProvider: {
|
|
|
539
541
|
[key: string]: string[];
|
|
540
542
|
};
|
|
541
543
|
} | undefined;
|
|
544
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
542
545
|
}>;
|
|
543
546
|
default: () => {};
|
|
544
547
|
};
|
|
@@ -625,6 +628,7 @@ export declare const APConfigProvider: {
|
|
|
625
628
|
[key: string]: string[];
|
|
626
629
|
};
|
|
627
630
|
} | undefined;
|
|
631
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
628
632
|
};
|
|
629
633
|
api: ApiType;
|
|
630
634
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
@@ -846,6 +850,7 @@ export declare const APConfigProvider: {
|
|
|
846
850
|
[key: string]: string[];
|
|
847
851
|
};
|
|
848
852
|
} | undefined;
|
|
853
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
849
854
|
}>;
|
|
850
855
|
default: () => {};
|
|
851
856
|
};
|
|
@@ -932,6 +937,7 @@ export declare const APConfigProvider: {
|
|
|
932
937
|
[key: string]: string[];
|
|
933
938
|
};
|
|
934
939
|
} | undefined;
|
|
940
|
+
handleExported?: ((res: any, params: any) => void) | undefined;
|
|
935
941
|
};
|
|
936
942
|
api: ApiType;
|
|
937
943
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.13.
|
|
1
|
+
declare const _default: "7.13.10";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { DefaultSortOrderType } from '../../ap-table/hooks/use-sorted-filtered';
|
|
2
3
|
import { AgGridColumnType, AgGridProps } from '../interface';
|
|
3
4
|
/**
|
|
4
5
|
* 维护/更新表格将要显示的类
|
|
@@ -8,4 +9,5 @@ export declare const useColumns: <RecordType>(props: AgGridProps<RecordType>) =>
|
|
|
8
9
|
shownColumns: Ref<AgGridColumnType<RecordType>[], AgGridColumnType<RecordType>[]>;
|
|
9
10
|
columnKeys: ComputedRef<string[]>;
|
|
10
11
|
getTargetColumnByKey: (key?: string) => AgGridColumnType<RecordType> | undefined;
|
|
12
|
+
defaultSortOrder: ComputedRef<DefaultSortOrderType | undefined>;
|
|
11
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("../utils.js"),m=u=>{const t=o.ref([]),l=o.ref([]);function i(){return u.columns?.filter(e=>!e.hideInTable)||[]}function d(e){return t.value.find(n=>c.getStringKey(n.key)===e)}const a=o.computed(()=>t.value.map(e=>c.getStringKey(e.key)).filter(Boolean));o.watch(()=>u.columns,()=>{const e=i();t.value=e,l.value=e,u.onShownColumnsChange?.(e)},{deep:!0,immediate:!0});function s(e){for(const n of e)if(n.children){const r=s(n.children);if(r)return r}else if(n.defaultSortOrder){const r=n.field??n.dataIndex??n.key;return{colKey:n.key,field:r,order:n.defaultSortOrder}}}const f=o.computed(()=>s(t.value));return{columns:t,shownColumns:l,columnKeys:a,getTargetColumnByKey:d,defaultSortOrder:f}};exports.useColumns=m;
|