easy-ep-ui 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/easy-ep-ui.js +1 -1
- package/dist/style.css +1 -1
- package/es/components/ee-form-table/src/components/TableToolbar.vue.d.ts +9 -3
- package/es/components/ee-form-table/src/hooks/useCrud.d.ts +1 -1
- package/es/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/es/components/ee-form-table/src/index.vue.d.ts +20 -1
- package/es/components/ee-form-table/types.d.ts +45 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +1863 -1475
- package/es/locale/index.d.ts +5 -0
- package/es/style.css +1 -1
- package/lib/components/ee-form-table/src/components/TableToolbar.vue.d.ts +9 -3
- package/lib/components/ee-form-table/src/hooks/useCrud.d.ts +1 -1
- package/lib/components/ee-form-table/src/hooks/useTable.d.ts +28 -11
- package/lib/components/ee-form-table/src/index.vue.d.ts +20 -1
- package/lib/components/ee-form-table/types.d.ts +45 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/locale/index.d.ts +5 -0
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/es/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
import * as
|
|
4
|
-
const
|
|
1
|
+
import { inject as he, ref as A, defineComponent as H, computed as V, onMounted as Z, openBlock as i, createBlock as w, unref as a, mergeProps as I, withCtx as v, createElementBlock as D, Fragment as O, renderList as K, createTextVNode as M, toDisplayString as F, createVNode as T, resolveDynamicComponent as Fa, createCommentVNode as L, createElementVNode as N, reactive as Ra, watch as re, renderSlot as Y, withModifiers as yl, normalizeClass as Aa, resolveComponent as wl, normalizeStyle as Cl, createSlots as Sl, normalizeProps as ua, guardReactiveProps as da, shallowRef as xl, nextTick as Fe, onUnmounted as zl } from "vue";
|
|
2
|
+
import { ElMessage as J, ElSelect as ue, ElOption as de, ElTag as Dl, ElForm as Ye, ElRow as Je, ElCol as xe, ElFormItem as ze, ElInput as ge, ElDatePicker as ve, ElButton as q, ElDialog as Ua, ElRadioGroup as ca, ElRadio as Qe, ElCheckboxGroup as fa, ElCheckbox as Ce, ElSwitch as $a, ElMessageBox as Ma, ElInputNumber as Ia, ElTooltip as Sa, ElPopover as Vl, ElDivider as kl, ElIcon as Oa, ElDrawer as Tl, ElDescriptions as xa, ElDescriptionsItem as za, ElTable as Da, ElTableColumn as we, ElPopconfirm as El, ElDropdown as Pl, ElDropdownMenu as Bl, ElDropdownItem as Fl, ElEmpty as Rl, ElPagination as Al, ElCascader as Ul } from "element-plus";
|
|
3
|
+
import * as $l from "echarts";
|
|
4
|
+
const Se = {
|
|
5
5
|
formTable: {
|
|
6
6
|
operation: "操作",
|
|
7
7
|
add: "新增",
|
|
@@ -44,7 +44,12 @@ const se = {
|
|
|
44
44
|
selectPlaceholder: "请选择{label}",
|
|
45
45
|
dateRangeTo: "至",
|
|
46
46
|
dateRangeStart: "开始日期",
|
|
47
|
-
dateRangeEnd: "结束日期"
|
|
47
|
+
dateRangeEnd: "结束日期",
|
|
48
|
+
version: "版本",
|
|
49
|
+
versionTitle: "版本历史",
|
|
50
|
+
moreActions: "更多操作",
|
|
51
|
+
rowIndex: "行号",
|
|
52
|
+
selectionLabel: "选择框"
|
|
48
53
|
},
|
|
49
54
|
searchBar: {
|
|
50
55
|
search: "搜索",
|
|
@@ -74,21 +79,21 @@ const se = {
|
|
|
74
79
|
requestFailed: "请求失败",
|
|
75
80
|
noData: "暂无数据"
|
|
76
81
|
}
|
|
77
|
-
},
|
|
78
|
-
function
|
|
79
|
-
const e =
|
|
82
|
+
}, La = "eeLocale";
|
|
83
|
+
function _() {
|
|
84
|
+
const e = he(La, Se);
|
|
80
85
|
function l(t, r, o) {
|
|
81
86
|
try {
|
|
82
|
-
const
|
|
83
|
-
let h =
|
|
87
|
+
const m = e[t];
|
|
88
|
+
let h = m == null ? void 0 : m[r];
|
|
84
89
|
if (h == null) {
|
|
85
|
-
const
|
|
86
|
-
h =
|
|
90
|
+
const u = Se[t];
|
|
91
|
+
h = u == null ? void 0 : u[r];
|
|
87
92
|
}
|
|
88
93
|
if (h == null) return r;
|
|
89
94
|
if (o)
|
|
90
|
-
for (const [
|
|
91
|
-
h = h.replace(`{${
|
|
95
|
+
for (const [u, C] of Object.entries(o))
|
|
96
|
+
h = h.replace(`{${u}}`, String(C));
|
|
92
97
|
return h;
|
|
93
98
|
} catch {
|
|
94
99
|
return r;
|
|
@@ -96,75 +101,75 @@ function j() {
|
|
|
96
101
|
}
|
|
97
102
|
return { locale: e, t: l };
|
|
98
103
|
}
|
|
99
|
-
function
|
|
104
|
+
function Ze(e) {
|
|
100
105
|
const {
|
|
101
106
|
requestInstance: l,
|
|
102
107
|
apiUrl: t,
|
|
103
108
|
pageNumKey: r = "pageNum",
|
|
104
109
|
pageSizeKey: o = "pageSize",
|
|
105
|
-
pageSize:
|
|
110
|
+
pageSize: m = 20,
|
|
106
111
|
searchKey: h = "keyword",
|
|
107
|
-
extraParams:
|
|
108
|
-
labelField:
|
|
112
|
+
extraParams: u = {},
|
|
113
|
+
labelField: C = "label",
|
|
109
114
|
valueField: g = "value",
|
|
110
|
-
debounceDelay:
|
|
111
|
-
} = e, n = l ??
|
|
115
|
+
debounceDelay: b = 300
|
|
116
|
+
} = e, n = l ?? he(aa);
|
|
112
117
|
if (!n)
|
|
113
118
|
throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
|
|
114
|
-
const d = n, { t:
|
|
115
|
-
let
|
|
116
|
-
async function
|
|
117
|
-
|
|
119
|
+
const d = n, { t: s } = _(), p = A(!1), c = A([]), k = A(!1), f = A(0);
|
|
120
|
+
let z = 1, U = "", le = null;
|
|
121
|
+
async function G(E, oe = !0) {
|
|
122
|
+
oe && (z = 1, k.value = !1, E !== void 0 && (U = E)), p.value = !0;
|
|
118
123
|
try {
|
|
119
|
-
const
|
|
120
|
-
[r]:
|
|
121
|
-
[o]:
|
|
122
|
-
...
|
|
124
|
+
const B = {
|
|
125
|
+
[r]: z,
|
|
126
|
+
[o]: m,
|
|
127
|
+
...u
|
|
123
128
|
};
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
...
|
|
127
|
-
label:
|
|
128
|
-
value:
|
|
129
|
+
U && (B[h] = U);
|
|
130
|
+
const P = await d.get(t, { params: B }), te = pe(P.data).map((ne) => ({
|
|
131
|
+
...ne,
|
|
132
|
+
label: ne[C],
|
|
133
|
+
value: ne[g]
|
|
129
134
|
}));
|
|
130
|
-
|
|
131
|
-
} catch (
|
|
132
|
-
|
|
135
|
+
oe ? c.value = te : c.value = [...c.value, ...te], f.value = be(P.data), c.value.length >= f.value && (k.value = !0);
|
|
136
|
+
} catch (B) {
|
|
137
|
+
J.error((B == null ? void 0 : B.msg) || (B == null ? void 0 : B.message) || s("remoteSelect", "requestFailed")), oe && (c.value = []);
|
|
133
138
|
} finally {
|
|
134
139
|
p.value = !1;
|
|
135
140
|
}
|
|
136
141
|
}
|
|
137
|
-
function
|
|
138
|
-
return Array.isArray(
|
|
142
|
+
function pe(E) {
|
|
143
|
+
return Array.isArray(E) ? E : E != null && E.rows ? E.rows : E != null && E.list ? E.list : E != null && E.records ? E.records : E != null && E.data ? Array.isArray(E.data) ? E.data : pe(E.data) : E != null && E.items ? E.items : [];
|
|
139
144
|
}
|
|
140
|
-
function
|
|
141
|
-
return
|
|
145
|
+
function be(E) {
|
|
146
|
+
return E != null && E.total ? Number(E.total) : E != null && E.count ? Number(E.count) : Array.isArray(E) ? E.length : E != null && E.data && typeof E.data == "object" && !Array.isArray(E.data) ? be(E.data) : 0;
|
|
142
147
|
}
|
|
143
|
-
async function
|
|
144
|
-
p.value ||
|
|
148
|
+
async function Ve() {
|
|
149
|
+
p.value || k.value || (z++, await G(void 0, !1));
|
|
145
150
|
}
|
|
146
|
-
function
|
|
147
|
-
|
|
151
|
+
function ke() {
|
|
152
|
+
U = "", z = 1, c.value = [], k.value = !1, f.value = 0;
|
|
148
153
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
},
|
|
154
|
+
function Te(E) {
|
|
155
|
+
U = E, le && clearTimeout(le), le = setTimeout(() => {
|
|
156
|
+
G(U, !0);
|
|
157
|
+
}, b);
|
|
153
158
|
}
|
|
154
159
|
return {
|
|
155
160
|
/** 是否正在加载 */
|
|
156
161
|
loading: p,
|
|
157
162
|
/** 当前选项列表 */
|
|
158
|
-
options:
|
|
163
|
+
options: c,
|
|
159
164
|
/** 是否没有更多数据 */
|
|
160
|
-
noMore:
|
|
161
|
-
loadData:
|
|
162
|
-
loadMore:
|
|
163
|
-
resetList:
|
|
164
|
-
onKeywordChange:
|
|
165
|
+
noMore: k,
|
|
166
|
+
loadData: G,
|
|
167
|
+
loadMore: Ve,
|
|
168
|
+
resetList: ke,
|
|
169
|
+
onKeywordChange: Te
|
|
165
170
|
};
|
|
166
171
|
}
|
|
167
|
-
const
|
|
172
|
+
const $e = /* @__PURE__ */ H({
|
|
168
173
|
name: "EeDictSelect",
|
|
169
174
|
__name: "index",
|
|
170
175
|
props: {
|
|
@@ -190,36 +195,36 @@ const ze = /* @__PURE__ */ N({
|
|
|
190
195
|
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
191
196
|
setup(e, { emit: l }) {
|
|
192
197
|
const t = e, r = l;
|
|
193
|
-
|
|
198
|
+
_();
|
|
194
199
|
const {
|
|
195
200
|
loading: o,
|
|
196
|
-
options:
|
|
201
|
+
options: m,
|
|
197
202
|
loadData: h
|
|
198
|
-
} =
|
|
199
|
-
apiUrl:
|
|
203
|
+
} = Ze({
|
|
204
|
+
apiUrl: u(),
|
|
200
205
|
pageNumKey: "pageNum",
|
|
201
206
|
pageSizeKey: "pageSize",
|
|
202
207
|
pageSize: t.pageSize,
|
|
203
208
|
searchKey: t.searchKey,
|
|
204
|
-
extraParams:
|
|
209
|
+
extraParams: C(),
|
|
205
210
|
labelField: t.labelField,
|
|
206
211
|
valueField: t.valueField
|
|
207
212
|
});
|
|
208
|
-
function
|
|
213
|
+
function u() {
|
|
209
214
|
return t.apiUrl ? t.apiUrl : "/api/system/dict/data/list";
|
|
210
215
|
}
|
|
211
|
-
function
|
|
212
|
-
const
|
|
213
|
-
return t.dictCode && !t.apiUrl && (
|
|
216
|
+
function C() {
|
|
217
|
+
const b = { ...t.extraParams || {} };
|
|
218
|
+
return t.dictCode && !t.apiUrl && (b.dictCode = t.dictCode), b;
|
|
214
219
|
}
|
|
215
|
-
const g =
|
|
216
|
-
value:
|
|
217
|
-
label:
|
|
218
|
-
disabled:
|
|
220
|
+
const g = V(() => t.options ? t.options : m.value.map((b) => ({
|
|
221
|
+
value: b[t.valueField],
|
|
222
|
+
label: b[t.labelField],
|
|
223
|
+
disabled: b.disabled ?? !1
|
|
219
224
|
})));
|
|
220
|
-
return
|
|
225
|
+
return Z(() => {
|
|
221
226
|
t.options || h(void 0, !0);
|
|
222
|
-
}), (
|
|
227
|
+
}), (b, n) => (i(), w(a(ue), I(b.$attrs, {
|
|
223
228
|
"model-value": e.modelValue,
|
|
224
229
|
loading: a(o),
|
|
225
230
|
multiple: e.mode === "multiple",
|
|
@@ -235,8 +240,8 @@ const ze = /* @__PURE__ */ N({
|
|
|
235
240
|
onBlur: n[3] || (n[3] = (d) => r("blur", d)),
|
|
236
241
|
onFocus: n[4] || (n[4] = (d) => r("focus", d))
|
|
237
242
|
}), {
|
|
238
|
-
default:
|
|
239
|
-
(
|
|
243
|
+
default: v(() => [
|
|
244
|
+
(i(!0), D(O, null, K(g.value, (d) => (i(), w(a(de), {
|
|
240
245
|
key: d.value,
|
|
241
246
|
label: d.label,
|
|
242
247
|
value: d.value,
|
|
@@ -247,10 +252,10 @@ const ze = /* @__PURE__ */ N({
|
|
|
247
252
|
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size"]));
|
|
248
253
|
}
|
|
249
254
|
});
|
|
250
|
-
|
|
251
|
-
e.component(
|
|
255
|
+
$e.install = (e) => {
|
|
256
|
+
e.component($e.name ?? "EeDictSelect", $e);
|
|
252
257
|
};
|
|
253
|
-
const
|
|
258
|
+
const Me = /* @__PURE__ */ H({
|
|
254
259
|
name: "EeStatusTag",
|
|
255
260
|
__name: "index",
|
|
256
261
|
props: {
|
|
@@ -261,17 +266,17 @@ const xe = /* @__PURE__ */ N({
|
|
|
261
266
|
defaultEffect: { default: "light" }
|
|
262
267
|
},
|
|
263
268
|
setup(e) {
|
|
264
|
-
const l = e, t =
|
|
269
|
+
const l = e, t = V(() => l.mapping.find((r) => r.value === l.value));
|
|
265
270
|
return (r, o) => {
|
|
266
|
-
var
|
|
267
|
-
return
|
|
268
|
-
type: ((
|
|
271
|
+
var m, h;
|
|
272
|
+
return i(), w(a(Dl), I(r.$attrs, {
|
|
273
|
+
type: ((m = t.value) == null ? void 0 : m.type) ?? e.defaultType,
|
|
269
274
|
effect: ((h = t.value) == null ? void 0 : h.effect) ?? e.defaultEffect
|
|
270
275
|
}), {
|
|
271
|
-
default:
|
|
272
|
-
var
|
|
276
|
+
default: v(() => {
|
|
277
|
+
var u;
|
|
273
278
|
return [
|
|
274
|
-
|
|
279
|
+
M(F(((u = t.value) == null ? void 0 : u.label) ?? e.fallbackLabel ?? e.value), 1)
|
|
275
280
|
];
|
|
276
281
|
}),
|
|
277
282
|
_: 1
|
|
@@ -279,10 +284,10 @@ const xe = /* @__PURE__ */ N({
|
|
|
279
284
|
};
|
|
280
285
|
}
|
|
281
286
|
});
|
|
282
|
-
|
|
283
|
-
e.component(
|
|
287
|
+
Me.install = (e) => {
|
|
288
|
+
e.component(Me.name ?? "EeStatusTag", Me);
|
|
284
289
|
};
|
|
285
|
-
const
|
|
290
|
+
const Ml = { class: "ee-search-bar" }, Il = /* @__PURE__ */ H({
|
|
286
291
|
name: "EeSearchBar",
|
|
287
292
|
__name: "index",
|
|
288
293
|
props: {
|
|
@@ -296,124 +301,124 @@ const ol = { class: "ee-search-bar" }, rl = /* @__PURE__ */ N({
|
|
|
296
301
|
},
|
|
297
302
|
emits: ["update:modelValue", "search", "reset"],
|
|
298
303
|
setup(e, { emit: l }) {
|
|
299
|
-
const { t } =
|
|
300
|
-
const d = 24 -
|
|
304
|
+
const { t } = _(), r = e, o = l, m = A(), h = A(!1), u = V(() => {
|
|
305
|
+
const d = 24 - C.value.reduce((s, p) => s + (p.span ?? 6), 0) % 24;
|
|
301
306
|
return d === 24 ? 6 : d;
|
|
302
|
-
}),
|
|
307
|
+
}), C = V(() => !r.collapsible || h.value ? r.fields : r.fields.slice(0, r.collapsedCount));
|
|
303
308
|
function g() {
|
|
304
309
|
o("search", { ...r.modelValue });
|
|
305
310
|
}
|
|
306
|
-
function
|
|
311
|
+
function b() {
|
|
307
312
|
const n = {};
|
|
308
313
|
r.fields.forEach((d) => {
|
|
309
314
|
n[d.prop] = "";
|
|
310
315
|
}), o("update:modelValue", n), o("reset");
|
|
311
316
|
}
|
|
312
|
-
return (n, d) => (
|
|
313
|
-
|
|
317
|
+
return (n, d) => (i(), D("div", Ml, [
|
|
318
|
+
T(a(Ye), I({
|
|
314
319
|
ref_key: "formRef",
|
|
315
|
-
ref:
|
|
320
|
+
ref: m,
|
|
316
321
|
model: e.modelValue,
|
|
317
322
|
inline: e.inline,
|
|
318
323
|
"label-width": e.labelWidth,
|
|
319
324
|
size: e.size
|
|
320
325
|
}, n.$attrs), {
|
|
321
|
-
default:
|
|
322
|
-
|
|
323
|
-
default:
|
|
324
|
-
(
|
|
325
|
-
key:
|
|
326
|
-
span:
|
|
326
|
+
default: v(() => [
|
|
327
|
+
T(a(Je), null, {
|
|
328
|
+
default: v(() => [
|
|
329
|
+
(i(!0), D(O, null, K(C.value, (s) => (i(), w(a(xe), {
|
|
330
|
+
key: s.prop,
|
|
331
|
+
span: s.span ?? 6
|
|
327
332
|
}, {
|
|
328
|
-
default:
|
|
329
|
-
|
|
330
|
-
label:
|
|
331
|
-
prop:
|
|
333
|
+
default: v(() => [
|
|
334
|
+
T(a(ze), {
|
|
335
|
+
label: s.label,
|
|
336
|
+
prop: s.prop
|
|
332
337
|
}, {
|
|
333
|
-
default:
|
|
334
|
-
(
|
|
338
|
+
default: v(() => [
|
|
339
|
+
(s.type ?? "input") === "input" ? (i(), w(a(ge), {
|
|
335
340
|
key: 0,
|
|
336
|
-
modelValue: e.modelValue[
|
|
337
|
-
"onUpdate:modelValue": (p) => e.modelValue[
|
|
338
|
-
placeholder:
|
|
341
|
+
modelValue: e.modelValue[s.prop],
|
|
342
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
343
|
+
placeholder: s.placeholder ?? a(t)("searchBar", "inputPlaceholder", { label: s.label }),
|
|
339
344
|
clearable: ""
|
|
340
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
345
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : s.type === "select" ? (i(), w(a(ue), {
|
|
341
346
|
key: 1,
|
|
342
|
-
modelValue: e.modelValue[
|
|
343
|
-
"onUpdate:modelValue": (p) => e.modelValue[
|
|
344
|
-
placeholder:
|
|
347
|
+
modelValue: e.modelValue[s.prop],
|
|
348
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
349
|
+
placeholder: s.placeholder ?? a(t)("searchBar", "selectPlaceholder", { label: s.label }),
|
|
345
350
|
clearable: ""
|
|
346
351
|
}, {
|
|
347
|
-
default:
|
|
348
|
-
(
|
|
352
|
+
default: v(() => [
|
|
353
|
+
(i(!0), D(O, null, K(s.options ?? [], (p) => (i(), w(a(de), {
|
|
349
354
|
key: p.value,
|
|
350
355
|
label: p.label,
|
|
351
356
|
value: p.value
|
|
352
357
|
}, null, 8, ["label", "value"]))), 128))
|
|
353
358
|
]),
|
|
354
359
|
_: 2
|
|
355
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
360
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : s.type === "date" ? (i(), w(a(ve), {
|
|
356
361
|
key: 2,
|
|
357
|
-
modelValue: e.modelValue[
|
|
358
|
-
"onUpdate:modelValue": (p) => e.modelValue[
|
|
359
|
-
placeholder:
|
|
362
|
+
modelValue: e.modelValue[s.prop],
|
|
363
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
364
|
+
placeholder: s.placeholder ?? a(t)("searchBar", "selectPlaceholder", { label: s.label }),
|
|
360
365
|
style: { width: "100%" }
|
|
361
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
366
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : s.type === "date-range" ? (i(), w(a(ve), {
|
|
362
367
|
key: 3,
|
|
363
|
-
modelValue: e.modelValue[
|
|
364
|
-
"onUpdate:modelValue": (p) => e.modelValue[
|
|
368
|
+
modelValue: e.modelValue[s.prop],
|
|
369
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p,
|
|
365
370
|
type: "daterange",
|
|
366
371
|
"range-separator": a(t)("searchBar", "dateRangeTo"),
|
|
367
372
|
"start-placeholder": a(t)("searchBar", "dateRangeStart"),
|
|
368
373
|
"end-placeholder": a(t)("searchBar", "dateRangeEnd"),
|
|
369
374
|
style: { width: "100%" }
|
|
370
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) :
|
|
375
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : s.component ? (i(), w(Fa(s.component), {
|
|
371
376
|
key: 4,
|
|
372
|
-
modelValue: e.modelValue[
|
|
373
|
-
"onUpdate:modelValue": (p) => e.modelValue[
|
|
374
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) :
|
|
377
|
+
modelValue: e.modelValue[s.prop],
|
|
378
|
+
"onUpdate:modelValue": (p) => e.modelValue[s.prop] = p
|
|
379
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : L("", !0)
|
|
375
380
|
]),
|
|
376
381
|
_: 2
|
|
377
382
|
}, 1032, ["label", "prop"])
|
|
378
383
|
]),
|
|
379
384
|
_: 2
|
|
380
385
|
}, 1032, ["span"]))), 128)),
|
|
381
|
-
|
|
382
|
-
default:
|
|
383
|
-
|
|
384
|
-
default:
|
|
385
|
-
|
|
386
|
+
T(a(xe), { span: u.value }, {
|
|
387
|
+
default: v(() => [
|
|
388
|
+
T(a(ze), null, {
|
|
389
|
+
default: v(() => [
|
|
390
|
+
T(a(q), {
|
|
386
391
|
type: "primary",
|
|
387
392
|
size: e.size,
|
|
388
393
|
round: "",
|
|
389
394
|
onClick: g
|
|
390
395
|
}, {
|
|
391
|
-
default:
|
|
392
|
-
|
|
396
|
+
default: v(() => [
|
|
397
|
+
M(F(a(t)("searchBar", "search")), 1)
|
|
393
398
|
]),
|
|
394
399
|
_: 1
|
|
395
400
|
}, 8, ["size"]),
|
|
396
|
-
|
|
401
|
+
T(a(q), {
|
|
397
402
|
size: e.size,
|
|
398
403
|
round: "",
|
|
399
|
-
onClick:
|
|
404
|
+
onClick: b
|
|
400
405
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
|
|
406
|
+
default: v(() => [
|
|
407
|
+
M(F(a(t)("searchBar", "reset")), 1)
|
|
403
408
|
]),
|
|
404
409
|
_: 1
|
|
405
410
|
}, 8, ["size"]),
|
|
406
|
-
e.collapsible && e.fields.length > e.collapsedCount ? (
|
|
411
|
+
e.collapsible && e.fields.length > e.collapsedCount ? (i(), w(a(q), {
|
|
407
412
|
key: 0,
|
|
408
413
|
text: "",
|
|
409
414
|
size: e.size,
|
|
410
|
-
onClick: d[0] || (d[0] = (
|
|
415
|
+
onClick: d[0] || (d[0] = (s) => h.value = !h.value)
|
|
411
416
|
}, {
|
|
412
|
-
default:
|
|
413
|
-
|
|
417
|
+
default: v(() => [
|
|
418
|
+
M(F(h.value ? a(t)("searchBar", "collapse") : a(t)("searchBar", "expand")), 1)
|
|
414
419
|
]),
|
|
415
420
|
_: 1
|
|
416
|
-
}, 8, ["size"])) :
|
|
421
|
+
}, 8, ["size"])) : L("", !0)
|
|
417
422
|
]),
|
|
418
423
|
_: 1
|
|
419
424
|
})
|
|
@@ -428,16 +433,16 @@ const ol = { class: "ee-search-bar" }, rl = /* @__PURE__ */ N({
|
|
|
428
433
|
}, 16, ["model", "inline", "label-width", "size"])
|
|
429
434
|
]));
|
|
430
435
|
}
|
|
431
|
-
}),
|
|
436
|
+
}), De = (e, l) => {
|
|
432
437
|
const t = e.__vccOpts || e;
|
|
433
438
|
for (const [r, o] of l)
|
|
434
439
|
t[r] = o;
|
|
435
440
|
return t;
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
e.component(
|
|
441
|
+
}, Ie = /* @__PURE__ */ De(Il, [["__scopeId", "data-v-fe481020"]]);
|
|
442
|
+
Ie.install = (e) => {
|
|
443
|
+
e.component(Ie.name ?? "EeSearchBar", Ie);
|
|
439
444
|
};
|
|
440
|
-
const
|
|
445
|
+
const Ol = { class: "ee-form-dialog-footer" }, Ll = /* @__PURE__ */ H({
|
|
441
446
|
name: "EeFormDialog",
|
|
442
447
|
__name: "index",
|
|
443
448
|
props: {
|
|
@@ -453,9 +458,9 @@ const nl = { class: "ee-form-dialog-footer" }, il = /* @__PURE__ */ N({
|
|
|
453
458
|
},
|
|
454
459
|
emits: ["update:modelValue", "submit", "cancel"],
|
|
455
460
|
setup(e, { emit: l }) {
|
|
456
|
-
const { t } =
|
|
461
|
+
const { t } = _(), r = e, o = l, m = A(), h = V(() => {
|
|
457
462
|
const g = {};
|
|
458
|
-
for (const
|
|
463
|
+
for (const b of Object.keys(r))
|
|
459
464
|
[
|
|
460
465
|
"modelValue",
|
|
461
466
|
"title",
|
|
@@ -465,150 +470,150 @@ const nl = { class: "ee-form-dialog-footer" }, il = /* @__PURE__ */ N({
|
|
|
465
470
|
"width",
|
|
466
471
|
"labelWidth",
|
|
467
472
|
"loading"
|
|
468
|
-
].includes(
|
|
473
|
+
].includes(b) || (g[b] = r[b]);
|
|
469
474
|
return g;
|
|
470
475
|
});
|
|
471
|
-
function
|
|
476
|
+
function u() {
|
|
472
477
|
o("update:modelValue", !1), o("cancel");
|
|
473
478
|
}
|
|
474
|
-
async function
|
|
475
|
-
if (
|
|
479
|
+
async function C() {
|
|
480
|
+
if (m.value)
|
|
476
481
|
try {
|
|
477
|
-
await
|
|
482
|
+
await m.value.validate(), o("submit", { ...r.formData });
|
|
478
483
|
} catch {
|
|
479
484
|
}
|
|
480
485
|
}
|
|
481
|
-
return (g,
|
|
486
|
+
return (g, b) => (i(), w(a(Ua), I(g.$attrs, {
|
|
482
487
|
"model-value": e.modelValue,
|
|
483
488
|
title: e.title,
|
|
484
489
|
width: e.width,
|
|
485
|
-
"onUpdate:modelValue":
|
|
486
|
-
onClose:
|
|
490
|
+
"onUpdate:modelValue": b[0] || (b[0] = (n) => o("update:modelValue", n)),
|
|
491
|
+
onClose: u
|
|
487
492
|
}), {
|
|
488
|
-
footer:
|
|
489
|
-
|
|
490
|
-
|
|
493
|
+
footer: v(() => [
|
|
494
|
+
N("span", Ol, [
|
|
495
|
+
T(a(q), {
|
|
491
496
|
size: e.size,
|
|
492
497
|
round: "",
|
|
493
|
-
onClick:
|
|
498
|
+
onClick: u
|
|
494
499
|
}, {
|
|
495
|
-
default:
|
|
496
|
-
|
|
500
|
+
default: v(() => [
|
|
501
|
+
M(F(a(t)("formDialog", "cancel")), 1)
|
|
497
502
|
]),
|
|
498
503
|
_: 1
|
|
499
504
|
}, 8, ["size"]),
|
|
500
|
-
|
|
505
|
+
T(a(q), {
|
|
501
506
|
type: "primary",
|
|
502
507
|
size: e.size,
|
|
503
508
|
round: "",
|
|
504
509
|
loading: e.loading,
|
|
505
|
-
onClick:
|
|
510
|
+
onClick: C
|
|
506
511
|
}, {
|
|
507
|
-
default:
|
|
508
|
-
|
|
512
|
+
default: v(() => [
|
|
513
|
+
M(F(a(t)("formDialog", "confirm")), 1)
|
|
509
514
|
]),
|
|
510
515
|
_: 1
|
|
511
516
|
}, 8, ["size", "loading"])
|
|
512
517
|
])
|
|
513
518
|
]),
|
|
514
|
-
default:
|
|
515
|
-
|
|
519
|
+
default: v(() => [
|
|
520
|
+
T(a(Ye), I({
|
|
516
521
|
ref_key: "formRef",
|
|
517
|
-
ref:
|
|
522
|
+
ref: m,
|
|
518
523
|
model: e.formData,
|
|
519
524
|
rules: e.rules,
|
|
520
525
|
"label-width": e.labelWidth,
|
|
521
526
|
size: e.size
|
|
522
527
|
}, h.value), {
|
|
523
|
-
default:
|
|
524
|
-
|
|
525
|
-
default:
|
|
526
|
-
(
|
|
528
|
+
default: v(() => [
|
|
529
|
+
T(a(Je), { gutter: 20 }, {
|
|
530
|
+
default: v(() => [
|
|
531
|
+
(i(!0), D(O, null, K(e.fields, (n) => (i(), w(a(xe), {
|
|
527
532
|
key: n.prop,
|
|
528
533
|
span: n.span ?? 24
|
|
529
534
|
}, {
|
|
530
|
-
default:
|
|
531
|
-
|
|
535
|
+
default: v(() => [
|
|
536
|
+
T(a(ze), {
|
|
532
537
|
label: n.label,
|
|
533
538
|
prop: n.prop
|
|
534
539
|
}, {
|
|
535
|
-
default:
|
|
536
|
-
(n.type ?? "input") === "input" ? (
|
|
540
|
+
default: v(() => [
|
|
541
|
+
(n.type ?? "input") === "input" ? (i(), w(a(ge), {
|
|
537
542
|
key: 0,
|
|
538
543
|
modelValue: e.formData[n.prop],
|
|
539
544
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
540
545
|
placeholder: n.placeholder ?? a(t)("formDialog", "inputPlaceholder", { label: n.label })
|
|
541
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "textarea" ? (
|
|
546
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "textarea" ? (i(), w(a(ge), {
|
|
542
547
|
key: 1,
|
|
543
548
|
modelValue: e.formData[n.prop],
|
|
544
549
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
545
550
|
type: "textarea",
|
|
546
551
|
placeholder: n.placeholder ?? a(t)("formDialog", "textareaPlaceholder", { label: n.label }),
|
|
547
552
|
rows: 3
|
|
548
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "select" ? (
|
|
553
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "select" ? (i(), w(a(ue), {
|
|
549
554
|
key: 2,
|
|
550
555
|
modelValue: e.formData[n.prop],
|
|
551
556
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
552
557
|
placeholder: n.placeholder ?? a(t)("formDialog", "selectPlaceholder", { label: n.label }),
|
|
553
558
|
style: { width: "100%" }
|
|
554
559
|
}, {
|
|
555
|
-
default:
|
|
556
|
-
(
|
|
560
|
+
default: v(() => [
|
|
561
|
+
(i(!0), D(O, null, K(n.options ?? [], (d) => (i(), w(a(de), {
|
|
557
562
|
key: d.value,
|
|
558
563
|
label: d.label,
|
|
559
564
|
value: d.value
|
|
560
565
|
}, null, 8, ["label", "value"]))), 128))
|
|
561
566
|
]),
|
|
562
567
|
_: 2
|
|
563
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "radio" ? (
|
|
568
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.type === "radio" ? (i(), w(a(ca), {
|
|
564
569
|
key: 3,
|
|
565
570
|
modelValue: e.formData[n.prop],
|
|
566
571
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
567
572
|
}, {
|
|
568
|
-
default:
|
|
569
|
-
(
|
|
573
|
+
default: v(() => [
|
|
574
|
+
(i(!0), D(O, null, K(n.options ?? [], (d) => (i(), w(a(Qe), {
|
|
570
575
|
key: d.value,
|
|
571
576
|
label: d.value
|
|
572
577
|
}, {
|
|
573
|
-
default:
|
|
574
|
-
|
|
578
|
+
default: v(() => [
|
|
579
|
+
M(F(d.label), 1)
|
|
575
580
|
]),
|
|
576
581
|
_: 2
|
|
577
582
|
}, 1032, ["label"]))), 128))
|
|
578
583
|
]),
|
|
579
584
|
_: 2
|
|
580
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "checkbox" ? (
|
|
585
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "checkbox" ? (i(), w(a(fa), {
|
|
581
586
|
key: 4,
|
|
582
587
|
modelValue: e.formData[n.prop],
|
|
583
588
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
584
589
|
}, {
|
|
585
|
-
default:
|
|
586
|
-
(
|
|
590
|
+
default: v(() => [
|
|
591
|
+
(i(!0), D(O, null, K(n.options ?? [], (d) => (i(), w(a(Ce), {
|
|
587
592
|
key: d.value,
|
|
588
593
|
label: d.value
|
|
589
594
|
}, {
|
|
590
|
-
default:
|
|
591
|
-
|
|
595
|
+
default: v(() => [
|
|
596
|
+
M(F(d.label), 1)
|
|
592
597
|
]),
|
|
593
598
|
_: 2
|
|
594
599
|
}, 1032, ["label"]))), 128))
|
|
595
600
|
]),
|
|
596
601
|
_: 2
|
|
597
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "switch" ? (
|
|
602
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : n.type === "switch" ? (i(), w(a($a), {
|
|
598
603
|
key: 5,
|
|
599
604
|
modelValue: e.formData[n.prop],
|
|
600
605
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
601
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : n.type === "date" ? (
|
|
606
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : n.type === "date" ? (i(), w(a(ve), {
|
|
602
607
|
key: 6,
|
|
603
608
|
modelValue: e.formData[n.prop],
|
|
604
609
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d,
|
|
605
610
|
placeholder: n.placeholder ?? a(t)("formDialog", "datePickerPlaceholder", { label: n.label }),
|
|
606
611
|
style: { width: "100%" }
|
|
607
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.component ? (
|
|
612
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : n.component ? (i(), w(Fa(n.component), {
|
|
608
613
|
key: 7,
|
|
609
614
|
modelValue: e.formData[n.prop],
|
|
610
615
|
"onUpdate:modelValue": (d) => e.formData[n.prop] = d
|
|
611
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) :
|
|
616
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : L("", !0)
|
|
612
617
|
]),
|
|
613
618
|
_: 2
|
|
614
619
|
}, 1032, ["label", "prop"])
|
|
@@ -625,36 +630,144 @@ const nl = { class: "ee-form-dialog-footer" }, il = /* @__PURE__ */ N({
|
|
|
625
630
|
_: 1
|
|
626
631
|
}, 16, ["model-value", "title", "width"]));
|
|
627
632
|
}
|
|
628
|
-
}),
|
|
629
|
-
|
|
630
|
-
e.component(
|
|
633
|
+
}), Oe = /* @__PURE__ */ De(Ll, [["__scopeId", "data-v-929d8568"]]);
|
|
634
|
+
Oe.install = (e) => {
|
|
635
|
+
e.component(Oe.name ?? "EeFormDialog", Oe);
|
|
631
636
|
};
|
|
632
|
-
|
|
637
|
+
/*! Element Plus Icons Vue v2.3.2 */
|
|
638
|
+
var Nl = /* @__PURE__ */ H({
|
|
639
|
+
name: "Delete",
|
|
640
|
+
__name: "delete",
|
|
641
|
+
setup(e) {
|
|
642
|
+
return (l, t) => (i(), D("svg", {
|
|
643
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
644
|
+
viewBox: "0 0 1024 1024"
|
|
645
|
+
}, [
|
|
646
|
+
N("path", {
|
|
647
|
+
fill: "currentColor",
|
|
648
|
+
d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
|
|
649
|
+
})
|
|
650
|
+
]));
|
|
651
|
+
}
|
|
652
|
+
}), Kl = Nl, ql = /* @__PURE__ */ H({
|
|
653
|
+
name: "Edit",
|
|
654
|
+
__name: "edit",
|
|
655
|
+
setup(e) {
|
|
656
|
+
return (l, t) => (i(), D("svg", {
|
|
657
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
658
|
+
viewBox: "0 0 1024 1024"
|
|
659
|
+
}, [
|
|
660
|
+
N("path", {
|
|
661
|
+
fill: "currentColor",
|
|
662
|
+
d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
|
|
663
|
+
}),
|
|
664
|
+
N("path", {
|
|
665
|
+
fill: "currentColor",
|
|
666
|
+
d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
|
|
667
|
+
})
|
|
668
|
+
]));
|
|
669
|
+
}
|
|
670
|
+
}), Hl = ql, Wl = /* @__PURE__ */ H({
|
|
671
|
+
name: "MoreFilled",
|
|
672
|
+
__name: "more-filled",
|
|
673
|
+
setup(e) {
|
|
674
|
+
return (l, t) => (i(), D("svg", {
|
|
675
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
676
|
+
viewBox: "0 0 1024 1024"
|
|
677
|
+
}, [
|
|
678
|
+
N("path", {
|
|
679
|
+
fill: "currentColor",
|
|
680
|
+
d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"
|
|
681
|
+
})
|
|
682
|
+
]));
|
|
683
|
+
}
|
|
684
|
+
}), jl = Wl, Gl = /* @__PURE__ */ H({
|
|
685
|
+
name: "Rank",
|
|
686
|
+
__name: "rank",
|
|
687
|
+
setup(e) {
|
|
688
|
+
return (l, t) => (i(), D("svg", {
|
|
689
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
690
|
+
viewBox: "0 0 1024 1024"
|
|
691
|
+
}, [
|
|
692
|
+
N("path", {
|
|
693
|
+
fill: "currentColor",
|
|
694
|
+
d: "m186.496 544 41.408 41.344a32 32 0 1 1-45.248 45.312l-96-96a32 32 0 0 1 0-45.312l96-96a32 32 0 1 1 45.248 45.312L186.496 480h290.816V186.432l-41.472 41.472a32 32 0 1 1-45.248-45.184l96-96.128a32 32 0 0 1 45.312 0l96 96.064a32 32 0 0 1-45.248 45.184l-41.344-41.28V480H832l-41.344-41.344a32 32 0 0 1 45.248-45.312l96 96a32 32 0 0 1 0 45.312l-96 96a32 32 0 0 1-45.248-45.312L832 544H541.312v293.44l41.344-41.28a32 32 0 1 1 45.248 45.248l-96 96a32 32 0 0 1-45.312 0l-96-96a32 32 0 1 1 45.312-45.248l41.408 41.408V544z"
|
|
695
|
+
})
|
|
696
|
+
]));
|
|
697
|
+
}
|
|
698
|
+
}), Xl = Gl, Yl = /* @__PURE__ */ H({
|
|
699
|
+
name: "Refresh",
|
|
700
|
+
__name: "refresh",
|
|
701
|
+
setup(e) {
|
|
702
|
+
return (l, t) => (i(), D("svg", {
|
|
703
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
704
|
+
viewBox: "0 0 1024 1024"
|
|
705
|
+
}, [
|
|
706
|
+
N("path", {
|
|
707
|
+
fill: "currentColor",
|
|
708
|
+
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
709
|
+
})
|
|
710
|
+
]));
|
|
711
|
+
}
|
|
712
|
+
}), Jl = Yl, Ql = /* @__PURE__ */ H({
|
|
713
|
+
name: "Setting",
|
|
714
|
+
__name: "setting",
|
|
715
|
+
setup(e) {
|
|
716
|
+
return (l, t) => (i(), D("svg", {
|
|
717
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
718
|
+
viewBox: "0 0 1024 1024"
|
|
719
|
+
}, [
|
|
720
|
+
N("path", {
|
|
721
|
+
fill: "currentColor",
|
|
722
|
+
d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
|
|
723
|
+
})
|
|
724
|
+
]));
|
|
725
|
+
}
|
|
726
|
+
}), Zl = Ql, _l = /* @__PURE__ */ H({
|
|
727
|
+
name: "View",
|
|
728
|
+
__name: "view",
|
|
729
|
+
setup(e) {
|
|
730
|
+
return (l, t) => (i(), D("svg", {
|
|
731
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
732
|
+
viewBox: "0 0 1024 1024"
|
|
733
|
+
}, [
|
|
734
|
+
N("path", {
|
|
735
|
+
fill: "currentColor",
|
|
736
|
+
d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
|
|
737
|
+
})
|
|
738
|
+
]));
|
|
739
|
+
}
|
|
740
|
+
}), et = _l;
|
|
741
|
+
const Na = [10, 20, 50, 100], at = "total, sizes, prev, pager, next, jumper", Va = {
|
|
633
742
|
show: !0,
|
|
634
743
|
cols: 3,
|
|
635
744
|
maxRow: 2,
|
|
636
745
|
foldable: !0,
|
|
637
746
|
foldDefault: !0
|
|
638
|
-
},
|
|
747
|
+
}, ka = { show: !1 }, lt = {
|
|
639
748
|
show: !0,
|
|
640
749
|
pageSize: 20,
|
|
641
|
-
pageSizes:
|
|
750
|
+
pageSizes: Na,
|
|
642
751
|
background: !0
|
|
643
|
-
},
|
|
752
|
+
}, tt = { show: !1 }, Ta = {
|
|
644
753
|
show: !0,
|
|
645
754
|
showView: !1,
|
|
646
755
|
showEdit: !0,
|
|
647
756
|
showDelete: !0,
|
|
757
|
+
showVersion: !1,
|
|
648
758
|
confirmDelete: !0,
|
|
649
759
|
deleteConfirmTitle: "",
|
|
650
|
-
deleteConfirmMessage: ""
|
|
651
|
-
|
|
760
|
+
deleteConfirmMessage: "",
|
|
761
|
+
buttonMode: "text",
|
|
762
|
+
maxButtons: 3
|
|
763
|
+
}, Ea = { show: !1 }, ot = {
|
|
652
764
|
show: !0,
|
|
653
765
|
showAdd: !1,
|
|
654
766
|
showImport: !1,
|
|
655
767
|
showExport: !1,
|
|
656
|
-
showBatchDelete: !1
|
|
657
|
-
|
|
768
|
+
showBatchDelete: !1,
|
|
769
|
+
showRefresh: !0
|
|
770
|
+
}, Pa = { show: !1 }, rt = {
|
|
658
771
|
mode: "drawer",
|
|
659
772
|
width: "40%",
|
|
660
773
|
closeOnReset: !0,
|
|
@@ -663,7 +776,7 @@ const ya = [10, 20, 50, 100], ul = "total, sizes, prev, pager, next, jumper", sa
|
|
|
663
776
|
viewTitle: "",
|
|
664
777
|
formCols: 2,
|
|
665
778
|
formLabelWidth: "80px"
|
|
666
|
-
},
|
|
779
|
+
}, nt = [
|
|
667
780
|
"data",
|
|
668
781
|
"loading",
|
|
669
782
|
"size",
|
|
@@ -672,8 +785,9 @@ const ya = [10, 20, 50, 100], ul = "total, sizes, prev, pager, next, jumper", sa
|
|
|
672
785
|
"height",
|
|
673
786
|
"max-height",
|
|
674
787
|
"highlight-current-row",
|
|
675
|
-
"row-key"
|
|
676
|
-
|
|
788
|
+
"row-key",
|
|
789
|
+
"readOnly"
|
|
790
|
+
], it = [
|
|
677
791
|
"prop",
|
|
678
792
|
"label",
|
|
679
793
|
"width",
|
|
@@ -682,6 +796,7 @@ const ya = [10, 20, 50, 100], ul = "total, sizes, prev, pager, next, jumper", sa
|
|
|
682
796
|
"fixed",
|
|
683
797
|
"sortable",
|
|
684
798
|
"show",
|
|
799
|
+
"showTooltip",
|
|
685
800
|
"formatter",
|
|
686
801
|
"dictKey",
|
|
687
802
|
"slotName",
|
|
@@ -691,69 +806,69 @@ const ya = [10, 20, 50, 100], ul = "total, sizes, prev, pager, next, jumper", sa
|
|
|
691
806
|
"children",
|
|
692
807
|
"className"
|
|
693
808
|
];
|
|
694
|
-
function
|
|
695
|
-
const l =
|
|
809
|
+
function st(e) {
|
|
810
|
+
const l = V(() => !!e.authChecker);
|
|
696
811
|
function t(r) {
|
|
697
812
|
return !r || !e.authChecker ? !0 : e.authChecker(r);
|
|
698
813
|
}
|
|
699
814
|
return { authPass: t, authEnabled: l };
|
|
700
815
|
}
|
|
701
|
-
function
|
|
816
|
+
function ut(e) {
|
|
702
817
|
function l(r, o) {
|
|
703
|
-
var
|
|
704
|
-
return r || (o && ((
|
|
818
|
+
var m;
|
|
819
|
+
return r || (o && ((m = e.dictMap) != null && m[o]) ? e.dictMap[o] : []);
|
|
705
820
|
}
|
|
706
821
|
function t(r, o) {
|
|
707
822
|
var h;
|
|
708
823
|
if (!r || !((h = e.dictMap) != null && h[r])) return String(o ?? "");
|
|
709
|
-
const
|
|
710
|
-
return (
|
|
824
|
+
const m = e.dictMap[r].find((u) => u.value === o);
|
|
825
|
+
return (m == null ? void 0 : m.label) ?? String(o ?? "");
|
|
711
826
|
}
|
|
712
827
|
return { resolvedDict: l, dictLabel: t };
|
|
713
828
|
}
|
|
714
|
-
function
|
|
715
|
-
const l =
|
|
716
|
-
var
|
|
717
|
-
return (
|
|
718
|
-
}).map((
|
|
719
|
-
const
|
|
829
|
+
function dt(e) {
|
|
830
|
+
const l = A(!0), t = Ra({}), r = V(() => e.searchConfig === !1 ? ka : e.searchConfig === !0 ? { ...Va } : e.searchConfig ? { ...Va, ...e.searchConfig } : ka), o = V(() => r.value.show), m = V(() => r.value.cols || 3), h = V(() => e.columns.filter((f) => {
|
|
831
|
+
var z;
|
|
832
|
+
return (z = f.search) == null ? void 0 : z.enable;
|
|
833
|
+
}).map((f) => {
|
|
834
|
+
const z = f.search;
|
|
720
835
|
return {
|
|
721
|
-
...
|
|
722
|
-
prop:
|
|
723
|
-
label:
|
|
724
|
-
field:
|
|
725
|
-
placeholder:
|
|
726
|
-
dictKey:
|
|
727
|
-
props:
|
|
836
|
+
...z,
|
|
837
|
+
prop: f.prop,
|
|
838
|
+
label: f.label,
|
|
839
|
+
field: z.field || f.prop,
|
|
840
|
+
placeholder: z.placeholder || f.label,
|
|
841
|
+
dictKey: f.dictKey,
|
|
842
|
+
props: z.props || {}
|
|
728
843
|
};
|
|
729
|
-
})),
|
|
730
|
-
() => r.value.foldable !== !1 && h.value.length >
|
|
844
|
+
})), u = V(() => r.value.maxRow || 2), C = V(() => m.value * u.value), g = V(
|
|
845
|
+
() => r.value.foldable !== !1 && h.value.length > C.value
|
|
731
846
|
);
|
|
732
|
-
|
|
847
|
+
Z(() => {
|
|
733
848
|
r.value.foldDefault !== !1 && (l.value = !1);
|
|
734
849
|
});
|
|
735
|
-
const
|
|
850
|
+
const b = V(() => !l.value && g.value ? h.value.slice(0, C.value) : h.value), n = V(() => 24 / m.value);
|
|
736
851
|
function d() {
|
|
737
|
-
h.value.forEach((
|
|
738
|
-
t[
|
|
852
|
+
h.value.forEach((f) => {
|
|
853
|
+
t[f.field] = f.defaultValue ?? "";
|
|
739
854
|
});
|
|
740
855
|
}
|
|
741
|
-
function
|
|
742
|
-
const
|
|
743
|
-
return h.value.forEach((
|
|
744
|
-
|
|
745
|
-
}),
|
|
856
|
+
function s() {
|
|
857
|
+
const f = {};
|
|
858
|
+
return h.value.forEach((z) => {
|
|
859
|
+
f[z.field] = z.defaultValue ?? "";
|
|
860
|
+
}), f;
|
|
746
861
|
}
|
|
747
862
|
function p() {
|
|
748
|
-
const
|
|
749
|
-
for (const [
|
|
750
|
-
|
|
751
|
-
return
|
|
863
|
+
const f = {};
|
|
864
|
+
for (const [z, U] of Object.entries(t))
|
|
865
|
+
U !== "" && U !== null && U !== void 0 && (f[z] = U);
|
|
866
|
+
return f;
|
|
752
867
|
}
|
|
753
|
-
function
|
|
754
|
-
Object.assign(t,
|
|
868
|
+
function c() {
|
|
869
|
+
Object.assign(t, s());
|
|
755
870
|
}
|
|
756
|
-
function
|
|
871
|
+
function k() {
|
|
757
872
|
l.value = !l.value;
|
|
758
873
|
}
|
|
759
874
|
return {
|
|
@@ -761,112 +876,180 @@ function vl(e) {
|
|
|
761
876
|
searchParams: t,
|
|
762
877
|
searchCfg: r,
|
|
763
878
|
showSearch: o,
|
|
764
|
-
searchCols:
|
|
879
|
+
searchCols: m,
|
|
765
880
|
allSearchFields: h,
|
|
766
|
-
visibleSearchFields:
|
|
881
|
+
visibleSearchFields: b,
|
|
767
882
|
showFoldBtn: g,
|
|
768
883
|
actionColSpan: n,
|
|
769
884
|
initSearchParams: d,
|
|
770
|
-
getDefaultSearchParams:
|
|
885
|
+
getDefaultSearchParams: s,
|
|
771
886
|
getActiveSearchParams: p,
|
|
772
|
-
resetSearchParams:
|
|
773
|
-
toggleFold:
|
|
887
|
+
resetSearchParams: c,
|
|
888
|
+
toggleFold: k
|
|
774
889
|
};
|
|
775
890
|
}
|
|
776
|
-
function
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
891
|
+
function ct(e) {
|
|
892
|
+
var s;
|
|
893
|
+
const t = ((s = he("eeGlobalConfig", {}).formTable) == null ? void 0 : s.pagination) || {}, r = {
|
|
894
|
+
...lt,
|
|
895
|
+
...t
|
|
896
|
+
}, o = Ra({ current: 1, pageSize: r.pageSize, total: 0 }), m = V(() => e.pagination === !1 ? tt : e.pagination === !0 ? { ...r } : e.pagination ? { ...r, ...e.pagination } : { ...r }), h = V(() => m.value.show !== !1), u = V(() => m.value.pageSizes || Na), C = V(
|
|
897
|
+
() => m.value.layout || at
|
|
898
|
+
), g = V(() => m.value.background !== !1);
|
|
899
|
+
Z(() => {
|
|
900
|
+
e.pagination && typeof e.pagination == "object" && (e.pagination.pageSize && (o.pageSize = e.pagination.pageSize), e.pagination.total !== void 0 && (o.total = e.pagination.total));
|
|
901
|
+
}), re(
|
|
783
902
|
() => e.pagination,
|
|
784
|
-
(
|
|
785
|
-
typeof
|
|
903
|
+
(p) => {
|
|
904
|
+
typeof p == "object" && p && (p.total !== void 0 && (o.total = p.total), p.pageSize && (o.pageSize = p.pageSize));
|
|
786
905
|
},
|
|
787
906
|
{ deep: !0 }
|
|
788
907
|
);
|
|
789
|
-
function
|
|
790
|
-
|
|
908
|
+
function b(p) {
|
|
909
|
+
o.current = p;
|
|
791
910
|
}
|
|
792
|
-
function
|
|
793
|
-
|
|
911
|
+
function n(p) {
|
|
912
|
+
o.pageSize = p;
|
|
794
913
|
}
|
|
795
|
-
function
|
|
796
|
-
|
|
914
|
+
function d() {
|
|
915
|
+
o.current = 1;
|
|
797
916
|
}
|
|
798
917
|
return {
|
|
799
|
-
pageState:
|
|
800
|
-
paginationCfg:
|
|
801
|
-
showPagination:
|
|
802
|
-
pageSizesComputed:
|
|
803
|
-
paginationLayoutComputed:
|
|
804
|
-
paginationBgComputed:
|
|
805
|
-
setPage:
|
|
806
|
-
setPageSize:
|
|
807
|
-
resetPage:
|
|
918
|
+
pageState: o,
|
|
919
|
+
paginationCfg: m,
|
|
920
|
+
showPagination: h,
|
|
921
|
+
pageSizesComputed: u,
|
|
922
|
+
paginationLayoutComputed: C,
|
|
923
|
+
paginationBgComputed: g,
|
|
924
|
+
setPage: b,
|
|
925
|
+
setPageSize: n,
|
|
926
|
+
resetPage: d
|
|
808
927
|
};
|
|
809
928
|
}
|
|
810
|
-
function
|
|
811
|
-
const t =
|
|
929
|
+
function ft(e, l) {
|
|
930
|
+
const t = A(), r = A([]), o = A(null), m = A(!1), h = A([]), u = A([]), C = A({}), g = V(() => ({
|
|
812
931
|
show: !1,
|
|
813
932
|
type: "multiple",
|
|
814
933
|
reserveSelection: !1,
|
|
815
934
|
...e.selectionConfig
|
|
816
|
-
})),
|
|
935
|
+
})), b = V(() => ({
|
|
817
936
|
show: !1,
|
|
818
937
|
...e.columnSetting
|
|
819
|
-
})),
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
938
|
+
})), n = V(() => b.value.show), d = V(() => b.value.storageKey || "ee-form-table-columns"), s = A(!1), p = A(!1), c = V(() => {
|
|
939
|
+
const B = e.columns.filter((P) => P.prop);
|
|
940
|
+
if (u.value.length > 0) {
|
|
941
|
+
const P = [];
|
|
942
|
+
for (const j of u.value) {
|
|
943
|
+
const te = B.find((ne) => ne.prop === j);
|
|
944
|
+
te && P.push(te);
|
|
945
|
+
}
|
|
946
|
+
for (const j of B)
|
|
947
|
+
P.some((te) => te.prop === j.prop) || P.push(j);
|
|
948
|
+
return P;
|
|
949
|
+
}
|
|
950
|
+
return B;
|
|
951
|
+
});
|
|
952
|
+
function k() {
|
|
953
|
+
try {
|
|
954
|
+
const B = {
|
|
955
|
+
checkedColumns: h.value,
|
|
956
|
+
columnOrder: u.value,
|
|
957
|
+
columnWidths: C.value,
|
|
958
|
+
showIndex: s.value,
|
|
959
|
+
selectionVisible: p.value
|
|
960
|
+
};
|
|
961
|
+
localStorage.setItem(d.value, JSON.stringify(B));
|
|
962
|
+
} catch {
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
function f() {
|
|
966
|
+
try {
|
|
967
|
+
const B = localStorage.getItem(d.value);
|
|
968
|
+
if (!B) return;
|
|
969
|
+
const P = JSON.parse(B);
|
|
970
|
+
P.checkedColumns && (h.value = P.checkedColumns), P.columnOrder && (u.value = P.columnOrder), P.columnWidths && (C.value = P.columnWidths), P.showIndex !== void 0 && (s.value = P.showIndex), P.selectionVisible !== void 0 && (p.value = P.selectionVisible);
|
|
971
|
+
} catch {
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
Z(() => {
|
|
975
|
+
f();
|
|
976
|
+
const B = c.value.map((j) => j.prop), P = [.../* @__PURE__ */ new Set([...h.value.filter((j) => B.includes(j)), ...B])];
|
|
977
|
+
h.value = P, s.value === !1 && b.value.showIndex && (s.value = !0), p.value === !1 && g.value.show && (p.value = !0);
|
|
978
|
+
}), re(
|
|
823
979
|
() => e.columns,
|
|
824
980
|
() => {
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
];
|
|
981
|
+
const B = c.value.map((P) => P.prop);
|
|
982
|
+
h.value = [.../* @__PURE__ */ new Set([
|
|
983
|
+
...h.value.filter((P) => B.includes(P)),
|
|
984
|
+
...B
|
|
985
|
+
])];
|
|
831
986
|
},
|
|
832
987
|
{ deep: !0 }
|
|
833
988
|
);
|
|
834
|
-
const
|
|
835
|
-
() =>
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
989
|
+
const z = V(() => c.value.filter(
|
|
990
|
+
(P) => P.show !== !1 && h.value.includes(P.prop) && l.authPass(P.auth)
|
|
991
|
+
).map((P) => ({
|
|
992
|
+
...P,
|
|
993
|
+
width: C.value[P.prop] ?? P.width
|
|
994
|
+
}))), U = V(() => e.tableHeight || void 0), le = V(() => e.tableMaxHeight || void 0), G = V(() => e.autoHeight ? { minHeight: `calc(100vh - ${(typeof e.autoHeight == "object" ? e.autoHeight : {}).offset || 200}px)` } : {});
|
|
995
|
+
function pe(B) {
|
|
996
|
+
r.value = B;
|
|
997
|
+
}
|
|
998
|
+
function be(B) {
|
|
999
|
+
const P = e.rowKey || "id";
|
|
1000
|
+
o.value = B[P], r.value = [B];
|
|
1001
|
+
}
|
|
1002
|
+
function Ve(B) {
|
|
1003
|
+
const P = h.value.indexOf(B);
|
|
1004
|
+
P !== -1 ? h.value.splice(P, 1) : h.value.push(B), k();
|
|
1005
|
+
}
|
|
1006
|
+
function ke() {
|
|
1007
|
+
s.value = !s.value, k();
|
|
1008
|
+
}
|
|
1009
|
+
function Te() {
|
|
1010
|
+
p.value = !p.value, k();
|
|
1011
|
+
}
|
|
1012
|
+
function E(B, P) {
|
|
1013
|
+
const j = [...u.value.length > 0 ? u.value : c.value.map((ne) => ne.prop)], [te] = j.splice(B, 1);
|
|
1014
|
+
j.splice(P, 0, te), u.value = j, k();
|
|
1015
|
+
}
|
|
1016
|
+
function oe(B, P) {
|
|
1017
|
+
P && P.property && (C.value[P.property] = B, k());
|
|
845
1018
|
}
|
|
846
1019
|
return {
|
|
847
1020
|
tableRef: t,
|
|
848
1021
|
selection: r,
|
|
849
1022
|
singleSelection: o,
|
|
850
|
-
columnSettingVisible:
|
|
1023
|
+
columnSettingVisible: m,
|
|
851
1024
|
checkedColumns: h,
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1025
|
+
columnOrder: u,
|
|
1026
|
+
columnWidths: C,
|
|
1027
|
+
selectionCfg: g,
|
|
1028
|
+
columnSettingCfg: b,
|
|
1029
|
+
showColumnSetting: n,
|
|
1030
|
+
showIndex: s,
|
|
1031
|
+
selectionVisible: p,
|
|
1032
|
+
allColumns: c,
|
|
1033
|
+
visibleColumns: z,
|
|
1034
|
+
tableComputedHeight: U,
|
|
1035
|
+
tableMaxHeightProp: le,
|
|
1036
|
+
tableWrapperStyle: G,
|
|
1037
|
+
handleSelectionChange: pe,
|
|
1038
|
+
handleSingleSelect: be,
|
|
1039
|
+
toggleColumn: Ve,
|
|
1040
|
+
toggleIndex: ke,
|
|
1041
|
+
toggleSelection: Te,
|
|
1042
|
+
moveColumn: E,
|
|
1043
|
+
onColumnResize: oe,
|
|
1044
|
+
saveToStorage: k
|
|
862
1045
|
};
|
|
863
1046
|
}
|
|
864
|
-
function
|
|
865
|
-
const t =
|
|
1047
|
+
function mt(e, l) {
|
|
1048
|
+
const t = A([]), r = A(!1), o = V(() => {
|
|
866
1049
|
var n;
|
|
867
1050
|
return !!((n = e.crudConfig) != null && n.api.list);
|
|
868
1051
|
});
|
|
869
|
-
async function
|
|
1052
|
+
async function m() {
|
|
870
1053
|
var n;
|
|
871
1054
|
if ((n = e.crudConfig) != null && n.api.list) {
|
|
872
1055
|
r.value = !0;
|
|
@@ -875,21 +1058,21 @@ function wl(e, l) {
|
|
|
875
1058
|
page: l.pageState.current,
|
|
876
1059
|
pageSize: l.pageState.pageSize,
|
|
877
1060
|
...e.crudConfig.baseParams
|
|
878
|
-
},
|
|
879
|
-
Object.assign(d,
|
|
1061
|
+
}, s = l.getActiveSearchParams();
|
|
1062
|
+
Object.assign(d, s);
|
|
880
1063
|
const p = await e.crudConfig.api.list(d);
|
|
881
1064
|
t.value = p.data || [], l.setTotal(p.total ?? 0);
|
|
882
1065
|
} catch (d) {
|
|
883
|
-
l.emit("request-error", d),
|
|
1066
|
+
l.emit("request-error", d), J.error((d == null ? void 0 : d.message) || l.t("formTable", "requestFailed"));
|
|
884
1067
|
} finally {
|
|
885
1068
|
r.value = !1;
|
|
886
1069
|
}
|
|
887
1070
|
}
|
|
888
1071
|
}
|
|
889
1072
|
async function h() {
|
|
890
|
-
l.resetPage(), await
|
|
1073
|
+
l.resetPage(), await m();
|
|
891
1074
|
}
|
|
892
|
-
async function
|
|
1075
|
+
async function u(n) {
|
|
893
1076
|
var d;
|
|
894
1077
|
if (!((d = e.crudConfig) != null && d.api.delete)) {
|
|
895
1078
|
l.emit("delete", n);
|
|
@@ -897,28 +1080,16 @@ function wl(e, l) {
|
|
|
897
1080
|
}
|
|
898
1081
|
r.value = !0;
|
|
899
1082
|
try {
|
|
900
|
-
const
|
|
901
|
-
await e.crudConfig.api.delete(
|
|
902
|
-
} catch (
|
|
903
|
-
l.emit("request-error",
|
|
1083
|
+
const s = n[e.rowKey || "id"];
|
|
1084
|
+
await e.crudConfig.api.delete(s), J.success(l.t("formTable", "deleteSuccess")), l.emit("delete-success"), await m();
|
|
1085
|
+
} catch (s) {
|
|
1086
|
+
l.emit("request-error", s), J.error((s == null ? void 0 : s.message) || l.t("formTable", "deleteFailed"));
|
|
904
1087
|
} finally {
|
|
905
1088
|
r.value = !1;
|
|
906
1089
|
}
|
|
907
1090
|
}
|
|
908
|
-
async function
|
|
909
|
-
|
|
910
|
-
await m(n);
|
|
911
|
-
return;
|
|
912
|
-
}
|
|
913
|
-
try {
|
|
914
|
-
const u = l.t("formTable", "confirm"), x = l.t("formTable", "cancel");
|
|
915
|
-
await ra.confirm(
|
|
916
|
-
p || l.t("formTable", "confirmDeleteMsg"),
|
|
917
|
-
c || l.t("formTable", "confirmDelete"),
|
|
918
|
-
{ confirmButtonText: u, cancelButtonText: x, type: "warning" }
|
|
919
|
-
), await m(n);
|
|
920
|
-
} catch {
|
|
921
|
-
}
|
|
1091
|
+
async function C(n) {
|
|
1092
|
+
await u(n);
|
|
922
1093
|
}
|
|
923
1094
|
async function g(n) {
|
|
924
1095
|
var d;
|
|
@@ -928,24 +1099,24 @@ function wl(e, l) {
|
|
|
928
1099
|
}
|
|
929
1100
|
r.value = !0;
|
|
930
1101
|
try {
|
|
931
|
-
await e.crudConfig.api.batchDelete(n),
|
|
932
|
-
} catch (
|
|
933
|
-
l.emit("request-error",
|
|
1102
|
+
await e.crudConfig.api.batchDelete(n), J.success(l.t("formTable", "batchDeleteSuccess")), l.emit("batch-delete-success"), l.selection.value = [], await m();
|
|
1103
|
+
} catch (s) {
|
|
1104
|
+
l.emit("request-error", s), J.error((s == null ? void 0 : s.message) || l.t("formTable", "batchDeleteFailed"));
|
|
934
1105
|
} finally {
|
|
935
1106
|
r.value = !1;
|
|
936
1107
|
}
|
|
937
1108
|
}
|
|
938
|
-
async function
|
|
1109
|
+
async function b() {
|
|
939
1110
|
const n = l.selection.value;
|
|
940
1111
|
if (n.length !== 0)
|
|
941
1112
|
try {
|
|
942
|
-
const d = l.t("formTable", "confirm"),
|
|
943
|
-
await
|
|
1113
|
+
const d = l.t("formTable", "confirm"), s = l.t("formTable", "cancel");
|
|
1114
|
+
await Ma.confirm(
|
|
944
1115
|
l.t("formTable", "confirmBatchDeleteMsg", { count: n.length }),
|
|
945
1116
|
l.t("formTable", "confirmBatchDelete"),
|
|
946
|
-
{ confirmButtonText: d, cancelButtonText:
|
|
1117
|
+
{ confirmButtonText: d, cancelButtonText: s, type: "warning" }
|
|
947
1118
|
);
|
|
948
|
-
const p = n.map((
|
|
1119
|
+
const p = n.map((c) => c[e.rowKey || "id"]);
|
|
949
1120
|
await g(p);
|
|
950
1121
|
} catch {
|
|
951
1122
|
}
|
|
@@ -954,26 +1125,26 @@ function wl(e, l) {
|
|
|
954
1125
|
internalData: t,
|
|
955
1126
|
loadingState: r,
|
|
956
1127
|
hasCrud: o,
|
|
957
|
-
fetchData:
|
|
1128
|
+
fetchData: m,
|
|
958
1129
|
refreshTable: h,
|
|
959
|
-
doDelete:
|
|
960
|
-
handleDelete:
|
|
1130
|
+
doDelete: u,
|
|
1131
|
+
handleDelete: C,
|
|
961
1132
|
doBatchDelete: g,
|
|
962
|
-
handleBatchDelete:
|
|
1133
|
+
handleBatchDelete: b
|
|
963
1134
|
};
|
|
964
1135
|
}
|
|
965
|
-
function
|
|
966
|
-
const l =
|
|
967
|
-
...
|
|
1136
|
+
function ht(e) {
|
|
1137
|
+
const l = A(!1), t = A("add"), r = A(null), o = A({}), m = A(!1), h = {
|
|
1138
|
+
...rt,
|
|
968
1139
|
...e.drawerConfig
|
|
969
|
-
},
|
|
970
|
-
function
|
|
1140
|
+
}, u = h.mode || "drawer";
|
|
1141
|
+
function C() {
|
|
971
1142
|
t.value = "add", r.value = null, o.value = {}, l.value = !0;
|
|
972
1143
|
}
|
|
973
1144
|
function g(d) {
|
|
974
1145
|
t.value = "edit", r.value = d, o.value = { ...d }, l.value = !0;
|
|
975
1146
|
}
|
|
976
|
-
function
|
|
1147
|
+
function b(d) {
|
|
977
1148
|
t.value = "view", r.value = d, o.value = { ...d }, l.value = !0;
|
|
978
1149
|
}
|
|
979
1150
|
function n() {
|
|
@@ -984,61 +1155,61 @@ function Sl(e) {
|
|
|
984
1155
|
formMode: t,
|
|
985
1156
|
editingRow: r,
|
|
986
1157
|
formData: o,
|
|
987
|
-
saving:
|
|
988
|
-
drawerMode:
|
|
1158
|
+
saving: m,
|
|
1159
|
+
drawerMode: u,
|
|
989
1160
|
drawerCfg: h,
|
|
990
|
-
openAdd:
|
|
1161
|
+
openAdd: C,
|
|
991
1162
|
openEdit: g,
|
|
992
|
-
openView:
|
|
1163
|
+
openView: b,
|
|
993
1164
|
closeForm: n
|
|
994
1165
|
};
|
|
995
1166
|
}
|
|
996
|
-
function
|
|
997
|
-
const t =
|
|
1167
|
+
function gt(e, l) {
|
|
1168
|
+
const t = A(!1);
|
|
998
1169
|
async function r() {
|
|
999
|
-
var o,
|
|
1170
|
+
var o, m, h, u, C;
|
|
1000
1171
|
t.value = !0, l.setLoading(!0);
|
|
1001
1172
|
try {
|
|
1002
1173
|
const g = await import("xlsx").catch(() => null);
|
|
1003
1174
|
if (!g) {
|
|
1004
|
-
|
|
1175
|
+
J.warning(l.t("formTable", "installXlsx"));
|
|
1005
1176
|
return;
|
|
1006
1177
|
}
|
|
1007
|
-
const
|
|
1178
|
+
const b = ((o = e.exportConfig) == null ? void 0 : o.mode) || "current";
|
|
1008
1179
|
let n;
|
|
1009
|
-
if (
|
|
1010
|
-
const
|
|
1180
|
+
if (b === "all" && ((h = (m = e.crudConfig) == null ? void 0 : m.api) != null && h.list)) {
|
|
1181
|
+
const f = {
|
|
1011
1182
|
page: 1,
|
|
1012
1183
|
pageSize: 99999,
|
|
1013
1184
|
...e.crudConfig.baseParams
|
|
1014
|
-
},
|
|
1015
|
-
Object.assign(
|
|
1185
|
+
}, z = l.getActiveSearchParams();
|
|
1186
|
+
Object.assign(f, z), n = (await e.crudConfig.api.list(f)).data || [];
|
|
1016
1187
|
} else
|
|
1017
1188
|
n = [...l.getCurrentData()];
|
|
1018
|
-
const d = ((
|
|
1019
|
-
|
|
1189
|
+
const d = ((u = e.exportConfig) == null ? void 0 : u.ignoreColumn) || [], s = l.visibleColumns.value.filter((f) => !d.includes(f.prop)).map((f) => ({ prop: f.prop, label: f.label })), p = [
|
|
1190
|
+
s.map((f) => f.label),
|
|
1020
1191
|
...n.map(
|
|
1021
|
-
(
|
|
1022
|
-
var
|
|
1023
|
-
if (
|
|
1024
|
-
const
|
|
1025
|
-
return
|
|
1192
|
+
(f) => s.map((z) => {
|
|
1193
|
+
var le;
|
|
1194
|
+
if (z.prop === "action") return "";
|
|
1195
|
+
const U = (le = e.columns.find((G) => G.prop === z.prop)) == null ? void 0 : le.dictKey;
|
|
1196
|
+
return U ? l.dictLabel(U, f[z.prop]) : f[z.prop] ?? "";
|
|
1026
1197
|
})
|
|
1027
1198
|
)
|
|
1028
|
-
],
|
|
1029
|
-
g.utils.book_append_sheet(
|
|
1199
|
+
], c = g.utils.aoa_to_sheet(p), k = g.utils.book_new();
|
|
1200
|
+
g.utils.book_append_sheet(k, c, "Sheet1"), g.writeFile(k, ((C = e.exportConfig) == null ? void 0 : C.fileName) || l.t("formTable", "exportFileName")), J.success(l.t("formTable", "exportSuccess"));
|
|
1030
1201
|
} catch (g) {
|
|
1031
|
-
|
|
1202
|
+
J.error((g == null ? void 0 : g.message) || l.t("formTable", "exportFail"));
|
|
1032
1203
|
} finally {
|
|
1033
1204
|
l.setLoading(!1), t.value = !1;
|
|
1034
1205
|
}
|
|
1035
1206
|
}
|
|
1036
1207
|
return { handleExport: r, exporting: t };
|
|
1037
1208
|
}
|
|
1038
|
-
const
|
|
1209
|
+
const vt = {
|
|
1039
1210
|
key: 0,
|
|
1040
1211
|
class: "ee-search-area"
|
|
1041
|
-
},
|
|
1212
|
+
}, pt = /* @__PURE__ */ H({
|
|
1042
1213
|
__name: "SearchArea",
|
|
1043
1214
|
props: {
|
|
1044
1215
|
showSearch: { type: Boolean },
|
|
@@ -1053,52 +1224,52 @@ const zl = {
|
|
|
1053
1224
|
},
|
|
1054
1225
|
emits: ["search", "reset", "toggle-fold"],
|
|
1055
1226
|
setup(e) {
|
|
1056
|
-
const { t: l } =
|
|
1057
|
-
return (t, r) => e.showSearch ? (
|
|
1058
|
-
|
|
1227
|
+
const { t: l } = _();
|
|
1228
|
+
return (t, r) => e.showSearch ? (i(), D("div", vt, [
|
|
1229
|
+
T(a(Ye), {
|
|
1059
1230
|
model: e.searchParams,
|
|
1060
1231
|
"label-width": "auto",
|
|
1061
1232
|
size: e.size
|
|
1062
1233
|
}, {
|
|
1063
|
-
default:
|
|
1064
|
-
|
|
1065
|
-
default:
|
|
1066
|
-
(
|
|
1234
|
+
default: v(() => [
|
|
1235
|
+
T(a(Je), { gutter: 12 }, {
|
|
1236
|
+
default: v(() => [
|
|
1237
|
+
(i(!0), D(O, null, K(e.visibleSearchFields, (o) => (i(), w(a(xe), {
|
|
1067
1238
|
key: String(o.prop),
|
|
1068
1239
|
span: 24 / e.searchCols
|
|
1069
1240
|
}, {
|
|
1070
|
-
default:
|
|
1071
|
-
|
|
1241
|
+
default: v(() => [
|
|
1242
|
+
T(a(ze), {
|
|
1072
1243
|
label: String(o.label)
|
|
1073
1244
|
}, {
|
|
1074
|
-
default:
|
|
1075
|
-
o.type === "input" ? (
|
|
1245
|
+
default: v(() => [
|
|
1246
|
+
o.type === "input" ? (i(), w(a(ge), I({
|
|
1076
1247
|
key: 0,
|
|
1077
1248
|
modelValue: e.searchParams[o.field],
|
|
1078
|
-
"onUpdate:modelValue": (
|
|
1249
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1079
1250
|
placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
|
|
1080
1251
|
clearable: ""
|
|
1081
|
-
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "number" ? (
|
|
1252
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "number" ? (i(), w(a(Ia), I({
|
|
1082
1253
|
key: 1,
|
|
1083
1254
|
modelValue: e.searchParams[o.field],
|
|
1084
|
-
"onUpdate:modelValue": (
|
|
1255
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1085
1256
|
placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
|
|
1086
1257
|
style: { width: "100%" }
|
|
1087
|
-
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "select" ? (
|
|
1258
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "select" ? (i(), w(a(ue), I({
|
|
1088
1259
|
key: 2,
|
|
1089
1260
|
modelValue: e.searchParams[o.field],
|
|
1090
|
-
"onUpdate:modelValue": (
|
|
1261
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1091
1262
|
placeholder: String(o.placeholder || a(l)("formTable", "selectPlaceholder", { label: o.label })),
|
|
1092
1263
|
clearable: "",
|
|
1093
1264
|
style: { width: "100%" }
|
|
1094
1265
|
}, { ref_for: !0 }, o.props || {}), {
|
|
1095
|
-
default:
|
|
1096
|
-
var
|
|
1266
|
+
default: v(() => {
|
|
1267
|
+
var m;
|
|
1097
1268
|
return [
|
|
1098
|
-
(
|
|
1099
|
-
(
|
|
1269
|
+
(i(!0), D(O, null, K(e.resolveDict(
|
|
1270
|
+
(m = o.props) == null ? void 0 : m.options,
|
|
1100
1271
|
o.dictKey
|
|
1101
|
-
), (h) => (
|
|
1272
|
+
), (h) => (i(), w(a(de), {
|
|
1102
1273
|
key: h.value,
|
|
1103
1274
|
label: h.label,
|
|
1104
1275
|
value: h.value
|
|
@@ -1106,41 +1277,41 @@ const zl = {
|
|
|
1106
1277
|
];
|
|
1107
1278
|
}),
|
|
1108
1279
|
_: 2
|
|
1109
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "radio" ? (
|
|
1280
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "radio" ? (i(), w(a(ca), I({
|
|
1110
1281
|
key: 3,
|
|
1111
1282
|
modelValue: e.searchParams[o.field],
|
|
1112
|
-
"onUpdate:modelValue": (
|
|
1283
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m
|
|
1113
1284
|
}, { ref_for: !0 }, o.props || {}), {
|
|
1114
|
-
default:
|
|
1115
|
-
var
|
|
1285
|
+
default: v(() => {
|
|
1286
|
+
var m;
|
|
1116
1287
|
return [
|
|
1117
|
-
(
|
|
1118
|
-
(
|
|
1288
|
+
(i(!0), D(O, null, K(e.resolveDict(
|
|
1289
|
+
(m = o.props) == null ? void 0 : m.options,
|
|
1119
1290
|
o.dictKey
|
|
1120
|
-
), (h) => (
|
|
1291
|
+
), (h) => (i(), w(a(Qe), {
|
|
1121
1292
|
key: h.value,
|
|
1122
1293
|
value: h.value
|
|
1123
1294
|
}, {
|
|
1124
|
-
default:
|
|
1125
|
-
|
|
1295
|
+
default: v(() => [
|
|
1296
|
+
M(F(h.label), 1)
|
|
1126
1297
|
]),
|
|
1127
1298
|
_: 2
|
|
1128
1299
|
}, 1032, ["value"]))), 128))
|
|
1129
1300
|
];
|
|
1130
1301
|
}),
|
|
1131
1302
|
_: 2
|
|
1132
|
-
}, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "checkbox" ? (
|
|
1303
|
+
}, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "checkbox" ? (i(), w(a(fa), I({
|
|
1133
1304
|
key: 4,
|
|
1134
1305
|
modelValue: e.searchParams[o.field],
|
|
1135
|
-
"onUpdate:modelValue": (
|
|
1306
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m
|
|
1136
1307
|
}, { ref_for: !0 }, o.props || {}), {
|
|
1137
|
-
default:
|
|
1138
|
-
var
|
|
1308
|
+
default: v(() => {
|
|
1309
|
+
var m;
|
|
1139
1310
|
return [
|
|
1140
|
-
(
|
|
1141
|
-
(
|
|
1311
|
+
(i(!0), D(O, null, K(e.resolveDict(
|
|
1312
|
+
(m = o.props) == null ? void 0 : m.options,
|
|
1142
1313
|
o.dictKey
|
|
1143
|
-
), (h) => (
|
|
1314
|
+
), (h) => (i(), w(a(Ce), {
|
|
1144
1315
|
key: h.value,
|
|
1145
1316
|
value: h.value,
|
|
1146
1317
|
label: h.label
|
|
@@ -1148,69 +1319,69 @@ const zl = {
|
|
|
1148
1319
|
];
|
|
1149
1320
|
}),
|
|
1150
1321
|
_: 2
|
|
1151
|
-
}, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "date" ? (
|
|
1322
|
+
}, 1040, ["modelValue", "onUpdate:modelValue"])) : o.type === "date" ? (i(), w(a(ve), I({
|
|
1152
1323
|
key: 5,
|
|
1153
1324
|
modelValue: e.searchParams[o.field],
|
|
1154
|
-
"onUpdate:modelValue": (
|
|
1325
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1155
1326
|
placeholder: String(o.placeholder || a(l)("formTable", "selectPlaceholder", { label: o.label })),
|
|
1156
1327
|
style: { width: "100%" }
|
|
1157
|
-
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "date-range" ? (
|
|
1328
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : o.type === "date-range" ? (i(), w(a(ve), I({
|
|
1158
1329
|
key: 6,
|
|
1159
1330
|
modelValue: e.searchParams[o.field],
|
|
1160
|
-
"onUpdate:modelValue": (
|
|
1331
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1161
1332
|
type: "daterange",
|
|
1162
1333
|
"range-separator": a(l)("formTable", "dateRangeTo"),
|
|
1163
1334
|
"start-placeholder": a(l)("formTable", "dateRangeStart"),
|
|
1164
1335
|
"end-placeholder": a(l)("formTable", "dateRangeEnd"),
|
|
1165
1336
|
style: { width: "100%" }
|
|
1166
|
-
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : o.type === "textarea" ? (
|
|
1337
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "range-separator", "start-placeholder", "end-placeholder"])) : o.type === "textarea" ? (i(), w(a(ge), I({
|
|
1167
1338
|
key: 7,
|
|
1168
1339
|
modelValue: e.searchParams[o.field],
|
|
1169
|
-
"onUpdate:modelValue": (
|
|
1340
|
+
"onUpdate:modelValue": (m) => e.searchParams[o.field] = m,
|
|
1170
1341
|
placeholder: String(o.placeholder || a(l)("formTable", "inputPlaceholder", { label: o.label })),
|
|
1171
1342
|
type: "textarea"
|
|
1172
|
-
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
1343
|
+
}, { ref_for: !0 }, o.props || {}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder"])) : L("", !0)
|
|
1173
1344
|
]),
|
|
1174
1345
|
_: 2
|
|
1175
1346
|
}, 1032, ["label"])
|
|
1176
1347
|
]),
|
|
1177
1348
|
_: 2
|
|
1178
1349
|
}, 1032, ["span"]))), 128)),
|
|
1179
|
-
|
|
1180
|
-
default:
|
|
1181
|
-
|
|
1182
|
-
default:
|
|
1183
|
-
|
|
1350
|
+
T(a(xe), { span: e.actionColSpan }, {
|
|
1351
|
+
default: v(() => [
|
|
1352
|
+
T(a(ze), null, {
|
|
1353
|
+
default: v(() => [
|
|
1354
|
+
T(a(q), {
|
|
1184
1355
|
type: "primary",
|
|
1185
1356
|
round: "",
|
|
1186
1357
|
onClick: r[0] || (r[0] = (o) => t.$emit("search"))
|
|
1187
1358
|
}, {
|
|
1188
|
-
default:
|
|
1189
|
-
|
|
1359
|
+
default: v(() => [
|
|
1360
|
+
M(F(a(l)("formTable", "search")), 1)
|
|
1190
1361
|
]),
|
|
1191
1362
|
_: 1
|
|
1192
1363
|
}),
|
|
1193
|
-
|
|
1364
|
+
T(a(q), {
|
|
1194
1365
|
round: "",
|
|
1195
1366
|
onClick: r[1] || (r[1] = (o) => t.$emit("reset"))
|
|
1196
1367
|
}, {
|
|
1197
|
-
default:
|
|
1198
|
-
|
|
1368
|
+
default: v(() => [
|
|
1369
|
+
M(F(a(l)("formTable", "reset")), 1)
|
|
1199
1370
|
]),
|
|
1200
1371
|
_: 1
|
|
1201
1372
|
}),
|
|
1202
|
-
e.showFoldBtn ? (
|
|
1373
|
+
e.showFoldBtn ? (i(), w(a(q), {
|
|
1203
1374
|
key: 0,
|
|
1204
1375
|
text: "",
|
|
1205
1376
|
size: e.size,
|
|
1206
1377
|
onClick: r[2] || (r[2] = (o) => t.$emit("toggle-fold"))
|
|
1207
1378
|
}, {
|
|
1208
|
-
default:
|
|
1209
|
-
|
|
1379
|
+
default: v(() => [
|
|
1380
|
+
M(F(e.searchExpanded ? a(l)("formTable", "collapse") : a(l)("formTable", "expand")), 1)
|
|
1210
1381
|
]),
|
|
1211
1382
|
_: 1
|
|
1212
|
-
}, 8, ["size"])) :
|
|
1213
|
-
|
|
1383
|
+
}, 8, ["size"])) : L("", !0),
|
|
1384
|
+
Y(t.$slots, "search-action", { params: e.searchParams })
|
|
1214
1385
|
]),
|
|
1215
1386
|
_: 3
|
|
1216
1387
|
})
|
|
@@ -1223,43 +1394,12 @@ const zl = {
|
|
|
1223
1394
|
]),
|
|
1224
1395
|
_: 3
|
|
1225
1396
|
}, 8, ["model", "size"])
|
|
1226
|
-
])) :
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1229
|
-
/*! Element Plus Icons Vue v2.3.2 */
|
|
1230
|
-
var Dl = /* @__PURE__ */ N({
|
|
1231
|
-
name: "Refresh",
|
|
1232
|
-
__name: "refresh",
|
|
1233
|
-
setup(e) {
|
|
1234
|
-
return (l, t) => (s(), V("svg", {
|
|
1235
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1236
|
-
viewBox: "0 0 1024 1024"
|
|
1237
|
-
}, [
|
|
1238
|
-
q("path", {
|
|
1239
|
-
fill: "currentColor",
|
|
1240
|
-
d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
|
|
1241
|
-
})
|
|
1242
|
-
]));
|
|
1243
|
-
}
|
|
1244
|
-
}), kl = Dl, Vl = /* @__PURE__ */ N({
|
|
1245
|
-
name: "Setting",
|
|
1246
|
-
__name: "setting",
|
|
1247
|
-
setup(e) {
|
|
1248
|
-
return (l, t) => (s(), V("svg", {
|
|
1249
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1250
|
-
viewBox: "0 0 1024 1024"
|
|
1251
|
-
}, [
|
|
1252
|
-
q("path", {
|
|
1253
|
-
fill: "currentColor",
|
|
1254
|
-
d: "M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"
|
|
1255
|
-
})
|
|
1256
|
-
]));
|
|
1397
|
+
])) : L("", !0);
|
|
1257
1398
|
}
|
|
1258
|
-
}),
|
|
1259
|
-
const El = {
|
|
1399
|
+
}), bt = {
|
|
1260
1400
|
key: 0,
|
|
1261
1401
|
class: "ee-toolbar"
|
|
1262
|
-
},
|
|
1402
|
+
}, yt = { class: "ee-toolbar-left" }, wt = { class: "ee-toolbar-right" }, Ct = { class: "ee-column-setting" }, St = { class: "ee-column-setting-special" }, xt = { class: "ee-column-setting-item ee-column-setting-item--special" }, zt = { class: "ee-column-setting-item ee-column-setting-item--special" }, Dt = ["onDragstart", "onDragover"], Vt = /* @__PURE__ */ H({
|
|
1263
1403
|
__name: "TableToolbar",
|
|
1264
1404
|
props: {
|
|
1265
1405
|
show: { type: Boolean },
|
|
@@ -1268,108 +1408,185 @@ const El = {
|
|
|
1268
1408
|
refreshing: { type: Boolean },
|
|
1269
1409
|
deps: {}
|
|
1270
1410
|
},
|
|
1271
|
-
emits: ["add", "import", "export", "batch-delete", "refresh"
|
|
1411
|
+
emits: ["add", "import", "export", "batch-delete", "refresh"],
|
|
1272
1412
|
setup(e) {
|
|
1273
|
-
const { t: l } =
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1413
|
+
const { t: l } = _(), t = e, r = A(!1), o = A(-1), m = A(-1);
|
|
1414
|
+
function h(g) {
|
|
1415
|
+
o.value = g;
|
|
1416
|
+
}
|
|
1417
|
+
function u(g) {
|
|
1418
|
+
o.value !== g && (m.value = g);
|
|
1419
|
+
}
|
|
1420
|
+
function C() {
|
|
1421
|
+
o.value >= 0 && m.value >= 0 && o.value !== m.value && t.deps.moveColumn(o.value, m.value), o.value = -1, m.value = -1;
|
|
1422
|
+
}
|
|
1423
|
+
return (g, b) => e.show ? (i(), D("div", bt, [
|
|
1424
|
+
N("div", yt, [
|
|
1425
|
+
e.toolbarCfg.showAdd && e.deps.authPass(e.toolbarCfg.addAuth) ? (i(), w(a(q), {
|
|
1277
1426
|
key: 0,
|
|
1278
1427
|
type: "primary",
|
|
1279
1428
|
size: e.size,
|
|
1280
1429
|
round: "",
|
|
1281
|
-
onClick:
|
|
1430
|
+
onClick: b[0] || (b[0] = (n) => g.$emit("add"))
|
|
1282
1431
|
}, {
|
|
1283
|
-
default:
|
|
1284
|
-
|
|
1432
|
+
default: v(() => [
|
|
1433
|
+
M(F(e.toolbarCfg.addText || a(l)("formTable", "add")), 1)
|
|
1285
1434
|
]),
|
|
1286
1435
|
_: 1
|
|
1287
|
-
}, 8, ["size"])) :
|
|
1288
|
-
e.toolbarCfg.showImport && e.deps.authPass(e.toolbarCfg.importAuth) ? (
|
|
1436
|
+
}, 8, ["size"])) : L("", !0),
|
|
1437
|
+
e.toolbarCfg.showImport && e.deps.authPass(e.toolbarCfg.importAuth) ? (i(), w(a(q), {
|
|
1289
1438
|
key: 1,
|
|
1290
1439
|
size: e.size,
|
|
1291
1440
|
round: "",
|
|
1292
|
-
onClick:
|
|
1441
|
+
onClick: b[1] || (b[1] = (n) => g.$emit("import"))
|
|
1293
1442
|
}, {
|
|
1294
|
-
default:
|
|
1295
|
-
|
|
1443
|
+
default: v(() => [
|
|
1444
|
+
M(F(e.toolbarCfg.importText || a(l)("formTable", "import")), 1)
|
|
1296
1445
|
]),
|
|
1297
1446
|
_: 1
|
|
1298
|
-
}, 8, ["size"])) :
|
|
1299
|
-
e.toolbarCfg.showExport && e.deps.authPass(e.toolbarCfg.exportAuth) ? (
|
|
1447
|
+
}, 8, ["size"])) : L("", !0),
|
|
1448
|
+
e.toolbarCfg.showExport && e.deps.authPass(e.toolbarCfg.exportAuth) ? (i(), w(a(q), {
|
|
1300
1449
|
key: 2,
|
|
1301
1450
|
size: e.size,
|
|
1302
1451
|
round: "",
|
|
1303
|
-
onClick:
|
|
1452
|
+
onClick: b[2] || (b[2] = (n) => g.$emit("export"))
|
|
1304
1453
|
}, {
|
|
1305
|
-
default:
|
|
1306
|
-
|
|
1454
|
+
default: v(() => [
|
|
1455
|
+
M(F(e.toolbarCfg.exportText || a(l)("formTable", "export")), 1)
|
|
1307
1456
|
]),
|
|
1308
1457
|
_: 1
|
|
1309
|
-
}, 8, ["size"])) :
|
|
1310
|
-
e.toolbarCfg.showBatchDelete && e.deps.selectionCount > 0 && e.deps.authPass(e.toolbarCfg.batchDeleteAuth) ? (
|
|
1458
|
+
}, 8, ["size"])) : L("", !0),
|
|
1459
|
+
e.toolbarCfg.showBatchDelete && e.deps.selectionCount > 0 && e.deps.authPass(e.toolbarCfg.batchDeleteAuth) ? (i(), w(a(q), {
|
|
1311
1460
|
key: 3,
|
|
1312
1461
|
type: "danger",
|
|
1313
1462
|
size: e.size,
|
|
1314
1463
|
round: "",
|
|
1315
|
-
onClick:
|
|
1464
|
+
onClick: b[3] || (b[3] = (n) => g.$emit("batch-delete"))
|
|
1316
1465
|
}, {
|
|
1317
|
-
default:
|
|
1318
|
-
|
|
1466
|
+
default: v(() => [
|
|
1467
|
+
M(F(e.toolbarCfg.batchDeleteText || a(l)("formTable", "batchDelete")), 1)
|
|
1319
1468
|
]),
|
|
1320
1469
|
_: 1
|
|
1321
|
-
}, 8, ["size"])) :
|
|
1322
|
-
(
|
|
1323
|
-
key:
|
|
1470
|
+
}, 8, ["size"])) : L("", !0),
|
|
1471
|
+
(i(!0), D(O, null, K(e.toolbarCfg.customButtons || [], (n) => (i(), D(O, {
|
|
1472
|
+
key: n.code
|
|
1324
1473
|
}, [
|
|
1325
|
-
e.deps.authPass(
|
|
1474
|
+
e.deps.authPass(n.auth) ? (i(), w(a(q), {
|
|
1326
1475
|
key: 0,
|
|
1327
|
-
type:
|
|
1476
|
+
type: n.type,
|
|
1328
1477
|
size: e.size,
|
|
1329
1478
|
round: "",
|
|
1330
|
-
onClick:
|
|
1479
|
+
onClick: n.handler
|
|
1331
1480
|
}, {
|
|
1332
|
-
default:
|
|
1333
|
-
|
|
1481
|
+
default: v(() => [
|
|
1482
|
+
M(F(n.text), 1)
|
|
1334
1483
|
]),
|
|
1335
1484
|
_: 2
|
|
1336
|
-
}, 1032, ["type", "size", "onClick"])) :
|
|
1485
|
+
}, 1032, ["type", "size", "onClick"])) : L("", !0)
|
|
1337
1486
|
], 64))), 128))
|
|
1338
1487
|
]),
|
|
1339
|
-
|
|
1340
|
-
|
|
1488
|
+
N("div", wt, [
|
|
1489
|
+
T(a(Sa), {
|
|
1341
1490
|
content: a(l)("formTable", "refresh")
|
|
1342
1491
|
}, {
|
|
1343
|
-
default:
|
|
1344
|
-
|
|
1345
|
-
|
|
1492
|
+
default: v(() => [
|
|
1493
|
+
e.toolbarCfg.showRefresh !== !1 ? (i(), w(a(q), {
|
|
1494
|
+
key: 0,
|
|
1495
|
+
icon: a(Jl),
|
|
1346
1496
|
size: e.size,
|
|
1347
1497
|
loading: e.refreshing,
|
|
1348
1498
|
circle: "",
|
|
1349
|
-
onClick:
|
|
1350
|
-
}, null, 8, ["icon", "size", "loading"])
|
|
1499
|
+
onClick: b[4] || (b[4] = (n) => g.$emit("refresh"))
|
|
1500
|
+
}, null, 8, ["icon", "size", "loading"])) : L("", !0)
|
|
1351
1501
|
]),
|
|
1352
1502
|
_: 1
|
|
1353
1503
|
}, 8, ["content"]),
|
|
1354
|
-
e.deps.showColumnSetting ? (
|
|
1504
|
+
e.deps.showColumnSetting ? (i(), w(a(Vl), {
|
|
1355
1505
|
key: 0,
|
|
1356
|
-
|
|
1506
|
+
visible: r.value,
|
|
1507
|
+
trigger: "click",
|
|
1508
|
+
placement: "bottom-end",
|
|
1509
|
+
width: 240,
|
|
1510
|
+
onShow: b[5] || (b[5] = (n) => r.value = !0),
|
|
1511
|
+
onHide: b[6] || (b[6] = (n) => r.value = !1)
|
|
1357
1512
|
}, {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1513
|
+
reference: v(() => [
|
|
1514
|
+
T(a(Sa), {
|
|
1515
|
+
content: a(l)("formTable", "columnSetting")
|
|
1516
|
+
}, {
|
|
1517
|
+
default: v(() => [
|
|
1518
|
+
T(a(q), {
|
|
1519
|
+
icon: a(Zl),
|
|
1520
|
+
size: e.size,
|
|
1521
|
+
circle: ""
|
|
1522
|
+
}, null, 8, ["icon", "size"])
|
|
1523
|
+
]),
|
|
1524
|
+
_: 1
|
|
1525
|
+
}, 8, ["content"])
|
|
1526
|
+
]),
|
|
1527
|
+
default: v(() => [
|
|
1528
|
+
N("div", Ct, [
|
|
1529
|
+
N("div", St, [
|
|
1530
|
+
N("div", xt, [
|
|
1531
|
+
T(a(Ce), {
|
|
1532
|
+
"model-value": e.deps.showIndex,
|
|
1533
|
+
onChange: e.deps.toggleIndex
|
|
1534
|
+
}, {
|
|
1535
|
+
default: v(() => [
|
|
1536
|
+
M(F(a(l)("formTable", "rowIndex")), 1)
|
|
1537
|
+
]),
|
|
1538
|
+
_: 1
|
|
1539
|
+
}, 8, ["model-value", "onChange"])
|
|
1540
|
+
]),
|
|
1541
|
+
N("div", zt, [
|
|
1542
|
+
T(a(Ce), {
|
|
1543
|
+
"model-value": e.deps.selectionVisible,
|
|
1544
|
+
onChange: e.deps.toggleSelection
|
|
1545
|
+
}, {
|
|
1546
|
+
default: v(() => [
|
|
1547
|
+
M(F(a(l)("formTable", "selectionLabel")), 1)
|
|
1548
|
+
]),
|
|
1549
|
+
_: 1
|
|
1550
|
+
}, 8, ["model-value", "onChange"])
|
|
1551
|
+
])
|
|
1552
|
+
]),
|
|
1553
|
+
e.deps.allColumns.length > 0 ? (i(), w(a(kl), {
|
|
1554
|
+
key: 0,
|
|
1555
|
+
style: { margin: "8px 0" }
|
|
1556
|
+
})) : L("", !0),
|
|
1557
|
+
(i(!0), D(O, null, K(e.deps.allColumns, (n, d) => (i(), D("div", {
|
|
1558
|
+
key: n.prop,
|
|
1559
|
+
class: Aa(["ee-column-setting-item", { "ee-column-setting-item--drag-over": m.value === d }]),
|
|
1560
|
+
draggable: !0,
|
|
1561
|
+
onDragstart: (s) => h(d),
|
|
1562
|
+
onDragover: yl((s) => u(d), ["prevent"]),
|
|
1563
|
+
onDragend: C
|
|
1564
|
+
}, [
|
|
1565
|
+
T(a(Ce), {
|
|
1566
|
+
"model-value": e.deps.checkedColumns.includes(n.prop),
|
|
1567
|
+
onChange: (s) => e.deps.toggleColumn(n.prop)
|
|
1568
|
+
}, {
|
|
1569
|
+
default: v(() => [
|
|
1570
|
+
M(F(n.label), 1)
|
|
1571
|
+
]),
|
|
1572
|
+
_: 2
|
|
1573
|
+
}, 1032, ["model-value", "onChange"]),
|
|
1574
|
+
T(a(Oa), { class: "ee-column-setting-drag" }, {
|
|
1575
|
+
default: v(() => [
|
|
1576
|
+
T(a(Xl))
|
|
1577
|
+
]),
|
|
1578
|
+
_: 1
|
|
1579
|
+
})
|
|
1580
|
+
], 42, Dt))), 128))
|
|
1581
|
+
])
|
|
1365
1582
|
]),
|
|
1366
1583
|
_: 1
|
|
1367
|
-
}, 8, ["
|
|
1368
|
-
|
|
1584
|
+
}, 8, ["visible"])) : L("", !0),
|
|
1585
|
+
Y(g.$slots, "toolbar-right", {}, void 0, !0)
|
|
1369
1586
|
])
|
|
1370
|
-
])) :
|
|
1587
|
+
])) : L("", !0);
|
|
1371
1588
|
}
|
|
1372
|
-
}),
|
|
1589
|
+
}), kt = /* @__PURE__ */ De(Vt, [["__scopeId", "data-v-951992f2"]]), Ba = /* @__PURE__ */ H({
|
|
1373
1590
|
__name: "FormAuto",
|
|
1374
1591
|
props: {
|
|
1375
1592
|
formData: {},
|
|
@@ -1381,55 +1598,55 @@ const El = {
|
|
|
1381
1598
|
dictMap: {}
|
|
1382
1599
|
},
|
|
1383
1600
|
setup(e, { expose: l }) {
|
|
1384
|
-
const { t } =
|
|
1601
|
+
const { t } = _(), r = e, o = A();
|
|
1385
1602
|
l({
|
|
1386
1603
|
validate: () => {
|
|
1387
|
-
var
|
|
1388
|
-
return (
|
|
1604
|
+
var s;
|
|
1605
|
+
return (s = o.value) == null ? void 0 : s.validate();
|
|
1389
1606
|
},
|
|
1390
1607
|
resetFields: () => {
|
|
1391
|
-
var
|
|
1392
|
-
return (
|
|
1608
|
+
var s;
|
|
1609
|
+
return (s = o.value) == null ? void 0 : s.resetFields();
|
|
1393
1610
|
}
|
|
1394
1611
|
});
|
|
1395
|
-
const
|
|
1396
|
-
function h(
|
|
1612
|
+
const m = V(() => r.columns.filter((s) => !s.form || s.form.hide ? !1 : r.formMode === "add" ? s.form.add !== !1 : r.formMode === "edit" ? s.form.edit !== !1 : !1));
|
|
1613
|
+
function h(s) {
|
|
1397
1614
|
var p;
|
|
1398
|
-
return ((p =
|
|
1615
|
+
return ((p = s.form) == null ? void 0 : p.type) || "input";
|
|
1399
1616
|
}
|
|
1400
|
-
function
|
|
1617
|
+
function u(s) {
|
|
1401
1618
|
var p;
|
|
1402
|
-
return ((p =
|
|
1619
|
+
return ((p = s.form) == null ? void 0 : p.props) || {};
|
|
1403
1620
|
}
|
|
1404
|
-
function
|
|
1405
|
-
var
|
|
1406
|
-
if ((
|
|
1407
|
-
const p = h(
|
|
1408
|
-
return p === "select" || p === "date" || p === "date-range" ? t("formTable", "selectPlaceholder", { label:
|
|
1621
|
+
function C(s) {
|
|
1622
|
+
var c;
|
|
1623
|
+
if ((c = s.form) != null && c.placeholder) return s.form.placeholder;
|
|
1624
|
+
const p = h(s);
|
|
1625
|
+
return p === "select" || p === "date" || p === "date-range" ? t("formTable", "selectPlaceholder", { label: s.label }) : t("formTable", "inputPlaceholder", { label: s.label });
|
|
1409
1626
|
}
|
|
1410
|
-
function g(
|
|
1627
|
+
function g(s) {
|
|
1411
1628
|
var p;
|
|
1412
|
-
return !!(r.formMode === "edit" && ((p =
|
|
1629
|
+
return !!(r.formMode === "edit" && ((p = s.form) != null && p.readonly));
|
|
1413
1630
|
}
|
|
1414
|
-
function
|
|
1415
|
-
var
|
|
1416
|
-
const p = ((
|
|
1631
|
+
function b(s) {
|
|
1632
|
+
var c;
|
|
1633
|
+
const p = ((c = s.form) == null ? void 0 : c.colSpan) || 1;
|
|
1417
1634
|
return Math.round(24 / r.formCols * p);
|
|
1418
1635
|
}
|
|
1419
|
-
function n(
|
|
1420
|
-
var p,
|
|
1421
|
-
return (p =
|
|
1636
|
+
function n(s) {
|
|
1637
|
+
var p, c, k;
|
|
1638
|
+
return (p = s.form) != null && p.dictKey && ((c = r.dictMap) != null && c[s.form.dictKey]) ? r.dictMap[s.form.dictKey] : ((k = s.form) == null ? void 0 : k.options) || [];
|
|
1422
1639
|
}
|
|
1423
|
-
function d(
|
|
1424
|
-
var
|
|
1425
|
-
const p = (
|
|
1426
|
-
if ((
|
|
1427
|
-
const
|
|
1428
|
-
return p ? [...p,
|
|
1640
|
+
function d(s) {
|
|
1641
|
+
var c, k;
|
|
1642
|
+
const p = (c = s.form) == null ? void 0 : c.rules;
|
|
1643
|
+
if ((k = s.form) != null && k.required) {
|
|
1644
|
+
const f = { required: !0, message: t("formTable", "inputPlaceholder", { label: s.label }), trigger: "blur" };
|
|
1645
|
+
return p ? [...p, f] : [f];
|
|
1429
1646
|
}
|
|
1430
1647
|
return p;
|
|
1431
1648
|
}
|
|
1432
|
-
return (
|
|
1649
|
+
return (s, p) => (i(), w(a(Ye), {
|
|
1433
1650
|
ref_key: "formRef",
|
|
1434
1651
|
ref: o,
|
|
1435
1652
|
model: e.formData,
|
|
@@ -1437,123 +1654,123 @@ const El = {
|
|
|
1437
1654
|
size: e.size,
|
|
1438
1655
|
"label-position": "top"
|
|
1439
1656
|
}, {
|
|
1440
|
-
default:
|
|
1441
|
-
|
|
1442
|
-
default:
|
|
1443
|
-
(
|
|
1444
|
-
key:
|
|
1445
|
-
span:
|
|
1657
|
+
default: v(() => [
|
|
1658
|
+
T(a(Je), { gutter: 20 }, {
|
|
1659
|
+
default: v(() => [
|
|
1660
|
+
(i(!0), D(O, null, K(m.value, (c) => (i(), w(a(xe), {
|
|
1661
|
+
key: c.prop,
|
|
1662
|
+
span: b(c)
|
|
1446
1663
|
}, {
|
|
1447
|
-
default:
|
|
1448
|
-
var
|
|
1664
|
+
default: v(() => {
|
|
1665
|
+
var k;
|
|
1449
1666
|
return [
|
|
1450
|
-
|
|
1451
|
-
prop:
|
|
1452
|
-
label:
|
|
1453
|
-
rules: d(
|
|
1454
|
-
required: (
|
|
1667
|
+
T(a(ze), {
|
|
1668
|
+
prop: c.prop,
|
|
1669
|
+
label: c.label,
|
|
1670
|
+
rules: d(c),
|
|
1671
|
+
required: (k = c.form) == null ? void 0 : k.required
|
|
1455
1672
|
}, {
|
|
1456
|
-
default:
|
|
1457
|
-
h(
|
|
1673
|
+
default: v(() => [
|
|
1674
|
+
h(c) === "input" ? (i(), w(a(ge), I({
|
|
1458
1675
|
key: 0,
|
|
1459
|
-
modelValue: e.formData[
|
|
1460
|
-
"onUpdate:modelValue": (
|
|
1461
|
-
}, { ref_for: !0 },
|
|
1462
|
-
placeholder:
|
|
1463
|
-
disabled: g(
|
|
1676
|
+
modelValue: e.formData[c.prop],
|
|
1677
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1678
|
+
}, { ref_for: !0 }, u(c), {
|
|
1679
|
+
placeholder: C(c),
|
|
1680
|
+
disabled: g(c),
|
|
1464
1681
|
clearable: ""
|
|
1465
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(
|
|
1682
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "number" ? (i(), w(a(Ia), I({
|
|
1466
1683
|
key: 1,
|
|
1467
|
-
modelValue: e.formData[
|
|
1468
|
-
"onUpdate:modelValue": (
|
|
1469
|
-
}, { ref_for: !0 },
|
|
1470
|
-
placeholder:
|
|
1471
|
-
disabled: g(
|
|
1684
|
+
modelValue: e.formData[c.prop],
|
|
1685
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1686
|
+
}, { ref_for: !0 }, u(c), {
|
|
1687
|
+
placeholder: C(c),
|
|
1688
|
+
disabled: g(c),
|
|
1472
1689
|
style: { width: "100%" }
|
|
1473
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(
|
|
1690
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "select" ? (i(), w(a(ue), I({
|
|
1474
1691
|
key: 2,
|
|
1475
|
-
modelValue: e.formData[
|
|
1476
|
-
"onUpdate:modelValue": (
|
|
1477
|
-
}, { ref_for: !0 },
|
|
1478
|
-
placeholder:
|
|
1479
|
-
disabled: g(
|
|
1692
|
+
modelValue: e.formData[c.prop],
|
|
1693
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1694
|
+
}, { ref_for: !0 }, u(c), {
|
|
1695
|
+
placeholder: C(c),
|
|
1696
|
+
disabled: g(c),
|
|
1480
1697
|
clearable: "",
|
|
1481
1698
|
style: { width: "100%" }
|
|
1482
1699
|
}), {
|
|
1483
|
-
default:
|
|
1484
|
-
(
|
|
1485
|
-
key:
|
|
1486
|
-
label:
|
|
1487
|
-
value:
|
|
1700
|
+
default: v(() => [
|
|
1701
|
+
(i(!0), D(O, null, K(n(c), (f) => (i(), w(a(de), {
|
|
1702
|
+
key: f.value,
|
|
1703
|
+
label: f.label,
|
|
1704
|
+
value: f.value
|
|
1488
1705
|
}, null, 8, ["label", "value"]))), 128))
|
|
1489
1706
|
]),
|
|
1490
1707
|
_: 2
|
|
1491
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(
|
|
1708
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "radio" ? (i(), w(a(ca), I({
|
|
1492
1709
|
key: 3,
|
|
1493
|
-
modelValue: e.formData[
|
|
1494
|
-
"onUpdate:modelValue": (
|
|
1495
|
-
}, { ref_for: !0 },
|
|
1496
|
-
disabled: g(
|
|
1710
|
+
modelValue: e.formData[c.prop],
|
|
1711
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1712
|
+
}, { ref_for: !0 }, u(c), {
|
|
1713
|
+
disabled: g(c)
|
|
1497
1714
|
}), {
|
|
1498
|
-
default:
|
|
1499
|
-
(
|
|
1500
|
-
key:
|
|
1501
|
-
value:
|
|
1715
|
+
default: v(() => [
|
|
1716
|
+
(i(!0), D(O, null, K(n(c), (f) => (i(), w(a(Qe), {
|
|
1717
|
+
key: f.value,
|
|
1718
|
+
value: f.value
|
|
1502
1719
|
}, {
|
|
1503
|
-
default:
|
|
1504
|
-
|
|
1720
|
+
default: v(() => [
|
|
1721
|
+
M(F(f.label), 1)
|
|
1505
1722
|
]),
|
|
1506
1723
|
_: 2
|
|
1507
1724
|
}, 1032, ["value"]))), 128))
|
|
1508
1725
|
]),
|
|
1509
1726
|
_: 2
|
|
1510
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(
|
|
1727
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(c) === "checkbox" ? (i(), w(a(fa), I({
|
|
1511
1728
|
key: 4,
|
|
1512
|
-
modelValue: e.formData[
|
|
1513
|
-
"onUpdate:modelValue": (
|
|
1514
|
-
}, { ref_for: !0 },
|
|
1515
|
-
disabled: g(
|
|
1729
|
+
modelValue: e.formData[c.prop],
|
|
1730
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1731
|
+
}, { ref_for: !0 }, u(c), {
|
|
1732
|
+
disabled: g(c)
|
|
1516
1733
|
}), {
|
|
1517
|
-
default:
|
|
1518
|
-
(
|
|
1519
|
-
key:
|
|
1520
|
-
value:
|
|
1521
|
-
label:
|
|
1734
|
+
default: v(() => [
|
|
1735
|
+
(i(!0), D(O, null, K(n(c), (f) => (i(), w(a(Ce), {
|
|
1736
|
+
key: f.value,
|
|
1737
|
+
value: f.value,
|
|
1738
|
+
label: f.label
|
|
1522
1739
|
}, null, 8, ["value", "label"]))), 128))
|
|
1523
1740
|
]),
|
|
1524
1741
|
_: 2
|
|
1525
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(
|
|
1742
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : h(c) === "date" ? (i(), w(a(ve), I({
|
|
1526
1743
|
key: 5,
|
|
1527
|
-
modelValue: e.formData[
|
|
1528
|
-
"onUpdate:modelValue": (
|
|
1529
|
-
}, { ref_for: !0 },
|
|
1530
|
-
placeholder:
|
|
1531
|
-
disabled: g(
|
|
1744
|
+
modelValue: e.formData[c.prop],
|
|
1745
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1746
|
+
}, { ref_for: !0 }, u(c), {
|
|
1747
|
+
placeholder: C(c),
|
|
1748
|
+
disabled: g(c),
|
|
1532
1749
|
style: { width: "100%" }
|
|
1533
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(
|
|
1750
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "date-range" ? (i(), w(a(ve), I({
|
|
1534
1751
|
key: 6,
|
|
1535
|
-
modelValue: e.formData[
|
|
1536
|
-
"onUpdate:modelValue": (
|
|
1752
|
+
modelValue: e.formData[c.prop],
|
|
1753
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f,
|
|
1537
1754
|
type: "daterange"
|
|
1538
|
-
}, { ref_for: !0 },
|
|
1539
|
-
placeholder:
|
|
1540
|
-
disabled: g(
|
|
1755
|
+
}, { ref_for: !0 }, u(c), {
|
|
1756
|
+
placeholder: C(c),
|
|
1757
|
+
disabled: g(c),
|
|
1541
1758
|
style: { width: "100%" }
|
|
1542
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(
|
|
1759
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "textarea" ? (i(), w(a(ge), I({
|
|
1543
1760
|
key: 7,
|
|
1544
|
-
modelValue: e.formData[
|
|
1545
|
-
"onUpdate:modelValue": (
|
|
1761
|
+
modelValue: e.formData[c.prop],
|
|
1762
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f,
|
|
1546
1763
|
type: "textarea"
|
|
1547
|
-
}, { ref_for: !0 },
|
|
1548
|
-
placeholder:
|
|
1549
|
-
disabled: g(
|
|
1550
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(
|
|
1764
|
+
}, { ref_for: !0 }, u(c), {
|
|
1765
|
+
placeholder: C(c),
|
|
1766
|
+
disabled: g(c)
|
|
1767
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : h(c) === "switch" ? (i(), w(a($a), I({
|
|
1551
1768
|
key: 8,
|
|
1552
|
-
modelValue: e.formData[
|
|
1553
|
-
"onUpdate:modelValue": (
|
|
1554
|
-
}, { ref_for: !0 },
|
|
1555
|
-
disabled: g(
|
|
1556
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) :
|
|
1769
|
+
modelValue: e.formData[c.prop],
|
|
1770
|
+
"onUpdate:modelValue": (f) => e.formData[c.prop] = f
|
|
1771
|
+
}, { ref_for: !0 }, u(c), {
|
|
1772
|
+
disabled: g(c)
|
|
1773
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : L("", !0)
|
|
1557
1774
|
]),
|
|
1558
1775
|
_: 2
|
|
1559
1776
|
}, 1032, ["prop", "label", "rules", "required"])
|
|
@@ -1568,7 +1785,7 @@ const El = {
|
|
|
1568
1785
|
_: 1
|
|
1569
1786
|
}, 8, ["model", "label-width", "size"]));
|
|
1570
1787
|
}
|
|
1571
|
-
}),
|
|
1788
|
+
}), Tt = /* @__PURE__ */ H({
|
|
1572
1789
|
__name: "FormDrawer",
|
|
1573
1790
|
props: {
|
|
1574
1791
|
visible: { type: Boolean },
|
|
@@ -1584,89 +1801,89 @@ const El = {
|
|
|
1584
1801
|
},
|
|
1585
1802
|
emits: ["update:visible", "save"],
|
|
1586
1803
|
setup(e, { emit: l }) {
|
|
1587
|
-
const { t } =
|
|
1804
|
+
const { t } = _(), r = e, o = l, m = A();
|
|
1588
1805
|
async function h() {
|
|
1589
|
-
if (
|
|
1806
|
+
if (m.value)
|
|
1590
1807
|
try {
|
|
1591
|
-
await
|
|
1808
|
+
await m.value.validate();
|
|
1592
1809
|
} catch {
|
|
1593
1810
|
return;
|
|
1594
1811
|
}
|
|
1595
1812
|
o("save");
|
|
1596
1813
|
}
|
|
1597
|
-
const
|
|
1814
|
+
const u = V(() => r.formMode === "view" ? r.drawerCfg.viewTitle || t("formTable", "viewTitle") : r.formMode === "edit" ? r.drawerCfg.editTitle || t("formTable", "editTitle") : r.drawerCfg.addTitle || t("formTable", "addTitle")), C = V(() => {
|
|
1598
1815
|
var g;
|
|
1599
|
-
return (g = r.columns) != null && g.length ? r.columns.map((
|
|
1600
|
-
const n = r.formData[
|
|
1816
|
+
return (g = r.columns) != null && g.length ? r.columns.map((b) => {
|
|
1817
|
+
const n = r.formData[b.prop];
|
|
1601
1818
|
return {
|
|
1602
|
-
key:
|
|
1603
|
-
label:
|
|
1819
|
+
key: b.prop,
|
|
1820
|
+
label: b.label,
|
|
1604
1821
|
value: n != null && n !== "" ? String(n) : "-",
|
|
1605
1822
|
isEmpty: n == null || n === ""
|
|
1606
1823
|
};
|
|
1607
|
-
}) : Object.keys(r.formData).map((
|
|
1608
|
-
const n = r.formData[
|
|
1824
|
+
}) : Object.keys(r.formData).map((b) => {
|
|
1825
|
+
const n = r.formData[b];
|
|
1609
1826
|
return {
|
|
1610
|
-
key:
|
|
1611
|
-
label:
|
|
1827
|
+
key: b,
|
|
1828
|
+
label: b,
|
|
1612
1829
|
value: n != null && n !== "" ? String(n) : "-",
|
|
1613
1830
|
isEmpty: n == null || n === ""
|
|
1614
1831
|
};
|
|
1615
1832
|
});
|
|
1616
1833
|
});
|
|
1617
|
-
return (g,
|
|
1834
|
+
return (g, b) => e.drawerMode === "drawer" ? (i(), w(a(Tl), {
|
|
1618
1835
|
key: 0,
|
|
1619
1836
|
"model-value": e.visible,
|
|
1620
|
-
"onUpdate:modelValue":
|
|
1621
|
-
title:
|
|
1837
|
+
"onUpdate:modelValue": b[2] || (b[2] = (n) => g.$emit("update:visible", n)),
|
|
1838
|
+
title: u.value,
|
|
1622
1839
|
size: e.drawerCfg.width || "40%",
|
|
1623
1840
|
"destroy-on-close": e.drawerCfg.closeOnReset !== !1
|
|
1624
1841
|
}, {
|
|
1625
|
-
footer:
|
|
1626
|
-
e.formMode !== "view" ? (
|
|
1627
|
-
|
|
1842
|
+
footer: v(() => [
|
|
1843
|
+
e.formMode !== "view" ? (i(), D(O, { key: 0 }, [
|
|
1844
|
+
T(a(q), {
|
|
1628
1845
|
size: e.size,
|
|
1629
1846
|
round: "",
|
|
1630
|
-
onClick:
|
|
1847
|
+
onClick: b[0] || (b[0] = (n) => g.$emit("update:visible", !1))
|
|
1631
1848
|
}, {
|
|
1632
|
-
default:
|
|
1633
|
-
|
|
1849
|
+
default: v(() => [
|
|
1850
|
+
M(F(a(t)("formTable", "cancel")), 1)
|
|
1634
1851
|
]),
|
|
1635
1852
|
_: 1
|
|
1636
1853
|
}, 8, ["size"]),
|
|
1637
|
-
|
|
1854
|
+
T(a(q), {
|
|
1638
1855
|
type: "primary",
|
|
1639
1856
|
size: e.size,
|
|
1640
1857
|
round: "",
|
|
1641
1858
|
loading: e.saving,
|
|
1642
1859
|
onClick: h
|
|
1643
1860
|
}, {
|
|
1644
|
-
default:
|
|
1645
|
-
|
|
1861
|
+
default: v(() => [
|
|
1862
|
+
M(F(a(t)("formTable", "confirm")), 1)
|
|
1646
1863
|
]),
|
|
1647
1864
|
_: 1
|
|
1648
1865
|
}, 8, ["size", "loading"])
|
|
1649
|
-
], 64)) : (
|
|
1866
|
+
], 64)) : (i(), w(a(q), {
|
|
1650
1867
|
key: 1,
|
|
1651
1868
|
size: e.size,
|
|
1652
1869
|
round: "",
|
|
1653
|
-
onClick:
|
|
1870
|
+
onClick: b[1] || (b[1] = (n) => g.$emit("update:visible", !1))
|
|
1654
1871
|
}, {
|
|
1655
|
-
default:
|
|
1656
|
-
|
|
1872
|
+
default: v(() => [
|
|
1873
|
+
M(F(a(t)("formTable", "close")), 1)
|
|
1657
1874
|
]),
|
|
1658
1875
|
_: 1
|
|
1659
1876
|
}, 8, ["size"]))
|
|
1660
1877
|
]),
|
|
1661
|
-
default:
|
|
1662
|
-
e.formMode !== "view" ?
|
|
1878
|
+
default: v(() => [
|
|
1879
|
+
e.formMode !== "view" ? Y(g.$slots, e.formMode + "-form", {
|
|
1663
1880
|
key: 0,
|
|
1664
1881
|
row: e.editingRow,
|
|
1665
1882
|
formData: e.formData
|
|
1666
1883
|
}, () => [
|
|
1667
|
-
|
|
1884
|
+
T(Ba, {
|
|
1668
1885
|
ref_key: "formAutoRef",
|
|
1669
|
-
ref:
|
|
1886
|
+
ref: m,
|
|
1670
1887
|
"form-data": e.formData,
|
|
1671
1888
|
columns: e.columns || [],
|
|
1672
1889
|
"form-mode": e.formMode,
|
|
@@ -1675,22 +1892,22 @@ const El = {
|
|
|
1675
1892
|
size: e.size,
|
|
1676
1893
|
"dict-map": e.dictMap
|
|
1677
1894
|
}, null, 8, ["form-data", "columns", "form-mode", "form-cols", "form-label-width", "size", "dict-map"])
|
|
1678
|
-
]) :
|
|
1895
|
+
]) : Y(g.$slots, "view-form", {
|
|
1679
1896
|
key: 1,
|
|
1680
1897
|
row: e.editingRow,
|
|
1681
1898
|
formData: e.formData
|
|
1682
1899
|
}, () => [
|
|
1683
|
-
|
|
1900
|
+
T(a(xa), {
|
|
1684
1901
|
column: 1,
|
|
1685
1902
|
border: ""
|
|
1686
1903
|
}, {
|
|
1687
|
-
default:
|
|
1688
|
-
(
|
|
1904
|
+
default: v(() => [
|
|
1905
|
+
(i(!0), D(O, null, K(C.value, (n) => (i(), w(a(za), {
|
|
1689
1906
|
key: n.key,
|
|
1690
1907
|
label: n.label
|
|
1691
1908
|
}, {
|
|
1692
|
-
default:
|
|
1693
|
-
|
|
1909
|
+
default: v(() => [
|
|
1910
|
+
M(F(n.isEmpty ? a(t)("formTable", "empty") : n.value), 1)
|
|
1694
1911
|
]),
|
|
1695
1912
|
_: 2
|
|
1696
1913
|
}, 1032, ["label"]))), 128))
|
|
@@ -1700,59 +1917,59 @@ const El = {
|
|
|
1700
1917
|
])
|
|
1701
1918
|
]),
|
|
1702
1919
|
_: 3
|
|
1703
|
-
}, 8, ["model-value", "title", "size", "destroy-on-close"])) : (
|
|
1920
|
+
}, 8, ["model-value", "title", "size", "destroy-on-close"])) : (i(), w(a(Ua), {
|
|
1704
1921
|
key: 1,
|
|
1705
1922
|
"model-value": e.visible,
|
|
1706
|
-
"onUpdate:modelValue":
|
|
1707
|
-
title:
|
|
1923
|
+
"onUpdate:modelValue": b[5] || (b[5] = (n) => g.$emit("update:visible", n)),
|
|
1924
|
+
title: u.value,
|
|
1708
1925
|
width: e.drawerCfg.width || "600px",
|
|
1709
1926
|
"destroy-on-close": e.drawerCfg.closeOnReset !== !1
|
|
1710
1927
|
}, {
|
|
1711
|
-
footer:
|
|
1712
|
-
e.formMode !== "view" ? (
|
|
1713
|
-
|
|
1928
|
+
footer: v(() => [
|
|
1929
|
+
e.formMode !== "view" ? (i(), D(O, { key: 0 }, [
|
|
1930
|
+
T(a(q), {
|
|
1714
1931
|
size: e.size,
|
|
1715
1932
|
round: "",
|
|
1716
|
-
onClick:
|
|
1933
|
+
onClick: b[3] || (b[3] = (n) => g.$emit("update:visible", !1))
|
|
1717
1934
|
}, {
|
|
1718
|
-
default:
|
|
1719
|
-
|
|
1935
|
+
default: v(() => [
|
|
1936
|
+
M(F(a(t)("formTable", "cancel")), 1)
|
|
1720
1937
|
]),
|
|
1721
1938
|
_: 1
|
|
1722
1939
|
}, 8, ["size"]),
|
|
1723
|
-
|
|
1940
|
+
T(a(q), {
|
|
1724
1941
|
type: "primary",
|
|
1725
1942
|
size: e.size,
|
|
1726
1943
|
round: "",
|
|
1727
1944
|
loading: e.saving,
|
|
1728
1945
|
onClick: h
|
|
1729
1946
|
}, {
|
|
1730
|
-
default:
|
|
1731
|
-
|
|
1947
|
+
default: v(() => [
|
|
1948
|
+
M(F(a(t)("formTable", "confirm")), 1)
|
|
1732
1949
|
]),
|
|
1733
1950
|
_: 1
|
|
1734
1951
|
}, 8, ["size", "loading"])
|
|
1735
|
-
], 64)) : (
|
|
1952
|
+
], 64)) : (i(), w(a(q), {
|
|
1736
1953
|
key: 1,
|
|
1737
1954
|
size: e.size,
|
|
1738
1955
|
round: "",
|
|
1739
|
-
onClick:
|
|
1956
|
+
onClick: b[4] || (b[4] = (n) => g.$emit("update:visible", !1))
|
|
1740
1957
|
}, {
|
|
1741
|
-
default:
|
|
1742
|
-
|
|
1958
|
+
default: v(() => [
|
|
1959
|
+
M(F(a(t)("formTable", "close")), 1)
|
|
1743
1960
|
]),
|
|
1744
1961
|
_: 1
|
|
1745
1962
|
}, 8, ["size"]))
|
|
1746
1963
|
]),
|
|
1747
|
-
default:
|
|
1748
|
-
e.formMode !== "view" ?
|
|
1964
|
+
default: v(() => [
|
|
1965
|
+
e.formMode !== "view" ? Y(g.$slots, e.formMode + "-form", {
|
|
1749
1966
|
key: 0,
|
|
1750
1967
|
row: e.editingRow,
|
|
1751
1968
|
formData: e.formData
|
|
1752
1969
|
}, () => [
|
|
1753
|
-
|
|
1970
|
+
T(Ba, {
|
|
1754
1971
|
ref_key: "formAutoRef",
|
|
1755
|
-
ref:
|
|
1972
|
+
ref: m,
|
|
1756
1973
|
"form-data": e.formData,
|
|
1757
1974
|
columns: e.columns || [],
|
|
1758
1975
|
"form-mode": e.formMode,
|
|
@@ -1761,22 +1978,22 @@ const El = {
|
|
|
1761
1978
|
size: e.size,
|
|
1762
1979
|
"dict-map": e.dictMap
|
|
1763
1980
|
}, null, 8, ["form-data", "columns", "form-mode", "form-cols", "form-label-width", "size", "dict-map"])
|
|
1764
|
-
]) :
|
|
1981
|
+
]) : Y(g.$slots, "view-form", {
|
|
1765
1982
|
key: 1,
|
|
1766
1983
|
row: e.editingRow,
|
|
1767
1984
|
formData: e.formData
|
|
1768
1985
|
}, () => [
|
|
1769
|
-
|
|
1986
|
+
T(a(xa), {
|
|
1770
1987
|
column: 1,
|
|
1771
1988
|
border: ""
|
|
1772
1989
|
}, {
|
|
1773
|
-
default:
|
|
1774
|
-
(
|
|
1990
|
+
default: v(() => [
|
|
1991
|
+
(i(!0), D(O, null, K(C.value, (n) => (i(), w(a(za), {
|
|
1775
1992
|
key: n.key,
|
|
1776
1993
|
label: n.label
|
|
1777
1994
|
}, {
|
|
1778
|
-
default:
|
|
1779
|
-
|
|
1995
|
+
default: v(() => [
|
|
1996
|
+
M(F(n.isEmpty ? a(t)("formTable", "empty") : n.value), 1)
|
|
1780
1997
|
]),
|
|
1781
1998
|
_: 2
|
|
1782
1999
|
}, 1032, ["label"]))), 128))
|
|
@@ -1788,16 +2005,17 @@ const El = {
|
|
|
1788
2005
|
_: 3
|
|
1789
2006
|
}, 8, ["model-value", "title", "width", "destroy-on-close"]));
|
|
1790
2007
|
}
|
|
1791
|
-
}),
|
|
2008
|
+
}), Et = { key: 0 }, Pt = { key: 1 }, Bt = { key: 2 }, Ft = { class: "ee-action-btns" }, Rt = {
|
|
1792
2009
|
key: 0,
|
|
1793
2010
|
class: "ee-pagination"
|
|
1794
|
-
},
|
|
2011
|
+
}, Le = /* @__PURE__ */ H({
|
|
1795
2012
|
name: "EeFormTable",
|
|
1796
2013
|
__name: "index",
|
|
1797
2014
|
props: {
|
|
1798
2015
|
columns: {},
|
|
1799
2016
|
data: {},
|
|
1800
2017
|
loading: { type: Boolean, default: !1 },
|
|
2018
|
+
readOnly: { type: Boolean, default: !1 },
|
|
1801
2019
|
searchConfig: {},
|
|
1802
2020
|
pagination: {},
|
|
1803
2021
|
actionConfig: { type: [Object, Boolean] },
|
|
@@ -1822,476 +2040,640 @@ const El = {
|
|
|
1822
2040
|
},
|
|
1823
2041
|
emits: ["search", "search-reset", "page-change", "selection-change", "current-change", "size-change", "sort-change", "row-click", "row-dblclick", "view", "add", "edit", "delete", "batch-delete", "import", "export", "add-success", "edit-success", "delete-success", "batch-delete-success", "request-error", "column-visible-change", "form-save"],
|
|
1824
2042
|
setup(e, { expose: l, emit: t }) {
|
|
1825
|
-
const { t: r } =
|
|
1826
|
-
searchExpanded:
|
|
1827
|
-
searchParams:
|
|
1828
|
-
showSearch:
|
|
1829
|
-
searchCols:
|
|
1830
|
-
visibleSearchFields:
|
|
2043
|
+
const { t: r } = _(), o = e, m = he("eeGlobalConfig", {}), h = V(() => o.readOnly ?? m.readOnly ?? !1), u = t, C = st(o), g = ut(o), {
|
|
2044
|
+
searchExpanded: b,
|
|
2045
|
+
searchParams: n,
|
|
2046
|
+
showSearch: d,
|
|
2047
|
+
searchCols: s,
|
|
2048
|
+
visibleSearchFields: p,
|
|
1831
2049
|
showFoldBtn: c,
|
|
1832
|
-
actionColSpan:
|
|
1833
|
-
initSearchParams:
|
|
1834
|
-
getActiveSearchParams:
|
|
1835
|
-
resetSearchParams:
|
|
1836
|
-
toggleFold:
|
|
1837
|
-
} =
|
|
1838
|
-
pageState:
|
|
1839
|
-
showPagination:
|
|
1840
|
-
pageSizesComputed:
|
|
1841
|
-
paginationLayoutComputed:
|
|
1842
|
-
paginationBgComputed:
|
|
1843
|
-
setPage:
|
|
1844
|
-
setPageSize:
|
|
1845
|
-
resetPage:
|
|
1846
|
-
} =
|
|
1847
|
-
tableRef:
|
|
1848
|
-
selection:
|
|
1849
|
-
singleSelection:
|
|
1850
|
-
columnSettingVisible:
|
|
1851
|
-
checkedColumns:
|
|
1852
|
-
showColumnSetting:
|
|
1853
|
-
allColumns:
|
|
1854
|
-
visibleColumns:
|
|
1855
|
-
tableComputedHeight:
|
|
1856
|
-
tableMaxHeightProp:
|
|
1857
|
-
tableWrapperStyle:
|
|
1858
|
-
selectionCfg:
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
2050
|
+
actionColSpan: k,
|
|
2051
|
+
initSearchParams: f,
|
|
2052
|
+
getActiveSearchParams: z,
|
|
2053
|
+
resetSearchParams: U,
|
|
2054
|
+
toggleFold: le
|
|
2055
|
+
} = dt(o), {
|
|
2056
|
+
pageState: G,
|
|
2057
|
+
showPagination: pe,
|
|
2058
|
+
pageSizesComputed: be,
|
|
2059
|
+
paginationLayoutComputed: Ve,
|
|
2060
|
+
paginationBgComputed: ke,
|
|
2061
|
+
setPage: Te,
|
|
2062
|
+
setPageSize: E,
|
|
2063
|
+
resetPage: oe
|
|
2064
|
+
} = ct(o), B = ft(o, { authPass: C.authPass }), {
|
|
2065
|
+
tableRef: P,
|
|
2066
|
+
selection: j,
|
|
2067
|
+
singleSelection: te,
|
|
2068
|
+
columnSettingVisible: ne,
|
|
2069
|
+
checkedColumns: Ka,
|
|
2070
|
+
showColumnSetting: qa,
|
|
2071
|
+
allColumns: Ha,
|
|
2072
|
+
visibleColumns: la,
|
|
2073
|
+
tableComputedHeight: Wa,
|
|
2074
|
+
tableMaxHeightProp: ja,
|
|
2075
|
+
tableWrapperStyle: Ga,
|
|
2076
|
+
selectionCfg: ce,
|
|
2077
|
+
showIndex: ma,
|
|
2078
|
+
selectionVisible: ta,
|
|
2079
|
+
handleSelectionChange: Xa,
|
|
2080
|
+
handleSingleSelect: Ya
|
|
2081
|
+
} = B, Ja = mt(o, {
|
|
2082
|
+
searchParams: n,
|
|
2083
|
+
getActiveSearchParams: z,
|
|
2084
|
+
pageState: G,
|
|
2085
|
+
resetPage: oe,
|
|
2086
|
+
setTotal: (y) => {
|
|
2087
|
+
G.total = y;
|
|
1868
2088
|
},
|
|
1869
|
-
selection:
|
|
1870
|
-
emit: (
|
|
2089
|
+
selection: j,
|
|
2090
|
+
emit: (y, ...S) => u(y, ...S),
|
|
1871
2091
|
t: r
|
|
1872
2092
|
}), {
|
|
1873
|
-
internalData:
|
|
1874
|
-
loadingState:
|
|
1875
|
-
hasCrud:
|
|
1876
|
-
fetchData:
|
|
1877
|
-
refreshTable:
|
|
1878
|
-
handleDelete:
|
|
1879
|
-
handleBatchDelete:
|
|
1880
|
-
} =
|
|
1881
|
-
visibleColumns:
|
|
1882
|
-
getActiveSearchParams:
|
|
1883
|
-
dictLabel:
|
|
1884
|
-
internalData:
|
|
1885
|
-
fetchData:
|
|
1886
|
-
setLoading: (
|
|
1887
|
-
|
|
2093
|
+
internalData: oa,
|
|
2094
|
+
loadingState: ha,
|
|
2095
|
+
hasCrud: fe,
|
|
2096
|
+
fetchData: ie,
|
|
2097
|
+
refreshTable: ga,
|
|
2098
|
+
handleDelete: va,
|
|
2099
|
+
handleBatchDelete: Qa
|
|
2100
|
+
} = Ja, W = ht(o), ra = A(!1), Re = A(!1), Ee = A([]), pa = A([]), { handleExport: Za } = gt(o, {
|
|
2101
|
+
visibleColumns: la,
|
|
2102
|
+
getActiveSearchParams: z,
|
|
2103
|
+
dictLabel: g.dictLabel,
|
|
2104
|
+
internalData: oa,
|
|
2105
|
+
fetchData: ie,
|
|
2106
|
+
setLoading: (y) => {
|
|
2107
|
+
ha.value = y;
|
|
1888
2108
|
},
|
|
1889
|
-
getCurrentData: () => o.data ||
|
|
2109
|
+
getCurrentData: () => o.data || oa.value,
|
|
1890
2110
|
t: r
|
|
1891
|
-
}),
|
|
1892
|
-
visible: !!
|
|
1893
|
-
drawerMode:
|
|
1894
|
-
formMode:
|
|
1895
|
-
editingRow:
|
|
1896
|
-
formData:
|
|
1897
|
-
drawerCfg:
|
|
1898
|
-
saving:
|
|
1899
|
-
onVisibleChange: (
|
|
1900
|
-
|
|
1901
|
-
}
|
|
1902
|
-
})), Se = D({
|
|
1903
|
-
get: () => me.value,
|
|
1904
|
-
set: (z) => {
|
|
1905
|
-
me.value = z;
|
|
2111
|
+
}), se = V(() => ({
|
|
2112
|
+
visible: !!W.formVisible.value,
|
|
2113
|
+
drawerMode: W.drawerMode,
|
|
2114
|
+
formMode: W.formMode.value || "add",
|
|
2115
|
+
editingRow: W.editingRow.value ?? null,
|
|
2116
|
+
formData: W.formData.value ?? {},
|
|
2117
|
+
drawerCfg: W.drawerCfg,
|
|
2118
|
+
saving: W.saving.value ?? !1,
|
|
2119
|
+
onVisibleChange: (y) => {
|
|
2120
|
+
W.formVisible.value = y;
|
|
1906
2121
|
}
|
|
1907
|
-
}),
|
|
1908
|
-
if (o.actionConfig === !1) return
|
|
1909
|
-
const
|
|
1910
|
-
...
|
|
2122
|
+
})), ee = V(() => {
|
|
2123
|
+
if (o.actionConfig === !1) return Ea;
|
|
2124
|
+
const y = {
|
|
2125
|
+
...Ta,
|
|
1911
2126
|
label: r("formTable", "operation"),
|
|
1912
2127
|
viewText: r("formTable", "view"),
|
|
1913
2128
|
editText: r("formTable", "edit"),
|
|
1914
2129
|
deleteText: r("formTable", "delete"),
|
|
2130
|
+
versionText: r("formTable", "version"),
|
|
1915
2131
|
deleteConfirmTitle: r("formTable", "confirmDelete"),
|
|
1916
2132
|
deleteConfirmMessage: r("formTable", "confirmDeleteMsg")
|
|
1917
2133
|
};
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
2134
|
+
if (o.actionConfig === !0) return y;
|
|
2135
|
+
if (!o.actionConfig) return Ea;
|
|
2136
|
+
const S = { ...y, ...o.actionConfig };
|
|
2137
|
+
return h.value && (S.showView = S.showView ?? !0, S.showEdit = !1, S.showDelete = !1, S.showVersion = !1), S;
|
|
2138
|
+
}), Pe = V(() => ee.value.buttonMode || "text"), Ae = V(() => Math.max(1, ee.value.maxButtons ?? Ta.maxButtons)), _a = V(() => {
|
|
2139
|
+
const y = ee.value;
|
|
2140
|
+
if (y.width) return y.width;
|
|
2141
|
+
const S = Pe.value, $ = Ae.value, x = S === "icon" ? 34 : S === "icon-text" ? 78 : 60, R = sa.value || [];
|
|
2142
|
+
let X = 0, ye = !1;
|
|
2143
|
+
for (const Ue of R) {
|
|
2144
|
+
const Be = ia(Ue);
|
|
2145
|
+
X = Math.max(X, Math.min(Be, $)), Be > $ && (ye = !0);
|
|
2146
|
+
}
|
|
2147
|
+
return X = Math.max(1, X), X * x + (X - 1) * 2 + (ye ? 32 : 0) + 36;
|
|
2148
|
+
});
|
|
2149
|
+
function na(y) {
|
|
2150
|
+
const S = ee.value, $ = [];
|
|
2151
|
+
if (S.beforeButtons)
|
|
2152
|
+
for (const R of S.beforeButtons)
|
|
2153
|
+
(!R.show || R.show(y)) && C.authPass(R.auth) && $.push({
|
|
2154
|
+
text: R.text,
|
|
2155
|
+
iconComponent: R.icon,
|
|
2156
|
+
type: R.type,
|
|
2157
|
+
handler: () => R.handler(y)
|
|
2158
|
+
});
|
|
2159
|
+
S.showView && C.authPass(S.viewAuth) && $.push({
|
|
2160
|
+
text: S.viewText || r("formTable", "view"),
|
|
2161
|
+
iconComponent: et,
|
|
2162
|
+
type: "primary",
|
|
2163
|
+
handler: () => {
|
|
2164
|
+
S.onView ? S.onView(y) : il(y);
|
|
2165
|
+
}
|
|
2166
|
+
}), S.showEdit && C.authPass(S.editAuth) && $.push({
|
|
2167
|
+
text: S.editText || r("formTable", "edit"),
|
|
2168
|
+
iconComponent: Hl,
|
|
2169
|
+
type: "primary",
|
|
2170
|
+
handler: () => {
|
|
2171
|
+
S.onEdit ? S.onEdit(y) : nl(y);
|
|
2172
|
+
}
|
|
2173
|
+
}), S.showDelete && C.authPass(S.deleteAuth) && $.push({
|
|
2174
|
+
text: S.deleteText || r("formTable", "delete"),
|
|
2175
|
+
iconComponent: Kl,
|
|
2176
|
+
type: "danger",
|
|
2177
|
+
_isDelete: !0,
|
|
2178
|
+
handler: () => {
|
|
2179
|
+
S.onDelete ? S.onDelete(y) : sl(y);
|
|
2180
|
+
}
|
|
2181
|
+
}), S.showVersion && C.authPass(S.versionAuth) && $.push({
|
|
2182
|
+
text: S.versionText || r("formTable", "version"),
|
|
2183
|
+
type: "primary",
|
|
2184
|
+
handler: () => hl(y)
|
|
2185
|
+
});
|
|
2186
|
+
const x = S.afterButtons || S.customButtons || [];
|
|
2187
|
+
for (const R of x)
|
|
2188
|
+
(!R.show || R.show(y)) && C.authPass(R.auth) && $.push({
|
|
2189
|
+
text: R.text,
|
|
2190
|
+
iconComponent: R.icon,
|
|
2191
|
+
type: R.type || "default",
|
|
2192
|
+
handler: () => R.handler(y)
|
|
2193
|
+
});
|
|
2194
|
+
return $;
|
|
2195
|
+
}
|
|
2196
|
+
function ia(y) {
|
|
2197
|
+
return na(y).length;
|
|
2198
|
+
}
|
|
2199
|
+
const ba = V(() => {
|
|
2200
|
+
if (o.toolbarConfig === !1) return Pa;
|
|
2201
|
+
const y = { ...ot };
|
|
2202
|
+
if (o.toolbarConfig === !0) return { ...y, show: !0 };
|
|
2203
|
+
if (!o.toolbarConfig) return Pa;
|
|
2204
|
+
const S = { ...y, ...o.toolbarConfig };
|
|
2205
|
+
return h.value && (S.showAdd = !1, S.showImport = !1, S.showExport = !1, S.showBatchDelete = !1), S;
|
|
2206
|
+
}), sa = V(() => fe.value ? oa.value : o.data || []);
|
|
2207
|
+
re(sa, (y) => {
|
|
2208
|
+
!fe.value && y && (typeof o.pagination == "object" && o.pagination && "total" in o.pagination || (G.total = y.length));
|
|
2209
|
+
}, { immediate: !0 });
|
|
2210
|
+
const el = V(() => ha.value || o.loading);
|
|
2211
|
+
function al() {
|
|
2212
|
+
oe();
|
|
2213
|
+
const y = z();
|
|
2214
|
+
u("search", y), fe.value && ie();
|
|
2215
|
+
}
|
|
2216
|
+
function ll() {
|
|
2217
|
+
U(), u("search-reset"), fe.value ? ie() : u("search", {});
|
|
2218
|
+
}
|
|
2219
|
+
function tl(y) {
|
|
2220
|
+
Te(y), u("current-change", y), u("page-change", { currentPage: y, pageSize: G.pageSize }), fe.value && ie();
|
|
2221
|
+
}
|
|
2222
|
+
function ol(y) {
|
|
2223
|
+
E(y), oe(), u("size-change", y), u("page-change", { currentPage: 1, pageSize: y }), fe.value && ie();
|
|
2224
|
+
}
|
|
2225
|
+
function rl() {
|
|
2226
|
+
var S;
|
|
2227
|
+
W.openAdd();
|
|
2228
|
+
const y = {};
|
|
2229
|
+
for (const $ of o.columns)
|
|
2230
|
+
((S = $.form) == null ? void 0 : S.defaultValue) !== void 0 && (y[$.prop] = $.form.defaultValue);
|
|
2231
|
+
W.formData.value = { ...y }, u("add");
|
|
2232
|
+
}
|
|
2233
|
+
function nl(y) {
|
|
2234
|
+
W.openEdit(y), u("edit", y);
|
|
2235
|
+
}
|
|
2236
|
+
function il(y) {
|
|
2237
|
+
W.openView(y), u("view", y);
|
|
2238
|
+
}
|
|
2239
|
+
function sl(y) {
|
|
2240
|
+
va(y);
|
|
2241
|
+
}
|
|
2242
|
+
async function ul(y) {
|
|
1968
2243
|
try {
|
|
1969
|
-
await
|
|
2244
|
+
await Ma.confirm(
|
|
2245
|
+
ee.value.deleteConfirmMessage || r("formTable", "confirmDeleteMsg"),
|
|
2246
|
+
ee.value.deleteConfirmTitle || r("formTable", "confirmDelete"),
|
|
2247
|
+
{ confirmButtonText: r("formTable", "confirm"), cancelButtonText: r("formTable", "cancel"), type: "warning" }
|
|
2248
|
+
), va(y);
|
|
2249
|
+
} catch {
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
function dl() {
|
|
2253
|
+
Qa();
|
|
2254
|
+
}
|
|
2255
|
+
function cl() {
|
|
2256
|
+
u("export"), Za();
|
|
2257
|
+
}
|
|
2258
|
+
async function fl() {
|
|
2259
|
+
ra.value = !0;
|
|
2260
|
+
try {
|
|
2261
|
+
await ga(), J.success(r("formTable", "refreshSuccess"));
|
|
1970
2262
|
} finally {
|
|
1971
|
-
|
|
2263
|
+
ra.value = !1;
|
|
1972
2264
|
}
|
|
1973
2265
|
}
|
|
1974
|
-
async function
|
|
1975
|
-
var
|
|
1976
|
-
|
|
2266
|
+
async function ml() {
|
|
2267
|
+
var y, S;
|
|
2268
|
+
W.saving.value = !0;
|
|
1977
2269
|
try {
|
|
1978
|
-
|
|
1979
|
-
} catch (
|
|
1980
|
-
|
|
2270
|
+
u("form-save", { ...W.formData.value }, W.formMode.value === "edit"), W.formMode.value === "edit" && ((y = o.crudConfig) != null && y.api.edit) ? (await o.crudConfig.api.edit(W.formData.value), J.success(r("formTable", "editSuccess")), u("edit-success")) : W.formMode.value === "add" && ((S = o.crudConfig) != null && S.api.add) && (await o.crudConfig.api.add(W.formData.value), J.success(r("formTable", "addSuccess")), u("add-success")), W.closeForm(), await ie();
|
|
2271
|
+
} catch ($) {
|
|
2272
|
+
u("request-error", $);
|
|
1981
2273
|
} finally {
|
|
1982
|
-
|
|
2274
|
+
W.saving.value = !1;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
async function hl(y) {
|
|
2278
|
+
var x, R, X, ye, Ue, Be, ya, wa;
|
|
2279
|
+
const S = y[o.rowKey || "rowKey"], $ = o.crudConfig;
|
|
2280
|
+
if ((x = $ == null ? void 0 : $.api) != null && x.version)
|
|
2281
|
+
try {
|
|
2282
|
+
const Q = await $.api.version(S);
|
|
2283
|
+
Ee.value = Q;
|
|
2284
|
+
} catch (Q) {
|
|
2285
|
+
u("request-error", Q), J.error((Q == null ? void 0 : Q.message) || r("formTable", "requestFailed"));
|
|
2286
|
+
return;
|
|
2287
|
+
}
|
|
2288
|
+
else if ((R = $ == null ? void 0 : $.urls) != null && R.version || (X = $ == null ? void 0 : $.versionConfig) != null && X.url)
|
|
2289
|
+
try {
|
|
2290
|
+
const Q = $.requestInstance || he("eeRequestInstance", null);
|
|
2291
|
+
if (Q) {
|
|
2292
|
+
const pl = ((ye = $.versionConfig) == null ? void 0 : ye.url) || ((Ue = $.urls) == null ? void 0 : Ue.version), bl = { ...(Be = $.versionConfig) == null ? void 0 : Be.params, ...(ya = $.params) == null ? void 0 : ya.version, id: S }, Ca = await Q.get(pl, { params: bl });
|
|
2293
|
+
Ee.value = ((wa = Ca.data) == null ? void 0 : wa.data) || Ca.data || [];
|
|
2294
|
+
}
|
|
2295
|
+
} catch (Q) {
|
|
2296
|
+
u("request-error", Q);
|
|
2297
|
+
return;
|
|
2298
|
+
}
|
|
2299
|
+
else {
|
|
2300
|
+
J.warning(r("formTable", "requestFailed"));
|
|
2301
|
+
return;
|
|
1983
2302
|
}
|
|
2303
|
+
Ee.value.length > 0 && (pa.value = Object.keys(Ee.value[0]).map((Q) => ({
|
|
2304
|
+
prop: Q,
|
|
2305
|
+
label: Q
|
|
2306
|
+
}))), Re.value = !0;
|
|
1984
2307
|
}
|
|
1985
|
-
const
|
|
1986
|
-
const
|
|
1987
|
-
for (const
|
|
1988
|
-
!
|
|
1989
|
-
return
|
|
2308
|
+
const gl = V(() => {
|
|
2309
|
+
const y = {};
|
|
2310
|
+
for (const S of Object.keys(o))
|
|
2311
|
+
!nt.includes(S) && !S.startsWith("on") && (y[S] = o[S]);
|
|
2312
|
+
return y;
|
|
1990
2313
|
});
|
|
1991
|
-
function
|
|
1992
|
-
const
|
|
1993
|
-
for (const [
|
|
1994
|
-
|
|
1995
|
-
return
|
|
1996
|
-
}
|
|
1997
|
-
return
|
|
1998
|
-
|
|
2314
|
+
function vl(y) {
|
|
2315
|
+
const S = {};
|
|
2316
|
+
for (const [$, x] of Object.entries(y))
|
|
2317
|
+
it.includes($) || (S[$] = x);
|
|
2318
|
+
return S;
|
|
2319
|
+
}
|
|
2320
|
+
return Z(() => {
|
|
2321
|
+
f(), fe.value && ie();
|
|
1999
2322
|
}), l({
|
|
2000
|
-
refresh:
|
|
2323
|
+
refresh: ga,
|
|
2001
2324
|
/* 刷新表格 */
|
|
2002
|
-
fetchData:
|
|
2325
|
+
fetchData: ie,
|
|
2003
2326
|
/* 手动请求数据 */
|
|
2004
|
-
getSelection: () =>
|
|
2327
|
+
getSelection: () => j.value,
|
|
2005
2328
|
/* 获取选中行 */
|
|
2006
|
-
tableRef:
|
|
2329
|
+
tableRef: P
|
|
2007
2330
|
/* el-table 引用 */
|
|
2008
|
-
}), (
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
"show-search": !!a(v),
|
|
2013
|
-
"search-params": a(g),
|
|
2014
|
-
"visible-search-fields": a(d),
|
|
2015
|
-
"search-cols": a(n),
|
|
2016
|
-
"action-col-span": a(p),
|
|
2017
|
-
"show-fold-btn": !!a(c),
|
|
2018
|
-
"search-expanded": !!a(S),
|
|
2019
|
-
size: e.size,
|
|
2020
|
-
"resolve-dict": a(m).resolvedDict,
|
|
2021
|
-
onSearch: Ba,
|
|
2022
|
-
onReset: Fa,
|
|
2023
|
-
onToggleFold: a(C)
|
|
2024
|
-
}, {
|
|
2025
|
-
"search-action": b(({ params: w }) => [
|
|
2026
|
-
H(z.$slots, "search-action", { params: w })
|
|
2027
|
-
]),
|
|
2028
|
-
_: 3
|
|
2029
|
-
}, 8, ["show-search", "search-params", "visible-search-fields", "search-cols", "action-col-span", "show-fold-btn", "search-expanded", "size", "resolve-dict", "onToggleFold"]),
|
|
2030
|
-
P(Fl, {
|
|
2031
|
-
show: !!oa.value.show,
|
|
2032
|
-
"toolbar-cfg": oa.value,
|
|
2033
|
-
size: e.size,
|
|
2034
|
-
refreshing: Qe.value,
|
|
2035
|
-
deps: {
|
|
2036
|
-
authPass: a(h).authPass,
|
|
2037
|
-
selectionCount: a(Z).length,
|
|
2038
|
-
showColumnSetting: !!a(we)
|
|
2039
|
-
},
|
|
2040
|
-
onAdd: Aa,
|
|
2041
|
-
onImport: B[0] || (B[0] = (w) => z.$emit("import")),
|
|
2042
|
-
onExport: Ia,
|
|
2043
|
-
onBatchDelete: La,
|
|
2044
|
-
onRefresh: Na,
|
|
2045
|
-
onColumnSetting: B[1] || (B[1] = (w) => Se.value = !0)
|
|
2046
|
-
}, {
|
|
2047
|
-
"toolbar-right": b(() => [
|
|
2048
|
-
H(z.$slots, "toolbar-right")
|
|
2049
|
-
]),
|
|
2050
|
-
_: 3
|
|
2051
|
-
}, 8, ["show", "toolbar-cfg", "size", "refreshing", "deps"]),
|
|
2052
|
-
q("div", {
|
|
2053
|
-
class: "ee-table-wrapper",
|
|
2054
|
-
style: ja(a(Ca))
|
|
2331
|
+
}), (y, S) => {
|
|
2332
|
+
const $ = wl("el-dialog");
|
|
2333
|
+
return i(), D("div", {
|
|
2334
|
+
class: Aa(["ee-form-table", [`ee-size--${e.size}`, { "ee-stripe": e.stripe, "ee-border": e.border }]])
|
|
2055
2335
|
}, [
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2336
|
+
T(pt, {
|
|
2337
|
+
"show-search": !!a(d),
|
|
2338
|
+
"search-params": a(n),
|
|
2339
|
+
"visible-search-fields": a(p),
|
|
2340
|
+
"search-cols": a(s),
|
|
2341
|
+
"action-col-span": a(k),
|
|
2342
|
+
"show-fold-btn": !!a(c),
|
|
2343
|
+
"search-expanded": !!a(b),
|
|
2061
2344
|
size: e.size,
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
"
|
|
2068
|
-
|
|
2069
|
-
a(za)(w), z.$emit("selection-change", w);
|
|
2070
|
-
}),
|
|
2071
|
-
onRowClick: B[3] || (B[3] = (w) => z.$emit("row-click", w)),
|
|
2072
|
-
onRowDblclick: B[4] || (B[4] = (w) => z.$emit("row-dblclick", w)),
|
|
2073
|
-
onSortChange: B[5] || (B[5] = (w) => z.$emit("sort-change", w))
|
|
2074
|
-
}, qa.value), {
|
|
2075
|
-
empty: b(() => [
|
|
2076
|
-
H(z.$slots, "empty", {}, () => [
|
|
2077
|
-
P(a(el), {
|
|
2078
|
-
description: e.emptyText || a(r)("formTable", "empty")
|
|
2079
|
-
}, null, 8, ["description"])
|
|
2080
|
-
])
|
|
2081
|
-
]),
|
|
2082
|
-
default: b(() => [
|
|
2083
|
-
a(oe).show && a(oe).type === "multiple" ? (s(), y(a(Ce), {
|
|
2084
|
-
key: 0,
|
|
2085
|
-
type: "selection",
|
|
2086
|
-
width: "50",
|
|
2087
|
-
fixed: "left",
|
|
2088
|
-
selectable: a(oe).disabledRow ? (w) => !a(oe).disabledRow(w) : void 0,
|
|
2089
|
-
"reserve-selection": a(oe).reserveSelection
|
|
2090
|
-
}, null, 8, ["selectable", "reserve-selection"])) : A("", !0),
|
|
2091
|
-
a(oe).show && a(oe).type === "single" ? (s(), y(a(Ce), {
|
|
2092
|
-
key: 1,
|
|
2093
|
-
width: "50",
|
|
2094
|
-
fixed: "left"
|
|
2095
|
-
}, {
|
|
2096
|
-
default: b(({ row: w }) => [
|
|
2097
|
-
P(a(Le), {
|
|
2098
|
-
"model-value": a(Y) === w[e.rowKey || "id"],
|
|
2099
|
-
value: w[e.rowKey || "id"],
|
|
2100
|
-
onChange: () => {
|
|
2101
|
-
a(xa)(w), z.$emit("selection-change", a(Z));
|
|
2102
|
-
}
|
|
2103
|
-
}, null, 8, ["model-value", "value", "onChange"])
|
|
2104
|
-
]),
|
|
2105
|
-
_: 1
|
|
2106
|
-
})) : A("", !0),
|
|
2107
|
-
(s(!0), V($, null, O(a(Xe), (w) => (s(), y(a(Ce), F({
|
|
2108
|
-
key: w.prop,
|
|
2109
|
-
prop: w.prop,
|
|
2110
|
-
label: w.label,
|
|
2111
|
-
width: w.width,
|
|
2112
|
-
"min-width": w.minWidth,
|
|
2113
|
-
fixed: w.fixed,
|
|
2114
|
-
sortable: w.sortable,
|
|
2115
|
-
align: w.align || "center",
|
|
2116
|
-
"class-name": w.className
|
|
2117
|
-
}, { ref_for: !0 }, Ha(w)), {
|
|
2118
|
-
default: b((I) => [
|
|
2119
|
-
H(z.$slots, w.slotName || w.prop, {
|
|
2120
|
-
row: I.row,
|
|
2121
|
-
index: I.$index,
|
|
2122
|
-
column: w
|
|
2123
|
-
}, () => [
|
|
2124
|
-
w.formatter ? (s(), V("span", Ul, T(w.formatter(I.row, w, I.row[w.prop], I.$index)), 1)) : w.dictKey ? (s(), V("span", Al, T(a(m).dictLabel(w.dictKey, I.row[w.prop])), 1)) : (s(), V("span", $l, T(I.row[w.prop] ?? "-"), 1))
|
|
2125
|
-
])
|
|
2126
|
-
]),
|
|
2127
|
-
_: 2
|
|
2128
|
-
}, 1040, ["prop", "label", "width", "min-width", "fixed", "sortable", "align", "class-name"]))), 128)),
|
|
2129
|
-
K.value.show ? (s(), y(a(Ce), {
|
|
2130
|
-
key: 2,
|
|
2131
|
-
label: K.value.label || a(r)("formTable", "operation"),
|
|
2132
|
-
width: K.value.width,
|
|
2133
|
-
fixed: K.value.fixed ?? "right",
|
|
2134
|
-
align: K.value.align || "center"
|
|
2135
|
-
}, {
|
|
2136
|
-
default: b(({ row: w }) => [
|
|
2137
|
-
H(z.$slots, "action-before", { row: w }),
|
|
2138
|
-
K.value.showView && a(h).authPass(K.value.viewAuth) ? (s(), y(a(M), {
|
|
2139
|
-
key: 0,
|
|
2140
|
-
type: "primary",
|
|
2141
|
-
link: "",
|
|
2142
|
-
size: e.size,
|
|
2143
|
-
onClick: (I) => Ma(w)
|
|
2144
|
-
}, {
|
|
2145
|
-
default: b(() => [
|
|
2146
|
-
U(T(K.value.viewText || a(r)("formTable", "view")), 1)
|
|
2147
|
-
]),
|
|
2148
|
-
_: 1
|
|
2149
|
-
}, 8, ["size", "onClick"])) : A("", !0),
|
|
2150
|
-
K.value.showEdit && a(h).authPass(K.value.editAuth) ? (s(), y(a(M), {
|
|
2151
|
-
key: 1,
|
|
2152
|
-
type: "primary",
|
|
2153
|
-
link: "",
|
|
2154
|
-
size: e.size,
|
|
2155
|
-
onClick: (I) => $a(w)
|
|
2156
|
-
}, {
|
|
2157
|
-
default: b(() => [
|
|
2158
|
-
U(T(K.value.editText || a(r)("formTable", "edit")), 1)
|
|
2159
|
-
]),
|
|
2160
|
-
_: 1
|
|
2161
|
-
}, 8, ["size", "onClick"])) : A("", !0),
|
|
2162
|
-
K.value.showDelete && a(h).authPass(K.value.deleteAuth) ? (s(), y(a(M), {
|
|
2163
|
-
key: 2,
|
|
2164
|
-
type: "danger",
|
|
2165
|
-
link: "",
|
|
2166
|
-
size: e.size,
|
|
2167
|
-
onClick: (I) => Oa(w)
|
|
2168
|
-
}, {
|
|
2169
|
-
default: b(() => [
|
|
2170
|
-
U(T(K.value.deleteText || a(r)("formTable", "delete")), 1)
|
|
2171
|
-
]),
|
|
2172
|
-
_: 1
|
|
2173
|
-
}, 8, ["size", "onClick"])) : A("", !0),
|
|
2174
|
-
(s(!0), V($, null, O(K.value.customButtons || [], (I) => (s(), V($, {
|
|
2175
|
-
key: I.code
|
|
2176
|
-
}, [
|
|
2177
|
-
(!I.show || I.show(w)) && a(h).authPass(I.auth) ? (s(), y(a(M), {
|
|
2178
|
-
key: 0,
|
|
2179
|
-
type: I.type || "default",
|
|
2180
|
-
link: "",
|
|
2181
|
-
size: e.size,
|
|
2182
|
-
onClick: (at) => I.handler(w)
|
|
2183
|
-
}, {
|
|
2184
|
-
default: b(() => [
|
|
2185
|
-
U(T(I.text), 1)
|
|
2186
|
-
]),
|
|
2187
|
-
_: 2
|
|
2188
|
-
}, 1032, ["type", "size", "onClick"])) : A("", !0)
|
|
2189
|
-
], 64))), 128)),
|
|
2190
|
-
H(z.$slots, "action", { row: w })
|
|
2191
|
-
]),
|
|
2192
|
-
_: 3
|
|
2193
|
-
}, 8, ["label", "width", "fixed", "align"])) : A("", !0)
|
|
2345
|
+
"resolve-dict": a(g).resolvedDict,
|
|
2346
|
+
onSearch: al,
|
|
2347
|
+
onReset: ll,
|
|
2348
|
+
onToggleFold: a(le)
|
|
2349
|
+
}, {
|
|
2350
|
+
"search-action": v(({ params: x }) => [
|
|
2351
|
+
Y(y.$slots, "search-action", { params: x })
|
|
2194
2352
|
]),
|
|
2195
2353
|
_: 3
|
|
2196
|
-
},
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
"current-page": a(E).current,
|
|
2201
|
-
"onUpdate:currentPage": B[6] || (B[6] = (w) => a(E).current = w),
|
|
2202
|
-
"page-size": a(E).pageSize,
|
|
2203
|
-
"onUpdate:pageSize": B[7] || (B[7] = (w) => a(E).pageSize = w),
|
|
2204
|
-
"page-sizes": a(te),
|
|
2205
|
-
total: a(E).total,
|
|
2206
|
-
layout: a(ve),
|
|
2207
|
-
background: a(pe),
|
|
2354
|
+
}, 8, ["show-search", "search-params", "visible-search-fields", "search-cols", "action-col-span", "show-fold-btn", "search-expanded", "size", "resolve-dict", "onToggleFold"]),
|
|
2355
|
+
T(kt, {
|
|
2356
|
+
show: !!ba.value.show,
|
|
2357
|
+
"toolbar-cfg": ba.value,
|
|
2208
2358
|
size: e.size,
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
]),
|
|
2232
|
-
key: "0"
|
|
2233
|
-
} : void 0,
|
|
2234
|
-
z.$slots["edit-form"] ? {
|
|
2235
|
-
name: "edit-form",
|
|
2236
|
-
fn: b((w) => [
|
|
2237
|
-
H(z.$slots, "edit-form", Ze(Je(w)))
|
|
2238
|
-
]),
|
|
2239
|
-
key: "1"
|
|
2240
|
-
} : void 0,
|
|
2241
|
-
z.$slots["view-form"] ? {
|
|
2242
|
-
name: "view-form",
|
|
2243
|
-
fn: b((w) => [
|
|
2244
|
-
H(z.$slots, "view-form", Ze(Je(w)))
|
|
2359
|
+
refreshing: ra.value,
|
|
2360
|
+
deps: {
|
|
2361
|
+
authPass: a(C).authPass,
|
|
2362
|
+
selectionCount: a(j).length,
|
|
2363
|
+
showColumnSetting: !!a(qa),
|
|
2364
|
+
allColumns: a(Ha),
|
|
2365
|
+
checkedColumns: a(Ka),
|
|
2366
|
+
toggleColumn: a(B).toggleColumn,
|
|
2367
|
+
moveColumn: a(B).moveColumn,
|
|
2368
|
+
showIndex: a(ma),
|
|
2369
|
+
toggleIndex: a(B).toggleIndex,
|
|
2370
|
+
selectionVisible: a(ta),
|
|
2371
|
+
toggleSelection: a(B).toggleSelection
|
|
2372
|
+
},
|
|
2373
|
+
onAdd: rl,
|
|
2374
|
+
onImport: S[0] || (S[0] = (x) => y.$emit("import")),
|
|
2375
|
+
onExport: cl,
|
|
2376
|
+
onBatchDelete: dl,
|
|
2377
|
+
onRefresh: fl
|
|
2378
|
+
}, {
|
|
2379
|
+
"toolbar-right": v(() => [
|
|
2380
|
+
Y(y.$slots, "toolbar-right")
|
|
2245
2381
|
]),
|
|
2246
|
-
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
P(a(M), {
|
|
2382
|
+
_: 3
|
|
2383
|
+
}, 8, ["show", "toolbar-cfg", "size", "refreshing", "deps"]),
|
|
2384
|
+
N("div", {
|
|
2385
|
+
class: "ee-table-wrapper",
|
|
2386
|
+
style: Cl(a(Ga))
|
|
2387
|
+
}, [
|
|
2388
|
+
T(a(Da), I({
|
|
2389
|
+
ref_key: "tableRef",
|
|
2390
|
+
ref: P,
|
|
2391
|
+
data: sa.value,
|
|
2392
|
+
loading: el.value,
|
|
2258
2393
|
size: e.size,
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2394
|
+
stripe: e.stripe,
|
|
2395
|
+
border: e.border,
|
|
2396
|
+
height: a(Wa),
|
|
2397
|
+
"max-height": a(ja),
|
|
2398
|
+
"highlight-current-row": e.highlightCurrentRow,
|
|
2399
|
+
"row-key": e.rowKey,
|
|
2400
|
+
onSelectionChange: S[1] || (S[1] = (x) => {
|
|
2401
|
+
a(Xa)(x), y.$emit("selection-change", x);
|
|
2402
|
+
}),
|
|
2403
|
+
onRowClick: S[2] || (S[2] = (x) => y.$emit("row-click", x)),
|
|
2404
|
+
onRowDblclick: S[3] || (S[3] = (x) => y.$emit("row-dblclick", x)),
|
|
2405
|
+
onSortChange: S[4] || (S[4] = (x) => y.$emit("sort-change", x)),
|
|
2406
|
+
onHeaderDragend: S[5] || (S[5] = (x, R, X) => a(B).onColumnResize(x, X))
|
|
2407
|
+
}, gl.value), {
|
|
2408
|
+
empty: v(() => [
|
|
2409
|
+
Y(y.$slots, "empty", {}, () => [
|
|
2410
|
+
T(a(Rl), {
|
|
2411
|
+
description: e.emptyText || a(r)("formTable", "empty")
|
|
2412
|
+
}, null, 8, ["description"])
|
|
2413
|
+
])
|
|
2264
2414
|
]),
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
(
|
|
2275
|
-
key:
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2415
|
+
default: v(() => [
|
|
2416
|
+
a(ma) ? (i(), w(a(we), {
|
|
2417
|
+
key: 0,
|
|
2418
|
+
type: "index",
|
|
2419
|
+
width: "55",
|
|
2420
|
+
fixed: "left",
|
|
2421
|
+
label: a(r)("formTable", "rowIndex"),
|
|
2422
|
+
align: "center"
|
|
2423
|
+
}, null, 8, ["label"])) : L("", !0),
|
|
2424
|
+
a(ce).show && a(ta) && a(ce).type === "multiple" ? (i(), w(a(we), {
|
|
2425
|
+
key: 1,
|
|
2426
|
+
type: "selection",
|
|
2427
|
+
width: "50",
|
|
2428
|
+
fixed: "left",
|
|
2429
|
+
align: "center",
|
|
2430
|
+
selectable: a(ce).disabledRow ? (x) => !a(ce).disabledRow(x) : void 0,
|
|
2431
|
+
"reserve-selection": a(ce).reserveSelection
|
|
2432
|
+
}, null, 8, ["selectable", "reserve-selection"])) : L("", !0),
|
|
2433
|
+
a(ce).show && a(ta) && a(ce).type === "single" ? (i(), w(a(we), {
|
|
2434
|
+
key: 2,
|
|
2435
|
+
width: "50",
|
|
2436
|
+
fixed: "left",
|
|
2437
|
+
align: "center"
|
|
2438
|
+
}, {
|
|
2439
|
+
default: v(({ row: x }) => [
|
|
2440
|
+
T(a(Qe), {
|
|
2441
|
+
"model-value": a(te) === x[e.rowKey || "id"],
|
|
2442
|
+
value: x[e.rowKey || "id"],
|
|
2443
|
+
onChange: () => {
|
|
2444
|
+
a(Ya)(x), y.$emit("selection-change", a(j));
|
|
2445
|
+
}
|
|
2446
|
+
}, null, 8, ["model-value", "value", "onChange"])
|
|
2447
|
+
]),
|
|
2448
|
+
_: 1
|
|
2449
|
+
})) : L("", !0),
|
|
2450
|
+
(i(!0), D(O, null, K(a(la), (x) => (i(), w(a(we), I({
|
|
2451
|
+
key: x.prop,
|
|
2452
|
+
prop: x.prop,
|
|
2453
|
+
label: x.label,
|
|
2454
|
+
width: x.width,
|
|
2455
|
+
"min-width": x.minWidth,
|
|
2456
|
+
fixed: x.fixed,
|
|
2457
|
+
sortable: x.sortable,
|
|
2458
|
+
align: x.align || "center",
|
|
2459
|
+
"show-overflow-tooltip": x.showTooltip,
|
|
2460
|
+
"class-name": x.className
|
|
2461
|
+
}, { ref_for: !0 }, vl(x)), {
|
|
2462
|
+
default: v((R) => [
|
|
2463
|
+
Y(y.$slots, x.slotName || x.prop, {
|
|
2464
|
+
row: R.row,
|
|
2465
|
+
index: R.$index,
|
|
2466
|
+
column: x
|
|
2467
|
+
}, () => [
|
|
2468
|
+
x.formatter ? (i(), D("span", Et, F(x.formatter(R.row, x, R.row[x.prop], R.$index)), 1)) : x.dictKey ? (i(), D("span", Pt, F(a(g).dictLabel(x.dictKey, R.row[x.prop])), 1)) : (i(), D("span", Bt, F(R.row[x.prop] ?? "-"), 1))
|
|
2469
|
+
])
|
|
2470
|
+
]),
|
|
2471
|
+
_: 2
|
|
2472
|
+
}, 1040, ["prop", "label", "width", "min-width", "fixed", "sortable", "align", "show-overflow-tooltip", "class-name"]))), 128)),
|
|
2473
|
+
ee.value.show ? (i(), w(a(we), {
|
|
2474
|
+
key: 3,
|
|
2475
|
+
label: ee.value.label || a(r)("formTable", "operation"),
|
|
2476
|
+
width: _a.value,
|
|
2477
|
+
fixed: ee.value.fixed ?? "right",
|
|
2478
|
+
align: ee.value.align || "center",
|
|
2479
|
+
"class-name": "ee-action-column"
|
|
2480
|
+
}, {
|
|
2481
|
+
default: v(({ row: x }) => [
|
|
2482
|
+
N("span", Ft, [
|
|
2483
|
+
Y(y.$slots, "action-before", { row: x }),
|
|
2484
|
+
(i(!0), D(O, null, K(na(x), (R, X) => (i(), D(O, { key: X }, [
|
|
2485
|
+
X < Ae.value || ia(x) === 1 ? (i(), D(O, { key: 0 }, [
|
|
2486
|
+
R._isDelete && ee.value.confirmDelete !== !1 ? (i(), w(a(El), {
|
|
2487
|
+
key: 0,
|
|
2488
|
+
title: ee.value.deleteConfirmMessage || a(r)("formTable", "confirmDeleteMsg"),
|
|
2489
|
+
"confirm-button-text": a(r)("formTable", "confirm"),
|
|
2490
|
+
"cancel-button-text": a(r)("formTable", "cancel"),
|
|
2491
|
+
onConfirm: R.handler
|
|
2492
|
+
}, {
|
|
2493
|
+
reference: v(() => [
|
|
2494
|
+
T(a(q), {
|
|
2495
|
+
type: R.type || "primary",
|
|
2496
|
+
size: e.size,
|
|
2497
|
+
icon: R.iconComponent,
|
|
2498
|
+
round: Pe.value === "icon",
|
|
2499
|
+
link: "",
|
|
2500
|
+
class: "ee-action-btn"
|
|
2501
|
+
}, {
|
|
2502
|
+
default: v(() => [
|
|
2503
|
+
M(F(Pe.value === "icon" ? "" : R.text), 1)
|
|
2504
|
+
]),
|
|
2505
|
+
_: 2
|
|
2506
|
+
}, 1032, ["type", "size", "icon", "round"])
|
|
2507
|
+
]),
|
|
2508
|
+
_: 2
|
|
2509
|
+
}, 1032, ["title", "confirm-button-text", "cancel-button-text", "onConfirm"])) : (i(), w(a(q), {
|
|
2510
|
+
key: 1,
|
|
2511
|
+
type: R.type || "primary",
|
|
2512
|
+
size: e.size,
|
|
2513
|
+
icon: R.iconComponent,
|
|
2514
|
+
round: Pe.value === "icon",
|
|
2515
|
+
link: "",
|
|
2516
|
+
onClick: R.handler,
|
|
2517
|
+
class: "ee-action-btn"
|
|
2518
|
+
}, {
|
|
2519
|
+
default: v(() => [
|
|
2520
|
+
M(F(Pe.value === "icon" ? "" : R.text), 1)
|
|
2521
|
+
]),
|
|
2522
|
+
_: 2
|
|
2523
|
+
}, 1032, ["type", "size", "icon", "round", "onClick"]))
|
|
2524
|
+
], 64)) : L("", !0)
|
|
2525
|
+
], 64))), 128)),
|
|
2526
|
+
ia(x) > Ae.value ? (i(), w(a(Pl), {
|
|
2527
|
+
key: 0,
|
|
2528
|
+
trigger: "click",
|
|
2529
|
+
size: e.size
|
|
2530
|
+
}, {
|
|
2531
|
+
dropdown: v(() => [
|
|
2532
|
+
T(a(Bl), null, {
|
|
2533
|
+
default: v(() => [
|
|
2534
|
+
(i(!0), D(O, null, K(na(x).slice(Ae.value), (R, X) => (i(), w(a(Fl), {
|
|
2535
|
+
key: X,
|
|
2536
|
+
onClick: (ye) => R._isDelete && ee.value.confirmDelete !== !1 ? ul(x) : R.handler()
|
|
2537
|
+
}, {
|
|
2538
|
+
default: v(() => [
|
|
2539
|
+
M(F(R.text), 1)
|
|
2540
|
+
]),
|
|
2541
|
+
_: 2
|
|
2542
|
+
}, 1032, ["onClick"]))), 128))
|
|
2543
|
+
]),
|
|
2544
|
+
_: 2
|
|
2545
|
+
}, 1024)
|
|
2546
|
+
]),
|
|
2547
|
+
default: v(() => [
|
|
2548
|
+
T(a(q), {
|
|
2549
|
+
size: e.size,
|
|
2550
|
+
link: "",
|
|
2551
|
+
class: "ee-action-btn"
|
|
2552
|
+
}, {
|
|
2553
|
+
default: v(() => [
|
|
2554
|
+
T(a(Oa), null, {
|
|
2555
|
+
default: v(() => [
|
|
2556
|
+
T(a(jl))
|
|
2557
|
+
]),
|
|
2558
|
+
_: 1
|
|
2559
|
+
})
|
|
2560
|
+
]),
|
|
2561
|
+
_: 1
|
|
2562
|
+
}, 8, ["size"])
|
|
2563
|
+
]),
|
|
2564
|
+
_: 2
|
|
2565
|
+
}, 1032, ["size"])) : L("", !0),
|
|
2566
|
+
Y(y.$slots, "action", { row: x })
|
|
2567
|
+
])
|
|
2568
|
+
]),
|
|
2569
|
+
_: 3
|
|
2570
|
+
}, 8, ["label", "width", "fixed", "align"])) : L("", !0)
|
|
2279
2571
|
]),
|
|
2280
|
-
_:
|
|
2281
|
-
},
|
|
2282
|
-
]),
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2572
|
+
_: 3
|
|
2573
|
+
}, 16, ["data", "loading", "size", "stripe", "border", "height", "max-height", "highlight-current-row", "row-key"])
|
|
2574
|
+
], 4),
|
|
2575
|
+
a(pe) ? (i(), D("div", Rt, [
|
|
2576
|
+
T(a(Al), {
|
|
2577
|
+
"current-page": a(G).current,
|
|
2578
|
+
"onUpdate:currentPage": S[6] || (S[6] = (x) => a(G).current = x),
|
|
2579
|
+
"page-size": a(G).pageSize,
|
|
2580
|
+
"onUpdate:pageSize": S[7] || (S[7] = (x) => a(G).pageSize = x),
|
|
2581
|
+
"page-sizes": a(be),
|
|
2582
|
+
total: a(G).total,
|
|
2583
|
+
layout: a(Ve),
|
|
2584
|
+
background: a(ke),
|
|
2585
|
+
size: e.size,
|
|
2586
|
+
onCurrentChange: tl,
|
|
2587
|
+
onSizeChange: ol
|
|
2588
|
+
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout", "background", "size"])
|
|
2589
|
+
])) : L("", !0),
|
|
2590
|
+
T(Tt, {
|
|
2591
|
+
visible: se.value.visible,
|
|
2592
|
+
"drawer-mode": se.value.drawerMode,
|
|
2593
|
+
"form-mode": se.value.formMode,
|
|
2594
|
+
"editing-row": se.value.editingRow,
|
|
2595
|
+
"form-data": se.value.formData,
|
|
2596
|
+
"drawer-cfg": se.value.drawerCfg,
|
|
2597
|
+
columns: a(la),
|
|
2598
|
+
size: e.size,
|
|
2599
|
+
saving: se.value.saving,
|
|
2600
|
+
"dict-map": e.dictMap,
|
|
2601
|
+
"onUpdate:visible": se.value.onVisibleChange,
|
|
2602
|
+
onSave: ml
|
|
2603
|
+
}, Sl({ _: 2 }, [
|
|
2604
|
+
y.$slots["add-form"] ? {
|
|
2605
|
+
name: "add-form",
|
|
2606
|
+
fn: v((x) => [
|
|
2607
|
+
Y(y.$slots, "add-form", ua(da(x)))
|
|
2608
|
+
]),
|
|
2609
|
+
key: "0"
|
|
2610
|
+
} : void 0,
|
|
2611
|
+
y.$slots["edit-form"] ? {
|
|
2612
|
+
name: "edit-form",
|
|
2613
|
+
fn: v((x) => [
|
|
2614
|
+
Y(y.$slots, "edit-form", ua(da(x)))
|
|
2615
|
+
]),
|
|
2616
|
+
key: "1"
|
|
2617
|
+
} : void 0,
|
|
2618
|
+
y.$slots["view-form"] ? {
|
|
2619
|
+
name: "view-form",
|
|
2620
|
+
fn: v((x) => [
|
|
2621
|
+
Y(y.$slots, "view-form", ua(da(x)))
|
|
2622
|
+
]),
|
|
2623
|
+
key: "2"
|
|
2624
|
+
} : void 0
|
|
2625
|
+
]), 1032, ["visible", "drawer-mode", "form-mode", "editing-row", "form-data", "drawer-cfg", "columns", "size", "saving", "dict-map", "onUpdate:visible"]),
|
|
2626
|
+
T($, {
|
|
2627
|
+
modelValue: Re.value,
|
|
2628
|
+
"onUpdate:modelValue": S[9] || (S[9] = (x) => Re.value = x),
|
|
2629
|
+
title: a(r)("formTable", "versionTitle"),
|
|
2630
|
+
width: "700px",
|
|
2631
|
+
"close-on-click-modal": !1
|
|
2632
|
+
}, {
|
|
2633
|
+
footer: v(() => [
|
|
2634
|
+
T(a(q), {
|
|
2635
|
+
size: e.size,
|
|
2636
|
+
round: "",
|
|
2637
|
+
onClick: S[8] || (S[8] = (x) => Re.value = !1)
|
|
2638
|
+
}, {
|
|
2639
|
+
default: v(() => [
|
|
2640
|
+
M(F(a(r)("formTable", "close")), 1)
|
|
2641
|
+
]),
|
|
2642
|
+
_: 1
|
|
2643
|
+
}, 8, ["size"])
|
|
2644
|
+
]),
|
|
2645
|
+
default: v(() => [
|
|
2646
|
+
T(a(Da), {
|
|
2647
|
+
data: Ee.value,
|
|
2648
|
+
border: "",
|
|
2649
|
+
stripe: "",
|
|
2650
|
+
size: "small",
|
|
2651
|
+
"max-height": "400"
|
|
2652
|
+
}, {
|
|
2653
|
+
default: v(() => [
|
|
2654
|
+
(i(!0), D(O, null, K(pa.value, (x) => (i(), w(a(we), {
|
|
2655
|
+
key: x.prop,
|
|
2656
|
+
prop: x.prop,
|
|
2657
|
+
label: x.label,
|
|
2658
|
+
width: x.width
|
|
2659
|
+
}, null, 8, ["prop", "label", "width"]))), 128))
|
|
2660
|
+
]),
|
|
2661
|
+
_: 1
|
|
2662
|
+
}, 8, ["data"])
|
|
2663
|
+
]),
|
|
2664
|
+
_: 1
|
|
2665
|
+
}, 8, ["modelValue", "title"])
|
|
2666
|
+
], 2);
|
|
2667
|
+
};
|
|
2286
2668
|
}
|
|
2287
2669
|
});
|
|
2288
|
-
|
|
2289
|
-
e.component(
|
|
2670
|
+
Le.install = (e) => {
|
|
2671
|
+
e.component(Le.name ?? "EeFormTable", Le);
|
|
2290
2672
|
};
|
|
2291
|
-
const
|
|
2673
|
+
const At = {
|
|
2292
2674
|
key: 1,
|
|
2293
2675
|
class: "ee-no-more"
|
|
2294
|
-
},
|
|
2676
|
+
}, Ut = { class: "ee-loading-tip" }, $t = /* @__PURE__ */ H({
|
|
2295
2677
|
name: "EeRemoteSelect",
|
|
2296
2678
|
__name: "index",
|
|
2297
2679
|
props: {
|
|
@@ -2317,15 +2699,15 @@ const Ol = {
|
|
|
2317
2699
|
},
|
|
2318
2700
|
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
2319
2701
|
setup(e, { emit: l }) {
|
|
2320
|
-
const t = e, r = l, { t: o } =
|
|
2321
|
-
loading:
|
|
2702
|
+
const t = e, r = l, { t: o } = _(), {
|
|
2703
|
+
loading: m,
|
|
2322
2704
|
options: h,
|
|
2323
|
-
noMore:
|
|
2324
|
-
loadData:
|
|
2705
|
+
noMore: u,
|
|
2706
|
+
loadData: C,
|
|
2325
2707
|
loadMore: g,
|
|
2326
|
-
resetList:
|
|
2708
|
+
resetList: b,
|
|
2327
2709
|
onKeywordChange: n
|
|
2328
|
-
} =
|
|
2710
|
+
} = Ze({
|
|
2329
2711
|
apiUrl: t.apiUrl,
|
|
2330
2712
|
pageNumKey: t.pageNumKey,
|
|
2331
2713
|
pageSizeKey: t.pageSizeKey,
|
|
@@ -2335,27 +2717,27 @@ const Ol = {
|
|
|
2335
2717
|
labelField: t.labelField,
|
|
2336
2718
|
valueField: t.valueField
|
|
2337
2719
|
});
|
|
2338
|
-
function d(
|
|
2720
|
+
function d(k) {
|
|
2339
2721
|
return {
|
|
2340
|
-
value:
|
|
2341
|
-
label:
|
|
2342
|
-
disabled:
|
|
2722
|
+
value: k[t.valueField],
|
|
2723
|
+
label: k[t.labelField],
|
|
2724
|
+
disabled: k.disabled ?? !1
|
|
2343
2725
|
};
|
|
2344
2726
|
}
|
|
2345
|
-
const
|
|
2346
|
-
async function p(
|
|
2347
|
-
t.options || await
|
|
2727
|
+
const s = V(() => t.options ? t.options.map(d) : h.value.map(d));
|
|
2728
|
+
async function p(k = !1) {
|
|
2729
|
+
t.options || await C(void 0, !0);
|
|
2348
2730
|
}
|
|
2349
|
-
function
|
|
2350
|
-
|
|
2731
|
+
function c(k) {
|
|
2732
|
+
k && s.value.length === 0 && !t.options && p();
|
|
2351
2733
|
}
|
|
2352
|
-
return
|
|
2734
|
+
return Z(() => {
|
|
2353
2735
|
p();
|
|
2354
|
-
}),
|
|
2355
|
-
|
|
2356
|
-
}), (
|
|
2736
|
+
}), re(() => t.apiUrl, () => {
|
|
2737
|
+
b(), p();
|
|
2738
|
+
}), (k, f) => (i(), w(a(ue), I(k.$attrs, {
|
|
2357
2739
|
"model-value": e.modelValue,
|
|
2358
|
-
loading: a(
|
|
2740
|
+
loading: a(m),
|
|
2359
2741
|
multiple: e.mode === "multiple",
|
|
2360
2742
|
placeholder: e.placeholder,
|
|
2361
2743
|
clearable: e.clearable,
|
|
@@ -2365,45 +2747,45 @@ const Ol = {
|
|
|
2365
2747
|
size: e.size,
|
|
2366
2748
|
remote: !t.options,
|
|
2367
2749
|
"remote-method": t.options ? void 0 : a(n),
|
|
2368
|
-
"onUpdate:modelValue":
|
|
2369
|
-
onChange:
|
|
2370
|
-
onClear:
|
|
2371
|
-
onBlur:
|
|
2372
|
-
onFocus:
|
|
2373
|
-
onVisibleChange:
|
|
2750
|
+
"onUpdate:modelValue": f[1] || (f[1] = (z) => r("update:modelValue", z)),
|
|
2751
|
+
onChange: f[2] || (f[2] = (z) => r("change", z)),
|
|
2752
|
+
onClear: f[3] || (f[3] = (z) => r("clear")),
|
|
2753
|
+
onBlur: f[4] || (f[4] = (z) => r("blur", z)),
|
|
2754
|
+
onFocus: f[5] || (f[5] = (z) => r("focus", z)),
|
|
2755
|
+
onVisibleChange: c
|
|
2374
2756
|
}), {
|
|
2375
|
-
loading:
|
|
2376
|
-
|
|
2377
|
-
|
|
2757
|
+
loading: v(() => [
|
|
2758
|
+
N("div", Ut, [
|
|
2759
|
+
N("span", null, F(a(o)("remoteSelect", "loading")), 1)
|
|
2378
2760
|
])
|
|
2379
2761
|
]),
|
|
2380
|
-
default:
|
|
2381
|
-
(
|
|
2382
|
-
key:
|
|
2383
|
-
label:
|
|
2384
|
-
value:
|
|
2385
|
-
disabled:
|
|
2762
|
+
default: v(() => [
|
|
2763
|
+
(i(!0), D(O, null, K(s.value, (z) => (i(), w(a(de), {
|
|
2764
|
+
key: z.value,
|
|
2765
|
+
label: z.label,
|
|
2766
|
+
value: z.value,
|
|
2767
|
+
disabled: z.disabled
|
|
2386
2768
|
}, null, 8, ["label", "value", "disabled"]))), 128)),
|
|
2387
|
-
!t.options && !a(
|
|
2769
|
+
!t.options && !a(u) && !a(m) && s.value.length > 0 ? (i(), D("div", {
|
|
2388
2770
|
key: 0,
|
|
2389
2771
|
class: "ee-load-more",
|
|
2390
|
-
onClick:
|
|
2391
|
-
(...
|
|
2772
|
+
onClick: f[0] || (f[0] = //@ts-ignore
|
|
2773
|
+
(...z) => a(g) && a(g)(...z))
|
|
2392
2774
|
}, [
|
|
2393
|
-
|
|
2394
|
-
])) :
|
|
2395
|
-
!t.options && a(
|
|
2396
|
-
|
|
2397
|
-
])) :
|
|
2775
|
+
N("span", null, F(a(o)("remoteSelect", "loadMore")), 1)
|
|
2776
|
+
])) : L("", !0),
|
|
2777
|
+
!t.options && a(u) && s.value.length > 0 ? (i(), D("div", At, [
|
|
2778
|
+
N("span", null, F(a(o)("remoteSelect", "noMore")), 1)
|
|
2779
|
+
])) : L("", !0)
|
|
2398
2780
|
]),
|
|
2399
2781
|
_: 1
|
|
2400
2782
|
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote", "remote-method"]));
|
|
2401
2783
|
}
|
|
2402
|
-
}),
|
|
2403
|
-
|
|
2404
|
-
e.component(
|
|
2784
|
+
}), Ne = /* @__PURE__ */ De($t, [["__scopeId", "data-v-21c5d143"]]);
|
|
2785
|
+
Ne.install = (e) => {
|
|
2786
|
+
e.component(Ne.name ?? "EeRemoteSelect", Ne);
|
|
2405
2787
|
};
|
|
2406
|
-
const
|
|
2788
|
+
const Ke = /* @__PURE__ */ H({
|
|
2407
2789
|
name: "EeDeptCascader",
|
|
2408
2790
|
__name: "index",
|
|
2409
2791
|
props: {
|
|
@@ -2424,55 +2806,55 @@ const Ee = /* @__PURE__ */ N({
|
|
|
2424
2806
|
emits: ["update:modelValue", "change", "clear", "blur", "focus", "load-success"],
|
|
2425
2807
|
setup(e, { emit: l }) {
|
|
2426
2808
|
const t = e, r = l;
|
|
2427
|
-
function o(
|
|
2428
|
-
r("update:modelValue",
|
|
2809
|
+
function o(f) {
|
|
2810
|
+
r("update:modelValue", f);
|
|
2429
2811
|
}
|
|
2430
|
-
function f
|
|
2431
|
-
r("change",
|
|
2812
|
+
function m(f) {
|
|
2813
|
+
r("change", f);
|
|
2432
2814
|
}
|
|
2433
2815
|
function h() {
|
|
2434
2816
|
r("clear");
|
|
2435
2817
|
}
|
|
2436
|
-
function
|
|
2437
|
-
r("blur",
|
|
2818
|
+
function u(f) {
|
|
2819
|
+
r("blur", f);
|
|
2438
2820
|
}
|
|
2439
|
-
function
|
|
2440
|
-
r("focus",
|
|
2821
|
+
function C(f) {
|
|
2822
|
+
r("focus", f);
|
|
2441
2823
|
}
|
|
2442
|
-
const g = t.requestInstance ??
|
|
2824
|
+
const g = t.requestInstance ?? he(aa);
|
|
2443
2825
|
if (!g)
|
|
2444
2826
|
throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
|
|
2445
|
-
const
|
|
2827
|
+
const b = g, { t: n } = _(), d = A([]), s = A(!1), p = V(() => ({
|
|
2446
2828
|
label: t.labelField,
|
|
2447
2829
|
value: t.valueField,
|
|
2448
2830
|
children: t.childrenField,
|
|
2449
2831
|
multiple: !1,
|
|
2450
2832
|
checkStrictly: !0
|
|
2451
2833
|
}));
|
|
2452
|
-
async function
|
|
2453
|
-
|
|
2834
|
+
async function c() {
|
|
2835
|
+
s.value = !0;
|
|
2454
2836
|
try {
|
|
2455
|
-
const
|
|
2456
|
-
d.value =
|
|
2457
|
-
} catch (
|
|
2458
|
-
|
|
2837
|
+
const f = { ...t.extraParams || {} }, U = (await b.get(t.deptApiUrl, { params: f })).data, le = Array.isArray(U) ? U : (U == null ? void 0 : U.data) ?? [];
|
|
2838
|
+
d.value = k(le), r("load-success", d.value);
|
|
2839
|
+
} catch (f) {
|
|
2840
|
+
J.error((f == null ? void 0 : f.msg) || (f == null ? void 0 : f.message) || n("remoteSelect", "requestFailed")), d.value = [];
|
|
2459
2841
|
} finally {
|
|
2460
|
-
|
|
2842
|
+
s.value = !1;
|
|
2461
2843
|
}
|
|
2462
2844
|
}
|
|
2463
|
-
function
|
|
2464
|
-
return
|
|
2465
|
-
const
|
|
2466
|
-
...
|
|
2467
|
-
label:
|
|
2468
|
-
value:
|
|
2845
|
+
function k(f) {
|
|
2846
|
+
return f.map((z) => {
|
|
2847
|
+
const U = {
|
|
2848
|
+
...z,
|
|
2849
|
+
label: z[t.labelField] ?? "",
|
|
2850
|
+
value: z[t.valueField] ?? ""
|
|
2469
2851
|
};
|
|
2470
|
-
return
|
|
2852
|
+
return z[t.childrenField] && Array.isArray(z[t.childrenField]) && z[t.childrenField].length > 0 && (U.children = k(z[t.childrenField])), U;
|
|
2471
2853
|
});
|
|
2472
2854
|
}
|
|
2473
|
-
return
|
|
2474
|
-
|
|
2475
|
-
}), (
|
|
2855
|
+
return Z(() => {
|
|
2856
|
+
c();
|
|
2857
|
+
}), (f, z) => (i(), w(a(Ul), I(f.$attrs, {
|
|
2476
2858
|
"model-value": e.modelValue,
|
|
2477
2859
|
options: d.value,
|
|
2478
2860
|
props: p.value,
|
|
@@ -2481,21 +2863,21 @@ const Ee = /* @__PURE__ */ N({
|
|
|
2481
2863
|
disabled: e.disabled,
|
|
2482
2864
|
size: e.size,
|
|
2483
2865
|
"show-all-levels": e.showAllLevels,
|
|
2484
|
-
"onUpdate:modelValue":
|
|
2485
|
-
onChange:
|
|
2486
|
-
onClear:
|
|
2487
|
-
onBlur:
|
|
2488
|
-
onFocus:
|
|
2866
|
+
"onUpdate:modelValue": z[0] || (z[0] = (U) => o(U)),
|
|
2867
|
+
onChange: z[1] || (z[1] = (U) => m(U)),
|
|
2868
|
+
onClear: z[2] || (z[2] = (U) => h()),
|
|
2869
|
+
onBlur: z[3] || (z[3] = (U) => u(U)),
|
|
2870
|
+
onFocus: z[4] || (z[4] = (U) => C(U))
|
|
2489
2871
|
}), null, 16, ["model-value", "options", "props", "placeholder", "clearable", "disabled", "size", "show-all-levels"]));
|
|
2490
2872
|
}
|
|
2491
2873
|
});
|
|
2492
|
-
|
|
2493
|
-
e.component(
|
|
2874
|
+
Ke.install = (e) => {
|
|
2875
|
+
e.component(Ke.name ?? "EeDeptCascader", Ke);
|
|
2494
2876
|
};
|
|
2495
|
-
const
|
|
2877
|
+
const Mt = {
|
|
2496
2878
|
key: 1,
|
|
2497
2879
|
class: "ee-no-more"
|
|
2498
|
-
},
|
|
2880
|
+
}, It = { class: "ee-loading-tip" }, Ot = /* @__PURE__ */ H({
|
|
2499
2881
|
name: "EeUserSelect",
|
|
2500
2882
|
__name: "index",
|
|
2501
2883
|
props: {
|
|
@@ -2518,39 +2900,39 @@ const Nl = {
|
|
|
2518
2900
|
},
|
|
2519
2901
|
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
2520
2902
|
setup(e, { emit: l }) {
|
|
2521
|
-
const t = e, r = l, { t: o } =
|
|
2522
|
-
const
|
|
2523
|
-
return t.deptId !== void 0 && t.deptId !== null && t.deptId !== "" && (
|
|
2903
|
+
const t = e, r = l, { t: o } = _(), m = V(() => {
|
|
2904
|
+
const c = { ...t.extraParams || {} };
|
|
2905
|
+
return t.deptId !== void 0 && t.deptId !== null && t.deptId !== "" && (c.deptId = t.deptId), c;
|
|
2524
2906
|
}), {
|
|
2525
2907
|
loading: h,
|
|
2526
|
-
options:
|
|
2527
|
-
noMore:
|
|
2908
|
+
options: u,
|
|
2909
|
+
noMore: C,
|
|
2528
2910
|
loadData: g,
|
|
2529
|
-
loadMore:
|
|
2911
|
+
loadMore: b,
|
|
2530
2912
|
resetList: n,
|
|
2531
2913
|
onKeywordChange: d
|
|
2532
|
-
} =
|
|
2914
|
+
} = Ze({
|
|
2533
2915
|
apiUrl: t.apiUrl,
|
|
2534
2916
|
pageSizeKey: "pageSize",
|
|
2535
2917
|
pageNumKey: "pageNum",
|
|
2536
2918
|
pageSize: 20,
|
|
2537
2919
|
searchKey: t.searchKey,
|
|
2538
|
-
extraParams:
|
|
2920
|
+
extraParams: m.value,
|
|
2539
2921
|
labelField: t.labelField,
|
|
2540
2922
|
valueField: t.valueField
|
|
2541
|
-
}),
|
|
2542
|
-
value:
|
|
2543
|
-
label:
|
|
2544
|
-
disabled:
|
|
2923
|
+
}), s = V(() => u.value.map((c) => ({
|
|
2924
|
+
value: c[t.valueField],
|
|
2925
|
+
label: c[t.labelField],
|
|
2926
|
+
disabled: c.disabled ?? !1
|
|
2545
2927
|
})));
|
|
2546
|
-
function p(
|
|
2547
|
-
|
|
2928
|
+
function p(c) {
|
|
2929
|
+
c && s.value.length === 0 && g(void 0, !0);
|
|
2548
2930
|
}
|
|
2549
|
-
return
|
|
2931
|
+
return Z(() => {
|
|
2550
2932
|
g(void 0, !0);
|
|
2551
|
-
}),
|
|
2933
|
+
}), re(() => t.deptId, () => {
|
|
2552
2934
|
n(), g(void 0, !0);
|
|
2553
|
-
}), (
|
|
2935
|
+
}), (c, k) => (i(), w(a(ue), I(c.$attrs, {
|
|
2554
2936
|
"model-value": e.modelValue,
|
|
2555
2937
|
loading: a(h),
|
|
2556
2938
|
multiple: e.mode === "multiple",
|
|
@@ -2562,48 +2944,48 @@ const Nl = {
|
|
|
2562
2944
|
size: e.size,
|
|
2563
2945
|
remote: !0,
|
|
2564
2946
|
"remote-method": a(d),
|
|
2565
|
-
"onUpdate:modelValue":
|
|
2566
|
-
onChange:
|
|
2567
|
-
onClear:
|
|
2568
|
-
onBlur:
|
|
2569
|
-
onFocus:
|
|
2947
|
+
"onUpdate:modelValue": k[1] || (k[1] = (f) => r("update:modelValue", f)),
|
|
2948
|
+
onChange: k[2] || (k[2] = (f) => r("change", f)),
|
|
2949
|
+
onClear: k[3] || (k[3] = (f) => r("clear")),
|
|
2950
|
+
onBlur: k[4] || (k[4] = (f) => r("blur", f)),
|
|
2951
|
+
onFocus: k[5] || (k[5] = (f) => r("focus", f)),
|
|
2570
2952
|
onVisibleChange: p
|
|
2571
2953
|
}), {
|
|
2572
|
-
loading:
|
|
2573
|
-
|
|
2574
|
-
|
|
2954
|
+
loading: v(() => [
|
|
2955
|
+
N("div", It, [
|
|
2956
|
+
N("span", null, F(a(o)("remoteSelect", "loading")), 1)
|
|
2575
2957
|
])
|
|
2576
2958
|
]),
|
|
2577
|
-
default:
|
|
2578
|
-
(
|
|
2579
|
-
key:
|
|
2580
|
-
label:
|
|
2581
|
-
value:
|
|
2582
|
-
disabled:
|
|
2959
|
+
default: v(() => [
|
|
2960
|
+
(i(!0), D(O, null, K(s.value, (f) => (i(), w(a(de), {
|
|
2961
|
+
key: f.value,
|
|
2962
|
+
label: f.label,
|
|
2963
|
+
value: f.value,
|
|
2964
|
+
disabled: f.disabled
|
|
2583
2965
|
}, null, 8, ["label", "value", "disabled"]))), 128)),
|
|
2584
|
-
!a(
|
|
2966
|
+
!a(C) && !a(h) && s.value.length > 0 ? (i(), D("div", {
|
|
2585
2967
|
key: 0,
|
|
2586
2968
|
class: "ee-load-more",
|
|
2587
|
-
onClick:
|
|
2588
|
-
(...
|
|
2969
|
+
onClick: k[0] || (k[0] = //@ts-ignore
|
|
2970
|
+
(...f) => a(b) && a(b)(...f))
|
|
2589
2971
|
}, [
|
|
2590
|
-
|
|
2591
|
-
])) :
|
|
2592
|
-
a(
|
|
2593
|
-
|
|
2594
|
-
])) :
|
|
2972
|
+
N("span", null, F(a(o)("remoteSelect", "loadMore")), 1)
|
|
2973
|
+
])) : L("", !0),
|
|
2974
|
+
a(C) && s.value.length > 0 ? (i(), D("div", Mt, [
|
|
2975
|
+
N("span", null, F(a(o)("remoteSelect", "noMore")), 1)
|
|
2976
|
+
])) : L("", !0)
|
|
2595
2977
|
]),
|
|
2596
2978
|
_: 1
|
|
2597
2979
|
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote-method"]));
|
|
2598
2980
|
}
|
|
2599
|
-
}),
|
|
2600
|
-
|
|
2601
|
-
e.component(
|
|
2981
|
+
}), qe = /* @__PURE__ */ De(Ot, [["__scopeId", "data-v-6e78b80d"]]);
|
|
2982
|
+
qe.install = (e) => {
|
|
2983
|
+
e.component(qe.name ?? "EeUserSelect", qe);
|
|
2602
2984
|
};
|
|
2603
|
-
const
|
|
2985
|
+
const Lt = {
|
|
2604
2986
|
key: 1,
|
|
2605
2987
|
class: "ee-no-more"
|
|
2606
|
-
},
|
|
2988
|
+
}, Nt = { class: "ee-loading-tip" }, Kt = /* @__PURE__ */ H({
|
|
2607
2989
|
name: "EeRoleSelect",
|
|
2608
2990
|
__name: "index",
|
|
2609
2991
|
props: {
|
|
@@ -2625,14 +3007,14 @@ const Hl = {
|
|
|
2625
3007
|
},
|
|
2626
3008
|
emits: ["update:modelValue", "change", "clear", "blur", "focus", "search", "load-success"],
|
|
2627
3009
|
setup(e, { emit: l }) {
|
|
2628
|
-
const t = e, r = l, { t: o } =
|
|
2629
|
-
loading:
|
|
3010
|
+
const t = e, r = l, { t: o } = _(), {
|
|
3011
|
+
loading: m,
|
|
2630
3012
|
options: h,
|
|
2631
|
-
noMore:
|
|
2632
|
-
loadData:
|
|
3013
|
+
noMore: u,
|
|
3014
|
+
loadData: C,
|
|
2633
3015
|
loadMore: g,
|
|
2634
|
-
onKeywordChange:
|
|
2635
|
-
} =
|
|
3016
|
+
onKeywordChange: b
|
|
3017
|
+
} = Ze({
|
|
2636
3018
|
apiUrl: t.apiUrl,
|
|
2637
3019
|
pageSizeKey: "pageSize",
|
|
2638
3020
|
pageNumKey: "pageNum",
|
|
@@ -2641,19 +3023,19 @@ const Hl = {
|
|
|
2641
3023
|
extraParams: t.extraParams,
|
|
2642
3024
|
labelField: t.labelField,
|
|
2643
3025
|
valueField: t.valueField
|
|
2644
|
-
}), n =
|
|
2645
|
-
value:
|
|
2646
|
-
label:
|
|
2647
|
-
disabled:
|
|
3026
|
+
}), n = V(() => h.value.map((s) => ({
|
|
3027
|
+
value: s[t.valueField],
|
|
3028
|
+
label: s[t.labelField],
|
|
3029
|
+
disabled: s.disabled ?? !1
|
|
2648
3030
|
})));
|
|
2649
|
-
function d(
|
|
2650
|
-
|
|
3031
|
+
function d(s) {
|
|
3032
|
+
s && n.value.length === 0 && C(void 0, !0);
|
|
2651
3033
|
}
|
|
2652
|
-
return
|
|
2653
|
-
|
|
2654
|
-
}), (
|
|
3034
|
+
return Z(() => {
|
|
3035
|
+
C(void 0, !0);
|
|
3036
|
+
}), (s, p) => (i(), w(a(ue), I(s.$attrs, {
|
|
2655
3037
|
"model-value": e.modelValue,
|
|
2656
|
-
loading: a(
|
|
3038
|
+
loading: a(m),
|
|
2657
3039
|
multiple: e.mode === "multiple",
|
|
2658
3040
|
placeholder: e.placeholder,
|
|
2659
3041
|
clearable: e.clearable,
|
|
@@ -2662,46 +3044,46 @@ const Hl = {
|
|
|
2662
3044
|
filterable: e.filterable,
|
|
2663
3045
|
size: e.size,
|
|
2664
3046
|
remote: !0,
|
|
2665
|
-
"remote-method": a(
|
|
2666
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
2667
|
-
onChange: p[2] || (p[2] = (
|
|
2668
|
-
onClear: p[3] || (p[3] = (
|
|
2669
|
-
onBlur: p[4] || (p[4] = (
|
|
2670
|
-
onFocus: p[5] || (p[5] = (
|
|
3047
|
+
"remote-method": a(b),
|
|
3048
|
+
"onUpdate:modelValue": p[1] || (p[1] = (c) => r("update:modelValue", c)),
|
|
3049
|
+
onChange: p[2] || (p[2] = (c) => r("change", c)),
|
|
3050
|
+
onClear: p[3] || (p[3] = (c) => r("clear")),
|
|
3051
|
+
onBlur: p[4] || (p[4] = (c) => r("blur", c)),
|
|
3052
|
+
onFocus: p[5] || (p[5] = (c) => r("focus", c)),
|
|
2671
3053
|
onVisibleChange: d
|
|
2672
3054
|
}), {
|
|
2673
|
-
loading:
|
|
2674
|
-
|
|
2675
|
-
|
|
3055
|
+
loading: v(() => [
|
|
3056
|
+
N("div", Nt, [
|
|
3057
|
+
N("span", null, F(a(o)("remoteSelect", "loading")), 1)
|
|
2676
3058
|
])
|
|
2677
3059
|
]),
|
|
2678
|
-
default:
|
|
2679
|
-
(
|
|
2680
|
-
key:
|
|
2681
|
-
label:
|
|
2682
|
-
value:
|
|
2683
|
-
disabled:
|
|
3060
|
+
default: v(() => [
|
|
3061
|
+
(i(!0), D(O, null, K(n.value, (c) => (i(), w(a(de), {
|
|
3062
|
+
key: c.value,
|
|
3063
|
+
label: c.label,
|
|
3064
|
+
value: c.value,
|
|
3065
|
+
disabled: c.disabled
|
|
2684
3066
|
}, null, 8, ["label", "value", "disabled"]))), 128)),
|
|
2685
|
-
!a(
|
|
3067
|
+
!a(u) && !a(m) && n.value.length > 0 ? (i(), D("div", {
|
|
2686
3068
|
key: 0,
|
|
2687
3069
|
class: "ee-load-more",
|
|
2688
3070
|
onClick: p[0] || (p[0] = //@ts-ignore
|
|
2689
|
-
(...
|
|
3071
|
+
(...c) => a(g) && a(g)(...c))
|
|
2690
3072
|
}, [
|
|
2691
|
-
|
|
2692
|
-
])) :
|
|
2693
|
-
a(
|
|
2694
|
-
|
|
2695
|
-
])) :
|
|
3073
|
+
N("span", null, F(a(o)("remoteSelect", "loadMore")), 1)
|
|
3074
|
+
])) : L("", !0),
|
|
3075
|
+
a(u) && n.value.length > 0 ? (i(), D("div", Lt, [
|
|
3076
|
+
N("span", null, F(a(o)("remoteSelect", "noMore")), 1)
|
|
3077
|
+
])) : L("", !0)
|
|
2696
3078
|
]),
|
|
2697
3079
|
_: 1
|
|
2698
3080
|
}, 16, ["model-value", "loading", "multiple", "placeholder", "clearable", "disabled", "readonly", "filterable", "size", "remote-method"]));
|
|
2699
3081
|
}
|
|
2700
|
-
}),
|
|
2701
|
-
|
|
2702
|
-
e.component(
|
|
3082
|
+
}), He = /* @__PURE__ */ De(Kt, [["__scopeId", "data-v-58cd12c9"]]);
|
|
3083
|
+
He.install = (e) => {
|
|
3084
|
+
e.component(He.name ?? "EeRoleSelect", He);
|
|
2703
3085
|
};
|
|
2704
|
-
const
|
|
3086
|
+
const qt = [
|
|
2705
3087
|
"#409eff",
|
|
2706
3088
|
"#67c23a",
|
|
2707
3089
|
"#e6a23c",
|
|
@@ -2712,18 +3094,18 @@ const Gl = [
|
|
|
2712
3094
|
"#06b6d4",
|
|
2713
3095
|
"#f97316",
|
|
2714
3096
|
"#6366f1"
|
|
2715
|
-
],
|
|
2716
|
-
color:
|
|
3097
|
+
], me = "PingFang SC, Microsoft YaHei, sans-serif", _e = {
|
|
3098
|
+
color: qt,
|
|
2717
3099
|
title: {
|
|
2718
3100
|
textStyle: {
|
|
2719
3101
|
fontSize: 16,
|
|
2720
3102
|
fontWeight: 600,
|
|
2721
|
-
fontFamily:
|
|
3103
|
+
fontFamily: me,
|
|
2722
3104
|
color: "#303133"
|
|
2723
3105
|
},
|
|
2724
3106
|
subtextStyle: {
|
|
2725
3107
|
fontSize: 12,
|
|
2726
|
-
fontFamily:
|
|
3108
|
+
fontFamily: me,
|
|
2727
3109
|
color: "#909399"
|
|
2728
3110
|
},
|
|
2729
3111
|
left: 0,
|
|
@@ -2737,7 +3119,7 @@ const Gl = [
|
|
|
2737
3119
|
padding: [8, 12],
|
|
2738
3120
|
textStyle: {
|
|
2739
3121
|
fontSize: 12,
|
|
2740
|
-
fontFamily:
|
|
3122
|
+
fontFamily: me,
|
|
2741
3123
|
color: "#303133"
|
|
2742
3124
|
},
|
|
2743
3125
|
extraCssText: "box-shadow: 0 2px 12px rgba(0,0,0,0.1);"
|
|
@@ -2750,7 +3132,7 @@ const Gl = [
|
|
|
2750
3132
|
itemHeight: 10,
|
|
2751
3133
|
textStyle: {
|
|
2752
3134
|
fontSize: 12,
|
|
2753
|
-
fontFamily:
|
|
3135
|
+
fontFamily: me,
|
|
2754
3136
|
color: "#606266"
|
|
2755
3137
|
}
|
|
2756
3138
|
},
|
|
@@ -2775,7 +3157,7 @@ const Gl = [
|
|
|
2775
3157
|
},
|
|
2776
3158
|
axisLabel: {
|
|
2777
3159
|
fontSize: 11,
|
|
2778
|
-
fontFamily:
|
|
3160
|
+
fontFamily: me,
|
|
2779
3161
|
color: "#909399"
|
|
2780
3162
|
},
|
|
2781
3163
|
splitLine: {
|
|
@@ -2792,7 +3174,7 @@ const Gl = [
|
|
|
2792
3174
|
},
|
|
2793
3175
|
axisLabel: {
|
|
2794
3176
|
fontSize: 11,
|
|
2795
|
-
fontFamily:
|
|
3177
|
+
fontFamily: me,
|
|
2796
3178
|
color: "#909399"
|
|
2797
3179
|
},
|
|
2798
3180
|
splitLine: {
|
|
@@ -2821,7 +3203,7 @@ const Gl = [
|
|
|
2821
3203
|
pie: {
|
|
2822
3204
|
label: {
|
|
2823
3205
|
fontSize: 12,
|
|
2824
|
-
fontFamily:
|
|
3206
|
+
fontFamily: me,
|
|
2825
3207
|
color: "#606266"
|
|
2826
3208
|
},
|
|
2827
3209
|
labelLine: {
|
|
@@ -2839,65 +3221,65 @@ const Gl = [
|
|
|
2839
3221
|
}
|
|
2840
3222
|
}
|
|
2841
3223
|
}
|
|
2842
|
-
},
|
|
3224
|
+
}, Ht = {
|
|
2843
3225
|
text: "数据加载中...",
|
|
2844
3226
|
color: "#409eff",
|
|
2845
3227
|
textColor: "#909399",
|
|
2846
3228
|
maskColor: "rgba(255, 255, 255, 0.8)",
|
|
2847
3229
|
fontSize: 13
|
|
2848
3230
|
};
|
|
2849
|
-
function
|
|
3231
|
+
function ae(e, l) {
|
|
2850
3232
|
if (!l) return e;
|
|
2851
3233
|
const t = { ...e };
|
|
2852
3234
|
for (const r of Object.keys(l)) {
|
|
2853
3235
|
const o = l[r];
|
|
2854
|
-
o != null && (Array.isArray(o) || Array.isArray(t[r]) ? t[r] = o : typeof o == "object" && typeof t[r] == "object" ? t[r] =
|
|
3236
|
+
o != null && (Array.isArray(o) || Array.isArray(t[r]) ? t[r] = o : typeof o == "object" && typeof t[r] == "object" ? t[r] = ae(t[r], o) : t[r] = o);
|
|
2855
3237
|
}
|
|
2856
3238
|
return t;
|
|
2857
3239
|
}
|
|
2858
|
-
function
|
|
2859
|
-
const t =
|
|
2860
|
-
let o = null,
|
|
3240
|
+
function ea(e, l = {}) {
|
|
3241
|
+
const t = xl(), r = A(!1);
|
|
3242
|
+
let o = null, m = null;
|
|
2861
3243
|
function h() {
|
|
2862
|
-
e.value && (t.value && t.value.dispose(), t.value =
|
|
3244
|
+
e.value && (t.value && t.value.dispose(), t.value = $l.init(e.value), r.value = !0);
|
|
2863
3245
|
}
|
|
2864
|
-
function
|
|
2865
|
-
t.value && t.value.setOption(d, { notMerge:
|
|
3246
|
+
function u(d, s = !1) {
|
|
3247
|
+
t.value && t.value.setOption(d, { notMerge: s });
|
|
2866
3248
|
}
|
|
2867
|
-
function
|
|
2868
|
-
|
|
3249
|
+
function C() {
|
|
3250
|
+
m && clearTimeout(m), m = setTimeout(() => {
|
|
2869
3251
|
var d;
|
|
2870
3252
|
(d = t.value) == null || d.resize();
|
|
2871
3253
|
}, 200);
|
|
2872
3254
|
}
|
|
2873
3255
|
function g() {
|
|
2874
3256
|
var d;
|
|
2875
|
-
(d = t.value) == null || d.showLoading("default",
|
|
3257
|
+
(d = t.value) == null || d.showLoading("default", Ht);
|
|
2876
3258
|
}
|
|
2877
|
-
function
|
|
3259
|
+
function b() {
|
|
2878
3260
|
var d;
|
|
2879
3261
|
(d = t.value) == null || d.hideLoading();
|
|
2880
3262
|
}
|
|
2881
3263
|
function n() {
|
|
2882
|
-
o && (o.disconnect(), o = null),
|
|
3264
|
+
o && (o.disconnect(), o = null), m && (clearTimeout(m), m = null), t.value && (t.value.dispose(), t.value = void 0), r.value = !1;
|
|
2883
3265
|
}
|
|
2884
|
-
return
|
|
2885
|
-
|
|
2886
|
-
h(), l.isAutoResize !== !1 && e.value && (o = new ResizeObserver(() =>
|
|
3266
|
+
return Z(() => {
|
|
3267
|
+
Fe(() => {
|
|
3268
|
+
h(), l.isAutoResize !== !1 && e.value && (o = new ResizeObserver(() => C()), o.observe(e.value));
|
|
2887
3269
|
});
|
|
2888
|
-
}),
|
|
3270
|
+
}), zl(() => {
|
|
2889
3271
|
n();
|
|
2890
3272
|
}), {
|
|
2891
3273
|
instance: t,
|
|
2892
3274
|
isReady: r,
|
|
2893
|
-
setOption:
|
|
2894
|
-
handleResize:
|
|
3275
|
+
setOption: u,
|
|
3276
|
+
handleResize: C,
|
|
2895
3277
|
showLoading: g,
|
|
2896
|
-
hideLoading:
|
|
3278
|
+
hideLoading: b,
|
|
2897
3279
|
destroy: n
|
|
2898
3280
|
};
|
|
2899
3281
|
}
|
|
2900
|
-
const
|
|
3282
|
+
const We = /* @__PURE__ */ H({
|
|
2901
3283
|
name: "EeBaseBar",
|
|
2902
3284
|
__name: "index",
|
|
2903
3285
|
props: {
|
|
@@ -2914,43 +3296,43 @@ const Fe = /* @__PURE__ */ N({
|
|
|
2914
3296
|
isAutoResize: { type: Boolean, default: !0 }
|
|
2915
3297
|
},
|
|
2916
3298
|
setup(e) {
|
|
2917
|
-
const l = e, t =
|
|
3299
|
+
const l = e, t = A(), { isReady: r, setOption: o, showLoading: m, hideLoading: h } = ea(t, {
|
|
2918
3300
|
isAutoResize: l.isAutoResize
|
|
2919
|
-
}),
|
|
3301
|
+
}), u = V(() => l.seriesData.map((g) => ({
|
|
2920
3302
|
name: g.name,
|
|
2921
3303
|
type: "bar",
|
|
2922
3304
|
data: g.data,
|
|
2923
3305
|
barWidth: l.barWidth,
|
|
2924
3306
|
stack: l.isStack ? "total" : g.stack || void 0,
|
|
2925
3307
|
itemStyle: g.color ? { color: g.color } : void 0
|
|
2926
|
-
}))),
|
|
2927
|
-
let g =
|
|
2928
|
-
return g =
|
|
3308
|
+
}))), C = V(() => {
|
|
3309
|
+
let g = ae({}, _e);
|
|
3310
|
+
return g = ae(g, {
|
|
2929
3311
|
tooltip: { show: l.tooltipShow, trigger: "axis" },
|
|
2930
|
-
legend: { show: l.legendShow, data: l.seriesData.map((
|
|
3312
|
+
legend: { show: l.legendShow, data: l.seriesData.map((b) => b.name) },
|
|
2931
3313
|
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
2932
3314
|
grid: { top: l.title ? 70 : 40 },
|
|
2933
3315
|
xAxis: { data: l.xAxisData },
|
|
2934
|
-
series:
|
|
2935
|
-
}), l.extraOption && (g =
|
|
3316
|
+
series: u.value
|
|
3317
|
+
}), l.extraOption && (g = ae(g, l.extraOption)), g;
|
|
2936
3318
|
});
|
|
2937
|
-
return
|
|
3319
|
+
return re(C, (g) => {
|
|
2938
3320
|
r.value && o(g, !0);
|
|
2939
|
-
}, { deep: !0 }),
|
|
2940
|
-
|
|
2941
|
-
(l.xAxisData.length > 0 || l.seriesData.length > 0) && o(
|
|
3321
|
+
}, { deep: !0 }), Z(() => {
|
|
3322
|
+
Fe(() => {
|
|
3323
|
+
(l.xAxisData.length > 0 || l.seriesData.length > 0) && o(C.value, !0);
|
|
2942
3324
|
});
|
|
2943
|
-
}), (g,
|
|
3325
|
+
}), (g, b) => (i(), D("div", I({
|
|
2944
3326
|
ref_key: "chartRef",
|
|
2945
3327
|
ref: t,
|
|
2946
3328
|
style: { width: e.width, height: e.height }
|
|
2947
3329
|
}, g.$attrs), null, 16));
|
|
2948
3330
|
}
|
|
2949
3331
|
});
|
|
2950
|
-
|
|
2951
|
-
e.component(
|
|
3332
|
+
We.install = (e) => {
|
|
3333
|
+
e.component(We.name ?? "EeBaseBar", We);
|
|
2952
3334
|
};
|
|
2953
|
-
const
|
|
3335
|
+
const je = /* @__PURE__ */ H({
|
|
2954
3336
|
name: "EeBaseLine",
|
|
2955
3337
|
__name: "index",
|
|
2956
3338
|
props: {
|
|
@@ -2968,47 +3350,47 @@ const Re = /* @__PURE__ */ N({
|
|
|
2968
3350
|
isAutoResize: { type: Boolean, default: !0 }
|
|
2969
3351
|
},
|
|
2970
3352
|
setup(e) {
|
|
2971
|
-
const l = e, t =
|
|
3353
|
+
const l = e, t = A(), { isReady: r, setOption: o } = ea(t, {
|
|
2972
3354
|
isAutoResize: l.isAutoResize
|
|
2973
|
-
}),
|
|
2974
|
-
name:
|
|
3355
|
+
}), m = V(() => l.seriesData.map((u) => ({
|
|
3356
|
+
name: u.name,
|
|
2975
3357
|
type: "line",
|
|
2976
|
-
data:
|
|
3358
|
+
data: u.data,
|
|
2977
3359
|
smooth: l.isSmooth,
|
|
2978
3360
|
showSymbol: l.showSymbol,
|
|
2979
3361
|
symbol: "circle",
|
|
2980
3362
|
symbolSize: 6,
|
|
2981
|
-
lineStyle:
|
|
2982
|
-
itemStyle:
|
|
3363
|
+
lineStyle: u.color ? { color: u.color } : void 0,
|
|
3364
|
+
itemStyle: u.color ? { color: u.color } : void 0,
|
|
2983
3365
|
areaStyle: l.isArea ? { opacity: 0.15 } : void 0
|
|
2984
|
-
}))), h =
|
|
2985
|
-
let
|
|
2986
|
-
return
|
|
3366
|
+
}))), h = V(() => {
|
|
3367
|
+
let u = ae({}, _e);
|
|
3368
|
+
return u = ae(u, {
|
|
2987
3369
|
tooltip: { show: l.tooltipShow, trigger: "axis" },
|
|
2988
|
-
legend: { show: l.legendShow, data: l.seriesData.map((
|
|
3370
|
+
legend: { show: l.legendShow, data: l.seriesData.map((C) => C.name) },
|
|
2989
3371
|
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
2990
3372
|
grid: { top: l.title ? 70 : 40 },
|
|
2991
3373
|
xAxis: { data: l.xAxisData },
|
|
2992
|
-
series:
|
|
2993
|
-
}), l.extraOption && (
|
|
3374
|
+
series: m.value
|
|
3375
|
+
}), l.extraOption && (u = ae(u, l.extraOption)), u;
|
|
2994
3376
|
});
|
|
2995
|
-
return
|
|
2996
|
-
r.value && o(
|
|
2997
|
-
}, { deep: !0 }),
|
|
2998
|
-
|
|
3377
|
+
return re(h, (u) => {
|
|
3378
|
+
r.value && o(u, !0);
|
|
3379
|
+
}, { deep: !0 }), Z(() => {
|
|
3380
|
+
Fe(() => {
|
|
2999
3381
|
(l.xAxisData.length > 0 || l.seriesData.length > 0) && o(h.value, !0);
|
|
3000
3382
|
});
|
|
3001
|
-
}), (
|
|
3383
|
+
}), (u, C) => (i(), D("div", I({
|
|
3002
3384
|
ref_key: "chartRef",
|
|
3003
3385
|
ref: t,
|
|
3004
3386
|
style: { width: e.width, height: e.height }
|
|
3005
|
-
},
|
|
3387
|
+
}, u.$attrs), null, 16));
|
|
3006
3388
|
}
|
|
3007
3389
|
});
|
|
3008
|
-
|
|
3009
|
-
e.component(
|
|
3390
|
+
je.install = (e) => {
|
|
3391
|
+
e.component(je.name ?? "EeBaseLine", je);
|
|
3010
3392
|
};
|
|
3011
|
-
const
|
|
3393
|
+
const Ge = /* @__PURE__ */ H({
|
|
3012
3394
|
name: "EeBasePie",
|
|
3013
3395
|
__name: "index",
|
|
3014
3396
|
props: {
|
|
@@ -3025,11 +3407,11 @@ const Ue = /* @__PURE__ */ N({
|
|
|
3025
3407
|
isAutoResize: { type: Boolean, default: !0 }
|
|
3026
3408
|
},
|
|
3027
3409
|
setup(e) {
|
|
3028
|
-
const l = e, t =
|
|
3410
|
+
const l = e, t = A(), { isReady: r, setOption: o } = ea(t, {
|
|
3029
3411
|
isAutoResize: l.isAutoResize
|
|
3030
|
-
}),
|
|
3031
|
-
let
|
|
3032
|
-
return
|
|
3412
|
+
}), m = V(() => l.radius ? l.radius : l.isRing ? ["40%", "60%"] : ["0%", "60%"]), h = V(() => {
|
|
3413
|
+
let u = ae({}, _e);
|
|
3414
|
+
return u = ae(u, {
|
|
3033
3415
|
tooltip: { show: l.tooltipShow, trigger: "item" },
|
|
3034
3416
|
legend: { show: l.legendShow, top: "bottom" },
|
|
3035
3417
|
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
@@ -3038,7 +3420,7 @@ const Ue = /* @__PURE__ */ N({
|
|
|
3038
3420
|
yAxis: void 0,
|
|
3039
3421
|
series: [{
|
|
3040
3422
|
type: "pie",
|
|
3041
|
-
radius:
|
|
3423
|
+
radius: m.value,
|
|
3042
3424
|
center: ["50%", "50%"],
|
|
3043
3425
|
data: l.pieData,
|
|
3044
3426
|
label: { show: l.labelShow },
|
|
@@ -3050,25 +3432,25 @@ const Ue = /* @__PURE__ */ N({
|
|
|
3050
3432
|
}
|
|
3051
3433
|
}
|
|
3052
3434
|
}]
|
|
3053
|
-
}), l.extraOption && (
|
|
3435
|
+
}), l.extraOption && (u = ae(u, l.extraOption)), u;
|
|
3054
3436
|
});
|
|
3055
|
-
return
|
|
3056
|
-
r.value && o(
|
|
3057
|
-
}, { deep: !0 }),
|
|
3058
|
-
|
|
3437
|
+
return re(h, (u) => {
|
|
3438
|
+
r.value && o(u, !0);
|
|
3439
|
+
}, { deep: !0 }), Z(() => {
|
|
3440
|
+
Fe(() => {
|
|
3059
3441
|
l.pieData.length > 0 && o(h.value, !0);
|
|
3060
3442
|
});
|
|
3061
|
-
}), (
|
|
3443
|
+
}), (u, C) => (i(), D("div", I({
|
|
3062
3444
|
ref_key: "chartRef",
|
|
3063
3445
|
ref: t,
|
|
3064
3446
|
style: { width: e.width, height: e.height }
|
|
3065
|
-
},
|
|
3447
|
+
}, u.$attrs), null, 16));
|
|
3066
3448
|
}
|
|
3067
3449
|
});
|
|
3068
|
-
|
|
3069
|
-
e.component(
|
|
3450
|
+
Ge.install = (e) => {
|
|
3451
|
+
e.component(Ge.name ?? "EeBasePie", Ge);
|
|
3070
3452
|
};
|
|
3071
|
-
const
|
|
3453
|
+
const Xe = /* @__PURE__ */ H({
|
|
3072
3454
|
name: "EeBaseRadar",
|
|
3073
3455
|
__name: "index",
|
|
3074
3456
|
props: {
|
|
@@ -3084,21 +3466,21 @@ const Ae = /* @__PURE__ */ N({
|
|
|
3084
3466
|
isAutoResize: { type: Boolean, default: !0 }
|
|
3085
3467
|
},
|
|
3086
3468
|
setup(e) {
|
|
3087
|
-
const l = e, t =
|
|
3469
|
+
const l = e, t = A(), { isReady: r, setOption: o } = ea(t, {
|
|
3088
3470
|
isAutoResize: l.isAutoResize
|
|
3089
|
-
}),
|
|
3090
|
-
name:
|
|
3471
|
+
}), m = V(() => l.seriesData.map((u) => ({
|
|
3472
|
+
name: u.name,
|
|
3091
3473
|
type: "radar",
|
|
3092
|
-
data: [
|
|
3474
|
+
data: [u.value],
|
|
3093
3475
|
symbol: "none",
|
|
3094
|
-
lineStyle:
|
|
3095
|
-
itemStyle:
|
|
3476
|
+
lineStyle: u.color ? { color: u.color } : void 0,
|
|
3477
|
+
itemStyle: u.color ? { color: u.color } : void 0,
|
|
3096
3478
|
areaStyle: l.isFill ? { opacity: 0.15 } : void 0
|
|
3097
|
-
}))), h =
|
|
3098
|
-
let
|
|
3099
|
-
return
|
|
3479
|
+
}))), h = V(() => {
|
|
3480
|
+
let u = ae({}, _e);
|
|
3481
|
+
return u = ae(u, {
|
|
3100
3482
|
tooltip: { show: l.tooltipShow, trigger: "item" },
|
|
3101
|
-
legend: { show: l.legendShow, data: l.seriesData.map((
|
|
3483
|
+
legend: { show: l.legendShow, data: l.seriesData.map((C) => C.name) },
|
|
3102
3484
|
title: l.title ? { text: l.title, show: !0 } : { show: !1 },
|
|
3103
3485
|
grid: void 0,
|
|
3104
3486
|
xAxis: void 0,
|
|
@@ -3114,31 +3496,31 @@ const Ae = /* @__PURE__ */ N({
|
|
|
3114
3496
|
splitArea: { areaStyle: { color: ["rgba(64,158,255,0.02)", "rgba(64,158,255,0.05)"] } },
|
|
3115
3497
|
axisLine: { lineStyle: { color: "#dcdfe6" } }
|
|
3116
3498
|
},
|
|
3117
|
-
series:
|
|
3118
|
-
}), l.extraOption && (
|
|
3499
|
+
series: m.value
|
|
3500
|
+
}), l.extraOption && (u = ae(u, l.extraOption)), u;
|
|
3119
3501
|
});
|
|
3120
|
-
return
|
|
3121
|
-
r.value && o(
|
|
3122
|
-
}, { deep: !0 }),
|
|
3123
|
-
|
|
3502
|
+
return re(h, (u) => {
|
|
3503
|
+
r.value && o(u, !0);
|
|
3504
|
+
}, { deep: !0 }), Z(() => {
|
|
3505
|
+
Fe(() => {
|
|
3124
3506
|
l.indicator.length > 0 && l.seriesData.length > 0 && o(h.value, !0);
|
|
3125
3507
|
});
|
|
3126
|
-
}), (
|
|
3508
|
+
}), (u, C) => (i(), D("div", I({
|
|
3127
3509
|
ref_key: "chartRef",
|
|
3128
3510
|
ref: t,
|
|
3129
3511
|
style: { width: e.width, height: e.height }
|
|
3130
|
-
},
|
|
3512
|
+
}, u.$attrs), null, 16));
|
|
3131
3513
|
}
|
|
3132
3514
|
});
|
|
3133
|
-
|
|
3134
|
-
e.component(
|
|
3515
|
+
Xe.install = (e) => {
|
|
3516
|
+
e.component(Xe.name ?? "EeBaseRadar", Xe);
|
|
3135
3517
|
};
|
|
3136
|
-
const
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
],
|
|
3518
|
+
const Wt = [
|
|
3519
|
+
We,
|
|
3520
|
+
je,
|
|
3521
|
+
Ge,
|
|
3522
|
+
Xe
|
|
3523
|
+
], jt = {
|
|
3142
3524
|
formTable: {
|
|
3143
3525
|
operation: "Actions",
|
|
3144
3526
|
add: "Add",
|
|
@@ -3181,7 +3563,12 @@ const Yl = [
|
|
|
3181
3563
|
selectPlaceholder: "Please select {label}",
|
|
3182
3564
|
dateRangeTo: "to",
|
|
3183
3565
|
dateRangeStart: "Start date",
|
|
3184
|
-
dateRangeEnd: "End date"
|
|
3566
|
+
dateRangeEnd: "End date",
|
|
3567
|
+
version: "Version",
|
|
3568
|
+
versionTitle: "Version History",
|
|
3569
|
+
moreActions: "More Actions",
|
|
3570
|
+
rowIndex: "#",
|
|
3571
|
+
selectionLabel: "Selection"
|
|
3185
3572
|
},
|
|
3186
3573
|
searchBar: {
|
|
3187
3574
|
search: "Search",
|
|
@@ -3212,87 +3599,88 @@ const Yl = [
|
|
|
3212
3599
|
noData: "No data"
|
|
3213
3600
|
}
|
|
3214
3601
|
};
|
|
3215
|
-
function
|
|
3602
|
+
function Gt(e, l) {
|
|
3216
3603
|
if (!e) return l;
|
|
3217
3604
|
const t = {};
|
|
3218
3605
|
for (const r of ["formTable", "searchBar", "formDialog", "remoteSelect"])
|
|
3219
3606
|
t[r] = { ...l[r], ...e[r] };
|
|
3220
3607
|
return t;
|
|
3221
3608
|
}
|
|
3222
|
-
function
|
|
3609
|
+
function _t(e) {
|
|
3223
3610
|
const {
|
|
3224
3611
|
requestInstance: l,
|
|
3225
3612
|
detailApiUrl: t,
|
|
3226
3613
|
labelField: r = "label",
|
|
3227
3614
|
valueField: o = "value",
|
|
3228
|
-
mode:
|
|
3229
|
-
} = e, h = l ??
|
|
3615
|
+
mode: m = "single"
|
|
3616
|
+
} = e, h = l ?? he(aa);
|
|
3230
3617
|
if (!h)
|
|
3231
3618
|
throw new Error("[EasyEPUI] 请配置 requestInstance:可通过 app.use(EasyEpUI, { requestInstance }) 全局注入,或通过 props 传入");
|
|
3232
|
-
const
|
|
3233
|
-
|
|
3234
|
-
const
|
|
3619
|
+
const u = h;
|
|
3620
|
+
_();
|
|
3621
|
+
const C = A("");
|
|
3235
3622
|
function g(d) {
|
|
3236
3623
|
return typeof d == "number" ? !0 : typeof d == "string" ? /^\d+(\.\d+)?$/.test(d.trim()) : !1;
|
|
3237
3624
|
}
|
|
3238
|
-
async function
|
|
3625
|
+
async function b(d) {
|
|
3239
3626
|
try {
|
|
3240
|
-
const p = (await
|
|
3241
|
-
return String(
|
|
3627
|
+
const p = (await u.get(t, { params: { id: d } })).data, c = (p == null ? void 0 : p.data) || p;
|
|
3628
|
+
return String(c ? c[r] ?? c[o] ?? "" : d);
|
|
3242
3629
|
} catch {
|
|
3243
3630
|
return String(d);
|
|
3244
3631
|
}
|
|
3245
3632
|
}
|
|
3246
3633
|
async function n(d) {
|
|
3247
3634
|
if (d == null || d === "") {
|
|
3248
|
-
|
|
3635
|
+
C.value = m === "multiple" ? [] : "";
|
|
3249
3636
|
return;
|
|
3250
3637
|
}
|
|
3251
|
-
if (
|
|
3638
|
+
if (m === "multiple" && Array.isArray(d)) {
|
|
3252
3639
|
if (d.length === 0) {
|
|
3253
|
-
|
|
3640
|
+
C.value = [];
|
|
3254
3641
|
return;
|
|
3255
3642
|
}
|
|
3256
|
-
const
|
|
3257
|
-
if (g(
|
|
3258
|
-
const p = await Promise.all(d.map((
|
|
3259
|
-
|
|
3643
|
+
const s = d[0];
|
|
3644
|
+
if (g(s)) {
|
|
3645
|
+
const p = await Promise.all(d.map((c) => b(c)));
|
|
3646
|
+
C.value = p;
|
|
3260
3647
|
} else
|
|
3261
|
-
|
|
3648
|
+
C.value = d;
|
|
3262
3649
|
} else {
|
|
3263
|
-
if (
|
|
3264
|
-
|
|
3650
|
+
if (m === "multiple") {
|
|
3651
|
+
C.value = [];
|
|
3265
3652
|
return;
|
|
3266
3653
|
}
|
|
3267
|
-
const
|
|
3268
|
-
g(
|
|
3654
|
+
const s = d;
|
|
3655
|
+
g(s) ? C.value = await b(s) : C.value = String(s);
|
|
3269
3656
|
}
|
|
3270
3657
|
}
|
|
3271
3658
|
return {
|
|
3272
3659
|
/** 当前回显文本(单选为 string,多选为 string[]) */
|
|
3273
|
-
echoText:
|
|
3660
|
+
echoText: C,
|
|
3274
3661
|
echoValue: n
|
|
3275
3662
|
};
|
|
3276
3663
|
}
|
|
3277
|
-
const
|
|
3278
|
-
"zh-cn":
|
|
3279
|
-
en:
|
|
3280
|
-
},
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
...
|
|
3664
|
+
const Xt = {
|
|
3665
|
+
"zh-cn": Se,
|
|
3666
|
+
en: jt
|
|
3667
|
+
}, aa = "eeRequestInstance", Yt = [
|
|
3668
|
+
$e,
|
|
3669
|
+
Me,
|
|
3670
|
+
Ie,
|
|
3671
|
+
Oe,
|
|
3672
|
+
Le,
|
|
3673
|
+
Ne,
|
|
3674
|
+
Ke,
|
|
3675
|
+
qe,
|
|
3676
|
+
He,
|
|
3677
|
+
...Wt
|
|
3291
3678
|
];
|
|
3292
|
-
function
|
|
3293
|
-
let t =
|
|
3294
|
-
l != null && l.locale && (typeof l.locale == "string" ? t =
|
|
3679
|
+
function Jt(e, l) {
|
|
3680
|
+
let t = Se;
|
|
3681
|
+
l != null && l.locale && (typeof l.locale == "string" ? t = Xt[l.locale] || Se : t = Gt(l.locale, Se)), e.provide(La, t), l != null && l.requestInstance && e.provide(aa, l.requestInstance), e.provide("eeGlobalConfig", {
|
|
3295
3682
|
size: l == null ? void 0 : l.size,
|
|
3683
|
+
readOnly: l == null ? void 0 : l.readOnly,
|
|
3296
3684
|
formTable: l == null ? void 0 : l.formTable,
|
|
3297
3685
|
searchBar: l == null ? void 0 : l.searchBar,
|
|
3298
3686
|
formDialog: l == null ? void 0 : l.formDialog,
|
|
@@ -3302,33 +3690,33 @@ function et(e, l) {
|
|
|
3302
3690
|
deptCascader: l == null ? void 0 : l.deptCascader,
|
|
3303
3691
|
userSelect: l == null ? void 0 : l.userSelect,
|
|
3304
3692
|
roleSelect: l == null ? void 0 : l.roleSelect
|
|
3305
|
-
}),
|
|
3693
|
+
}), Yt.forEach((r) => {
|
|
3306
3694
|
e.use(r);
|
|
3307
3695
|
});
|
|
3308
3696
|
}
|
|
3309
|
-
const
|
|
3697
|
+
const eo = { install: Jt };
|
|
3310
3698
|
export {
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3699
|
+
La as EE_LOCALE_KEY,
|
|
3700
|
+
aa as EE_REQUEST_KEY,
|
|
3701
|
+
We as EeBaseBar,
|
|
3702
|
+
je as EeBaseLine,
|
|
3703
|
+
Ge as EeBasePie,
|
|
3704
|
+
Xe as EeBaseRadar,
|
|
3705
|
+
Ke as EeDeptCascader,
|
|
3706
|
+
$e as EeDictSelect,
|
|
3707
|
+
Oe as EeFormDialog,
|
|
3708
|
+
Le as EeFormTable,
|
|
3709
|
+
Ne as EeRemoteSelect,
|
|
3710
|
+
He as EeRoleSelect,
|
|
3711
|
+
Ie as EeSearchBar,
|
|
3712
|
+
Me as EeStatusTag,
|
|
3713
|
+
qe as EeUserSelect,
|
|
3714
|
+
_e as GLOBAL_CHART_CONFIG,
|
|
3715
|
+
ae as deepMerge,
|
|
3716
|
+
eo as default,
|
|
3717
|
+
Jt as install,
|
|
3718
|
+
Gt as mergeLocale,
|
|
3719
|
+
ea as useChart,
|
|
3720
|
+
Ze as useRemoteSelectPagination,
|
|
3721
|
+
_t as useSelectEcho
|
|
3334
3722
|
};
|