@ys-knife-crud/element-plus 0.0.13 → 0.0.14
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/README.md +4 -4
- package/dist/element-plus/src/commandBar/commandBar.vue.d.ts +4 -15
- package/dist/element-plus/src/commandBar/commandBar.vue.d.ts.map +1 -1
- package/dist/element-plus/src/table/table.vue.d.ts.map +1 -1
- package/dist/element-plus/src/tablepage/tablePage.vue.d.ts +11 -18
- package/dist/element-plus/src/tablepage/tablePage.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1377 -1355
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as ee, toRef as me, computed as
|
|
1
|
+
import { defineComponent as ee, toRef as me, computed as N, resolveComponent as S, openBlock as n, createElementBlock as y, Fragment as H, createVNode as m, isRef as Se, unref as c, withCtx as o, createElementVNode as p, renderList as le, createBlock as w, createTextVNode as F, toDisplayString as Y, createCommentVNode as z, resolveDynamicComponent as Be, normalizeClass as Ce, renderSlot as Z, Teleport as At, withModifiers as ct, normalizeStyle as nt, ref as T, onMounted as $e, watch as de, useSlots as zt, onBeforeUnmount as Ne, createSlots as De, Transition as Dt, resolveDirective as pt, withDirectives as Ze, mergeProps as et, inject as mt, provide as ft, withKeys as We, nextTick as Ge, shallowRef as Bt, normalizeProps as Te, guardReactiveProps as Ye, createStaticVNode as ot, h as ve, isVNode as Et, render as at } from "vue";
|
|
2
2
|
import { useExportExcel as It, useCustomConfig as Tt, visibleActions as tt, isEnabled as vt, useDefault as Yt, useSelection as yt, useRowActions as Qt, filterNodesByKeyword as Nt, collectGroupKeys as Ot, useMainPanelNodes as qt, useMainPanelTabs as Lt, findNode as st, isGroupNode as it, useAdvancedFilter as gt, useFilterPanel as Ut, FilterPanelKey as _t, useTextFilterItem as Kt, useDateFilterItem as jt, useDateRangeFilterItem as Ht, useEnumFilterItem as Gt, useImportExcel as Wt, getDefaultModalAppContext as Jt, setDefaultModalAppContext as Xt } from "@ys-knife-crud/vue";
|
|
3
3
|
import { ElMessage as fe, ElMessageBox as kt, ElDialog as Zt, ElButton as el } from "element-plus";
|
|
4
|
-
import { isConditionGroup as lt, OPERATOR_LABELS as tl, isNullOperator as ll, emptyFilter as
|
|
5
|
-
import { fromArray as
|
|
4
|
+
import { isConditionGroup as lt, OPERATOR_LABELS as tl, isNullOperator as ll, emptyFilter as Qe, FilterInfo as nl } from "@ys-knife-crud/core";
|
|
5
|
+
import { fromArray as Mo, fromBool as Ro, fromObjectItems as Po, fromOptions as Ao } from "@ys-knife-crud/core";
|
|
6
6
|
import rt from "dayjs";
|
|
7
7
|
import './index.css';const ol = { class: "export-options" }, al = { class: "export-progress-text" }, sl = { class: "export-cancelled-text" }, il = /* @__PURE__ */ ee({
|
|
8
8
|
__name: "exportExcelDialog",
|
|
@@ -19,21 +19,21 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
19
19
|
hasMorePage: { type: Boolean },
|
|
20
20
|
pageScopeLabel: {}
|
|
21
21
|
},
|
|
22
|
-
setup(e, { expose:
|
|
22
|
+
setup(e, { expose: v }) {
|
|
23
23
|
const l = e, {
|
|
24
24
|
exportOptions: t,
|
|
25
25
|
exportDialogVisible: a,
|
|
26
|
-
exporting:
|
|
26
|
+
exporting: f,
|
|
27
27
|
exportFetched: s,
|
|
28
|
-
exportTotal:
|
|
28
|
+
exportTotal: r,
|
|
29
29
|
exportTotalKnown: i,
|
|
30
|
-
exportEtaSeconds:
|
|
30
|
+
exportEtaSeconds: x,
|
|
31
31
|
exportPercent: V,
|
|
32
|
-
exportCancelledVisible:
|
|
32
|
+
exportCancelledVisible: D,
|
|
33
33
|
exportCancelledRows: j,
|
|
34
|
-
onExportClick:
|
|
34
|
+
onExportClick: B,
|
|
35
35
|
doExport: h,
|
|
36
|
-
cancelExport:
|
|
36
|
+
cancelExport: b,
|
|
37
37
|
keepPartialExport: L,
|
|
38
38
|
discardPartialExport: q
|
|
39
39
|
} = It({
|
|
@@ -47,33 +47,33 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
47
47
|
exportPageSize: me(l, "exportPageSize"),
|
|
48
48
|
hasMorePage: me(l, "hasMorePage"),
|
|
49
49
|
pageScopeLabel: me(l, "pageScopeLabel")
|
|
50
|
-
}), X =
|
|
51
|
-
const U =
|
|
50
|
+
}), X = N(() => {
|
|
51
|
+
const U = x.value;
|
|
52
52
|
if (U == null) return null;
|
|
53
53
|
if (U < 60) return `${U} 秒`;
|
|
54
|
-
const
|
|
55
|
-
return
|
|
54
|
+
const u = Math.floor(U / 60), g = U % 60;
|
|
55
|
+
return g > 0 ? `${u} 分 ${g} 秒` : `${u} 分`;
|
|
56
56
|
});
|
|
57
|
-
return
|
|
58
|
-
const
|
|
59
|
-
return n(),
|
|
60
|
-
|
|
61
|
-
modelValue:
|
|
62
|
-
"onUpdate:modelValue":
|
|
57
|
+
return v({ openExportDialog: B }), (U, u) => {
|
|
58
|
+
const g = S("el-button"), M = S("el-dialog"), Q = S("el-progress");
|
|
59
|
+
return n(), y(H, null, [
|
|
60
|
+
m(M, {
|
|
61
|
+
modelValue: c(a),
|
|
62
|
+
"onUpdate:modelValue": u[0] || (u[0] = (O) => Se(a) ? a.value = O : null),
|
|
63
63
|
title: "导出 Excel",
|
|
64
64
|
width: "420px"
|
|
65
65
|
}, {
|
|
66
66
|
default: o(() => [
|
|
67
|
-
|
|
68
|
-
(n(!0),
|
|
69
|
-
key:
|
|
67
|
+
p("div", ol, [
|
|
68
|
+
(n(!0), y(H, null, le(c(t), (O) => (n(), w(g, {
|
|
69
|
+
key: O.value,
|
|
70
70
|
class: "export-option",
|
|
71
|
-
"data-scope":
|
|
72
|
-
disabled:
|
|
73
|
-
onClick: (re) =>
|
|
71
|
+
"data-scope": O.value,
|
|
72
|
+
disabled: O.disabled,
|
|
73
|
+
onClick: (re) => c(h)(O.value)
|
|
74
74
|
}, {
|
|
75
75
|
default: o(() => [
|
|
76
|
-
F(
|
|
76
|
+
F(Y(O.label), 1)
|
|
77
77
|
]),
|
|
78
78
|
_: 2
|
|
79
79
|
}, 1032, ["data-scope", "disabled", "onClick"]))), 128))
|
|
@@ -81,78 +81,78 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
81
81
|
]),
|
|
82
82
|
_: 1
|
|
83
83
|
}, 8, ["modelValue"]),
|
|
84
|
-
|
|
85
|
-
modelValue:
|
|
86
|
-
"onUpdate:modelValue":
|
|
84
|
+
m(M, {
|
|
85
|
+
modelValue: c(f),
|
|
86
|
+
"onUpdate:modelValue": u[1] || (u[1] = (O) => Se(f) ? f.value = O : null),
|
|
87
87
|
title: "正在导出",
|
|
88
88
|
width: "420px",
|
|
89
89
|
"close-on-click-modal": !1,
|
|
90
90
|
"show-close": !1
|
|
91
91
|
}, {
|
|
92
92
|
footer: o(() => [
|
|
93
|
-
|
|
93
|
+
m(g, {
|
|
94
94
|
class: "export-cancel",
|
|
95
|
-
onClick:
|
|
95
|
+
onClick: c(b)
|
|
96
96
|
}, {
|
|
97
|
-
default: o(() => [...
|
|
97
|
+
default: o(() => [...u[4] || (u[4] = [
|
|
98
98
|
F("取消", -1)
|
|
99
99
|
])]),
|
|
100
100
|
_: 1
|
|
101
101
|
}, 8, ["onClick"])
|
|
102
102
|
]),
|
|
103
103
|
default: o(() => [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
F(" 已加载 " +
|
|
107
|
-
|
|
108
|
-
F(" / " +
|
|
109
|
-
], 64)) :
|
|
110
|
-
|
|
111
|
-
X.value ? (n(),
|
|
112
|
-
F(",预计剩余约 " +
|
|
113
|
-
], 64)) :
|
|
104
|
+
m(Q, { percentage: c(V) }, null, 8, ["percentage"]),
|
|
105
|
+
p("p", al, [
|
|
106
|
+
F(" 已加载 " + Y(c(s)), 1),
|
|
107
|
+
c(i) ? (n(), y(H, { key: 0 }, [
|
|
108
|
+
F(" / " + Y(c(r)), 1)
|
|
109
|
+
], 64)) : z("", !0),
|
|
110
|
+
u[3] || (u[3] = F(" 条", -1)),
|
|
111
|
+
X.value ? (n(), y(H, { key: 1 }, [
|
|
112
|
+
F(",预计剩余约 " + Y(X.value), 1)
|
|
113
|
+
], 64)) : z("", !0)
|
|
114
114
|
])
|
|
115
115
|
]),
|
|
116
116
|
_: 1
|
|
117
117
|
}, 8, ["modelValue"]),
|
|
118
|
-
|
|
119
|
-
modelValue:
|
|
120
|
-
"onUpdate:modelValue":
|
|
118
|
+
m(M, {
|
|
119
|
+
modelValue: c(D),
|
|
120
|
+
"onUpdate:modelValue": u[2] || (u[2] = (O) => Se(D) ? D.value = O : null),
|
|
121
121
|
title: "导出已取消",
|
|
122
122
|
width: "420px"
|
|
123
123
|
}, {
|
|
124
124
|
footer: o(() => [
|
|
125
|
-
|
|
125
|
+
m(g, {
|
|
126
126
|
class: "export-discard",
|
|
127
|
-
onClick:
|
|
127
|
+
onClick: c(q)
|
|
128
128
|
}, {
|
|
129
|
-
default: o(() => [...
|
|
129
|
+
default: o(() => [...u[5] || (u[5] = [
|
|
130
130
|
F("丢弃", -1)
|
|
131
131
|
])]),
|
|
132
132
|
_: 1
|
|
133
133
|
}, 8, ["onClick"]),
|
|
134
|
-
|
|
134
|
+
m(g, {
|
|
135
135
|
class: "export-keep",
|
|
136
136
|
type: "primary",
|
|
137
|
-
onClick:
|
|
137
|
+
onClick: c(L)
|
|
138
138
|
}, {
|
|
139
|
-
default: o(() => [...
|
|
139
|
+
default: o(() => [...u[6] || (u[6] = [
|
|
140
140
|
F("保留部分文件", -1)
|
|
141
141
|
])]),
|
|
142
142
|
_: 1
|
|
143
143
|
}, 8, ["onClick"])
|
|
144
144
|
]),
|
|
145
145
|
default: o(() => [
|
|
146
|
-
|
|
146
|
+
p("p", sl, " 已写入 " + Y(c(j)) + " 条数据,是否保留已导出的部分文件? ", 1)
|
|
147
147
|
]),
|
|
148
148
|
_: 1
|
|
149
149
|
}, 8, ["modelValue"])
|
|
150
150
|
], 64);
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
}), ie = (e,
|
|
153
|
+
}), ie = (e, v) => {
|
|
154
154
|
const l = e.__vccOpts || e;
|
|
155
|
-
for (const [t, a] of
|
|
155
|
+
for (const [t, a] of v)
|
|
156
156
|
l[t] = a;
|
|
157
157
|
return l;
|
|
158
158
|
}, bt = /* @__PURE__ */ ie(il, [["__scopeId", "data-v-23d35985"]]), rl = /* @__PURE__ */ ee({
|
|
@@ -165,7 +165,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
165
165
|
/** 列元数据(候选列取 meta 中 showForDisplay=true 的列) */
|
|
166
166
|
meta: { type: Object, default: null }
|
|
167
167
|
},
|
|
168
|
-
setup(e, { expose:
|
|
168
|
+
setup(e, { expose: v }) {
|
|
169
169
|
const l = e, t = {
|
|
170
170
|
get loadCustomConfigFun() {
|
|
171
171
|
return l.loadCustomConfigFun;
|
|
@@ -176,56 +176,56 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
176
176
|
}, {
|
|
177
177
|
// 字段(状态 + 派生)
|
|
178
178
|
columns: a,
|
|
179
|
-
customConfigLoading:
|
|
179
|
+
customConfigLoading: f,
|
|
180
180
|
defaultPageSize: s,
|
|
181
|
-
configDialogVisible:
|
|
181
|
+
configDialogVisible: r,
|
|
182
182
|
draftColumns: i,
|
|
183
183
|
// 函数
|
|
184
|
-
loadCustomConfigs:
|
|
184
|
+
loadCustomConfigs: x,
|
|
185
185
|
updateDefaultPageSize: V,
|
|
186
|
-
updateColumnWidth:
|
|
186
|
+
updateColumnWidth: D,
|
|
187
187
|
openConfigDialog: j,
|
|
188
|
-
moveDraft:
|
|
188
|
+
moveDraft: B,
|
|
189
189
|
resetDraft: h,
|
|
190
|
-
saveConfigDialog:
|
|
190
|
+
saveConfigDialog: b
|
|
191
191
|
} = Tt(t, me(l, "meta"));
|
|
192
|
-
return
|
|
192
|
+
return v({
|
|
193
193
|
// 字段
|
|
194
194
|
columns: a,
|
|
195
195
|
defaultPageSize: s,
|
|
196
|
-
customConfigLoading:
|
|
196
|
+
customConfigLoading: f,
|
|
197
197
|
// 函数
|
|
198
198
|
updateDefaultPageSize: V,
|
|
199
|
-
updateColumnWidth:
|
|
200
|
-
loadCustomConfigs:
|
|
199
|
+
updateColumnWidth: D,
|
|
200
|
+
loadCustomConfigs: x,
|
|
201
201
|
openDialog: j
|
|
202
202
|
}), (L, q) => {
|
|
203
|
-
const X = S("el-checkbox"), U = S("el-input"),
|
|
204
|
-
return n(),
|
|
205
|
-
modelValue:
|
|
206
|
-
"onUpdate:modelValue": q[1] || (q[1] = (M) => Se(
|
|
203
|
+
const X = S("el-checkbox"), U = S("el-input"), u = S("el-button"), g = S("el-dialog");
|
|
204
|
+
return n(), w(g, {
|
|
205
|
+
modelValue: c(r),
|
|
206
|
+
"onUpdate:modelValue": q[1] || (q[1] = (M) => Se(r) ? r.value = M : null),
|
|
207
207
|
title: "列设置",
|
|
208
208
|
width: "480px"
|
|
209
209
|
}, {
|
|
210
210
|
footer: o(() => [
|
|
211
|
-
|
|
211
|
+
m(u, { onClick: c(h) }, {
|
|
212
212
|
default: o(() => [...q[4] || (q[4] = [
|
|
213
213
|
F("重置", -1)
|
|
214
214
|
])]),
|
|
215
215
|
_: 1
|
|
216
216
|
}, 8, ["onClick"]),
|
|
217
|
-
|
|
218
|
-
onClick: q[0] || (q[0] = (M) =>
|
|
217
|
+
m(u, {
|
|
218
|
+
onClick: q[0] || (q[0] = (M) => r.value = !1)
|
|
219
219
|
}, {
|
|
220
220
|
default: o(() => [...q[5] || (q[5] = [
|
|
221
221
|
F("取消", -1)
|
|
222
222
|
])]),
|
|
223
223
|
_: 1
|
|
224
224
|
}),
|
|
225
|
-
|
|
225
|
+
m(u, {
|
|
226
226
|
type: "primary",
|
|
227
227
|
class: "col-config-save",
|
|
228
|
-
onClick:
|
|
228
|
+
onClick: c(b)
|
|
229
229
|
}, {
|
|
230
230
|
default: o(() => [...q[6] || (q[6] = [
|
|
231
231
|
F("保存", -1)
|
|
@@ -234,43 +234,43 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
234
234
|
}, 8, ["onClick"])
|
|
235
235
|
]),
|
|
236
236
|
default: o(() => [
|
|
237
|
-
(n(!0),
|
|
237
|
+
(n(!0), y(H, null, le(c(i), (M, Q) => (n(), y("div", {
|
|
238
238
|
key: M.propertyPath,
|
|
239
239
|
class: "col-config-row"
|
|
240
240
|
}, [
|
|
241
|
-
|
|
241
|
+
m(X, {
|
|
242
242
|
modelValue: M.visible,
|
|
243
|
-
"onUpdate:modelValue": (
|
|
243
|
+
"onUpdate:modelValue": (O) => M.visible = O,
|
|
244
244
|
class: "col-config-name"
|
|
245
245
|
}, {
|
|
246
246
|
default: o(() => [
|
|
247
|
-
F(
|
|
247
|
+
F(Y(M.displayName), 1)
|
|
248
248
|
]),
|
|
249
249
|
_: 2
|
|
250
250
|
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
|
251
|
-
|
|
251
|
+
m(U, {
|
|
252
252
|
modelValue: M.width,
|
|
253
|
-
"onUpdate:modelValue": (
|
|
253
|
+
"onUpdate:modelValue": (O) => M.width = O,
|
|
254
254
|
class: "col-config-width",
|
|
255
255
|
placeholder: "宽度(如 120)",
|
|
256
256
|
size: "small"
|
|
257
257
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
258
|
-
|
|
258
|
+
m(u, {
|
|
259
259
|
link: "",
|
|
260
260
|
type: "primary",
|
|
261
|
-
disabled:
|
|
262
|
-
onClick: (
|
|
261
|
+
disabled: Q === 0,
|
|
262
|
+
onClick: (O) => c(B)(Q, -1)
|
|
263
263
|
}, {
|
|
264
264
|
default: o(() => [...q[2] || (q[2] = [
|
|
265
265
|
F("上移", -1)
|
|
266
266
|
])]),
|
|
267
267
|
_: 1
|
|
268
268
|
}, 8, ["disabled", "onClick"]),
|
|
269
|
-
|
|
269
|
+
m(u, {
|
|
270
270
|
link: "",
|
|
271
271
|
type: "primary",
|
|
272
|
-
disabled:
|
|
273
|
-
onClick: (
|
|
272
|
+
disabled: Q === c(i).length - 1,
|
|
273
|
+
onClick: (O) => c(B)(Q, 1)
|
|
274
274
|
}, {
|
|
275
275
|
default: o(() => [...q[3] || (q[3] = [
|
|
276
276
|
F(" 下移 ", -1)
|
|
@@ -294,38 +294,38 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
294
294
|
resizable: { type: Boolean, default: !0 }
|
|
295
295
|
},
|
|
296
296
|
setup(e) {
|
|
297
|
-
const
|
|
298
|
-
() =>
|
|
297
|
+
const v = e, l = N(
|
|
298
|
+
() => v.actions.length === 0 ? void 0 : v.actions.length * 34 + (v.actions.length - 1) * 12 + 30
|
|
299
299
|
);
|
|
300
300
|
return (t, a) => {
|
|
301
|
-
const
|
|
302
|
-
return
|
|
301
|
+
const f = S("el-button"), s = S("el-table-column");
|
|
302
|
+
return v.actions.length > 0 ? (n(), w(s, {
|
|
303
303
|
key: 0,
|
|
304
304
|
label: "操作",
|
|
305
305
|
fixed: "right",
|
|
306
306
|
"min-width": l.value,
|
|
307
|
-
resizable:
|
|
307
|
+
resizable: v.resizable
|
|
308
308
|
}, {
|
|
309
|
-
default: o(({ row:
|
|
310
|
-
(n(!0),
|
|
309
|
+
default: o(({ row: r }) => [
|
|
310
|
+
(n(!0), y(H, null, le(c(tt)(v.actions, r), (i) => (n(), w(f, {
|
|
311
311
|
key: i.name,
|
|
312
312
|
link: "",
|
|
313
313
|
type: i.type ?? "primary",
|
|
314
|
-
disabled: !
|
|
315
|
-
onClick: (
|
|
314
|
+
disabled: !c(vt)(i, r),
|
|
315
|
+
onClick: (x) => i.execute(r, v.table)
|
|
316
316
|
}, {
|
|
317
317
|
default: o(() => [
|
|
318
|
-
i.icon ? (n(),
|
|
318
|
+
i.icon ? (n(), w(Be(i.icon), {
|
|
319
319
|
key: 0,
|
|
320
320
|
class: "yk-row-action__icon"
|
|
321
|
-
})) :
|
|
322
|
-
F(" " +
|
|
321
|
+
})) : z("", !0),
|
|
322
|
+
F(" " + Y(i.desc), 1)
|
|
323
323
|
]),
|
|
324
324
|
_: 2
|
|
325
325
|
}, 1032, ["type", "disabled", "onClick"]))), 128))
|
|
326
326
|
]),
|
|
327
327
|
_: 1
|
|
328
|
-
}, 8, ["min-width", "resizable"])) :
|
|
328
|
+
}, 8, ["min-width", "resizable"])) : z("", !0);
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
331
|
}), cl = /* @__PURE__ */ ie(dl, [["__scopeId", "data-v-34f3d742"]]), pl = { class: "yk-table__cards" }, ml = ["title", "onContextmenu"], fl = { class: "yk-table__card-json" }, vl = /* @__PURE__ */ ee({
|
|
@@ -339,12 +339,12 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
339
339
|
isSelected: { type: Function }
|
|
340
340
|
},
|
|
341
341
|
emits: ["check", "contextmenu"],
|
|
342
|
-
setup(e, { emit:
|
|
343
|
-
const l = e, t =
|
|
344
|
-
return (a,
|
|
345
|
-
const s = S("el-checkbox"),
|
|
346
|
-
return n(),
|
|
347
|
-
(n(!0),
|
|
342
|
+
setup(e, { emit: v }) {
|
|
343
|
+
const l = e, t = v;
|
|
344
|
+
return (a, f) => {
|
|
345
|
+
const s = S("el-checkbox"), r = S("el-empty");
|
|
346
|
+
return n(), y("div", pl, [
|
|
347
|
+
(n(!0), y(H, null, le(l.rows, (i, x) => (n(), y("div", {
|
|
348
348
|
key: String(i[l.rowKey]),
|
|
349
349
|
class: Ce(["yk-table__card", {
|
|
350
350
|
"is-selected": l.showCheckbox && l.isSelected(i),
|
|
@@ -353,25 +353,25 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
353
353
|
title: l.hasActions ? "右键查看行操作" : void 0,
|
|
354
354
|
onContextmenu: (V) => t("contextmenu", V, i)
|
|
355
355
|
}, [
|
|
356
|
-
l.showCheckbox ? (n(),
|
|
356
|
+
l.showCheckbox ? (n(), w(s, {
|
|
357
357
|
key: 0,
|
|
358
358
|
class: "yk-table__card-checkbox",
|
|
359
359
|
"model-value": l.isSelected(i),
|
|
360
360
|
onChange: (V) => t("check", i, V)
|
|
361
|
-
}, null, 8, ["model-value", "onChange"])) :
|
|
361
|
+
}, null, 8, ["model-value", "onChange"])) : z("", !0),
|
|
362
362
|
Z(a.$slots, "default", {
|
|
363
363
|
row: i,
|
|
364
|
-
index:
|
|
364
|
+
index: x
|
|
365
365
|
}, () => [
|
|
366
|
-
|
|
366
|
+
p("pre", fl, Y(JSON.stringify(i, null, 2)), 1)
|
|
367
367
|
], !0)
|
|
368
368
|
], 42, ml))), 128)),
|
|
369
|
-
!l.loading && l.rows.length === 0 ? (n(),
|
|
370
|
-
a.$slots.empty ? Z(a.$slots, "empty", {}, void 0, !0, 0) : (n(),
|
|
369
|
+
!l.loading && l.rows.length === 0 ? (n(), y(H, { key: 0 }, [
|
|
370
|
+
a.$slots.empty ? Z(a.$slots, "empty", {}, void 0, !0, 0) : (n(), w(r, {
|
|
371
371
|
key: 1,
|
|
372
372
|
description: "暂无数据"
|
|
373
373
|
}))
|
|
374
|
-
], 64)) :
|
|
374
|
+
], 64)) : z("", !0)
|
|
375
375
|
]);
|
|
376
376
|
};
|
|
377
377
|
}
|
|
@@ -386,12 +386,12 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
386
386
|
isSelected: { type: Function }
|
|
387
387
|
},
|
|
388
388
|
emits: ["check", "contextmenu"],
|
|
389
|
-
setup(e, { emit:
|
|
390
|
-
const l = e, t =
|
|
391
|
-
return (a,
|
|
392
|
-
const s = S("el-checkbox"),
|
|
393
|
-
return n(),
|
|
394
|
-
(n(!0),
|
|
389
|
+
setup(e, { emit: v }) {
|
|
390
|
+
const l = e, t = v;
|
|
391
|
+
return (a, f) => {
|
|
392
|
+
const s = S("el-checkbox"), r = S("el-empty");
|
|
393
|
+
return n(), y("div", gl, [
|
|
394
|
+
(n(!0), y(H, null, le(l.rows, (i, x) => (n(), y("div", {
|
|
395
395
|
key: String(i[l.rowKey]),
|
|
396
396
|
class: Ce(["yk-table__list-item", {
|
|
397
397
|
"is-selected": l.showCheckbox && l.isSelected(i),
|
|
@@ -400,31 +400,31 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
400
400
|
title: l.hasActions ? "右键查看行操作" : void 0,
|
|
401
401
|
onContextmenu: (V) => t("contextmenu", V, i)
|
|
402
402
|
}, [
|
|
403
|
-
l.showCheckbox ? (n(),
|
|
403
|
+
l.showCheckbox ? (n(), w(s, {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: "yk-table__list-item-checkbox",
|
|
406
406
|
"model-value": l.isSelected(i),
|
|
407
407
|
onChange: (V) => t("check", i, V)
|
|
408
|
-
}, null, 8, ["model-value", "onChange"])) :
|
|
409
|
-
|
|
408
|
+
}, null, 8, ["model-value", "onChange"])) : z("", !0),
|
|
409
|
+
p("div", kl, [
|
|
410
410
|
Z(a.$slots, "default", {
|
|
411
411
|
row: i,
|
|
412
|
-
index:
|
|
412
|
+
index: x
|
|
413
413
|
}, () => [
|
|
414
|
-
|
|
414
|
+
p("pre", bl, Y(JSON.stringify(i, null, 2)), 1)
|
|
415
415
|
], !0)
|
|
416
416
|
])
|
|
417
417
|
], 42, _l))), 128)),
|
|
418
|
-
!l.loading && l.rows.length === 0 ? (n(),
|
|
419
|
-
a.$slots.empty ? Z(a.$slots, "empty", {}, void 0, !0, 0) : (n(),
|
|
418
|
+
!l.loading && l.rows.length === 0 ? (n(), y(H, { key: 0 }, [
|
|
419
|
+
a.$slots.empty ? Z(a.$slots, "empty", {}, void 0, !0, 0) : (n(), w(r, {
|
|
420
420
|
key: 1,
|
|
421
421
|
description: "暂无数据"
|
|
422
422
|
}))
|
|
423
|
-
], 64)) :
|
|
423
|
+
], 64)) : z("", !0)
|
|
424
424
|
]);
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
}),
|
|
427
|
+
}), xl = /* @__PURE__ */ ie(hl, [["__scopeId", "data-v-0488eb89"]]), wl = ["onClick"], Cl = /* @__PURE__ */ ee({
|
|
428
428
|
__name: "contextMenu",
|
|
429
429
|
props: {
|
|
430
430
|
menu: {},
|
|
@@ -432,32 +432,32 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
432
432
|
isEnabled: { type: Function }
|
|
433
433
|
},
|
|
434
434
|
emits: ["close", "select"],
|
|
435
|
-
setup(e, { emit:
|
|
436
|
-
const l = e, t =
|
|
437
|
-
return (a,
|
|
438
|
-
l.menu ? (n(),
|
|
439
|
-
|
|
435
|
+
setup(e, { emit: v }) {
|
|
436
|
+
const l = e, t = v;
|
|
437
|
+
return (a, f) => (n(), w(At, { to: "body" }, [
|
|
438
|
+
l.menu ? (n(), y(H, { key: 0 }, [
|
|
439
|
+
p("div", {
|
|
440
440
|
class: "yk-table__menu-mask",
|
|
441
|
-
onClick:
|
|
442
|
-
onContextmenu:
|
|
441
|
+
onClick: f[0] || (f[0] = (s) => t("close")),
|
|
442
|
+
onContextmenu: f[1] || (f[1] = ct((s) => t("close"), ["prevent"]))
|
|
443
443
|
}, null, 32),
|
|
444
|
-
|
|
444
|
+
p("ul", {
|
|
445
445
|
class: "yk-table__context-menu",
|
|
446
446
|
style: nt({ left: `${l.menu.x}px`, top: `${l.menu.y}px` })
|
|
447
447
|
}, [
|
|
448
|
-
(n(!0),
|
|
448
|
+
(n(!0), y(H, null, le(l.actions, (s) => (n(), y("li", {
|
|
449
449
|
key: s.name,
|
|
450
450
|
class: Ce(["yk-table__context-menu-item", { "is-disabled": !l.isEnabled(s, l.menu.row) }]),
|
|
451
|
-
onClick: (
|
|
451
|
+
onClick: (r) => l.isEnabled(s, l.menu.row) && t("select", s)
|
|
452
452
|
}, [
|
|
453
|
-
s.icon ? (n(),
|
|
453
|
+
s.icon ? (n(), w(Be(s.icon), {
|
|
454
454
|
key: 0,
|
|
455
455
|
class: "yk-table__context-menu-icon"
|
|
456
|
-
})) :
|
|
457
|
-
F(" " +
|
|
458
|
-
], 10,
|
|
456
|
+
})) : z("", !0),
|
|
457
|
+
F(" " + Y(s.desc), 1)
|
|
458
|
+
], 10, wl))), 128))
|
|
459
459
|
], 4)
|
|
460
|
-
], 64)) :
|
|
460
|
+
], 64)) : z("", !0)
|
|
461
461
|
]));
|
|
462
462
|
}
|
|
463
463
|
}), Sl = /* @__PURE__ */ ie(Cl, [["__scopeId", "data-v-32592dd4"]]), $l = { class: "yk-table" }, Vl = { class: "yk-table__view-area" }, Fl = {
|
|
@@ -466,7 +466,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
466
466
|
}, Ml = {
|
|
467
467
|
key: 0,
|
|
468
468
|
class: "yk-table__footer"
|
|
469
|
-
}, Rl = { class: "yk-table__footer-extra" },
|
|
469
|
+
}, Rl = { class: "yk-table__footer-extra" }, Pl = /* @__PURE__ */ ee({
|
|
470
470
|
name: "YsTable",
|
|
471
471
|
__name: "table",
|
|
472
472
|
props: {
|
|
@@ -517,202 +517,202 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
517
517
|
viewMode: { type: String, default: "table" }
|
|
518
518
|
},
|
|
519
519
|
emits: ["data-loaded", "update:viewMode", "update:showCheckbox", "update:columnResizable", "update:stickyHeader"],
|
|
520
|
-
setup(e, { expose:
|
|
520
|
+
setup(e, { expose: v, emit: l }) {
|
|
521
521
|
const t = e, a = l, {
|
|
522
|
-
meta:
|
|
522
|
+
meta: f,
|
|
523
523
|
paged: s,
|
|
524
|
-
rows:
|
|
524
|
+
rows: r,
|
|
525
525
|
metaLoading: i,
|
|
526
|
-
dataLoading:
|
|
526
|
+
dataLoading: x,
|
|
527
527
|
currentPage: V,
|
|
528
|
-
total:
|
|
528
|
+
total: D,
|
|
529
529
|
totalKnown: j,
|
|
530
|
-
loadMeta:
|
|
530
|
+
loadMeta: B
|
|
531
531
|
} = Yt(t), h = T(null), {
|
|
532
|
-
selectedRows:
|
|
532
|
+
selectedRows: b,
|
|
533
533
|
onSelectionChange: L,
|
|
534
534
|
isRowSelected: q,
|
|
535
535
|
toggleRowSelection: X,
|
|
536
536
|
restoreSelection: U,
|
|
537
|
-
clearSelection:
|
|
538
|
-
selectAllOnPage:
|
|
537
|
+
clearSelection: u,
|
|
538
|
+
selectAllOnPage: g,
|
|
539
539
|
invertSelectionOnPage: M
|
|
540
|
-
} = yt({ tableEl: h, rows:
|
|
540
|
+
} = yt({ tableEl: h, rows: r, rowKey: me(t, "rowKey") }), Q = {
|
|
541
541
|
get rowActionsFunc() {
|
|
542
542
|
return t.rowActionsFunc;
|
|
543
543
|
}
|
|
544
|
-
}, { actions:
|
|
545
|
-
var
|
|
546
|
-
return ((
|
|
547
|
-
}),
|
|
548
|
-
var
|
|
549
|
-
return ((
|
|
550
|
-
}), $ =
|
|
551
|
-
var
|
|
552
|
-
return ((
|
|
553
|
-
}),
|
|
554
|
-
async function G(
|
|
555
|
-
|
|
544
|
+
}, { actions: O, actionsLoading: re, loadActions: ae } = Qt(Q), W = T(null), C = N(() => {
|
|
545
|
+
var d;
|
|
546
|
+
return ((d = W.value) == null ? void 0 : d.columns) ?? [];
|
|
547
|
+
}), k = N(() => {
|
|
548
|
+
var d;
|
|
549
|
+
return ((d = W.value) == null ? void 0 : d.defaultPageSize) ?? t.pageSize;
|
|
550
|
+
}), $ = N(() => {
|
|
551
|
+
var d;
|
|
552
|
+
return ((d = W.value) == null ? void 0 : d.customConfigLoading) ?? !1;
|
|
553
|
+
}), P = T(null);
|
|
554
|
+
async function G(d) {
|
|
555
|
+
x.value = !0;
|
|
556
556
|
try {
|
|
557
|
-
const te = (V.value - 1) *
|
|
557
|
+
const te = (V.value - 1) * k.value, ue = await t.dataFun({ limit: k.value, offset: te }, d);
|
|
558
558
|
s.value = ue, a("data-loaded", ue);
|
|
559
559
|
} finally {
|
|
560
|
-
|
|
560
|
+
x.value = !1;
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
const
|
|
563
|
+
const E = N(() => {
|
|
564
564
|
var te;
|
|
565
|
-
const
|
|
566
|
-
return
|
|
567
|
-
}), I =
|
|
568
|
-
() => i.value ||
|
|
565
|
+
const d = Math.min(k.value, ...t.pageSizes);
|
|
566
|
+
return D.value > d || (((te = s.value) == null ? void 0 : te.hasNext) ?? !1);
|
|
567
|
+
}), I = N(
|
|
568
|
+
() => i.value || x.value || re.value || $.value
|
|
569
569
|
);
|
|
570
|
-
function
|
|
571
|
-
V.value =
|
|
570
|
+
function A(d) {
|
|
571
|
+
V.value = d, G();
|
|
572
572
|
}
|
|
573
|
-
function K(
|
|
573
|
+
function K(d) {
|
|
574
574
|
var te;
|
|
575
|
-
(te = W.value) == null || te.updateDefaultPageSize(
|
|
575
|
+
(te = W.value) == null || te.updateDefaultPageSize(d), V.value = 1, G();
|
|
576
576
|
}
|
|
577
|
-
function se(
|
|
577
|
+
function se(d, te, ue) {
|
|
578
578
|
var _e;
|
|
579
|
-
ue.property && ((_e = W.value) == null || _e.updateColumnWidth(ue.property,
|
|
579
|
+
ue.property && ((_e = W.value) == null || _e.updateColumnWidth(ue.property, d));
|
|
580
580
|
}
|
|
581
581
|
async function ce() {
|
|
582
|
-
var
|
|
582
|
+
var d;
|
|
583
583
|
await Promise.all([
|
|
584
|
-
|
|
584
|
+
B(),
|
|
585
585
|
ae(),
|
|
586
|
-
(
|
|
586
|
+
(d = W.value) == null ? void 0 : d.loadCustomConfigs()
|
|
587
587
|
]), V.value = 1, G();
|
|
588
588
|
}
|
|
589
589
|
function be() {
|
|
590
590
|
G();
|
|
591
591
|
}
|
|
592
|
-
$e(ce), de(() => t.pageSize, (
|
|
593
|
-
K(
|
|
592
|
+
$e(ce), de(() => t.pageSize, (d) => {
|
|
593
|
+
K(d);
|
|
594
594
|
}), de(() => t.dataFun, () => {
|
|
595
595
|
V.value = 1, G();
|
|
596
596
|
});
|
|
597
597
|
const Ve = T(t.viewMode);
|
|
598
|
-
de(() => t.viewMode, (
|
|
599
|
-
Ve.value =
|
|
598
|
+
de(() => t.viewMode, (d) => {
|
|
599
|
+
Ve.value = d;
|
|
600
600
|
});
|
|
601
|
-
const ge =
|
|
601
|
+
const ge = N({
|
|
602
602
|
get: () => Ve.value,
|
|
603
|
-
set: (
|
|
604
|
-
Ve.value =
|
|
603
|
+
set: (d) => {
|
|
604
|
+
Ve.value = d, a("update:viewMode", d);
|
|
605
605
|
}
|
|
606
606
|
});
|
|
607
|
-
de(ge, (
|
|
608
|
-
|
|
607
|
+
de(ge, (d) => {
|
|
608
|
+
d === "table" && U();
|
|
609
609
|
});
|
|
610
610
|
const he = T(t.showCheckbox);
|
|
611
|
-
de(() => t.showCheckbox, (
|
|
612
|
-
he.value =
|
|
611
|
+
de(() => t.showCheckbox, (d) => {
|
|
612
|
+
he.value = d;
|
|
613
613
|
});
|
|
614
|
-
const
|
|
614
|
+
const xe = N({
|
|
615
615
|
get: () => he.value,
|
|
616
|
-
set: (
|
|
617
|
-
he.value =
|
|
616
|
+
set: (d) => {
|
|
617
|
+
he.value = d, a("update:showCheckbox", d), d || u();
|
|
618
618
|
}
|
|
619
619
|
});
|
|
620
|
-
function Fe(
|
|
621
|
-
ge.value =
|
|
620
|
+
function Fe(d) {
|
|
621
|
+
ge.value = d;
|
|
622
622
|
}
|
|
623
|
-
function qe(
|
|
624
|
-
|
|
623
|
+
function qe(d) {
|
|
624
|
+
xe.value = d;
|
|
625
625
|
}
|
|
626
626
|
const Re = T(t.columnResizable);
|
|
627
|
-
de(() => t.columnResizable, (
|
|
628
|
-
Re.value =
|
|
627
|
+
de(() => t.columnResizable, (d) => {
|
|
628
|
+
Re.value = d;
|
|
629
629
|
});
|
|
630
|
-
const Me =
|
|
630
|
+
const Me = N({
|
|
631
631
|
get: () => Re.value,
|
|
632
|
-
set: (
|
|
633
|
-
Re.value =
|
|
632
|
+
set: (d) => {
|
|
633
|
+
Re.value = d, a("update:columnResizable", d);
|
|
634
634
|
}
|
|
635
635
|
});
|
|
636
|
-
function Le(
|
|
637
|
-
Me.value =
|
|
636
|
+
function Le(d) {
|
|
637
|
+
Me.value = d;
|
|
638
638
|
}
|
|
639
|
-
const
|
|
640
|
-
de(() => t.stickyHeader, (
|
|
641
|
-
|
|
639
|
+
const Ee = T(t.stickyHeader);
|
|
640
|
+
de(() => t.stickyHeader, (d) => {
|
|
641
|
+
Ee.value = d;
|
|
642
642
|
});
|
|
643
|
-
const
|
|
644
|
-
get: () =>
|
|
645
|
-
set: (
|
|
646
|
-
|
|
643
|
+
const Pe = N({
|
|
644
|
+
get: () => Ee.value,
|
|
645
|
+
set: (d) => {
|
|
646
|
+
Ee.value = d, a("update:stickyHeader", d);
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
|
-
function Ue(
|
|
650
|
-
|
|
649
|
+
function Ue(d) {
|
|
650
|
+
Pe.value = d;
|
|
651
651
|
}
|
|
652
|
-
const Ke = zt(), je =
|
|
653
|
-
() => Object.keys(Ke).filter((
|
|
652
|
+
const Ke = zt(), je = N(
|
|
653
|
+
() => Object.keys(Ke).filter((d) => d !== "_" && typeof Ke[d] == "function")
|
|
654
654
|
);
|
|
655
|
-
function
|
|
656
|
-
var
|
|
657
|
-
(
|
|
655
|
+
function Ie() {
|
|
656
|
+
var d;
|
|
657
|
+
(d = W.value) == null || d.openDialog();
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
var
|
|
661
|
-
(
|
|
659
|
+
function Ae() {
|
|
660
|
+
var d;
|
|
661
|
+
(d = P.value) == null || d.openExportDialog();
|
|
662
662
|
}
|
|
663
|
-
function ze(
|
|
664
|
-
X(
|
|
663
|
+
function ze(d, te) {
|
|
664
|
+
X(d, !!te);
|
|
665
665
|
}
|
|
666
|
-
const ye = T(null), Je =
|
|
667
|
-
() => ye.value ? tt(
|
|
666
|
+
const ye = T(null), Je = N(
|
|
667
|
+
() => ye.value ? tt(O.value, ye.value.row) : []
|
|
668
668
|
);
|
|
669
|
-
function He(
|
|
670
|
-
if (
|
|
671
|
-
|
|
672
|
-
const ue = 176,
|
|
669
|
+
function He(d, te) {
|
|
670
|
+
if (O.value.length === 0) return;
|
|
671
|
+
d.preventDefault();
|
|
672
|
+
const ue = 176, ne = Xe(te) * 34 + 8;
|
|
673
673
|
ye.value = {
|
|
674
|
-
x: Math.min(
|
|
675
|
-
y: Math.min(
|
|
674
|
+
x: Math.min(d.clientX, window.innerWidth - ue - 8),
|
|
675
|
+
y: Math.min(d.clientY, window.innerHeight - ne - 8),
|
|
676
676
|
row: te
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function Xe(
|
|
680
|
-
return tt(
|
|
679
|
+
function Xe(d) {
|
|
680
|
+
return tt(O.value, d).length;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function _(d) {
|
|
683
683
|
var ue;
|
|
684
684
|
const te = (ue = ye.value) == null ? void 0 : ue.row;
|
|
685
|
-
ye.value = null, te &&
|
|
685
|
+
ye.value = null, te && d.execute(te, oe);
|
|
686
686
|
}
|
|
687
|
-
function R(
|
|
688
|
-
|
|
687
|
+
function R(d) {
|
|
688
|
+
d.key === "Escape" && (ye.value = null);
|
|
689
689
|
}
|
|
690
|
-
$e(() => window.addEventListener("keydown", R)), Ne(() => window.removeEventListener("keydown", R)),
|
|
691
|
-
meta:
|
|
690
|
+
$e(() => window.addEventListener("keydown", R)), Ne(() => window.removeEventListener("keydown", R)), v({
|
|
691
|
+
meta: f,
|
|
692
692
|
paged: s,
|
|
693
693
|
currentPage: V,
|
|
694
694
|
viewMode: ge,
|
|
695
|
-
selectable:
|
|
695
|
+
selectable: xe,
|
|
696
696
|
columnResizable: Me,
|
|
697
|
-
stickyHeader:
|
|
697
|
+
stickyHeader: Pe,
|
|
698
698
|
slotNames: je,
|
|
699
|
-
selectedRows:
|
|
700
|
-
rows:
|
|
699
|
+
selectedRows: b,
|
|
700
|
+
rows: r,
|
|
701
701
|
reload: ce,
|
|
702
702
|
refresh: be,
|
|
703
703
|
setViewMode: Fe,
|
|
704
704
|
setSelectable: qe,
|
|
705
705
|
setColumnResizable: Le,
|
|
706
706
|
setStickyHeader: Ue,
|
|
707
|
-
clearSelection:
|
|
708
|
-
selectAllOnPage:
|
|
707
|
+
clearSelection: u,
|
|
708
|
+
selectAllOnPage: g,
|
|
709
709
|
invertSelectionOnPage: M,
|
|
710
|
-
openConfigDialog:
|
|
711
|
-
openExportDialog:
|
|
710
|
+
openConfigDialog: Ie,
|
|
711
|
+
openExportDialog: Ae
|
|
712
712
|
});
|
|
713
713
|
const oe = {
|
|
714
714
|
get meta() {
|
|
715
|
-
return
|
|
715
|
+
return f.value;
|
|
716
716
|
},
|
|
717
717
|
get paged() {
|
|
718
718
|
return s.value;
|
|
@@ -724,22 +724,22 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
724
724
|
return ge.value;
|
|
725
725
|
},
|
|
726
726
|
get selectable() {
|
|
727
|
-
return
|
|
727
|
+
return xe.value;
|
|
728
728
|
},
|
|
729
729
|
get columnResizable() {
|
|
730
730
|
return Me.value;
|
|
731
731
|
},
|
|
732
732
|
get stickyHeader() {
|
|
733
|
-
return
|
|
733
|
+
return Pe.value;
|
|
734
734
|
},
|
|
735
735
|
get slotNames() {
|
|
736
736
|
return je.value;
|
|
737
737
|
},
|
|
738
738
|
get selectedRows() {
|
|
739
|
-
return
|
|
739
|
+
return b.value;
|
|
740
740
|
},
|
|
741
741
|
get rows() {
|
|
742
|
-
return
|
|
742
|
+
return r.value;
|
|
743
743
|
},
|
|
744
744
|
reload: ce,
|
|
745
745
|
refresh: be,
|
|
@@ -747,238 +747,240 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
747
747
|
setSelectable: qe,
|
|
748
748
|
setColumnResizable: Le,
|
|
749
749
|
setStickyHeader: Ue,
|
|
750
|
-
clearSelection:
|
|
751
|
-
selectAllOnPage:
|
|
750
|
+
clearSelection: u,
|
|
751
|
+
selectAllOnPage: g,
|
|
752
752
|
invertSelectionOnPage: M,
|
|
753
|
-
openConfigDialog:
|
|
754
|
-
openExportDialog:
|
|
753
|
+
openConfigDialog: Ie,
|
|
754
|
+
openExportDialog: Ae
|
|
755
755
|
};
|
|
756
|
-
return (
|
|
756
|
+
return (d, te) => {
|
|
757
757
|
var ke;
|
|
758
|
-
const ue = S("el-table-column"), _e = S("el-table"),
|
|
759
|
-
return n(),
|
|
760
|
-
|
|
761
|
-
ge.value === "table" ? (n(),
|
|
758
|
+
const ue = S("el-table-column"), _e = S("el-table"), ne = S("el-pagination");
|
|
759
|
+
return n(), y("div", $l, [
|
|
760
|
+
p("div", Vl, [
|
|
761
|
+
ge.value === "table" ? (n(), y("div", {
|
|
762
762
|
key: 0,
|
|
763
|
-
class: Ce(["yk-table__table-wrap", { "yk-table__table-wrap--sticky-header":
|
|
763
|
+
class: Ce(["yk-table__table-wrap", { "yk-table__table-wrap--sticky-header": Pe.value }])
|
|
764
764
|
}, [
|
|
765
|
-
|
|
765
|
+
m(_e, {
|
|
766
766
|
ref_key: "tableEl",
|
|
767
767
|
ref: h,
|
|
768
|
-
data:
|
|
768
|
+
data: c(r),
|
|
769
769
|
"row-key": e.rowKey,
|
|
770
770
|
border: "",
|
|
771
|
-
onSelectionChange:
|
|
771
|
+
onSelectionChange: c(L),
|
|
772
772
|
onHeaderDragend: se
|
|
773
|
-
},
|
|
773
|
+
}, De({
|
|
774
774
|
default: o(() => [
|
|
775
|
-
|
|
775
|
+
xe.value ? (n(), w(ue, {
|
|
776
776
|
key: 0,
|
|
777
777
|
type: "selection",
|
|
778
778
|
width: "48"
|
|
779
|
-
})) :
|
|
780
|
-
(n(!0),
|
|
779
|
+
})) : z("", !0),
|
|
780
|
+
(n(!0), y(H, null, le(C.value, (pe) => (n(), w(ue, {
|
|
781
781
|
key: pe.propertyPath,
|
|
782
782
|
prop: pe.propertyPath,
|
|
783
783
|
label: pe.displayName,
|
|
784
784
|
width: pe.width,
|
|
785
785
|
resizable: Me.value,
|
|
786
786
|
"show-overflow-tooltip": ""
|
|
787
|
-
},
|
|
787
|
+
}, De({ _: 2 }, [
|
|
788
788
|
pe.render ? {
|
|
789
789
|
name: "default",
|
|
790
|
-
fn: o(({ row:
|
|
791
|
-
(n(),
|
|
790
|
+
fn: o(({ row: we }) => [
|
|
791
|
+
(n(), w(Be(() => pe.render(we, we[pe.propertyPath]))))
|
|
792
792
|
]),
|
|
793
793
|
key: "0"
|
|
794
794
|
} : void 0
|
|
795
795
|
]), 1032, ["prop", "label", "width", "resizable"]))), 128)),
|
|
796
|
-
t.rowActionsFunc ? (n(),
|
|
796
|
+
t.rowActionsFunc ? (n(), w(cl, {
|
|
797
797
|
key: 1,
|
|
798
|
-
actions:
|
|
798
|
+
actions: c(O),
|
|
799
799
|
table: oe,
|
|
800
800
|
resizable: Me.value
|
|
801
|
-
}, null, 8, ["actions", "resizable"])) :
|
|
801
|
+
}, null, 8, ["actions", "resizable"])) : z("", !0)
|
|
802
802
|
]),
|
|
803
803
|
_: 2
|
|
804
804
|
}, [
|
|
805
|
-
|
|
805
|
+
d.$slots.empty ? {
|
|
806
806
|
name: "empty",
|
|
807
807
|
fn: o(() => [
|
|
808
|
-
Z(
|
|
808
|
+
Z(d.$slots, "empty", {}, void 0, !0)
|
|
809
809
|
]),
|
|
810
810
|
key: "0"
|
|
811
811
|
} : void 0
|
|
812
812
|
]), 1032, ["data", "row-key", "onSelectionChange"])
|
|
813
|
-
], 2)) : ge.value === "card" ? (n(),
|
|
813
|
+
], 2)) : ge.value === "card" ? (n(), w(yl, {
|
|
814
814
|
key: 1,
|
|
815
|
-
rows:
|
|
815
|
+
rows: c(r),
|
|
816
816
|
"row-key": e.rowKey,
|
|
817
|
-
"show-checkbox":
|
|
817
|
+
"show-checkbox": xe.value,
|
|
818
818
|
loading: I.value,
|
|
819
|
-
"has-actions":
|
|
820
|
-
"is-selected":
|
|
819
|
+
"has-actions": c(O).length > 0,
|
|
820
|
+
"is-selected": c(q),
|
|
821
821
|
onCheck: ze,
|
|
822
822
|
onContextmenu: He
|
|
823
|
-
},
|
|
824
|
-
|
|
823
|
+
}, De({ _: 2 }, [
|
|
824
|
+
d.$slots.card ? {
|
|
825
825
|
name: "default",
|
|
826
|
-
fn: o(({ row: pe, index:
|
|
827
|
-
Z(
|
|
826
|
+
fn: o(({ row: pe, index: we }) => [
|
|
827
|
+
Z(d.$slots, "card", {
|
|
828
828
|
row: pe,
|
|
829
|
-
index:
|
|
829
|
+
index: we
|
|
830
830
|
}, void 0, !0)
|
|
831
831
|
]),
|
|
832
832
|
key: "0"
|
|
833
833
|
} : void 0,
|
|
834
|
-
|
|
834
|
+
d.$slots.empty ? {
|
|
835
835
|
name: "empty",
|
|
836
836
|
fn: o(() => [
|
|
837
|
-
Z(
|
|
837
|
+
Z(d.$slots, "empty", {}, void 0, !0)
|
|
838
838
|
]),
|
|
839
839
|
key: "1"
|
|
840
840
|
} : void 0
|
|
841
|
-
]), 1032, ["rows", "row-key", "show-checkbox", "loading", "has-actions", "is-selected"])) : (n(),
|
|
841
|
+
]), 1032, ["rows", "row-key", "show-checkbox", "loading", "has-actions", "is-selected"])) : (n(), w(xl, {
|
|
842
842
|
key: 2,
|
|
843
|
-
rows:
|
|
843
|
+
rows: c(r),
|
|
844
844
|
"row-key": e.rowKey,
|
|
845
|
-
"show-checkbox":
|
|
845
|
+
"show-checkbox": xe.value,
|
|
846
846
|
loading: I.value,
|
|
847
|
-
"has-actions":
|
|
848
|
-
"is-selected":
|
|
847
|
+
"has-actions": c(O).length > 0,
|
|
848
|
+
"is-selected": c(q),
|
|
849
849
|
onCheck: ze,
|
|
850
850
|
onContextmenu: He
|
|
851
|
-
},
|
|
852
|
-
|
|
851
|
+
}, De({ _: 2 }, [
|
|
852
|
+
d.$slots.list ? {
|
|
853
853
|
name: "default",
|
|
854
|
-
fn: o(({ row: pe, index:
|
|
855
|
-
Z(
|
|
854
|
+
fn: o(({ row: pe, index: we }) => [
|
|
855
|
+
Z(d.$slots, "list", {
|
|
856
856
|
row: pe,
|
|
857
|
-
index:
|
|
857
|
+
index: we
|
|
858
858
|
}, void 0, !0)
|
|
859
859
|
]),
|
|
860
860
|
key: "0"
|
|
861
861
|
} : void 0,
|
|
862
|
-
|
|
862
|
+
d.$slots.empty ? {
|
|
863
863
|
name: "empty",
|
|
864
864
|
fn: o(() => [
|
|
865
|
-
Z(
|
|
865
|
+
Z(d.$slots, "empty", {}, void 0, !0)
|
|
866
866
|
]),
|
|
867
867
|
key: "1"
|
|
868
868
|
} : void 0
|
|
869
869
|
]), 1032, ["rows", "row-key", "show-checkbox", "loading", "has-actions", "is-selected"])),
|
|
870
|
-
|
|
870
|
+
m(Dt, { name: "yk-loading-fade" }, {
|
|
871
871
|
default: o(() => [
|
|
872
|
-
I.value ? (n(),
|
|
873
|
-
Z(
|
|
874
|
-
te[1] || (te[1] =
|
|
872
|
+
I.value ? (n(), y("div", Fl, [
|
|
873
|
+
Z(d.$slots, "loading", {}, () => [
|
|
874
|
+
te[1] || (te[1] = p("span", {
|
|
875
875
|
class: "yk-table__loading-spinner",
|
|
876
876
|
"aria-label": "加载中"
|
|
877
877
|
}, null, -1))
|
|
878
878
|
], !0)
|
|
879
|
-
])) :
|
|
879
|
+
])) : z("", !0)
|
|
880
880
|
]),
|
|
881
881
|
_: 3
|
|
882
882
|
})
|
|
883
883
|
]),
|
|
884
|
-
|
|
884
|
+
m(Sl, {
|
|
885
885
|
menu: ye.value,
|
|
886
886
|
actions: Je.value,
|
|
887
|
-
"is-enabled":
|
|
887
|
+
"is-enabled": c(vt),
|
|
888
888
|
onClose: te[0] || (te[0] = (pe) => ye.value = null),
|
|
889
|
-
onSelect:
|
|
889
|
+
onSelect: _
|
|
890
890
|
}, null, 8, ["menu", "actions", "is-enabled"]),
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
Z(
|
|
891
|
+
E.value || d.$slots.footer ? (n(), y("div", Ml, [
|
|
892
|
+
p("div", Rl, [
|
|
893
|
+
Z(d.$slots, "footer", {}, void 0, !0)
|
|
894
894
|
]),
|
|
895
|
-
|
|
895
|
+
E.value ? (n(), w(ne, {
|
|
896
896
|
key: 0,
|
|
897
897
|
class: "yk-table__pagination",
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
size: "small",
|
|
899
|
+
background: "",
|
|
900
|
+
layout: c(j) ? "total, sizes, prev, pager, next" : "sizes, prev, pager, next",
|
|
901
|
+
total: c(D),
|
|
900
902
|
"page-sizes": e.pageSizes,
|
|
901
|
-
"page-size":
|
|
902
|
-
"current-page":
|
|
903
|
-
onCurrentChange:
|
|
903
|
+
"page-size": k.value,
|
|
904
|
+
"current-page": c(V),
|
|
905
|
+
onCurrentChange: A,
|
|
904
906
|
onSizeChange: K
|
|
905
|
-
}, null, 8, ["layout", "total", "page-sizes", "page-size", "current-page"])) :
|
|
906
|
-
])) :
|
|
907
|
-
|
|
907
|
+
}, null, 8, ["layout", "total", "page-sizes", "page-size", "current-page"])) : z("", !0)
|
|
908
|
+
])) : z("", !0),
|
|
909
|
+
m(bt, {
|
|
908
910
|
ref_key: "exportDialogRef",
|
|
909
|
-
ref:
|
|
910
|
-
"current-rows":
|
|
911
|
-
"selected-rows":
|
|
911
|
+
ref: P,
|
|
912
|
+
"current-rows": c(r),
|
|
913
|
+
"selected-rows": c(b),
|
|
912
914
|
"data-fun": t.dataFun,
|
|
913
915
|
"export-page-size": t.exportPageSize,
|
|
914
|
-
total:
|
|
916
|
+
total: c(D),
|
|
915
917
|
"exportor-func": t.exportorFunc,
|
|
916
|
-
"table-name": ((ke =
|
|
917
|
-
columns:
|
|
918
|
-
"has-more-page":
|
|
919
|
-
"export-selected":
|
|
918
|
+
"table-name": ((ke = c(f)) == null ? void 0 : ke.displayName) ?? "数据",
|
|
919
|
+
columns: C.value,
|
|
920
|
+
"has-more-page": E.value,
|
|
921
|
+
"export-selected": xe.value
|
|
920
922
|
}, null, 8, ["current-rows", "selected-rows", "data-fun", "export-page-size", "total", "exportor-func", "table-name", "columns", "has-more-page", "export-selected"]),
|
|
921
|
-
|
|
923
|
+
m(ul, {
|
|
922
924
|
ref_key: "configDialogRef",
|
|
923
925
|
ref: W,
|
|
924
926
|
"load-custom-config-fun": e.loadCustomConfigFun,
|
|
925
927
|
"save-custom-config-fun": e.saveCustomConfigFun,
|
|
926
|
-
meta:
|
|
928
|
+
meta: c(f)
|
|
927
929
|
}, null, 8, ["load-custom-config-fun", "save-custom-config-fun", "meta"])
|
|
928
930
|
]);
|
|
929
931
|
};
|
|
930
932
|
}
|
|
931
|
-
}), ht = /* @__PURE__ */ ie(
|
|
933
|
+
}), ht = /* @__PURE__ */ ie(Pl, [["__scopeId", "data-v-804b3f1e"]]), Al = { class: "yk-table-action-menu-button__check" }, zl = { class: "yk-table-action-menu-button__check" }, Dl = { class: "yk-table-action-menu-button__check" }, Bl = { class: "yk-table-action-menu-button__check" }, El = { class: "yk-table-action-menu-button__check" }, Il = { class: "yk-table-action-menu-button__check" }, Tl = /* @__PURE__ */ ee({
|
|
932
934
|
__name: "tableActionMenuButton",
|
|
933
935
|
props: {
|
|
934
936
|
table: {}
|
|
935
937
|
},
|
|
936
938
|
setup(e) {
|
|
937
|
-
const
|
|
939
|
+
const v = e;
|
|
938
940
|
function l(t) {
|
|
939
941
|
switch (t) {
|
|
940
942
|
case "refresh":
|
|
941
|
-
|
|
943
|
+
v.table.refresh();
|
|
942
944
|
break;
|
|
943
945
|
case "config":
|
|
944
|
-
|
|
946
|
+
v.table.openConfigDialog();
|
|
945
947
|
break;
|
|
946
948
|
case "export":
|
|
947
|
-
|
|
949
|
+
v.table.openExportDialog();
|
|
948
950
|
break;
|
|
949
951
|
case "view-table":
|
|
950
|
-
|
|
952
|
+
v.table.setViewMode("table");
|
|
951
953
|
break;
|
|
952
954
|
case "view-card":
|
|
953
|
-
|
|
955
|
+
v.table.setViewMode("card");
|
|
954
956
|
break;
|
|
955
957
|
case "view-list":
|
|
956
|
-
|
|
958
|
+
v.table.setViewMode("list");
|
|
957
959
|
break;
|
|
958
960
|
case "toggle-checkbox":
|
|
959
|
-
|
|
961
|
+
v.table.setSelectable(!v.table.selectable);
|
|
960
962
|
break;
|
|
961
963
|
case "toggle-column-resize":
|
|
962
|
-
|
|
964
|
+
v.table.setColumnResizable(!v.table.columnResizable);
|
|
963
965
|
break;
|
|
964
966
|
case "toggle-sticky-header":
|
|
965
|
-
|
|
967
|
+
v.table.setStickyHeader(!v.table.stickyHeader);
|
|
966
968
|
break;
|
|
967
969
|
}
|
|
968
970
|
}
|
|
969
971
|
return (t, a) => {
|
|
970
|
-
const
|
|
971
|
-
return n(),
|
|
972
|
+
const f = S("el-button"), s = S("el-dropdown-item"), r = S("el-dropdown-menu"), i = S("el-dropdown");
|
|
973
|
+
return n(), w(i, {
|
|
972
974
|
trigger: "click",
|
|
973
975
|
placement: "bottom-end",
|
|
974
976
|
onCommand: l
|
|
975
977
|
}, {
|
|
976
978
|
dropdown: o(() => [
|
|
977
|
-
|
|
979
|
+
m(r, null, {
|
|
978
980
|
default: o(() => [
|
|
979
|
-
|
|
981
|
+
m(s, { command: "refresh" }, {
|
|
980
982
|
default: o(() => [...a[1] || (a[1] = [
|
|
981
|
-
|
|
983
|
+
p("svg", {
|
|
982
984
|
viewBox: "0 0 24 24",
|
|
983
985
|
width: "14",
|
|
984
986
|
height: "14",
|
|
@@ -989,17 +991,17 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
989
991
|
"stroke-linejoin": "round",
|
|
990
992
|
class: "yk-table-action-menu-button__icon"
|
|
991
993
|
}, [
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
994
|
+
p("polyline", { points: "23 4 23 10 17 10" }),
|
|
995
|
+
p("polyline", { points: "1 20 1 14 7 14" }),
|
|
996
|
+
p("path", { d: "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" })
|
|
995
997
|
], -1),
|
|
996
998
|
F(" 刷新 ", -1)
|
|
997
999
|
])]),
|
|
998
1000
|
_: 1
|
|
999
1001
|
}),
|
|
1000
|
-
|
|
1002
|
+
m(s, { command: "export" }, {
|
|
1001
1003
|
default: o(() => [...a[2] || (a[2] = [
|
|
1002
|
-
|
|
1004
|
+
p("svg", {
|
|
1003
1005
|
viewBox: "0 0 24 24",
|
|
1004
1006
|
width: "14",
|
|
1005
1007
|
height: "14",
|
|
@@ -1010,9 +1012,9 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1010
1012
|
"stroke-linejoin": "round",
|
|
1011
1013
|
class: "yk-table-action-menu-button__icon"
|
|
1012
1014
|
}, [
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1015
|
+
p("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
1016
|
+
p("polyline", { points: "7 10 12 15 17 10" }),
|
|
1017
|
+
p("line", {
|
|
1016
1018
|
x1: "12",
|
|
1017
1019
|
y1: "15",
|
|
1018
1020
|
x2: "12",
|
|
@@ -1023,9 +1025,9 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1023
1025
|
])]),
|
|
1024
1026
|
_: 1
|
|
1025
1027
|
}),
|
|
1026
|
-
|
|
1028
|
+
m(s, { command: "config" }, {
|
|
1027
1029
|
default: o(() => [...a[3] || (a[3] = [
|
|
1028
|
-
|
|
1030
|
+
p("svg", {
|
|
1029
1031
|
viewBox: "0 0 24 24",
|
|
1030
1032
|
width: "14",
|
|
1031
1033
|
height: "14",
|
|
@@ -1036,67 +1038,67 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1036
1038
|
"stroke-linejoin": "round",
|
|
1037
1039
|
class: "yk-table-action-menu-button__icon"
|
|
1038
1040
|
}, [
|
|
1039
|
-
|
|
1041
|
+
p("circle", {
|
|
1040
1042
|
cx: "12",
|
|
1041
1043
|
cy: "12",
|
|
1042
1044
|
r: "3"
|
|
1043
1045
|
}),
|
|
1044
|
-
|
|
1046
|
+
p("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
1045
1047
|
], -1),
|
|
1046
1048
|
F(" 列设置 ", -1)
|
|
1047
1049
|
])]),
|
|
1048
1050
|
_: 1
|
|
1049
1051
|
}),
|
|
1050
|
-
|
|
1052
|
+
m(s, {
|
|
1051
1053
|
command: "view-table",
|
|
1052
1054
|
divided: ""
|
|
1053
1055
|
}, {
|
|
1054
1056
|
default: o(() => [
|
|
1055
|
-
|
|
1057
|
+
p("span", Al, Y(e.table.viewMode === "table" ? "✓" : ""), 1),
|
|
1056
1058
|
a[4] || (a[4] = F("表格视图 ", -1))
|
|
1057
1059
|
]),
|
|
1058
1060
|
_: 1
|
|
1059
1061
|
}),
|
|
1060
|
-
e.table.slotNames.includes("card") ? (n(),
|
|
1062
|
+
e.table.slotNames.includes("card") ? (n(), w(s, {
|
|
1061
1063
|
key: 0,
|
|
1062
1064
|
command: "view-card"
|
|
1063
1065
|
}, {
|
|
1064
1066
|
default: o(() => [
|
|
1065
|
-
|
|
1067
|
+
p("span", zl, Y(e.table.viewMode === "card" ? "✓" : ""), 1),
|
|
1066
1068
|
a[5] || (a[5] = F("卡片视图 ", -1))
|
|
1067
1069
|
]),
|
|
1068
1070
|
_: 1
|
|
1069
|
-
})) :
|
|
1070
|
-
e.table.slotNames.includes("list") ? (n(),
|
|
1071
|
+
})) : z("", !0),
|
|
1072
|
+
e.table.slotNames.includes("list") ? (n(), w(s, {
|
|
1071
1073
|
key: 1,
|
|
1072
1074
|
command: "view-list"
|
|
1073
1075
|
}, {
|
|
1074
1076
|
default: o(() => [
|
|
1075
|
-
|
|
1077
|
+
p("span", Dl, Y(e.table.viewMode === "list" ? "✓" : ""), 1),
|
|
1076
1078
|
a[6] || (a[6] = F("列表视图 ", -1))
|
|
1077
1079
|
]),
|
|
1078
1080
|
_: 1
|
|
1079
|
-
})) :
|
|
1080
|
-
|
|
1081
|
+
})) : z("", !0),
|
|
1082
|
+
m(s, {
|
|
1081
1083
|
command: "toggle-checkbox",
|
|
1082
1084
|
divided: ""
|
|
1083
1085
|
}, {
|
|
1084
1086
|
default: o(() => [
|
|
1085
|
-
|
|
1087
|
+
p("span", Bl, Y(e.table.selectable ? "✓" : ""), 1),
|
|
1086
1088
|
a[7] || (a[7] = F("选择行 ", -1))
|
|
1087
1089
|
]),
|
|
1088
1090
|
_: 1
|
|
1089
1091
|
}),
|
|
1090
|
-
|
|
1092
|
+
m(s, { command: "toggle-column-resize" }, {
|
|
1091
1093
|
default: o(() => [
|
|
1092
|
-
|
|
1094
|
+
p("span", El, Y(e.table.columnResizable ? "✓" : ""), 1),
|
|
1093
1095
|
a[8] || (a[8] = F("列宽拖动 ", -1))
|
|
1094
1096
|
]),
|
|
1095
1097
|
_: 1
|
|
1096
1098
|
}),
|
|
1097
|
-
|
|
1099
|
+
m(s, { command: "toggle-sticky-header" }, {
|
|
1098
1100
|
default: o(() => [
|
|
1099
|
-
|
|
1101
|
+
p("span", Il, Y(e.table.stickyHeader ? "✓" : ""), 1),
|
|
1100
1102
|
a[9] || (a[9] = F("锁定表头 ", -1))
|
|
1101
1103
|
]),
|
|
1102
1104
|
_: 1
|
|
@@ -1107,13 +1109,13 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1107
1109
|
]),
|
|
1108
1110
|
default: o(() => [
|
|
1109
1111
|
Z(t.$slots, "trigger", {}, () => [
|
|
1110
|
-
|
|
1112
|
+
m(f, {
|
|
1111
1113
|
class: "yk-table-action-menu-button__btn",
|
|
1112
1114
|
title: "表格操作",
|
|
1113
1115
|
"aria-label": "表格操作"
|
|
1114
1116
|
}, {
|
|
1115
1117
|
default: o(() => [...a[0] || (a[0] = [
|
|
1116
|
-
|
|
1118
|
+
p("svg", {
|
|
1117
1119
|
viewBox: "0 0 24 24",
|
|
1118
1120
|
width: "16",
|
|
1119
1121
|
height: "16",
|
|
@@ -1122,37 +1124,37 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1122
1124
|
"stroke-width": "2",
|
|
1123
1125
|
"stroke-linecap": "round"
|
|
1124
1126
|
}, [
|
|
1125
|
-
|
|
1127
|
+
p("line", {
|
|
1126
1128
|
x1: "3",
|
|
1127
1129
|
y1: "6",
|
|
1128
1130
|
x2: "21",
|
|
1129
1131
|
y2: "6"
|
|
1130
1132
|
}),
|
|
1131
|
-
|
|
1133
|
+
p("circle", {
|
|
1132
1134
|
cx: "9",
|
|
1133
1135
|
cy: "6",
|
|
1134
1136
|
r: "2.4",
|
|
1135
1137
|
fill: "var(--el-bg-color, #fff)"
|
|
1136
1138
|
}),
|
|
1137
|
-
|
|
1139
|
+
p("line", {
|
|
1138
1140
|
x1: "3",
|
|
1139
1141
|
y1: "12",
|
|
1140
1142
|
x2: "21",
|
|
1141
1143
|
y2: "12"
|
|
1142
1144
|
}),
|
|
1143
|
-
|
|
1145
|
+
p("circle", {
|
|
1144
1146
|
cx: "15",
|
|
1145
1147
|
cy: "12",
|
|
1146
1148
|
r: "2.4",
|
|
1147
1149
|
fill: "var(--el-bg-color, #fff)"
|
|
1148
1150
|
}),
|
|
1149
|
-
|
|
1151
|
+
p("line", {
|
|
1150
1152
|
x1: "3",
|
|
1151
1153
|
y1: "18",
|
|
1152
1154
|
x2: "21",
|
|
1153
1155
|
y2: "18"
|
|
1154
1156
|
}),
|
|
1155
|
-
|
|
1157
|
+
p("circle", {
|
|
1156
1158
|
cx: "9",
|
|
1157
1159
|
cy: "18",
|
|
1158
1160
|
r: "2.4",
|
|
@@ -1168,7 +1170,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1168
1170
|
});
|
|
1169
1171
|
};
|
|
1170
1172
|
}
|
|
1171
|
-
}),
|
|
1173
|
+
}), xt = /* @__PURE__ */ ie(Tl, [["__scopeId", "data-v-fffcf297"]]), Yl = {
|
|
1172
1174
|
key: 0,
|
|
1173
1175
|
class: "yk-table__selection-bar"
|
|
1174
1176
|
}, Ql = { class: "yk-table__selection-bar__count" }, Nl = /* @__PURE__ */ ee({
|
|
@@ -1178,154 +1180,167 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1178
1180
|
},
|
|
1179
1181
|
emits: ["select-all", "invert", "clear"],
|
|
1180
1182
|
setup(e) {
|
|
1181
|
-
return (
|
|
1183
|
+
return (v, l) => {
|
|
1182
1184
|
const t = S("el-button");
|
|
1183
|
-
return e.count > 0 ? (n(),
|
|
1184
|
-
|
|
1185
|
-
l[6] || (l[6] =
|
|
1186
|
-
|
|
1185
|
+
return e.count > 0 ? (n(), y("div", Yl, [
|
|
1186
|
+
p("span", Ql, "已选 " + Y(e.count) + " 项", 1),
|
|
1187
|
+
l[6] || (l[6] = p("span", { class: "yk-table__selection-bar__sep" }, "|", -1)),
|
|
1188
|
+
m(t, {
|
|
1187
1189
|
link: "",
|
|
1188
1190
|
type: "primary",
|
|
1189
1191
|
class: "yk-table__selection-bar__btn",
|
|
1190
|
-
onClick: l[0] || (l[0] = (a) =>
|
|
1192
|
+
onClick: l[0] || (l[0] = (a) => v.$emit("select-all"))
|
|
1191
1193
|
}, {
|
|
1192
1194
|
default: o(() => [...l[3] || (l[3] = [
|
|
1193
1195
|
F("全选", -1)
|
|
1194
1196
|
])]),
|
|
1195
1197
|
_: 1
|
|
1196
1198
|
}),
|
|
1197
|
-
|
|
1199
|
+
m(t, {
|
|
1198
1200
|
link: "",
|
|
1199
1201
|
type: "primary",
|
|
1200
1202
|
class: "yk-table__selection-bar__btn",
|
|
1201
|
-
onClick: l[1] || (l[1] = (a) =>
|
|
1203
|
+
onClick: l[1] || (l[1] = (a) => v.$emit("invert"))
|
|
1202
1204
|
}, {
|
|
1203
1205
|
default: o(() => [...l[4] || (l[4] = [
|
|
1204
1206
|
F("反选", -1)
|
|
1205
1207
|
])]),
|
|
1206
1208
|
_: 1
|
|
1207
1209
|
}),
|
|
1208
|
-
l[7] || (l[7] =
|
|
1209
|
-
|
|
1210
|
+
l[7] || (l[7] = p("span", { class: "yk-table__selection-bar__sep" }, "|", -1)),
|
|
1211
|
+
m(t, {
|
|
1210
1212
|
link: "",
|
|
1211
1213
|
type: "primary",
|
|
1212
1214
|
class: "yk-table__selection-bar__btn",
|
|
1213
|
-
onClick: l[2] || (l[2] = (a) =>
|
|
1215
|
+
onClick: l[2] || (l[2] = (a) => v.$emit("clear"))
|
|
1214
1216
|
}, {
|
|
1215
1217
|
default: o(() => [...l[5] || (l[5] = [
|
|
1216
1218
|
F("清空", -1)
|
|
1217
1219
|
])]),
|
|
1218
1220
|
_: 1
|
|
1219
1221
|
})
|
|
1220
|
-
])) :
|
|
1222
|
+
])) : z("", !0);
|
|
1221
1223
|
};
|
|
1222
1224
|
}
|
|
1223
|
-
}), Ol = /* @__PURE__ */ ie(Nl, [["__scopeId", "data-v-3f40dafb"]]), ql = { class: "yk-command-bar" }, Ll = { class: "yk-command-bar__actions" }, Ul =
|
|
1225
|
+
}), Ol = /* @__PURE__ */ ie(Nl, [["__scopeId", "data-v-3f40dafb"]]), ql = { class: "yk-command-bar" }, Ll = { class: "yk-command-bar__actions" }, Ul = {
|
|
1226
|
+
key: 0,
|
|
1227
|
+
class: "yk-command-bar__right"
|
|
1228
|
+
}, Kl = /* @__PURE__ */ ee({
|
|
1224
1229
|
__name: "commandBar",
|
|
1225
1230
|
props: {
|
|
1226
|
-
/** 表级命令列表,每条渲染为一个 el-button(type/plain/icon/desc),click 调 execute(table) */
|
|
1231
|
+
/** 表级命令列表,每条渲染为一个 el-button(type/plain/icon/desc/align),click 调 execute(table) */
|
|
1227
1232
|
actions: { type: Array, required: !0, default: () => [] },
|
|
1228
|
-
/** 当前表格实例;允许 null
|
|
1229
|
-
table: { type: Object, default: null }
|
|
1230
|
-
/** 是否显示内置表格操作下拉按钮(刷新/列设置/导出/视图切换/选择行/列宽拖动),默认 true 居右 */
|
|
1231
|
-
showActionMenuButton: { type: Boolean, default: !0 }
|
|
1233
|
+
/** 当前表格实例;允许 null(表格未挂载时按钮仍可渲染,点击不执行,选中提示条隐藏) */
|
|
1234
|
+
table: { type: Object, default: null }
|
|
1232
1235
|
},
|
|
1233
1236
|
setup(e) {
|
|
1234
|
-
const
|
|
1235
|
-
return (
|
|
1236
|
-
const
|
|
1237
|
-
return n(),
|
|
1238
|
-
|
|
1239
|
-
(n(!0),
|
|
1240
|
-
key:
|
|
1241
|
-
type:
|
|
1242
|
-
plain:
|
|
1243
|
-
onClick: (
|
|
1237
|
+
const v = e, l = N(() => v.actions.filter((a) => a.align !== "right")), t = N(() => v.actions.filter((a) => a.align === "right"));
|
|
1238
|
+
return (a, f) => {
|
|
1239
|
+
const s = S("el-button");
|
|
1240
|
+
return n(), y("div", ql, [
|
|
1241
|
+
p("div", Ll, [
|
|
1242
|
+
(n(!0), y(H, null, le(l.value, (r) => (n(), w(s, {
|
|
1243
|
+
key: r.name,
|
|
1244
|
+
type: r.type === "default" ? void 0 : r.type,
|
|
1245
|
+
plain: r.plain,
|
|
1246
|
+
onClick: (i) => v.table && r.execute(v.table)
|
|
1244
1247
|
}, {
|
|
1245
1248
|
default: o(() => [
|
|
1246
|
-
|
|
1249
|
+
r.icon ? (n(), w(Be(r.icon), {
|
|
1247
1250
|
key: 0,
|
|
1248
1251
|
class: "yk-command-bar__icon"
|
|
1249
|
-
})) :
|
|
1250
|
-
F(" " +
|
|
1252
|
+
})) : z("", !0),
|
|
1253
|
+
F(" " + Y(r.desc), 1)
|
|
1251
1254
|
]),
|
|
1252
1255
|
_: 2
|
|
1253
1256
|
}, 1032, ["type", "plain", "onClick"]))), 128)),
|
|
1254
|
-
|
|
1257
|
+
v.table ? (n(), w(Ol, {
|
|
1255
1258
|
key: 0,
|
|
1256
|
-
count:
|
|
1257
|
-
onSelectAll:
|
|
1258
|
-
var
|
|
1259
|
-
return (
|
|
1259
|
+
count: v.table.selectedRows.length,
|
|
1260
|
+
onSelectAll: f[0] || (f[0] = (r) => {
|
|
1261
|
+
var i;
|
|
1262
|
+
return (i = v.table) == null ? void 0 : i.selectAllOnPage();
|
|
1260
1263
|
}),
|
|
1261
|
-
onInvert:
|
|
1262
|
-
var
|
|
1263
|
-
return (
|
|
1264
|
+
onInvert: f[1] || (f[1] = (r) => {
|
|
1265
|
+
var i;
|
|
1266
|
+
return (i = v.table) == null ? void 0 : i.invertSelectionOnPage();
|
|
1264
1267
|
}),
|
|
1265
|
-
onClear:
|
|
1266
|
-
var
|
|
1267
|
-
return (
|
|
1268
|
+
onClear: f[2] || (f[2] = (r) => {
|
|
1269
|
+
var i;
|
|
1270
|
+
return (i = v.table) == null ? void 0 : i.clearSelection();
|
|
1268
1271
|
})
|
|
1269
|
-
}, null, 8, ["count"])) :
|
|
1270
|
-
Z(
|
|
1272
|
+
}, null, 8, ["count"])) : z("", !0),
|
|
1273
|
+
Z(a.$slots, "default", {}, void 0, !0)
|
|
1271
1274
|
]),
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1275
|
+
t.value.length ? (n(), y("div", Ul, [
|
|
1276
|
+
(n(!0), y(H, null, le(t.value, (r) => (n(), w(s, {
|
|
1277
|
+
key: r.name,
|
|
1278
|
+
type: r.type === "default" ? void 0 : r.type,
|
|
1279
|
+
plain: r.plain,
|
|
1280
|
+
onClick: (i) => v.table && r.execute(v.table)
|
|
1281
|
+
}, {
|
|
1282
|
+
default: o(() => [
|
|
1283
|
+
r.icon ? (n(), w(Be(r.icon), {
|
|
1284
|
+
key: 0,
|
|
1285
|
+
class: "yk-command-bar__icon"
|
|
1286
|
+
})) : z("", !0),
|
|
1287
|
+
F(" " + Y(r.desc), 1)
|
|
1288
|
+
]),
|
|
1289
|
+
_: 2
|
|
1290
|
+
}, 1032, ["type", "plain", "onClick"]))), 128))
|
|
1291
|
+
])) : z("", !0)
|
|
1277
1292
|
]);
|
|
1278
1293
|
};
|
|
1279
1294
|
}
|
|
1280
|
-
}),
|
|
1295
|
+
}), wt = /* @__PURE__ */ ie(Kl, [["__scopeId", "data-v-c7eb7da1"]]), jl = {
|
|
1281
1296
|
key: 0,
|
|
1282
1297
|
class: "ys-main-panel__menu-icon"
|
|
1283
|
-
},
|
|
1298
|
+
}, Hl = { class: "ys-main-panel__menu-text" }, Gl = {
|
|
1284
1299
|
key: 0,
|
|
1285
1300
|
class: "ys-main-panel__menu-icon"
|
|
1286
|
-
},
|
|
1301
|
+
}, Wl = { class: "ys-main-panel__menu-text" }, ut = /* @__PURE__ */ ee({
|
|
1287
1302
|
name: "YsMainPanelMenuNode",
|
|
1288
1303
|
__name: "mainPanelMenuNode",
|
|
1289
1304
|
props: {
|
|
1290
1305
|
node: {}
|
|
1291
1306
|
},
|
|
1292
1307
|
setup(e) {
|
|
1293
|
-
return (
|
|
1294
|
-
const t = S("main-panel-menu-node", !0), a = S("el-sub-menu"),
|
|
1295
|
-
return e.node.children && e.node.children.length > 0 ? (n(),
|
|
1308
|
+
return (v, l) => {
|
|
1309
|
+
const t = S("main-panel-menu-node", !0), a = S("el-sub-menu"), f = S("el-menu-item");
|
|
1310
|
+
return e.node.children && e.node.children.length > 0 ? (n(), w(a, {
|
|
1296
1311
|
key: 0,
|
|
1297
1312
|
index: e.node.key
|
|
1298
1313
|
}, {
|
|
1299
1314
|
title: o(() => [
|
|
1300
|
-
e.node.icon ? (n(),
|
|
1301
|
-
|
|
1315
|
+
e.node.icon ? (n(), y("i", jl, Y(e.node.icon), 1)) : z("", !0),
|
|
1316
|
+
p("span", Hl, Y(e.node.label), 1)
|
|
1302
1317
|
]),
|
|
1303
1318
|
default: o(() => [
|
|
1304
|
-
(n(!0),
|
|
1319
|
+
(n(!0), y(H, null, le(e.node.children, (s) => (n(), w(t, {
|
|
1305
1320
|
key: s.key,
|
|
1306
1321
|
node: s
|
|
1307
1322
|
}, null, 8, ["node"]))), 128))
|
|
1308
1323
|
]),
|
|
1309
1324
|
_: 1
|
|
1310
|
-
}, 8, ["index"])) : (n(),
|
|
1325
|
+
}, 8, ["index"])) : (n(), w(f, {
|
|
1311
1326
|
key: 1,
|
|
1312
1327
|
index: e.node.key
|
|
1313
1328
|
}, {
|
|
1314
1329
|
default: o(() => [
|
|
1315
|
-
e.node.icon ? (n(),
|
|
1316
|
-
|
|
1330
|
+
e.node.icon ? (n(), y("i", Gl, Y(e.node.icon), 1)) : z("", !0),
|
|
1331
|
+
p("span", Wl, Y(e.node.label), 1)
|
|
1317
1332
|
]),
|
|
1318
1333
|
_: 1
|
|
1319
1334
|
}, 8, ["index"]));
|
|
1320
1335
|
};
|
|
1321
1336
|
}
|
|
1322
|
-
}),
|
|
1337
|
+
}), Jl = { class: "ys-main-panel" }, Xl = { class: "ys-main-panel__aside-header" }, Zl = ["title"], en = {
|
|
1323
1338
|
key: 0,
|
|
1324
1339
|
class: "ys-main-panel__menu-empty"
|
|
1325
|
-
},
|
|
1340
|
+
}, tn = { class: "ys-main-panel__main" }, ln = {
|
|
1326
1341
|
key: 1,
|
|
1327
1342
|
class: "ys-main-panel__empty"
|
|
1328
|
-
},
|
|
1343
|
+
}, nn = /* @__PURE__ */ ee({
|
|
1329
1344
|
name: "YsMainPanel",
|
|
1330
1345
|
__name: "mainPanel",
|
|
1331
1346
|
props: {
|
|
@@ -1349,150 +1364,150 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1349
1364
|
menuKeyword: { type: String, default: "" }
|
|
1350
1365
|
},
|
|
1351
1366
|
emits: ["update:menuKeyword"],
|
|
1352
|
-
setup(e, { emit:
|
|
1353
|
-
const l = e, t =
|
|
1367
|
+
setup(e, { emit: v }) {
|
|
1368
|
+
const l = e, t = v, a = T(!1), f = T(l.menuKeyword);
|
|
1354
1369
|
de(
|
|
1355
1370
|
() => l.menuKeyword,
|
|
1356
|
-
(
|
|
1357
|
-
|
|
1371
|
+
(u) => {
|
|
1372
|
+
f.value = u;
|
|
1358
1373
|
}
|
|
1359
1374
|
);
|
|
1360
|
-
const s =
|
|
1361
|
-
get: () =>
|
|
1362
|
-
set: (
|
|
1363
|
-
|
|
1375
|
+
const s = N({
|
|
1376
|
+
get: () => f.value,
|
|
1377
|
+
set: (u) => {
|
|
1378
|
+
f.value = u, t("update:menuKeyword", u);
|
|
1364
1379
|
}
|
|
1365
|
-
}),
|
|
1366
|
-
function X(
|
|
1367
|
-
const
|
|
1368
|
-
|
|
1380
|
+
}), r = N(() => s.value.trim().length > 0), i = N(() => Nt(V.value, s.value)), x = N(() => Ot(i.value)), { nodes: V, menuLoading: D, loadNodes: j } = qt(l), { openTabs: B, activeKey: h, openTab: b, removeTab: L, getComponent: q } = Lt(l);
|
|
1381
|
+
function X(u) {
|
|
1382
|
+
const g = st(V.value, u);
|
|
1383
|
+
g && !it(g) && b(g);
|
|
1369
1384
|
}
|
|
1370
1385
|
let U = !1;
|
|
1371
1386
|
return $e(async () => {
|
|
1372
1387
|
if (await j(), !U && l.defaultActive) {
|
|
1373
|
-
const
|
|
1374
|
-
|
|
1388
|
+
const u = st(V.value, l.defaultActive);
|
|
1389
|
+
u && !it(u) && b(u), U = !0;
|
|
1375
1390
|
}
|
|
1376
|
-
}), (
|
|
1377
|
-
const M = S("el-input"),
|
|
1378
|
-
return n(),
|
|
1379
|
-
|
|
1391
|
+
}), (u, g) => {
|
|
1392
|
+
const M = S("el-input"), Q = S("el-menu"), O = S("el-tab-pane"), re = S("el-tabs"), ae = S("el-empty"), W = pt("loading");
|
|
1393
|
+
return n(), y("div", Jl, [
|
|
1394
|
+
p("aside", {
|
|
1380
1395
|
class: Ce(["ys-main-panel__aside", { "is-collapsed": a.value }])
|
|
1381
1396
|
}, [
|
|
1382
|
-
|
|
1383
|
-
|
|
1397
|
+
p("div", Xl, [
|
|
1398
|
+
p("button", {
|
|
1384
1399
|
class: "ys-main-panel__collapse-btn",
|
|
1385
1400
|
type: "button",
|
|
1386
1401
|
title: a.value ? "展开菜单" : "折叠菜单",
|
|
1387
|
-
onClick:
|
|
1388
|
-
}, "☰", 8,
|
|
1389
|
-
l.showMenuSearch && !a.value ? (n(),
|
|
1402
|
+
onClick: g[0] || (g[0] = (C) => a.value = !a.value)
|
|
1403
|
+
}, "☰", 8, Zl),
|
|
1404
|
+
l.showMenuSearch && !a.value ? (n(), w(M, {
|
|
1390
1405
|
key: 0,
|
|
1391
1406
|
modelValue: s.value,
|
|
1392
|
-
"onUpdate:modelValue":
|
|
1407
|
+
"onUpdate:modelValue": g[1] || (g[1] = (C) => s.value = C),
|
|
1393
1408
|
class: "ys-main-panel__aside-search",
|
|
1394
1409
|
size: "small",
|
|
1395
1410
|
clearable: "",
|
|
1396
1411
|
placeholder: "搜索功能",
|
|
1397
1412
|
"aria-label": "搜索功能"
|
|
1398
1413
|
}, {
|
|
1399
|
-
prefix: o(() => [...
|
|
1400
|
-
|
|
1414
|
+
prefix: o(() => [...g[3] || (g[3] = [
|
|
1415
|
+
p("svg", {
|
|
1401
1416
|
class: "ys-main-panel__search-icon",
|
|
1402
1417
|
viewBox: "0 0 1024 1024",
|
|
1403
1418
|
width: "14",
|
|
1404
1419
|
height: "14",
|
|
1405
1420
|
"aria-hidden": "true"
|
|
1406
1421
|
}, [
|
|
1407
|
-
|
|
1422
|
+
p("path", {
|
|
1408
1423
|
fill: "currentColor",
|
|
1409
1424
|
d: "M909.098 839.904l-181.22-181.248a341.5 341.5 0 1 0-47.734 48.58l180.56 180.588a33.92 0 0 0 48.394-47.92zM454.4 745.6a291.2 291.2 0 1 1 291.2-291.2 291.2 291.2 0 0 1-291.2 291.2z"
|
|
1410
1425
|
})
|
|
1411
1426
|
], -1)
|
|
1412
1427
|
])]),
|
|
1413
1428
|
_: 1
|
|
1414
|
-
}, 8, ["modelValue"])) :
|
|
1429
|
+
}, 8, ["modelValue"])) : z("", !0)
|
|
1415
1430
|
]),
|
|
1416
|
-
|
|
1431
|
+
r.value ? Ze((n(), w(Q, {
|
|
1417
1432
|
key: "search-" + s.value,
|
|
1418
|
-
"default-active":
|
|
1419
|
-
"default-openeds":
|
|
1433
|
+
"default-active": c(h),
|
|
1434
|
+
"default-openeds": x.value,
|
|
1420
1435
|
collapse: a.value,
|
|
1421
1436
|
class: "ys-main-panel__menu",
|
|
1422
1437
|
"element-loading-background": "transparent",
|
|
1423
1438
|
onSelect: X
|
|
1424
1439
|
}, {
|
|
1425
1440
|
default: o(() => [
|
|
1426
|
-
(n(!0),
|
|
1427
|
-
key:
|
|
1428
|
-
node:
|
|
1441
|
+
(n(!0), y(H, null, le(i.value, (C) => (n(), w(ut, {
|
|
1442
|
+
key: C.key,
|
|
1443
|
+
node: C
|
|
1429
1444
|
}, null, 8, ["node"]))), 128)),
|
|
1430
|
-
i.value.length === 0 && !
|
|
1445
|
+
i.value.length === 0 && !c(D) ? (n(), y("div", en, " 未找到匹配的功能 ")) : z("", !0)
|
|
1431
1446
|
]),
|
|
1432
1447
|
_: 1
|
|
1433
1448
|
}, 8, ["default-active", "default-openeds", "collapse"])), [
|
|
1434
|
-
[W,
|
|
1435
|
-
]) : Ze((n(),
|
|
1449
|
+
[W, c(D)]
|
|
1450
|
+
]) : Ze((n(), w(Q, {
|
|
1436
1451
|
key: 1,
|
|
1437
|
-
"default-active":
|
|
1452
|
+
"default-active": c(h),
|
|
1438
1453
|
collapse: a.value,
|
|
1439
1454
|
class: "ys-main-panel__menu",
|
|
1440
1455
|
"element-loading-background": "transparent",
|
|
1441
1456
|
onSelect: X
|
|
1442
1457
|
}, {
|
|
1443
1458
|
default: o(() => [
|
|
1444
|
-
(n(!0),
|
|
1445
|
-
key:
|
|
1446
|
-
node:
|
|
1459
|
+
(n(!0), y(H, null, le(c(V), (C) => (n(), w(ut, {
|
|
1460
|
+
key: C.key,
|
|
1461
|
+
node: C
|
|
1447
1462
|
}, null, 8, ["node"]))), 128))
|
|
1448
1463
|
]),
|
|
1449
1464
|
_: 1
|
|
1450
1465
|
}, 8, ["default-active", "collapse"])), [
|
|
1451
|
-
[W,
|
|
1466
|
+
[W, c(D)]
|
|
1452
1467
|
])
|
|
1453
1468
|
], 2),
|
|
1454
|
-
|
|
1455
|
-
|
|
1469
|
+
p("main", tn, [
|
|
1470
|
+
c(B).length > 0 ? (n(), w(re, {
|
|
1456
1471
|
key: 0,
|
|
1457
|
-
modelValue:
|
|
1458
|
-
"onUpdate:modelValue":
|
|
1472
|
+
modelValue: c(h),
|
|
1473
|
+
"onUpdate:modelValue": g[2] || (g[2] = (C) => Se(h) ? h.value = C : null),
|
|
1459
1474
|
type: "card",
|
|
1460
1475
|
closable: "",
|
|
1461
1476
|
class: "ys-main-panel__tabs",
|
|
1462
|
-
onTabRemove:
|
|
1477
|
+
onTabRemove: c(L)
|
|
1463
1478
|
}, {
|
|
1464
1479
|
default: o(() => [
|
|
1465
|
-
(n(!0),
|
|
1466
|
-
key:
|
|
1467
|
-
name:
|
|
1480
|
+
(n(!0), y(H, null, le(c(B), (C) => (n(), w(O, {
|
|
1481
|
+
key: C.key,
|
|
1482
|
+
name: C.key
|
|
1468
1483
|
}, {
|
|
1469
1484
|
label: o(() => [
|
|
1470
|
-
F(
|
|
1485
|
+
F(Y(C.label), 1)
|
|
1471
1486
|
]),
|
|
1472
1487
|
default: o(() => [
|
|
1473
|
-
|
|
1488
|
+
C.componentPath ? (n(), w(Be(c(q)(C.componentPath)), et({
|
|
1474
1489
|
key: 0,
|
|
1475
1490
|
ref_for: !0
|
|
1476
|
-
},
|
|
1491
|
+
}, C.props), null, 16)) : z("", !0)
|
|
1477
1492
|
]),
|
|
1478
1493
|
_: 2
|
|
1479
1494
|
}, 1032, ["name"]))), 128))
|
|
1480
1495
|
]),
|
|
1481
1496
|
_: 1
|
|
1482
|
-
}, 8, ["modelValue", "onTabRemove"])) : (n(),
|
|
1483
|
-
|
|
1497
|
+
}, 8, ["modelValue", "onTabRemove"])) : (n(), y("div", ln, [
|
|
1498
|
+
m(ae, { description: "暂无打开的功能,从左侧菜单选择" })
|
|
1484
1499
|
]))
|
|
1485
1500
|
])
|
|
1486
1501
|
]);
|
|
1487
1502
|
};
|
|
1488
1503
|
}
|
|
1489
|
-
}),
|
|
1504
|
+
}), on = /* @__PURE__ */ ie(nn, [["__scopeId", "data-v-c36933e0"]]), an = {
|
|
1490
1505
|
key: 2,
|
|
1491
1506
|
class: "yk-advanced-value-editor yk-advanced-value-editor--range"
|
|
1492
|
-
},
|
|
1507
|
+
}, sn = {
|
|
1493
1508
|
key: 4,
|
|
1494
1509
|
class: "yk-advanced-value-editor yk-advanced-value-editor--daterange"
|
|
1495
|
-
},
|
|
1510
|
+
}, rn = { class: "yk-advanced-value-editor__recent-pop" }, un = /* @__PURE__ */ ee({
|
|
1496
1511
|
name: "YsAdvancedValueEditor",
|
|
1497
1512
|
__name: "advancedValueEditor",
|
|
1498
1513
|
props: {
|
|
@@ -1514,64 +1529,64 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1514
1529
|
valueFormat: { type: String, default: "YYYY-MM-DD" }
|
|
1515
1530
|
},
|
|
1516
1531
|
emits: ["update:modelValue"],
|
|
1517
|
-
setup(e, { emit:
|
|
1518
|
-
const l = e, t =
|
|
1532
|
+
setup(e, { emit: v }) {
|
|
1533
|
+
const l = e, t = v, a = N(() => l.op === "between" || l.op === "not_between"), f = N(() => l.op === "in" || l.op === "not_in"), s = N({
|
|
1519
1534
|
get: () => typeof l.modelValue == "string" ? l.modelValue : "",
|
|
1520
|
-
set: (
|
|
1521
|
-
}),
|
|
1535
|
+
set: (u) => t("update:modelValue", u)
|
|
1536
|
+
}), r = N({
|
|
1522
1537
|
get: () => typeof l.modelValue == "number" ? l.modelValue : void 0,
|
|
1523
|
-
set: (
|
|
1524
|
-
}), i =
|
|
1538
|
+
set: (u) => t("update:modelValue", u ?? null)
|
|
1539
|
+
}), i = N({
|
|
1525
1540
|
get: () => typeof l.modelValue == "string" ? l.modelValue : null,
|
|
1526
|
-
set: (
|
|
1527
|
-
}),
|
|
1541
|
+
set: (u) => t("update:modelValue", u)
|
|
1542
|
+
}), x = N({
|
|
1528
1543
|
get: () => typeof l.modelValue == "boolean" ? l.modelValue : void 0,
|
|
1529
|
-
set: (
|
|
1530
|
-
}), V =
|
|
1544
|
+
set: (u) => t("update:modelValue", u ?? null)
|
|
1545
|
+
}), V = N({
|
|
1531
1546
|
get: () => {
|
|
1532
|
-
const
|
|
1533
|
-
if (typeof
|
|
1547
|
+
const u = l.modelValue;
|
|
1548
|
+
if (typeof u == "string" || typeof u == "number" || typeof u == "boolean") return u;
|
|
1534
1549
|
},
|
|
1535
|
-
set: (
|
|
1536
|
-
}),
|
|
1550
|
+
set: (u) => t("update:modelValue", u ?? null)
|
|
1551
|
+
}), D = N({
|
|
1537
1552
|
get: () => Array.isArray(l.modelValue) ? l.modelValue : [],
|
|
1538
|
-
set: (
|
|
1539
|
-
}), j =
|
|
1553
|
+
set: (u) => t("update:modelValue", u)
|
|
1554
|
+
}), j = N({
|
|
1540
1555
|
get: () => {
|
|
1541
1556
|
if (!Array.isArray(l.modelValue) || l.modelValue.length !== 2) return null;
|
|
1542
|
-
const
|
|
1543
|
-
return typeof
|
|
1557
|
+
const u = l.modelValue[0], g = l.modelValue[1];
|
|
1558
|
+
return typeof u == "string" && typeof g == "string" ? [u, g] : null;
|
|
1544
1559
|
},
|
|
1545
|
-
set: (
|
|
1546
|
-
}),
|
|
1560
|
+
set: (u) => t("update:modelValue", u)
|
|
1561
|
+
}), B = N({
|
|
1547
1562
|
get: () => {
|
|
1548
1563
|
if (Array.isArray(l.modelValue)) {
|
|
1549
|
-
const
|
|
1550
|
-
return typeof
|
|
1564
|
+
const u = l.modelValue[0];
|
|
1565
|
+
return typeof u == "number" ? u : void 0;
|
|
1551
1566
|
}
|
|
1552
1567
|
},
|
|
1553
|
-
set: (
|
|
1554
|
-
const
|
|
1555
|
-
t("update:modelValue", [
|
|
1568
|
+
set: (u) => {
|
|
1569
|
+
const g = Array.isArray(l.modelValue) && typeof l.modelValue[1] == "number" ? l.modelValue[1] : null;
|
|
1570
|
+
t("update:modelValue", [u ?? null, g]);
|
|
1556
1571
|
}
|
|
1557
|
-
}), h =
|
|
1572
|
+
}), h = N({
|
|
1558
1573
|
get: () => {
|
|
1559
1574
|
if (Array.isArray(l.modelValue)) {
|
|
1560
|
-
const
|
|
1561
|
-
return typeof
|
|
1575
|
+
const u = l.modelValue[1];
|
|
1576
|
+
return typeof u == "number" ? u : void 0;
|
|
1562
1577
|
}
|
|
1563
1578
|
},
|
|
1564
|
-
set: (
|
|
1565
|
-
const
|
|
1566
|
-
t("update:modelValue", [
|
|
1579
|
+
set: (u) => {
|
|
1580
|
+
const g = Array.isArray(l.modelValue) && typeof l.modelValue[0] == "number" ? l.modelValue[0] : null;
|
|
1581
|
+
t("update:modelValue", [g, u ?? null]);
|
|
1567
1582
|
}
|
|
1568
|
-
}),
|
|
1583
|
+
}), b = [
|
|
1569
1584
|
{ label: "是", value: !0 },
|
|
1570
1585
|
{ label: "否", value: !1 }
|
|
1571
1586
|
];
|
|
1572
|
-
function L(
|
|
1573
|
-
const
|
|
1574
|
-
return M.setDate(M.getDate() -
|
|
1587
|
+
function L(u) {
|
|
1588
|
+
const g = /* @__PURE__ */ new Date(), M = /* @__PURE__ */ new Date();
|
|
1589
|
+
return M.setDate(M.getDate() - u), [M, g];
|
|
1575
1590
|
}
|
|
1576
1591
|
const q = [
|
|
1577
1592
|
{ text: "最近 7 天", value: () => L(7) },
|
|
@@ -1579,20 +1594,20 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1579
1594
|
{ text: "最近 90 天", value: () => L(90) }
|
|
1580
1595
|
], X = T(7);
|
|
1581
1596
|
function U() {
|
|
1582
|
-
const
|
|
1583
|
-
if (!
|
|
1584
|
-
const [
|
|
1597
|
+
const u = X.value;
|
|
1598
|
+
if (!u || u < 1) return;
|
|
1599
|
+
const [g, M] = L(u);
|
|
1585
1600
|
j.value = [
|
|
1586
|
-
rt(
|
|
1601
|
+
rt(g).format(l.valueFormat),
|
|
1587
1602
|
rt(M).format(l.valueFormat)
|
|
1588
1603
|
];
|
|
1589
1604
|
}
|
|
1590
|
-
return (
|
|
1591
|
-
const M = S("el-select"),
|
|
1592
|
-
return e.fieldType === "string" &&
|
|
1605
|
+
return (u, g) => {
|
|
1606
|
+
const M = S("el-select"), Q = S("el-input"), O = S("el-input-number"), re = S("el-date-picker"), ae = S("el-button"), W = S("el-popover"), C = S("el-option");
|
|
1607
|
+
return e.fieldType === "string" && f.value ? (n(), w(M, {
|
|
1593
1608
|
key: 0,
|
|
1594
|
-
modelValue:
|
|
1595
|
-
"onUpdate:modelValue":
|
|
1609
|
+
modelValue: D.value,
|
|
1610
|
+
"onUpdate:modelValue": g[0] || (g[0] = (k) => D.value = k),
|
|
1596
1611
|
class: "yk-advanced-value-editor",
|
|
1597
1612
|
multiple: "",
|
|
1598
1613
|
filterable: "",
|
|
@@ -1600,39 +1615,39 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1600
1615
|
"default-first-option": "",
|
|
1601
1616
|
"reserve-keyword": !1,
|
|
1602
1617
|
placeholder: "输入后回车添加"
|
|
1603
|
-
}, null, 8, ["modelValue"])) : e.fieldType === "string" ? (n(),
|
|
1618
|
+
}, null, 8, ["modelValue"])) : e.fieldType === "string" ? (n(), w(Q, {
|
|
1604
1619
|
key: 1,
|
|
1605
1620
|
modelValue: s.value,
|
|
1606
|
-
"onUpdate:modelValue":
|
|
1621
|
+
"onUpdate:modelValue": g[1] || (g[1] = (k) => s.value = k),
|
|
1607
1622
|
placeholder: "请输入",
|
|
1608
1623
|
clearable: ""
|
|
1609
|
-
}, null, 8, ["modelValue"])) : e.fieldType === "number" && a.value ? (n(),
|
|
1610
|
-
|
|
1611
|
-
modelValue:
|
|
1612
|
-
"onUpdate:modelValue":
|
|
1624
|
+
}, null, 8, ["modelValue"])) : e.fieldType === "number" && a.value ? (n(), y("div", an, [
|
|
1625
|
+
m(O, {
|
|
1626
|
+
modelValue: B.value,
|
|
1627
|
+
"onUpdate:modelValue": g[2] || (g[2] = (k) => B.value = k),
|
|
1613
1628
|
placeholder: "最小值",
|
|
1614
1629
|
controls: !1,
|
|
1615
1630
|
class: "yk-advanced-value-editor__num"
|
|
1616
1631
|
}, null, 8, ["modelValue"]),
|
|
1617
|
-
|
|
1618
|
-
|
|
1632
|
+
g[11] || (g[11] = p("span", { class: "yk-advanced-value-editor__sep" }, "~", -1)),
|
|
1633
|
+
m(O, {
|
|
1619
1634
|
modelValue: h.value,
|
|
1620
|
-
"onUpdate:modelValue":
|
|
1635
|
+
"onUpdate:modelValue": g[3] || (g[3] = (k) => h.value = k),
|
|
1621
1636
|
placeholder: "最大值",
|
|
1622
1637
|
controls: !1,
|
|
1623
1638
|
class: "yk-advanced-value-editor__num"
|
|
1624
1639
|
}, null, 8, ["modelValue"])
|
|
1625
|
-
])) : e.fieldType === "number" ? (n(),
|
|
1640
|
+
])) : e.fieldType === "number" ? (n(), w(O, {
|
|
1626
1641
|
key: 3,
|
|
1627
|
-
modelValue:
|
|
1628
|
-
"onUpdate:modelValue":
|
|
1642
|
+
modelValue: r.value,
|
|
1643
|
+
"onUpdate:modelValue": g[4] || (g[4] = (k) => r.value = k),
|
|
1629
1644
|
placeholder: "请输入数字",
|
|
1630
1645
|
controls: !1,
|
|
1631
1646
|
class: "yk-advanced-value-editor"
|
|
1632
|
-
}, null, 8, ["modelValue"])) : e.fieldType === "date" && a.value ? (n(),
|
|
1633
|
-
|
|
1647
|
+
}, null, 8, ["modelValue"])) : e.fieldType === "date" && a.value ? (n(), y("div", sn, [
|
|
1648
|
+
m(re, {
|
|
1634
1649
|
modelValue: j.value,
|
|
1635
|
-
"onUpdate:modelValue":
|
|
1650
|
+
"onUpdate:modelValue": g[5] || (g[5] = (k) => j.value = k),
|
|
1636
1651
|
type: "daterange",
|
|
1637
1652
|
"value-format": e.valueFormat,
|
|
1638
1653
|
"start-placeholder": "开始日期",
|
|
@@ -1640,36 +1655,36 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1640
1655
|
shortcuts: q,
|
|
1641
1656
|
class: "yk-advanced-value-editor__daterange-picker"
|
|
1642
1657
|
}, null, 8, ["modelValue", "value-format"]),
|
|
1643
|
-
|
|
1658
|
+
m(W, {
|
|
1644
1659
|
trigger: "click",
|
|
1645
1660
|
placement: "bottom",
|
|
1646
1661
|
width: 240
|
|
1647
1662
|
}, {
|
|
1648
1663
|
reference: o(() => [
|
|
1649
|
-
|
|
1650
|
-
default: o(() => [...
|
|
1664
|
+
m(ae, { class: "yk-advanced-value-editor__recent-trigger" }, {
|
|
1665
|
+
default: o(() => [...g[12] || (g[12] = [
|
|
1651
1666
|
F("最近 N 天", -1)
|
|
1652
1667
|
])]),
|
|
1653
1668
|
_: 1
|
|
1654
1669
|
})
|
|
1655
1670
|
]),
|
|
1656
1671
|
default: o(() => [
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1672
|
+
p("div", rn, [
|
|
1673
|
+
g[14] || (g[14] = p("span", null, "最近", -1)),
|
|
1674
|
+
m(O, {
|
|
1660
1675
|
modelValue: X.value,
|
|
1661
|
-
"onUpdate:modelValue":
|
|
1676
|
+
"onUpdate:modelValue": g[6] || (g[6] = (k) => X.value = k),
|
|
1662
1677
|
min: 1,
|
|
1663
1678
|
controls: !1,
|
|
1664
1679
|
class: "yk-advanced-value-editor__recent-input"
|
|
1665
1680
|
}, null, 8, ["modelValue"]),
|
|
1666
|
-
|
|
1667
|
-
|
|
1681
|
+
g[15] || (g[15] = p("span", null, "天", -1)),
|
|
1682
|
+
m(ae, {
|
|
1668
1683
|
type: "primary",
|
|
1669
1684
|
size: "small",
|
|
1670
1685
|
onClick: U
|
|
1671
1686
|
}, {
|
|
1672
|
-
default: o(() => [...
|
|
1687
|
+
default: o(() => [...g[13] || (g[13] = [
|
|
1673
1688
|
F("应用", -1)
|
|
1674
1689
|
])]),
|
|
1675
1690
|
_: 1
|
|
@@ -1678,75 +1693,75 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1678
1693
|
]),
|
|
1679
1694
|
_: 1
|
|
1680
1695
|
})
|
|
1681
|
-
])) : e.fieldType === "date" ? (n(),
|
|
1696
|
+
])) : e.fieldType === "date" ? (n(), w(re, {
|
|
1682
1697
|
key: 5,
|
|
1683
1698
|
modelValue: i.value,
|
|
1684
|
-
"onUpdate:modelValue":
|
|
1699
|
+
"onUpdate:modelValue": g[7] || (g[7] = (k) => i.value = k),
|
|
1685
1700
|
type: "date",
|
|
1686
1701
|
"value-format": e.valueFormat,
|
|
1687
1702
|
placeholder: "选择日期",
|
|
1688
1703
|
clearable: ""
|
|
1689
|
-
}, null, 8, ["modelValue", "value-format"])) : e.fieldType === "boolean" ? (n(),
|
|
1704
|
+
}, null, 8, ["modelValue", "value-format"])) : e.fieldType === "boolean" ? (n(), w(M, {
|
|
1690
1705
|
key: 6,
|
|
1691
|
-
modelValue:
|
|
1692
|
-
"onUpdate:modelValue":
|
|
1706
|
+
modelValue: x.value,
|
|
1707
|
+
"onUpdate:modelValue": g[8] || (g[8] = (k) => x.value = k),
|
|
1693
1708
|
placeholder: "请选择",
|
|
1694
1709
|
clearable: ""
|
|
1695
1710
|
}, {
|
|
1696
1711
|
default: o(() => [
|
|
1697
|
-
(n(),
|
|
1698
|
-
key: String(
|
|
1699
|
-
label:
|
|
1700
|
-
value:
|
|
1712
|
+
(n(), y(H, null, le(b, (k) => m(C, {
|
|
1713
|
+
key: String(k.value),
|
|
1714
|
+
label: k.label,
|
|
1715
|
+
value: k.value
|
|
1701
1716
|
}, null, 8, ["label", "value"])), 64))
|
|
1702
1717
|
]),
|
|
1703
1718
|
_: 1
|
|
1704
|
-
}, 8, ["modelValue"])) : e.fieldType === "enum" &&
|
|
1719
|
+
}, 8, ["modelValue"])) : e.fieldType === "enum" && f.value ? (n(), w(M, {
|
|
1705
1720
|
key: 7,
|
|
1706
|
-
modelValue:
|
|
1707
|
-
"onUpdate:modelValue":
|
|
1721
|
+
modelValue: D.value,
|
|
1722
|
+
"onUpdate:modelValue": g[9] || (g[9] = (k) => D.value = k),
|
|
1708
1723
|
multiple: "",
|
|
1709
1724
|
loading: e.optionsLoading,
|
|
1710
1725
|
placeholder: "请选择",
|
|
1711
1726
|
clearable: ""
|
|
1712
1727
|
}, {
|
|
1713
1728
|
default: o(() => [
|
|
1714
|
-
(n(!0),
|
|
1715
|
-
key: String(
|
|
1716
|
-
label:
|
|
1717
|
-
value:
|
|
1729
|
+
(n(!0), y(H, null, le(e.options, (k) => (n(), w(C, {
|
|
1730
|
+
key: String(k.value),
|
|
1731
|
+
label: k.label,
|
|
1732
|
+
value: k.value
|
|
1718
1733
|
}, null, 8, ["label", "value"]))), 128))
|
|
1719
1734
|
]),
|
|
1720
1735
|
_: 1
|
|
1721
|
-
}, 8, ["modelValue", "loading"])) : e.fieldType === "enum" ? (n(),
|
|
1736
|
+
}, 8, ["modelValue", "loading"])) : e.fieldType === "enum" ? (n(), w(M, {
|
|
1722
1737
|
key: 8,
|
|
1723
1738
|
modelValue: V.value,
|
|
1724
|
-
"onUpdate:modelValue":
|
|
1739
|
+
"onUpdate:modelValue": g[10] || (g[10] = (k) => V.value = k),
|
|
1725
1740
|
loading: e.optionsLoading,
|
|
1726
1741
|
placeholder: "请选择",
|
|
1727
1742
|
clearable: ""
|
|
1728
1743
|
}, {
|
|
1729
1744
|
default: o(() => [
|
|
1730
|
-
(n(!0),
|
|
1731
|
-
key: String(
|
|
1732
|
-
label:
|
|
1733
|
-
value:
|
|
1745
|
+
(n(!0), y(H, null, le(e.options, (k) => (n(), w(C, {
|
|
1746
|
+
key: String(k.value),
|
|
1747
|
+
label: k.label,
|
|
1748
|
+
value: k.value
|
|
1734
1749
|
}, null, 8, ["label", "value"]))), 128))
|
|
1735
1750
|
]),
|
|
1736
1751
|
_: 1
|
|
1737
|
-
}, 8, ["modelValue", "loading"])) :
|
|
1752
|
+
}, 8, ["modelValue", "loading"])) : z("", !0);
|
|
1738
1753
|
};
|
|
1739
1754
|
}
|
|
1740
|
-
}), Ct = /* @__PURE__ */ ie(
|
|
1755
|
+
}), Ct = /* @__PURE__ */ ie(un, [["__scopeId", "data-v-dda18bcf"]]), St = Symbol("YsAdvancedFilter"), dn = { class: "yk-adv-group__header" }, cn = { class: "yk-adv-group__actions" }, pn = { class: "yk-adv-group__children" }, mn = {
|
|
1741
1756
|
key: 0,
|
|
1742
1757
|
class: "yk-adv-group__nested"
|
|
1743
|
-
},
|
|
1758
|
+
}, fn = {
|
|
1744
1759
|
key: 1,
|
|
1745
1760
|
class: "yk-adv-group__row"
|
|
1746
|
-
},
|
|
1761
|
+
}, vn = {
|
|
1747
1762
|
key: 0,
|
|
1748
1763
|
class: "yk-adv-group__empty"
|
|
1749
|
-
},
|
|
1764
|
+
}, yn = /* @__PURE__ */ ee({
|
|
1750
1765
|
name: "YsAdvancedConditionGroup",
|
|
1751
1766
|
__name: "advancedConditionGroup",
|
|
1752
1767
|
props: {
|
|
@@ -1756,60 +1771,60 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1756
1771
|
level: { type: Number, default: 0 }
|
|
1757
1772
|
},
|
|
1758
1773
|
setup(e) {
|
|
1759
|
-
const
|
|
1774
|
+
const v = e, l = mt(St);
|
|
1760
1775
|
function t(h) {
|
|
1761
|
-
(h === "and" || h === "or") && l.api.setGroupCombinator(
|
|
1776
|
+
(h === "and" || h === "or") && l.api.setGroupCombinator(v.group.id, h);
|
|
1762
1777
|
}
|
|
1763
1778
|
function a() {
|
|
1764
|
-
l.api.addLeaf(
|
|
1779
|
+
l.api.addLeaf(v.group.id);
|
|
1765
1780
|
}
|
|
1766
|
-
function
|
|
1767
|
-
l.api.addNestedGroup(
|
|
1781
|
+
function f() {
|
|
1782
|
+
l.api.addNestedGroup(v.group.id);
|
|
1768
1783
|
}
|
|
1769
1784
|
function s() {
|
|
1770
|
-
l.api.removeNode(
|
|
1785
|
+
l.api.removeNode(v.group.id);
|
|
1771
1786
|
}
|
|
1772
|
-
function
|
|
1773
|
-
typeof
|
|
1787
|
+
function r(h, b) {
|
|
1788
|
+
typeof b == "string" && l.api.changeField(h.id, b);
|
|
1774
1789
|
}
|
|
1775
|
-
function i(h,
|
|
1776
|
-
l.api.changeOperator(h.id,
|
|
1790
|
+
function i(h, b) {
|
|
1791
|
+
l.api.changeOperator(h.id, b);
|
|
1777
1792
|
}
|
|
1778
|
-
function
|
|
1793
|
+
function x(h) {
|
|
1779
1794
|
l.api.removeNode(h);
|
|
1780
1795
|
}
|
|
1781
1796
|
const V = lt;
|
|
1782
|
-
function
|
|
1797
|
+
function D(h) {
|
|
1783
1798
|
return h;
|
|
1784
1799
|
}
|
|
1785
1800
|
function j(h) {
|
|
1786
|
-
return l.columns.find((
|
|
1801
|
+
return l.columns.find((b) => b.propertyPath === h);
|
|
1787
1802
|
}
|
|
1788
|
-
function
|
|
1789
|
-
var
|
|
1790
|
-
return ((
|
|
1803
|
+
function B(h) {
|
|
1804
|
+
var b;
|
|
1805
|
+
return ((b = j(h)) == null ? void 0 : b.displayFormat) ?? "YYYY-MM-DD";
|
|
1791
1806
|
}
|
|
1792
|
-
return (h,
|
|
1793
|
-
const L = S("el-radio-button"), q = S("el-radio-group"), X = S("el-button"), U = S("YsAdvancedConditionGroup"),
|
|
1794
|
-
return n(),
|
|
1807
|
+
return (h, b) => {
|
|
1808
|
+
const L = S("el-radio-button"), q = S("el-radio-group"), X = S("el-button"), U = S("YsAdvancedConditionGroup"), u = S("el-option"), g = S("el-select");
|
|
1809
|
+
return n(), y("div", {
|
|
1795
1810
|
class: Ce(["yk-adv-group", [`level-${e.level}`, { "is-root": e.level === 0 }]])
|
|
1796
1811
|
}, [
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1812
|
+
p("div", dn, [
|
|
1813
|
+
b[5] || (b[5] = p("span", { class: "yk-adv-group__comb-label" }, "满足", -1)),
|
|
1814
|
+
m(q, {
|
|
1800
1815
|
"model-value": e.group.combinator,
|
|
1801
1816
|
size: "small",
|
|
1802
1817
|
"onUpdate:modelValue": t
|
|
1803
1818
|
}, {
|
|
1804
1819
|
default: o(() => [
|
|
1805
|
-
|
|
1806
|
-
default: o(() => [...
|
|
1820
|
+
m(L, { value: "and" }, {
|
|
1821
|
+
default: o(() => [...b[0] || (b[0] = [
|
|
1807
1822
|
F("全部", -1)
|
|
1808
1823
|
])]),
|
|
1809
1824
|
_: 1
|
|
1810
1825
|
}),
|
|
1811
|
-
|
|
1812
|
-
default: o(() => [...
|
|
1826
|
+
m(L, { value: "or" }, {
|
|
1827
|
+
default: o(() => [...b[1] || (b[1] = [
|
|
1813
1828
|
F("任一", -1)
|
|
1814
1829
|
])]),
|
|
1815
1830
|
_: 1
|
|
@@ -1817,119 +1832,119 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1817
1832
|
]),
|
|
1818
1833
|
_: 1
|
|
1819
1834
|
}, 8, ["model-value"]),
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1835
|
+
b[6] || (b[6] = p("span", { class: "yk-adv-group__comb-label" }, "条件", -1)),
|
|
1836
|
+
p("span", cn, [
|
|
1837
|
+
m(X, {
|
|
1823
1838
|
link: "",
|
|
1824
1839
|
type: "primary",
|
|
1825
1840
|
onClick: a
|
|
1826
1841
|
}, {
|
|
1827
|
-
default: o(() => [...
|
|
1842
|
+
default: o(() => [...b[2] || (b[2] = [
|
|
1828
1843
|
F("+ 条件", -1)
|
|
1829
1844
|
])]),
|
|
1830
1845
|
_: 1
|
|
1831
1846
|
}),
|
|
1832
|
-
|
|
1847
|
+
m(X, {
|
|
1833
1848
|
link: "",
|
|
1834
1849
|
type: "primary",
|
|
1835
|
-
onClick:
|
|
1850
|
+
onClick: f
|
|
1836
1851
|
}, {
|
|
1837
|
-
default: o(() => [...
|
|
1852
|
+
default: o(() => [...b[3] || (b[3] = [
|
|
1838
1853
|
F(" + 嵌套组 ", -1)
|
|
1839
1854
|
])]),
|
|
1840
1855
|
_: 1
|
|
1841
1856
|
}),
|
|
1842
|
-
e.level > 0 ? (n(),
|
|
1857
|
+
e.level > 0 ? (n(), w(X, {
|
|
1843
1858
|
key: 0,
|
|
1844
1859
|
link: "",
|
|
1845
1860
|
type: "danger",
|
|
1846
1861
|
onClick: s
|
|
1847
1862
|
}, {
|
|
1848
|
-
default: o(() => [...
|
|
1863
|
+
default: o(() => [...b[4] || (b[4] = [
|
|
1849
1864
|
F(" 删除组 ", -1)
|
|
1850
1865
|
])]),
|
|
1851
1866
|
_: 1
|
|
1852
|
-
})) :
|
|
1867
|
+
})) : z("", !0)
|
|
1853
1868
|
])
|
|
1854
1869
|
]),
|
|
1855
|
-
|
|
1856
|
-
(n(!0),
|
|
1870
|
+
p("div", pn, [
|
|
1871
|
+
(n(!0), y(H, null, le(e.group.children, (M) => (n(), y(H, {
|
|
1857
1872
|
key: M.id
|
|
1858
1873
|
}, [
|
|
1859
|
-
|
|
1860
|
-
|
|
1874
|
+
c(V)(M) ? (n(), y("div", mn, [
|
|
1875
|
+
m(U, {
|
|
1861
1876
|
group: M,
|
|
1862
1877
|
level: e.level + 1
|
|
1863
1878
|
}, null, 8, ["group", "level"])
|
|
1864
|
-
])) : (n(),
|
|
1865
|
-
|
|
1879
|
+
])) : (n(), y("div", fn, [
|
|
1880
|
+
m(g, {
|
|
1866
1881
|
"model-value": M.propertyPath,
|
|
1867
1882
|
class: "yk-adv-group__field",
|
|
1868
1883
|
placeholder: "选择字段",
|
|
1869
1884
|
filterable: "",
|
|
1870
|
-
"onUpdate:modelValue": (
|
|
1885
|
+
"onUpdate:modelValue": (Q) => r(M, Q)
|
|
1871
1886
|
}, {
|
|
1872
1887
|
default: o(() => [
|
|
1873
|
-
(n(!0),
|
|
1874
|
-
key:
|
|
1875
|
-
label:
|
|
1876
|
-
value:
|
|
1888
|
+
(n(!0), y(H, null, le(c(l).columns, (Q) => (n(), w(u, {
|
|
1889
|
+
key: Q.propertyPath,
|
|
1890
|
+
label: Q.displayName ?? Q.propertyPath,
|
|
1891
|
+
value: Q.propertyPath
|
|
1877
1892
|
}, null, 8, ["label", "value"]))), 128))
|
|
1878
1893
|
]),
|
|
1879
1894
|
_: 1
|
|
1880
1895
|
}, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1881
|
-
|
|
1896
|
+
m(g, {
|
|
1882
1897
|
"model-value": M.op,
|
|
1883
1898
|
class: "yk-adv-group__op",
|
|
1884
1899
|
placeholder: "操作符",
|
|
1885
1900
|
filterable: "",
|
|
1886
|
-
"onUpdate:modelValue": (
|
|
1901
|
+
"onUpdate:modelValue": (Q) => i(M, Q)
|
|
1887
1902
|
}, {
|
|
1888
1903
|
default: o(() => [
|
|
1889
|
-
(n(!0),
|
|
1890
|
-
key:
|
|
1891
|
-
label:
|
|
1892
|
-
value:
|
|
1904
|
+
(n(!0), y(H, null, le(c(l).api.operatorsOf(M.propertyPath), (Q) => (n(), w(u, {
|
|
1905
|
+
key: Q,
|
|
1906
|
+
label: c(tl)[Q],
|
|
1907
|
+
value: Q
|
|
1893
1908
|
}, null, 8, ["label", "value"]))), 128))
|
|
1894
1909
|
]),
|
|
1895
1910
|
_: 2
|
|
1896
1911
|
}, 1032, ["model-value", "onUpdate:modelValue"]),
|
|
1897
|
-
|
|
1912
|
+
c(ll)(M.op) ? z("", !0) : (n(), w(Ct, {
|
|
1898
1913
|
key: 0,
|
|
1899
|
-
"field-type":
|
|
1914
|
+
"field-type": c(l).api.fieldTypeOf(M.propertyPath),
|
|
1900
1915
|
op: M.op,
|
|
1901
|
-
options:
|
|
1902
|
-
"options-loading":
|
|
1903
|
-
"value-format":
|
|
1916
|
+
options: c(l).optionsMap.value[M.propertyPath] ?? [],
|
|
1917
|
+
"options-loading": c(l).loadingMap.value[M.propertyPath] === !0,
|
|
1918
|
+
"value-format": B(M.propertyPath),
|
|
1904
1919
|
class: Ce([
|
|
1905
1920
|
"yk-adv-group__value",
|
|
1906
|
-
{ "is-invalid":
|
|
1921
|
+
{ "is-invalid": c(l).api.isConditionEmpty(M) }
|
|
1907
1922
|
]),
|
|
1908
1923
|
modelValue: M.value,
|
|
1909
|
-
"onUpdate:modelValue": (
|
|
1924
|
+
"onUpdate:modelValue": (Q) => M.value = Q
|
|
1910
1925
|
}, null, 8, ["field-type", "op", "options", "options-loading", "value-format", "class", "modelValue", "onUpdate:modelValue"])),
|
|
1911
|
-
|
|
1926
|
+
m(X, {
|
|
1912
1927
|
link: "",
|
|
1913
1928
|
type: "danger",
|
|
1914
1929
|
class: "yk-adv-group__remove",
|
|
1915
|
-
onClick: (
|
|
1930
|
+
onClick: (Q) => x(M.id)
|
|
1916
1931
|
}, {
|
|
1917
|
-
default: o(() => [...
|
|
1932
|
+
default: o(() => [...b[7] || (b[7] = [
|
|
1918
1933
|
F(" 删除 ", -1)
|
|
1919
1934
|
])]),
|
|
1920
1935
|
_: 1
|
|
1921
1936
|
}, 8, ["onClick"])
|
|
1922
1937
|
]))
|
|
1923
1938
|
], 64))), 128)),
|
|
1924
|
-
e.group.children.length === 0 ? (n(),
|
|
1939
|
+
e.group.children.length === 0 ? (n(), y("div", vn, " 暂无条件,点击「+ 条件」或「+ 嵌套组」 ")) : z("", !0)
|
|
1925
1940
|
])
|
|
1926
1941
|
], 2);
|
|
1927
1942
|
};
|
|
1928
1943
|
}
|
|
1929
|
-
}), $t = /* @__PURE__ */ ie(
|
|
1944
|
+
}), $t = /* @__PURE__ */ ie(yn, [["__scopeId", "data-v-518d9c97"]]), gn = {
|
|
1930
1945
|
key: 0,
|
|
1931
1946
|
class: "yk-advanced-filter__actions"
|
|
1932
|
-
},
|
|
1947
|
+
}, _n = /* @__PURE__ */ ee({
|
|
1933
1948
|
name: "YsAdvancedFilterPanel",
|
|
1934
1949
|
__name: "advancedFilterPanel",
|
|
1935
1950
|
props: {
|
|
@@ -1957,168 +1972,168 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
1957
1972
|
}
|
|
1958
1973
|
},
|
|
1959
1974
|
emits: ["search", "reset", "update:savedQueries"],
|
|
1960
|
-
setup(e, { expose:
|
|
1961
|
-
const t = e, a = l,
|
|
1962
|
-
async function j(
|
|
1975
|
+
setup(e, { expose: v, emit: l }) {
|
|
1976
|
+
const t = e, a = l, f = gt(t), { rootGroup: s, fieldTypeOf: r, filter: i, reset: x } = f, V = T({}), D = T({});
|
|
1977
|
+
async function j(C) {
|
|
1963
1978
|
var $;
|
|
1964
|
-
const
|
|
1965
|
-
if (
|
|
1966
|
-
|
|
1979
|
+
const k = ($ = t.optionSources) == null ? void 0 : $[C];
|
|
1980
|
+
if (k && !(V.value[C] || D.value[C])) {
|
|
1981
|
+
D.value[C] = !0;
|
|
1967
1982
|
try {
|
|
1968
|
-
V.value[
|
|
1983
|
+
V.value[C] = await k();
|
|
1969
1984
|
} finally {
|
|
1970
|
-
|
|
1985
|
+
D.value[C] = !1;
|
|
1971
1986
|
}
|
|
1972
1987
|
}
|
|
1973
1988
|
}
|
|
1974
|
-
function
|
|
1975
|
-
const
|
|
1976
|
-
function $(
|
|
1977
|
-
lt(
|
|
1989
|
+
function B(C) {
|
|
1990
|
+
const k = /* @__PURE__ */ new Set();
|
|
1991
|
+
function $(P) {
|
|
1992
|
+
lt(P) ? P.children.forEach($) : r(P.propertyPath) === "enum" && k.add(P.propertyPath);
|
|
1978
1993
|
}
|
|
1979
|
-
return
|
|
1994
|
+
return C.children.forEach($), [...k];
|
|
1980
1995
|
}
|
|
1981
1996
|
de(
|
|
1982
1997
|
s,
|
|
1983
|
-
(
|
|
1984
|
-
for (const
|
|
1985
|
-
j(
|
|
1998
|
+
(C) => {
|
|
1999
|
+
for (const k of B(C))
|
|
2000
|
+
j(k);
|
|
1986
2001
|
},
|
|
1987
2002
|
{ deep: !0, immediate: !0 }
|
|
1988
2003
|
), ft(St, {
|
|
1989
2004
|
columns: t.columns,
|
|
1990
2005
|
optionsMap: V,
|
|
1991
|
-
loadingMap:
|
|
1992
|
-
api:
|
|
2006
|
+
loadingMap: D,
|
|
2007
|
+
api: f
|
|
1993
2008
|
});
|
|
1994
2009
|
function h() {
|
|
1995
2010
|
a("search", i.value);
|
|
1996
2011
|
}
|
|
1997
|
-
function
|
|
1998
|
-
|
|
2012
|
+
function b() {
|
|
2013
|
+
x(), a("reset");
|
|
1999
2014
|
}
|
|
2000
|
-
const L = T([]), q =
|
|
2015
|
+
const L = T([]), q = N(
|
|
2001
2016
|
() => t.savedQueries ?? L.value
|
|
2002
2017
|
);
|
|
2003
|
-
function X(
|
|
2004
|
-
L.value =
|
|
2018
|
+
function X(C) {
|
|
2019
|
+
L.value = C, a("update:savedQueries", C);
|
|
2005
2020
|
}
|
|
2006
|
-
const U = T(!1),
|
|
2021
|
+
const U = T(!1), u = T(""), g = T("");
|
|
2007
2022
|
let M = 0;
|
|
2008
|
-
function
|
|
2009
|
-
function
|
|
2010
|
-
return
|
|
2023
|
+
function Q() {
|
|
2024
|
+
function C(k) {
|
|
2025
|
+
return k.children.some(($) => lt($) ? C($) : f.isConditionEmpty($));
|
|
2011
2026
|
}
|
|
2012
|
-
return
|
|
2027
|
+
return C(s.value);
|
|
2013
2028
|
}
|
|
2014
|
-
function
|
|
2015
|
-
|
|
2029
|
+
function O() {
|
|
2030
|
+
u.value = "", g.value = "", U.value = !0;
|
|
2016
2031
|
}
|
|
2017
2032
|
function re() {
|
|
2018
|
-
const
|
|
2019
|
-
if (!
|
|
2020
|
-
|
|
2021
|
-
const
|
|
2033
|
+
const C = u.value.trim();
|
|
2034
|
+
if (!C) return;
|
|
2035
|
+
Q() && fe.warning("当前存在未填值的条件行(标红),保存的预设可能不完整");
|
|
2036
|
+
const k = JSON.parse(JSON.stringify(s.value)), $ = {
|
|
2022
2037
|
id: `sq-${++M}`,
|
|
2023
|
-
name:
|
|
2024
|
-
description:
|
|
2025
|
-
group:
|
|
2038
|
+
name: C,
|
|
2039
|
+
description: g.value.trim(),
|
|
2040
|
+
group: k,
|
|
2026
2041
|
filterInfo: i.value
|
|
2027
2042
|
};
|
|
2028
2043
|
X([...q.value, $]), U.value = !1;
|
|
2029
2044
|
}
|
|
2030
|
-
function ae(
|
|
2031
|
-
s.value = JSON.parse(JSON.stringify(
|
|
2045
|
+
function ae(C) {
|
|
2046
|
+
s.value = JSON.parse(JSON.stringify(C.group)), h();
|
|
2032
2047
|
}
|
|
2033
|
-
function W(
|
|
2034
|
-
X(q.value.filter((
|
|
2048
|
+
function W(C) {
|
|
2049
|
+
X(q.value.filter((k) => k.id !== C));
|
|
2035
2050
|
}
|
|
2036
|
-
return
|
|
2051
|
+
return v({
|
|
2037
2052
|
get filter() {
|
|
2038
2053
|
return i.value;
|
|
2039
2054
|
},
|
|
2040
|
-
reset:
|
|
2041
|
-
openSaveDialog:
|
|
2055
|
+
reset: b,
|
|
2056
|
+
openSaveDialog: O,
|
|
2042
2057
|
applySavedQuery: ae,
|
|
2043
2058
|
removeSavedQuery: W,
|
|
2044
2059
|
get savedQueries() {
|
|
2045
2060
|
return q.value;
|
|
2046
2061
|
}
|
|
2047
|
-
}), (
|
|
2048
|
-
const $ = S("el-button"),
|
|
2049
|
-
return n(),
|
|
2062
|
+
}), (C, k) => {
|
|
2063
|
+
const $ = S("el-button"), P = S("el-input"), G = S("el-form-item"), E = S("el-form"), I = S("el-dialog");
|
|
2064
|
+
return n(), y("div", {
|
|
2050
2065
|
class: "yk-advanced-filter",
|
|
2051
2066
|
onKeydown: We(h, ["enter"])
|
|
2052
2067
|
}, [
|
|
2053
|
-
|
|
2054
|
-
group:
|
|
2068
|
+
m($t, {
|
|
2069
|
+
group: c(s),
|
|
2055
2070
|
level: 0
|
|
2056
2071
|
}, null, 8, ["group"]),
|
|
2057
|
-
e.showSearch || e.showReset || e.showSaveQuery ? (n(),
|
|
2058
|
-
e.showSearch ? (n(),
|
|
2072
|
+
e.showSearch || e.showReset || e.showSaveQuery ? (n(), y("div", gn, [
|
|
2073
|
+
e.showSearch ? (n(), w($, {
|
|
2059
2074
|
key: 0,
|
|
2060
2075
|
type: "primary",
|
|
2061
2076
|
onClick: h
|
|
2062
2077
|
}, {
|
|
2063
2078
|
default: o(() => [
|
|
2064
|
-
F(
|
|
2079
|
+
F(Y(e.searchButtonText), 1)
|
|
2065
2080
|
]),
|
|
2066
2081
|
_: 1
|
|
2067
|
-
})) :
|
|
2068
|
-
e.showReset ? (n(),
|
|
2082
|
+
})) : z("", !0),
|
|
2083
|
+
e.showReset ? (n(), w($, {
|
|
2069
2084
|
key: 1,
|
|
2070
|
-
onClick:
|
|
2085
|
+
onClick: b
|
|
2071
2086
|
}, {
|
|
2072
2087
|
default: o(() => [
|
|
2073
|
-
F(
|
|
2088
|
+
F(Y(e.resetButtonText), 1)
|
|
2074
2089
|
]),
|
|
2075
2090
|
_: 1
|
|
2076
|
-
})) :
|
|
2077
|
-
e.showSaveQuery ? (n(),
|
|
2091
|
+
})) : z("", !0),
|
|
2092
|
+
e.showSaveQuery ? (n(), w($, {
|
|
2078
2093
|
key: 2,
|
|
2079
|
-
onClick:
|
|
2094
|
+
onClick: O
|
|
2080
2095
|
}, {
|
|
2081
|
-
default: o(() => [...
|
|
2096
|
+
default: o(() => [...k[4] || (k[4] = [
|
|
2082
2097
|
F("保存", -1)
|
|
2083
2098
|
])]),
|
|
2084
2099
|
_: 1
|
|
2085
|
-
})) :
|
|
2086
|
-
])) :
|
|
2087
|
-
|
|
2100
|
+
})) : z("", !0)
|
|
2101
|
+
])) : z("", !0),
|
|
2102
|
+
m(I, {
|
|
2088
2103
|
modelValue: U.value,
|
|
2089
|
-
"onUpdate:modelValue":
|
|
2104
|
+
"onUpdate:modelValue": k[3] || (k[3] = (A) => U.value = A),
|
|
2090
2105
|
title: "保存查询",
|
|
2091
2106
|
width: "440px",
|
|
2092
2107
|
"append-to-body": ""
|
|
2093
2108
|
}, {
|
|
2094
2109
|
footer: o(() => [
|
|
2095
|
-
|
|
2096
|
-
onClick:
|
|
2110
|
+
m($, {
|
|
2111
|
+
onClick: k[2] || (k[2] = (A) => U.value = !1)
|
|
2097
2112
|
}, {
|
|
2098
|
-
default: o(() => [...
|
|
2113
|
+
default: o(() => [...k[5] || (k[5] = [
|
|
2099
2114
|
F("取消", -1)
|
|
2100
2115
|
])]),
|
|
2101
2116
|
_: 1
|
|
2102
2117
|
}),
|
|
2103
|
-
|
|
2118
|
+
m($, {
|
|
2104
2119
|
type: "primary",
|
|
2105
|
-
disabled: !
|
|
2120
|
+
disabled: !u.value.trim(),
|
|
2106
2121
|
onClick: re
|
|
2107
2122
|
}, {
|
|
2108
|
-
default: o(() => [...
|
|
2123
|
+
default: o(() => [...k[6] || (k[6] = [
|
|
2109
2124
|
F(" 确定 ", -1)
|
|
2110
2125
|
])]),
|
|
2111
2126
|
_: 1
|
|
2112
2127
|
}, 8, ["disabled"])
|
|
2113
2128
|
]),
|
|
2114
2129
|
default: o(() => [
|
|
2115
|
-
|
|
2130
|
+
m(E, { "label-position": "top" }, {
|
|
2116
2131
|
default: o(() => [
|
|
2117
|
-
|
|
2132
|
+
m(G, { label: "名称" }, {
|
|
2118
2133
|
default: o(() => [
|
|
2119
|
-
|
|
2120
|
-
modelValue:
|
|
2121
|
-
"onUpdate:modelValue":
|
|
2134
|
+
m(P, {
|
|
2135
|
+
modelValue: u.value,
|
|
2136
|
+
"onUpdate:modelValue": k[0] || (k[0] = (A) => u.value = A),
|
|
2122
2137
|
placeholder: "请输入查询名称",
|
|
2123
2138
|
maxlength: "50",
|
|
2124
2139
|
"show-word-limit": "",
|
|
@@ -2127,11 +2142,11 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2127
2142
|
]),
|
|
2128
2143
|
_: 1
|
|
2129
2144
|
}),
|
|
2130
|
-
|
|
2145
|
+
m(G, { label: "描述" }, {
|
|
2131
2146
|
default: o(() => [
|
|
2132
|
-
|
|
2133
|
-
modelValue:
|
|
2134
|
-
"onUpdate:modelValue":
|
|
2147
|
+
m(P, {
|
|
2148
|
+
modelValue: g.value,
|
|
2149
|
+
"onUpdate:modelValue": k[1] || (k[1] = (A) => g.value = A),
|
|
2135
2150
|
type: "textarea",
|
|
2136
2151
|
rows: 2,
|
|
2137
2152
|
placeholder: "可选,描述此查询的用途(hover 标签时显示)",
|
|
@@ -2150,7 +2165,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2150
2165
|
], 32);
|
|
2151
2166
|
};
|
|
2152
2167
|
}
|
|
2153
|
-
}), Vt = /* @__PURE__ */ ie(
|
|
2168
|
+
}), Vt = /* @__PURE__ */ ie(_n, [["__scopeId", "data-v-0563cef9"]]), Ft = /* @__PURE__ */ ee({
|
|
2154
2169
|
name: "YsRootFilterPanel",
|
|
2155
2170
|
__name: "rootFilterPanel",
|
|
2156
2171
|
props: {
|
|
@@ -2164,26 +2179,26 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2164
2179
|
default: null
|
|
2165
2180
|
}
|
|
2166
2181
|
},
|
|
2167
|
-
setup(e, { expose:
|
|
2168
|
-
const l = e, { filter: t, register: a, reset:
|
|
2182
|
+
setup(e, { expose: v }) {
|
|
2183
|
+
const l = e, { filter: t, register: a, reset: f } = Ut();
|
|
2169
2184
|
ft(_t, a);
|
|
2170
|
-
const s =
|
|
2185
|
+
const s = N(() => {
|
|
2171
2186
|
const i = [];
|
|
2172
2187
|
l.extraFilter && i.push(l.extraFilter);
|
|
2173
|
-
const
|
|
2174
|
-
return
|
|
2188
|
+
const x = t.value;
|
|
2189
|
+
return x && !x.isEmpty() && i.push(x), i.length === 0 ? Qe() : i.length === 1 ? i[0] : nl.createAnd(...i);
|
|
2175
2190
|
});
|
|
2176
|
-
function
|
|
2177
|
-
|
|
2191
|
+
function r() {
|
|
2192
|
+
f();
|
|
2178
2193
|
}
|
|
2179
|
-
return
|
|
2194
|
+
return v({
|
|
2180
2195
|
/** 当前聚合后的查询条件(extraFilter AND 所有子项) */
|
|
2181
2196
|
filter: s,
|
|
2182
2197
|
/** 重置所有已注册子项(extraFilter 由外部自行维护) */
|
|
2183
|
-
reset:
|
|
2184
|
-
}), (i,
|
|
2198
|
+
reset: r
|
|
2199
|
+
}), (i, x) => Z(i.$slots, "default");
|
|
2185
2200
|
}
|
|
2186
|
-
}),
|
|
2201
|
+
}), kn = {
|
|
2187
2202
|
key: 0,
|
|
2188
2203
|
viewBox: "0 0 24 24",
|
|
2189
2204
|
width: "16",
|
|
@@ -2193,7 +2208,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2193
2208
|
"stroke-width": "2",
|
|
2194
2209
|
"stroke-linecap": "round",
|
|
2195
2210
|
"stroke-linejoin": "round"
|
|
2196
|
-
},
|
|
2211
|
+
}, bn = {
|
|
2197
2212
|
key: 1,
|
|
2198
2213
|
viewBox: "0 0 24 24",
|
|
2199
2214
|
width: "16",
|
|
@@ -2203,16 +2218,16 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2203
2218
|
"stroke-width": "2",
|
|
2204
2219
|
"stroke-linecap": "round",
|
|
2205
2220
|
"stroke-linejoin": "round"
|
|
2206
|
-
},
|
|
2221
|
+
}, hn = {
|
|
2207
2222
|
key: 1,
|
|
2208
2223
|
class: "yk-filter-panel__actions"
|
|
2209
|
-
},
|
|
2224
|
+
}, xn = {
|
|
2210
2225
|
key: 2,
|
|
2211
2226
|
class: "yk-filter-panel__saved"
|
|
2212
|
-
}, wn = { class: "yk-filter-panel__mode-bar" },
|
|
2227
|
+
}, wn = { class: "yk-filter-panel__mode-bar" }, Cn = {
|
|
2213
2228
|
key: 0,
|
|
2214
2229
|
class: "yk-filter-panel__saved"
|
|
2215
|
-
},
|
|
2230
|
+
}, Sn = /* @__PURE__ */ ee({
|
|
2216
2231
|
name: "YsFilterPanel",
|
|
2217
2232
|
__name: "filterPanel",
|
|
2218
2233
|
props: {
|
|
@@ -2269,19 +2284,19 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2269
2284
|
singleLine: { type: Boolean, default: !1 }
|
|
2270
2285
|
},
|
|
2271
2286
|
emits: ["search", "reset", "update:quickQueries"],
|
|
2272
|
-
setup(e, { expose:
|
|
2273
|
-
const t = e, a = l,
|
|
2287
|
+
setup(e, { expose: v, emit: l }) {
|
|
2288
|
+
const t = e, a = l, f = T(null), s = T("simple"), r = T(!0), i = T(0), x = T(null), V = T([]), D = N(
|
|
2274
2289
|
() => t.quickQueries ?? V.value
|
|
2275
|
-
), j = T(null),
|
|
2276
|
-
var $,
|
|
2277
|
-
return s.value === "advanced" ? (($ = j.value) == null ? void 0 : $.filter) ??
|
|
2290
|
+
), j = T(null), B = N(() => {
|
|
2291
|
+
var $, P;
|
|
2292
|
+
return s.value === "advanced" ? (($ = j.value) == null ? void 0 : $.filter) ?? Qe() : ((P = f.value) == null ? void 0 : P.filter) ?? Qe();
|
|
2278
2293
|
});
|
|
2279
2294
|
function h() {
|
|
2280
|
-
a("search",
|
|
2295
|
+
a("search", B.value);
|
|
2281
2296
|
}
|
|
2282
|
-
function
|
|
2283
|
-
var $,
|
|
2284
|
-
s.value === "advanced" ? ($ = j.value) == null || $.reset() : (
|
|
2297
|
+
function b() {
|
|
2298
|
+
var $, P;
|
|
2299
|
+
s.value === "advanced" ? ($ = j.value) == null || $.reset() : (P = f.value) == null || P.reset(), a("reset");
|
|
2285
2300
|
}
|
|
2286
2301
|
function L($) {
|
|
2287
2302
|
a("search", $);
|
|
@@ -2290,44 +2305,44 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2290
2305
|
a("reset");
|
|
2291
2306
|
}
|
|
2292
2307
|
async function X($) {
|
|
2293
|
-
const
|
|
2308
|
+
const P = new Set(D.value.map((E) => E.id)), G = $.filter((E) => !P.has(E.id));
|
|
2294
2309
|
if (t.saveQuickQueryFun && G.length > 0) {
|
|
2295
|
-
const
|
|
2296
|
-
for (const
|
|
2310
|
+
const E = [];
|
|
2311
|
+
for (const A of G)
|
|
2297
2312
|
try {
|
|
2298
|
-
const K = await t.saveQuickQueryFun(
|
|
2299
|
-
|
|
2313
|
+
const K = await t.saveQuickQueryFun(A);
|
|
2314
|
+
E.push(K ?? A);
|
|
2300
2315
|
} catch {
|
|
2301
|
-
fe.error(`保存快速查询「${
|
|
2316
|
+
fe.error(`保存快速查询「${A.name}」失败`), E.push(A);
|
|
2302
2317
|
}
|
|
2303
2318
|
let I = $;
|
|
2304
|
-
if (
|
|
2305
|
-
const
|
|
2306
|
-
I = $.map((K) =>
|
|
2319
|
+
if (E.some((A, K) => A !== G[K])) {
|
|
2320
|
+
const A = new Map(G.map((K, se) => [K.id, E[se] ?? K]));
|
|
2321
|
+
I = $.map((K) => A.get(K.id) ?? K);
|
|
2307
2322
|
}
|
|
2308
2323
|
V.value = I, a("update:quickQueries", I);
|
|
2309
2324
|
} else
|
|
2310
2325
|
V.value = $, a("update:quickQueries", $);
|
|
2311
2326
|
}
|
|
2312
2327
|
let U = null;
|
|
2313
|
-
function
|
|
2328
|
+
function u() {
|
|
2314
2329
|
return !U && t.advancedColumns.length && (U = gt({
|
|
2315
2330
|
columns: t.advancedColumns,
|
|
2316
2331
|
optionSources: t.advancedOptionSources
|
|
2317
2332
|
})), U;
|
|
2318
2333
|
}
|
|
2319
|
-
function
|
|
2320
|
-
const
|
|
2321
|
-
return
|
|
2334
|
+
function g($) {
|
|
2335
|
+
const P = u();
|
|
2336
|
+
return P ? (P.rootGroup.value = JSON.parse(JSON.stringify($)), P.filter.value) : { toString: () => "", isEmpty: () => !0 };
|
|
2322
2337
|
}
|
|
2323
2338
|
$e(async () => {
|
|
2324
2339
|
if (t.loadQuickQueryFun)
|
|
2325
2340
|
try {
|
|
2326
|
-
const
|
|
2341
|
+
const P = (await t.loadQuickQueryFun()).map((G) => ({
|
|
2327
2342
|
...G,
|
|
2328
|
-
filterInfo: G.filterInfo ??
|
|
2343
|
+
filterInfo: G.filterInfo ?? g(G.group)
|
|
2329
2344
|
}));
|
|
2330
|
-
V.value =
|
|
2345
|
+
V.value = P, a("update:quickQueries", P);
|
|
2331
2346
|
} catch {
|
|
2332
2347
|
fe.error("加载快速查询失败");
|
|
2333
2348
|
}
|
|
@@ -2335,41 +2350,41 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2335
2350
|
function M() {
|
|
2336
2351
|
s.value !== "advanced" && h();
|
|
2337
2352
|
}
|
|
2338
|
-
function
|
|
2353
|
+
function Q() {
|
|
2339
2354
|
s.value = "advanced";
|
|
2340
2355
|
}
|
|
2341
|
-
function
|
|
2356
|
+
function O() {
|
|
2342
2357
|
s.value = "simple";
|
|
2343
2358
|
}
|
|
2344
2359
|
function re() {
|
|
2345
|
-
|
|
2360
|
+
r.value = !r.value;
|
|
2346
2361
|
}
|
|
2347
2362
|
function ae() {
|
|
2348
|
-
const $ =
|
|
2363
|
+
const $ = x.value;
|
|
2349
2364
|
if (!$) return;
|
|
2350
2365
|
for (const se of Array.from($.children))
|
|
2351
2366
|
se.style.display = "";
|
|
2352
|
-
if (!t.singleLine || !
|
|
2367
|
+
if (!t.singleLine || !r.value) {
|
|
2353
2368
|
i.value = 0, $.style.maxWidth = "";
|
|
2354
2369
|
return;
|
|
2355
2370
|
}
|
|
2356
|
-
const
|
|
2357
|
-
$.style.maxWidth = `calc(100% - ${G +
|
|
2371
|
+
const P = $.nextElementSibling, G = P ? P.offsetWidth : 0, E = 16;
|
|
2372
|
+
$.style.maxWidth = `calc(100% - ${G + E}px)`;
|
|
2358
2373
|
const I = $.clientWidth;
|
|
2359
|
-
let
|
|
2374
|
+
let A = 0, K = 0;
|
|
2360
2375
|
for (const se of Array.from($.children)) {
|
|
2361
2376
|
const ce = se, be = ce.offsetWidth;
|
|
2362
|
-
|
|
2377
|
+
A > 0 && A + be + E > I ? (ce.style.display = "none", K++) : A += be + E;
|
|
2363
2378
|
}
|
|
2364
2379
|
i.value = K;
|
|
2365
2380
|
}
|
|
2366
2381
|
let W = null;
|
|
2367
|
-
function
|
|
2368
|
-
var
|
|
2369
|
-
s.value === "advanced" ? (
|
|
2382
|
+
function C($) {
|
|
2383
|
+
var P;
|
|
2384
|
+
s.value === "advanced" ? (P = j.value) == null || P.applySavedQuery($) : a("search", $.filterInfo);
|
|
2370
2385
|
}
|
|
2371
|
-
async function
|
|
2372
|
-
const
|
|
2386
|
+
async function k($) {
|
|
2387
|
+
const P = D.value.find((E) => E.id === $), G = (P == null ? void 0 : P.name) ?? "该查询";
|
|
2373
2388
|
try {
|
|
2374
2389
|
await kt.confirm(
|
|
2375
2390
|
`确定要删除快速查询「${G}」吗?`,
|
|
@@ -2379,52 +2394,52 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2379
2394
|
} catch {
|
|
2380
2395
|
return;
|
|
2381
2396
|
}
|
|
2382
|
-
await X(
|
|
2397
|
+
await X(D.value.filter((E) => E.id !== $));
|
|
2383
2398
|
}
|
|
2384
2399
|
return $e(() => {
|
|
2385
|
-
t.singleLine && (ae(), W = new ResizeObserver(() => ae()),
|
|
2400
|
+
t.singleLine && (ae(), W = new ResizeObserver(() => ae()), x.value && W.observe(x.value));
|
|
2386
2401
|
}), Ne(() => {
|
|
2387
2402
|
W == null || W.disconnect(), W = null;
|
|
2388
|
-
}), de([
|
|
2403
|
+
}), de([r, () => t.singleLine], () => {
|
|
2389
2404
|
Ge(ae);
|
|
2390
|
-
}),
|
|
2391
|
-
filter:
|
|
2392
|
-
reset:
|
|
2405
|
+
}), v({
|
|
2406
|
+
filter: B,
|
|
2407
|
+
reset: b,
|
|
2393
2408
|
mode: s
|
|
2394
|
-
}), ($,
|
|
2395
|
-
const G = S("el-button"),
|
|
2396
|
-
return n(),
|
|
2397
|
-
class: Ce(["yk-filter-panel", { "is-single-line": e.singleLine, "is-collapsed": e.singleLine &&
|
|
2409
|
+
}), ($, P) => {
|
|
2410
|
+
const G = S("el-button"), E = S("el-tooltip"), I = S("el-tag");
|
|
2411
|
+
return n(), y("div", {
|
|
2412
|
+
class: Ce(["yk-filter-panel", { "is-single-line": e.singleLine, "is-collapsed": e.singleLine && r.value }]),
|
|
2398
2413
|
onKeydown: We(M, ["enter"])
|
|
2399
2414
|
}, [
|
|
2400
|
-
s.value === "simple" ? (n(),
|
|
2401
|
-
e.singleLine ? (n(),
|
|
2415
|
+
s.value === "simple" ? (n(), y(H, { key: 0 }, [
|
|
2416
|
+
e.singleLine ? (n(), w(G, {
|
|
2402
2417
|
key: 0,
|
|
2403
2418
|
link: "",
|
|
2404
2419
|
class: "yk-filter-panel__toggle",
|
|
2405
|
-
"aria-label":
|
|
2406
|
-
title:
|
|
2420
|
+
"aria-label": r.value ? "展开更多条件" : "折叠",
|
|
2421
|
+
title: r.value ? i.value ? `展开(${i.value} 个条件被隐藏)` : "展开" : "折叠",
|
|
2407
2422
|
onClick: re
|
|
2408
2423
|
}, {
|
|
2409
2424
|
default: o(() => [
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
])])) : (n(),
|
|
2414
|
-
|
|
2415
|
-
|
|
2425
|
+
r.value ? (n(), y("svg", kn, [...P[0] || (P[0] = [
|
|
2426
|
+
p("polyline", { points: "6 9 12 15 18 9" }, null, -1),
|
|
2427
|
+
p("polyline", { points: "6 14 12 20 18 14" }, null, -1)
|
|
2428
|
+
])])) : (n(), y("svg", bn, [...P[1] || (P[1] = [
|
|
2429
|
+
p("polyline", { points: "18 15 12 9 6 15" }, null, -1),
|
|
2430
|
+
p("polyline", { points: "18 10 12 4 6 10" }, null, -1)
|
|
2416
2431
|
])]))
|
|
2417
2432
|
]),
|
|
2418
2433
|
_: 1
|
|
2419
|
-
}, 8, ["aria-label", "title"])) :
|
|
2420
|
-
|
|
2434
|
+
}, 8, ["aria-label", "title"])) : z("", !0),
|
|
2435
|
+
p("div", {
|
|
2421
2436
|
class: "yk-filter-panel__items",
|
|
2422
2437
|
ref_key: "itemsEl",
|
|
2423
|
-
ref:
|
|
2438
|
+
ref: x
|
|
2424
2439
|
}, [
|
|
2425
|
-
|
|
2440
|
+
m(Ft, {
|
|
2426
2441
|
ref_key: "rootRef",
|
|
2427
|
-
ref:
|
|
2442
|
+
ref: f
|
|
2428
2443
|
}, {
|
|
2429
2444
|
default: o(() => [
|
|
2430
2445
|
Z($.$slots, "default", {}, void 0, !0)
|
|
@@ -2432,113 +2447,113 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2432
2447
|
_: 3
|
|
2433
2448
|
}, 512)
|
|
2434
2449
|
], 512),
|
|
2435
|
-
e.showSearch || e.showReset || e.enableAdvancedFilter ? (n(),
|
|
2436
|
-
e.showSearch ? (n(),
|
|
2450
|
+
e.showSearch || e.showReset || e.enableAdvancedFilter ? (n(), y("div", hn, [
|
|
2451
|
+
e.showSearch ? (n(), w(G, {
|
|
2437
2452
|
key: 0,
|
|
2438
2453
|
type: "primary",
|
|
2439
2454
|
onClick: h
|
|
2440
2455
|
}, {
|
|
2441
2456
|
default: o(() => [
|
|
2442
|
-
F(
|
|
2457
|
+
F(Y(e.searchButtonText), 1)
|
|
2443
2458
|
]),
|
|
2444
2459
|
_: 1
|
|
2445
|
-
})) :
|
|
2446
|
-
e.showReset ? (n(),
|
|
2460
|
+
})) : z("", !0),
|
|
2461
|
+
e.showReset ? (n(), w(G, {
|
|
2447
2462
|
key: 1,
|
|
2448
|
-
onClick:
|
|
2463
|
+
onClick: b
|
|
2449
2464
|
}, {
|
|
2450
2465
|
default: o(() => [
|
|
2451
|
-
F(
|
|
2466
|
+
F(Y(e.resetButtonText), 1)
|
|
2452
2467
|
]),
|
|
2453
2468
|
_: 1
|
|
2454
|
-
})) :
|
|
2455
|
-
e.enableAdvancedFilter && !(e.singleLine &&
|
|
2469
|
+
})) : z("", !0),
|
|
2470
|
+
e.enableAdvancedFilter && !(e.singleLine && r.value) ? (n(), w(G, {
|
|
2456
2471
|
key: 2,
|
|
2457
2472
|
link: "",
|
|
2458
2473
|
type: "primary",
|
|
2459
|
-
onClick:
|
|
2474
|
+
onClick: Q
|
|
2460
2475
|
}, {
|
|
2461
|
-
default: o(() => [...
|
|
2476
|
+
default: o(() => [...P[2] || (P[2] = [
|
|
2462
2477
|
F(" 高级查询 ", -1)
|
|
2463
2478
|
])]),
|
|
2464
2479
|
_: 1
|
|
2465
|
-
})) :
|
|
2466
|
-
])) :
|
|
2467
|
-
e.showQuickQuery &&
|
|
2468
|
-
|
|
2469
|
-
(n(!0),
|
|
2470
|
-
key:
|
|
2471
|
-
content:
|
|
2472
|
-
disabled: !
|
|
2480
|
+
})) : z("", !0)
|
|
2481
|
+
])) : z("", !0),
|
|
2482
|
+
e.showQuickQuery && D.value.length ? (n(), y("div", xn, [
|
|
2483
|
+
P[3] || (P[3] = p("span", { class: "yk-filter-panel__saved-label" }, "快速查询:", -1)),
|
|
2484
|
+
(n(!0), y(H, null, le(D.value, (A) => (n(), w(E, {
|
|
2485
|
+
key: A.id,
|
|
2486
|
+
content: A.description,
|
|
2487
|
+
disabled: !A.description,
|
|
2473
2488
|
placement: "top"
|
|
2474
2489
|
}, {
|
|
2475
2490
|
default: o(() => [
|
|
2476
|
-
|
|
2491
|
+
m(G, {
|
|
2477
2492
|
size: "small",
|
|
2478
|
-
onClick: (K) =>
|
|
2493
|
+
onClick: (K) => C(A)
|
|
2479
2494
|
}, {
|
|
2480
2495
|
default: o(() => [
|
|
2481
|
-
F(
|
|
2496
|
+
F(Y(A.name), 1)
|
|
2482
2497
|
]),
|
|
2483
2498
|
_: 2
|
|
2484
2499
|
}, 1032, ["onClick"])
|
|
2485
2500
|
]),
|
|
2486
2501
|
_: 2
|
|
2487
2502
|
}, 1032, ["content", "disabled"]))), 128))
|
|
2488
|
-
])) :
|
|
2489
|
-
], 64)) : (n(),
|
|
2490
|
-
|
|
2491
|
-
|
|
2503
|
+
])) : z("", !0)
|
|
2504
|
+
], 64)) : (n(), y(H, { key: 1 }, [
|
|
2505
|
+
p("div", wn, [
|
|
2506
|
+
m(G, {
|
|
2492
2507
|
link: "",
|
|
2493
2508
|
type: "primary",
|
|
2494
|
-
onClick:
|
|
2509
|
+
onClick: O
|
|
2495
2510
|
}, {
|
|
2496
|
-
default: o(() => [...
|
|
2511
|
+
default: o(() => [...P[4] || (P[4] = [
|
|
2497
2512
|
F("← 简单查询", -1)
|
|
2498
2513
|
])]),
|
|
2499
2514
|
_: 1
|
|
2500
2515
|
})
|
|
2501
2516
|
]),
|
|
2502
|
-
|
|
2517
|
+
m(Vt, {
|
|
2503
2518
|
ref_key: "advancedPanelRef",
|
|
2504
2519
|
ref: j,
|
|
2505
2520
|
columns: e.advancedColumns,
|
|
2506
2521
|
"option-sources": e.advancedOptionSources,
|
|
2507
|
-
"saved-queries":
|
|
2522
|
+
"saved-queries": D.value,
|
|
2508
2523
|
onSearch: L,
|
|
2509
2524
|
onReset: q,
|
|
2510
2525
|
"onUpdate:savedQueries": X
|
|
2511
2526
|
}, null, 8, ["columns", "option-sources", "saved-queries"]),
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
(n(!0),
|
|
2515
|
-
key:
|
|
2516
|
-
content:
|
|
2517
|
-
disabled: !
|
|
2527
|
+
D.value.length ? (n(), y("div", Cn, [
|
|
2528
|
+
P[5] || (P[5] = p("span", { class: "yk-filter-panel__saved-label" }, "已存查询:", -1)),
|
|
2529
|
+
(n(!0), y(H, null, le(D.value, (A) => (n(), w(E, {
|
|
2530
|
+
key: A.id,
|
|
2531
|
+
content: A.description,
|
|
2532
|
+
disabled: !A.description,
|
|
2518
2533
|
placement: "top"
|
|
2519
2534
|
}, {
|
|
2520
2535
|
default: o(() => [
|
|
2521
|
-
|
|
2536
|
+
m(I, {
|
|
2522
2537
|
class: "yk-filter-panel__saved-tag",
|
|
2523
2538
|
effect: "plain",
|
|
2524
2539
|
closable: "",
|
|
2525
|
-
onClick: (K) =>
|
|
2526
|
-
onClose: (K) =>
|
|
2540
|
+
onClick: (K) => C(A),
|
|
2541
|
+
onClose: (K) => k(A.id)
|
|
2527
2542
|
}, {
|
|
2528
2543
|
default: o(() => [
|
|
2529
|
-
F(
|
|
2544
|
+
F(Y(A.name), 1)
|
|
2530
2545
|
]),
|
|
2531
2546
|
_: 2
|
|
2532
2547
|
}, 1032, ["onClick", "onClose"])
|
|
2533
2548
|
]),
|
|
2534
2549
|
_: 2
|
|
2535
2550
|
}, 1032, ["content", "disabled"]))), 128))
|
|
2536
|
-
])) :
|
|
2551
|
+
])) : z("", !0)
|
|
2537
2552
|
], 64))
|
|
2538
2553
|
], 34);
|
|
2539
2554
|
};
|
|
2540
2555
|
}
|
|
2541
|
-
}), Mt = /* @__PURE__ */ ie(
|
|
2556
|
+
}), Mt = /* @__PURE__ */ ie(Sn, [["__scopeId", "data-v-cc097ffb"]]), $n = { class: "yk-filter-item__label" }, Vn = { class: "yk-filter-item__control" }, Fn = /* @__PURE__ */ ee({
|
|
2542
2557
|
name: "YsFilterItemLayout",
|
|
2543
2558
|
__name: "filterItemLayout",
|
|
2544
2559
|
props: {
|
|
@@ -2553,23 +2568,23 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2553
2568
|
api: { type: Object, required: !0 }
|
|
2554
2569
|
},
|
|
2555
2570
|
setup(e) {
|
|
2556
|
-
const
|
|
2571
|
+
const v = e, l = mt(_t, null);
|
|
2557
2572
|
let t = null;
|
|
2558
2573
|
return $e(() => {
|
|
2559
|
-
l && (t = l(
|
|
2574
|
+
l && (t = l(v.api));
|
|
2560
2575
|
}), Ne(() => {
|
|
2561
2576
|
t == null || t();
|
|
2562
|
-
}), (a,
|
|
2577
|
+
}), (a, f) => (n(), y("div", {
|
|
2563
2578
|
class: "yk-filter-item",
|
|
2564
2579
|
style: nt({ minWidth: e.minWidth + "px" })
|
|
2565
2580
|
}, [
|
|
2566
|
-
|
|
2567
|
-
|
|
2581
|
+
p("label", $n, Y(e.label), 1),
|
|
2582
|
+
p("div", Vn, [
|
|
2568
2583
|
Z(a.$slots, "default", {}, void 0, !0)
|
|
2569
2584
|
])
|
|
2570
2585
|
], 4));
|
|
2571
2586
|
}
|
|
2572
|
-
}), Oe = /* @__PURE__ */ ie(
|
|
2587
|
+
}), Oe = /* @__PURE__ */ ie(Fn, [["__scopeId", "data-v-2f9ea4d2"]]), Mn = /* @__PURE__ */ ee({
|
|
2573
2588
|
name: "YsTextFilterItem",
|
|
2574
2589
|
__name: "textFilterItem",
|
|
2575
2590
|
props: {
|
|
@@ -2592,22 +2607,22 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2592
2607
|
/** 占位文本 */
|
|
2593
2608
|
placeholder: { type: String, required: !1 }
|
|
2594
2609
|
},
|
|
2595
|
-
setup(e, { expose:
|
|
2596
|
-
const l = e, { value: t, filter: a, reset:
|
|
2610
|
+
setup(e, { expose: v }) {
|
|
2611
|
+
const l = e, { value: t, filter: a, reset: f } = Kt(l), s = {
|
|
2597
2612
|
get filter() {
|
|
2598
2613
|
return a.value;
|
|
2599
2614
|
},
|
|
2600
|
-
reset:
|
|
2615
|
+
reset: f
|
|
2601
2616
|
};
|
|
2602
|
-
return
|
|
2603
|
-
const
|
|
2604
|
-
return n(),
|
|
2617
|
+
return v(s), (r, i) => {
|
|
2618
|
+
const x = S("el-input");
|
|
2619
|
+
return n(), w(Oe, {
|
|
2605
2620
|
label: e.label,
|
|
2606
2621
|
api: s
|
|
2607
2622
|
}, {
|
|
2608
2623
|
default: o(() => [
|
|
2609
|
-
|
|
2610
|
-
modelValue:
|
|
2624
|
+
m(x, {
|
|
2625
|
+
modelValue: c(t),
|
|
2611
2626
|
"onUpdate:modelValue": i[0] || (i[0] = (V) => Se(t) ? t.value = V : null),
|
|
2612
2627
|
placeholder: e.placeholder,
|
|
2613
2628
|
clearable: ""
|
|
@@ -2617,7 +2632,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2617
2632
|
}, 8, ["label"]);
|
|
2618
2633
|
};
|
|
2619
2634
|
}
|
|
2620
|
-
}),
|
|
2635
|
+
}), Rn = /* @__PURE__ */ ee({
|
|
2621
2636
|
name: "YsDateFilterItem",
|
|
2622
2637
|
__name: "dateFilterItem",
|
|
2623
2638
|
props: {
|
|
@@ -2641,22 +2656,22 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2641
2656
|
/** el-date-picker value-format,默认 'YYYY-MM-DD'(v-model 绑字符串) */
|
|
2642
2657
|
valueFormat: { type: String, default: "YYYY-MM-DD" }
|
|
2643
2658
|
},
|
|
2644
|
-
setup(e, { expose:
|
|
2645
|
-
const l = e, { value: t, filter: a, reset:
|
|
2659
|
+
setup(e, { expose: v }) {
|
|
2660
|
+
const l = e, { value: t, filter: a, reset: f } = jt(l), s = {
|
|
2646
2661
|
get filter() {
|
|
2647
2662
|
return a.value;
|
|
2648
2663
|
},
|
|
2649
|
-
reset:
|
|
2664
|
+
reset: f
|
|
2650
2665
|
};
|
|
2651
|
-
return
|
|
2652
|
-
const
|
|
2653
|
-
return n(),
|
|
2666
|
+
return v(s), (r, i) => {
|
|
2667
|
+
const x = S("el-date-picker");
|
|
2668
|
+
return n(), w(Oe, {
|
|
2654
2669
|
label: e.label,
|
|
2655
2670
|
api: s
|
|
2656
2671
|
}, {
|
|
2657
2672
|
default: o(() => [
|
|
2658
|
-
|
|
2659
|
-
modelValue:
|
|
2673
|
+
m(x, {
|
|
2674
|
+
modelValue: c(t),
|
|
2660
2675
|
"onUpdate:modelValue": i[0] || (i[0] = (V) => Se(t) ? t.value = V : null),
|
|
2661
2676
|
type: "date",
|
|
2662
2677
|
placeholder: e.placeholder,
|
|
@@ -2668,7 +2683,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2668
2683
|
}, 8, ["label"]);
|
|
2669
2684
|
};
|
|
2670
2685
|
}
|
|
2671
|
-
}),
|
|
2686
|
+
}), Pn = /* @__PURE__ */ ee({
|
|
2672
2687
|
name: "YsDateRangeFilterItem",
|
|
2673
2688
|
__name: "dateRangeFilterItem",
|
|
2674
2689
|
props: {
|
|
@@ -2697,23 +2712,23 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2697
2712
|
required: !1
|
|
2698
2713
|
}
|
|
2699
2714
|
},
|
|
2700
|
-
setup(e, { expose:
|
|
2701
|
-
const l = e, { value: t, filter: a, reset:
|
|
2715
|
+
setup(e, { expose: v }) {
|
|
2716
|
+
const l = e, { value: t, filter: a, reset: f } = Ht(l), s = {
|
|
2702
2717
|
get filter() {
|
|
2703
2718
|
return a.value;
|
|
2704
2719
|
},
|
|
2705
|
-
reset:
|
|
2720
|
+
reset: f
|
|
2706
2721
|
};
|
|
2707
|
-
return
|
|
2708
|
-
const
|
|
2709
|
-
return n(),
|
|
2722
|
+
return v(s), (r, i) => {
|
|
2723
|
+
const x = S("el-date-picker");
|
|
2724
|
+
return n(), w(Oe, {
|
|
2710
2725
|
label: e.label,
|
|
2711
2726
|
api: s,
|
|
2712
2727
|
"min-width": 240
|
|
2713
2728
|
}, {
|
|
2714
2729
|
default: o(() => [
|
|
2715
|
-
|
|
2716
|
-
modelValue:
|
|
2730
|
+
m(x, {
|
|
2731
|
+
modelValue: c(t),
|
|
2717
2732
|
"onUpdate:modelValue": i[0] || (i[0] = (V) => Se(t) ? t.value = V : null),
|
|
2718
2733
|
type: "daterange",
|
|
2719
2734
|
"start-placeholder": e.startPlaceholder,
|
|
@@ -2764,44 +2779,44 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2764
2779
|
/** 是否多选;默认 false。多选时 2+ 项用 In,1 项用 Equals,0 项返回 null */
|
|
2765
2780
|
multiple: { type: Boolean, default: !1 }
|
|
2766
2781
|
},
|
|
2767
|
-
setup(e, { expose:
|
|
2768
|
-
const l = e, { value: t, filter: a, reset:
|
|
2782
|
+
setup(e, { expose: v }) {
|
|
2783
|
+
const l = e, { value: t, filter: a, reset: f } = Gt(l), s = N({
|
|
2769
2784
|
get: () => t.value,
|
|
2770
2785
|
set: (V) => {
|
|
2771
2786
|
t.value = V;
|
|
2772
2787
|
}
|
|
2773
|
-
}),
|
|
2788
|
+
}), r = T([]), i = T(!1);
|
|
2774
2789
|
$e(async () => {
|
|
2775
2790
|
i.value = !0;
|
|
2776
2791
|
try {
|
|
2777
|
-
|
|
2792
|
+
r.value = await l.optionsSource();
|
|
2778
2793
|
} finally {
|
|
2779
2794
|
i.value = !1;
|
|
2780
2795
|
}
|
|
2781
2796
|
});
|
|
2782
|
-
const
|
|
2797
|
+
const x = {
|
|
2783
2798
|
get filter() {
|
|
2784
2799
|
return a.value;
|
|
2785
2800
|
},
|
|
2786
|
-
reset:
|
|
2801
|
+
reset: f
|
|
2787
2802
|
};
|
|
2788
|
-
return
|
|
2789
|
-
const j = S("el-option"),
|
|
2790
|
-
return n(),
|
|
2803
|
+
return v(x), (V, D) => {
|
|
2804
|
+
const j = S("el-option"), B = S("el-select");
|
|
2805
|
+
return n(), w(Oe, {
|
|
2791
2806
|
label: e.label,
|
|
2792
|
-
api:
|
|
2807
|
+
api: x
|
|
2793
2808
|
}, {
|
|
2794
2809
|
default: o(() => [
|
|
2795
|
-
|
|
2810
|
+
m(B, {
|
|
2796
2811
|
modelValue: s.value,
|
|
2797
|
-
"onUpdate:modelValue":
|
|
2812
|
+
"onUpdate:modelValue": D[0] || (D[0] = (h) => s.value = h),
|
|
2798
2813
|
multiple: e.multiple,
|
|
2799
2814
|
placeholder: e.placeholder,
|
|
2800
2815
|
clearable: e.clearable,
|
|
2801
2816
|
loading: i.value
|
|
2802
2817
|
}, {
|
|
2803
2818
|
default: o(() => [
|
|
2804
|
-
(n(!0),
|
|
2819
|
+
(n(!0), y(H, null, le(r.value, (h) => (n(), w(j, {
|
|
2805
2820
|
key: String(h.value),
|
|
2806
2821
|
value: h.value,
|
|
2807
2822
|
label: h.label
|
|
@@ -2814,7 +2829,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2814
2829
|
}, 8, ["label"]);
|
|
2815
2830
|
};
|
|
2816
2831
|
}
|
|
2817
|
-
}),
|
|
2832
|
+
}), zn = { class: "yk-table-page" }, Dn = { class: "yk-table-page__filter-row" }, Bn = { class: "yk-table-page__filter-extra" }, En = /* @__PURE__ */ ee({
|
|
2818
2833
|
name: "YsTablePage",
|
|
2819
2834
|
__name: "tablePage",
|
|
2820
2835
|
props: {
|
|
@@ -2833,7 +2848,6 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2833
2848
|
rowKey: { type: String, default: "id" },
|
|
2834
2849
|
viewMode: { type: String, default: "table" },
|
|
2835
2850
|
actions: { type: Array, default: () => [] },
|
|
2836
|
-
showActionMenuButton: { type: Boolean, default: !0 },
|
|
2837
2851
|
showSearch: { type: Boolean, default: !0 },
|
|
2838
2852
|
showReset: { type: Boolean, default: !0 },
|
|
2839
2853
|
searchButtonText: { type: String, default: "查询" },
|
|
@@ -2848,8 +2862,8 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2848
2862
|
singleLine: { type: Boolean, default: !1 }
|
|
2849
2863
|
},
|
|
2850
2864
|
emits: ["search", "reset", "update:quickQueries", "data-loaded", "update:viewMode", "update:showCheckbox", "update:columnResizable", "update:stickyHeader"],
|
|
2851
|
-
setup(e, { expose:
|
|
2852
|
-
const t = e, a = l,
|
|
2865
|
+
setup(e, { expose: v, emit: l }) {
|
|
2866
|
+
const t = e, a = l, f = Bt(Qe()), s = T(null), r = T(null), i = N(() => async (B, h) => t.dataFun(B, f.value, h)), x = N(() => ({
|
|
2853
2867
|
metaFun: t.metaFun,
|
|
2854
2868
|
dataFun: i.value,
|
|
2855
2869
|
rowActionsFunc: t.rowActionsFunc,
|
|
@@ -2864,7 +2878,7 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2864
2878
|
exportorFunc: t.exportorFunc,
|
|
2865
2879
|
rowKey: t.rowKey,
|
|
2866
2880
|
viewMode: t.viewMode
|
|
2867
|
-
})), V =
|
|
2881
|
+
})), V = N(() => ({
|
|
2868
2882
|
showSearch: t.showSearch,
|
|
2869
2883
|
showReset: t.showReset,
|
|
2870
2884
|
searchButtonText: t.searchButtonText,
|
|
@@ -2878,96 +2892,104 @@ import './index.css';const ol = { class: "export-options" }, al = { class: "expo
|
|
|
2878
2892
|
saveQuickQueryFun: t.saveQuickQueryFun,
|
|
2879
2893
|
singleLine: t.singleLine
|
|
2880
2894
|
}));
|
|
2881
|
-
function
|
|
2895
|
+
function D(B) {
|
|
2882
2896
|
var h;
|
|
2883
|
-
|
|
2897
|
+
f.value = B, a("search", B), (h = s.value) == null || h.reload();
|
|
2884
2898
|
}
|
|
2885
2899
|
function j() {
|
|
2886
|
-
var
|
|
2887
|
-
|
|
2900
|
+
var B;
|
|
2901
|
+
f.value = Qe(), a("reset"), (B = s.value) == null || B.reload();
|
|
2888
2902
|
}
|
|
2889
|
-
return
|
|
2903
|
+
return v({
|
|
2890
2904
|
table: s,
|
|
2891
|
-
filterPanel:
|
|
2892
|
-
}), (
|
|
2893
|
-
p(
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2905
|
+
filterPanel: r
|
|
2906
|
+
}), (B, h) => (n(), y("div", zn, [
|
|
2907
|
+
p("div", Dn, [
|
|
2908
|
+
m(Mt, et({
|
|
2909
|
+
ref_key: "filterPanelRef",
|
|
2910
|
+
ref: r,
|
|
2911
|
+
class: "yk-table-page__filter"
|
|
2912
|
+
}, V.value, {
|
|
2913
|
+
onSearch: D,
|
|
2914
|
+
onReset: j,
|
|
2915
|
+
"onUpdate:quickQueries": h[0] || (h[0] = (b) => a("update:quickQueries", b))
|
|
2916
|
+
}), {
|
|
2917
|
+
default: o(() => [
|
|
2918
|
+
Z(B.$slots, "default", {}, void 0, !0)
|
|
2919
|
+
]),
|
|
2920
|
+
_: 3
|
|
2921
|
+
}, 16),
|
|
2922
|
+
p("div", Bn, [
|
|
2923
|
+
Z(B.$slots, "filter-extra", {}, void 0, !0),
|
|
2924
|
+
!B.$slots["filter-extra"] && s.value ? (n(), w(xt, {
|
|
2925
|
+
key: 0,
|
|
2926
|
+
table: s.value
|
|
2927
|
+
}, null, 8, ["table"])) : z("", !0)
|
|
2928
|
+
])
|
|
2929
|
+
]),
|
|
2930
|
+
m(wt, {
|
|
2908
2931
|
class: "yk-table-page__command",
|
|
2909
2932
|
actions: t.actions,
|
|
2910
|
-
table: s.value
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
E.$slots["command-bar"] ? {
|
|
2933
|
+
table: s.value
|
|
2934
|
+
}, De({ _: 2 }, [
|
|
2935
|
+
B.$slots["command-bar"] ? {
|
|
2914
2936
|
name: "default",
|
|
2915
2937
|
fn: o(() => [
|
|
2916
|
-
Z(
|
|
2938
|
+
Z(B.$slots, "command-bar", {}, void 0, !0)
|
|
2917
2939
|
]),
|
|
2918
2940
|
key: "0"
|
|
2919
2941
|
} : void 0
|
|
2920
|
-
]), 1032, ["actions", "table"
|
|
2921
|
-
|
|
2942
|
+
]), 1032, ["actions", "table"]),
|
|
2943
|
+
m(ht, et({
|
|
2922
2944
|
ref_key: "tableRef",
|
|
2923
2945
|
ref: s,
|
|
2924
2946
|
class: "yk-table-page__table"
|
|
2925
|
-
},
|
|
2926
|
-
onDataLoaded: h[1] || (h[1] = (
|
|
2927
|
-
"onUpdate:viewMode": h[2] || (h[2] = (
|
|
2928
|
-
"onUpdate:showCheckbox": h[3] || (h[3] = (
|
|
2929
|
-
"onUpdate:columnResizable": h[4] || (h[4] = (
|
|
2930
|
-
"onUpdate:stickyHeader": h[5] || (h[5] = (
|
|
2931
|
-
}),
|
|
2932
|
-
|
|
2947
|
+
}, x.value, {
|
|
2948
|
+
onDataLoaded: h[1] || (h[1] = (b) => a("data-loaded", b)),
|
|
2949
|
+
"onUpdate:viewMode": h[2] || (h[2] = (b) => a("update:viewMode", b)),
|
|
2950
|
+
"onUpdate:showCheckbox": h[3] || (h[3] = (b) => a("update:showCheckbox", b)),
|
|
2951
|
+
"onUpdate:columnResizable": h[4] || (h[4] = (b) => a("update:columnResizable", b)),
|
|
2952
|
+
"onUpdate:stickyHeader": h[5] || (h[5] = (b) => a("update:stickyHeader", b))
|
|
2953
|
+
}), De({ _: 2 }, [
|
|
2954
|
+
B.$slots.card ? {
|
|
2933
2955
|
name: "card",
|
|
2934
|
-
fn: o((
|
|
2935
|
-
Z(
|
|
2956
|
+
fn: o((b) => [
|
|
2957
|
+
Z(B.$slots, "card", Te(Ye(b)), void 0, !0)
|
|
2936
2958
|
]),
|
|
2937
2959
|
key: "0"
|
|
2938
2960
|
} : void 0,
|
|
2939
|
-
|
|
2961
|
+
B.$slots.list ? {
|
|
2940
2962
|
name: "list",
|
|
2941
|
-
fn: o((
|
|
2942
|
-
Z(
|
|
2963
|
+
fn: o((b) => [
|
|
2964
|
+
Z(B.$slots, "list", Te(Ye(b)), void 0, !0)
|
|
2943
2965
|
]),
|
|
2944
2966
|
key: "1"
|
|
2945
2967
|
} : void 0,
|
|
2946
|
-
|
|
2968
|
+
B.$slots.empty ? {
|
|
2947
2969
|
name: "empty",
|
|
2948
|
-
fn: o((
|
|
2949
|
-
Z(
|
|
2970
|
+
fn: o((b) => [
|
|
2971
|
+
Z(B.$slots, "empty", Te(Ye(b)), void 0, !0)
|
|
2950
2972
|
]),
|
|
2951
2973
|
key: "2"
|
|
2952
2974
|
} : void 0,
|
|
2953
|
-
|
|
2975
|
+
B.$slots.loading ? {
|
|
2954
2976
|
name: "loading",
|
|
2955
|
-
fn: o((
|
|
2956
|
-
Z(
|
|
2977
|
+
fn: o((b) => [
|
|
2978
|
+
Z(B.$slots, "loading", Te(Ye(b)), void 0, !0)
|
|
2957
2979
|
]),
|
|
2958
2980
|
key: "3"
|
|
2959
2981
|
} : void 0,
|
|
2960
|
-
|
|
2982
|
+
B.$slots.footer ? {
|
|
2961
2983
|
name: "footer",
|
|
2962
|
-
fn: o((
|
|
2963
|
-
Z(
|
|
2984
|
+
fn: o((b) => [
|
|
2985
|
+
Z(B.$slots, "footer", Te(Ye(b)), void 0, !0)
|
|
2964
2986
|
]),
|
|
2965
2987
|
key: "4"
|
|
2966
2988
|
} : void 0
|
|
2967
2989
|
]), 1040)
|
|
2968
2990
|
]));
|
|
2969
2991
|
}
|
|
2970
|
-
}),
|
|
2992
|
+
}), In = /* @__PURE__ */ ie(En, [["__scopeId", "data-v-47578bf2"]]);
|
|
2971
2993
|
function Rt(e) {
|
|
2972
2994
|
if (e == null) return "";
|
|
2973
2995
|
if (typeof e == "object")
|
|
@@ -2978,7 +3000,7 @@ function Rt(e) {
|
|
|
2978
3000
|
}
|
|
2979
3001
|
return String(e);
|
|
2980
3002
|
}
|
|
2981
|
-
const
|
|
3003
|
+
const Tn = /* @__PURE__ */ ee({
|
|
2982
3004
|
__name: "importRowEditDialog",
|
|
2983
3005
|
props: {
|
|
2984
3006
|
visible: { type: Boolean },
|
|
@@ -2987,58 +3009,58 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
2987
3009
|
saver: { type: Function }
|
|
2988
3010
|
},
|
|
2989
3011
|
emits: ["update:visible", "saved"],
|
|
2990
|
-
setup(e, { emit:
|
|
2991
|
-
const l = e, t =
|
|
3012
|
+
setup(e, { emit: v }) {
|
|
3013
|
+
const l = e, t = v, a = T({}), f = T([]);
|
|
2992
3014
|
de(
|
|
2993
3015
|
() => l.visible,
|
|
2994
3016
|
(i) => {
|
|
2995
3017
|
if (!i || !l.row) return;
|
|
2996
|
-
const
|
|
3018
|
+
const x = {};
|
|
2997
3019
|
for (const V of l.columns)
|
|
2998
|
-
|
|
2999
|
-
a.value =
|
|
3020
|
+
x[V.name] = Rt(l.row.data[V.name]);
|
|
3021
|
+
a.value = x, f.value = [];
|
|
3000
3022
|
}
|
|
3001
3023
|
);
|
|
3002
3024
|
function s() {
|
|
3003
3025
|
t("update:visible", !1);
|
|
3004
3026
|
}
|
|
3005
|
-
function
|
|
3027
|
+
function r() {
|
|
3006
3028
|
if (!l.row) return;
|
|
3007
3029
|
const i = {};
|
|
3008
|
-
for (const
|
|
3009
|
-
i[
|
|
3010
|
-
const { row:
|
|
3011
|
-
|
|
3012
|
-
}
|
|
3013
|
-
return (i,
|
|
3014
|
-
const V = S("el-alert"),
|
|
3015
|
-
return n(),
|
|
3030
|
+
for (const D of l.columns)
|
|
3031
|
+
i[D.name] = a.value[D.name] ?? "";
|
|
3032
|
+
const { row: x, errors: V } = l.saver(l.row, i);
|
|
3033
|
+
f.value = V, !(V.length > 0) && (t("saved", x), t("update:visible", !1));
|
|
3034
|
+
}
|
|
3035
|
+
return (i, x) => {
|
|
3036
|
+
const V = S("el-alert"), D = S("el-input"), j = S("el-form-item"), B = S("el-form"), h = S("el-button"), b = S("el-dialog");
|
|
3037
|
+
return n(), w(b, {
|
|
3016
3038
|
"model-value": e.visible,
|
|
3017
3039
|
title: e.row ? `编辑第 ${e.row.rowNumber} 行` : "编辑数据行",
|
|
3018
3040
|
width: "480px",
|
|
3019
3041
|
"append-to-body": "",
|
|
3020
3042
|
"close-on-click-modal": !1,
|
|
3021
|
-
"onUpdate:modelValue":
|
|
3043
|
+
"onUpdate:modelValue": x[1] || (x[1] = (L) => t("update:visible", L))
|
|
3022
3044
|
}, {
|
|
3023
3045
|
footer: o(() => [
|
|
3024
|
-
|
|
3025
|
-
default: o(() => [...
|
|
3046
|
+
m(h, { onClick: s }, {
|
|
3047
|
+
default: o(() => [...x[2] || (x[2] = [
|
|
3026
3048
|
F("取消", -1)
|
|
3027
3049
|
])]),
|
|
3028
3050
|
_: 1
|
|
3029
3051
|
}),
|
|
3030
|
-
|
|
3052
|
+
m(h, {
|
|
3031
3053
|
type: "primary",
|
|
3032
|
-
onClick:
|
|
3054
|
+
onClick: r
|
|
3033
3055
|
}, {
|
|
3034
|
-
default: o(() => [...
|
|
3056
|
+
default: o(() => [...x[3] || (x[3] = [
|
|
3035
3057
|
F("保存并重新校验", -1)
|
|
3036
3058
|
])]),
|
|
3037
3059
|
_: 1
|
|
3038
3060
|
})
|
|
3039
3061
|
]),
|
|
3040
3062
|
default: o(() => [
|
|
3041
|
-
|
|
3063
|
+
f.value.length > 0 ? (n(), w(V, {
|
|
3042
3064
|
key: 0,
|
|
3043
3065
|
class: "yk-import-row-edit-dialog__alert",
|
|
3044
3066
|
type: "error",
|
|
@@ -3046,27 +3068,27 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3046
3068
|
"show-icon": ""
|
|
3047
3069
|
}, {
|
|
3048
3070
|
default: o(() => [
|
|
3049
|
-
(n(!0),
|
|
3071
|
+
(n(!0), y(H, null, le(f.value, (L, q) => (n(), y("div", { key: q }, Y(L), 1))), 128))
|
|
3050
3072
|
]),
|
|
3051
3073
|
_: 1
|
|
3052
|
-
})) :
|
|
3053
|
-
|
|
3074
|
+
})) : z("", !0),
|
|
3075
|
+
m(B, {
|
|
3054
3076
|
"label-width": "92px",
|
|
3055
|
-
onSubmit:
|
|
3077
|
+
onSubmit: x[0] || (x[0] = ct(() => {
|
|
3056
3078
|
}, ["prevent"]))
|
|
3057
3079
|
}, {
|
|
3058
3080
|
default: o(() => [
|
|
3059
|
-
(n(!0),
|
|
3081
|
+
(n(!0), y(H, null, le(e.columns, (L) => (n(), w(j, {
|
|
3060
3082
|
key: L.name,
|
|
3061
3083
|
label: L.name,
|
|
3062
3084
|
required: !L.optional
|
|
3063
3085
|
}, {
|
|
3064
3086
|
default: o(() => [
|
|
3065
|
-
|
|
3087
|
+
m(D, {
|
|
3066
3088
|
modelValue: a.value[L.name],
|
|
3067
3089
|
"onUpdate:modelValue": (q) => a.value[L.name] = q,
|
|
3068
3090
|
placeholder: L.optional ? "可留空" : `请输入${L.name}`,
|
|
3069
|
-
onKeyup: We(
|
|
3091
|
+
onKeyup: We(r, ["enter"])
|
|
3070
3092
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
3071
3093
|
]),
|
|
3072
3094
|
_: 2
|
|
@@ -3079,28 +3101,28 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3079
3101
|
}, 8, ["model-value", "title"]);
|
|
3080
3102
|
};
|
|
3081
3103
|
}
|
|
3082
|
-
}),
|
|
3104
|
+
}), Yn = /* @__PURE__ */ ie(Tn, [["__scopeId", "data-v-24918b65"]]), Qn = ["accept"], Nn = { class: "yk-import-excel__toolbar" }, On = ["title"], qn = {
|
|
3083
3105
|
key: 2,
|
|
3084
3106
|
class: "yk-import-excel__stats"
|
|
3085
|
-
},
|
|
3107
|
+
}, Ln = { class: "yk-import-excel__stat" }, Un = { class: "yk-import-excel__stat" }, Kn = { class: "yk-import-excel__stat yk-import-excel__stat--danger" }, jn = {
|
|
3086
3108
|
key: 0,
|
|
3087
3109
|
class: "yk-import-excel__progress"
|
|
3088
|
-
},
|
|
3110
|
+
}, Hn = { class: "yk-import-excel__progress-meta" }, Gn = { class: "yk-import-excel__danger-text" }, Wn = { class: "yk-import-excel__progress-eta" }, Jn = { class: "yk-import-excel__body" }, Xn = ["title"], Zn = {
|
|
3089
3111
|
key: 0,
|
|
3090
3112
|
class: "yk-import-excel__spin"
|
|
3091
|
-
},
|
|
3113
|
+
}, eo = {
|
|
3092
3114
|
key: 0,
|
|
3093
3115
|
class: "yk-import-excel__msg yk-import-excel__msg--danger"
|
|
3094
|
-
},
|
|
3116
|
+
}, to = {
|
|
3095
3117
|
key: 1,
|
|
3096
3118
|
class: "yk-import-excel__msg yk-import-excel__msg--danger"
|
|
3097
|
-
},
|
|
3119
|
+
}, lo = {
|
|
3098
3120
|
key: 1,
|
|
3099
3121
|
class: "yk-import-excel__action-placeholder"
|
|
3100
|
-
},
|
|
3122
|
+
}, no = { class: "yk-import-excel__empty-hint" }, oo = {
|
|
3101
3123
|
key: 1,
|
|
3102
3124
|
class: "yk-import-excel__drop-mask"
|
|
3103
|
-
},
|
|
3125
|
+
}, ao = /* @__PURE__ */ ee({
|
|
3104
3126
|
__name: "importExcel",
|
|
3105
3127
|
props: {
|
|
3106
3128
|
columns: {},
|
|
@@ -3110,28 +3132,28 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3110
3132
|
autoScroll: { type: Boolean, default: !0 }
|
|
3111
3133
|
},
|
|
3112
3134
|
emits: ["loaded", "selection-change", "processed", "row-update", "row-remove"],
|
|
3113
|
-
setup(e, { expose:
|
|
3135
|
+
setup(e, { expose: v, emit: l }) {
|
|
3114
3136
|
const t = e, a = l, {
|
|
3115
|
-
rows:
|
|
3137
|
+
rows: f,
|
|
3116
3138
|
fileName: s,
|
|
3117
|
-
sheetName:
|
|
3139
|
+
sheetName: r,
|
|
3118
3140
|
loading: i,
|
|
3119
|
-
processing:
|
|
3141
|
+
processing: x,
|
|
3120
3142
|
stopping: V,
|
|
3121
|
-
processingTotal:
|
|
3143
|
+
processingTotal: D,
|
|
3122
3144
|
progressDone: j,
|
|
3123
|
-
progressSuccess:
|
|
3145
|
+
progressSuccess: B,
|
|
3124
3146
|
progressFailed: h,
|
|
3125
|
-
hasData:
|
|
3147
|
+
hasData: b,
|
|
3126
3148
|
invalidCount: L,
|
|
3127
3149
|
successCount: q,
|
|
3128
3150
|
failedCount: X,
|
|
3129
3151
|
selectedCount: U,
|
|
3130
|
-
pendingCount:
|
|
3131
|
-
loadFile:
|
|
3152
|
+
pendingCount: u,
|
|
3153
|
+
loadFile: g,
|
|
3132
3154
|
syncSelection: M,
|
|
3133
|
-
saveRowEdit:
|
|
3134
|
-
removeRow:
|
|
3155
|
+
saveRowEdit: Q,
|
|
3156
|
+
removeRow: O,
|
|
3135
3157
|
startProcessing: re,
|
|
3136
3158
|
stopProcessing: ae,
|
|
3137
3159
|
clear: W
|
|
@@ -3139,187 +3161,187 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3139
3161
|
columns: me(t, "columns"),
|
|
3140
3162
|
processor: me(t, "processor"),
|
|
3141
3163
|
parser: me(t, "parser")
|
|
3142
|
-
}),
|
|
3164
|
+
}), C = T(), k = T(), $ = {
|
|
3143
3165
|
valid: { label: "待处理", type: "info" },
|
|
3144
3166
|
invalid: { label: "校验失败", type: "danger" },
|
|
3145
3167
|
processing: { label: "处理中", type: "warning" },
|
|
3146
3168
|
success: { label: "成功", type: "success" },
|
|
3147
3169
|
failed: { label: "失败", type: "danger" }
|
|
3148
|
-
},
|
|
3149
|
-
() => Object.keys($).map((
|
|
3150
|
-
text: `${$[
|
|
3151
|
-
value:
|
|
3170
|
+
}, P = N(
|
|
3171
|
+
() => Object.keys($).map((_) => ({
|
|
3172
|
+
text: `${$[_].label}(${f.value.filter((R) => R.status === _).length})`,
|
|
3173
|
+
value: _
|
|
3152
3174
|
}))
|
|
3153
3175
|
);
|
|
3154
|
-
function G(
|
|
3155
|
-
return R.status ===
|
|
3176
|
+
function G(_, R) {
|
|
3177
|
+
return R.status === _;
|
|
3156
3178
|
}
|
|
3157
|
-
function
|
|
3158
|
-
var pe,
|
|
3179
|
+
function E(_) {
|
|
3180
|
+
var pe, we;
|
|
3159
3181
|
if (!t.autoScroll) return;
|
|
3160
|
-
const R = (pe =
|
|
3182
|
+
const R = (pe = C.value) == null ? void 0 : pe.$el, J = R == null ? void 0 : R.querySelector(".el-table__body-wrapper .el-scrollbar__wrap"), oe = R == null ? void 0 : R.querySelector(".el-table__body-wrapper tbody");
|
|
3161
3183
|
if (!R || !J || !oe) return;
|
|
3162
|
-
const
|
|
3184
|
+
const d = f.value.findIndex((Pt) => Pt.rowNumber === _), te = oe.querySelectorAll("tr")[d];
|
|
3163
3185
|
if (!te) return;
|
|
3164
|
-
const ue = J.getBoundingClientRect(), _e = te.getBoundingClientRect(),
|
|
3165
|
-
(
|
|
3186
|
+
const ue = J.getBoundingClientRect(), _e = te.getBoundingClientRect(), ne = Math.max(0, J.scrollHeight - J.clientHeight), ke = J.scrollTop + (_e.top - ue.top) - (J.clientHeight - _e.height) / 2;
|
|
3187
|
+
(we = C.value) == null || we.setScrollTop(Math.min(ne, Math.max(0, Math.round(ke))));
|
|
3166
3188
|
}
|
|
3167
3189
|
de(
|
|
3168
3190
|
() => {
|
|
3169
|
-
var
|
|
3170
|
-
return ((
|
|
3191
|
+
var _;
|
|
3192
|
+
return ((_ = f.value.find((R) => R.status === "processing")) == null ? void 0 : _.rowNumber) ?? null;
|
|
3171
3193
|
},
|
|
3172
|
-
(
|
|
3173
|
-
|
|
3194
|
+
(_) => {
|
|
3195
|
+
_ !== null && Ge(() => E(_));
|
|
3174
3196
|
}
|
|
3175
3197
|
);
|
|
3176
|
-
const I = T(0),
|
|
3198
|
+
const I = T(0), A = T(0);
|
|
3177
3199
|
let K;
|
|
3178
|
-
const se =
|
|
3179
|
-
const
|
|
3180
|
-
return
|
|
3200
|
+
const se = N(() => {
|
|
3201
|
+
const _ = D.value;
|
|
3202
|
+
return _ <= 0 ? 0 : Math.min(100, j.value / _ * 100);
|
|
3181
3203
|
});
|
|
3182
3204
|
function ce() {
|
|
3183
|
-
return `${j.value}/${
|
|
3205
|
+
return `${j.value}/${D.value}`;
|
|
3184
3206
|
}
|
|
3185
|
-
const be =
|
|
3186
|
-
if (!
|
|
3187
|
-
const R = (
|
|
3207
|
+
const be = N(() => {
|
|
3208
|
+
if (!x.value || j.value === 0) return "预计剩余 计算中…";
|
|
3209
|
+
const R = (A.value - I.value) / j.value, J = D.value - j.value;
|
|
3188
3210
|
return `预计剩余 ${Ve(R * J)}`;
|
|
3189
3211
|
});
|
|
3190
|
-
function Ve(
|
|
3191
|
-
const R = Math.max(0, Math.ceil(
|
|
3212
|
+
function Ve(_) {
|
|
3213
|
+
const R = Math.max(0, Math.ceil(_ / 1e3));
|
|
3192
3214
|
if (R < 60) return `${R} 秒`;
|
|
3193
3215
|
const J = Math.floor(R / 60), oe = R % 60;
|
|
3194
3216
|
return oe > 0 ? `${J} 分 ${oe} 秒` : `${J} 分`;
|
|
3195
3217
|
}
|
|
3196
|
-
de(
|
|
3197
|
-
|
|
3198
|
-
|
|
3218
|
+
de(x, (_) => {
|
|
3219
|
+
_ ? (I.value = Date.now(), A.value = I.value, K = setInterval(() => {
|
|
3220
|
+
A.value = Date.now();
|
|
3199
3221
|
}, 500)) : K && (clearInterval(K), K = void 0);
|
|
3200
3222
|
}), Ne(() => {
|
|
3201
3223
|
K && clearInterval(K);
|
|
3202
3224
|
});
|
|
3203
3225
|
function ge() {
|
|
3204
|
-
var
|
|
3205
|
-
(
|
|
3226
|
+
var _;
|
|
3227
|
+
(_ = k.value) == null || _.click();
|
|
3206
3228
|
}
|
|
3207
|
-
const he = T(0),
|
|
3208
|
-
function Fe(
|
|
3229
|
+
const he = T(0), xe = N(() => he.value > 0);
|
|
3230
|
+
function Fe(_) {
|
|
3209
3231
|
var R;
|
|
3210
|
-
return Array.from(((R =
|
|
3232
|
+
return Array.from(((R = _.dataTransfer) == null ? void 0 : R.types) ?? []).includes("Files");
|
|
3211
3233
|
}
|
|
3212
|
-
function qe(
|
|
3234
|
+
function qe(_) {
|
|
3213
3235
|
const R = t.accept.split(",").map((oe) => oe.trim().toLowerCase()).filter(Boolean);
|
|
3214
3236
|
if (R.length === 0) return !0;
|
|
3215
|
-
const J =
|
|
3237
|
+
const J = _.name.toLowerCase();
|
|
3216
3238
|
return R.some((oe) => J.endsWith(oe));
|
|
3217
3239
|
}
|
|
3218
|
-
async function Re(
|
|
3240
|
+
async function Re(_) {
|
|
3219
3241
|
var R;
|
|
3220
3242
|
if (!i.value) {
|
|
3221
|
-
if (!qe(
|
|
3243
|
+
if (!qe(_)) {
|
|
3222
3244
|
fe.error(`仅支持 ${t.accept} 格式的文件`);
|
|
3223
3245
|
return;
|
|
3224
3246
|
}
|
|
3225
3247
|
try {
|
|
3226
|
-
const J = await
|
|
3248
|
+
const J = await g(_);
|
|
3227
3249
|
a("loaded", J), await Ge();
|
|
3228
|
-
for (const oe of
|
|
3229
|
-
oe.status !== "invalid" && ((R =
|
|
3230
|
-
fe.success(`已加载 ${J.length} 行(工作表「${
|
|
3250
|
+
for (const oe of f.value)
|
|
3251
|
+
oe.status !== "invalid" && ((R = C.value) == null || R.toggleRowSelection(oe, !0));
|
|
3252
|
+
fe.success(`已加载 ${J.length} 行(工作表「${r.value}」)`);
|
|
3231
3253
|
} catch (J) {
|
|
3232
3254
|
fe.error(J instanceof Error ? J.message : String(J));
|
|
3233
3255
|
}
|
|
3234
3256
|
}
|
|
3235
3257
|
}
|
|
3236
|
-
async function Me(
|
|
3258
|
+
async function Me(_) {
|
|
3237
3259
|
var oe;
|
|
3238
|
-
const R =
|
|
3260
|
+
const R = _.target, J = (oe = R.files) == null ? void 0 : oe[0];
|
|
3239
3261
|
R.value = "", J && await Re(J);
|
|
3240
3262
|
}
|
|
3241
|
-
function Le(
|
|
3242
|
-
Fe(
|
|
3263
|
+
function Le(_) {
|
|
3264
|
+
Fe(_) && (he.value += 1);
|
|
3243
3265
|
}
|
|
3244
|
-
function
|
|
3245
|
-
Fe(
|
|
3266
|
+
function Ee(_) {
|
|
3267
|
+
Fe(_) && (_.preventDefault(), _.dataTransfer && (_.dataTransfer.dropEffect = "copy"));
|
|
3246
3268
|
}
|
|
3247
|
-
function
|
|
3248
|
-
Fe(
|
|
3269
|
+
function Pe(_) {
|
|
3270
|
+
Fe(_) && (he.value = Math.max(0, he.value - 1));
|
|
3249
3271
|
}
|
|
3250
|
-
function Ue(
|
|
3272
|
+
function Ue(_) {
|
|
3251
3273
|
var J, oe;
|
|
3252
|
-
if (!Fe(
|
|
3253
|
-
|
|
3254
|
-
const R = (oe = (J =
|
|
3274
|
+
if (!Fe(_)) return;
|
|
3275
|
+
_.preventDefault(), he.value = 0;
|
|
3276
|
+
const R = (oe = (J = _.dataTransfer) == null ? void 0 : J.files) == null ? void 0 : oe[0];
|
|
3255
3277
|
R && Re(R);
|
|
3256
3278
|
}
|
|
3257
|
-
function Ke(
|
|
3258
|
-
M(
|
|
3279
|
+
function Ke(_) {
|
|
3280
|
+
M(_), a("selection-change", _);
|
|
3259
3281
|
}
|
|
3260
|
-
function je(
|
|
3261
|
-
return
|
|
3282
|
+
function je(_) {
|
|
3283
|
+
return _.status !== "invalid";
|
|
3262
3284
|
}
|
|
3263
|
-
async function
|
|
3285
|
+
async function Ie() {
|
|
3264
3286
|
try {
|
|
3265
|
-
const
|
|
3266
|
-
if (!
|
|
3267
|
-
if (a("processed",
|
|
3268
|
-
const R =
|
|
3287
|
+
const _ = await re();
|
|
3288
|
+
if (!_) return;
|
|
3289
|
+
if (a("processed", _), _.stopped) {
|
|
3290
|
+
const R = _.total - _.success - _.failed;
|
|
3269
3291
|
fe.warning(
|
|
3270
|
-
`已停止:成功 ${
|
|
3292
|
+
`已停止:成功 ${_.success} 行,失败 ${_.failed} 行,剩余 ${R} 行未处理(可再次「开始处理」续跑)`
|
|
3271
3293
|
);
|
|
3272
|
-
} else
|
|
3273
|
-
} catch (
|
|
3274
|
-
fe.error(
|
|
3294
|
+
} else _.failed === 0 ? fe.success(`全部处理完成,共 ${_.success} 行`) : fe.warning(`处理完成:成功 ${_.success} 行,失败 ${_.failed} 行`);
|
|
3295
|
+
} catch (_) {
|
|
3296
|
+
fe.error(_ instanceof Error ? _.message : String(_));
|
|
3275
3297
|
}
|
|
3276
3298
|
}
|
|
3277
|
-
function
|
|
3278
|
-
return !
|
|
3299
|
+
function Ae(_) {
|
|
3300
|
+
return !x.value && (_.status === "invalid" || _.status === "failed");
|
|
3279
3301
|
}
|
|
3280
3302
|
const ze = T(!1), ye = T(null);
|
|
3281
|
-
function Je(
|
|
3282
|
-
|
|
3303
|
+
function Je(_) {
|
|
3304
|
+
Ae(_) && (ye.value = _, ze.value = !0);
|
|
3283
3305
|
}
|
|
3284
|
-
async function He(
|
|
3306
|
+
async function He(_) {
|
|
3285
3307
|
var R;
|
|
3286
|
-
a("row-update",
|
|
3308
|
+
a("row-update", _), await Ge(), (R = C.value) == null || R.toggleRowSelection(_, !0), fe.success(`第 ${_.rowNumber} 行已修正,可重新处理`);
|
|
3287
3309
|
}
|
|
3288
|
-
async function Xe(
|
|
3289
|
-
if (
|
|
3310
|
+
async function Xe(_) {
|
|
3311
|
+
if (Ae(_)) {
|
|
3290
3312
|
try {
|
|
3291
3313
|
await kt.confirm(
|
|
3292
|
-
`确定删除第 ${
|
|
3314
|
+
`确定删除第 ${_.rowNumber} 行吗?删除后不可恢复。`,
|
|
3293
3315
|
"删除数据行",
|
|
3294
3316
|
{ type: "warning", confirmButtonText: "删除", cancelButtonText: "取消" }
|
|
3295
3317
|
);
|
|
3296
3318
|
} catch {
|
|
3297
3319
|
return;
|
|
3298
3320
|
}
|
|
3299
|
-
|
|
3321
|
+
O(_), a("row-remove", _), fe.success(`已删除第 ${_.rowNumber} 行`);
|
|
3300
3322
|
}
|
|
3301
3323
|
}
|
|
3302
|
-
return
|
|
3303
|
-
const J = S("el-button"), oe = S("el-progress"),
|
|
3304
|
-
return n(),
|
|
3324
|
+
return v({ openFilePicker: ge, startProcessing: Ie, stopProcessing: ae, clear: W }), (_, R) => {
|
|
3325
|
+
const J = S("el-button"), oe = S("el-progress"), d = S("el-table-column"), te = S("el-tag"), ue = S("el-table"), _e = pt("loading");
|
|
3326
|
+
return n(), y("div", {
|
|
3305
3327
|
class: "yk-import-excel",
|
|
3306
3328
|
onDragenter: Le,
|
|
3307
|
-
onDragover:
|
|
3308
|
-
onDragleave:
|
|
3329
|
+
onDragover: Ee,
|
|
3330
|
+
onDragleave: Pe,
|
|
3309
3331
|
onDrop: Ue
|
|
3310
3332
|
}, [
|
|
3311
|
-
|
|
3333
|
+
p("input", {
|
|
3312
3334
|
ref_key: "fileInputRef",
|
|
3313
|
-
ref:
|
|
3335
|
+
ref: k,
|
|
3314
3336
|
class: "yk-import-excel__file",
|
|
3315
3337
|
type: "file",
|
|
3316
3338
|
accept: t.accept,
|
|
3317
3339
|
onChange: Me
|
|
3318
|
-
}, null, 40,
|
|
3319
|
-
|
|
3320
|
-
|
|
3340
|
+
}, null, 40, Qn),
|
|
3341
|
+
p("div", Nn, [
|
|
3342
|
+
m(J, {
|
|
3321
3343
|
type: "primary",
|
|
3322
|
-
loading:
|
|
3344
|
+
loading: c(i),
|
|
3323
3345
|
onClick: ge
|
|
3324
3346
|
}, {
|
|
3325
3347
|
default: o(() => [...R[1] || (R[1] = [
|
|
@@ -3327,73 +3349,73 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3327
3349
|
])]),
|
|
3328
3350
|
_: 1
|
|
3329
3351
|
}, 8, ["loading"]),
|
|
3330
|
-
|
|
3352
|
+
m(J, {
|
|
3331
3353
|
type: "success",
|
|
3332
|
-
loading:
|
|
3333
|
-
disabled:
|
|
3334
|
-
onClick:
|
|
3354
|
+
loading: c(x),
|
|
3355
|
+
disabled: c(u) === 0,
|
|
3356
|
+
onClick: Ie
|
|
3335
3357
|
}, {
|
|
3336
3358
|
default: o(() => [
|
|
3337
|
-
F(" 开始处理" +
|
|
3359
|
+
F(" 开始处理" + Y(c(u) > 0 ? `(${c(u)} 行)` : ""), 1)
|
|
3338
3360
|
]),
|
|
3339
3361
|
_: 1
|
|
3340
3362
|
}, 8, ["loading", "disabled"]),
|
|
3341
|
-
|
|
3363
|
+
c(x) ? (n(), w(J, {
|
|
3342
3364
|
key: 0,
|
|
3343
3365
|
type: "danger",
|
|
3344
|
-
disabled:
|
|
3345
|
-
onClick:
|
|
3366
|
+
disabled: c(V),
|
|
3367
|
+
onClick: c(ae)
|
|
3346
3368
|
}, {
|
|
3347
3369
|
default: o(() => [
|
|
3348
|
-
F(
|
|
3370
|
+
F(Y(c(V) ? "正在停止…" : "停止"), 1)
|
|
3349
3371
|
]),
|
|
3350
3372
|
_: 1
|
|
3351
|
-
}, 8, ["disabled", "onClick"])) :
|
|
3352
|
-
|
|
3353
|
-
disabled: !
|
|
3354
|
-
onClick:
|
|
3373
|
+
}, 8, ["disabled", "onClick"])) : z("", !0),
|
|
3374
|
+
m(J, {
|
|
3375
|
+
disabled: !c(b) || c(x),
|
|
3376
|
+
onClick: c(W)
|
|
3355
3377
|
}, {
|
|
3356
3378
|
default: o(() => [...R[2] || (R[2] = [
|
|
3357
3379
|
F("清空", -1)
|
|
3358
3380
|
])]),
|
|
3359
3381
|
_: 1
|
|
3360
3382
|
}, 8, ["disabled", "onClick"]),
|
|
3361
|
-
|
|
3383
|
+
c(s) ? (n(), y("span", {
|
|
3362
3384
|
key: 1,
|
|
3363
3385
|
class: "yk-import-excel__file-name",
|
|
3364
|
-
title:
|
|
3386
|
+
title: c(s)
|
|
3365
3387
|
}, [
|
|
3366
|
-
F(" 📄 " +
|
|
3367
|
-
|
|
3368
|
-
F("(工作表:" +
|
|
3369
|
-
], 64)) :
|
|
3370
|
-
], 8,
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
])) :
|
|
3388
|
+
F(" 📄 " + Y(c(s)), 1),
|
|
3389
|
+
c(r) ? (n(), y(H, { key: 0 }, [
|
|
3390
|
+
F("(工作表:" + Y(c(r)) + ")", 1)
|
|
3391
|
+
], 64)) : z("", !0)
|
|
3392
|
+
], 8, On)) : z("", !0),
|
|
3393
|
+
c(b) ? (n(), y("div", qn, [
|
|
3394
|
+
p("span", Ln, "共 " + Y(c(f).length) + " 行", 1),
|
|
3395
|
+
p("span", Un, "已选 " + Y(c(U)), 1),
|
|
3396
|
+
p("span", Kn, "校验失败 " + Y(c(L)), 1)
|
|
3397
|
+
])) : z("", !0)
|
|
3376
3398
|
]),
|
|
3377
|
-
|
|
3378
|
-
|
|
3399
|
+
c(x) ? (n(), y("div", jn, [
|
|
3400
|
+
m(oe, {
|
|
3379
3401
|
percentage: se.value,
|
|
3380
3402
|
"stroke-width": 14,
|
|
3381
3403
|
"text-inside": "",
|
|
3382
3404
|
format: ce,
|
|
3383
3405
|
class: "yk-import-excel__progress-bar"
|
|
3384
3406
|
}, null, 8, ["percentage"]),
|
|
3385
|
-
|
|
3386
|
-
F(" 成功 " +
|
|
3387
|
-
|
|
3407
|
+
p("span", Hn, [
|
|
3408
|
+
F(" 成功 " + Y(c(B)), 1),
|
|
3409
|
+
p("span", Gn, " / 失败 " + Y(c(h)), 1)
|
|
3388
3410
|
]),
|
|
3389
|
-
|
|
3390
|
-
])) :
|
|
3391
|
-
Ze((n(),
|
|
3392
|
-
|
|
3411
|
+
p("span", Wn, Y(be.value), 1)
|
|
3412
|
+
])) : z("", !0),
|
|
3413
|
+
Ze((n(), y("div", Jn, [
|
|
3414
|
+
c(b) ? (n(), w(ue, {
|
|
3393
3415
|
key: 0,
|
|
3394
3416
|
ref_key: "tableRef",
|
|
3395
|
-
ref:
|
|
3396
|
-
data:
|
|
3417
|
+
ref: C,
|
|
3418
|
+
data: c(f),
|
|
3397
3419
|
height: "100%",
|
|
3398
3420
|
"row-key": "rowNumber",
|
|
3399
3421
|
border: "",
|
|
@@ -3401,78 +3423,78 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3401
3423
|
onSelectionChange: Ke
|
|
3402
3424
|
}, {
|
|
3403
3425
|
default: o(() => [
|
|
3404
|
-
|
|
3426
|
+
m(d, {
|
|
3405
3427
|
type: "selection",
|
|
3406
3428
|
width: "44",
|
|
3407
3429
|
fixed: "left",
|
|
3408
3430
|
selectable: je
|
|
3409
3431
|
}),
|
|
3410
|
-
|
|
3432
|
+
m(d, {
|
|
3411
3433
|
label: "行号",
|
|
3412
3434
|
width: "70",
|
|
3413
3435
|
align: "center",
|
|
3414
3436
|
fixed: "left"
|
|
3415
3437
|
}, {
|
|
3416
|
-
default: o(({ row:
|
|
3417
|
-
|
|
3418
|
-
title: `Excel 第 ${
|
|
3419
|
-
},
|
|
3438
|
+
default: o(({ row: ne, $index: ke }) => [
|
|
3439
|
+
p("span", {
|
|
3440
|
+
title: `Excel 第 ${ne.rowNumber} 行`
|
|
3441
|
+
}, Y(ke + 1), 9, Xn)
|
|
3420
3442
|
]),
|
|
3421
3443
|
_: 1
|
|
3422
3444
|
}),
|
|
3423
|
-
(n(!0),
|
|
3424
|
-
key:
|
|
3425
|
-
label:
|
|
3445
|
+
(n(!0), y(H, null, le(t.columns, (ne) => (n(), w(d, {
|
|
3446
|
+
key: ne.name,
|
|
3447
|
+
label: ne.name,
|
|
3426
3448
|
"min-width": "120",
|
|
3427
3449
|
"show-overflow-tooltip": ""
|
|
3428
3450
|
}, {
|
|
3429
3451
|
default: o(({ row: ke }) => [
|
|
3430
|
-
F(
|
|
3452
|
+
F(Y(c(Rt)(ke.data[ne.name])), 1)
|
|
3431
3453
|
]),
|
|
3432
3454
|
_: 2
|
|
3433
3455
|
}, 1032, ["label"]))), 128)),
|
|
3434
|
-
|
|
3456
|
+
m(d, {
|
|
3435
3457
|
label: "状态",
|
|
3436
3458
|
width: "200",
|
|
3437
3459
|
fixed: "right",
|
|
3438
3460
|
"class-name": "yk-import-excel__status-cell",
|
|
3439
|
-
filters:
|
|
3461
|
+
filters: P.value,
|
|
3440
3462
|
"filter-method": G,
|
|
3441
3463
|
"filter-multiple": !1,
|
|
3442
3464
|
"filter-placement": "bottom-end"
|
|
3443
3465
|
}, {
|
|
3444
|
-
default: o(({ row:
|
|
3445
|
-
|
|
3446
|
-
type: $[
|
|
3466
|
+
default: o(({ row: ne }) => [
|
|
3467
|
+
m(te, {
|
|
3468
|
+
type: $[ne.status].type,
|
|
3447
3469
|
size: "small",
|
|
3448
3470
|
"disable-transitions": ""
|
|
3449
3471
|
}, {
|
|
3450
3472
|
default: o(() => [
|
|
3451
|
-
|
|
3452
|
-
F(" " +
|
|
3473
|
+
ne.status === "processing" ? (n(), y("span", Zn)) : z("", !0),
|
|
3474
|
+
F(" " + Y($[ne.status].label), 1)
|
|
3453
3475
|
]),
|
|
3454
3476
|
_: 2
|
|
3455
3477
|
}, 1032, ["type"]),
|
|
3456
|
-
|
|
3478
|
+
ne.status === "invalid" ? (n(), y("div", eo, Y(ne.errors.join(";")), 1)) : ne.message ? (n(), y("div", to, Y(ne.message), 1)) : z("", !0)
|
|
3457
3479
|
]),
|
|
3458
3480
|
_: 1
|
|
3459
3481
|
}, 8, ["filters"]),
|
|
3460
|
-
|
|
3482
|
+
m(d, {
|
|
3461
3483
|
label: "操作",
|
|
3462
3484
|
width: "110",
|
|
3463
3485
|
fixed: "right",
|
|
3464
3486
|
align: "center"
|
|
3465
3487
|
}, {
|
|
3466
|
-
default: o(({ row:
|
|
3467
|
-
|
|
3468
|
-
|
|
3488
|
+
default: o(({ row: ne }) => [
|
|
3489
|
+
Ae(ne) ? (n(), y(H, { key: 0 }, [
|
|
3490
|
+
m(J, {
|
|
3469
3491
|
link: "",
|
|
3470
3492
|
type: "primary",
|
|
3471
3493
|
size: "small",
|
|
3472
|
-
onClick: (ke) => Je(
|
|
3494
|
+
onClick: (ke) => Je(ne)
|
|
3473
3495
|
}, {
|
|
3474
3496
|
default: o(() => [...R[3] || (R[3] = [
|
|
3475
|
-
|
|
3497
|
+
p("svg", {
|
|
3476
3498
|
class: "yk-import-excel__action-icon",
|
|
3477
3499
|
viewBox: "0 0 24 24",
|
|
3478
3500
|
fill: "none",
|
|
@@ -3482,21 +3504,21 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3482
3504
|
"stroke-linejoin": "round",
|
|
3483
3505
|
"aria-hidden": "true"
|
|
3484
3506
|
}, [
|
|
3485
|
-
|
|
3486
|
-
|
|
3507
|
+
p("path", { d: "M12 20h9" }),
|
|
3508
|
+
p("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" })
|
|
3487
3509
|
], -1),
|
|
3488
3510
|
F(" 编辑 ", -1)
|
|
3489
3511
|
])]),
|
|
3490
3512
|
_: 1
|
|
3491
3513
|
}, 8, ["onClick"]),
|
|
3492
|
-
|
|
3514
|
+
m(J, {
|
|
3493
3515
|
link: "",
|
|
3494
3516
|
type: "danger",
|
|
3495
3517
|
size: "small",
|
|
3496
|
-
onClick: (ke) => Xe(
|
|
3518
|
+
onClick: (ke) => Xe(ne)
|
|
3497
3519
|
}, {
|
|
3498
3520
|
default: o(() => [...R[4] || (R[4] = [
|
|
3499
|
-
|
|
3521
|
+
p("svg", {
|
|
3500
3522
|
class: "yk-import-excel__action-icon",
|
|
3501
3523
|
viewBox: "0 0 24 24",
|
|
3502
3524
|
fill: "none",
|
|
@@ -3506,15 +3528,15 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3506
3528
|
"stroke-linejoin": "round",
|
|
3507
3529
|
"aria-hidden": "true"
|
|
3508
3530
|
}, [
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3531
|
+
p("polyline", { points: "3 6 5 6 21 6" }),
|
|
3532
|
+
p("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }),
|
|
3533
|
+
p("line", {
|
|
3512
3534
|
x1: "10",
|
|
3513
3535
|
y1: "11",
|
|
3514
3536
|
x2: "10",
|
|
3515
3537
|
y2: "17"
|
|
3516
3538
|
}),
|
|
3517
|
-
|
|
3539
|
+
p("line", {
|
|
3518
3540
|
x1: "14",
|
|
3519
3541
|
y1: "11",
|
|
3520
3542
|
x2: "14",
|
|
@@ -3525,50 +3547,50 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3525
3547
|
])]),
|
|
3526
3548
|
_: 1
|
|
3527
3549
|
}, 8, ["onClick"])
|
|
3528
|
-
], 64)) : (n(),
|
|
3550
|
+
], 64)) : (n(), y("span", lo, "—"))
|
|
3529
3551
|
]),
|
|
3530
3552
|
_: 1
|
|
3531
3553
|
})
|
|
3532
3554
|
]),
|
|
3533
3555
|
_: 1
|
|
3534
|
-
}, 8, ["data"])) : (n(),
|
|
3556
|
+
}, 8, ["data"])) : (n(), y("div", {
|
|
3535
3557
|
key: 1,
|
|
3536
3558
|
class: "yk-import-excel__empty",
|
|
3537
3559
|
onClick: ge
|
|
3538
3560
|
}, [
|
|
3539
3561
|
R[5] || (R[5] = ot('<svg class="yk-import-excel__empty-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-2d035039><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" data-v-2d035039></path><polyline points="14 2 14 8 20 8" data-v-2d035039></polyline><path d="M12 18v-6" data-v-2d035039></path><polyline points="9.5 14.5 12 12l2.5 2.5" data-v-2d035039></polyline></svg><p class="yk-import-excel__empty-title" data-v-2d035039>点击选择 Excel 文件,或将文件拖拽到此处</p>', 2)),
|
|
3540
|
-
|
|
3562
|
+
p("p", no, "支持 " + Y(t.accept) + " 格式,首行需为表头", 1)
|
|
3541
3563
|
]))
|
|
3542
3564
|
])), [
|
|
3543
|
-
[_e,
|
|
3565
|
+
[_e, c(i)]
|
|
3544
3566
|
]),
|
|
3545
|
-
|
|
3567
|
+
xe.value ? (n(), y("div", oo, [...R[6] || (R[6] = [
|
|
3546
3568
|
ot('<div class="yk-import-excel__drop-tip" data-v-2d035039><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-2d035039><path d="M12 15V3" data-v-2d035039></path><polyline points="7 8 12 3 17 8" data-v-2d035039></polyline><path d="M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4" data-v-2d035039></path></svg><span data-v-2d035039>松开鼠标,加载 Excel 文件</span></div>', 1)
|
|
3547
|
-
])])) :
|
|
3548
|
-
|
|
3569
|
+
])])) : z("", !0),
|
|
3570
|
+
m(Yn, {
|
|
3549
3571
|
visible: ze.value,
|
|
3550
|
-
"onUpdate:visible": R[0] || (R[0] = (
|
|
3572
|
+
"onUpdate:visible": R[0] || (R[0] = (ne) => ze.value = ne),
|
|
3551
3573
|
row: ye.value,
|
|
3552
3574
|
columns: t.columns,
|
|
3553
|
-
saver:
|
|
3575
|
+
saver: c(Q),
|
|
3554
3576
|
onSaved: He
|
|
3555
3577
|
}, null, 8, ["visible", "row", "columns", "saver"])
|
|
3556
3578
|
], 32);
|
|
3557
3579
|
};
|
|
3558
3580
|
}
|
|
3559
|
-
}),
|
|
3581
|
+
}), so = /* @__PURE__ */ ie(ao, [["__scopeId", "data-v-2d035039"]]), io = { class: "yk-infinite-list__item-body" }, ro = { class: "yk-infinite-list__item-json" }, uo = {
|
|
3560
3582
|
key: 0,
|
|
3561
3583
|
class: "yk-infinite-list__status"
|
|
3562
|
-
},
|
|
3584
|
+
}, co = {
|
|
3563
3585
|
key: 1,
|
|
3564
3586
|
class: "yk-infinite-list__status"
|
|
3565
|
-
},
|
|
3587
|
+
}, po = {
|
|
3566
3588
|
key: 2,
|
|
3567
3589
|
class: "yk-infinite-list__loading-more"
|
|
3568
|
-
},
|
|
3590
|
+
}, mo = {
|
|
3569
3591
|
key: 3,
|
|
3570
3592
|
class: "yk-infinite-list__no-more"
|
|
3571
|
-
},
|
|
3593
|
+
}, fo = /* @__PURE__ */ ee({
|
|
3572
3594
|
name: "YsInfiniteList",
|
|
3573
3595
|
__name: "infiniteList",
|
|
3574
3596
|
props: {
|
|
@@ -3611,19 +3633,19 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3611
3633
|
exportPageSize: { type: Number, default: 1e3 }
|
|
3612
3634
|
},
|
|
3613
3635
|
emits: ["data-loaded", "error", "selection-change"],
|
|
3614
|
-
setup(e, { expose:
|
|
3615
|
-
const t = e, a = l,
|
|
3636
|
+
setup(e, { expose: v, emit: l }) {
|
|
3637
|
+
const t = e, a = l, f = T([]), s = T(!1), r = T(!1), i = T(!0), x = T(null), V = N(() => f.value.length), D = T(null), {
|
|
3616
3638
|
/** 跨页累计选中的行(滚动加载更多不丢失) */
|
|
3617
3639
|
selectedRows: j,
|
|
3618
|
-
isRowSelected:
|
|
3640
|
+
isRowSelected: B,
|
|
3619
3641
|
toggleRowSelection: h,
|
|
3620
|
-
clearSelection:
|
|
3642
|
+
clearSelection: b,
|
|
3621
3643
|
selectAllOnPage: L,
|
|
3622
3644
|
invertSelectionOnPage: q
|
|
3623
|
-
} = yt({ tableEl:
|
|
3624
|
-
de(j, (
|
|
3645
|
+
} = yt({ tableEl: D, rows: f, rowKey: me(t, "rowKey") });
|
|
3646
|
+
de(j, (E) => a("selection-change", [...E]));
|
|
3625
3647
|
const X = T(0), U = T(null);
|
|
3626
|
-
async function
|
|
3648
|
+
async function u() {
|
|
3627
3649
|
if (!t.metaFun) {
|
|
3628
3650
|
U.value = null;
|
|
3629
3651
|
return;
|
|
@@ -3634,38 +3656,38 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3634
3656
|
U.value = null;
|
|
3635
3657
|
}
|
|
3636
3658
|
}
|
|
3637
|
-
const
|
|
3638
|
-
const
|
|
3639
|
-
if (
|
|
3640
|
-
return
|
|
3641
|
-
const I = /* @__PURE__ */ new Set(),
|
|
3642
|
-
for (const K of
|
|
3659
|
+
const g = N(() => {
|
|
3660
|
+
const E = U.value;
|
|
3661
|
+
if (E)
|
|
3662
|
+
return E.columns.map((K, se) => ({ c: K, i: se })).filter(({ c: K }) => K.showForDisplay !== !1).sort((K, se) => (K.c.displayOrder ?? K.i) - (se.c.displayOrder ?? se.i)).map(({ c: K }) => K);
|
|
3663
|
+
const I = /* @__PURE__ */ new Set(), A = [];
|
|
3664
|
+
for (const K of f.value)
|
|
3643
3665
|
for (const se of Object.keys(K))
|
|
3644
|
-
I.has(se) || (I.add(se),
|
|
3645
|
-
return
|
|
3646
|
-
}), M =
|
|
3647
|
-
var
|
|
3648
|
-
return ((
|
|
3649
|
-
}),
|
|
3650
|
-
function
|
|
3651
|
-
var
|
|
3652
|
-
(
|
|
3666
|
+
I.has(se) || (I.add(se), A.push({ propertyPath: se }));
|
|
3667
|
+
return A;
|
|
3668
|
+
}), M = N(() => {
|
|
3669
|
+
var E;
|
|
3670
|
+
return ((E = U.value) == null ? void 0 : E.displayName) ?? "数据";
|
|
3671
|
+
}), Q = T(null);
|
|
3672
|
+
function O() {
|
|
3673
|
+
var E;
|
|
3674
|
+
(E = Q.value) == null || E.openExportDialog();
|
|
3653
3675
|
}
|
|
3654
|
-
async function re(
|
|
3655
|
-
if (
|
|
3656
|
-
if (
|
|
3657
|
-
|
|
3676
|
+
async function re(E) {
|
|
3677
|
+
if (E) {
|
|
3678
|
+
if (r.value || s.value || !i.value) return;
|
|
3679
|
+
r.value = !0;
|
|
3658
3680
|
} else {
|
|
3659
3681
|
if (s.value) return;
|
|
3660
|
-
s.value = !0,
|
|
3682
|
+
s.value = !0, x.value = null;
|
|
3661
3683
|
}
|
|
3662
3684
|
try {
|
|
3663
|
-
const I =
|
|
3664
|
-
|
|
3685
|
+
const I = E ? V.value : 0, A = await t.dataFun({ limit: t.pageSize, offset: I });
|
|
3686
|
+
E ? f.value.push(...A.items) : f.value = A.items, i.value = A.hasNext ?? !1, A.totalCount != null && (X.value = A.totalCount), a("data-loaded", A, E);
|
|
3665
3687
|
} catch (I) {
|
|
3666
|
-
|
|
3688
|
+
x.value = I, a("error", I);
|
|
3667
3689
|
} finally {
|
|
3668
|
-
|
|
3690
|
+
E ? r.value = !1 : s.value = !1;
|
|
3669
3691
|
}
|
|
3670
3692
|
}
|
|
3671
3693
|
function ae() {
|
|
@@ -3674,34 +3696,34 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3674
3696
|
function W() {
|
|
3675
3697
|
i.value = !0, re(!1);
|
|
3676
3698
|
}
|
|
3677
|
-
const
|
|
3699
|
+
const C = T(null), k = T(null);
|
|
3678
3700
|
let $ = null;
|
|
3679
|
-
function
|
|
3680
|
-
!
|
|
3681
|
-
(
|
|
3682
|
-
|
|
3701
|
+
function P() {
|
|
3702
|
+
!C.value || !k.value || ($ = new IntersectionObserver(
|
|
3703
|
+
(E) => {
|
|
3704
|
+
E.some((I) => I.isIntersecting) && i.value && !s.value && !r.value && ae();
|
|
3683
3705
|
},
|
|
3684
3706
|
{
|
|
3685
|
-
root:
|
|
3707
|
+
root: C.value,
|
|
3686
3708
|
rootMargin: `0px 0px ${t.threshold}px 0px`,
|
|
3687
3709
|
threshold: 0
|
|
3688
3710
|
}
|
|
3689
|
-
), $.observe(
|
|
3711
|
+
), $.observe(k.value));
|
|
3690
3712
|
}
|
|
3691
3713
|
function G() {
|
|
3692
3714
|
$ == null || $.disconnect(), $ = null;
|
|
3693
3715
|
}
|
|
3694
3716
|
return $e(() => {
|
|
3695
|
-
|
|
3696
|
-
}), Ne(G), de(() => t.dataFun, () => W()), de(() => t.metaFun, () => void
|
|
3697
|
-
G(),
|
|
3698
|
-
}),
|
|
3717
|
+
P(), u(), t.immediate && re(!1);
|
|
3718
|
+
}), Ne(G), de(() => t.dataFun, () => W()), de(() => t.metaFun, () => void u()), de(() => t.threshold, () => {
|
|
3719
|
+
G(), P();
|
|
3720
|
+
}), v({
|
|
3699
3721
|
/** 当前已加载的全部数据 */
|
|
3700
|
-
items:
|
|
3722
|
+
items: f,
|
|
3701
3723
|
/** 首屏加载态 */
|
|
3702
3724
|
loading: s,
|
|
3703
3725
|
/** 追加加载态 */
|
|
3704
|
-
loadingMore:
|
|
3726
|
+
loadingMore: r,
|
|
3705
3727
|
/** 是否还有下一页 */
|
|
3706
3728
|
hasMore: i,
|
|
3707
3729
|
/** 重置并从第一页重新加载 */
|
|
@@ -3711,61 +3733,61 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3711
3733
|
/** 手动触发加载下一页(一般由滚动自动触发) */
|
|
3712
3734
|
loadNextPage: ae,
|
|
3713
3735
|
/** rows 别名:当前已加载的全部数据(与 YsTable 的 rows 同名) */
|
|
3714
|
-
rows:
|
|
3736
|
+
rows: f,
|
|
3715
3737
|
/** 元数据(metaFun 加载结果;未提供 metaFun 或加载失败时为 null) */
|
|
3716
3738
|
meta: U,
|
|
3717
3739
|
/** 跨页累计选中的行(showCheckbox 开启时有意义) */
|
|
3718
3740
|
selectedRows: j,
|
|
3719
3741
|
/** 某行当前是否选中 */
|
|
3720
|
-
isRowSelected:
|
|
3742
|
+
isRowSelected: B,
|
|
3721
3743
|
/** 切换某行选中态(selected 缺省时取反) */
|
|
3722
3744
|
toggleRowSelection: h,
|
|
3723
3745
|
/** 清空全部选中 */
|
|
3724
|
-
clearSelection:
|
|
3746
|
+
clearSelection: b,
|
|
3725
3747
|
/** 选中当前已加载的全部行(不影响「没有加载出来」的行) */
|
|
3726
3748
|
selectAllOnPage: L,
|
|
3727
3749
|
/** 反选当前已加载的行 */
|
|
3728
3750
|
invertSelectionOnPage: q,
|
|
3729
3751
|
/** 打开导出 Excel 对话框(选中 / 当前已加载 / 所有数据) */
|
|
3730
|
-
openExportDialog:
|
|
3731
|
-
}), (
|
|
3732
|
-
const
|
|
3733
|
-
return n(),
|
|
3752
|
+
openExportDialog: O
|
|
3753
|
+
}), (E, I) => {
|
|
3754
|
+
const A = S("el-checkbox"), K = S("el-empty"), se = S("el-button");
|
|
3755
|
+
return n(), y("div", {
|
|
3734
3756
|
ref_key: "scrollEl",
|
|
3735
|
-
ref:
|
|
3757
|
+
ref: C,
|
|
3736
3758
|
class: "yk-infinite-list",
|
|
3737
3759
|
style: nt({ height: e.height })
|
|
3738
3760
|
}, [
|
|
3739
|
-
(n(!0),
|
|
3761
|
+
(n(!0), y(H, null, le(f.value, (ce, be) => (n(), y("div", {
|
|
3740
3762
|
key: String(ce[e.rowKey]),
|
|
3741
|
-
class: Ce(["yk-infinite-list__item", { "is-selected": e.showCheckbox &&
|
|
3763
|
+
class: Ce(["yk-infinite-list__item", { "is-selected": e.showCheckbox && c(B)(ce) }])
|
|
3742
3764
|
}, [
|
|
3743
|
-
e.showCheckbox ? (n(),
|
|
3765
|
+
e.showCheckbox ? (n(), w(A, {
|
|
3744
3766
|
key: 0,
|
|
3745
3767
|
class: "yk-infinite-list__item-checkbox",
|
|
3746
|
-
"model-value":
|
|
3747
|
-
onChange: (Ve) =>
|
|
3748
|
-
}, null, 8, ["model-value", "onChange"])) :
|
|
3749
|
-
|
|
3750
|
-
Z(
|
|
3768
|
+
"model-value": c(B)(ce),
|
|
3769
|
+
onChange: (Ve) => c(h)(ce, !!Ve)
|
|
3770
|
+
}, null, 8, ["model-value", "onChange"])) : z("", !0),
|
|
3771
|
+
p("div", io, [
|
|
3772
|
+
Z(E.$slots, "default", {
|
|
3751
3773
|
row: ce,
|
|
3752
3774
|
index: be
|
|
3753
3775
|
}, () => [
|
|
3754
|
-
|
|
3776
|
+
p("pre", ro, Y(JSON.stringify(ce, null, 2)), 1)
|
|
3755
3777
|
], !0)
|
|
3756
3778
|
])
|
|
3757
3779
|
], 2))), 128)),
|
|
3758
|
-
!s.value &&
|
|
3759
|
-
Z(
|
|
3760
|
-
|
|
3780
|
+
!s.value && f.value.length === 0 && !x.value ? (n(), y("div", uo, [
|
|
3781
|
+
Z(E.$slots, "empty", {}, () => [
|
|
3782
|
+
m(K, { description: "暂无数据" })
|
|
3761
3783
|
], !0)
|
|
3762
|
-
])) :
|
|
3763
|
-
Z(
|
|
3764
|
-
|
|
3765
|
-
description: `加载失败:${String(
|
|
3784
|
+
])) : x.value ? (n(), y("div", co, [
|
|
3785
|
+
Z(E.$slots, "error", { error: x.value }, () => [
|
|
3786
|
+
m(K, {
|
|
3787
|
+
description: `加载失败:${String(x.value)}`
|
|
3766
3788
|
}, {
|
|
3767
3789
|
default: o(() => [
|
|
3768
|
-
|
|
3790
|
+
m(se, {
|
|
3769
3791
|
type: "primary",
|
|
3770
3792
|
onClick: W
|
|
3771
3793
|
}, {
|
|
@@ -3778,34 +3800,34 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3778
3800
|
_: 1
|
|
3779
3801
|
}, 8, ["description"])
|
|
3780
3802
|
], !0)
|
|
3781
|
-
])) :
|
|
3782
|
-
|
|
3803
|
+
])) : z("", !0),
|
|
3804
|
+
p("div", {
|
|
3783
3805
|
ref_key: "sentinelEl",
|
|
3784
|
-
ref:
|
|
3806
|
+
ref: k,
|
|
3785
3807
|
class: "yk-infinite-list__sentinel"
|
|
3786
3808
|
}, null, 512),
|
|
3787
|
-
|
|
3788
|
-
Z(
|
|
3789
|
-
I[1] || (I[1] =
|
|
3790
|
-
I[2] || (I[2] =
|
|
3809
|
+
r.value ? (n(), y("div", po, [
|
|
3810
|
+
Z(E.$slots, "loading", {}, () => [
|
|
3811
|
+
I[1] || (I[1] = p("span", { class: "yk-infinite-list__spinner" }, null, -1)),
|
|
3812
|
+
I[2] || (I[2] = p("span", null, "加载中...", -1))
|
|
3791
3813
|
], !0)
|
|
3792
|
-
])) :
|
|
3793
|
-
!i.value &&
|
|
3794
|
-
Z(
|
|
3795
|
-
I[3] || (I[3] =
|
|
3814
|
+
])) : z("", !0),
|
|
3815
|
+
!i.value && f.value.length > 0 && !s.value ? (n(), y("div", mo, [
|
|
3816
|
+
Z(E.$slots, "no-more", {}, () => [
|
|
3817
|
+
I[3] || (I[3] = p("span", null, "— 没有更多了 —", -1))
|
|
3796
3818
|
], !0)
|
|
3797
|
-
])) :
|
|
3798
|
-
|
|
3819
|
+
])) : z("", !0),
|
|
3820
|
+
m(bt, {
|
|
3799
3821
|
ref_key: "exportDialogRef",
|
|
3800
|
-
ref:
|
|
3801
|
-
"current-rows":
|
|
3802
|
-
"selected-rows":
|
|
3822
|
+
ref: Q,
|
|
3823
|
+
"current-rows": f.value,
|
|
3824
|
+
"selected-rows": c(j),
|
|
3803
3825
|
"data-fun": t.dataFun,
|
|
3804
3826
|
"export-page-size": t.exportPageSize,
|
|
3805
3827
|
total: X.value,
|
|
3806
3828
|
"exportor-func": t.exportorFunc,
|
|
3807
3829
|
"table-name": M.value,
|
|
3808
|
-
columns:
|
|
3830
|
+
columns: g.value,
|
|
3809
3831
|
"has-more-page": i.value,
|
|
3810
3832
|
"export-selected": e.showCheckbox,
|
|
3811
3833
|
"page-scope-label": "导出当前已加载"
|
|
@@ -3813,8 +3835,8 @@ const Dn = /* @__PURE__ */ ee({
|
|
|
3813
3835
|
], 4);
|
|
3814
3836
|
};
|
|
3815
3837
|
}
|
|
3816
|
-
}),
|
|
3817
|
-
function
|
|
3838
|
+
}), vo = /* @__PURE__ */ ie(fo, [["__scopeId", "data-v-c12687b5"]]), dt = "ys-modal-style";
|
|
3839
|
+
function yo() {
|
|
3818
3840
|
if (document.getElementById(dt)) return;
|
|
3819
3841
|
const e = document.createElement("style");
|
|
3820
3842
|
e.id = dt, e.textContent = [
|
|
@@ -3841,7 +3863,7 @@ function mo() {
|
|
|
3841
3863
|
".ys-modal-header__maximize svg{display:block;margin-top:-2px}"
|
|
3842
3864
|
].join(""), document.head.appendChild(e);
|
|
3843
3865
|
}
|
|
3844
|
-
function
|
|
3866
|
+
function go() {
|
|
3845
3867
|
return ve(
|
|
3846
3868
|
"svg",
|
|
3847
3869
|
{
|
|
@@ -3857,7 +3879,7 @@ function fo() {
|
|
|
3857
3879
|
[ve("rect", { x: 4, y: 4, width: 16, height: 16, rx: 2 })]
|
|
3858
3880
|
);
|
|
3859
3881
|
}
|
|
3860
|
-
function
|
|
3882
|
+
function _o() {
|
|
3861
3883
|
return ve(
|
|
3862
3884
|
"svg",
|
|
3863
3885
|
{
|
|
@@ -3876,54 +3898,54 @@ function vo() {
|
|
|
3876
3898
|
]
|
|
3877
3899
|
);
|
|
3878
3900
|
}
|
|
3879
|
-
function
|
|
3880
|
-
var
|
|
3901
|
+
function ko(e) {
|
|
3902
|
+
var O;
|
|
3881
3903
|
const {
|
|
3882
|
-
title:
|
|
3904
|
+
title: v = "",
|
|
3883
3905
|
width: l = "500px",
|
|
3884
3906
|
height: t,
|
|
3885
3907
|
component: a,
|
|
3886
|
-
props:
|
|
3908
|
+
props: f,
|
|
3887
3909
|
actions: s,
|
|
3888
|
-
onCancel:
|
|
3910
|
+
onCancel: r,
|
|
3889
3911
|
onClosed: i,
|
|
3890
|
-
closeOnClickModal:
|
|
3912
|
+
closeOnClickModal: x = !1,
|
|
3891
3913
|
closeOnPressEscape: V = !1,
|
|
3892
|
-
maximizable:
|
|
3914
|
+
maximizable: D = !1,
|
|
3893
3915
|
defaultMaximized: j = !1,
|
|
3894
|
-
appContext:
|
|
3916
|
+
appContext: B
|
|
3895
3917
|
} = e;
|
|
3896
|
-
(
|
|
3897
|
-
const h = t == null ? void 0 : typeof t == "number" ? `${t}px` : t,
|
|
3898
|
-
document.body.appendChild(
|
|
3918
|
+
(D || t != null) && yo();
|
|
3919
|
+
const h = t == null ? void 0 : typeof t == "number" ? `${t}px` : t, b = document.createElement("div");
|
|
3920
|
+
document.body.appendChild(b);
|
|
3899
3921
|
let L = null, q = !1;
|
|
3900
3922
|
const X = () => {
|
|
3901
|
-
q || (q = !0, at(null,
|
|
3923
|
+
q || (q = !0, at(null, b), b.remove());
|
|
3902
3924
|
}, U = {
|
|
3903
|
-
close: () =>
|
|
3904
|
-
toggleMaximize: () =>
|
|
3905
|
-
isMaximized: () => (
|
|
3925
|
+
close: () => Q == null ? void 0 : Q.close(),
|
|
3926
|
+
toggleMaximize: () => Q == null ? void 0 : Q.toggleMaximize(),
|
|
3927
|
+
isMaximized: () => (Q == null ? void 0 : Q.isMaximized()) ?? !1,
|
|
3906
3928
|
getContentInstance: () => L
|
|
3907
|
-
},
|
|
3929
|
+
}, u = ee({
|
|
3908
3930
|
name: "YsModalHost",
|
|
3909
3931
|
setup(re, { expose: ae }) {
|
|
3910
|
-
const W = T(!0),
|
|
3911
|
-
|
|
3912
|
-
},
|
|
3932
|
+
const W = T(!0), C = T(-1), k = T(D && j), $ = () => {
|
|
3933
|
+
D && (k.value = !k.value);
|
|
3934
|
+
}, P = () => {
|
|
3913
3935
|
W.value = !1;
|
|
3914
3936
|
}, G = () => {
|
|
3915
|
-
|
|
3916
|
-
},
|
|
3917
|
-
if (!(
|
|
3918
|
-
|
|
3937
|
+
C.value >= 0 || (r == null || r(), W.value = !1);
|
|
3938
|
+
}, E = async (I, A) => {
|
|
3939
|
+
if (!(C.value >= 0)) {
|
|
3940
|
+
C.value = A;
|
|
3919
3941
|
try {
|
|
3920
3942
|
await I.execute(U, L);
|
|
3921
3943
|
} finally {
|
|
3922
|
-
|
|
3944
|
+
C.value = -1;
|
|
3923
3945
|
}
|
|
3924
3946
|
}
|
|
3925
3947
|
};
|
|
3926
|
-
return ae({ close:
|
|
3948
|
+
return ae({ close: P, toggleMaximize: $, isMaximized: () => k.value }), () => ve(
|
|
3927
3949
|
Zt,
|
|
3928
3950
|
{
|
|
3929
3951
|
// Element Plus 2.x 显隐规范:modelValue + update:modelValue
|
|
@@ -3931,19 +3953,19 @@ function yo(e) {
|
|
|
3931
3953
|
"onUpdate:modelValue": (I) => {
|
|
3932
3954
|
I || G();
|
|
3933
3955
|
},
|
|
3934
|
-
title:
|
|
3956
|
+
title: D ? void 0 : v,
|
|
3935
3957
|
width: l,
|
|
3936
3958
|
// 最大化时贴顶(配合样式中 --el-dialog-margin-top:0)
|
|
3937
|
-
top:
|
|
3959
|
+
top: k.value ? "0vh" : void 0,
|
|
3938
3960
|
// 最大化 class 优先(height:100vh!important 覆盖固定高度);
|
|
3939
3961
|
// 否则若设置了 height 则用固定高度 class + CSS 变量
|
|
3940
|
-
class:
|
|
3962
|
+
class: k.value ? "ys-modal-dialog--maximized" : h ? "ys-modal-dialog--fixed-height" : void 0,
|
|
3941
3963
|
// 固定高度值通过 CSS 变量传递(每个弹窗可不同)
|
|
3942
|
-
style: h && !
|
|
3943
|
-
closeOnClickModal:
|
|
3964
|
+
style: h && !k.value ? { "--ys-modal-height": h } : void 0,
|
|
3965
|
+
closeOnClickModal: x,
|
|
3944
3966
|
closeOnPressEscape: V,
|
|
3945
3967
|
// 动作执行中隐藏右上角 ✕,与底部其余按钮禁用保持一致
|
|
3946
|
-
showClose:
|
|
3968
|
+
showClose: C.value < 0,
|
|
3947
3969
|
destroyOnClose: !0,
|
|
3948
3970
|
onClosed: () => {
|
|
3949
3971
|
i == null || i(), X();
|
|
@@ -3955,33 +3977,33 @@ function yo(e) {
|
|
|
3955
3977
|
// 标题结构一致,避免 block 包裹改变标题的行盒/换行行为;
|
|
3956
3978
|
// 按钮 absolute 脱离文档流,以 .el-dialog 为包含块定位。
|
|
3957
3979
|
// EP 的 ✕ 关闭按钮渲染在插槽内容之外,自动保留且定位不受影响。
|
|
3958
|
-
header:
|
|
3959
|
-
ve("span", { class: "el-dialog__title" },
|
|
3980
|
+
header: D ? () => [
|
|
3981
|
+
ve("span", { class: "el-dialog__title" }, v),
|
|
3960
3982
|
ve(
|
|
3961
3983
|
"button",
|
|
3962
3984
|
{
|
|
3963
3985
|
type: "button",
|
|
3964
3986
|
class: "ys-modal-header__maximize",
|
|
3965
|
-
title:
|
|
3966
|
-
"aria-label":
|
|
3987
|
+
title: k.value ? "还原" : "最大化",
|
|
3988
|
+
"aria-label": k.value ? "还原" : "最大化",
|
|
3967
3989
|
onClick: $
|
|
3968
3990
|
},
|
|
3969
|
-
|
|
3991
|
+
k.value ? _o() : go()
|
|
3970
3992
|
)
|
|
3971
3993
|
] : void 0,
|
|
3972
3994
|
default: () => ve(a, {
|
|
3973
|
-
...
|
|
3995
|
+
...f ?? {},
|
|
3974
3996
|
// 注入关闭监听器:内容组件 defineEmits(["close"]) 后
|
|
3975
3997
|
// emit("close") 即可关闭;无需在业务 props 里声明。
|
|
3976
3998
|
// 注意 onClose 在 props 展开之后,业务 props 里的 onClose
|
|
3977
3999
|
// 会被注入值覆盖(关闭行为不交给业务侧)
|
|
3978
|
-
onClose:
|
|
4000
|
+
onClose: P,
|
|
3979
4001
|
ref: (I) => {
|
|
3980
4002
|
L = I;
|
|
3981
4003
|
}
|
|
3982
4004
|
}),
|
|
3983
4005
|
footer: () => s != null && s.length ? s.map(
|
|
3984
|
-
(I,
|
|
4006
|
+
(I, A) => ve(
|
|
3985
4007
|
el,
|
|
3986
4008
|
{
|
|
3987
4009
|
key: I.name,
|
|
@@ -3989,9 +4011,9 @@ function yo(e) {
|
|
|
3989
4011
|
type: I.type === "default" ? void 0 : I.type,
|
|
3990
4012
|
title: I.desc,
|
|
3991
4013
|
// 执行中:当前动作 loading,其余动作禁用
|
|
3992
|
-
disabled:
|
|
3993
|
-
loading:
|
|
3994
|
-
onClick: () =>
|
|
4014
|
+
disabled: C.value >= 0 && C.value !== A,
|
|
4015
|
+
loading: C.value === A,
|
|
4016
|
+
onClick: () => E(I, A)
|
|
3995
4017
|
},
|
|
3996
4018
|
{
|
|
3997
4019
|
default: () => [
|
|
@@ -4012,66 +4034,66 @@ function yo(e) {
|
|
|
4012
4034
|
}
|
|
4013
4035
|
);
|
|
4014
4036
|
}
|
|
4015
|
-
}),
|
|
4037
|
+
}), g = m(u), M = B ?? Jt();
|
|
4016
4038
|
M || console.warn(
|
|
4017
4039
|
"[openModal] 未检测到 AppContext:弹窗内的全局组件(如 el-form)与 inject 将不可用。请在应用入口 app.use(YsCrudElementPlus),或调用 openModal 时传入 appContext(getCurrentInstance()?.appContext)。"
|
|
4018
|
-
),
|
|
4019
|
-
const
|
|
4040
|
+
), g.appContext = M, at(g, b);
|
|
4041
|
+
const Q = (O = g.component) == null ? void 0 : O.exposed;
|
|
4020
4042
|
return U;
|
|
4021
4043
|
}
|
|
4022
|
-
function
|
|
4044
|
+
function So(e) {
|
|
4023
4045
|
const {
|
|
4024
|
-
confirmText:
|
|
4046
|
+
confirmText: v = "确定",
|
|
4025
4047
|
cancelText: l = "取消",
|
|
4026
4048
|
confirmType: t = "primary",
|
|
4027
4049
|
onConfirm: a,
|
|
4028
|
-
...
|
|
4050
|
+
...f
|
|
4029
4051
|
} = e;
|
|
4030
|
-
return
|
|
4031
|
-
{ name: "cancel", desc: l, execute: (
|
|
4052
|
+
return ko({ ...f, actions: [
|
|
4053
|
+
{ name: "cancel", desc: l, execute: (r) => r.close() },
|
|
4032
4054
|
{
|
|
4033
4055
|
name: "confirm",
|
|
4034
|
-
desc:
|
|
4056
|
+
desc: v,
|
|
4035
4057
|
type: t,
|
|
4036
|
-
execute: async (
|
|
4058
|
+
execute: async (r, i) => {
|
|
4037
4059
|
if (!a) {
|
|
4038
|
-
|
|
4060
|
+
r.close();
|
|
4039
4061
|
return;
|
|
4040
4062
|
}
|
|
4041
|
-
await a(
|
|
4063
|
+
await a(r, i) !== !1 && r.close();
|
|
4042
4064
|
}
|
|
4043
4065
|
}
|
|
4044
4066
|
] });
|
|
4045
4067
|
}
|
|
4046
|
-
const
|
|
4068
|
+
const $o = {
|
|
4047
4069
|
install(e) {
|
|
4048
|
-
Xt(e._context), e.component("YsTable", ht), e.component("YsTableActionMenuButton",
|
|
4070
|
+
Xt(e._context), e.component("YsTable", ht), e.component("YsTableActionMenuButton", xt), e.component("YsCommandBar", wt), e.component("YsMainPanel", on), e.component("YsFilterPanel", Mt), e.component("YsRootFilterPanel", Ft), e.component("YsTextFilterItem", Mn), e.component("YsDateFilterItem", Rn), e.component("YsDateRangeFilterItem", Pn), e.component("YsEnumFilterItem", An), e.component("YsFilterItemLayout", Oe), e.component("YsAdvancedFilterPanel", Vt), e.component("YsAdvancedValueEditor", Ct), e.component("YsAdvancedConditionGroup", $t), e.component("YsTablePage", In), e.component("YsImportExcel", so), e.component("YsInfiniteList", vo);
|
|
4049
4071
|
}
|
|
4050
4072
|
};
|
|
4051
4073
|
export {
|
|
4052
4074
|
$t as YsAdvancedConditionGroup,
|
|
4053
4075
|
Vt as YsAdvancedFilterPanel,
|
|
4054
4076
|
Ct as YsAdvancedValueEditor,
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4077
|
+
wt as YsCommandBar,
|
|
4078
|
+
Rn as YsDateFilterItem,
|
|
4079
|
+
Pn as YsDateRangeFilterItem,
|
|
4058
4080
|
An as YsEnumFilterItem,
|
|
4059
4081
|
Oe as YsFilterItemLayout,
|
|
4060
4082
|
Mt as YsFilterPanel,
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4083
|
+
so as YsImportExcel,
|
|
4084
|
+
vo as YsInfiniteList,
|
|
4085
|
+
on as YsMainPanel,
|
|
4064
4086
|
Ft as YsRootFilterPanel,
|
|
4065
4087
|
ht as YsTable,
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4088
|
+
xt as YsTableActionMenuButton,
|
|
4089
|
+
In as YsTablePage,
|
|
4090
|
+
Mn as YsTextFilterItem,
|
|
4091
|
+
$o as default,
|
|
4092
|
+
Mo as fromArray,
|
|
4093
|
+
Ro as fromBool,
|
|
4094
|
+
Po as fromObjectItems,
|
|
4095
|
+
Ao as fromOptions,
|
|
4096
|
+
So as openDialog,
|
|
4097
|
+
ko as openModal
|
|
4076
4098
|
};
|
|
4077
4099
|
//# sourceMappingURL=index.js.map
|