@aplus-frontend/ui 7.13.1 → 7.13.3
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/components/empty/index.vue.d.ts +4 -1
- package/es/src/ag-grid/components/empty/index.vue2.mjs +20 -10
- package/es/src/ag-grid/editable/form-item.vue.mjs +9 -8
- package/es/src/ag-grid/editable/index.vue.mjs +1 -0
- package/es/src/ag-grid/index.vue.mjs +54 -51
- package/es/src/ag-grid/interface.d.ts +4 -0
- package/es/src/ag-grid/style/index.mjs +5 -5
- package/es/src/ap-field/interface.d.ts +5 -0
- package/es/src/ap-field/select/index.vue.d.ts +2 -0
- package/es/src/ap-field/select/index.vue.mjs +150 -124
- package/es/src/ap-field/select/read.vue2.mjs +2 -1
- package/es/src/ap-field/select/use-select-options.mjs +12 -30
- package/es/src/ap-field/style/select.mjs +30 -19
- package/es/src/ap-form/items/select/index.vue.d.ts +12 -2
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +135 -128
- package/es/src/ap-table/constants.d.ts +6 -1
- package/es/src/business/ap-attachment/style/index.mjs +3 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +296 -161
- package/es/src/business/ap-export-group/index.d.ts +4 -1
- package/es/src/business/ap-export-group/interface.d.ts +31 -0
- package/es/src/business/ap-export-group/style/index.d.ts +5 -0
- package/es/src/business/ap-export-group/style/index.mjs +17 -0
- package/es/src/business/ap-file-preview/utils/create-file-preview-modal.mjs +3 -2
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
- package/es/src/business/ap-view/style/index.mjs +3 -2
- package/es/src/config-provider/config-provider-props.d.ts +7 -6
- package/es/src/config-provider/config-provider-props.mjs +4 -4
- package/es/src/config-provider/config-provider.d.ts +35 -11
- package/es/src/config-provider/config-provider.mjs +24 -24
- package/es/src/config-provider/hooks/use-global-config.d.ts +14 -6
- package/es/src/config-provider/index.d.ts +65 -17
- package/es/src/locale/lang/en.mjs +7 -3
- package/es/src/locale/lang/zh-cn.mjs +6 -2
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/empty/index.vue.d.ts +4 -1
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +4 -0
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +5 -0
- package/lib/src/ap-field/select/index.vue.d.ts +2 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/select/use-select-options.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +12 -2
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +6 -1
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/index.d.ts +4 -1
- package/lib/src/business/ap-export-group/interface.d.ts +31 -0
- package/lib/src/business/ap-export-group/style/index.d.ts +5 -0
- package/lib/src/business/ap-export-group/style/index.js +1 -0
- package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +7 -6
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +35 -11
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +14 -6
- package/lib/src/config-provider/index.d.ts +65 -17
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DownOutlined as
|
|
3
|
-
import { message as
|
|
4
|
-
import { usePermission as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { defineComponent as ce, computed as x, ref as Q, watch as fe, createVNode as y, createElementBlock as X, openBlock as c, Fragment as Y, createBlock as v, createCommentVNode as P, unref as t, mergeProps as V, withCtx as f, createTextVNode as A, toDisplayString as M, normalizeClass as K } from "vue";
|
|
2
|
+
import { DownOutlined as me } from "@ant-design/icons-vue";
|
|
3
|
+
import { message as q, Space as ye, Tooltip as j, Dropdown as ge, Menu as xe, MenuItem as Z } from "@aplus-frontend/antdv";
|
|
4
|
+
import { usePermission as ve } from "@aplus-frontend/hooks";
|
|
5
|
+
import { IconApAdLineAnnotation as B } from "@aplus-frontend/icon";
|
|
6
|
+
import { transformTableParamsNoTimezone as he, isObjectWithContent as T } from "@aplus-frontend/utils";
|
|
7
|
+
import { merge as m } from "lodash-unified";
|
|
7
8
|
import "../../ap-button/index.mjs";
|
|
8
|
-
import { useInjectApTable as
|
|
9
|
+
import { useInjectApTable as ke } from "../../ap-table/context.mjs";
|
|
9
10
|
import "../../config-provider/index.mjs";
|
|
10
|
-
import { ApBatchActionGroup as
|
|
11
|
-
import { convertExportField as
|
|
12
|
-
import { handleExportDownload as
|
|
13
|
-
import { ApExportGroupActionType as
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
11
|
+
import { ApBatchActionGroup as be } from "../ap-batch-action-group/index.mjs";
|
|
12
|
+
import { convertExportField as Ee } from "./convertExportField.mjs";
|
|
13
|
+
import { handleExportDownload as we } from "./handleExportDownload.mjs";
|
|
14
|
+
import { ApExportGroupActionType as h } from "./interface.mjs";
|
|
15
|
+
import De from "./style/index.mjs";
|
|
16
|
+
import { useNamespace as Le } from "../../config-provider/hooks/use-namespace.mjs";
|
|
17
|
+
import { useLocale as Re } from "../../config-provider/hooks/use-locale.mjs";
|
|
18
|
+
import { useGlobalConfig as Se } from "../../config-provider/hooks/use-global-config.mjs";
|
|
19
|
+
import N from "../../ap-button/ap-button.vue.mjs";
|
|
20
|
+
const We = /* @__PURE__ */ ce({
|
|
19
21
|
__name: "ApExportGroup",
|
|
20
22
|
props: {
|
|
21
|
-
type: {
|
|
23
|
+
type: {
|
|
24
|
+
default: "button"
|
|
25
|
+
},
|
|
22
26
|
selectedRowKeys: {},
|
|
23
27
|
groupList: {},
|
|
24
28
|
buttonProps: {},
|
|
25
|
-
disabled: {
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean
|
|
31
|
+
},
|
|
26
32
|
auth: {},
|
|
27
33
|
ifShow: {},
|
|
28
34
|
text: {},
|
|
@@ -31,173 +37,302 @@ const Fe = /* @__PURE__ */ J({
|
|
|
31
37
|
getRequestParams: {},
|
|
32
38
|
getInitialParams: {},
|
|
33
39
|
beforeRequest: {},
|
|
34
|
-
successMessage: {
|
|
35
|
-
|
|
40
|
+
successMessage: {
|
|
41
|
+
type: [Boolean, String],
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
exportField: {
|
|
45
|
+
type: [Boolean, Object],
|
|
46
|
+
default: void 0
|
|
47
|
+
},
|
|
48
|
+
dateValidate: {
|
|
49
|
+
type: [Object, Boolean],
|
|
50
|
+
default: void 0
|
|
51
|
+
}
|
|
36
52
|
},
|
|
37
|
-
setup(
|
|
38
|
-
const {
|
|
39
|
-
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
53
|
+
setup(ee) {
|
|
54
|
+
const {
|
|
55
|
+
hasPermission: $
|
|
56
|
+
} = ve(), n = ee, {
|
|
57
|
+
columns: z,
|
|
58
|
+
dataSource: U,
|
|
59
|
+
getSearchFormValues: te,
|
|
60
|
+
getLastParams: ae
|
|
61
|
+
} = ke(), {
|
|
62
|
+
b: k
|
|
63
|
+
} = Le("ap-export-group"), b = De("ap-export-group"), {
|
|
64
|
+
t: i
|
|
65
|
+
} = Re(), W = Se("apExportGroup"), H = x(() => W?.value?.exportField), J = x(() => W?.value?.dateValidate), E = x(() => J.value === !0 ? {
|
|
66
|
+
maxDayRange: 90,
|
|
67
|
+
smartIdentify: !0
|
|
68
|
+
} : J.value), w = x(() => n?.dateValidate === !0 ? {
|
|
69
|
+
maxDayRange: 90,
|
|
70
|
+
smartIdentify: !0
|
|
71
|
+
} : n?.dateValidate), S = Q(!1), I = Q(!1), G = x(() => !!n?.disabled || (U !== void 0 ? !U?.value?.length : !1) || S.value), s = (e) => e === void 0 ? !1 : typeof e == "object" ? m({}, e) : e === !0 ? {} : e;
|
|
72
|
+
fe(() => G.value, () => {
|
|
73
|
+
G.value && (I.value = !1);
|
|
74
|
+
}, {
|
|
75
|
+
immediate: !0
|
|
76
|
+
});
|
|
77
|
+
const oe = x(() => n?.successMessage === !0 ? i("ap.apExportGroup.exportSuccess") : n?.successMessage ? n.successMessage : ""), re = (e = n?.exportField) => {
|
|
78
|
+
const a = "exportFieldList", o = e ?? (H.value === "" ? !0 : H.value) ?? !1;
|
|
79
|
+
return o === !0 ? {
|
|
80
|
+
key: a
|
|
81
|
+
} : typeof o == "object" ? {
|
|
82
|
+
...o,
|
|
83
|
+
key: o.key ?? a
|
|
84
|
+
} : o;
|
|
85
|
+
}, ne = {
|
|
59
86
|
textAlign: "center"
|
|
60
|
-
},
|
|
61
|
-
let e =
|
|
62
|
-
return !
|
|
87
|
+
}, F = x(() => n?.selectedRowKeys || []), O = x(() => {
|
|
88
|
+
let e = n?.ifShow;
|
|
89
|
+
return !n?.ifShow && n?.auth && (e = () => $(n.auth)), e?.() ?? !0;
|
|
63
90
|
});
|
|
64
|
-
async function
|
|
65
|
-
|
|
91
|
+
async function se() {
|
|
92
|
+
F.value.length > 0 ? _({
|
|
93
|
+
key: h.SELECT
|
|
94
|
+
}) : _({
|
|
95
|
+
key: h.ALL
|
|
96
|
+
});
|
|
66
97
|
}
|
|
67
|
-
async function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
async function _({
|
|
99
|
+
key: e,
|
|
100
|
+
option: a
|
|
101
|
+
}) {
|
|
102
|
+
const o = m({}, n, a || {}), {
|
|
103
|
+
getRequestParams: p,
|
|
104
|
+
request: L
|
|
105
|
+
} = o || {}, r = ae?.()?.sort, l = r ? he({
|
|
106
|
+
sort: r
|
|
107
|
+
}) : {}, u = re(o?.exportField);
|
|
108
|
+
let d = {};
|
|
109
|
+
e === h.SELECT ? d = {
|
|
110
|
+
[o?.idKey || "ids"]: F.value
|
|
111
|
+
} : e === h.ALL && (d = p?.() || te?.(!0) || {});
|
|
112
|
+
const g = o?.getInitialParams?.() || {};
|
|
74
113
|
try {
|
|
75
|
-
|
|
76
|
-
let
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
);
|
|
89
|
-
b = a?.beforeRequest?.(b) || b, await ne(async () => await z?.(b)), a?.successMessage && Y.success($.value);
|
|
114
|
+
S.value = !0;
|
|
115
|
+
let C = Object.assign({
|
|
116
|
+
...d,
|
|
117
|
+
...g,
|
|
118
|
+
...l
|
|
119
|
+
}, u && z?.value ? {
|
|
120
|
+
[u.key]: Ee(z.value, u?.convertField)
|
|
121
|
+
} : {});
|
|
122
|
+
C = o?.beforeRequest?.(C) || C;
|
|
123
|
+
const R = m({}, s(E.value), s(w.value), s(a?.dateValidate));
|
|
124
|
+
T(R) && e === h.ALL && de({
|
|
125
|
+
params: C,
|
|
126
|
+
dateValidate: R
|
|
127
|
+
}), await we(async () => await L?.(C)), o?.successMessage && q.success(oe.value);
|
|
90
128
|
} finally {
|
|
91
|
-
|
|
129
|
+
S.value = !1;
|
|
92
130
|
}
|
|
93
131
|
}
|
|
94
|
-
const
|
|
95
|
-
let
|
|
96
|
-
return !e?.ifShow && e?.auth && (
|
|
97
|
-
})?.map((e,
|
|
98
|
-
key:
|
|
132
|
+
const D = x(() => n?.groupList?.filter((e) => {
|
|
133
|
+
let a = e?.ifShow;
|
|
134
|
+
return !e?.ifShow && e?.auth && (a = () => $(e.auth)), a?.() ?? !0;
|
|
135
|
+
})?.map((e, a) => ({
|
|
136
|
+
key: a,
|
|
99
137
|
content: e?.text,
|
|
100
138
|
auth: e?.auth,
|
|
101
139
|
ifShow: e?.ifShow,
|
|
102
140
|
disabled: e?.disabled,
|
|
141
|
+
dateValidate: e?.dateValidate,
|
|
103
142
|
onClick: () => {
|
|
104
|
-
|
|
105
|
-
key:
|
|
143
|
+
F.value.length > 0 ? _({
|
|
144
|
+
key: h.SELECT,
|
|
106
145
|
option: e
|
|
107
|
-
}) :
|
|
108
|
-
key:
|
|
146
|
+
}) : _({
|
|
147
|
+
key: h.ALL,
|
|
109
148
|
option: e
|
|
110
149
|
});
|
|
111
150
|
}
|
|
112
|
-
})) || [])
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
151
|
+
})) || []), le = () => {
|
|
152
|
+
const e = m({}, s(E.value), s(w.value), D.value.reduce((a, o) => m(a, s(o.dateValidate)), {}));
|
|
153
|
+
return y(ye, {
|
|
154
|
+
size: 4
|
|
116
155
|
}, {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
onClick: V
|
|
121
|
-
}), {
|
|
122
|
-
default: l(() => [
|
|
123
|
-
y(v(t?.text ?? o(u)("ap.apExportGroup.export")), 1)
|
|
124
|
-
]),
|
|
125
|
-
_: 1
|
|
126
|
-
}, 16, ["disabled", "loading"])) : S("", !0),
|
|
127
|
-
k.value && t.type === "dropdown" ? (s(), d(o(Z), {
|
|
128
|
-
key: 1,
|
|
129
|
-
open: h.value,
|
|
130
|
-
"onUpdate:open": r[0] || (r[0] = (a) => h.value = a),
|
|
131
|
-
class: W([o(N)()]),
|
|
132
|
-
"overlay-style": I,
|
|
133
|
-
disabled: p.value
|
|
134
|
-
}, {
|
|
135
|
-
overlay: l(() => [
|
|
136
|
-
L(o(ee), { onClick: c }, {
|
|
137
|
-
default: l(() => [
|
|
138
|
-
(s(), d(o(R), {
|
|
139
|
-
key: o(n).SELECT,
|
|
140
|
-
disabled: g.value?.length === 0
|
|
141
|
-
}, {
|
|
142
|
-
default: l(() => [
|
|
143
|
-
y(v(o(u)("ap.apExportGroup.exportSelected")), 1)
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
}, 8, ["disabled"])),
|
|
147
|
-
(s(), d(o(R), {
|
|
148
|
-
key: o(n).ALL
|
|
149
|
-
}, {
|
|
150
|
-
default: l(() => [
|
|
151
|
-
y(v(o(u)("ap.apExportGroup.exportAll")), 1)
|
|
152
|
-
]),
|
|
153
|
-
_: 1
|
|
154
|
-
}))
|
|
155
|
-
]),
|
|
156
|
-
_: 1
|
|
156
|
+
default: () => [y("span", null, [n?.buttonProps?.content ?? i("ap.apExportGroup.export")]), T(e) ? y(j, {
|
|
157
|
+
title: i("ap.apExportGroup.maxMessage", {
|
|
158
|
+
maxDayRange: e.maxDayRange ?? 90
|
|
157
159
|
})
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
160
|
+
}, {
|
|
161
|
+
default: () => [y(B, {
|
|
162
|
+
class: [k("icon"), b.value]
|
|
163
|
+
}, null)]
|
|
164
|
+
}) : null]
|
|
165
|
+
});
|
|
166
|
+
}, ue = (e) => Object.keys(e).reduce((a, o) => typeof e?.[o] == "number" && e?.[o] > 1e4 ? {
|
|
167
|
+
...a,
|
|
168
|
+
[o]: e?.[o]
|
|
169
|
+
} : a, {}), ie = (e) => {
|
|
170
|
+
const a = Object.keys(e), o = [], p = /* @__PURE__ */ new Set(), L = [];
|
|
171
|
+
for (let r = 0; r < a.length; r++)
|
|
172
|
+
for (let l = r + 1; l < a.length; l++) {
|
|
173
|
+
const u = a[r], d = a[l];
|
|
174
|
+
let g = "";
|
|
175
|
+
const C = Math.min(u.length, d.length);
|
|
176
|
+
for (let R = 0; R < C && u[R] === d[R]; R++)
|
|
177
|
+
g += u[R];
|
|
178
|
+
g.length >= 3 && L.push({
|
|
179
|
+
prefix: g,
|
|
180
|
+
length: g.length,
|
|
181
|
+
key1: u,
|
|
182
|
+
key2: d,
|
|
183
|
+
diff: Math.abs(e[u] - e[d])
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
L.sort((r, l) => l.length !== r.length ? l.length - r.length : r.diff - l.diff);
|
|
187
|
+
for (const r of L)
|
|
188
|
+
if (!p.has(r.key1) && !p.has(r.key2)) {
|
|
189
|
+
const l = e[r.key1], u = e[r.key2];
|
|
190
|
+
o.push({
|
|
191
|
+
startKey: l < u ? r.key1 : r.key2,
|
|
192
|
+
endKey: l < u ? r.key2 : r.key1
|
|
193
|
+
}), p.add(r.key1), p.add(r.key2);
|
|
194
|
+
}
|
|
195
|
+
return o;
|
|
196
|
+
}, pe = ({
|
|
197
|
+
startTime: e,
|
|
198
|
+
endTime: a,
|
|
199
|
+
maxDayRange: o
|
|
200
|
+
}) => Math.abs(a - e) <= (o * 24 + 1) * 60 * 60 * 1e3, de = ({
|
|
201
|
+
params: e,
|
|
202
|
+
dateValidate: a
|
|
203
|
+
}) => {
|
|
204
|
+
const o = a.maxDayRange ?? 90, p = ue(e), L = [...a.smartIdentify ?? !0 ? ie(p) : [], ...a.dateKeyList?.filter((r) => p[r.startKey || ""] && p[r.endKey || ""]) ?? []];
|
|
205
|
+
if (L.length === 0) {
|
|
206
|
+
q.warn(a?.emptyTooltip ?? i("ap.apExportGroup.emptyTooltip", {
|
|
207
|
+
maxDayRange: o
|
|
208
|
+
}));
|
|
209
|
+
return;
|
|
210
|
+
} else if (L.some(({
|
|
211
|
+
startKey: l,
|
|
212
|
+
endKey: u
|
|
213
|
+
}) => {
|
|
214
|
+
const d = p[l || ""], g = p[u || ""];
|
|
215
|
+
return d !== void 0 && g !== void 0 && !pe({
|
|
216
|
+
startTime: d,
|
|
217
|
+
endTime: g,
|
|
218
|
+
maxDayRange: o
|
|
219
|
+
});
|
|
220
|
+
})) {
|
|
221
|
+
q.warn(a?.maxDayRangeTooltip ?? i("ap.apExportGroup.maxDayRangeTooltip", {
|
|
222
|
+
maxDayRange: o
|
|
223
|
+
}));
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
return (e, a) => (c(), X(Y, null, [O.value && n.type === "button" ? (c(), v(t(N), V({
|
|
228
|
+
key: 0
|
|
229
|
+
}, {
|
|
230
|
+
...e.$attrs
|
|
231
|
+
}, {
|
|
232
|
+
class: [t(k)(), t(b)],
|
|
233
|
+
disabled: G.value,
|
|
234
|
+
loading: S.value,
|
|
235
|
+
"min-width": "",
|
|
236
|
+
onClick: se
|
|
237
|
+
}), {
|
|
238
|
+
default: f(() => [A(M(n?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(T)(t(m)({}, s(E.value), s(w.value))) ? (c(), v(t(j), {
|
|
239
|
+
key: 0,
|
|
240
|
+
title: t(i)("ap.apExportGroup.maxMessage", {
|
|
241
|
+
maxDayRange: t(m)({}, s(E.value), s(w.value)).maxDayRange ?? 90
|
|
242
|
+
})
|
|
243
|
+
}, {
|
|
244
|
+
default: f(() => [y(t(B), {
|
|
245
|
+
class: K([t(k)("icon"), t(b)])
|
|
246
|
+
}, null, 8, ["class"])]),
|
|
170
247
|
_: 1
|
|
171
|
-
}, 8, ["
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
248
|
+
}, 8, ["title"])) : P("", !0)]),
|
|
249
|
+
_: 1
|
|
250
|
+
}, 16, ["class", "disabled", "loading"])) : P("", !0), O.value && n.type === "dropdown" ? (c(), v(t(ge), {
|
|
251
|
+
key: 1,
|
|
252
|
+
open: I.value,
|
|
253
|
+
"onUpdate:open": a[0] || (a[0] = (o) => I.value = o),
|
|
254
|
+
class: K([t(k)(), t(b)]),
|
|
255
|
+
"overlay-style": ne,
|
|
256
|
+
disabled: G.value
|
|
257
|
+
}, {
|
|
258
|
+
overlay: f(() => [y(t(xe), {
|
|
259
|
+
onClick: _
|
|
260
|
+
}, {
|
|
261
|
+
default: f(() => [(c(), v(t(Z), {
|
|
262
|
+
key: t(h).SELECT,
|
|
263
|
+
disabled: F.value?.length === 0
|
|
175
264
|
}, {
|
|
176
|
-
|
|
177
|
-
loading: i.value,
|
|
178
|
-
"min-width": "",
|
|
179
|
-
onClick: f.value?.[0]?.onClick
|
|
180
|
-
}), {
|
|
181
|
-
default: l(() => [
|
|
182
|
-
y(v(f.value?.[0]?.content ?? t?.text ?? o(u)("ap.apExportGroup.export")), 1)
|
|
183
|
-
]),
|
|
265
|
+
default: f(() => [A(M(t(i)("ap.apExportGroup.exportSelected")), 1)]),
|
|
184
266
|
_: 1
|
|
185
|
-
},
|
|
186
|
-
|
|
267
|
+
}, 8, ["disabled"])), (c(), v(t(Z), {
|
|
268
|
+
key: t(h).ALL
|
|
187
269
|
}, {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
270
|
+
default: f(() => [A(M(t(i)("ap.apExportGroup.exportAll")), 1)]),
|
|
271
|
+
_: 1
|
|
272
|
+
}))]),
|
|
273
|
+
_: 1
|
|
274
|
+
})]),
|
|
275
|
+
default: f(() => [y(t(N), V({
|
|
276
|
+
...e.$attrs
|
|
277
|
+
}, {
|
|
278
|
+
loading: S.value
|
|
279
|
+
}), {
|
|
280
|
+
default: f(() => [A(M(n?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(T)(t(m)({}, s(E.value), s(w.value))) ? (c(), v(t(j), {
|
|
281
|
+
key: 0,
|
|
282
|
+
title: t(i)("ap.apExportGroup.maxMessage", {
|
|
283
|
+
maxDayRange: t(m)({}, s(E.value), s(w.value)).maxDayRange ?? 90
|
|
284
|
+
})
|
|
285
|
+
}, {
|
|
286
|
+
default: f(() => [y(t(B), {
|
|
287
|
+
class: K([t(k)("icon"), t(b)])
|
|
288
|
+
}, null, 8, ["class"])]),
|
|
289
|
+
_: 1
|
|
290
|
+
}, 8, ["title"])) : P("", !0), y(t(me))]),
|
|
291
|
+
_: 1
|
|
292
|
+
}, 16, ["loading"])]),
|
|
293
|
+
_: 1
|
|
294
|
+
}, 8, ["open", "class", "disabled"])) : P("", !0), O.value && n.type === "group" ? (c(), X(Y, {
|
|
295
|
+
key: 2
|
|
296
|
+
}, [D.value.length === 1 ? (c(), v(t(N), V({
|
|
297
|
+
key: 0
|
|
298
|
+
}, {
|
|
299
|
+
...e.$attrs
|
|
300
|
+
}, {
|
|
301
|
+
class: [t(k)(), t(b)],
|
|
302
|
+
disabled: G.value || D.value?.[0]?.disabled,
|
|
303
|
+
loading: S.value,
|
|
304
|
+
"min-width": "",
|
|
305
|
+
onClick: D.value?.[0]?.onClick
|
|
306
|
+
}), {
|
|
307
|
+
default: f(() => [A(M(D.value?.[0]?.content ?? n?.text ?? t(i)("ap.apExportGroup.export")) + " ", 1), t(T)(t(m)({}, s(E.value), s(w.value), s(D.value?.[0]?.dateValidate))) ? (c(), v(t(j), {
|
|
308
|
+
key: 0,
|
|
309
|
+
title: t(i)("ap.apExportGroup.maxMessage", {
|
|
310
|
+
maxDayRange: t(m)({}, s(E.value), s(w.value), s(D.value?.[0]?.dateValidate)).maxDayRange ?? 90
|
|
311
|
+
})
|
|
312
|
+
}, {
|
|
313
|
+
default: f(() => [y(t(B), {
|
|
314
|
+
class: K([t(k)("icon"), t(b)])
|
|
315
|
+
}, null, 8, ["class"])]),
|
|
316
|
+
_: 1
|
|
317
|
+
}, 8, ["title"])) : P("", !0)]),
|
|
318
|
+
_: 1
|
|
319
|
+
}, 16, ["class", "disabled", "loading", "onClick"])) : (c(), v(t(be), V({
|
|
320
|
+
key: 1
|
|
321
|
+
}, {
|
|
322
|
+
...e.$attrs
|
|
323
|
+
}, {
|
|
324
|
+
class: [t(k)(), t(b)],
|
|
325
|
+
disabled: G.value,
|
|
326
|
+
loading: S.value,
|
|
327
|
+
"button-props": {
|
|
328
|
+
...n.buttonProps,
|
|
329
|
+
content: le(),
|
|
330
|
+
type: n?.buttonProps?.type ?? "default"
|
|
331
|
+
},
|
|
332
|
+
"menu-list": D.value
|
|
333
|
+
}), null, 16, ["class", "disabled", "loading", "button-props", "menu-list"]))], 64)) : P("", !0)], 64));
|
|
199
334
|
}
|
|
200
335
|
});
|
|
201
336
|
export {
|
|
202
|
-
|
|
337
|
+
We as default
|
|
203
338
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { convertExportField } from './convertExportField';
|
|
2
2
|
import { handleExportDownload } from './handleExportDownload';
|
|
3
3
|
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
4
|
-
import { ApExportGroupProps } from './interface';
|
|
4
|
+
import { ApExportGroupProps, ApExportGroupDateValidate } from './interface';
|
|
5
5
|
export * from './interface';
|
|
6
6
|
declare const ApExportGroup: {
|
|
7
7
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
8
8
|
type: "button" | "dropdown" | "group";
|
|
9
|
+
dateValidate: ApExportGroupDateValidate;
|
|
9
10
|
exportField: boolean | {
|
|
10
11
|
key?: string;
|
|
11
12
|
convertField?: {
|
|
@@ -22,6 +23,7 @@ declare const ApExportGroup: {
|
|
|
22
23
|
Defaults: {};
|
|
23
24
|
}, Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
24
25
|
type: "button" | "dropdown" | "group";
|
|
26
|
+
dateValidate: ApExportGroupDateValidate;
|
|
25
27
|
exportField: boolean | {
|
|
26
28
|
key?: string;
|
|
27
29
|
convertField?: {
|
|
@@ -35,6 +37,7 @@ declare const ApExportGroup: {
|
|
|
35
37
|
__isSuspense?: never;
|
|
36
38
|
} & ComponentOptionsBase<Readonly< ApExportGroupProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
37
39
|
type: "button" | "dropdown" | "group";
|
|
40
|
+
dateValidate: ApExportGroupDateValidate;
|
|
38
41
|
exportField: boolean | {
|
|
39
42
|
key?: string;
|
|
40
43
|
convertField?: {
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import { ApBatchActionGroupButtonProps } from '../ap-batch-action-group';
|
|
2
|
+
export type ApExportGroupDateValidate = {
|
|
3
|
+
/**
|
|
4
|
+
* 默认最大导出天数
|
|
5
|
+
* @default 90
|
|
6
|
+
*/
|
|
7
|
+
maxDayRange?: number;
|
|
8
|
+
/**
|
|
9
|
+
* 日期字段key
|
|
10
|
+
*/
|
|
11
|
+
dateKeyList?: {
|
|
12
|
+
startKey?: string;
|
|
13
|
+
endKey?: string;
|
|
14
|
+
}[];
|
|
15
|
+
/**
|
|
16
|
+
* 是否开启智能识别日期字段
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
smartIdentify?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 筛选全量数据提示语
|
|
22
|
+
*/
|
|
23
|
+
emptyTooltip?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 筛选日期超出最大天数提示语
|
|
26
|
+
*/
|
|
27
|
+
maxDayRangeTooltip?: string;
|
|
28
|
+
} | boolean;
|
|
2
29
|
export type ApExportGroupProps = {
|
|
3
30
|
/**
|
|
4
31
|
* 类型
|
|
@@ -61,6 +88,10 @@ export interface ApExportGroupListItem {
|
|
|
61
88
|
[key: string]: string[];
|
|
62
89
|
};
|
|
63
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* 日期校验配置
|
|
93
|
+
*/
|
|
94
|
+
dateValidate?: ApExportGroupDateValidate;
|
|
64
95
|
}
|
|
65
96
|
export declare enum ApExportGroupActionType {
|
|
66
97
|
ALL = "ALL",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { genComponentStyleHook as e } from "../../../utils/cssinjs/index.mjs";
|
|
2
|
+
const r = (o) => {
|
|
3
|
+
const { componentCls: t } = o;
|
|
4
|
+
return {
|
|
5
|
+
[t]: {
|
|
6
|
+
"&-icon": {
|
|
7
|
+
color: o.textColor3
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}, p = e("ApExportGroup", (o) => [
|
|
12
|
+
r(o)
|
|
13
|
+
]);
|
|
14
|
+
export {
|
|
15
|
+
p as default,
|
|
16
|
+
r as genApExportGroupStyle
|
|
17
|
+
};
|
|
@@ -2,17 +2,18 @@ import { createVNode as r } from "vue";
|
|
|
2
2
|
import { omit as o } from "lodash-unified";
|
|
3
3
|
import { ApModal as t } from "../../../ap-modal/index.mjs";
|
|
4
4
|
import { ApFilePreview as l } from "../index.mjs";
|
|
5
|
-
const
|
|
5
|
+
const d = (e) => {
|
|
6
6
|
t.createModal({
|
|
7
7
|
title: e?.fileName ?? "File Preview",
|
|
8
8
|
width: "90%",
|
|
9
9
|
wrapperOffset: !0,
|
|
10
10
|
wrapperFullHeight: !0,
|
|
11
|
+
zIndex: 1e4,
|
|
11
12
|
footer: null,
|
|
12
13
|
content: r(l, o(e, "modalProps"), null),
|
|
13
14
|
...e?.modalProps
|
|
14
15
|
});
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
d as createFilePreviewModal
|
|
18
19
|
};
|