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