@dazhicheng/ui 1.6.48 → 1.6.50

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.
Files changed (30) hide show
  1. package/dist/components/tt-custom-export-modal/src/TtCustomExportModal.vue.js +177 -177
  2. package/dist/components/tt-custom-export-modal/src/api.d.ts +12 -12
  3. package/dist/components/tt-custom-export-modal/src/api.js +23 -29
  4. package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.d.ts +2 -2
  5. package/dist/components/tt-custom-export-modal/src/components/FieldToolbarSection.vue.d.ts +1 -1
  6. package/dist/components/tt-custom-export-modal/src/components/TemplateManagerSection.vue.js +71 -54
  7. package/dist/components/tt-custom-export-modal/src/types/report.d.ts +8 -19
  8. package/dist/components/tt-drawer/index.d.ts +3 -3
  9. package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +1 -1
  10. package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +2 -2
  11. package/dist/components/tt-modal/index.d.ts +32 -32
  12. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +22 -22
  13. package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +2 -2
  14. package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +5 -5
  15. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +1 -1
  16. package/dist/components/tt-panel-select/src/components/PanelRight.vue.d.ts +1 -1
  17. package/dist/components/tt-panel-select/src/index.vue.d.ts +1 -1
  18. package/dist/components/tt-table/index.d.ts +17 -8
  19. package/dist/components/tt-table/src/Table.vue.d.ts +12 -6
  20. package/dist/components/tt-table/src/TableForm.vue.d.ts +9 -9
  21. package/dist/components/tt-table/src/TableForm.vue.js +68 -68
  22. package/dist/components/tt-table/src/hooks/useSideSlot.d.ts +4 -4
  23. package/dist/components/tt-table/src/props.d.ts +7 -4
  24. package/dist/components/tt-table/src/props.js +4 -4
  25. package/dist/components/tt-table/src/types/table.d.ts +6 -0
  26. package/dist/components/tt-table/src/types/tableForm.d.ts +0 -6
  27. package/dist/components/tt-upload/index.d.ts +11 -11
  28. package/dist/components/tt-upload/src/TtUpload.vue.d.ts +4 -4
  29. package/dist/style.css +1 -1
  30. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
- import { defineComponent as te, ref as c, computed as S, toValue as le, onBeforeUnmount as ae, createBlock as oe, openBlock as D, unref as q, withCtx as R, withDirectives as se, createElementBlock as ie, createVNode as F, createElementVNode as N, toDisplayString as $ } from "vue";
1
+ import { defineComponent as oe, shallowRef as T, ref as g, computed as v, toValue as se, onBeforeUnmount as ie, createBlock as ne, openBlock as R, unref as $, withCtx as O, withDirectives as de, createElementBlock as re, createVNode as N, createElementVNode as B, toDisplayString as U } from "vue";
2
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";
3
+ import { vLoading as ue, ElMessage as C, ElMessageBox as ce } from "element-plus";
4
+ import { isString as fe } from "../../../packages/utils/src/is.js";
5
5
  import "dayjs";
6
6
  import "numeral";
7
7
  import "xe-utils";
8
8
  import "dayjs/plugin/utc";
9
9
  import "dayjs/plugin/timezone";
10
- import { subtract as O, add as ue } from "../../../packages/utils/src/calc.js";
10
+ import { subtract as V, add as ve } from "../../../packages/utils/src/calc.js";
11
11
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
12
12
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
13
13
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
14
14
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
15
15
  import "lodash-es";
16
16
  import "../../tt-modal/index.js";
17
- import { defaultTemplatesExportApi as ce, deleteTemplatesExportApi as fe, saveTemplatesExportApi as ve, templatesExportApi as pe, fieldsTemplatesExportApi as me } from "./api.js";
18
- import Ce from "./components/FieldGridSection.vue.js";
19
- import Se from "./components/FieldToolbarSection.vue.js";
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({
17
+ import { setDefaultTemplatesExportApi as pe, deleteTemplatesExportApi as me, saveTemplatesExportApi as Ce, listTemplatesExportApi as Se, fieldsTemplatesExportApi as he } from "./api.js";
18
+ import we from "./components/FieldGridSection.vue.js";
19
+ import ge from "./components/FieldToolbarSection.vue.js";
20
+ import ye from "./components/TemplateManagerSection.vue.js";
21
+ import { useModalRender as xe } from "../../tt-modal/src/hooks/useModalRender.js";
22
+ const Te = { class: "flex flex-col gap-1 text-left" }, be = { class: "text-lg font-semibold leading-none text-(--el-text-color-primary)" }, Ae = { class: "text-xs text-(--el-text-color-secondary)" }, He = /* @__PURE__ */ oe({
23
23
  name: "TtCustomExportModal",
24
24
  __name: "TtCustomExportModal",
25
25
  props: {
@@ -34,283 +34,283 @@ const we = { class: "flex flex-col gap-1 text-left" }, ye = { class: "text-lg fo
34
34
  setDefaultTemplateApi: { type: Function, default: void 0 }
35
35
  },
36
36
  emits: ["export", "templateChange"],
37
- setup(U, { expose: V, emit: I }) {
38
- const i = U, T = I;
37
+ setup(I, { expose: P, emit: G }) {
38
+ const n = I, b = G;
39
39
  let o = Symbol();
40
- const [P, b] = ge({
40
+ const _ = T(o), [K, A] = xe({
41
41
  width: "1120px",
42
42
  destroyOnClose: !0,
43
43
  draggable: !0,
44
44
  showFooter: !0,
45
- onVisibleChange(t) {
46
- t || (o = Symbol());
45
+ onVisibleChange(e) {
46
+ e || (o = Symbol());
47
47
  }
48
- }), g = c({}), p = c(!1), w = c(!1), s = c([]), u = c([]), f = c(void 0), y = c(""), n = c(/* @__PURE__ */ new Set()), v = S(() => {
49
- const t = new Map(s.value.map((e) => [e.fieldCode, e]));
50
- return [...n.value].map((e) => t.get(e)).filter((e) => !!e);
51
- }), d = S(() => g.value.businessCode || i.businessCode || "BUSINESS_SALES_REPORT"), _ = S(() => g.value.title || i.title || ""), A = (t = le(
52
- g.value.listColumns ?? i.listColumns
53
- )) => (t ?? []).flatMap((e) => {
48
+ }), S = g({}), p = g(!1), h = g(!1), s = T([]), u = T([]), c = g(void 0), y = g(""), i = T(/* @__PURE__ */ new Set()), j = v(() => new Map(s.value.map((e) => [e.fieldCode, e]))), f = v(() => [...i.value].map((e) => j.value.get(e)).filter((e) => !!e)), d = v(() => S.value.businessCode || n.businessCode || "BUSINESS_SALES_REPORT"), M = v(() => S.value.title || n.title || ""), E = (e = se(
49
+ S.value.listColumns ?? n.listColumns
50
+ )) => (e ?? []).flatMap((t) => {
54
51
  var l;
55
- return re(e) ? [e] : e.visible === !1 ? [] : (l = e.children) != null && l.length ? A(e.children) : e.field ? [e.field] : [];
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);
52
+ return fe(t) ? [t] : t.visible === !1 ? [] : (l = t.children) != null && l.length ? E(t.children) : t.field ? [t.field] : [];
53
+ }), z = v(() => E()), w = v(() => {
54
+ const e = y.value.trim().toLowerCase();
55
+ return e ? s.value.filter((t) => {
56
+ const l = (t.fieldName ?? "").toLowerCase().includes(e), a = (t.fieldCode ?? "").toLowerCase().includes(e);
60
57
  return l || a;
61
58
  }) : 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);
59
+ }), k = v(() => w.value.length === 0 ? !1 : w.value.every((e) => i.value.has(e.fieldCode || ""))), D = () => {
60
+ const e = u.value.find((t) => t.defaultTemplate);
61
+ if (c.value = e == null ? void 0 : e.id, e && e.fields && e.fields.length > 0) {
62
+ const t = /* @__PURE__ */ new Set();
63
+ [...e.fields].sort((l, a) => V(l.sortNo ?? 0, a.sortNo ?? 0)).forEach((l) => {
64
+ l.fieldCode && t.add(l.fieldCode);
68
65
  }), s.value.forEach((l) => {
69
- l.requiredSelected && l.fieldCode && e.add(l.fieldCode);
70
- }), n.value = e;
66
+ l.requiredSelected && l.fieldCode && t.add(l.fieldCode);
67
+ }), i.value = t;
71
68
  }
72
- }, K = async (t) => {
73
- const e = g.value.availableFields || i.availableFields;
74
- if (e && e.length > 0) {
75
- s.value = [...e], E();
69
+ }, H = async (e) => {
70
+ const t = S.value.availableFields || n.availableFields;
71
+ if (t && t.length > 0) {
72
+ s.value = [...t], F();
76
73
  return;
77
74
  }
78
- if (i.fetchFieldsApi) {
75
+ if (n.fetchFieldsApi) {
79
76
  try {
80
- const l = await i.fetchFieldsApi({ businessCode: d.value });
81
- if (t !== o) return;
77
+ const l = await n.fetchFieldsApi({ businessCode: d.value });
78
+ if (e !== o) return;
82
79
  s.value = l ?? [];
83
80
  } catch {
84
- if (t !== o) return;
81
+ if (e !== o) return;
85
82
  s.value = [];
86
83
  }
87
- E();
84
+ F();
88
85
  return;
89
86
  }
90
87
  if (d.value) {
91
88
  try {
92
- const l = await me({
89
+ const l = await he({
93
90
  businessCode: d.value
94
91
  });
95
- if (t !== o) return;
92
+ if (e !== o) return;
96
93
  s.value = l ?? [];
97
94
  } catch {
98
- if (t !== o) return;
95
+ if (e !== o) return;
99
96
  s.value = [];
100
97
  }
101
- E();
98
+ F();
102
99
  }
103
- }, x = async (t) => {
104
- if (t === o) {
105
- if (i.fetchTemplatesApi) {
100
+ }, x = async (e) => {
101
+ if (e === o) {
102
+ if (n.fetchTemplatesApi) {
106
103
  try {
107
- const e = await i.fetchTemplatesApi({ businessCode: d.value });
108
- if (t !== o) return;
109
- u.value = e ?? [];
104
+ const t = await n.fetchTemplatesApi({ businessCode: d.value });
105
+ if (e !== o) return;
106
+ u.value = t ?? [];
110
107
  } catch {
111
- if (t !== o) return;
108
+ if (e !== o) return;
112
109
  u.value = [];
113
110
  }
114
- M();
111
+ D();
115
112
  return;
116
113
  }
117
114
  if (d.value) {
118
115
  try {
119
- const e = await pe({
116
+ const t = await Se({
120
117
  businessCode: d.value
121
118
  });
122
- if (t !== o) return;
123
- u.value = e ?? [];
119
+ if (e !== o) return;
120
+ u.value = t ?? [];
124
121
  } catch {
125
- if (t !== o) return;
122
+ if (e !== o) return;
126
123
  u.value = [];
127
124
  }
128
- M();
125
+ D();
129
126
  }
130
127
  }
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
- }, L = (t) => {
137
- if (f.value = t, !t) {
138
- T("templateChange", void 0);
128
+ }, F = () => {
129
+ const e = /* @__PURE__ */ new Set();
130
+ s.value.forEach((t) => {
131
+ (t.requiredSelected || t.defaultSelected) && t.fieldCode && e.add(t.fieldCode);
132
+ }), i.value = e;
133
+ }, L = (e) => {
134
+ if (c.value = e, !e) {
135
+ b("templateChange", void 0);
139
136
  return;
140
137
  }
141
- const e = u.value.find((l) => l.id === t);
142
- if (T("templateChange", e), e && e.fields && e.fields.length > 0) {
138
+ const t = u.value.find((l) => l.id === e);
139
+ if (b("templateChange", t), t && t.fields && t.fields.length > 0) {
143
140
  const l = /* @__PURE__ */ new Set();
144
- [...e.fields].sort((a, C) => O(a.sortNo ?? 0, C.sortNo ?? 0)).forEach((a) => {
141
+ [...t.fields].sort((a, m) => V(a.sortNo ?? 0, m.sortNo ?? 0)).forEach((a) => {
145
142
  a.fieldCode && l.add(a.fieldCode);
146
143
  }), s.value.forEach((a) => {
147
144
  a.requiredSelected && a.fieldCode && l.add(a.fieldCode);
148
- }), n.value = l;
145
+ }), i.value = l;
149
146
  }
150
- }, j = async (t) => {
147
+ }, J = async (e) => {
151
148
  if (!d.value) return;
152
- const e = o;
149
+ const t = o;
153
150
  try {
154
- if (i.setDefaultTemplateApi ? await i.setDefaultTemplateApi({
151
+ if (n.setDefaultTemplateApi ? await n.setDefaultTemplateApi({
155
152
  businessCode: d.value,
156
- templateId: t
157
- }) : await ce({
153
+ templateId: e
154
+ }) : await pe({
158
155
  businessCode: d.value,
159
- templateId: t
160
- }), e !== o) return;
161
- h.success("已设为默认模板"), await x(e);
156
+ templateId: e
157
+ }), t !== o) return;
158
+ C.success("已设为默认模板"), await x(t);
162
159
  } catch {
163
160
  }
164
- }, z = async (t, e) => {
161
+ }, Q = async (e, t) => {
165
162
  if (!d.value) return;
166
163
  const l = o;
167
164
  try {
168
- if (await de.confirm(`确定要删除导出模板「${e}」吗?`, "删除确认", {
165
+ if (await ce.confirm(`确定要删除导出模板「${t}」吗?`, "删除确认", {
169
166
  type: "warning",
170
167
  confirmButtonText: "确定删除",
171
168
  cancelButtonText: "取消"
172
- }), l !== o || (i.deleteTemplateApi ? await i.deleteTemplateApi({
169
+ }), l !== o || (n.deleteTemplateApi ? await n.deleteTemplateApi({
173
170
  businessCode: d.value,
174
- templateId: t
175
- }) : await fe({
171
+ templateId: e
172
+ }) : await me({
176
173
  businessCode: d.value,
177
- templateId: t
174
+ templateId: e
178
175
  }), l !== o)) return;
179
- h.success("模板删除成功"), f.value = void 0, await x(l);
176
+ C.success("模板删除成功"), c.value = void 0, await x(l);
180
177
  } catch {
181
178
  }
182
- }, H = async (t) => {
183
- if (p.value || w.value) return;
184
- if (v.value.length === 0) {
185
- h.warning("请至少勾选一个导出字段后再保存模板");
179
+ }, W = async (e) => {
180
+ if (p.value || h.value) return;
181
+ if (f.value.length === 0) {
182
+ C.warning("请至少勾选一个导出字段后再保存模板");
186
183
  return;
187
184
  }
188
- const e = o;
185
+ const t = o;
189
186
  try {
190
- w.value = !0;
191
- const l = v.value.map((r, ee) => ({
187
+ h.value = !0;
188
+ const l = f.value.map((r, ae) => ({
192
189
  fieldId: r.id,
193
190
  customColumnName: r.fieldName,
194
- sortNo: ue(ee, 1)
191
+ sortNo: ve(ae, 1)
195
192
  })), a = {
196
193
  businessCode: d.value,
197
- templateName: t,
194
+ templateName: e,
198
195
  fields: l
199
196
  };
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 && L(C.id);
197
+ if (n.saveTemplateApi ? await n.saveTemplateApi(a) : await Ce(a), t !== o || (C.success(`模板「${e}」保存成功`), await x(t), t !== o)) return;
198
+ const m = u.value.find((r) => r.templateName === e);
199
+ m && L(m.id);
203
200
  } catch {
204
201
  } finally {
205
- e === o && (w.value = !1);
202
+ t === o && (h.value = !1);
206
203
  }
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;
204
+ }, X = (e) => {
205
+ if (e.requiredSelected || !e.fieldCode) return;
206
+ const t = new Set(i.value);
207
+ t.has(e.fieldCode) ? t.delete(e.fieldCode) : t.add(e.fieldCode), i.value = t;
230
208
  }, Y = () => {
231
- if (p.value || !b.state.visible) return;
232
- if (v.value.length === 0) {
233
- h.warning("请至少勾选一个导出字段");
209
+ const e = new Set(i.value);
210
+ k.value ? w.value.forEach((t) => {
211
+ !t.requiredSelected && t.fieldCode && e.delete(t.fieldCode);
212
+ }) : w.value.forEach((t) => {
213
+ t.fieldCode && e.add(t.fieldCode);
214
+ }), i.value = e;
215
+ }, Z = () => {
216
+ const e = E();
217
+ if (e.length === 0) return;
218
+ const t = new Set(e), l = /* @__PURE__ */ new Set();
219
+ s.value.forEach((a) => {
220
+ a.fieldCode && (a.requiredSelected || t.has(a.fieldCode)) && l.add(a.fieldCode);
221
+ }), i.value = l, C.success("已同步表格当前展示列");
222
+ }, ee = () => {
223
+ const e = /* @__PURE__ */ new Set();
224
+ s.value.forEach((t) => {
225
+ t.requiredSelected && t.fieldCode && e.add(t.fieldCode);
226
+ }), i.value = e;
227
+ }, te = () => {
228
+ if (p.value || !A.state.visible) return;
229
+ if (f.value.length === 0) {
230
+ C.warning("请至少勾选一个导出字段");
234
231
  return;
235
232
  }
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 = {
233
+ const e = f.value, t = e.map((r) => r.fieldCode || "").filter(Boolean), l = e.map((r) => r.fieldName || r.fieldCode || "").filter(Boolean), a = u.value.find((r) => r.id === c.value), m = {
237
234
  businessCode: d.value,
238
- selectedFields: t,
239
- selectedFieldCodes: e,
235
+ selectedFields: e,
236
+ selectedFieldCodes: t,
240
237
  selectedFieldNames: l,
241
238
  templateName: a == null ? void 0 : a.templateName,
242
239
  templateId: a == null ? void 0 : a.id
243
240
  };
244
- T("export", C), k();
245
- }, Z = async (t) => {
246
- const e = Symbol();
247
- o = e, g.value = t || {}, f.value = void 0, y.value = "", w.value = !1, b.openModal(), p.value = !0;
241
+ b("export", m), q();
242
+ }, le = async (e) => {
243
+ const t = Symbol();
244
+ o = t, S.value = e || {}, s.value = [], u.value = [], i.value = /* @__PURE__ */ new Set(), _.value = t, c.value = void 0, y.value = "", h.value = !1, p.value = !0, A.openModal();
248
245
  try {
249
- if (await K(e), e !== o || (await x(e), e !== o)) return;
250
- if (t != null && t.defaultSelectedCodes && t.defaultSelectedCodes.length > 0) {
251
- const l = new Set(t.defaultSelectedCodes);
246
+ if (await H(t), t !== o || (await x(t), t !== o)) return;
247
+ if (e != null && e.defaultSelectedCodes && e.defaultSelectedCodes.length > 0) {
248
+ const l = new Set(e.defaultSelectedCodes);
252
249
  s.value.forEach((a) => {
253
250
  a.requiredSelected && a.fieldCode && l.add(a.fieldCode);
254
- }), n.value = l;
251
+ }), i.value = l;
255
252
  }
256
253
  } finally {
257
- e === o && (p.value = !1);
254
+ t === o && (p.value = !1);
258
255
  }
259
- }, k = () => {
260
- b.closeModal();
256
+ }, q = () => {
257
+ A.closeModal();
261
258
  };
262
- return ae(() => {
259
+ return ie(() => {
263
260
  o = Symbol();
264
- }), V({
261
+ }), P({
265
262
  /** 打开弹框并加载字段和模板;可传入本次打开的配置。 */
266
- open: Z,
263
+ open: le,
267
264
  /** 关闭弹框;下次打开时重新初始化。 */
268
- close: k
269
- }), (t, e) => (D(), oe(q(P), {
270
- "ok-text": `确认导出(${v.value.length} 字段)`,
265
+ close: q
266
+ }), (e, t) => (R(), ne($(K), {
267
+ "ok-text": `确认导出(${f.value.length} 字段)`,
271
268
  "cancel-text": "取消",
272
- "ok-button-props": { disabled: p.value || v.value.length === 0 },
273
- onOk: Y
269
+ "ok-button-props": { disabled: p.value || f.value.length === 0 },
270
+ onOk: te
274
271
  }, {
275
- header: R(() => [
276
- N("div", we, [
277
- N("h2", ye, " 自定义导出模板" + $(_.value ? ` - ${_.value}` : ""), 1),
278
- N("p", xe, " 全量字段共 " + $(s.value.length) + " 项(与履约报表导出字段一致);可保存多个导出模板,并选定一个作为默认导出模板 ", 1)
272
+ header: O(() => [
273
+ B("div", Te, [
274
+ B("h2", be, " 自定义导出模板" + U(M.value ? ` - ${M.value}` : ""), 1),
275
+ B("p", Ae, " 全量字段共 " + U(s.value.length) + " 项(与履约报表导出字段一致);可保存多个导出模板,并选定一个作为默认导出模板 ", 1)
279
276
  ])
280
277
  ]),
281
- default: R(() => [
282
- se((D(), ie("div", Te, [
283
- F(he, {
284
- "selected-template-id": f.value,
285
- "onUpdate:selectedTemplateId": e[0] || (e[0] = (l) => f.value = l),
278
+ default: O(() => [
279
+ de((R(), re("div", {
280
+ key: _.value,
281
+ class: "flex flex-col gap-3 py-1"
282
+ }, [
283
+ N(ye, {
284
+ "selected-template-id": c.value,
285
+ "onUpdate:selectedTemplateId": t[0] || (t[0] = (l) => c.value = l),
286
286
  "template-list": u.value,
287
- "is-saving": w.value,
287
+ "is-saving": h.value,
288
288
  onSelectTemplate: L,
289
- onSetDefault: j,
290
- onDelete: z,
291
- onSave: H
289
+ onSetDefault: J,
290
+ onDelete: Q,
291
+ onSave: W
292
292
  }, null, 8, ["selected-template-id", "template-list", "is-saving"]),
293
- F(Se, {
293
+ N(ge, {
294
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
295
+ "onUpdate:keyword": t[1] || (t[1] = (l) => y.value = l),
296
+ "is-all-selected": k.value,
297
+ "has-list-columns": z.value.length > 0,
298
+ onToggleSelectAll: Y,
299
+ onSelectByListColumns: Z,
300
+ onClearAll: ee
301
301
  }, null, 8, ["keyword", "is-all-selected", "has-list-columns"]),
302
- F(Ce, {
303
- "filtered-fields": m.value,
302
+ N(we, {
303
+ "filtered-fields": w.value,
304
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);
305
+ "selected-code-set": i.value,
306
+ "selected-fields": f.value,
307
+ onReorder: t[2] || (t[2] = (l) => {
308
+ i.value = new Set(l);
309
309
  }),
310
- onToggleField: J
310
+ onToggleField: X
311
311
  }, null, 8, ["filtered-fields", "total-field-count", "selected-code-set", "selected-fields"])
312
312
  ])), [
313
- [q(ne), p.value]
313
+ [$(ue), p.value]
314
314
  ])
315
315
  ]),
316
316
  _: 1
@@ -318,5 +318,5 @@ const we = { class: "flex flex-col gap-1 text-left" }, ye = { class: "text-lg fo
318
318
  }
319
319
  });
320
320
  export {
321
- je as default
321
+ He as default
322
322
  };
@@ -8,11 +8,11 @@ import { ReportAPI } from './types';
8
8
  */
9
9
  /**
10
10
  * 查询当前用户在指定业务下的模板列表。
11
- * @param params businessCode 为业务编码;列表接口不需要 templateId。
11
+ * @param body businessCode 为业务编码;列表接口不需要 templateId。
12
12
  * @param options TtHttp 扩展请求配置,原样传给请求层。
13
13
  * @returns 默认返回已解包的模板数组,包含默认标记和模板字段明细。
14
14
  */
15
- export declare function templatesExportApi(params: ReportAPI.templatesExportApiParams, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportTemplateCO[]>;
15
+ export declare function listTemplatesExportApi(body: ReportAPI.BusinessCodeCmd, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportTemplateCO[]>;
16
16
  /**
17
17
  * 保存模板,同名覆盖由服务端处理。
18
18
  * @param body 业务编码、模板名称及字段明细;fields 中的 sortNo 已由弹框按当前顺序生成。
@@ -22,36 +22,36 @@ export declare function templatesExportApi(params: ReportAPI.templatesExportApiP
22
22
  export declare function saveTemplatesExportApi(body: ReportAPI.ExportTemplateSaveCmd, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportTemplateCO>;
23
23
  /**
24
24
  * 查询指定模板详情;保留原接口,当前弹框直接使用列表中的字段明细。
25
- * @param params 业务编码和模板 ID。
25
+ * @param body 业务编码和模板 ID。
26
26
  * @param options TtHttp 扩展请求配置。
27
27
  * @returns 默认返回已解包的单个模板。
28
28
  */
29
- export declare function detailTemplatesExportApi(params: ReportAPI.detailTemplatesExportApiParams, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportTemplateCO>;
29
+ export declare function detailTemplatesExportApi(body: ReportAPI.TemplateIdCmd, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportTemplateCO>;
30
30
  /**
31
31
  * 删除指定模板;用户确认在弹框组件中完成,本函数只执行请求。
32
- * @param params 业务编码和待删除模板 ID。
32
+ * @param body 业务编码和待删除模板 ID。
33
33
  * @param options TtHttp 扩展请求配置。
34
34
  * @returns 删除请求结果;弹框不依赖响应字段,成功后重新查询列表。
35
35
  */
36
- export declare function deleteTemplatesExportApi(params: ReportAPI.deleteTemplatesExportApiParams, options?: ExtendedAxiosRequestConfig): Promise<any>;
36
+ export declare function deleteTemplatesExportApi(body: ReportAPI.TemplateIdCmd, options?: ExtendedAxiosRequestConfig): Promise<any>;
37
37
  /**
38
38
  * 将指定模板设为当前业务的默认模板。
39
- * @param params 业务编码和目标模板 ID。
39
+ * @param body 业务编码和目标模板 ID。
40
40
  * @param options TtHttp 扩展请求配置。
41
41
  * @returns 设置请求结果;最新默认标记由后续列表查询取得。
42
42
  */
43
- export declare function defaultTemplatesExportApi(params: ReportAPI.defaultTemplatesExportApiParams, options?: ExtendedAxiosRequestConfig): Promise<any>;
43
+ export declare function setDefaultTemplatesExportApi(body: ReportAPI.TemplateIdCmd, options?: ExtendedAxiosRequestConfig): Promise<any>;
44
44
  /**
45
45
  * 单独查询业务的默认模板;当前弹框从列表的 defaultTemplate 标记中查找,不调用此方法。
46
- * @param params businessCode 为业务编码,不需要传模板 ID。
46
+ * @param body businessCode 为业务编码,不需要传模板 ID。
47
47
  * @param options TtHttp 扩展请求配置。
48
48
  * @returns 默认返回已解包的默认模板。
49
49
  */
50
- export declare function defaultTemplateTemplatesExportApi(params: ReportAPI.defaultTemplateTemplatesExportApiParams, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportTemplateCO>;
50
+ export declare function defaultTemplateTemplatesExportApi(body: ReportAPI.BusinessCodeCmd, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportTemplateCO>;
51
51
  /**
52
52
  * 查询字段元数据,提供编码、名称、必选/默认勾选标记等信息。
53
- * @param params 业务编码和可选 keyword;弹框当前使用本地搜索,不传 keyword。
53
+ * @param body 业务编码和可选 keyword;弹框当前使用本地搜索,不传 keyword。
54
54
  * @param options TtHttp 扩展请求配置。
55
55
  * @returns 默认返回已解包的字段数组,作为左侧列表及导出字段查找的数据源。
56
56
  */
57
- export declare function fieldsTemplatesExportApi(params: ReportAPI.fieldsTemplatesExportApiParams, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportFieldCO[]>;
57
+ export declare function fieldsTemplatesExportApi(body: ReportAPI.FieldsCmd, options?: ExtendedAxiosRequestConfig): Promise<ReportAPI.ExportFieldCO[]>;
@@ -1,44 +1,38 @@
1
- import { request as p } from "../../../utils/xhr.js";
2
- async function n(t, o) {
3
- const { businessCode: e } = t;
4
- return p.get({
5
- url: `/report/api/export/templates/${e}`,
6
- params: { ...t }
1
+ import { request as e } from "../../../utils/xhr.js";
2
+ async function o(t, p) {
3
+ return e.post({
4
+ url: "/report/api/export/templates/list",
5
+ data: t
7
6
  });
8
7
  }
9
- async function a(t, o) {
10
- return p.post({
8
+ async function a(t, p) {
9
+ return e.post({
11
10
  url: "/report/api/export/templates/save",
12
11
  data: t
13
12
  });
14
13
  }
15
- async function i(t, o) {
16
- const { businessCode: e, templateId: s } = t;
17
- return p.del({
18
- url: `/report/api/export/templates/delete/${e}/${s}`,
19
- params: { ...t }
14
+ async function s(t, p) {
15
+ return e.post({
16
+ url: "/report/api/export/templates/delete",
17
+ data: t
20
18
  });
21
19
  }
22
- async function l(t, o) {
23
- const { businessCode: e, templateId: s } = t;
24
- return p.put({
25
- url: `/report/api/export/templates/${e}/${s}/default`,
26
- params: { ...t }
20
+ async function i(t, p) {
21
+ return e.post({
22
+ url: "/report/api/export/templates/setDefault",
23
+ data: t
27
24
  });
28
25
  }
29
- async function u(t, o) {
30
- const { businessCode: e } = t;
31
- return p.get({
32
- url: `/report/api/export/templates/${e}/fields`,
33
- params: {
34
- ...t
35
- }
26
+ async function n(t, p) {
27
+ return e.post({
28
+ url: "/report/api/export/templates/fields",
29
+ data: t
36
30
  });
37
31
  }
38
32
  export {
39
- l as defaultTemplatesExportApi,
40
- i as deleteTemplatesExportApi,
41
- u as fieldsTemplatesExportApi,
33
+ s as deleteTemplatesExportApi,
34
+ n as fieldsTemplatesExportApi,
35
+ o as listTemplatesExportApi,
42
36
  a as saveTemplatesExportApi,
43
- n as templatesExportApi
37
+ i as setDefaultTemplatesExportApi
44
38
  };