jgy-public-component 0.0.7 → 0.0.9
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/components/JIconRender/JIconRender.d.ts +19 -3
- package/dist/components/JIconRender/types.d.ts +1 -0
- package/dist/components/JSidebar/JSidebar.d.ts +0 -8
- package/dist/components/JSidebar/types.d.ts +0 -2
- package/dist/index.js +312 -315
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as R, openBlock as u, createElementBlock as $, normalizeClass as P, createCommentVNode as C, renderSlot as W, ref as B, watch as oe, resolveComponent as b, createVNode as r, unref as x, withCtx as i, createElementVNode as _, withModifiers as G, createBlock as p, Fragment as Z, toDisplayString as V, mergeProps as de, computed as ie, onMounted as me, onBeforeUnmount as fe, normalizeStyle as ue, createTextVNode as E, useModel as pe, renderList as ee, mergeModels as ae } from "vue";
|
|
2
2
|
import { ElMessage as j } from "element-plus";
|
|
3
|
-
import { Delete as
|
|
4
|
-
import
|
|
5
|
-
import { Icon as
|
|
6
|
-
import * as
|
|
7
|
-
const
|
|
3
|
+
import { Delete as Q, Plus as Y, Loading as ne, ZoomIn as ve, Search as ge, Refresh as he, ArrowDown as ye } from "@element-plus/icons-vue";
|
|
4
|
+
import be from "vuedraggable";
|
|
5
|
+
import { Icon as _e } from "@iconify/vue";
|
|
6
|
+
import * as T from "xlsx";
|
|
7
|
+
const ke = ["disabled"], we = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "j-button__loading-icon"
|
|
10
|
-
},
|
|
10
|
+
}, xe = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "j-button__text"
|
|
13
|
-
},
|
|
13
|
+
}, Ce = /* @__PURE__ */ R({
|
|
14
14
|
__name: "JButton",
|
|
15
15
|
props: {
|
|
16
16
|
type: { default: "default" },
|
|
@@ -22,12 +22,12 @@ const xe = ["disabled"], Ce = {
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["click"],
|
|
24
24
|
setup(e, { emit: n }) {
|
|
25
|
-
const l = e,
|
|
26
|
-
function t(
|
|
27
|
-
!l.disabled && !l.loading &&
|
|
25
|
+
const l = e, o = n;
|
|
26
|
+
function t(s) {
|
|
27
|
+
!l.disabled && !l.loading && o("click", s);
|
|
28
28
|
}
|
|
29
|
-
return (
|
|
30
|
-
class:
|
|
29
|
+
return (s, d) => (u(), $("button", {
|
|
30
|
+
class: P(["j-button", [
|
|
31
31
|
`j-button--${e.type}`,
|
|
32
32
|
`j-button--${e.size}`,
|
|
33
33
|
{
|
|
@@ -40,27 +40,27 @@ const xe = ["disabled"], Ce = {
|
|
|
40
40
|
disabled: e.disabled || e.loading,
|
|
41
41
|
onClick: t
|
|
42
42
|
}, [
|
|
43
|
-
e.loading ? (
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
e.loading ? (u(), $("span", we)) : C("", !0),
|
|
44
|
+
s.$slots.default ? (u(), $("span", xe, [
|
|
45
|
+
W(s.$slots, "default", {}, void 0, !0)
|
|
46
46
|
])) : C("", !0)
|
|
47
|
-
], 10,
|
|
47
|
+
], 10, ke));
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), H = (e, n) => {
|
|
50
50
|
const l = e.__vccOpts || e;
|
|
51
|
-
for (const [
|
|
52
|
-
l[
|
|
51
|
+
for (const [o, t] of n)
|
|
52
|
+
l[o] = t;
|
|
53
53
|
return l;
|
|
54
|
-
},
|
|
54
|
+
}, je = /* @__PURE__ */ H(Ce, [["__scopeId", "data-v-22864824"]]), $e = { class: "j-upload-img-container" }, Ie = {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "images-wrapper"
|
|
57
|
-
},
|
|
57
|
+
}, Be = { class: "image-item" }, Se = ["onClick"], Ve = {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: "image-item single-image-item"
|
|
60
|
-
},
|
|
60
|
+
}, Ae = { class: "image-actions" }, Ee = {
|
|
61
61
|
key: 2,
|
|
62
62
|
class: "upload-tip"
|
|
63
|
-
},
|
|
63
|
+
}, Je = { key: 0 }, Me = /* @__PURE__ */ R({
|
|
64
64
|
name: "JUploadImg",
|
|
65
65
|
__name: "JUploadImg",
|
|
66
66
|
props: {
|
|
@@ -76,25 +76,25 @@ const xe = ["disabled"], Ce = {
|
|
|
76
76
|
},
|
|
77
77
|
emits: ["update:modelValue", "success", "error"],
|
|
78
78
|
setup(e, { emit: n }) {
|
|
79
|
-
const l = e,
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
t.value = "",
|
|
83
|
-
},
|
|
84
|
-
|
|
79
|
+
const l = e, o = n, t = B(""), s = B(!1), d = l.showTip, m = () => {
|
|
80
|
+
s.value = !0;
|
|
81
|
+
}, h = () => {
|
|
82
|
+
t.value = "", o("update:modelValue", ""), j.success("删除成功");
|
|
83
|
+
}, v = B([]), k = B(!1), O = (f) => {
|
|
84
|
+
v.value = f.map((c, a) => ({
|
|
85
85
|
uid: Date.now() + a,
|
|
86
86
|
url: c
|
|
87
87
|
}));
|
|
88
88
|
};
|
|
89
|
-
oe(() => l.modelValue, (
|
|
90
|
-
l.multiple ? Array.isArray(
|
|
89
|
+
oe(() => l.modelValue, (f) => {
|
|
90
|
+
l.multiple ? Array.isArray(f) && f.length > 0 ? O(f) : v.value = [] : typeof f == "string" ? t.value = f : t.value = "";
|
|
91
91
|
}, { immediate: !0 });
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
}, g = async (
|
|
97
|
-
const c =
|
|
92
|
+
const J = () => {
|
|
93
|
+
M();
|
|
94
|
+
}, w = (f) => {
|
|
95
|
+
v.value.splice(f, 1), M(), j.success("删除成功");
|
|
96
|
+
}, g = async (f) => {
|
|
97
|
+
const c = f.raw;
|
|
98
98
|
if (!c) {
|
|
99
99
|
j.error("文件不存在,请重试");
|
|
100
100
|
return;
|
|
@@ -108,167 +108,170 @@ const xe = ["disabled"], Ce = {
|
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
try {
|
|
111
|
-
|
|
111
|
+
k.value = !0;
|
|
112
112
|
const a = await l.uploadFn(c);
|
|
113
|
-
l.multiple ? (
|
|
113
|
+
l.multiple ? (v.value.push({ uid: Date.now(), url: a }), M()) : (t.value = a, o("update:modelValue", a)), o("success", a), j.success("上传成功");
|
|
114
114
|
} catch (a) {
|
|
115
|
-
console.error("上传出错:", a), j.error("上传失败,请重试"),
|
|
115
|
+
console.error("上传出错:", a), j.error("上传失败,请重试"), o("error", a);
|
|
116
116
|
} finally {
|
|
117
|
-
|
|
117
|
+
k.value = !1;
|
|
118
118
|
}
|
|
119
|
-
},
|
|
120
|
-
const
|
|
121
|
-
|
|
119
|
+
}, M = () => {
|
|
120
|
+
const f = v.value.map((c) => c.url);
|
|
121
|
+
o("update:modelValue", f);
|
|
122
122
|
};
|
|
123
|
-
return (
|
|
124
|
-
const a =
|
|
125
|
-
return
|
|
126
|
-
e.multiple ? (
|
|
127
|
-
|
|
128
|
-
modelValue:
|
|
129
|
-
"onUpdate:modelValue": c[0] || (c[0] = (F) =>
|
|
123
|
+
return (f, c) => {
|
|
124
|
+
const a = b("el-image"), y = b("el-icon"), I = b("el-upload"), D = b("el-image-viewer");
|
|
125
|
+
return u(), $("div", $e, [
|
|
126
|
+
e.multiple ? (u(), $("div", Ie, [
|
|
127
|
+
r(x(be), {
|
|
128
|
+
modelValue: v.value,
|
|
129
|
+
"onUpdate:modelValue": c[0] || (c[0] = (F) => v.value = F),
|
|
130
130
|
class: "images-list",
|
|
131
131
|
"item-key": "uid",
|
|
132
132
|
animation: 200,
|
|
133
133
|
disabled: e.disabled,
|
|
134
|
-
onEnd:
|
|
134
|
+
onEnd: J
|
|
135
135
|
}, {
|
|
136
|
-
item: i(({ element: F, index:
|
|
137
|
-
_("div",
|
|
138
|
-
|
|
136
|
+
item: i(({ element: F, index: z }) => [
|
|
137
|
+
_("div", Be, [
|
|
138
|
+
r(a, {
|
|
139
139
|
src: F.url,
|
|
140
|
-
"preview-src-list":
|
|
141
|
-
"initial-index":
|
|
140
|
+
"preview-src-list": v.value.map((A) => A.url),
|
|
141
|
+
"initial-index": z,
|
|
142
142
|
fit: "cover",
|
|
143
143
|
class: "image-preview",
|
|
144
144
|
"preview-teleported": !0,
|
|
145
145
|
"hide-on-click-modal": !0
|
|
146
146
|
}, null, 8, ["src", "preview-src-list", "initial-index"]),
|
|
147
|
-
e.disabled ? C("", !0) : (
|
|
147
|
+
e.disabled ? C("", !0) : (u(), $("div", {
|
|
148
148
|
key: 0,
|
|
149
149
|
class: "delete-btn",
|
|
150
|
-
onClick:
|
|
150
|
+
onClick: G((A) => w(z), ["stop"])
|
|
151
151
|
}, [
|
|
152
|
-
|
|
152
|
+
r(y, { class: "icon-delete" }, {
|
|
153
153
|
default: i(() => [
|
|
154
|
-
|
|
154
|
+
r(x(Q))
|
|
155
155
|
]),
|
|
156
156
|
_: 1
|
|
157
157
|
})
|
|
158
|
-
], 8,
|
|
158
|
+
], 8, Se))
|
|
159
159
|
])
|
|
160
160
|
]),
|
|
161
161
|
_: 1
|
|
162
162
|
}, 8, ["modelValue", "disabled"]),
|
|
163
|
-
!e.disabled && (!e.limit ||
|
|
163
|
+
!e.disabled && (!e.limit || v.value.length < e.limit) ? (u(), p(I, {
|
|
164
164
|
key: 0,
|
|
165
165
|
class: "image-uploader",
|
|
166
166
|
"auto-upload": !1,
|
|
167
167
|
"show-file-list": !1,
|
|
168
168
|
"on-change": g,
|
|
169
|
-
disabled:
|
|
169
|
+
disabled: k.value,
|
|
170
170
|
"list-type": "picture-card",
|
|
171
171
|
accept: e.accept
|
|
172
172
|
}, {
|
|
173
173
|
default: i(() => [
|
|
174
|
-
|
|
174
|
+
k.value ? (u(), p(y, {
|
|
175
175
|
key: 1,
|
|
176
176
|
class: "uploader-icon is-loading"
|
|
177
177
|
}, {
|
|
178
178
|
default: i(() => [
|
|
179
|
-
|
|
179
|
+
r(x(ne))
|
|
180
180
|
]),
|
|
181
181
|
_: 1
|
|
182
|
-
})) : (
|
|
182
|
+
})) : (u(), p(y, {
|
|
183
183
|
key: 0,
|
|
184
184
|
class: "uploader-icon"
|
|
185
185
|
}, {
|
|
186
186
|
default: i(() => [
|
|
187
|
-
|
|
187
|
+
r(x(Y))
|
|
188
188
|
]),
|
|
189
189
|
_: 1
|
|
190
190
|
}))
|
|
191
191
|
]),
|
|
192
192
|
_: 1
|
|
193
193
|
}, 8, ["disabled", "accept"])) : C("", !0)
|
|
194
|
-
])) : (
|
|
195
|
-
t.value ? (
|
|
196
|
-
|
|
194
|
+
])) : (u(), $(Z, { key: 1 }, [
|
|
195
|
+
t.value ? (u(), $("div", Ve, [
|
|
196
|
+
r(a, {
|
|
197
197
|
src: t.value,
|
|
198
198
|
fit: "cover",
|
|
199
199
|
class: "image-preview"
|
|
200
200
|
}, null, 8, ["src"]),
|
|
201
|
-
_("div",
|
|
202
|
-
|
|
201
|
+
_("div", Ae, [
|
|
202
|
+
r(y, {
|
|
203
203
|
class: "action-icon",
|
|
204
|
-
onClick:
|
|
204
|
+
onClick: G(m, ["stop"])
|
|
205
205
|
}, {
|
|
206
206
|
default: i(() => [
|
|
207
|
-
|
|
207
|
+
r(x(ve))
|
|
208
208
|
]),
|
|
209
209
|
_: 1
|
|
210
210
|
}),
|
|
211
|
-
e.disabled ? C("", !0) : (
|
|
211
|
+
e.disabled ? C("", !0) : (u(), p(y, {
|
|
212
212
|
key: 0,
|
|
213
213
|
class: "action-icon",
|
|
214
|
-
onClick:
|
|
214
|
+
onClick: G(h, ["stop"])
|
|
215
215
|
}, {
|
|
216
216
|
default: i(() => [
|
|
217
|
-
|
|
217
|
+
r(x(Q))
|
|
218
218
|
]),
|
|
219
219
|
_: 1
|
|
220
220
|
}))
|
|
221
221
|
])
|
|
222
|
-
])) : (
|
|
222
|
+
])) : (u(), p(I, {
|
|
223
223
|
key: 1,
|
|
224
224
|
class: "image-uploader",
|
|
225
225
|
"auto-upload": !1,
|
|
226
226
|
"show-file-list": !1,
|
|
227
227
|
"on-change": g,
|
|
228
|
-
disabled: e.disabled ||
|
|
228
|
+
disabled: e.disabled || k.value,
|
|
229
229
|
accept: e.accept,
|
|
230
230
|
"list-type": "picture-card"
|
|
231
231
|
}, {
|
|
232
232
|
default: i(() => [
|
|
233
|
-
|
|
233
|
+
r(y, { class: "uploader-icon" }, {
|
|
234
234
|
default: i(() => [
|
|
235
|
-
|
|
235
|
+
k.value ? (u(), p(x(ne), {
|
|
236
236
|
key: 1,
|
|
237
237
|
class: "is-loading"
|
|
238
|
-
})) : (
|
|
238
|
+
})) : (u(), p(x(Y), { key: 0 }))
|
|
239
239
|
]),
|
|
240
240
|
_: 1
|
|
241
241
|
})
|
|
242
242
|
]),
|
|
243
243
|
_: 1
|
|
244
244
|
}, 8, ["disabled", "accept"])),
|
|
245
|
-
|
|
245
|
+
s.value ? (u(), p(D, {
|
|
246
246
|
key: 2,
|
|
247
247
|
"url-list": [t.value],
|
|
248
248
|
teleported: !0,
|
|
249
|
-
onClose: c[1] || (c[1] = (F) =>
|
|
249
|
+
onClose: c[1] || (c[1] = (F) => s.value = !1)
|
|
250
250
|
}, null, 8, ["url-list"])) : C("", !0)
|
|
251
251
|
], 64)),
|
|
252
|
-
x(
|
|
253
|
-
_("span", null,
|
|
254
|
-
e.multiple && e.limit ? (
|
|
252
|
+
x(d) ? (u(), $("div", Ee, [
|
|
253
|
+
_("span", null, V(e.tip), 1),
|
|
254
|
+
e.multiple && e.limit ? (u(), $("span", Je, " (最多 " + V(e.limit) + " 张)", 1)) : C("", !0)
|
|
255
255
|
])) : C("", !0)
|
|
256
256
|
]);
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
|
-
}),
|
|
259
|
+
}), De = /* @__PURE__ */ H(Me, [["__scopeId", "data-v-052bacda"]]), q = /* @__PURE__ */ R({
|
|
260
260
|
name: "JIconRender",
|
|
261
261
|
__name: "JIconRender",
|
|
262
262
|
props: {
|
|
263
|
-
icon: {}
|
|
263
|
+
icon: {},
|
|
264
|
+
size: { default: 24 }
|
|
264
265
|
},
|
|
265
266
|
setup(e) {
|
|
266
|
-
return (n, l) => e.icon ? (
|
|
267
|
+
return (n, l) => e.icon ? (u(), p(x(_e), de({
|
|
267
268
|
key: 0,
|
|
268
|
-
icon: e.icon
|
|
269
|
-
|
|
269
|
+
icon: e.icon,
|
|
270
|
+
width: e.size,
|
|
271
|
+
height: e.size
|
|
272
|
+
}, n.$attrs), null, 16, ["icon", "width", "height"])) : C("", !0);
|
|
270
273
|
}
|
|
271
|
-
}),
|
|
274
|
+
}), Fe = { class: "action-left" }, Oe = /* @__PURE__ */ R({
|
|
272
275
|
name: "JSearchHeader",
|
|
273
276
|
__name: "JSearchHeader",
|
|
274
277
|
props: {
|
|
@@ -282,47 +285,47 @@ const xe = ["disabled"], Ce = {
|
|
|
282
285
|
},
|
|
283
286
|
emits: ["search", "reset", "add", "batchDelete"],
|
|
284
287
|
setup(e, { emit: n }) {
|
|
285
|
-
const l = e,
|
|
288
|
+
const l = e, o = n, t = B(), s = B(!1), d = B(!1), m = B(0), h = B(0), v = ie(() => m.value > l.defaultVisible), k = () => {
|
|
286
289
|
if (!t.value) return;
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
const g =
|
|
290
|
+
const w = Array.from(t.value.children);
|
|
291
|
+
m.value = w.length;
|
|
292
|
+
const g = w[l.defaultVisible - 1];
|
|
290
293
|
if (g && t.value) {
|
|
291
|
-
const
|
|
292
|
-
|
|
294
|
+
const M = t.value.getBoundingClientRect(), f = g.getBoundingClientRect();
|
|
295
|
+
h.value = f.bottom - M.top;
|
|
293
296
|
}
|
|
294
|
-
},
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
if (
|
|
298
|
-
|
|
297
|
+
}, O = () => {
|
|
298
|
+
const w = t.value;
|
|
299
|
+
if (w)
|
|
300
|
+
if (s.value)
|
|
301
|
+
k(), s.value = !1, w.style.maxHeight = w.scrollHeight + "px", w.offsetHeight, w.style.maxHeight = h.value + "px";
|
|
299
302
|
else {
|
|
300
|
-
|
|
303
|
+
s.value = !0, w.style.maxHeight = w.scrollHeight + "px";
|
|
301
304
|
const g = () => {
|
|
302
|
-
|
|
305
|
+
w.style.maxHeight = "none", w.removeEventListener("transitionend", g);
|
|
303
306
|
};
|
|
304
|
-
|
|
307
|
+
w.addEventListener("transitionend", g);
|
|
305
308
|
}
|
|
306
309
|
};
|
|
307
|
-
let
|
|
310
|
+
let J = null;
|
|
308
311
|
return me(() => {
|
|
309
|
-
|
|
312
|
+
k(), v.value && t.value && (t.value.style.maxHeight = h.value + "px"), requestAnimationFrame(() => {
|
|
310
313
|
requestAnimationFrame(() => {
|
|
311
|
-
|
|
314
|
+
d.value = !0;
|
|
312
315
|
});
|
|
313
|
-
}), t.value && (
|
|
314
|
-
|
|
315
|
-
}),
|
|
316
|
+
}), t.value && (J = new MutationObserver(() => {
|
|
317
|
+
k(), v.value && !s.value && t.value && (t.value.style.maxHeight = h.value + "px");
|
|
318
|
+
}), J.observe(t.value, { childList: !0 }));
|
|
316
319
|
}), fe(() => {
|
|
317
|
-
|
|
318
|
-
}), (
|
|
319
|
-
const
|
|
320
|
-
return
|
|
320
|
+
J == null || J.disconnect();
|
|
321
|
+
}), (w, g) => {
|
|
322
|
+
const M = b("el-form"), f = b("el-button"), c = b("el-icon"), a = b("el-card");
|
|
323
|
+
return u(), p(a, {
|
|
321
324
|
shadow: "never",
|
|
322
325
|
class: "j-search-header-card"
|
|
323
326
|
}, {
|
|
324
327
|
default: i(() => [
|
|
325
|
-
|
|
328
|
+
r(M, {
|
|
326
329
|
inline: "",
|
|
327
330
|
class: "search-form"
|
|
328
331
|
}, {
|
|
@@ -330,77 +333,77 @@ const xe = ["disabled"], Ce = {
|
|
|
330
333
|
_("div", {
|
|
331
334
|
ref_key: "formItemsRef",
|
|
332
335
|
ref: t,
|
|
333
|
-
class:
|
|
336
|
+
class: P(["form-items-wrapper", { "is-animated": d.value }])
|
|
334
337
|
}, [
|
|
335
|
-
|
|
338
|
+
W(w.$slots, "default", {}, void 0, !0)
|
|
336
339
|
], 2)
|
|
337
340
|
]),
|
|
338
341
|
_: 3
|
|
339
342
|
}),
|
|
340
343
|
_("div", {
|
|
341
344
|
class: "action-bar",
|
|
342
|
-
style: ue({ marginTop:
|
|
345
|
+
style: ue({ marginTop: s.value ? "0px" : "10px" })
|
|
343
346
|
}, [
|
|
344
|
-
_("div",
|
|
345
|
-
e.showAdd ? (
|
|
347
|
+
_("div", Fe, [
|
|
348
|
+
e.showAdd ? (u(), p(f, {
|
|
346
349
|
key: 0,
|
|
347
350
|
type: "primary",
|
|
348
|
-
icon: x(
|
|
349
|
-
onClick: g[0] || (g[0] = (
|
|
351
|
+
icon: x(Y),
|
|
352
|
+
onClick: g[0] || (g[0] = (y) => o("add"))
|
|
350
353
|
}, {
|
|
351
354
|
default: i(() => [
|
|
352
|
-
|
|
355
|
+
E(V(e.addText), 1)
|
|
353
356
|
]),
|
|
354
357
|
_: 1
|
|
355
358
|
}, 8, ["icon"])) : C("", !0),
|
|
356
|
-
e.showBatchDelete ? (
|
|
359
|
+
e.showBatchDelete ? (u(), p(f, {
|
|
357
360
|
key: 1,
|
|
358
361
|
type: "danger",
|
|
359
|
-
icon: x(
|
|
362
|
+
icon: x(Q),
|
|
360
363
|
disabled: e.selectedCount === 0,
|
|
361
|
-
onClick: g[1] || (g[1] = (
|
|
364
|
+
onClick: g[1] || (g[1] = (y) => o("batchDelete"))
|
|
362
365
|
}, {
|
|
363
366
|
default: i(() => [
|
|
364
|
-
|
|
367
|
+
E(" 批量删除" + V(e.selectedCount ? `(${e.selectedCount})` : ""), 1)
|
|
365
368
|
]),
|
|
366
369
|
_: 1
|
|
367
370
|
}, 8, ["icon", "disabled"])) : C("", !0),
|
|
368
|
-
e.showSearch ? (
|
|
371
|
+
e.showSearch ? (u(), p(f, {
|
|
369
372
|
key: 2,
|
|
370
373
|
type: "primary",
|
|
371
374
|
icon: x(ge),
|
|
372
|
-
onClick: g[2] || (g[2] = (
|
|
375
|
+
onClick: g[2] || (g[2] = (y) => o("search"))
|
|
373
376
|
}, {
|
|
374
377
|
default: i(() => [...g[4] || (g[4] = [
|
|
375
|
-
|
|
378
|
+
E("搜索", -1)
|
|
376
379
|
])]),
|
|
377
380
|
_: 1
|
|
378
381
|
}, 8, ["icon"])) : C("", !0),
|
|
379
|
-
e.showReset ? (
|
|
382
|
+
e.showReset ? (u(), p(f, {
|
|
380
383
|
key: 3,
|
|
381
384
|
icon: x(he),
|
|
382
|
-
onClick: g[3] || (g[3] = (
|
|
385
|
+
onClick: g[3] || (g[3] = (y) => o("reset"))
|
|
383
386
|
}, {
|
|
384
387
|
default: i(() => [...g[5] || (g[5] = [
|
|
385
|
-
|
|
388
|
+
E("重置", -1)
|
|
386
389
|
])]),
|
|
387
390
|
_: 1
|
|
388
391
|
}, 8, ["icon"])) : C("", !0),
|
|
389
|
-
|
|
392
|
+
W(w.$slots, "actions", {}, void 0, !0)
|
|
390
393
|
]),
|
|
391
|
-
|
|
394
|
+
v.value ? (u(), p(f, {
|
|
392
395
|
key: 0,
|
|
393
396
|
link: "",
|
|
394
397
|
type: "primary",
|
|
395
|
-
onClick:
|
|
398
|
+
onClick: O
|
|
396
399
|
}, {
|
|
397
400
|
default: i(() => [
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
class:
|
|
401
|
+
E(V(s.value ? "收起" : "展开") + " ", 1),
|
|
402
|
+
r(c, {
|
|
403
|
+
class: P(["toggle-icon", { "is-expanded": s.value }])
|
|
401
404
|
}, {
|
|
402
405
|
default: i(() => [
|
|
403
|
-
|
|
406
|
+
r(x(ye))
|
|
404
407
|
]),
|
|
405
408
|
_: 1
|
|
406
409
|
}, 8, ["class"])
|
|
@@ -413,10 +416,10 @@ const xe = ["disabled"], Ce = {
|
|
|
413
416
|
});
|
|
414
417
|
};
|
|
415
418
|
}
|
|
416
|
-
}),
|
|
419
|
+
}), Re = /* @__PURE__ */ H(Oe, [["__scopeId", "data-v-4488c604"]]), ze = { class: "j-import-upload-row" }, Te = { class: "j-import-stat-num" }, He = { class: "j-import-stat-num" }, Le = { class: "j-import-stat-num" }, Ue = {
|
|
417
420
|
key: 0,
|
|
418
421
|
class: "j-import-status-fail"
|
|
419
|
-
},
|
|
422
|
+
}, Ne = { key: 1 }, Pe = /* @__PURE__ */ R({
|
|
420
423
|
name: "JImportExcel",
|
|
421
424
|
__name: "JImportExcel",
|
|
422
425
|
props: /* @__PURE__ */ ae({
|
|
@@ -430,19 +433,19 @@ const xe = ["disabled"], Ce = {
|
|
|
430
433
|
}),
|
|
431
434
|
emits: /* @__PURE__ */ ae(["success"], ["update:modelValue"]),
|
|
432
435
|
setup(e, { emit: n }) {
|
|
433
|
-
const l = e,
|
|
436
|
+
const l = e, o = n, t = pe(e, "modelValue"), s = B(!1), d = B({}), m = B([]), h = B({ total: 0, success: 0, fail: 0 }), v = {
|
|
434
437
|
0: "待创建",
|
|
435
438
|
1: "创建成功",
|
|
436
439
|
2: "创建中",
|
|
437
440
|
[-1]: "创建失败"
|
|
438
|
-
},
|
|
441
|
+
}, k = ie(() => Object.entries(d.value).filter(([c]) => !l.excludeFields.includes(c)).map(([c, a]) => ({ id: c, label: a, prop: c }))), O = async () => {
|
|
439
442
|
try {
|
|
440
443
|
const c = await l.getFieldListApi();
|
|
441
|
-
|
|
444
|
+
d.value = c.data.tableFieldsInfo ?? {};
|
|
442
445
|
} catch {
|
|
443
446
|
j.error("获取字段列表失败");
|
|
444
447
|
}
|
|
445
|
-
},
|
|
448
|
+
}, J = (c) => {
|
|
446
449
|
const a = c.raw;
|
|
447
450
|
if (!a) return;
|
|
448
451
|
if (![
|
|
@@ -455,105 +458,105 @@ const xe = ["disabled"], Ce = {
|
|
|
455
458
|
const I = new FileReader();
|
|
456
459
|
I.onload = (D) => {
|
|
457
460
|
try {
|
|
458
|
-
const F =
|
|
459
|
-
if (!
|
|
461
|
+
const F = T.read(D.target.result, { type: "binary" }), z = F.SheetNames[0], A = F.Sheets[z], L = T.utils.sheet_to_json(A);
|
|
462
|
+
if (!L.length) {
|
|
460
463
|
j.warning("文件内容为空");
|
|
461
464
|
return;
|
|
462
465
|
}
|
|
463
|
-
const
|
|
464
|
-
const
|
|
465
|
-
return
|
|
466
|
-
|
|
467
|
-
}),
|
|
466
|
+
const U = k.value.map((N) => N.prop), K = L.map((N) => {
|
|
467
|
+
const S = Object.values(N), X = { _status: 0, _error: "" };
|
|
468
|
+
return U.forEach((le, re) => {
|
|
469
|
+
X[le] = S[re];
|
|
470
|
+
}), X;
|
|
468
471
|
});
|
|
469
|
-
|
|
472
|
+
m.value = K, h.value = { total: K.length, success: 0, fail: 0 };
|
|
470
473
|
} catch {
|
|
471
474
|
j.error("解析文件失败,请检查文件格式");
|
|
472
475
|
}
|
|
473
476
|
}, I.readAsBinaryString(a);
|
|
474
|
-
},
|
|
475
|
-
|
|
477
|
+
}, w = (c) => {
|
|
478
|
+
m.value.splice(c, 1), h.value.total = m.value.length;
|
|
476
479
|
}, g = async () => {
|
|
477
|
-
const c =
|
|
480
|
+
const c = m.value.filter((a) => a._status === 0).map(({ _status: a, _error: y, ...I }) => I);
|
|
478
481
|
if (!c.length) {
|
|
479
482
|
j.warning("没有可导入的数据");
|
|
480
483
|
return;
|
|
481
484
|
}
|
|
482
|
-
|
|
485
|
+
s.value = !0;
|
|
483
486
|
try {
|
|
484
487
|
const a = await l.importApi(c);
|
|
485
|
-
a.code === 1 ? (
|
|
486
|
-
|
|
487
|
-
}),
|
|
488
|
+
a.code === 1 ? (m.value.forEach((y) => {
|
|
489
|
+
y._status === 0 && (y._status = 1);
|
|
490
|
+
}), h.value.success = m.value.filter((y) => y._status === 1).length, j.success("导入成功"), o("success")) : j.error(a.msg || "导入失败");
|
|
488
491
|
} catch {
|
|
489
492
|
j.error("导入失败,请重试");
|
|
490
493
|
} finally {
|
|
491
|
-
|
|
494
|
+
s.value = !1;
|
|
492
495
|
}
|
|
493
|
-
},
|
|
496
|
+
}, M = () => {
|
|
494
497
|
try {
|
|
495
|
-
const c =
|
|
496
|
-
a.forEach((D) =>
|
|
497
|
-
const I =
|
|
498
|
-
|
|
498
|
+
const c = T.utils.book_new(), a = k.value.map((D) => D.label), y = {};
|
|
499
|
+
a.forEach((D) => y[D] = "");
|
|
500
|
+
const I = T.utils.json_to_sheet([y]);
|
|
501
|
+
T.utils.book_append_sheet(c, I, "模板"), T.writeFile(c, "导入模板.xlsx");
|
|
499
502
|
} catch {
|
|
500
503
|
j.error("模板下载失败");
|
|
501
504
|
}
|
|
502
|
-
},
|
|
503
|
-
|
|
505
|
+
}, f = () => {
|
|
506
|
+
s.value || (t.value = !1, m.value = [], h.value = { total: 0, success: 0, fail: 0 });
|
|
504
507
|
};
|
|
505
508
|
return (c, a) => {
|
|
506
|
-
const
|
|
507
|
-
return
|
|
509
|
+
const y = b("el-divider"), I = b("el-button"), D = b("el-upload"), F = b("el-link"), z = b("el-card"), A = b("el-col"), L = b("el-row"), U = b("el-table-column"), K = b("el-table"), N = b("el-dialog");
|
|
510
|
+
return u(), p(N, {
|
|
508
511
|
modelValue: t.value,
|
|
509
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
512
|
+
"onUpdate:modelValue": a[0] || (a[0] = (S) => t.value = S),
|
|
510
513
|
title: l.title,
|
|
511
514
|
width: "900px",
|
|
512
515
|
"close-on-click-modal": !1,
|
|
513
|
-
onOpen:
|
|
514
|
-
onClose:
|
|
516
|
+
onOpen: O,
|
|
517
|
+
onClose: f
|
|
515
518
|
}, {
|
|
516
519
|
footer: i(() => [
|
|
517
|
-
|
|
520
|
+
r(I, { onClick: f }, {
|
|
518
521
|
default: i(() => [...a[9] || (a[9] = [
|
|
519
|
-
|
|
522
|
+
E("关闭", -1)
|
|
520
523
|
])]),
|
|
521
524
|
_: 1
|
|
522
525
|
})
|
|
523
526
|
]),
|
|
524
527
|
default: i(() => [
|
|
525
|
-
|
|
528
|
+
r(z, {
|
|
526
529
|
shadow: "never",
|
|
527
530
|
class: "j-import-upload-card"
|
|
528
531
|
}, {
|
|
529
532
|
default: i(() => [
|
|
530
533
|
a[3] || (a[3] = _("div", { class: "j-import-upload-card-title" }, "导入 EXCEL", -1)),
|
|
531
|
-
|
|
532
|
-
_("div",
|
|
533
|
-
|
|
534
|
+
r(y, { style: { margin: "10px 0" } }),
|
|
535
|
+
_("div", ze, [
|
|
536
|
+
r(D, {
|
|
534
537
|
accept: ".xlsx,.xls",
|
|
535
538
|
"auto-upload": !1,
|
|
536
539
|
"show-file-list": !1,
|
|
537
|
-
"on-change":
|
|
540
|
+
"on-change": J
|
|
538
541
|
}, {
|
|
539
542
|
default: i(() => [
|
|
540
|
-
|
|
543
|
+
r(I, { size: "small" }, {
|
|
541
544
|
default: i(() => [...a[1] || (a[1] = [
|
|
542
|
-
|
|
545
|
+
E("点击上传", -1)
|
|
543
546
|
])]),
|
|
544
547
|
_: 1
|
|
545
548
|
})
|
|
546
549
|
]),
|
|
547
550
|
_: 1
|
|
548
551
|
}),
|
|
549
|
-
|
|
552
|
+
k.value.length ? (u(), p(F, {
|
|
550
553
|
key: 0,
|
|
551
554
|
type: "primary",
|
|
552
555
|
class: "j-import-no-wrap",
|
|
553
|
-
onClick:
|
|
556
|
+
onClick: M
|
|
554
557
|
}, {
|
|
555
558
|
default: i(() => [...a[2] || (a[2] = [
|
|
556
|
-
|
|
559
|
+
E(" 下载导入模板.xlsx ", -1)
|
|
557
560
|
])]),
|
|
558
561
|
_: 1
|
|
559
562
|
})) : C("", !0)
|
|
@@ -561,42 +564,42 @@ const xe = ["disabled"], Ce = {
|
|
|
561
564
|
]),
|
|
562
565
|
_: 1
|
|
563
566
|
}),
|
|
564
|
-
|
|
567
|
+
r(L, {
|
|
565
568
|
class: "j-import-stats-row",
|
|
566
569
|
gutter: 20,
|
|
567
570
|
align: "middle"
|
|
568
571
|
}, {
|
|
569
572
|
default: i(() => [
|
|
570
|
-
|
|
573
|
+
r(A, { span: 18 }, {
|
|
571
574
|
default: i(() => [
|
|
572
|
-
|
|
575
|
+
r(L, { class: "j-import-stats-cols" }, {
|
|
573
576
|
default: i(() => [
|
|
574
|
-
|
|
577
|
+
r(A, {
|
|
575
578
|
span: 4,
|
|
576
579
|
class: "j-import-stat-item"
|
|
577
580
|
}, {
|
|
578
581
|
default: i(() => [
|
|
579
|
-
_("div",
|
|
582
|
+
_("div", Te, V(h.value.total), 1),
|
|
580
583
|
a[4] || (a[4] = _("div", { class: "j-import-stat-label" }, "导入数量", -1))
|
|
581
584
|
]),
|
|
582
585
|
_: 1
|
|
583
586
|
}),
|
|
584
|
-
|
|
587
|
+
r(A, {
|
|
585
588
|
span: 4,
|
|
586
589
|
class: "j-import-stat-item"
|
|
587
590
|
}, {
|
|
588
591
|
default: i(() => [
|
|
589
|
-
_("div",
|
|
592
|
+
_("div", He, V(h.value.fail), 1),
|
|
590
593
|
a[5] || (a[5] = _("div", { class: "j-import-stat-label" }, "失败数量", -1))
|
|
591
594
|
]),
|
|
592
595
|
_: 1
|
|
593
596
|
}),
|
|
594
|
-
|
|
597
|
+
r(A, {
|
|
595
598
|
span: 4,
|
|
596
599
|
class: "j-import-stat-item"
|
|
597
600
|
}, {
|
|
598
601
|
default: i(() => [
|
|
599
|
-
_("div",
|
|
602
|
+
_("div", Le, V(h.value.success), 1),
|
|
600
603
|
a[6] || (a[6] = _("div", { class: "j-import-stat-label" }, "成功数量", -1))
|
|
601
604
|
]),
|
|
602
605
|
_: 1
|
|
@@ -607,20 +610,20 @@ const xe = ["disabled"], Ce = {
|
|
|
607
610
|
]),
|
|
608
611
|
_: 1
|
|
609
612
|
}),
|
|
610
|
-
|
|
613
|
+
r(A, {
|
|
611
614
|
span: 6,
|
|
612
615
|
class: "j-import-confirm-col"
|
|
613
616
|
}, {
|
|
614
617
|
default: i(() => [
|
|
615
|
-
|
|
618
|
+
r(I, {
|
|
616
619
|
type: "primary",
|
|
617
620
|
size: "small",
|
|
618
|
-
loading:
|
|
619
|
-
disabled: !
|
|
621
|
+
loading: s.value,
|
|
622
|
+
disabled: !m.value.length,
|
|
620
623
|
onClick: g
|
|
621
624
|
}, {
|
|
622
625
|
default: i(() => [...a[7] || (a[7] = [
|
|
623
|
-
|
|
626
|
+
E(" 确认导入 ", -1)
|
|
624
627
|
])]),
|
|
625
628
|
_: 1
|
|
626
629
|
}, 8, ["loading", "disabled"])
|
|
@@ -630,46 +633,46 @@ const xe = ["disabled"], Ce = {
|
|
|
630
633
|
]),
|
|
631
634
|
_: 1
|
|
632
635
|
}),
|
|
633
|
-
|
|
634
|
-
data:
|
|
636
|
+
r(K, {
|
|
637
|
+
data: m.value,
|
|
635
638
|
border: "",
|
|
636
639
|
size: "small",
|
|
637
640
|
"max-height": "360",
|
|
638
641
|
class: "j-import-data-table"
|
|
639
642
|
}, {
|
|
640
643
|
default: i(() => [
|
|
641
|
-
(
|
|
642
|
-
key:
|
|
643
|
-
prop:
|
|
644
|
-
label:
|
|
644
|
+
(u(!0), $(Z, null, ee(k.value, (S) => (u(), p(U, {
|
|
645
|
+
key: S.prop,
|
|
646
|
+
prop: S.prop,
|
|
647
|
+
label: S.label,
|
|
645
648
|
"min-width": 120,
|
|
646
649
|
"show-overflow-tooltip": ""
|
|
647
650
|
}, null, 8, ["prop", "label"]))), 128)),
|
|
648
|
-
|
|
651
|
+
r(U, {
|
|
649
652
|
label: "状态",
|
|
650
653
|
width: "110",
|
|
651
654
|
align: "center",
|
|
652
655
|
fixed: "right"
|
|
653
656
|
}, {
|
|
654
|
-
default: i(({ row:
|
|
655
|
-
|
|
657
|
+
default: i(({ row: S }) => [
|
|
658
|
+
S._status === -1 ? (u(), $("span", Ue, V(S._error || "创建失败"), 1)) : (u(), $("span", Ne, V(v[S._status]), 1))
|
|
656
659
|
]),
|
|
657
660
|
_: 1
|
|
658
661
|
}),
|
|
659
|
-
|
|
662
|
+
r(U, {
|
|
660
663
|
label: "操作",
|
|
661
664
|
width: "80",
|
|
662
665
|
align: "center",
|
|
663
666
|
fixed: "right"
|
|
664
667
|
}, {
|
|
665
|
-
default: i(({ $index:
|
|
666
|
-
|
|
668
|
+
default: i(({ $index: S, row: X }) => [
|
|
669
|
+
X._status === 0 ? (u(), p(I, {
|
|
667
670
|
key: 0,
|
|
668
671
|
size: "small",
|
|
669
|
-
onClick: (le) =>
|
|
672
|
+
onClick: (le) => w(S)
|
|
670
673
|
}, {
|
|
671
674
|
default: i(() => [...a[8] || (a[8] = [
|
|
672
|
-
|
|
675
|
+
E(" 删除 ", -1)
|
|
673
676
|
])]),
|
|
674
677
|
_: 1
|
|
675
678
|
}, 8, ["onClick"])) : C("", !0)
|
|
@@ -684,7 +687,7 @@ const xe = ["disabled"], Ce = {
|
|
|
684
687
|
}, 8, ["modelValue", "title"]);
|
|
685
688
|
};
|
|
686
689
|
}
|
|
687
|
-
}),
|
|
690
|
+
}), We = /* @__PURE__ */ H(Pe, [["__scopeId", "data-v-2ece86f5"]]), Ke = { class: "j-sidebar__menu-item-title" }, Xe = /* @__PURE__ */ R({
|
|
688
691
|
name: "JSideMenuItem",
|
|
689
692
|
__name: "JSideMenuItem",
|
|
690
693
|
props: {
|
|
@@ -694,42 +697,42 @@ const xe = ["disabled"], Ce = {
|
|
|
694
697
|
},
|
|
695
698
|
emits: ["menu-click"],
|
|
696
699
|
setup(e, { emit: n }) {
|
|
697
|
-
const l = e,
|
|
698
|
-
|
|
700
|
+
const l = e, o = n, t = () => {
|
|
701
|
+
o("menu-click", l.menuItem);
|
|
699
702
|
};
|
|
700
|
-
return (
|
|
701
|
-
const
|
|
702
|
-
return e.menuItem.children && e.menuItem.children.length > 0 ? (
|
|
703
|
+
return (s, d) => {
|
|
704
|
+
const m = b("JSideMenuItem", !0), h = b("el-sub-menu"), v = b("el-menu-item");
|
|
705
|
+
return e.menuItem.children && e.menuItem.children.length > 0 ? (u(), p(h, {
|
|
703
706
|
key: 0,
|
|
704
707
|
index: e.menuItem.path
|
|
705
708
|
}, {
|
|
706
709
|
title: i(() => [
|
|
707
|
-
e.menuItem.icon && e.depth === 0 ? (
|
|
710
|
+
e.menuItem.icon && e.depth === 0 ? (u(), p(x(q), {
|
|
708
711
|
key: 0,
|
|
709
712
|
icon: e.menuItem.icon
|
|
710
713
|
}, null, 8, ["icon"])) : C("", !0),
|
|
711
|
-
_("span",
|
|
714
|
+
_("span", Ke, V(e.menuItem.title || e.menuItem.name), 1)
|
|
712
715
|
]),
|
|
713
716
|
default: i(() => [
|
|
714
|
-
(
|
|
715
|
-
key:
|
|
716
|
-
"menu-item":
|
|
717
|
+
(u(!0), $(Z, null, ee(e.menuItem.children, (k) => (u(), p(m, {
|
|
718
|
+
key: k.path,
|
|
719
|
+
"menu-item": k,
|
|
717
720
|
"is-collapse": e.isCollapse,
|
|
718
721
|
depth: e.depth + 1,
|
|
719
|
-
onMenuClick:
|
|
722
|
+
onMenuClick: d[0] || (d[0] = (O) => o("menu-click", O))
|
|
720
723
|
}, null, 8, ["menu-item", "is-collapse", "depth"]))), 128))
|
|
721
724
|
]),
|
|
722
725
|
_: 1
|
|
723
|
-
}, 8, ["index"])) : (
|
|
726
|
+
}, 8, ["index"])) : (u(), p(v, {
|
|
724
727
|
key: 1,
|
|
725
728
|
index: e.menuItem.path,
|
|
726
729
|
onClick: t
|
|
727
730
|
}, {
|
|
728
731
|
title: i(() => [
|
|
729
|
-
_("span", null,
|
|
732
|
+
_("span", null, V(e.menuItem.title || e.menuItem.name), 1)
|
|
730
733
|
]),
|
|
731
734
|
default: i(() => [
|
|
732
|
-
e.menuItem.icon && e.depth === 0 ? (
|
|
735
|
+
e.menuItem.icon && e.depth === 0 ? (u(), p(x(q), {
|
|
733
736
|
key: 0,
|
|
734
737
|
icon: e.menuItem.icon
|
|
735
738
|
}, null, 8, ["icon"])) : C("", !0)
|
|
@@ -738,7 +741,7 @@ const xe = ["disabled"], Ce = {
|
|
|
738
741
|
}, 8, ["index"]));
|
|
739
742
|
};
|
|
740
743
|
}
|
|
741
|
-
}), qe = { class: "j-sidebar__logo" }, Ze = { class: "j-sidebar__title" }, Ge = { class: "j-sidebar__menu-wrapper" }, Qe = { class: "j-sidebar__footer" }, Ye =
|
|
744
|
+
}), ce = /* @__PURE__ */ H(Xe, [["__scopeId", "data-v-c83c4ba1"]]), qe = { class: "j-sidebar__logo" }, Ze = { class: "j-sidebar__title" }, Ge = { class: "j-sidebar__menu-wrapper" }, Qe = { class: "j-sidebar__footer" }, Ye = /* @__PURE__ */ R({
|
|
742
745
|
name: "JSidebar",
|
|
743
746
|
__name: "JSidebar",
|
|
744
747
|
props: {
|
|
@@ -749,35 +752,33 @@ const xe = ["disabled"], Ce = {
|
|
|
749
752
|
collapsed: { type: Boolean, default: !1 },
|
|
750
753
|
collapsedWidth: { default: 64 },
|
|
751
754
|
expandedWidth: { default: 200 },
|
|
752
|
-
expandText: { default: "展开" },
|
|
753
|
-
collapseText: { default: "折叠" },
|
|
754
755
|
router: { type: Boolean, default: !0 }
|
|
755
756
|
},
|
|
756
757
|
emits: ["update:collapsed", "menu-click"],
|
|
757
758
|
setup(e, { emit: n }) {
|
|
758
|
-
const l = e,
|
|
759
|
-
oe(() => l.collapsed, (
|
|
760
|
-
t.value =
|
|
759
|
+
const l = e, o = n, t = B(l.collapsed);
|
|
760
|
+
oe(() => l.collapsed, (d) => {
|
|
761
|
+
t.value = d;
|
|
761
762
|
});
|
|
762
|
-
const
|
|
763
|
-
t.value = !t.value,
|
|
763
|
+
const s = () => {
|
|
764
|
+
t.value = !t.value, o("update:collapsed", t.value);
|
|
764
765
|
};
|
|
765
|
-
return (
|
|
766
|
-
const
|
|
767
|
-
return
|
|
768
|
-
class:
|
|
766
|
+
return (d, m) => {
|
|
767
|
+
const h = b("el-menu");
|
|
768
|
+
return u(), $("div", {
|
|
769
|
+
class: P(["j-sidebar", t.value ? "j-sidebar--collapsed" : "j-sidebar--expanded"]),
|
|
769
770
|
style: ue({ width: t.value ? `${e.collapsedWidth}px` : `${e.expandedWidth}px` })
|
|
770
771
|
}, [
|
|
771
772
|
_("div", qe, [
|
|
772
|
-
|
|
773
|
+
W(d.$slots, "logo", { collapsed: t.value }, () => {
|
|
773
774
|
var v;
|
|
774
775
|
return [
|
|
775
|
-
_("h2", Ze,
|
|
776
|
+
_("h2", Ze, V(t.value ? e.collapsedTitle || ((v = e.title) == null ? void 0 : v.charAt(0)) || "" : e.title), 1)
|
|
776
777
|
];
|
|
777
778
|
}, !0)
|
|
778
779
|
]),
|
|
779
780
|
_("div", Ge, [
|
|
780
|
-
|
|
781
|
+
r(h, {
|
|
781
782
|
"default-active": e.activeMenu,
|
|
782
783
|
class: "j-sidebar__menu",
|
|
783
784
|
router: e.router,
|
|
@@ -785,68 +786,64 @@ const xe = ["disabled"], Ce = {
|
|
|
785
786
|
"collapse-transition": !1
|
|
786
787
|
}, {
|
|
787
788
|
default: i(() => [
|
|
788
|
-
(
|
|
789
|
+
(u(!0), $(Z, null, ee(e.menus, (v) => (u(), p(ce, {
|
|
789
790
|
key: v.path,
|
|
790
791
|
"menu-item": v,
|
|
791
792
|
"is-collapse": t.value,
|
|
792
|
-
onMenuClick:
|
|
793
|
+
onMenuClick: m[0] || (m[0] = (k) => o("menu-click", k))
|
|
793
794
|
}, null, 8, ["menu-item", "is-collapse"]))), 128))
|
|
794
795
|
]),
|
|
795
796
|
_: 1
|
|
796
797
|
}, 8, ["default-active", "router", "collapse"])
|
|
797
798
|
]),
|
|
798
799
|
_("div", Qe, [
|
|
799
|
-
|
|
800
|
+
W(d.$slots, "footer", {
|
|
800
801
|
collapsed: t.value,
|
|
801
|
-
toggle:
|
|
802
|
+
toggle: s
|
|
802
803
|
}, () => [
|
|
803
804
|
_("button", {
|
|
804
|
-
class: "j-sidebar__collapse-btn",
|
|
805
|
-
onClick:
|
|
805
|
+
class: P(["j-sidebar__collapse-btn", t.value ? "j-sidebar__collapse-btn--center" : "j-sidebar__collapse-btn--right"]),
|
|
806
|
+
onClick: s
|
|
806
807
|
}, [
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
_: 1
|
|
812
|
-
}),
|
|
813
|
-
_("span", Ye, S(t.value ? e.expandText : e.collapseText), 1)
|
|
814
|
-
])
|
|
808
|
+
r(x(q), {
|
|
809
|
+
icon: t.value ? "mdi:chevron-right" : "mdi:chevron-left"
|
|
810
|
+
}, null, 8, ["icon"])
|
|
811
|
+
], 2)
|
|
815
812
|
], !0)
|
|
816
813
|
])
|
|
817
814
|
], 6);
|
|
818
815
|
};
|
|
819
816
|
}
|
|
820
|
-
}),
|
|
817
|
+
}), et = /* @__PURE__ */ H(Ye, [["__scopeId", "data-v-def81094"]]);
|
|
821
818
|
function te(e, n) {
|
|
822
819
|
return Array.isArray(e) ? e.map((l) => te(l, n)) : e !== null && typeof e == "object" && !(e instanceof Date) ? n(e) : e;
|
|
823
820
|
}
|
|
824
|
-
function
|
|
821
|
+
function tt(e, n = []) {
|
|
825
822
|
return Object.fromEntries(
|
|
826
|
-
Object.entries(e).map(([l,
|
|
827
|
-
const t = te(
|
|
823
|
+
Object.entries(e).map(([l, o]) => {
|
|
824
|
+
const t = te(o, (d) => tt(d, n));
|
|
828
825
|
return n.includes(l) ? [l, t] : [l.replace(/([A-Z])/g, "_$1").toLowerCase(), t];
|
|
829
826
|
})
|
|
830
827
|
);
|
|
831
828
|
}
|
|
832
|
-
function
|
|
829
|
+
function lt(e, n = []) {
|
|
833
830
|
return Object.fromEntries(
|
|
834
|
-
Object.entries(e).map(([l,
|
|
835
|
-
const t = te(
|
|
836
|
-
return n.includes(l) ? [l, t] : [l.replace(/_([a-z])/g, (
|
|
831
|
+
Object.entries(e).map(([l, o]) => {
|
|
832
|
+
const t = te(o, (d) => lt(d, n));
|
|
833
|
+
return n.includes(l) ? [l, t] : [l.replace(/_([a-z])/g, (d, m) => m.toUpperCase()), t];
|
|
837
834
|
})
|
|
838
835
|
);
|
|
839
836
|
}
|
|
840
|
-
function
|
|
837
|
+
function mt(e, n) {
|
|
841
838
|
const l = {};
|
|
842
|
-
for (const
|
|
843
|
-
|
|
839
|
+
for (const o of n)
|
|
840
|
+
o in e && (l[o] = e[o]);
|
|
844
841
|
return l;
|
|
845
842
|
}
|
|
846
|
-
function
|
|
843
|
+
function ft(e, n) {
|
|
847
844
|
const l = { ...e };
|
|
848
|
-
for (const
|
|
849
|
-
delete l[
|
|
845
|
+
for (const o of n)
|
|
846
|
+
delete l[o];
|
|
850
847
|
return l;
|
|
851
848
|
}
|
|
852
849
|
function se(e) {
|
|
@@ -859,67 +856,67 @@ function se(e) {
|
|
|
859
856
|
n[l] = se(e[l]);
|
|
860
857
|
return n;
|
|
861
858
|
}
|
|
862
|
-
function
|
|
859
|
+
function at(e, n = !1) {
|
|
863
860
|
const l = {};
|
|
864
|
-
for (const [
|
|
861
|
+
for (const [o, t] of Object.entries(e))
|
|
865
862
|
if (!(t == null || t === ""))
|
|
866
863
|
if (n && typeof t == "object" && !Array.isArray(t) && !(t instanceof Date)) {
|
|
867
|
-
const
|
|
868
|
-
Object.keys(
|
|
864
|
+
const s = at(t, !0);
|
|
865
|
+
Object.keys(s).length > 0 && (l[o] = s);
|
|
869
866
|
} else
|
|
870
|
-
l[
|
|
867
|
+
l[o] = t;
|
|
871
868
|
return l;
|
|
872
869
|
}
|
|
873
|
-
function
|
|
874
|
-
const
|
|
875
|
-
for (const [t,
|
|
876
|
-
const
|
|
877
|
-
|
|
870
|
+
function nt(e, n = "", l = ".") {
|
|
871
|
+
const o = {};
|
|
872
|
+
for (const [t, s] of Object.entries(e)) {
|
|
873
|
+
const d = n ? `${n}${l}${t}` : t;
|
|
874
|
+
s !== null && typeof s == "object" && !Array.isArray(s) && !(s instanceof Date) ? Object.assign(o, nt(s, d, l)) : o[d] = s;
|
|
878
875
|
}
|
|
879
|
-
return
|
|
876
|
+
return o;
|
|
880
877
|
}
|
|
881
|
-
function
|
|
878
|
+
function pt(e, n = ".") {
|
|
882
879
|
const l = {};
|
|
883
|
-
for (const [
|
|
884
|
-
const
|
|
885
|
-
let
|
|
886
|
-
for (let
|
|
887
|
-
const
|
|
888
|
-
|
|
880
|
+
for (const [o, t] of Object.entries(e)) {
|
|
881
|
+
const s = o.split(n);
|
|
882
|
+
let d = l;
|
|
883
|
+
for (let m = 0; m < s.length - 1; m++) {
|
|
884
|
+
const h = s[m];
|
|
885
|
+
h in d || (d[h] = {}), d = d[h];
|
|
889
886
|
}
|
|
890
|
-
|
|
887
|
+
d[s[s.length - 1]] = t;
|
|
891
888
|
}
|
|
892
889
|
return l;
|
|
893
890
|
}
|
|
894
|
-
function
|
|
891
|
+
function vt(e) {
|
|
895
892
|
return Object.entries(e).map(([n, l]) => ({
|
|
896
893
|
id: n,
|
|
897
894
|
label: l,
|
|
898
895
|
prop: n
|
|
899
896
|
}));
|
|
900
897
|
}
|
|
901
|
-
const
|
|
902
|
-
|
|
898
|
+
const st = [je, De, q, Re, We, et, ce], ot = (e) => {
|
|
899
|
+
st.forEach((n) => {
|
|
903
900
|
e.component(n.name ?? n.__name ?? "", n);
|
|
904
901
|
});
|
|
905
|
-
},
|
|
902
|
+
}, gt = { install: ot };
|
|
906
903
|
export {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
904
|
+
je as JButton,
|
|
905
|
+
q as JIconRender,
|
|
906
|
+
We as JImportExcel,
|
|
907
|
+
Re as JSearchHeader,
|
|
911
908
|
ce as JSideMenuItem,
|
|
912
|
-
|
|
913
|
-
|
|
909
|
+
et as JSidebar,
|
|
910
|
+
De as JUploadImg,
|
|
914
911
|
se as deepClone,
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
912
|
+
gt as default,
|
|
913
|
+
at as filterEmpty,
|
|
914
|
+
nt as flatten,
|
|
915
|
+
ft as omit,
|
|
916
|
+
mt as pick,
|
|
917
|
+
lt as toCamelCase,
|
|
918
|
+
tt as toSnakeCase,
|
|
919
|
+
vt as toTableColumns,
|
|
920
|
+
pt as unflatten
|
|
924
921
|
};
|
|
925
922
|
//# sourceMappingURL=index.js.map
|