zhihao-ui 1.2.68 → 1.2.70

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 (81) hide show
  1. package/dist/es/{BaseInfo-BhnEjLKF.js → BaseInfo-BQ9mgGZQ.js} +1 -1
  2. package/dist/es/{BaseItem-C4NJy1i4.js → BaseItem-ByAS3S8w.js} +3 -3
  3. package/dist/es/{Button-CGndQwez.js → Button-BdGo3Kfv.js} +2 -2
  4. package/dist/es/CascaderLoadMore-B3dBPBJz.js +243 -0
  5. package/dist/es/DatePicker-C-2zM1dY.js +73 -0
  6. package/dist/es/{DetailHeader-DaabNj_4.js → DetailHeader-Dd_oHefQ.js} +3 -3
  7. package/dist/es/{DetailSubTitle-CzFZPXeE.js → DetailSubTitle-1YWi0mX_.js} +2 -2
  8. package/dist/es/{Dialog-BUW6ag1B.js → Dialog-Cib_m5sM.js} +3 -3
  9. package/dist/es/DiyDataTable-beBJdlLe.js +364 -0
  10. package/dist/es/{EditInfoPair-B2f6zoGY.js → EditInfoPair-BCbIIBEP.js} +3 -3
  11. package/dist/es/{FileWrapper-D4IxJemr.js → FileWrapper-ClTHhvQU.js} +4 -4
  12. package/dist/es/{Grid-DIs695lY.js → Grid-DvrmAWyU.js} +2 -2
  13. package/dist/es/{InfoPair-Ce7nDfxD.js → InfoPair-Bf-X09VT.js} +3 -3
  14. package/dist/es/{Input-C5X2X_YD.js → Input-uOt745UZ.js} +14 -14
  15. package/dist/es/{Loading-BgoEv5qE.js → Loading-C_6ERpeb.js} +2 -2
  16. package/dist/es/Map-XWdLIa5C.js +2528 -0
  17. package/dist/es/{MessageBox-DiGH5x51.js → MessageBox-h_sFrr4D.js} +2 -2
  18. package/dist/es/{MoneyInput-D0kYiOfP.js → MoneyInput-D8V7_PZq.js} +8 -8
  19. package/dist/es/{PageHeadPanel-C6IdOq6I.js → PageHeadPanel-DLs1xYME.js} +2 -2
  20. package/dist/es/Table-DgS42Pzw.js +1167 -0
  21. package/dist/es/{ToolTips-CiQHxGrw.js → ToolTips-CSVL9wbb.js} +6 -6
  22. package/dist/es/index.js +77 -60
  23. package/dist/es/{utils-D2wHR1YB.js → utils-UjENBVnX.js} +1 -1
  24. package/dist/es/{vendor-D2mv9LHk.js → vendor-9390iK3y.js} +30756 -26238
  25. package/dist/index.css +1 -1
  26. package/dist/types/components/BaseItem/index.d.ts +9 -9
  27. package/dist/types/components/Dialog/Dialog.vue.d.ts +16 -16
  28. package/dist/types/components/Dialog/index.d.ts +24 -24
  29. package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +18 -1
  30. package/dist/types/components/DiyDataTable/index.d.ts +30 -0
  31. package/dist/types/components/DiyDataTable/type.d.ts +17 -1
  32. package/dist/types/components/Map/Map.vue.d.ts +138 -101
  33. package/dist/types/components/Map/components/scaleLine.vue.d.ts +1 -2
  34. package/dist/types/components/Map/components/zoomControl.vue.d.ts +3 -7
  35. package/dist/types/components/Map/index.d.ts +390 -324
  36. package/dist/types/components/Map/interface/index.d.ts +13 -6
  37. package/dist/types/components/Map/types.d.ts +13 -1
  38. package/dist/types/components/Table/types.d.ts +1 -0
  39. package/dist/types/components/ToolTips/index.d.ts +12 -12
  40. package/dist/types/components/index.d.ts +1 -0
  41. package/dist/umd/index.css +1 -1
  42. package/dist/umd/index.umd.cjs +604 -130
  43. package/package.json +1 -1
  44. package/dist/es/DatePicker-Dy1K1cJQ.js +0 -57
  45. package/dist/es/DiyDataTable-D-UZVciZ.js +0 -331
  46. package/dist/es/Map-DbbD377l.js +0 -2235
  47. package/dist/es/Table-B_3YA1mb.js +0 -1155
  48. package/dist/types/components/Map/config/global.d.ts +0 -2
  49. package/dist/types/components/Map/config/index.d.ts +0 -2
  50. package/dist/types/components/Map/config/map.d.ts +0 -22
  51. package/dist/types/components/Map/function/carTrack.d.ts +0 -11
  52. package/dist/types/components/Map/function/drawLine.d.ts +0 -12
  53. package/dist/types/components/Map/function/drawPolygon.d.ts +0 -9
  54. package/dist/types/components/Map/function/event.d.ts +0 -9
  55. package/dist/types/components/Map/function/layers.d.ts +0 -10
  56. package/dist/types/components/Map/function/map.d.ts +0 -18
  57. package/dist/types/components/Map/function/port.d.ts +0 -10
  58. package/dist/types/components/Map/function/position.d.ts +0 -8
  59. package/dist/types/components/Map/function/props.d.ts +0 -7
  60. package/dist/types/components/Map/function/ship/index.d.ts +0 -16
  61. package/dist/types/components/Map/function/ship/label.d.ts +0 -5
  62. package/dist/types/components/Map/function/ship/style.d.ts +0 -23
  63. package/dist/types/components/Map/function/shipOverlay.d.ts +0 -12
  64. package/dist/types/components/Map/function/shipTrack.d.ts +0 -16
  65. package/dist/types/components/Map/interface/carTrack.d.ts +0 -70
  66. package/dist/types/components/Map/interface/label.d.ts +0 -27
  67. package/dist/types/components/Map/interface/mapProps.d.ts +0 -15
  68. package/dist/types/components/Map/interface/position.d.ts +0 -7
  69. package/dist/types/components/Map/interface/shipInfoVo.d.ts +0 -214
  70. package/dist/types/components/Map/interface/shipTrack.d.ts +0 -57
  71. package/dist/types/components/Map/interface/wharfEntity.d.ts +0 -20
  72. package/dist/types/components/Map/meta/index.d.ts +0 -17
  73. package/dist/types/components/Map/meta/ship.d.ts +0 -26
  74. package/dist/types/components/Map/useMap.d.ts +0 -17
  75. package/dist/types/components/Map/utils/cursor.d.ts +0 -3
  76. package/dist/types/components/Map/utils/events.d.ts +0 -4
  77. package/dist/types/components/Map/utils/overlay.d.ts +0 -5
  78. package/dist/types/components/Map/utils/rbush.d.ts +0 -13
  79. package/dist/types/components/Map/utils/shipOverlay.d.ts +0 -12
  80. package/dist/types/components/Map/utils/track.d.ts +0 -45
  81. package/dist/types/components/Map/utils/util.d.ts +0 -42
@@ -1,1155 +0,0 @@
1
- import { reactive as X, computed as F, toRefs as Ae, ref as M, defineComponent as ne, useCssVars as dt, inject as Ke, openBlock as w, createElementBlock as L, createBlock as R, resolveDynamicComponent as de, mergeProps as J, withKeys as pt, unref as p, createSlots as pe, withCtx as C, Fragment as H, renderList as he, renderSlot as A, createElementVNode as B, toDisplayString as Q, createVNode as S, withModifiers as ht, normalizeClass as Ue, createCommentVNode as I, createTextVNode as Z, useSlots as xe, isVNode as ft, normalizeProps as je, guardReactiveProps as Ne, nextTick as fe, onMounted as mt, onActivated as gt, onDeactivated as vt, onUnmounted as bt, watch as yt, provide as Ct, resolveDirective as St, withDirectives as Ce, vShow as wt, toHandlers as _t } from "vue";
2
- import { a0 as We, a1 as kt, a2 as Pt, a3 as qe, a4 as Tt, j as $t, a5 as Et, m as Bt, a6 as zt, $ as me, b as ke, a as ge, a7 as It, a8 as Mt, l as oe, a9 as Lt, aa as Dt, ab as Rt, ac as He, ad as Ze, i as q, k as Ge, ae as De, af as Ft, ag as Je, ah as Ot, ai as Vt, aj as At, ak as Kt, E as Se, al as Ut, g as xt, am as jt, an as Re, ao as Fe } from "./vendor-D2mv9LHk.js";
3
- import { D as ee, C as Nt } from "./BaseItem-C4NJy1i4.js";
4
- import { _ as le, Z as we } from "./Button-CGndQwez.js";
5
- import { _ as Wt } from "./Dialog-BUW6ag1B.js";
6
- import { w as qt } from "./utils-D2wHR1YB.js";
7
- const Ht = 12;
8
- function Pe(m, c, a, f) {
9
- return m.reduce((g, y) => {
10
- if (g) return g;
11
- if (y[a] === c) return y;
12
- if (y[f]) return Pe(y[f], c, a, f);
13
- }, null);
14
- }
15
- function Zt(m, c, a) {
16
- const f = Pt(a) ? ee : a, g = We(m, c);
17
- return kt(g) || g === "" ? f : g;
18
- }
19
- const Oe = Zt;
20
- function K(m) {
21
- const c = m.split(".");
22
- return c.length == 1 ? m : c[c.length - 1];
23
- }
24
- function Ve(m, c, a, f) {
25
- const g = (a == null ? void 0 : a.value) ?? "value", y = (a == null ? void 0 : a.label) ?? "label", t = (a == null ? void 0 : a.children) ?? "children";
26
- let b = {};
27
- return Array.isArray(c) && (b = Pe(c, m, g, t)), f == "tag" ? b != null && b.tagType ? b.tagType : "" : b ? b[y] : ee;
28
- }
29
- function Gt(m, c, a) {
30
- const f = "value", g = "children";
31
- let y = {};
32
- return Array.isArray(c) && (y = Pe(c, m, f, g)), y;
33
- }
34
- function Jt(m) {
35
- return qe(m) ? m.length ? m.join(" / ") : ee : m ?? ee;
36
- }
37
- function ce(m, c) {
38
- return c.includes(".") ? (c.split(".").forEach((a) => m = m[a] ?? ee), m) : m[c] ?? ee;
39
- }
40
- const ae = (m, c) => {
41
- const a = c || Ht, g = document.createElement("canvas").getContext("2d");
42
- return g.font = `${a}px Microsoft YaHei`, g.measureText(m).width;
43
- }, Qt = (m) => {
44
- const c = m || "zhihao-col-setting", a = () => {
45
- const b = localStorage.getItem(c);
46
- return b ? JSON.parse(b) : {};
47
- }, f = (b) => {
48
- localStorage.setItem(c, JSON.stringify(b));
49
- };
50
- return {
51
- getMap: a,
52
- setMap: f,
53
- getColumnCache: (b) => a()[b] || [],
54
- setColumnCache: (b, n) => {
55
- const h = a();
56
- h[b] = n, f(h);
57
- },
58
- removeColumnCache: (b) => {
59
- const n = a();
60
- delete n[b], f(n);
61
- }
62
- };
63
- }, Yt = (m, c = {}, a = !0, f, g, y = (t) => t) => {
64
- const t = X({
65
- // 表格数据
66
- tableData: [],
67
- // 分页数据
68
- pageable: {
69
- // 当前页数
70
- page: 1,
71
- // 每页显示条数
72
- size: 10,
73
- // 总条数
74
- total: 0
75
- },
76
- // 查询参数(只包括查询)
77
- searchParam: {},
78
- // 初始化默认的查询参数
79
- searchInitParam: {},
80
- // 总参数(包含分页和查询参数)
81
- totalParam: {},
82
- // 是否在加载中
83
- loading: !1
84
- }), b = F({
85
- get: () => ({
86
- page: t.pageable.page,
87
- size: t.pageable.size
88
- }),
89
- set: (T) => {
90
- console.log("我是分页更新之后的值", T);
91
- }
92
- }), n = async () => {
93
- if (t.loading = !0, !m) {
94
- t.loading = !1;
95
- return;
96
- }
97
- try {
98
- const T = localStorage.getItem("MytaskGotoListPageQuery");
99
- if (T) {
100
- c = {}, t.totalParam = {};
101
- const i = JSON.parse(T);
102
- c = { ...c, ...i }, t.searchParam = { ...i };
103
- }
104
- Object.assign(t.totalParam, c, a ? b.value : {});
105
- for (const i in t.searchParam)
106
- t.searchParam[i] === "" && delete t.searchParam[i];
107
- let e = await m(y({ ...t.searchInitParam, ...t.totalParam }));
108
- if (f && (e = await f(e)), t.tableData = a ? e.list : e, a) {
109
- const { currentPage: i, pageSize: s, total: l } = e;
110
- U({ page: i, size: s, total: l });
111
- }
112
- } catch (T) {
113
- g && g(T);
114
- } finally {
115
- t.loading = !1;
116
- }
117
- }, h = () => {
118
- t.totalParam = {}, t.searchInitParam = {}, c = {};
119
- const T = {};
120
- for (const e in t.searchParam)
121
- (t.searchParam[e] || t.searchParam[e] === !1 || t.searchParam[e] === 0) && (T[e] = t.searchParam[e]);
122
- Object.assign(t.totalParam, T, a ? b.value : {});
123
- }, U = (T) => {
124
- Object.assign(t.pageable, T);
125
- }, V = () => {
126
- t.pageable.page = 1, h(), n().then();
127
- }, N = () => {
128
- t.pageable.page = 1, t.searchParam = { ...t.searchInitParam }, h(), n().then();
129
- }, W = (T) => {
130
- t.pageable.page = 1, t.pageable.size = T, n().then();
131
- }, O = (T) => {
132
- t.pageable.page = T, n().then();
133
- };
134
- return {
135
- ...Ae(t),
136
- getTableList: n,
137
- search: V,
138
- reset: N,
139
- handleSizeChange: W,
140
- handleCurrentChange: O,
141
- updatedTotalParam: h
142
- };
143
- }, Xt = (m = "id", c) => {
144
- const a = M(!1), f = M([]), g = F(() => {
145
- const t = [];
146
- return f.value.forEach((b) => t.push(We(b, m))), t;
147
- });
148
- return {
149
- isSelected: a,
150
- selectedList: f,
151
- selectedListIds: g,
152
- selectionChange: (t) => {
153
- t.length ? a.value = !0 : a.value = !1, f.value = t, c && c(t);
154
- }
155
- };
156
- }, ea = { class: "search-form-item" }, ta = /* @__PURE__ */ ne({
157
- name: "SearchFormItem",
158
- __name: "SearchFormItem",
159
- props: {
160
- column: {},
161
- searchParam: {}
162
- },
163
- emits: ["search"],
164
- setup(m, { emit: c }) {
165
- dt((e) => ({
166
- "20c95159": V.value
167
- }));
168
- const a = m, f = c, g = F(() => a.searchParam), y = F(() => {
169
- var e, i, s;
170
- return {
171
- label: ((e = a.column.fieldNames) == null ? void 0 : e.label) ?? "label",
172
- value: ((i = a.column.fieldNames) == null ? void 0 : i.value) ?? "value",
173
- children: ((s = a.column.fieldNames) == null ? void 0 : s.children) ?? "children"
174
- };
175
- }), t = Ke("enumMap", M(/* @__PURE__ */ new Map())), b = F(() => {
176
- var i;
177
- let e = t.value.get(a.column.prop);
178
- return e ? (((i = a.column.search) == null ? void 0 : i.el) === "select-v2" && a.column.fieldNames && (e = e.map((s) => ({ ...s, label: s[y.value.label], value: s[y.value.value] }))), e) : [];
179
- }), n = F(() => {
180
- var e, i;
181
- return ((i = (e = a.column.search) == null ? void 0 : e.props) == null ? void 0 : i.options) ?? b.value ?? [];
182
- }), h = F(() => {
183
- var z, k;
184
- const e = y.value.label, i = y.value.value, s = y.value.children, l = (z = a.column.search) == null ? void 0 : z.el;
185
- let v = ((k = a.column.search) == null ? void 0 : k.props) ?? {};
186
- return l === "tree-select" && (v = { ...v, props: { ...v.props, label: e, children: s }, nodeKey: i }), l === "cascader" && (v = { ...v, props: { ...v.props, label: e, value: i, children: s } }), v;
187
- }), U = F(() => {
188
- var s, l, v, z, k, P, _;
189
- const e = a.column.search;
190
- return ["datetimerange", "daterange", "monthrange"].includes((s = e == null ? void 0 : e.props) == null ? void 0 : s.type) || (l = e == null ? void 0 : e.props) != null && l.isRange ? {
191
- rangeSeparator: ((v = e == null ? void 0 : e.props) == null ? void 0 : v.rangeSeparator) ?? "-",
192
- startPlaceholder: ((z = e == null ? void 0 : e.props) == null ? void 0 : z.startPlaceholder) ?? "开始时间",
193
- endPlaceholder: ((k = e == null ? void 0 : e.props) == null ? void 0 : k.endPlaceholder) ?? "结束时间"
194
- } : { placeholder: ((P = e == null ? void 0 : e.props) == null ? void 0 : P.placeholder) ?? ((_ = e == null ? void 0 : e.el) != null && _.includes("input") ? "请输入" : "请选择") };
195
- }), V = F(() => {
196
- var v, z;
197
- const e = a.column.search, i = g.value[(e == null ? void 0 : e.key) ?? K(a.column.prop)], s = e == null ? void 0 : e.el, l = (v = e == null ? void 0 : e.props) == null ? void 0 : v.placeholder;
198
- if (e != null && e.width)
199
- if (Tt(e == null ? void 0 : e.width)) {
200
- if (e == null ? void 0 : e.width(i))
201
- return (e == null ? void 0 : e.width(i)) + "px";
202
- } else
203
- return (e == null ? void 0 : e.width) + "px";
204
- if (i && i.length !== 0 && ["select", "select-v2", "tree-select", "cascader"].includes(s || "")) {
205
- if (qe(i)) {
206
- let _ = n.value;
207
- const $ = [];
208
- if (i.forEach((D) => {
209
- const x = _.find((ve) => ve[y.value.value] === D);
210
- $.push(x ? x[y.value.label] : D);
211
- const G = x[y.value.children] ?? n.value;
212
- _ = x ? G : [];
213
- }), (z = e == null ? void 0 : e.props) != null && z.multiple) {
214
- const G = ae($[0]) + 42;
215
- return i.length > 1 ? G + 26 + ae("+ " + (i.length - 1)) + "px" : G + "px";
216
- }
217
- return ae($.join(" / ")) + "px";
218
- }
219
- let k = n.value.find((_) => _[y.value.value] === i);
220
- const P = k ? k[y.value.label] : i;
221
- return ae(P) + "px";
222
- } else return l ? ae(l) + "px" : ["date-picker", "time-picker", "time-select"].includes(s || "") ? "210px" : "100px";
223
- }), N = F(() => {
224
- var e, i, s, l, v;
225
- return (s = (i = (e = a.column) == null ? void 0 : e.search) == null ? void 0 : i.props) != null && s.multiple && ((v = (l = a.column) == null ? void 0 : l.search) == null ? void 0 : v.el) === "select" ? {
226
- collapseTags: !0,
227
- collapseTagsTooltip: !0
228
- } : {};
229
- }), W = F(() => {
230
- var i;
231
- const e = a.column.search;
232
- return ((i = e == null ? void 0 : e.props) == null ? void 0 : i.clearable) ?? ((e == null ? void 0 : e.defaultValue) == null || !1);
233
- }), O = (e) => {
234
- var i, s, l, v, z, k, P, _, $;
235
- if (((l = (s = (i = a.column) == null ? void 0 : i.search) == null ? void 0 : s.props) == null ? void 0 : l.type) === "daterange") {
236
- const { searchParam: D } = Ae(a);
237
- if (e != null && e.length) {
238
- const x = ((k = (z = (v = a.column) == null ? void 0 : v.search) == null ? void 0 : z.props) == null ? void 0 : k.beginTime) || "beginTime", G = (($ = (_ = (P = a.column) == null ? void 0 : P.search) == null ? void 0 : _.props) == null ? void 0 : $.endTime) || "endTime";
239
- D.value[x] = e[0], D.value[G] = e[1];
240
- } else
241
- delete D.value.beginTime, delete D.value.endTime;
242
- }
243
- (e == null || e === "") && f("search"), e instanceof Array && !e.length && f("search");
244
- }, T = () => {
245
- var e;
246
- ["input", "input-number"].includes(((e = a.column.search) == null ? void 0 : e.el) || "") && f("search");
247
- };
248
- return (e, i) => {
249
- var s, l, v, z, k, P, _;
250
- return w(), L("div", ea, [
251
- (w(), R(de(((s = e.column.search) == null ? void 0 : s.render) ?? `el-${(l = e.column.search) == null ? void 0 : l.el}`), J({ ...h.value, ...U.value, searchParam: g.value, clearable: W.value, ...N.value }, {
252
- modelValue: g.value[((v = e.column.search) == null ? void 0 : v.key) ?? p(K)(e.column.prop)],
253
- "onUpdate:modelValue": i[0] || (i[0] = ($) => {
254
- var D;
255
- return g.value[((D = e.column.search) == null ? void 0 : D.key) ?? p(K)(e.column.prop)] = $;
256
- }),
257
- modelModifiers: { trim: !0 },
258
- data: ((z = e.column.search) == null ? void 0 : z.el) === "tree-select" ? b.value : [],
259
- options: n.value,
260
- "prefix-icon": (P = (k = e.column.search) == null ? void 0 : k.props) == null ? void 0 : P.prefixIcon,
261
- onChange: O,
262
- onKeyup: pt(T, ["enter"])
263
- }), pe({
264
- default: C(() => {
265
- var $;
266
- return [
267
- (($ = e.column.search) == null ? void 0 : $.el) === "select" ? (w(!0), L(H, { key: 0 }, he(b.value, (D, x) => (w(), R(de("el-option"), {
268
- key: x,
269
- label: D[y.value.label] ?? "",
270
- value: D[y.value.value]
271
- }, null, 8, ["label", "value"]))), 128)) : A(e.$slots, "default", { key: 1 }, void 0, !0)
272
- ];
273
- }),
274
- _: 2
275
- }, [
276
- ((_ = e.column.search) == null ? void 0 : _.el) === "cascader" ? {
277
- name: "default",
278
- fn: C(({ data: $ }) => [
279
- B("span", null, Q($[y.value.label]), 1)
280
- ]),
281
- key: "0"
282
- } : void 0
283
- ]), 1040, ["modelValue", "data", "options", "prefix-icon"]))
284
- ]);
285
- };
286
- }
287
- }), aa = /* @__PURE__ */ le(ta, [["__scopeId", "data-v-5a276628"]]), na = { class: "table-search" }, oa = { key: 0 }, la = {
288
- key: 0,
289
- class: "operation"
290
- }, ra = /* @__PURE__ */ ne({
291
- name: "SearchForm",
292
- __name: "SearchForm",
293
- props: {
294
- columns: { default: () => [] },
295
- searchParam: { default: () => ({}) },
296
- search: {},
297
- reset: {},
298
- isShowResetBtn: { type: Boolean, default: !0 },
299
- isShowSearchBtn: { type: Boolean, default: !0 }
300
- },
301
- setup(m) {
302
- const c = m;
303
- return (a, f) => (w(), L("div", na, [
304
- S(p($t), {
305
- ref: "formRef",
306
- model: a.searchParam,
307
- class: "table-search--left",
308
- onSubmit: f[0] || (f[0] = ht(() => {
309
- }, ["prevent"]))
310
- }, {
311
- default: C(() => [
312
- A(a.$slots, "default", {}, void 0, !0),
313
- a.columns.length ? (w(), L(H, { key: 0 }, [
314
- (w(!0), L(H, null, he(a.columns, (g) => {
315
- var y, t, b;
316
- return w(), L(H, {
317
- key: g.prop
318
- }, [
319
- !p(Et)((y = g.search) == null ? void 0 : y.isShow) || (t = g.search) != null && t.isShow ? (w(), L("div", oa, [
320
- S(p(Bt), null, pe({
321
- default: C(() => [
322
- S(aa, {
323
- column: g,
324
- "search-param": a.searchParam,
325
- onSearch: a.search
326
- }, null, 8, ["column", "search-param", "onSearch"])
327
- ]),
328
- _: 2
329
- }, [
330
- (b = g.search) != null && b.label ? {
331
- name: "label",
332
- fn: C(() => [
333
- S(p(zt), { size: 4 }, {
334
- default: C(() => {
335
- var n, h;
336
- return [
337
- B("span", null, Q(`${g.search.label}`), 1),
338
- (n = g.search) != null && n.tooltip ? (w(), R(p(me), {
339
- key: 0,
340
- effect: "dark",
341
- content: (h = g.search) == null ? void 0 : h.tooltip,
342
- placement: "top"
343
- }, {
344
- default: C(() => f[1] || (f[1] = [
345
- B("i", {
346
- class: Ue("iconfont icon-yiwen")
347
- }, null, -1)
348
- ])),
349
- _: 2
350
- }, 1032, ["content"])) : I("", !0)
351
- ];
352
- }),
353
- _: 2
354
- }, 1024),
355
- f[2] || (f[2] = B("span", null, ":", -1))
356
- ]),
357
- key: "0"
358
- } : void 0
359
- ]), 1024)
360
- ])) : I("", !0)
361
- ], 64);
362
- }), 128)),
363
- c.isShowSearchBtn ? (w(), R(p(ke), {
364
- key: 0,
365
- type: "primary",
366
- class: "table-search--search-btn",
367
- onClick: a.search
368
- }, {
369
- icon: C(() => f[3] || (f[3] = [
370
- B("i", { class: "ztable-iconfont icon-zhihao-table-search" }, null, -1)
371
- ])),
372
- default: C(() => [
373
- f[4] || (f[4] = Z(" 搜索 "))
374
- ]),
375
- _: 1
376
- }, 8, ["onClick"])) : I("", !0)
377
- ], 64)) : I("", !0)
378
- ]),
379
- _: 3
380
- }, 8, ["model"]),
381
- c.isShowResetBtn && a.columns.length ? (w(), L("div", la, [
382
- S(p(me), {
383
- class: "box-item",
384
- effect: "light",
385
- content: "重置",
386
- placement: "top"
387
- }, {
388
- default: C(() => [
389
- S(p(ke), {
390
- class: "table-search--reset-btn",
391
- onClick: a.reset
392
- }, {
393
- icon: C(() => [
394
- S(p(ge), { size: 14 }, {
395
- default: C(() => [
396
- S(p(It))
397
- ]),
398
- _: 1
399
- })
400
- ]),
401
- _: 1
402
- }, 8, ["onClick"])
403
- ]),
404
- _: 1
405
- })
406
- ])) : I("", !0)
407
- ]));
408
- }
409
- }), sa = /* @__PURE__ */ le(ra, [["__scopeId", "data-v-e524e82e"]]), ua = { class: "el-pagination__total zh-page-total" }, ia = /* @__PURE__ */ ne({
410
- name: "Pagination",
411
- __name: "tablePagination",
412
- props: {
413
- pageable: {},
414
- handleSizeChange: { type: Function },
415
- handleCurrentChange: { type: Function }
416
- },
417
- setup(m) {
418
- return (c, a) => c.pageable.total ? (w(), R(p(Mt), {
419
- key: 0,
420
- class: "zh-pagination",
421
- background: !0,
422
- "current-page": c.pageable.page,
423
- "page-size": c.pageable.size,
424
- total: c.pageable.total,
425
- teleported: !1,
426
- layout: "slot, sizes, prev, pager, next, jumper",
427
- onSizeChange: c.handleSizeChange,
428
- onCurrentChange: c.handleCurrentChange
429
- }, {
430
- default: C(() => [
431
- A(c.$slots, "zhPaginationLeftSlot", { pageable: c.pageable }, () => [
432
- B("div", ua, "共" + Q(c.pageable.total) + "条数据", 1)
433
- ], !0)
434
- ]),
435
- _: 3
436
- }, 8, ["current-page", "page-size", "total", "onSizeChange", "onCurrentChange"])) : I("", !0);
437
- }
438
- }), ca = /* @__PURE__ */ le(ia, [["__scopeId", "data-v-5965b30c"]]);
439
- function _e(m) {
440
- return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !ft(m);
441
- }
442
- const da = /* @__PURE__ */ ne({
443
- name: "TableColumn",
444
- __name: "TableColumn",
445
- props: {
446
- column: {},
447
- customColumn: {
448
- type: Boolean
449
- }
450
- },
451
- setup(m) {
452
- const c = m, a = M(c.column), f = xe(), g = Ke("enumMap", M(/* @__PURE__ */ new Map())), y = (n, h) => g.value.get(n.prop) && n.isFilterEnum ? Ve(ce(h.row, n.prop), g.value.get(n.prop), n.fieldNames) : Jt(ce(h.row, n.prop)), t = (n, h) => Ve(ce(h.row, n.prop), g.value.get(n.prop), n.fieldNames, "tag"), b = (n) => S(H, null, [n.isShow && S(oe, J(n, {
453
- "class-name": n.wrap && "table-column--wrap",
454
- showOverflowTooltip: n.showOverflowTooltip ?? n.prop !== "operation"
455
- }), {
456
- default: (h) => {
457
- var V, N, W;
458
- let U;
459
- if (n._children) return n._children.map((O) => b(O));
460
- if (n.render) return n.render(h);
461
- if (n.prop === "operation") {
462
- if (!f[K(n.prop)]) {
463
- a.value.width = 0;
464
- return;
465
- }
466
- const O = ((N = (V = f[K(n.prop)](h)) == null ? void 0 : V.at(0)) == null ? void 0 : N.children) || [], T = (P) => Array.from(P).map((_) => {
467
- var $, D;
468
- return (($ = _.type) == null ? void 0 : $.name) === "ElButton" && _.children !== "v-if" ? _ : (D = _.children) != null && D.length ? T(_.children) : null;
469
- }).filter(Boolean).flat(), e = T(O), i = (P) => {
470
- let _ = "";
471
- return P.forEach(($) => {
472
- _ += $.children.default()[0].children;
473
- }), ae(_, 14) + 16 * (P.length > 0 ? P.length - 1 : 0);
474
- }, s = (P) => {
475
- a.value.hasOperationMaxWidth || (a.value.width = 0, a.value.hasOperationMaxWidth = !0);
476
- const _ = a.value.width;
477
- let $ = 0;
478
- P > 0 && ($ = Math.round(P) + 32), $ > Number.parseInt((_ == null ? void 0 : _.toString()) || "0") && (a.value.width = $, a.value.hasOperationMaxWidth = !0);
479
- };
480
- if (e.length <= 3 || n.expandOperationButtons) {
481
- const P = Math.ceil(i(e));
482
- let _ = P;
483
- return c.customColumn && (_ = e.length ? e.length === 1 ? P + 30 : P : 50), s(_), S("div", {
484
- class: "operation-container all-action"
485
- }, [f[K(n.prop)](h)]);
486
- }
487
- const l = [], v = e.slice(0, 2), z = S(ke, {
488
- link: !0,
489
- type: "primary"
490
- }, {
491
- default: () => [Z("更多")]
492
- });
493
- l.push(...v), l[3] = S(Lt, null, {
494
- default: () => z,
495
- dropdown: () => {
496
- let P;
497
- return S(Dt, null, _e(P = e.slice(2).map((_) => S(Rt, null, _e(_) ? _ : {
498
- default: () => [_]
499
- }))) ? P : {
500
- default: () => [P]
501
- });
502
- }
503
- });
504
- const k = i([...v, z]);
505
- return s(k), S("div", {
506
- class: "operation-container"
507
- }, [l]);
508
- }
509
- return f[K(n.prop)] ? f[K(n.prop)](h) : n.tag ? S(He, {
510
- type: t(n, h)
511
- }, _e(U = y(n, h)) ? U : {
512
- default: () => [U]
513
- }) : n.click && y(n, h) !== ee ? S("span", {
514
- class: "el-link el-link--primary scan-link",
515
- onClick: function() {
516
- n.click(h == null ? void 0 : h.row, h == null ? void 0 : h.$index);
517
- }
518
- }, [n.formatter ? n.formatter(h.row, h.column, h.row[n.prop], h.$index) : y(n, h)]) : S("span", {
519
- class: ((W = Gt(ce(h.row, n.prop), g.value.get(n.prop))) == null ? void 0 : W.state) || "text"
520
- }, [n.formatter ? n.formatter(h.row, h.column, h.row[n.prop], h.$index) : y(n, h)]);
521
- },
522
- header: (h) => n.headerRender ? n.headerRender(h) : f[`${K(n.prop)}Header`] ? f[`${K(n.prop)}Header`](h) : n.label
523
- })]);
524
- return (n, h) => (w(), R(b, je(Ne(a.value)), null, 16));
525
- }
526
- }), pa = { class: "custom-column-dialog" }, ha = { class: "table-body" }, fa = { class: "name" }, ma = {
527
- key: 0,
528
- class: "ml-10"
529
- }, ga = { class: "custom-width-label text" }, va = {
530
- key: 0,
531
- class: "custom-width-input-box"
532
- }, ba = { class: "custom-column-footer" }, ya = { class: "flex-1" }, Ca = /* @__PURE__ */ ne({
533
- name: "ColSetting",
534
- __name: "ColSetting",
535
- props: {
536
- originTableColumns: { default: () => [] }
537
- },
538
- emits: ["close", "submit", "dragSort"],
539
- setup(m, { expose: c, emit: a }) {
540
- const f = M(), g = M(!1), y = m, t = M([]), b = M((/* @__PURE__ */ new Date()).getTime()), n = M(!1), h = M(), U = (i) => {
541
- t.value = i, n.value = !0, fe(() => {
542
- O();
543
- });
544
- }, V = (i) => {
545
- g.value = i;
546
- }, N = a, W = async () => {
547
- N("submit", t.value), n.value = !1;
548
- }, O = () => {
549
- h.value && (h.value.destroy(), b.value = (/* @__PURE__ */ new Date()).getTime(), f.value.doLayout()), fe(() => {
550
- const i = document.querySelector(".custom-column-dialog tbody");
551
- h.value = Ze.create(i, {
552
- handle: ".move",
553
- animation: 300,
554
- filter: ".operation",
555
- onEnd({ newIndex: s, oldIndex: l }) {
556
- if (!s && s !== 0 || !l && l !== 0) return;
557
- let v = q(t.value);
558
- const z = v[l];
559
- if (s < l)
560
- for (let k = s; k < l; k++)
561
- v[k].order = String(Number(v[k].order) + 1);
562
- else
563
- for (let k = l + 1; k <= s; k++)
564
- v[k].order = String(Number(v[k].order) - 1);
565
- z.order = String(s), t.value = q(v);
566
- }
567
- });
568
- });
569
- }, T = () => {
570
- const i = q(y.originTableColumns);
571
- g.value ? t.value = i : t.value = t.value.map((s) => {
572
- const l = t.value.find((v) => v.prop === s.prop);
573
- return !(l != null && l.isShow) || l.prop === "operation" ? s : i.find((v) => v.prop === s.prop);
574
- }), O();
575
- }, e = () => {
576
- n.value = !1;
577
- };
578
- return c({
579
- openColSetting: U
580
- }), (i, s) => (w(), L("div", pa, [
581
- S(Wt, {
582
- modelValue: n.value,
583
- "onUpdate:modelValue": s[1] || (s[1] = (l) => n.value = l),
584
- size: "middle"
585
- }, {
586
- header: C(() => s[2] || (s[2] = [
587
- B("div", { class: "title" }, "自定义列", -1),
588
- B("div", { class: "sub-title" }, "勾选需要展示的列,拖动列名进行排序", -1)
589
- ])),
590
- footer: C(() => [
591
- B("div", ba, [
592
- S(p(De), {
593
- modelValue: g.value,
594
- "onUpdate:modelValue": s[0] || (s[0] = (l) => g.value = l),
595
- class: "checkbox",
596
- label: "全局",
597
- onChange: V
598
- }, null, 8, ["modelValue"]),
599
- B("div", ya, [
600
- S(we, { onClick: e }, {
601
- default: C(() => s[4] || (s[4] = [
602
- Z("取消")
603
- ])),
604
- _: 1
605
- }),
606
- S(we, {
607
- class: "w-auto",
608
- onClick: T
609
- }, {
610
- default: C(() => [
611
- Z(Q(g.value ? "全局恢复默认" : "恢复默认"), 1)
612
- ]),
613
- _: 1
614
- }),
615
- S(we, {
616
- type: "primary",
617
- onClick: W
618
- }, {
619
- default: C(() => s[5] || (s[5] = [
620
- Z("保存")
621
- ])),
622
- _: 1
623
- })
624
- ])
625
- ])
626
- ]),
627
- default: C(() => [
628
- B("div", ha, [
629
- (w(), R(p(Ge), {
630
- ref_key: "tableRef",
631
- ref: f,
632
- class: "custom-colum-table",
633
- key: b.value,
634
- data: t.value.filter((l) => !l.hideInCustomColumn),
635
- "row-class-name": (l) => l.row.prop === "operation" ? "operation" : ""
636
- }, {
637
- default: C(() => [
638
- S(p(oe), {
639
- width: "100",
640
- label: "选择"
641
- }, {
642
- default: C(({ row: l }) => [
643
- S(p(De), {
644
- class: "custom-column-check",
645
- modelValue: l.isShow,
646
- "onUpdate:modelValue": (v) => l.isShow = v,
647
- disabled: l.readonly
648
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
649
- ]),
650
- _: 1
651
- }),
652
- S(p(oe), {
653
- prop: "label",
654
- label: "名称"
655
- }, {
656
- default: C(({ row: l }) => [
657
- B("div", fa, [
658
- Z(Q(l.label) + " ", 1),
659
- l.readonly ? (w(), L("span", ma, "(必选)")) : I("", !0),
660
- l.prop !== "operation" ? (w(), R(p(ge), {
661
- key: 1,
662
- class: "move move-icon"
663
- }, {
664
- default: C(() => [
665
- S(p(Ft))
666
- ]),
667
- _: 1
668
- })) : I("", !0)
669
- ])
670
- ]),
671
- _: 1
672
- }),
673
- S(p(oe), {
674
- prop: "width",
675
- label: "宽度",
676
- width: "180"
677
- }, {
678
- default: C(({ row: l }) => [
679
- B("div", {
680
- class: Ue(`custom-width-box ${l.readonly && "readonly"}`)
681
- }, [
682
- s[3] || (s[3] = B("span", { class: "text" }, "宽度", -1)),
683
- B("span", ga, Q(l.width) + " px", 1),
684
- l.readonly ? I("", !0) : (w(), L("div", va, [
685
- S(p(Je), {
686
- modelValue: l.width,
687
- "onUpdate:modelValue": (v) => l.width = v,
688
- class: "custom-width-input",
689
- min: 10,
690
- max: 1e3,
691
- controls: !1
692
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
693
- ]))
694
- ], 2)
695
- ]),
696
- _: 1
697
- })
698
- ]),
699
- _: 1
700
- }, 8, ["data", "row-class-name"]))
701
- ])
702
- ]),
703
- _: 1
704
- }, 8, ["modelValue"])
705
- ]));
706
- }
707
- }), Sa = /* @__PURE__ */ le(Ca, [["__scopeId", "data-v-597569aa"]]), wa = { class: "no-card table-main zh-table" }, _a = { class: "table-title-container" }, ka = {
708
- key: 0,
709
- class: "table-title"
710
- }, Pa = {
711
- key: 1,
712
- class: "table-header-tip"
713
- }, Ta = { class: "table-header-container" }, $a = {
714
- key: 0,
715
- class: "table-header"
716
- }, Ea = { class: "header-button-ri" }, Ba = { key: 0 }, za = { class: "table-body-container" }, Ia = { class: "text d-flex inline-input-text pointer" }, Ma = {
717
- key: 1,
718
- class: "inline-input-box d-flex"
719
- }, La = { class: "table-empty" }, Da = ["src"], Ra = /* @__PURE__ */ ne({
720
- name: "ZhTable",
721
- __name: "Table",
722
- props: {
723
- columns: { default: () => [] },
724
- data: {},
725
- requestApi: {},
726
- requestAuto: { type: Boolean, default: !0 },
727
- requestError: { type: Function, default: (m) => {
728
- console.error("protable中请求数据错误", m);
729
- } },
730
- handleParam: {},
731
- dataCallback: {},
732
- selectChangeCallback: {},
733
- title: {},
734
- pagination: { type: Boolean, default: !0 },
735
- initParam: { default: {} },
736
- border: { type: Boolean, default: !1 },
737
- rowKey: { default: "id" },
738
- isShowSearch: { type: Boolean, default: !0 },
739
- maxHeight: {},
740
- isShowSearchBtn: { type: Boolean, default: !0 },
741
- isShowResetBtn: { type: Boolean, default: !0 },
742
- customColumn: { type: Boolean, default: !1 },
743
- onSortChange: {},
744
- offset: {},
745
- customColumnCacheKey: {},
746
- customColumnPageCacheKey: {},
747
- beforeReset: {}
748
- },
749
- emits: ["search", "reset", "dargSort"],
750
- setup(m, { expose: c, emit: a }) {
751
- var Le;
752
- const f = M((/* @__PURE__ */ new Date()).getTime()), g = {
753
- mounted(o) {
754
- var u;
755
- (u = o.querySelector("input")) == null || u.focus();
756
- }
757
- }, y = xe(), t = m, b = M(), n = ["selection", "radio", "index", "expand", "sort", "input"], h = M(t.isShowSearch), U = M(""), V = M({}), N = M(t.maxHeight), { selectionChange: W, selectedList: O, selectedListIds: T, isSelected: e } = Xt(t.rowKey, t.selectChangeCallback), {
758
- loading: i,
759
- tableData: s,
760
- pageable: l,
761
- searchParam: v,
762
- searchInitParam: z,
763
- getTableList: k,
764
- search: P,
765
- reset: _,
766
- handleSizeChange: $,
767
- handleCurrentChange: D
768
- } = Yt(t.requestApi, t.initParam, t.pagination, t.dataCallback, t.requestError, t.handleParam), x = (o) => {
769
- function u(it) {
770
- return it.replace(/[A-Z]/g, (ct) => "_" + ct.toLowerCase());
771
- }
772
- const d = {
773
- ascending: "asc",
774
- descending: "desc"
775
- }, { prop: r, order: E } = o, j = u(K(r)), ie = d[E];
776
- v.value = {
777
- ...v.value,
778
- sortKey: j,
779
- sortOrder: ie
780
- }, l.value.page = 1, P();
781
- }, G = () => b.value.clearSelection(), ve = () => b.value.clearSort(), Te = M(!1), $e = () => {
782
- at(), t.customColumn && st(), t.requestAuto && k(), t.data && (l.value.total = t.data.length);
783
- };
784
- mt(() => {
785
- $e(), fe(() => {
786
- Te.value = !0;
787
- });
788
- }), gt(() => {
789
- Te.value && $e();
790
- }), vt(() => {
791
- }), bt(() => {
792
- });
793
- const re = F(() => t.data ? t.pagination ? t.data.slice((l.value.page - 1) * l.value.size, l.value.size * l.value.page) : t.data : s.value), Qe = (o) => {
794
- l.value.total = o;
795
- };
796
- yt(() => t.initParam, k, { deep: !0 });
797
- let te = X(t.columns);
798
- const Ye = F(() => Ee(te)), Y = M(/* @__PURE__ */ new Map()), Xe = async ({ prop: o, enum: u }) => {
799
- if (!u || Y.value.has(o) && (typeof u == "function" || Y.value.get(o) === u)) return;
800
- if (typeof u != "function") return Y.value.set(o, p(u));
801
- Y.value.set(o, []);
802
- const { data: d } = await u();
803
- Y.value.set(o, d);
804
- };
805
- Ct("enumMap", Y);
806
- const Ee = (o, u = []) => (o.forEach(async (d) => {
807
- var r;
808
- (r = d._children) != null && r.length && u.push(...Ee(d._children)), u.push(d), d.isShow = d.isShow ?? !0, d.isFilterEnum = d.isFilterEnum ?? !0, await Xe(d);
809
- }), u.filter((d) => {
810
- var r;
811
- return !((r = d._children) != null && r.length);
812
- })), Be = F(() => {
813
- var o;
814
- return (o = Ye.value) == null ? void 0 : o.filter((u) => {
815
- var d, r;
816
- return ((d = u.search) == null ? void 0 : d.el) || ((r = u.search) == null ? void 0 : r.render);
817
- }).sort((u, d) => u.search.order - d.search.order);
818
- });
819
- (Le = Be.value) == null || Le.forEach((o, u) => {
820
- var E, j, ie;
821
- o.search.order = ((E = o.search) == null ? void 0 : E.order) ?? u + 2;
822
- const d = ((j = o.search) == null ? void 0 : j.key) ?? K(o.prop), r = (ie = o.search) == null ? void 0 : ie.defaultValue;
823
- r != null && (z.value[d] = r, v.value[d] = r);
824
- });
825
- const be = a, et = () => {
826
- var o;
827
- (o = b.value) == null || o.clearSelection(), P(), be("search");
828
- }, tt = () => {
829
- t.beforeReset && t.beforeReset(), _(), ve(), be("reset");
830
- }, at = () => {
831
- const o = document.querySelector(".el-table__body-wrapper tbody");
832
- o && Ze.create(o, {
833
- handle: ".move",
834
- animation: 300,
835
- onEnd({ newIndex: u, oldIndex: d }) {
836
- const [r] = re.value.splice(d, 1);
837
- re.value.splice(u, 0, r), be("dargSort", { newIndex: u, oldIndex: d });
838
- }
839
- });
840
- }, se = M(0), nt = (o, u) => {
841
- const d = s.value.findIndex((r) => r.$showInput);
842
- d > -1 && (s.value[d] = q(V.value), s.value[d].$showInput = !1), se.value = Oe(o, String(u)), o.$showInput = !0, V.value = q(o);
843
- }, ot = async (o, u, d) => {
844
- Ut(o, u, se.value), d && await d(o), o.$showInput = !1, xt.success("更新成功"), await k();
845
- }, lt = async (o) => {
846
- const u = s.value.findIndex((d) => jt(Re(d, Fe), Re(o, Fe)));
847
- u > -1 && (s.value[u] = q(V.value), s.value[u].$showInput = !1);
848
- }, ze = Qt(t.customColumnCacheKey), Ie = M(null), ye = () => te.map(
849
- (o, u) => ({
850
- readonly: o.isCustomDisable || ["id", "operation"].includes(String(o.prop)),
851
- order: u,
852
- index: u,
853
- width: o.width || o.minWidth,
854
- ...o
855
- })
856
- ).sort((o, u) => {
857
- const d = Number(o.order), r = Number(u.order);
858
- return d - r;
859
- }), rt = () => {
860
- ue = X(ye()), fe(() => {
861
- Ie.value.openColSetting(q(ue));
862
- });
863
- }, st = () => {
864
- if (!t.customColumnPageCacheKey) return;
865
- const o = ze.getColumnCache(t.customColumnPageCacheKey);
866
- if (o != null && o.length) {
867
- const u = te.map((d) => {
868
- const r = o.find((E) => E.prop === d.prop);
869
- if (r) {
870
- const E = {
871
- ...d,
872
- order: r.order || d.order,
873
- isShow: r.isShow !== void 0 ? r.isShow : d.isShow,
874
- readonly: r.readonly !== void 0 ? r.readonly : d.readonly,
875
- prop: r.prop || d.prop,
876
- index: r.index || d.index
877
- };
878
- return d.minWidth && (E.minWidth = r.minWidth || d.minWidth), d.width && (E.width = r.width || d.width), E;
879
- }
880
- return d;
881
- });
882
- ue = X(u), te = X(ue);
883
- }
884
- };
885
- let ue = X(ye());
886
- const Me = q(ye()), ut = (o) => {
887
- if (!t.customColumnPageCacheKey) return console.error("请添加自定义列缓存配置项:customColumnPageCacheKey");
888
- o = o.map((u) => {
889
- const d = Me.find((r) => r.prop === u.prop);
890
- return d && d.minWidth && (u.minWidth = u.width, delete u.width), u;
891
- }), te = X(q(o)), ze.setColumnCache(t.customColumnPageCacheKey, o), f.value = (/* @__PURE__ */ new Date()).getTime(), b.value.doLayout();
892
- };
893
- return c({
894
- element: b,
895
- tableData: re,
896
- radio: U,
897
- pageable: l,
898
- searchParam: v,
899
- searchInitParam: z,
900
- setPageTotal: Qe,
901
- getTableList: k,
902
- search: P,
903
- reset: _,
904
- handleSizeChange: $,
905
- handleCurrentChange: D,
906
- clearSelection: G,
907
- enumMap: Y,
908
- isSelected: e,
909
- selectedList: O,
910
- selectedListIds: T
911
- }), (o, u) => {
912
- const d = St("loading");
913
- return w(), R(p(Ot), { locale: p(Vt) }, {
914
- default: C(() => [
915
- B("div", wa, [
916
- B("div", _a, [
917
- o.title ? (w(), L("div", ka, Q(o.title), 1)) : I("", !0),
918
- p(y).headerTip ? (w(), L("div", Pa, [
919
- A(o.$slots, "headerTip", {}, void 0, !0)
920
- ])) : I("", !0)
921
- ]),
922
- B("div", Ta, [
923
- Ce(S(sa, {
924
- search: et,
925
- reset: tt,
926
- columns: Be.value,
927
- "search-param": p(v),
928
- "is-show-reset-btn": t.isShowResetBtn,
929
- "is-show-search-btn": t.isShowSearchBtn
930
- }, {
931
- default: C(() => [
932
- o.$slots.tableHeader ? (w(), L("div", $a, [
933
- B("div", Ea, [
934
- A(o.$slots, "tableHeader", {
935
- selectedList: p(O),
936
- selectedListIds: p(T),
937
- isSelected: p(e)
938
- }, void 0, !0)
939
- ])
940
- ])) : I("", !0)
941
- ]),
942
- _: 3
943
- }, 8, ["columns", "search-param", "is-show-reset-btn", "is-show-search-btn"]), [
944
- [wt, h.value]
945
- ])
946
- ]),
947
- p(y).searchBarBottom ? (w(), L("div", Ba, [
948
- A(o.$slots, "searchBarBottom", {}, void 0, !0)
949
- ])) : I("", !0),
950
- B("div", za, [
951
- t.customColumn ? (w(), L("div", {
952
- key: 0,
953
- class: "col-setting-button",
954
- onClick: rt
955
- }, [
956
- S(p(me), {
957
- class: "box-item",
958
- effect: "dark",
959
- content: "自定义列",
960
- placement: "top"
961
- }, {
962
- default: C(() => [
963
- S(p(ge), {
964
- size: 16,
965
- color: "#000000a6"
966
- }, {
967
- default: C(() => [
968
- S(p(At))
969
- ]),
970
- _: 1
971
- })
972
- ]),
973
- _: 1
974
- })
975
- ])) : I("", !0),
976
- Ce((w(), R(p(Ge), J({
977
- ref_key: "tableRef",
978
- ref: b
979
- }, o.$attrs, {
980
- key: f.value,
981
- data: re.value,
982
- border: o.border,
983
- "row-key": o.rowKey,
984
- "max-height": N.value,
985
- "row-style": { height: "42px" },
986
- "tooltip-effect": "light",
987
- "tooltip-options": { showArrow: !1, placement: "bottom-start", offset: t.offset ? t.offset : -20 }
988
- }, _t(o.$attrs), {
989
- onSelectionChange: p(W),
990
- onSortChange: u[1] || (u[1] = (r) => t.onSortChange ? t.onSortChange(r) : x(r))
991
- }), {
992
- append: C(() => [
993
- A(o.$slots, "append", {}, void 0, !0)
994
- ]),
995
- empty: C(() => [
996
- B("div", La, [
997
- A(o.$slots, "empty", {}, () => [
998
- B("img", {
999
- src: `${p(Nt)}ghy-components/empty.png`,
1000
- class: "zh-empty-img",
1001
- alt: "notData"
1002
- }, null, 8, Da),
1003
- u[5] || (u[5] = B("div", null, "暂无数据", -1))
1004
- ], !0)
1005
- ])
1006
- ]),
1007
- default: C(() => [
1008
- (w(!0), L(H, null, he(p(te).sort((r, E) => r.order - E.order), (r) => (w(), L(H, { key: r }, [
1009
- r.type && n.includes(r.type) && r.isShow ? (w(), R(p(oe), J({
1010
- key: 0,
1011
- ref_for: !0
1012
- }, r, {
1013
- align: r.align ?? "left",
1014
- "reserve-selection": r.type == "selection"
1015
- }), pe({
1016
- default: C((E) => [
1017
- r.type == "expand" ? (w(), L(H, { key: 0 }, [
1018
- r.render ? (w(), R(de(r.render), J({
1019
- key: 0,
1020
- ref_for: !0
1021
- }, E), null, 16)) : A(o.$slots, r.type, J({
1022
- key: 1,
1023
- ref_for: !0
1024
- }, E), void 0, !0)
1025
- ], 64)) : I("", !0),
1026
- r.type == "sort" ? (w(), R(p(He), {
1027
- key: 1,
1028
- class: "move"
1029
- }, {
1030
- default: C(() => [
1031
- S(p(ge), null, {
1032
- default: C(() => [
1033
- S(p(Kt))
1034
- ]),
1035
- _: 1
1036
- })
1037
- ]),
1038
- _: 1
1039
- })) : I("", !0),
1040
- r.type == "input" ? (w(), L(H, { key: 2 }, [
1041
- E.row.$showInput ? (w(), L("div", Ma, [
1042
- Ce(S(p(Je), {
1043
- modelValue: se.value,
1044
- "onUpdate:modelValue": u[0] || (u[0] = (j) => se.value = j),
1045
- min: 0,
1046
- controls: !1
1047
- }, null, 8, ["modelValue"]), [
1048
- [g]
1049
- ]),
1050
- S(p(Se), {
1051
- underline: !1,
1052
- type: "primary",
1053
- onClick: (j) => ot(E.row, String(r.prop), r.blurCallback),
1054
- class: "ml-5"
1055
- }, {
1056
- default: C(() => u[3] || (u[3] = [
1057
- Z(" 保存 ")
1058
- ])),
1059
- _: 2
1060
- }, 1032, ["onClick"]),
1061
- S(p(Se), {
1062
- type: "primary",
1063
- underline: !1,
1064
- onClick: (j) => lt(E.row),
1065
- class: "ml-5"
1066
- }, {
1067
- default: C(() => u[4] || (u[4] = [
1068
- Z(" 取消 ")
1069
- ])),
1070
- _: 2
1071
- }, 1032, ["onClick"])
1072
- ])) : (w(), R(p(me), {
1073
- key: 0,
1074
- content: "编辑",
1075
- placement: "top"
1076
- }, {
1077
- default: C(() => [
1078
- B("span", Ia, [
1079
- Z(Q(p(Oe)(E.row, String(r.prop))) + " ", 1),
1080
- S(p(Se), {
1081
- underline: !1,
1082
- class: "text d-flex inline-input-text pointer",
1083
- onClick: (j) => nt(E.row, r.prop)
1084
- }, {
1085
- default: C(() => u[2] || (u[2] = [
1086
- B("i", { class: "iconfont icon-edit" }, null, -1)
1087
- ])),
1088
- _: 2
1089
- }, 1032, ["onClick"])
1090
- ])
1091
- ]),
1092
- _: 2
1093
- }, 1024))
1094
- ], 64)) : I("", !0)
1095
- ]),
1096
- _: 2
1097
- }, [
1098
- r.headerRender ? {
1099
- name: "header",
1100
- fn: C((E) => [
1101
- (w(), R(de(r.headerRender), J({ ref_for: !0 }, E), null, 16))
1102
- ]),
1103
- key: "0"
1104
- } : void 0
1105
- ]), 1040, ["align", "reserve-selection"])) : I("", !0),
1106
- !r.type && r.prop && r.isShow ? (w(), R(da, {
1107
- key: 1,
1108
- column: r,
1109
- "custom-column": o.customColumn
1110
- }, pe({ _: 2 }, [
1111
- he(Object.keys(o.$slots), (E) => ({
1112
- name: E,
1113
- fn: C((j) => [
1114
- A(o.$slots, E, J({ ref_for: !0 }, j), void 0, !0)
1115
- ])
1116
- }))
1117
- ]), 1032, ["column", "custom-column"])) : I("", !0)
1118
- ], 64))), 128))
1119
- ]),
1120
- _: 3
1121
- }, 16, ["data", "border", "row-key", "max-height", "tooltip-options", "onSelectionChange"])), [
1122
- [d, p(i)]
1123
- ])
1124
- ]),
1125
- A(o.$slots, "pagination", {}, () => [
1126
- o.pagination ? (w(), R(ca, {
1127
- key: 0,
1128
- pageable: p(l),
1129
- "handle-size-change": p($),
1130
- "handle-current-change": p(D)
1131
- }, {
1132
- zhPaginationLeftSlot: C((r) => [
1133
- A(o.$slots, "zhPaginationLeft", je(Ne(r)), void 0, !0)
1134
- ]),
1135
- _: 3
1136
- }, 8, ["pageable", "handle-size-change", "handle-current-change"])) : I("", !0)
1137
- ], !0)
1138
- ]),
1139
- t.customColumn ? (w(), R(Sa, {
1140
- key: 0,
1141
- ref_key: "colRef",
1142
- ref: Ie,
1143
- "origin-table-columns": p(Me),
1144
- onSubmit: ut
1145
- }, null, 8, ["origin-table-columns"])) : I("", !0)
1146
- ]),
1147
- _: 3
1148
- }, 8, ["locale"]);
1149
- };
1150
- }
1151
- }), Fa = /* @__PURE__ */ le(Ra, [["__scopeId", "data-v-77b1ce18"]]), ja = qt(Fa);
1152
- export {
1153
- ja as Z,
1154
- ae as g
1155
- };