@dazhicheng/ui 1.6.49 → 1.6.51
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/dist/components/tt-custom-export-modal/src/TtCustomExportModal.vue.d.ts +36 -25
- package/dist/components/tt-custom-export-modal/src/TtCustomExportModal.vue.js +56 -298
- package/dist/components/tt-custom-export-modal/src/components/TemplateManagerSection.vue.js +71 -54
- package/dist/components/tt-custom-export-panel/index.d.ts +8 -0
- package/dist/components/tt-custom-export-panel/index.js +21 -0
- package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue.d.ts +19 -0
- package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue.js +289 -0
- package/dist/components/tt-custom-export-panel/src/TtCustomExportPanel.vue2.js +4 -0
- package/dist/components/tt-custom-export-panel/src/types/index.d.ts +6 -0
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +2 -2
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +1 -0
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +8 -7
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +1 -1
- package/dist/components/tt-panel-select/src/index.vue.d.ts +3 -0
- package/dist/components/tt-panel-select/src/index.vue.js +17 -14
- package/dist/components/tt-panel-select/src/types.d.ts +4 -0
- package/dist/components/tt-table/index.d.ts +27 -0
- package/dist/components/tt-table/index.js +8 -5
- package/dist/components/tt-table/src/Table.vue.d.ts +9 -0
- package/dist/components/tt-table/src/TableForm.vue.d.ts +74 -90
- package/dist/components/tt-table/src/TableForm.vue.js +179 -175
- package/dist/components/tt-table/src/components/TableExportButton.vue.d.ts +12 -0
- package/dist/components/tt-table/src/components/TableExportButton.vue.js +44 -0
- package/dist/components/tt-table/src/components/TableExportButton.vue2.js +4 -0
- package/dist/components/tt-table/src/components/TableToolbarTools.vue.js +36 -42
- package/dist/components/tt-table/src/props.d.ts +6 -0
- package/dist/components/tt-table/src/props.js +5 -0
- package/dist/components/tt-table/src/types/table.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +111 -107
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,37 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TtCustomExportPanelProps } from '../../tt-custom-export-panel';
|
|
2
2
|
import { TtCustomExportModalOpenOptions, TtCustomExportModalProps, ExportConfirmPayload, ReportAPI } from './types';
|
|
3
3
|
declare const _default: import('vue').DefineComponent<TtCustomExportModalProps, {
|
|
4
|
-
/** 打开弹框并加载字段和模板;可传入本次打开的配置。 */
|
|
5
4
|
open: (options?: TtCustomExportModalOpenOptions) => Promise<void>;
|
|
6
|
-
/** 关闭弹框;下次打开时重新初始化。 */
|
|
7
5
|
close: () => void;
|
|
8
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
7
|
export: (payload: ExportConfirmPayload) => any;
|
|
10
8
|
templateChange: (template: ReportAPI.ExportTemplateCO | undefined) => any;
|
|
11
9
|
}, string, import('vue').PublicProps, Readonly<TtCustomExportModalProps> & Readonly<{
|
|
12
10
|
onExport?: ((payload: ExportConfirmPayload) => any) | undefined;
|
|
13
11
|
onTemplateChange?: ((template: ReportAPI.ExportTemplateCO | undefined) => any) | undefined;
|
|
14
|
-
}>, {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
+
panelRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<TtCustomExportPanelProps> & Readonly<{
|
|
14
|
+
onTemplateChange?: ((template: ReportAPI.ExportTemplateCO | undefined) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
reload: () => Promise<void>;
|
|
17
|
+
ready: import('vue').ShallowRef<Promise<void>, Promise<void>>;
|
|
18
|
+
confirm: () => ExportConfirmPayload | undefined;
|
|
19
|
+
isLoading: import('vue').Ref<boolean, boolean>;
|
|
20
|
+
fieldCount: import('vue').ComputedRef<number>;
|
|
21
|
+
selectedCount: import('vue').ComputedRef<number>;
|
|
22
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
23
|
+
templateChange: (template: ReportAPI.ExportTemplateCO | undefined) => any;
|
|
24
|
+
}, import('vue').PublicProps, {
|
|
25
|
+
listColumns: string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | import('vue').Ref<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined, string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | import('vue').ShallowRef<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined, string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | import('vue').WritableComputedRef<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined, string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | import('vue').ComputedRef<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | (() => string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined);
|
|
26
26
|
businessCode: string;
|
|
27
|
-
})
|
|
28
|
-
|
|
27
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLElement, import('vue').ComponentProvideOptions, {
|
|
28
|
+
P: {};
|
|
29
|
+
B: {};
|
|
30
|
+
D: {};
|
|
31
|
+
C: {};
|
|
32
|
+
M: {};
|
|
33
|
+
Defaults: {};
|
|
34
|
+
}, Readonly<TtCustomExportPanelProps> & Readonly<{
|
|
35
|
+
onTemplateChange?: ((template: ReportAPI.ExportTemplateCO | undefined) => any) | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
reload: () => Promise<void>;
|
|
38
|
+
ready: import('vue').ShallowRef<Promise<void>, Promise<void>>;
|
|
39
|
+
confirm: () => ExportConfirmPayload | undefined;
|
|
40
|
+
isLoading: import('vue').Ref<boolean, boolean>;
|
|
41
|
+
fieldCount: import('vue').ComputedRef<number>;
|
|
42
|
+
selectedCount: import('vue').ComputedRef<number>;
|
|
43
|
+
}, {}, {}, {}, {
|
|
44
|
+
listColumns: string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | import('vue').Ref<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined, string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | import('vue').ShallowRef<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined, string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | import('vue').WritableComputedRef<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined, string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | import('vue').ComputedRef<string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined> | (() => string[] | import("vxe-table").VxeTableDefines.ColumnOptions<any>[] | undefined);
|
|
29
45
|
businessCode: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
setDefaultTemplateApi: (params: {
|
|
33
|
-
businessCode: string;
|
|
34
|
-
templateId: number;
|
|
35
|
-
}) => Promise<unknown>;
|
|
36
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
}> | null;
|
|
47
|
+
}, any>;
|
|
37
48
|
export default _default;
|
|
@@ -1,322 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import "axios";
|
|
3
|
-
import { vLoading as ne, ElMessage as h, ElMessageBox as de } from "element-plus";
|
|
4
|
-
import { isString as re } from "../../../packages/utils/src/is.js";
|
|
5
|
-
import "dayjs";
|
|
6
|
-
import "numeral";
|
|
7
|
-
import "xe-utils";
|
|
8
|
-
import "dayjs/plugin/utc";
|
|
9
|
-
import "dayjs/plugin/timezone";
|
|
10
|
-
import { subtract as O, add as ue } from "../../../packages/utils/src/calc.js";
|
|
11
|
-
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
12
|
-
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
|
-
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
|
-
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
-
import "lodash-es";
|
|
1
|
+
import { defineComponent as R, shallowRef as i, computed as p, createBlock as C, openBlock as x, unref as y, withCtx as b, createCommentVNode as w, mergeProps as O, createElementVNode as r, toDisplayString as _, nextTick as h } from "vue";
|
|
16
2
|
import "../../tt-modal/index.js";
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
import he from "./components/TemplateManagerSection.vue.js";
|
|
21
|
-
import { useModalRender as ge } from "../../tt-modal/src/hooks/useModalRender.js";
|
|
22
|
-
const we = { class: "flex flex-col gap-1 text-left" }, ye = { class: "text-lg font-semibold leading-none text-(--el-text-color-primary)" }, xe = { class: "text-xs text-(--el-text-color-secondary)" }, Te = { class: "flex flex-col gap-3 py-1" }, je = /* @__PURE__ */ te({
|
|
3
|
+
import { TtCustomExportPanel as P } from "../../tt-custom-export-panel/index.js";
|
|
4
|
+
import { useModalRender as B } from "../../tt-modal/src/hooks/useModalRender.js";
|
|
5
|
+
const N = { class: "flex flex-col gap-1 text-left" }, V = { class: "text-lg font-semibold leading-none text-(--el-text-color-primary)" }, D = { class: "text-xs text-(--el-text-color-secondary)" }, j = /* @__PURE__ */ R({
|
|
23
6
|
name: "TtCustomExportModal",
|
|
24
7
|
__name: "TtCustomExportModal",
|
|
25
8
|
props: {
|
|
26
|
-
title: {
|
|
27
|
-
businessCode: {
|
|
28
|
-
availableFields: {
|
|
29
|
-
listColumns: {
|
|
30
|
-
fetchFieldsApi: { type: Function
|
|
31
|
-
fetchTemplatesApi: { type: Function
|
|
32
|
-
saveTemplateApi: { type: Function
|
|
33
|
-
deleteTemplateApi: { type: Function
|
|
34
|
-
setDefaultTemplateApi: { type: Function
|
|
9
|
+
title: {},
|
|
10
|
+
businessCode: {},
|
|
11
|
+
availableFields: {},
|
|
12
|
+
listColumns: {},
|
|
13
|
+
fetchFieldsApi: { type: Function },
|
|
14
|
+
fetchTemplatesApi: { type: Function },
|
|
15
|
+
saveTemplateApi: { type: Function },
|
|
16
|
+
deleteTemplateApi: { type: Function },
|
|
17
|
+
setDefaultTemplateApi: { type: Function }
|
|
35
18
|
},
|
|
36
19
|
emits: ["export", "templateChange"],
|
|
37
|
-
setup(
|
|
38
|
-
const i =
|
|
39
|
-
let o = Symbol();
|
|
40
|
-
const [P, b] = ge({
|
|
20
|
+
setup(g, { expose: S, emit: F }) {
|
|
21
|
+
const a = g, c = F, o = i(), l = i({}), n = i(Symbol()), u = i(!1), [T, d] = B({
|
|
41
22
|
width: "1120px",
|
|
42
23
|
destroyOnClose: !0,
|
|
43
24
|
draggable: !0,
|
|
44
25
|
showFooter: !0,
|
|
45
|
-
onVisibleChange(
|
|
46
|
-
|
|
26
|
+
onVisibleChange(e) {
|
|
27
|
+
u.value = e, e || (n.value = Symbol());
|
|
47
28
|
}
|
|
48
|
-
}),
|
|
49
|
-
const
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}), G = S(() => A()), m = S(() => {
|
|
57
|
-
const t = y.value.trim().toLowerCase();
|
|
58
|
-
return t ? s.value.filter((e) => {
|
|
59
|
-
const l = (e.fieldName ?? "").toLowerCase().includes(t), a = (e.fieldCode ?? "").toLowerCase().includes(t);
|
|
60
|
-
return l || a;
|
|
61
|
-
}) : s.value;
|
|
62
|
-
}), B = S(() => m.value.length === 0 ? !1 : m.value.filter((e) => n.value.has(e.fieldCode || "")).length === m.value.length), M = () => {
|
|
63
|
-
const t = u.value.find((e) => e.defaultTemplate);
|
|
64
|
-
if (f.value = t == null ? void 0 : t.id, t && t.fields && t.fields.length > 0) {
|
|
65
|
-
const e = /* @__PURE__ */ new Set();
|
|
66
|
-
[...t.fields].sort((l, a) => O(l.sortNo ?? 0, a.sortNo ?? 0)).forEach((l) => {
|
|
67
|
-
l.fieldCode && e.add(l.fieldCode);
|
|
68
|
-
}), s.value.forEach((l) => {
|
|
69
|
-
l.requiredSelected && l.fieldCode && e.add(l.fieldCode);
|
|
70
|
-
}), n.value = e;
|
|
71
|
-
}
|
|
72
|
-
}, K = async (t) => {
|
|
73
|
-
const e = g.value.availableFields || i.availableFields;
|
|
74
|
-
if (e && e.length > 0) {
|
|
75
|
-
s.value = [...e], E();
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (i.fetchFieldsApi) {
|
|
79
|
-
try {
|
|
80
|
-
const l = await i.fetchFieldsApi({ businessCode: d.value });
|
|
81
|
-
if (t !== o) return;
|
|
82
|
-
s.value = l ?? [];
|
|
83
|
-
} catch {
|
|
84
|
-
if (t !== o) return;
|
|
85
|
-
s.value = [];
|
|
86
|
-
}
|
|
87
|
-
E();
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (d.value) {
|
|
91
|
-
try {
|
|
92
|
-
const l = await me({
|
|
93
|
-
businessCode: d.value
|
|
94
|
-
});
|
|
95
|
-
if (t !== o) return;
|
|
96
|
-
s.value = l ?? [];
|
|
97
|
-
} catch {
|
|
98
|
-
if (t !== o) return;
|
|
99
|
-
s.value = [];
|
|
100
|
-
}
|
|
101
|
-
E();
|
|
102
|
-
}
|
|
103
|
-
}, x = async (t) => {
|
|
104
|
-
if (t === o) {
|
|
105
|
-
if (i.fetchTemplatesApi) {
|
|
106
|
-
try {
|
|
107
|
-
const e = await i.fetchTemplatesApi({ businessCode: d.value });
|
|
108
|
-
if (t !== o) return;
|
|
109
|
-
u.value = e ?? [];
|
|
110
|
-
} catch {
|
|
111
|
-
if (t !== o) return;
|
|
112
|
-
u.value = [];
|
|
113
|
-
}
|
|
114
|
-
M();
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (d.value) {
|
|
118
|
-
try {
|
|
119
|
-
const e = await pe({
|
|
120
|
-
businessCode: d.value
|
|
121
|
-
});
|
|
122
|
-
if (t !== o) return;
|
|
123
|
-
u.value = e ?? [];
|
|
124
|
-
} catch {
|
|
125
|
-
if (t !== o) return;
|
|
126
|
-
u.value = [];
|
|
127
|
-
}
|
|
128
|
-
M();
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}, E = () => {
|
|
132
|
-
const t = /* @__PURE__ */ new Set();
|
|
133
|
-
s.value.forEach((e) => {
|
|
134
|
-
(e.requiredSelected || e.defaultSelected) && e.fieldCode && t.add(e.fieldCode);
|
|
135
|
-
}), n.value = t;
|
|
136
|
-
}, D = (t) => {
|
|
137
|
-
if (f.value = t, !t) {
|
|
138
|
-
T("templateChange", void 0);
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
const e = u.value.find((l) => l.id === t);
|
|
142
|
-
if (T("templateChange", e), e && e.fields && e.fields.length > 0) {
|
|
143
|
-
const l = /* @__PURE__ */ new Set();
|
|
144
|
-
[...e.fields].sort((a, C) => O(a.sortNo ?? 0, C.sortNo ?? 0)).forEach((a) => {
|
|
145
|
-
a.fieldCode && l.add(a.fieldCode);
|
|
146
|
-
}), s.value.forEach((a) => {
|
|
147
|
-
a.requiredSelected && a.fieldCode && l.add(a.fieldCode);
|
|
148
|
-
}), n.value = l;
|
|
149
|
-
}
|
|
150
|
-
}, j = async (t) => {
|
|
151
|
-
if (!d.value) return;
|
|
152
|
-
const e = o;
|
|
153
|
-
try {
|
|
154
|
-
if (i.setDefaultTemplateApi ? await i.setDefaultTemplateApi({
|
|
155
|
-
businessCode: d.value,
|
|
156
|
-
templateId: t
|
|
157
|
-
}) : await ce({
|
|
158
|
-
businessCode: d.value,
|
|
159
|
-
templateId: t
|
|
160
|
-
}), e !== o) return;
|
|
161
|
-
h.success("已设为默认模板"), await x(e);
|
|
162
|
-
} catch {
|
|
163
|
-
}
|
|
164
|
-
}, z = async (t, e) => {
|
|
165
|
-
if (!d.value) return;
|
|
166
|
-
const l = o;
|
|
167
|
-
try {
|
|
168
|
-
if (await de.confirm(`确定要删除导出模板「${e}」吗?`, "删除确认", {
|
|
169
|
-
type: "warning",
|
|
170
|
-
confirmButtonText: "确定删除",
|
|
171
|
-
cancelButtonText: "取消"
|
|
172
|
-
}), l !== o || (i.deleteTemplateApi ? await i.deleteTemplateApi({
|
|
173
|
-
businessCode: d.value,
|
|
174
|
-
templateId: t
|
|
175
|
-
}) : await fe({
|
|
176
|
-
businessCode: d.value,
|
|
177
|
-
templateId: t
|
|
178
|
-
}), l !== o)) return;
|
|
179
|
-
h.success("模板删除成功"), f.value = void 0, await x(l);
|
|
180
|
-
} catch {
|
|
181
|
-
}
|
|
182
|
-
}, H = async (t) => {
|
|
183
|
-
if (p.value || w.value) return;
|
|
184
|
-
if (v.value.length === 0) {
|
|
185
|
-
h.warning("请至少勾选一个导出字段后再保存模板");
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
const e = o;
|
|
189
|
-
try {
|
|
190
|
-
w.value = !0;
|
|
191
|
-
const l = v.value.map((r, ee) => ({
|
|
192
|
-
fieldId: r.id,
|
|
193
|
-
customColumnName: r.fieldName,
|
|
194
|
-
sortNo: ue(ee, 1)
|
|
195
|
-
})), a = {
|
|
196
|
-
businessCode: d.value,
|
|
197
|
-
templateName: t,
|
|
198
|
-
fields: l
|
|
199
|
-
};
|
|
200
|
-
if (i.saveTemplateApi ? await i.saveTemplateApi(a) : await ve(a), e !== o || (h.success(`模板「${t}」保存成功`), await x(e), e !== o)) return;
|
|
201
|
-
const C = u.value.find((r) => r.templateName === t);
|
|
202
|
-
C && D(C.id);
|
|
203
|
-
} catch {
|
|
204
|
-
} finally {
|
|
205
|
-
e === o && (w.value = !1);
|
|
206
|
-
}
|
|
207
|
-
}, J = (t) => {
|
|
208
|
-
if (t.requiredSelected || !t.fieldCode) return;
|
|
209
|
-
const e = new Set(n.value);
|
|
210
|
-
e.has(t.fieldCode) ? e.delete(t.fieldCode) : e.add(t.fieldCode), n.value = e;
|
|
211
|
-
}, Q = () => {
|
|
212
|
-
const t = new Set(n.value);
|
|
213
|
-
B.value ? m.value.forEach((e) => {
|
|
214
|
-
!e.requiredSelected && e.fieldCode && t.delete(e.fieldCode);
|
|
215
|
-
}) : m.value.forEach((e) => {
|
|
216
|
-
e.fieldCode && t.add(e.fieldCode);
|
|
217
|
-
}), n.value = t;
|
|
218
|
-
}, W = () => {
|
|
219
|
-
const t = A();
|
|
220
|
-
if (t.length === 0) return;
|
|
221
|
-
const e = new Set(t), l = /* @__PURE__ */ new Set();
|
|
222
|
-
s.value.forEach((a) => {
|
|
223
|
-
a.fieldCode && (a.requiredSelected || e.has(a.fieldCode)) && l.add(a.fieldCode);
|
|
224
|
-
}), n.value = l, h.success("已同步表格当前展示列");
|
|
225
|
-
}, X = () => {
|
|
226
|
-
const t = /* @__PURE__ */ new Set();
|
|
227
|
-
s.value.forEach((e) => {
|
|
228
|
-
e.requiredSelected && e.fieldCode && t.add(e.fieldCode);
|
|
229
|
-
}), n.value = t;
|
|
230
|
-
}, Y = () => {
|
|
231
|
-
if (p.value || !b.state.visible) return;
|
|
232
|
-
if (v.value.length === 0) {
|
|
233
|
-
h.warning("请至少勾选一个导出字段");
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
const t = v.value, e = t.map((r) => r.fieldCode || "").filter(Boolean), l = t.map((r) => r.fieldName || r.fieldCode || "").filter(Boolean), a = u.value.find((r) => r.id === f.value), C = {
|
|
237
|
-
businessCode: d.value,
|
|
238
|
-
selectedFields: t,
|
|
239
|
-
selectedFieldCodes: e,
|
|
240
|
-
selectedFieldNames: l,
|
|
241
|
-
templateName: a == null ? void 0 : a.templateName,
|
|
242
|
-
templateId: a == null ? void 0 : a.id
|
|
29
|
+
}), m = p(() => l.value.title || a.title || ""), k = p(() => {
|
|
30
|
+
const { title: e, ...t } = a;
|
|
31
|
+
return {
|
|
32
|
+
...t,
|
|
33
|
+
businessCode: l.value.businessCode || a.businessCode || "BUSINESS_SALES_REPORT",
|
|
34
|
+
availableFields: l.value.availableFields || a.availableFields,
|
|
35
|
+
listColumns: l.value.listColumns ?? a.listColumns,
|
|
36
|
+
defaultSelectedCodes: l.value.defaultSelectedCodes
|
|
243
37
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
} finally {
|
|
257
|
-
e === o && (p.value = !1);
|
|
258
|
-
}
|
|
259
|
-
}, L = () => {
|
|
260
|
-
b.closeModal();
|
|
38
|
+
}), f = p(() => o.value ? o.value.selectedCount : 0), M = async (e) => {
|
|
39
|
+
var s;
|
|
40
|
+
const t = Symbol();
|
|
41
|
+
n.value = t, l.value = e || {}, d.openModal(), await h(), t === n.value && await ((s = o.value) == null ? void 0 : s.ready);
|
|
42
|
+
}, v = () => {
|
|
43
|
+
d.closeModal();
|
|
44
|
+
}, E = (e) => {
|
|
45
|
+
u.value && (c("export", e), h(v));
|
|
46
|
+
}, A = () => {
|
|
47
|
+
var t;
|
|
48
|
+
const e = (t = o.value) == null ? void 0 : t.confirm();
|
|
49
|
+
e && E(e);
|
|
261
50
|
};
|
|
262
|
-
return
|
|
263
|
-
|
|
264
|
-
}), V({
|
|
265
|
-
/** 打开弹框并加载字段和模板;可传入本次打开的配置。 */
|
|
266
|
-
open: Z,
|
|
267
|
-
/** 关闭弹框;下次打开时重新初始化。 */
|
|
268
|
-
close: L
|
|
269
|
-
}), (t, e) => (k(), oe(q(P), {
|
|
270
|
-
"ok-text": `确认导出(${v.value.length} 字段)`,
|
|
51
|
+
return S({ open: M, close: v }), (e, t) => (x(), C(y(T), {
|
|
52
|
+
"ok-text": `确认导出(${f.value} 字段)`,
|
|
271
53
|
"cancel-text": "取消",
|
|
272
|
-
"ok-button-props": { disabled:
|
|
273
|
-
onOk:
|
|
54
|
+
"ok-button-props": { disabled: !o.value || o.value.isLoading || f.value === 0 },
|
|
55
|
+
onOk: A
|
|
274
56
|
}, {
|
|
275
|
-
header:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
57
|
+
header: b(() => [
|
|
58
|
+
r("div", N, [
|
|
59
|
+
r("h2", V, " 自定义导出模板" + _(m.value ? ` - ${m.value}` : ""), 1),
|
|
60
|
+
r("p", D, " 全量字段共 " + _(o.value ? o.value.fieldCount : 0) + " 项(与履约报表导出字段一致);可保存多个导出模板,并选定一个作为默认导出模板 ", 1)
|
|
279
61
|
])
|
|
280
62
|
]),
|
|
281
|
-
default:
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
onSave: H
|
|
292
|
-
}, null, 8, ["selected-template-id", "template-list", "is-saving"]),
|
|
293
|
-
F(Se, {
|
|
294
|
-
keyword: y.value,
|
|
295
|
-
"onUpdate:keyword": e[1] || (e[1] = (l) => y.value = l),
|
|
296
|
-
"is-all-selected": B.value,
|
|
297
|
-
"has-list-columns": G.value.length > 0,
|
|
298
|
-
onToggleSelectAll: Q,
|
|
299
|
-
onSelectByListColumns: W,
|
|
300
|
-
onClearAll: X
|
|
301
|
-
}, null, 8, ["keyword", "is-all-selected", "has-list-columns"]),
|
|
302
|
-
F(Ce, {
|
|
303
|
-
"filtered-fields": m.value,
|
|
304
|
-
"total-field-count": s.value.length,
|
|
305
|
-
"selected-code-set": n.value,
|
|
306
|
-
"selected-fields": v.value,
|
|
307
|
-
onReorder: e[2] || (e[2] = (l) => {
|
|
308
|
-
n.value = new Set(l);
|
|
309
|
-
}),
|
|
310
|
-
onToggleField: J
|
|
311
|
-
}, null, 8, ["filtered-fields", "total-field-count", "selected-code-set", "selected-fields"])
|
|
312
|
-
])), [
|
|
313
|
-
[q(ne), p.value]
|
|
314
|
-
])
|
|
63
|
+
default: b(() => [
|
|
64
|
+
u.value ? (x(), C(y(P), O({
|
|
65
|
+
key: n.value,
|
|
66
|
+
ref_key: "panelRef",
|
|
67
|
+
ref: o
|
|
68
|
+
}, k.value, {
|
|
69
|
+
onTemplateChange: t[0] || (t[0] = (s) => {
|
|
70
|
+
c("templateChange", s);
|
|
71
|
+
})
|
|
72
|
+
}), null, 16)) : w("", !0)
|
|
315
73
|
]),
|
|
316
74
|
_: 1
|
|
317
75
|
}, 8, ["ok-text", "ok-button-props"]));
|
|
318
76
|
}
|
|
319
77
|
});
|
|
320
78
|
export {
|
|
321
|
-
|
|
79
|
+
j as default
|
|
322
80
|
};
|