jgy-public-component 0.0.19 → 0.0.21
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/JButton/JButton.d.ts +1 -1
- package/dist/components/JSearchHeader/JSearchHeader.d.ts +2 -2
- package/dist/components/JUploadImg/JUploadImg.d.ts +2 -2
- package/dist/index.js +886 -897
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/router/guards copy.d.ts +6 -0
- package/dist/style.css +1 -1
- package/package.json +73 -73
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElMessage as
|
|
3
|
-
import { Delete as
|
|
4
|
-
import
|
|
5
|
-
import { Icon as
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as z, openBlock as r, createElementBlock as x, normalizeClass as U, createCommentVNode as C, renderSlot as D, ref as M, watch as ye, createVNode as f, unref as n, withCtx as d, createElementVNode as k, withModifiers as te, createBlock as y, Fragment as G, toDisplayString as I, mergeProps as xe, computed as Q, onMounted as Ie, onBeforeUnmount as Re, normalizeStyle as oe, createTextVNode as A, useModel as Se, renderList as Y, mergeModels as re, resolveComponent as Me, createSlots as Be } from "vue";
|
|
2
|
+
import { ElImage as ce, ElIcon as P, ElUpload as le, ElImageViewer as Ae, ElMessage as S, ElCard as be, ElForm as Te, ElButton as _, ElDialog as Ve, ElDivider as Fe, ElLink as De, ElRow as me, ElCol as X, ElTable as Je, ElTableColumn as ae, ElSubMenu as _e, ElMenuItem as ke, ElMenu as we, ElDropdown as Le, ElDropdownMenu as Pe, ElDropdownItem as fe } from "element-plus";
|
|
3
|
+
import { Delete as ne, Plus as se, Loading as pe, ZoomIn as ze, Search as Oe, Refresh as He, ArrowDown as Ce } from "@element-plus/icons-vue";
|
|
4
|
+
import Ne from "vuedraggable";
|
|
5
|
+
import { Icon as Ue } from "@iconify/vue";
|
|
6
|
+
import * as q from "xlsx";
|
|
7
|
+
import ie from "nprogress";
|
|
8
|
+
const We = ["disabled"], qe = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "j-button__loading-icon"
|
|
11
|
-
},
|
|
11
|
+
}, Ke = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "j-button__text"
|
|
14
|
-
},
|
|
14
|
+
}, Xe = /* @__PURE__ */ z({
|
|
15
15
|
__name: "JButton",
|
|
16
16
|
props: {
|
|
17
17
|
type: { default: "default" },
|
|
@@ -22,12 +22,12 @@ const Re = ["disabled"], Ie = {
|
|
|
22
22
|
loading: { type: Boolean, default: !1 }
|
|
23
23
|
},
|
|
24
24
|
emits: ["click"],
|
|
25
|
-
setup(e, { emit:
|
|
26
|
-
const t = e, l =
|
|
27
|
-
function
|
|
28
|
-
!t.disabled && !t.loading && l("click",
|
|
25
|
+
setup(e, { emit: s }) {
|
|
26
|
+
const t = e, l = s;
|
|
27
|
+
function a(i) {
|
|
28
|
+
!t.disabled && !t.loading && l("click", i);
|
|
29
29
|
}
|
|
30
|
-
return (
|
|
30
|
+
return (i, u) => (r(), x("button", {
|
|
31
31
|
class: U(["j-button", [
|
|
32
32
|
`j-button--${e.type}`,
|
|
33
33
|
`j-button--${e.size}`,
|
|
@@ -39,29 +39,29 @@ const Re = ["disabled"], Ie = {
|
|
|
39
39
|
}
|
|
40
40
|
]]),
|
|
41
41
|
disabled: e.disabled || e.loading,
|
|
42
|
-
onClick:
|
|
42
|
+
onClick: a
|
|
43
43
|
}, [
|
|
44
|
-
e.loading ? (
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
e.loading ? (r(), x("span", qe)) : C("", !0),
|
|
45
|
+
i.$slots.default ? (r(), x("span", Ke, [
|
|
46
|
+
D(i.$slots, "default", {}, void 0, !0)
|
|
47
47
|
])) : C("", !0)
|
|
48
|
-
], 10,
|
|
48
|
+
], 10, We));
|
|
49
49
|
}
|
|
50
|
-
}), W = (e,
|
|
50
|
+
}), W = (e, s) => {
|
|
51
51
|
const t = e.__vccOpts || e;
|
|
52
|
-
for (const [l,
|
|
53
|
-
t[l] =
|
|
52
|
+
for (const [l, a] of s)
|
|
53
|
+
t[l] = a;
|
|
54
54
|
return t;
|
|
55
|
-
},
|
|
55
|
+
}, Ze = /* @__PURE__ */ W(Xe, [["__scopeId", "data-v-22864824"]]), Ge = { class: "j-upload-img-container" }, Qe = {
|
|
56
56
|
key: 0,
|
|
57
57
|
class: "images-wrapper"
|
|
58
|
-
},
|
|
58
|
+
}, Ye = { class: "image-item" }, et = ["onClick"], tt = {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "image-item single-image-item"
|
|
61
|
-
},
|
|
61
|
+
}, at = { class: "image-actions" }, lt = {
|
|
62
62
|
key: 2,
|
|
63
63
|
class: "upload-tip"
|
|
64
|
-
},
|
|
64
|
+
}, nt = { key: 0 }, st = /* @__PURE__ */ z({
|
|
65
65
|
name: "JUploadImg",
|
|
66
66
|
__name: "JUploadImg",
|
|
67
67
|
props: {
|
|
@@ -76,188 +76,185 @@ const Re = ["disabled"], Ie = {
|
|
|
76
76
|
uploadFn: { type: Function, default: void 0 }
|
|
77
77
|
},
|
|
78
78
|
emits: ["update:modelValue", "success", "error"],
|
|
79
|
-
setup(e, { emit:
|
|
80
|
-
const t = e, l =
|
|
81
|
-
|
|
79
|
+
setup(e, { emit: s }) {
|
|
80
|
+
const t = e, l = s, a = M(""), i = M(!1), u = t.showTip, m = () => {
|
|
81
|
+
i.value = !0;
|
|
82
82
|
}, c = () => {
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
uid: Date.now() +
|
|
87
|
-
url:
|
|
83
|
+
a.value = "", l("update:modelValue", ""), S.success("删除成功");
|
|
84
|
+
}, v = M([]), p = M(!1), J = (E) => {
|
|
85
|
+
v.value = E.map((h, o) => ({
|
|
86
|
+
uid: Date.now() + o,
|
|
87
|
+
url: h
|
|
88
88
|
}));
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
t.multiple ? Array.isArray(
|
|
90
|
+
ye(() => t.modelValue, (E) => {
|
|
91
|
+
t.multiple ? Array.isArray(E) && E.length > 0 ? J(E) : v.value = [] : typeof E == "string" ? a.value = E : a.value = "";
|
|
92
92
|
}, { immediate: !0 });
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
100
|
-
|
|
93
|
+
const T = () => {
|
|
94
|
+
B();
|
|
95
|
+
}, $ = (E) => {
|
|
96
|
+
v.value.splice(E, 1), B(), S.success("删除成功");
|
|
97
|
+
}, b = async (E) => {
|
|
98
|
+
const h = E.raw;
|
|
99
|
+
if (!h) {
|
|
100
|
+
S.error("文件不存在,请重试");
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
103
|
+
if (h.size > t.maxSize * 1024 * 1024) {
|
|
104
|
+
S.error(`图片大小不能超过 ${t.maxSize}MB`);
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
if (!t.uploadFn) {
|
|
108
|
-
|
|
108
|
+
S.error("未配置上传函数 (uploadFn)");
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
try {
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
t.multiple ? (
|
|
115
|
-
} catch (
|
|
116
|
-
console.error("上传出错:",
|
|
112
|
+
p.value = !0;
|
|
113
|
+
const o = await t.uploadFn(h);
|
|
114
|
+
t.multiple ? (v.value.push({ uid: Date.now(), url: o }), B()) : (a.value = o, l("update:modelValue", o)), l("success", o), S.success("上传成功");
|
|
115
|
+
} catch (o) {
|
|
116
|
+
console.error("上传出错:", o), S.error("上传失败,请重试"), l("error", o);
|
|
117
117
|
} finally {
|
|
118
|
-
|
|
118
|
+
p.value = !1;
|
|
119
119
|
}
|
|
120
|
-
},
|
|
121
|
-
const
|
|
122
|
-
l("update:modelValue",
|
|
120
|
+
}, B = () => {
|
|
121
|
+
const E = v.value.map((h) => h.url);
|
|
122
|
+
l("update:modelValue", E);
|
|
123
123
|
};
|
|
124
|
-
return (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}, null, 8, ["src", "preview-src-list", "initial-index"]),
|
|
148
|
-
e.disabled ? C("", !0) : (d(), I("div", {
|
|
149
|
-
key: 0,
|
|
150
|
-
class: "delete-btn",
|
|
151
|
-
onClick: Y((M) => j(k), ["stop"])
|
|
152
|
-
}, [
|
|
153
|
-
f($, { class: "icon-delete" }, {
|
|
154
|
-
default: u(() => [
|
|
155
|
-
f(x(ee))
|
|
156
|
-
]),
|
|
157
|
-
_: 1
|
|
158
|
-
})
|
|
159
|
-
], 8, Ve))
|
|
160
|
-
])
|
|
161
|
-
]),
|
|
162
|
-
_: 1
|
|
163
|
-
}, 8, ["modelValue", "disabled"]),
|
|
164
|
-
!e.disabled && (!e.limit || h.value.length < e.limit) ? (d(), b(R, {
|
|
165
|
-
key: 0,
|
|
166
|
-
class: "image-uploader",
|
|
167
|
-
"auto-upload": !1,
|
|
168
|
-
"show-file-list": !1,
|
|
169
|
-
"on-change": g,
|
|
170
|
-
disabled: _.value,
|
|
171
|
-
"list-type": "picture-card",
|
|
172
|
-
accept: e.accept
|
|
173
|
-
}, {
|
|
174
|
-
default: u(() => [
|
|
175
|
-
_.value ? (d(), b($, {
|
|
176
|
-
key: 1,
|
|
177
|
-
class: "uploader-icon is-loading"
|
|
178
|
-
}, {
|
|
179
|
-
default: u(() => [
|
|
180
|
-
f(x(ie))
|
|
181
|
-
]),
|
|
182
|
-
_: 1
|
|
183
|
-
})) : (d(), b($, {
|
|
184
|
-
key: 0,
|
|
185
|
-
class: "uploader-icon"
|
|
186
|
-
}, {
|
|
187
|
-
default: u(() => [
|
|
188
|
-
f(x(te))
|
|
189
|
-
]),
|
|
190
|
-
_: 1
|
|
191
|
-
}))
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
}, 8, ["disabled", "accept"])) : C("", !0)
|
|
195
|
-
])) : (d(), I(Z, { key: 1 }, [
|
|
196
|
-
n.value ? (d(), I("div", Fe, [
|
|
197
|
-
f(s, {
|
|
198
|
-
src: n.value,
|
|
199
|
-
fit: "cover",
|
|
200
|
-
class: "image-preview"
|
|
201
|
-
}, null, 8, ["src"]),
|
|
202
|
-
y("div", Je, [
|
|
203
|
-
f($, {
|
|
204
|
-
class: "action-icon",
|
|
205
|
-
onClick: Y(r, ["stop"])
|
|
206
|
-
}, {
|
|
207
|
-
default: u(() => [
|
|
208
|
-
f(x(ke))
|
|
209
|
-
]),
|
|
210
|
-
_: 1
|
|
211
|
-
}),
|
|
212
|
-
e.disabled ? C("", !0) : (d(), b($, {
|
|
124
|
+
return (E, h) => (r(), x("div", Ge, [
|
|
125
|
+
e.multiple ? (r(), x("div", Qe, [
|
|
126
|
+
f(n(Ne), {
|
|
127
|
+
modelValue: v.value,
|
|
128
|
+
"onUpdate:modelValue": h[0] || (h[0] = (o) => v.value = o),
|
|
129
|
+
class: "images-list",
|
|
130
|
+
"item-key": "uid",
|
|
131
|
+
animation: 200,
|
|
132
|
+
disabled: e.disabled,
|
|
133
|
+
onEnd: T
|
|
134
|
+
}, {
|
|
135
|
+
item: d(({ element: o, index: w }) => [
|
|
136
|
+
k("div", Ye, [
|
|
137
|
+
f(n(ce), {
|
|
138
|
+
src: o.url,
|
|
139
|
+
"preview-src-list": v.value.map((R) => R.url),
|
|
140
|
+
"initial-index": w,
|
|
141
|
+
fit: "cover",
|
|
142
|
+
class: "image-preview",
|
|
143
|
+
"preview-teleported": !0,
|
|
144
|
+
"hide-on-click-modal": !0
|
|
145
|
+
}, null, 8, ["src", "preview-src-list", "initial-index"]),
|
|
146
|
+
e.disabled ? C("", !0) : (r(), x("div", {
|
|
213
147
|
key: 0,
|
|
214
|
-
class: "
|
|
215
|
-
onClick:
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
148
|
+
class: "delete-btn",
|
|
149
|
+
onClick: te((R) => $(w), ["stop"])
|
|
150
|
+
}, [
|
|
151
|
+
f(n(P), { class: "icon-delete" }, {
|
|
152
|
+
default: d(() => [
|
|
153
|
+
f(n(ne))
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
})
|
|
157
|
+
], 8, et))
|
|
222
158
|
])
|
|
223
|
-
])
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
])) : C("", !0)
|
|
257
|
-
])
|
|
258
|
-
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
}, 8, ["modelValue", "disabled"]),
|
|
162
|
+
!e.disabled && (!e.limit || v.value.length < e.limit) ? (r(), y(n(le), {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: "image-uploader",
|
|
165
|
+
"auto-upload": !1,
|
|
166
|
+
"show-file-list": !1,
|
|
167
|
+
"on-change": b,
|
|
168
|
+
disabled: p.value,
|
|
169
|
+
"list-type": "picture-card",
|
|
170
|
+
accept: e.accept
|
|
171
|
+
}, {
|
|
172
|
+
default: d(() => [
|
|
173
|
+
p.value ? (r(), y(n(P), {
|
|
174
|
+
key: 1,
|
|
175
|
+
class: "uploader-icon is-loading"
|
|
176
|
+
}, {
|
|
177
|
+
default: d(() => [
|
|
178
|
+
f(n(pe))
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
})) : (r(), y(n(P), {
|
|
182
|
+
key: 0,
|
|
183
|
+
class: "uploader-icon"
|
|
184
|
+
}, {
|
|
185
|
+
default: d(() => [
|
|
186
|
+
f(n(se))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
}))
|
|
190
|
+
]),
|
|
191
|
+
_: 1
|
|
192
|
+
}, 8, ["disabled", "accept"])) : C("", !0)
|
|
193
|
+
])) : (r(), x(G, { key: 1 }, [
|
|
194
|
+
a.value ? (r(), x("div", tt, [
|
|
195
|
+
f(n(ce), {
|
|
196
|
+
src: a.value,
|
|
197
|
+
fit: "cover",
|
|
198
|
+
class: "image-preview"
|
|
199
|
+
}, null, 8, ["src"]),
|
|
200
|
+
k("div", at, [
|
|
201
|
+
f(n(P), {
|
|
202
|
+
class: "action-icon",
|
|
203
|
+
onClick: te(m, ["stop"])
|
|
204
|
+
}, {
|
|
205
|
+
default: d(() => [
|
|
206
|
+
f(n(ze))
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
}),
|
|
210
|
+
e.disabled ? C("", !0) : (r(), y(n(P), {
|
|
211
|
+
key: 0,
|
|
212
|
+
class: "action-icon",
|
|
213
|
+
onClick: te(c, ["stop"])
|
|
214
|
+
}, {
|
|
215
|
+
default: d(() => [
|
|
216
|
+
f(n(ne))
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}))
|
|
220
|
+
])
|
|
221
|
+
])) : (r(), y(n(le), {
|
|
222
|
+
key: 1,
|
|
223
|
+
class: "image-uploader",
|
|
224
|
+
"auto-upload": !1,
|
|
225
|
+
"show-file-list": !1,
|
|
226
|
+
"on-change": b,
|
|
227
|
+
disabled: e.disabled || p.value,
|
|
228
|
+
accept: e.accept,
|
|
229
|
+
"list-type": "picture-card"
|
|
230
|
+
}, {
|
|
231
|
+
default: d(() => [
|
|
232
|
+
f(n(P), { class: "uploader-icon" }, {
|
|
233
|
+
default: d(() => [
|
|
234
|
+
p.value ? (r(), y(n(pe), {
|
|
235
|
+
key: 1,
|
|
236
|
+
class: "is-loading"
|
|
237
|
+
})) : (r(), y(n(se), { key: 0 }))
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
})
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
}, 8, ["disabled", "accept"])),
|
|
244
|
+
i.value ? (r(), y(n(Ae), {
|
|
245
|
+
key: 2,
|
|
246
|
+
"url-list": [a.value],
|
|
247
|
+
teleported: !0,
|
|
248
|
+
onClose: h[1] || (h[1] = (o) => i.value = !1)
|
|
249
|
+
}, null, 8, ["url-list"])) : C("", !0)
|
|
250
|
+
], 64)),
|
|
251
|
+
n(u) ? (r(), x("div", lt, [
|
|
252
|
+
k("span", null, I(e.tip), 1),
|
|
253
|
+
e.multiple && e.limit ? (r(), x("span", nt, " (最多 " + I(e.limit) + " 张)", 1)) : C("", !0)
|
|
254
|
+
])) : C("", !0)
|
|
255
|
+
]));
|
|
259
256
|
}
|
|
260
|
-
}),
|
|
257
|
+
}), it = /* @__PURE__ */ W(st, [["__scopeId", "data-v-7dc4f798"]]), Z = /* @__PURE__ */ z({
|
|
261
258
|
name: "JIconRender",
|
|
262
259
|
__name: "JIconRender",
|
|
263
260
|
props: {
|
|
@@ -265,14 +262,14 @@ const Re = ["disabled"], Ie = {
|
|
|
265
262
|
size: { default: 24 }
|
|
266
263
|
},
|
|
267
264
|
setup(e) {
|
|
268
|
-
return (
|
|
265
|
+
return (s, t) => e.icon ? (r(), y(n(Ue), xe({
|
|
269
266
|
key: 0,
|
|
270
267
|
icon: e.icon,
|
|
271
268
|
width: e.size,
|
|
272
269
|
height: e.size
|
|
273
|
-
},
|
|
270
|
+
}, s.$attrs), null, 16, ["icon", "width", "height"])) : C("", !0);
|
|
274
271
|
}
|
|
275
|
-
}),
|
|
272
|
+
}), ot = { class: "action-left" }, ut = /* @__PURE__ */ z({
|
|
276
273
|
name: "JSearchHeader",
|
|
277
274
|
__name: "JSearchHeader",
|
|
278
275
|
props: {
|
|
@@ -285,145 +282,142 @@ const Re = ["disabled"], Ie = {
|
|
|
285
282
|
showReset: { type: Boolean, default: !0 }
|
|
286
283
|
},
|
|
287
284
|
emits: ["search", "reset", "add", "batchDelete"],
|
|
288
|
-
setup(e, { emit:
|
|
289
|
-
const t = e, l =
|
|
290
|
-
if (!
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
if (
|
|
295
|
-
const
|
|
296
|
-
c.value =
|
|
285
|
+
setup(e, { emit: s }) {
|
|
286
|
+
const t = e, l = s, a = M(), i = M(!1), u = M(!1), m = M(0), c = M(0), v = Q(() => m.value > t.defaultVisible), p = () => {
|
|
287
|
+
if (!a.value) return;
|
|
288
|
+
const $ = Array.from(a.value.children);
|
|
289
|
+
m.value = $.length;
|
|
290
|
+
const b = $[t.defaultVisible - 1];
|
|
291
|
+
if (b && a.value) {
|
|
292
|
+
const B = a.value.getBoundingClientRect(), E = b.getBoundingClientRect();
|
|
293
|
+
c.value = E.bottom - B.top;
|
|
297
294
|
}
|
|
298
|
-
},
|
|
299
|
-
const
|
|
300
|
-
if (
|
|
301
|
-
if (
|
|
302
|
-
|
|
295
|
+
}, J = () => {
|
|
296
|
+
const $ = a.value;
|
|
297
|
+
if ($)
|
|
298
|
+
if (i.value)
|
|
299
|
+
p(), i.value = !1, $.style.maxHeight = $.scrollHeight + "px", $.offsetHeight, $.style.maxHeight = c.value + "px";
|
|
303
300
|
else {
|
|
304
|
-
|
|
305
|
-
const
|
|
306
|
-
|
|
301
|
+
i.value = !0, $.style.maxHeight = $.scrollHeight + "px";
|
|
302
|
+
const b = () => {
|
|
303
|
+
$.style.maxHeight = "none", $.removeEventListener("transitionend", b);
|
|
307
304
|
};
|
|
308
|
-
|
|
305
|
+
$.addEventListener("transitionend", b);
|
|
309
306
|
}
|
|
310
307
|
};
|
|
311
|
-
let
|
|
312
|
-
return
|
|
313
|
-
|
|
308
|
+
let T = null;
|
|
309
|
+
return Ie(() => {
|
|
310
|
+
p(), v.value && a.value && (a.value.style.maxHeight = c.value + "px"), requestAnimationFrame(() => {
|
|
314
311
|
requestAnimationFrame(() => {
|
|
315
|
-
|
|
312
|
+
u.value = !0;
|
|
316
313
|
});
|
|
317
|
-
}),
|
|
318
|
-
|
|
319
|
-
}),
|
|
320
|
-
}),
|
|
321
|
-
|
|
322
|
-
}), (
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
y("div", ze, [
|
|
349
|
-
e.showAdd ? (d(), b(m, {
|
|
350
|
-
key: 0,
|
|
351
|
-
type: "primary",
|
|
352
|
-
icon: x(te),
|
|
353
|
-
onClick: g[0] || (g[0] = ($) => l("add"))
|
|
354
|
-
}, {
|
|
355
|
-
default: u(() => [
|
|
356
|
-
D(S(e.addText), 1)
|
|
357
|
-
]),
|
|
358
|
-
_: 1
|
|
359
|
-
}, 8, ["icon"])) : C("", !0),
|
|
360
|
-
e.showBatchDelete ? (d(), b(m, {
|
|
361
|
-
key: 1,
|
|
362
|
-
type: "danger",
|
|
363
|
-
icon: x(ee),
|
|
364
|
-
disabled: e.selectedCount === 0,
|
|
365
|
-
onClick: g[1] || (g[1] = ($) => l("batchDelete"))
|
|
366
|
-
}, {
|
|
367
|
-
default: u(() => [
|
|
368
|
-
D(" 批量删除" + S(e.selectedCount ? `(${e.selectedCount})` : ""), 1)
|
|
369
|
-
]),
|
|
370
|
-
_: 1
|
|
371
|
-
}, 8, ["icon", "disabled"])) : C("", !0),
|
|
372
|
-
e.showSearch ? (d(), b(m, {
|
|
373
|
-
key: 2,
|
|
374
|
-
type: "primary",
|
|
375
|
-
icon: x(je),
|
|
376
|
-
onClick: g[2] || (g[2] = ($) => l("search"))
|
|
377
|
-
}, {
|
|
378
|
-
default: u(() => [...g[4] || (g[4] = [
|
|
379
|
-
D("搜索", -1)
|
|
380
|
-
])]),
|
|
381
|
-
_: 1
|
|
382
|
-
}, 8, ["icon"])) : C("", !0),
|
|
383
|
-
e.showReset ? (d(), b(m, {
|
|
384
|
-
key: 3,
|
|
385
|
-
icon: x($e),
|
|
386
|
-
onClick: g[3] || (g[3] = ($) => l("reset"))
|
|
387
|
-
}, {
|
|
388
|
-
default: u(() => [...g[5] || (g[5] = [
|
|
389
|
-
D("重置", -1)
|
|
390
|
-
])]),
|
|
391
|
-
_: 1
|
|
392
|
-
}, 8, ["icon"])) : C("", !0),
|
|
393
|
-
P(j.$slots, "actions", {}, void 0, !0)
|
|
394
|
-
]),
|
|
395
|
-
h.value ? (d(), b(m, {
|
|
314
|
+
}), a.value && (T = new MutationObserver(() => {
|
|
315
|
+
p(), v.value && !i.value && a.value && (a.value.style.maxHeight = c.value + "px");
|
|
316
|
+
}), T.observe(a.value, { childList: !0 }));
|
|
317
|
+
}), Re(() => {
|
|
318
|
+
T == null || T.disconnect();
|
|
319
|
+
}), ($, b) => (r(), y(n(be), {
|
|
320
|
+
shadow: "never",
|
|
321
|
+
class: "j-search-header-card"
|
|
322
|
+
}, {
|
|
323
|
+
default: d(() => [
|
|
324
|
+
f(n(Te), {
|
|
325
|
+
inline: "",
|
|
326
|
+
class: "search-form"
|
|
327
|
+
}, {
|
|
328
|
+
default: d(() => [
|
|
329
|
+
k("div", {
|
|
330
|
+
ref_key: "formItemsRef",
|
|
331
|
+
ref: a,
|
|
332
|
+
class: U(["form-items-wrapper", { "is-animated": u.value }])
|
|
333
|
+
}, [
|
|
334
|
+
D($.$slots, "default", {}, void 0, !0)
|
|
335
|
+
], 2)
|
|
336
|
+
]),
|
|
337
|
+
_: 3
|
|
338
|
+
}),
|
|
339
|
+
k("div", {
|
|
340
|
+
class: "action-bar",
|
|
341
|
+
style: oe({ marginTop: i.value ? "0px" : "10px" })
|
|
342
|
+
}, [
|
|
343
|
+
k("div", ot, [
|
|
344
|
+
e.showAdd ? (r(), y(n(_), {
|
|
396
345
|
key: 0,
|
|
397
|
-
link: "",
|
|
398
346
|
type: "primary",
|
|
399
|
-
|
|
347
|
+
icon: n(se),
|
|
348
|
+
onClick: b[0] || (b[0] = (B) => l("add"))
|
|
400
349
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
|
|
403
|
-
f(p, {
|
|
404
|
-
class: U(["toggle-icon", { "is-expanded": o.value }])
|
|
405
|
-
}, {
|
|
406
|
-
default: u(() => [
|
|
407
|
-
f(x(me))
|
|
408
|
-
]),
|
|
409
|
-
_: 1
|
|
410
|
-
}, 8, ["class"])
|
|
350
|
+
default: d(() => [
|
|
351
|
+
A(I(e.addText), 1)
|
|
411
352
|
]),
|
|
412
353
|
_: 1
|
|
413
|
-
})) : C("", !0)
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
354
|
+
}, 8, ["icon"])) : C("", !0),
|
|
355
|
+
e.showBatchDelete ? (r(), y(n(_), {
|
|
356
|
+
key: 1,
|
|
357
|
+
type: "danger",
|
|
358
|
+
icon: n(ne),
|
|
359
|
+
disabled: e.selectedCount === 0,
|
|
360
|
+
onClick: b[1] || (b[1] = (B) => l("batchDelete"))
|
|
361
|
+
}, {
|
|
362
|
+
default: d(() => [
|
|
363
|
+
A(" 批量删除" + I(e.selectedCount ? `(${e.selectedCount})` : ""), 1)
|
|
364
|
+
]),
|
|
365
|
+
_: 1
|
|
366
|
+
}, 8, ["icon", "disabled"])) : C("", !0),
|
|
367
|
+
e.showSearch ? (r(), y(n(_), {
|
|
368
|
+
key: 2,
|
|
369
|
+
type: "primary",
|
|
370
|
+
icon: n(Oe),
|
|
371
|
+
onClick: b[2] || (b[2] = (B) => l("search"))
|
|
372
|
+
}, {
|
|
373
|
+
default: d(() => [...b[4] || (b[4] = [
|
|
374
|
+
A("搜索", -1)
|
|
375
|
+
])]),
|
|
376
|
+
_: 1
|
|
377
|
+
}, 8, ["icon"])) : C("", !0),
|
|
378
|
+
e.showReset ? (r(), y(n(_), {
|
|
379
|
+
key: 3,
|
|
380
|
+
icon: n(He),
|
|
381
|
+
onClick: b[3] || (b[3] = (B) => l("reset"))
|
|
382
|
+
}, {
|
|
383
|
+
default: d(() => [...b[5] || (b[5] = [
|
|
384
|
+
A("重置", -1)
|
|
385
|
+
])]),
|
|
386
|
+
_: 1
|
|
387
|
+
}, 8, ["icon"])) : C("", !0),
|
|
388
|
+
D($.$slots, "actions", {}, void 0, !0)
|
|
389
|
+
]),
|
|
390
|
+
v.value ? (r(), y(n(_), {
|
|
391
|
+
key: 0,
|
|
392
|
+
link: "",
|
|
393
|
+
type: "primary",
|
|
394
|
+
onClick: J
|
|
395
|
+
}, {
|
|
396
|
+
default: d(() => [
|
|
397
|
+
A(I(i.value ? "收起" : "展开") + " ", 1),
|
|
398
|
+
f(n(P), {
|
|
399
|
+
class: U(["toggle-icon", { "is-expanded": i.value }])
|
|
400
|
+
}, {
|
|
401
|
+
default: d(() => [
|
|
402
|
+
f(n(Ce))
|
|
403
|
+
]),
|
|
404
|
+
_: 1
|
|
405
|
+
}, 8, ["class"])
|
|
406
|
+
]),
|
|
407
|
+
_: 1
|
|
408
|
+
})) : C("", !0)
|
|
409
|
+
], 4)
|
|
410
|
+
]),
|
|
411
|
+
_: 3
|
|
412
|
+
}));
|
|
419
413
|
}
|
|
420
|
-
}),
|
|
414
|
+
}), dt = /* @__PURE__ */ W(ut, [["__scopeId", "data-v-c1f4bf4c"]]), rt = { class: "j-import-upload-row" }, ct = { class: "j-import-stat-num" }, mt = { class: "j-import-stat-num" }, ft = { class: "j-import-stat-num" }, pt = {
|
|
421
415
|
key: 0,
|
|
422
416
|
class: "j-import-status-fail"
|
|
423
|
-
},
|
|
417
|
+
}, ht = { key: 1 }, vt = /* @__PURE__ */ z({
|
|
424
418
|
name: "JImportExcel",
|
|
425
419
|
__name: "JImportExcel",
|
|
426
|
-
props: /* @__PURE__ */
|
|
420
|
+
props: /* @__PURE__ */ re({
|
|
427
421
|
getFieldListApi: {},
|
|
428
422
|
importApi: {},
|
|
429
423
|
excludeFields: { default: () => ["id", "ctime", "mtime"] },
|
|
@@ -432,263 +426,263 @@ const Re = ["disabled"], Ie = {
|
|
|
432
426
|
modelValue: { type: Boolean, default: !1 },
|
|
433
427
|
modelModifiers: {}
|
|
434
428
|
}),
|
|
435
|
-
emits: /* @__PURE__ */
|
|
436
|
-
setup(e, { emit:
|
|
437
|
-
const t = e, l =
|
|
429
|
+
emits: /* @__PURE__ */ re(["success"], ["update:modelValue"]),
|
|
430
|
+
setup(e, { emit: s }) {
|
|
431
|
+
const t = e, l = s, a = Se(e, "modelValue"), i = M(!1), u = M({}), m = M([]), c = M({ total: 0, success: 0, fail: 0 }), v = {
|
|
438
432
|
0: "待创建",
|
|
439
433
|
1: "创建成功",
|
|
440
434
|
2: "创建中",
|
|
441
435
|
[-1]: "创建失败"
|
|
442
|
-
},
|
|
436
|
+
}, p = Q(() => Object.entries(u.value).filter(([h]) => !t.excludeFields.includes(h)).map(([h, o]) => ({ id: h, label: o, prop: h }))), J = async () => {
|
|
443
437
|
try {
|
|
444
|
-
const
|
|
445
|
-
|
|
438
|
+
const h = await t.getFieldListApi();
|
|
439
|
+
u.value = h.data.tableFieldsInfo ?? {};
|
|
446
440
|
} catch {
|
|
447
|
-
|
|
441
|
+
S.error("获取字段列表失败");
|
|
448
442
|
}
|
|
449
|
-
},
|
|
450
|
-
const
|
|
451
|
-
if (!
|
|
443
|
+
}, T = (h) => {
|
|
444
|
+
const o = h.raw;
|
|
445
|
+
if (!o) return;
|
|
452
446
|
if (![
|
|
453
447
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
454
448
|
"application/vnd.ms-excel"
|
|
455
|
-
].includes(
|
|
456
|
-
|
|
449
|
+
].includes(o.type) && !o.name.match(/\.xlsx?$/i)) {
|
|
450
|
+
S.warning("请上传 .xlsx 或 .xls 格式文件");
|
|
457
451
|
return;
|
|
458
452
|
}
|
|
459
453
|
const R = new FileReader();
|
|
460
|
-
R.onload = (
|
|
454
|
+
R.onload = (g) => {
|
|
461
455
|
try {
|
|
462
|
-
const
|
|
463
|
-
|
|
464
|
-
|
|
456
|
+
const L = q.read(g.target.result, { type: "binary" }), j = L.SheetNames[0], O = L.Sheets[j], K = q.utils.sheet_to_json(O, {
|
|
457
|
+
header: 1,
|
|
458
|
+
defval: ""
|
|
459
|
+
}).slice(1).filter((H) => H.some((N) => N !== ""));
|
|
460
|
+
if (!K.length) {
|
|
461
|
+
S.warning("文件内容为空");
|
|
465
462
|
return;
|
|
466
463
|
}
|
|
467
|
-
const
|
|
468
|
-
const
|
|
469
|
-
return
|
|
470
|
-
|
|
471
|
-
}),
|
|
464
|
+
const F = K.map((H) => {
|
|
465
|
+
const N = { _status: 0, _error: "" };
|
|
466
|
+
return p.value.forEach((ee, de) => {
|
|
467
|
+
N[ee.prop] = H[de] !== void 0 ? H[de] : "";
|
|
468
|
+
}), N;
|
|
472
469
|
});
|
|
473
|
-
|
|
470
|
+
m.value = F, c.value = { total: F.length, success: 0, fail: 0 };
|
|
474
471
|
} catch {
|
|
475
|
-
|
|
472
|
+
S.error("解析文件失败,请检查文件格式");
|
|
476
473
|
}
|
|
477
|
-
}, R.readAsBinaryString(
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
},
|
|
481
|
-
const
|
|
482
|
-
if (!
|
|
483
|
-
|
|
474
|
+
}, R.readAsBinaryString(o);
|
|
475
|
+
}, $ = (h) => {
|
|
476
|
+
m.value.splice(h, 1), c.value.total = m.value.length;
|
|
477
|
+
}, b = async () => {
|
|
478
|
+
const h = m.value.filter((o) => o._status === 0).map(({ _status: o, _error: w, ...R }) => R);
|
|
479
|
+
if (!h.length) {
|
|
480
|
+
S.warning("没有可导入的数据");
|
|
484
481
|
return;
|
|
485
482
|
}
|
|
486
|
-
|
|
483
|
+
i.value = !0;
|
|
487
484
|
try {
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
}), c.value.success =
|
|
485
|
+
const o = await t.importApi(h);
|
|
486
|
+
o.code === 1 ? (m.value.forEach((w) => {
|
|
487
|
+
w._status === 0 && (w._status = 1);
|
|
488
|
+
}), c.value.success = m.value.filter((w) => w._status === 1).length, S.success("导入成功"), l("success")) : S.error(o.msg || "导入失败");
|
|
492
489
|
} catch {
|
|
493
|
-
|
|
490
|
+
S.error("导入失败,请重试");
|
|
494
491
|
} finally {
|
|
495
|
-
|
|
492
|
+
i.value = !1;
|
|
496
493
|
}
|
|
497
|
-
},
|
|
494
|
+
}, B = () => {
|
|
498
495
|
try {
|
|
499
|
-
const
|
|
500
|
-
|
|
501
|
-
const R =
|
|
502
|
-
|
|
496
|
+
const h = q.utils.book_new(), o = p.value.map((g) => g.label), w = {};
|
|
497
|
+
o.forEach((g) => w[g] = "");
|
|
498
|
+
const R = q.utils.json_to_sheet([w]);
|
|
499
|
+
q.utils.book_append_sheet(h, R, "模板"), q.writeFile(h, "导入模板.xlsx");
|
|
503
500
|
} catch {
|
|
504
|
-
|
|
501
|
+
S.error("模板下载失败");
|
|
505
502
|
}
|
|
506
|
-
},
|
|
507
|
-
|
|
503
|
+
}, E = () => {
|
|
504
|
+
i.value || (a.value = !1, m.value = [], c.value = { total: 0, success: 0, fail: 0 });
|
|
508
505
|
};
|
|
509
|
-
return (
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
f(
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
"show-file-list": !1,
|
|
541
|
-
"on-change": V
|
|
542
|
-
}, {
|
|
543
|
-
default: u(() => [
|
|
544
|
-
f(R, { size: "small" }, {
|
|
545
|
-
default: u(() => [...s[1] || (s[1] = [
|
|
546
|
-
D("点击上传", -1)
|
|
547
|
-
])]),
|
|
548
|
-
_: 1
|
|
549
|
-
})
|
|
550
|
-
]),
|
|
551
|
-
_: 1
|
|
552
|
-
}),
|
|
553
|
-
_.value.length ? (d(), b(E, {
|
|
554
|
-
key: 0,
|
|
555
|
-
type: "primary",
|
|
556
|
-
class: "j-import-no-wrap",
|
|
557
|
-
onClick: J
|
|
558
|
-
}, {
|
|
559
|
-
default: u(() => [...s[2] || (s[2] = [
|
|
560
|
-
D(" 下载导入模板.xlsx ", -1)
|
|
561
|
-
])]),
|
|
562
|
-
_: 1
|
|
563
|
-
})) : C("", !0)
|
|
564
|
-
])
|
|
565
|
-
]),
|
|
566
|
-
_: 1
|
|
567
|
-
}),
|
|
568
|
-
f(T, {
|
|
569
|
-
class: "j-import-stats-row",
|
|
570
|
-
gutter: 20,
|
|
571
|
-
align: "middle"
|
|
572
|
-
}, {
|
|
573
|
-
default: u(() => [
|
|
574
|
-
f(M, { span: 18 }, {
|
|
575
|
-
default: u(() => [
|
|
576
|
-
f(T, { class: "j-import-stats-cols" }, {
|
|
577
|
-
default: u(() => [
|
|
578
|
-
f(M, {
|
|
579
|
-
span: 4,
|
|
580
|
-
class: "j-import-stat-item"
|
|
581
|
-
}, {
|
|
582
|
-
default: u(() => [
|
|
583
|
-
y("div", We, S(c.value.total), 1),
|
|
584
|
-
s[4] || (s[4] = y("div", { class: "j-import-stat-label" }, "导入数量", -1))
|
|
585
|
-
]),
|
|
586
|
-
_: 1
|
|
587
|
-
}),
|
|
588
|
-
f(M, {
|
|
589
|
-
span: 4,
|
|
590
|
-
class: "j-import-stat-item"
|
|
591
|
-
}, {
|
|
592
|
-
default: u(() => [
|
|
593
|
-
y("div", qe, S(c.value.fail), 1),
|
|
594
|
-
s[5] || (s[5] = y("div", { class: "j-import-stat-label" }, "失败数量", -1))
|
|
595
|
-
]),
|
|
596
|
-
_: 1
|
|
597
|
-
}),
|
|
598
|
-
f(M, {
|
|
599
|
-
span: 4,
|
|
600
|
-
class: "j-import-stat-item"
|
|
601
|
-
}, {
|
|
602
|
-
default: u(() => [
|
|
603
|
-
y("div", Ke, S(c.value.success), 1),
|
|
604
|
-
s[6] || (s[6] = y("div", { class: "j-import-stat-label" }, "成功数量", -1))
|
|
605
|
-
]),
|
|
606
|
-
_: 1
|
|
607
|
-
})
|
|
608
|
-
]),
|
|
609
|
-
_: 1
|
|
610
|
-
})
|
|
611
|
-
]),
|
|
612
|
-
_: 1
|
|
613
|
-
}),
|
|
614
|
-
f(M, {
|
|
615
|
-
span: 6,
|
|
616
|
-
class: "j-import-confirm-col"
|
|
506
|
+
return (h, o) => (r(), y(n(Ve), {
|
|
507
|
+
modelValue: a.value,
|
|
508
|
+
"onUpdate:modelValue": o[0] || (o[0] = (w) => a.value = w),
|
|
509
|
+
title: t.title,
|
|
510
|
+
width: "900px",
|
|
511
|
+
"close-on-click-modal": !1,
|
|
512
|
+
onOpen: J,
|
|
513
|
+
onClose: E
|
|
514
|
+
}, {
|
|
515
|
+
footer: d(() => [
|
|
516
|
+
f(n(_), { onClick: E }, {
|
|
517
|
+
default: d(() => [...o[9] || (o[9] = [
|
|
518
|
+
A("关闭", -1)
|
|
519
|
+
])]),
|
|
520
|
+
_: 1
|
|
521
|
+
})
|
|
522
|
+
]),
|
|
523
|
+
default: d(() => [
|
|
524
|
+
f(n(be), {
|
|
525
|
+
shadow: "never",
|
|
526
|
+
class: "j-import-upload-card"
|
|
527
|
+
}, {
|
|
528
|
+
default: d(() => [
|
|
529
|
+
o[3] || (o[3] = k("div", { class: "j-import-upload-card-title" }, "导入 EXCEL", -1)),
|
|
530
|
+
f(n(Fe), { style: { margin: "10px 0" } }),
|
|
531
|
+
k("div", rt, [
|
|
532
|
+
f(n(le), {
|
|
533
|
+
accept: ".xlsx,.xls",
|
|
534
|
+
"auto-upload": !1,
|
|
535
|
+
"show-file-list": !1,
|
|
536
|
+
"on-change": T
|
|
617
537
|
}, {
|
|
618
|
-
default:
|
|
619
|
-
f(
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
loading: o.value,
|
|
623
|
-
disabled: !r.value.length,
|
|
624
|
-
onClick: g
|
|
625
|
-
}, {
|
|
626
|
-
default: u(() => [...s[7] || (s[7] = [
|
|
627
|
-
D(" 确认导入 ", -1)
|
|
538
|
+
default: d(() => [
|
|
539
|
+
f(n(_), { size: "small" }, {
|
|
540
|
+
default: d(() => [...o[1] || (o[1] = [
|
|
541
|
+
A("点击上传", -1)
|
|
628
542
|
])]),
|
|
629
543
|
_: 1
|
|
630
|
-
}
|
|
631
|
-
]),
|
|
632
|
-
_: 1
|
|
633
|
-
})
|
|
634
|
-
]),
|
|
635
|
-
_: 1
|
|
636
|
-
}),
|
|
637
|
-
f(L, {
|
|
638
|
-
data: r.value,
|
|
639
|
-
border: "",
|
|
640
|
-
size: "small",
|
|
641
|
-
"max-height": "360",
|
|
642
|
-
class: "j-import-data-table"
|
|
643
|
-
}, {
|
|
644
|
-
default: u(() => [
|
|
645
|
-
(d(!0), I(Z, null, Q(_.value, (A) => (d(), b(z, {
|
|
646
|
-
key: A.prop,
|
|
647
|
-
prop: A.prop,
|
|
648
|
-
label: A.label,
|
|
649
|
-
"min-width": 120,
|
|
650
|
-
"show-overflow-tooltip": ""
|
|
651
|
-
}, null, 8, ["prop", "label"]))), 128)),
|
|
652
|
-
f(z, {
|
|
653
|
-
label: "状态",
|
|
654
|
-
width: "110",
|
|
655
|
-
align: "center",
|
|
656
|
-
fixed: "right"
|
|
657
|
-
}, {
|
|
658
|
-
default: u(({ row: A }) => [
|
|
659
|
-
A._status === -1 ? (d(), I("span", Xe, S(A._error || "创建失败"), 1)) : (d(), I("span", Ze, S(h[A._status]), 1))
|
|
544
|
+
})
|
|
660
545
|
]),
|
|
661
546
|
_: 1
|
|
662
547
|
}),
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
548
|
+
p.value.length ? (r(), y(n(De), {
|
|
549
|
+
key: 0,
|
|
550
|
+
type: "primary",
|
|
551
|
+
class: "j-import-no-wrap",
|
|
552
|
+
onClick: B
|
|
668
553
|
}, {
|
|
669
|
-
default:
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
size: "small",
|
|
673
|
-
onClick: (oe) => j(A)
|
|
674
|
-
}, {
|
|
675
|
-
default: u(() => [...s[8] || (s[8] = [
|
|
676
|
-
D(" 删除 ", -1)
|
|
677
|
-
])]),
|
|
678
|
-
_: 1
|
|
679
|
-
}, 8, ["onClick"])) : C("", !0)
|
|
680
|
-
]),
|
|
554
|
+
default: d(() => [...o[2] || (o[2] = [
|
|
555
|
+
A(" 下载导入模板.xlsx ", -1)
|
|
556
|
+
])]),
|
|
681
557
|
_: 1
|
|
682
|
-
})
|
|
683
|
-
])
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
558
|
+
})) : C("", !0)
|
|
559
|
+
])
|
|
560
|
+
]),
|
|
561
|
+
_: 1
|
|
562
|
+
}),
|
|
563
|
+
f(n(me), {
|
|
564
|
+
class: "j-import-stats-row",
|
|
565
|
+
gutter: 20,
|
|
566
|
+
align: "middle"
|
|
567
|
+
}, {
|
|
568
|
+
default: d(() => [
|
|
569
|
+
f(n(X), { span: 18 }, {
|
|
570
|
+
default: d(() => [
|
|
571
|
+
f(n(me), { class: "j-import-stats-cols" }, {
|
|
572
|
+
default: d(() => [
|
|
573
|
+
f(n(X), {
|
|
574
|
+
span: 4,
|
|
575
|
+
class: "j-import-stat-item"
|
|
576
|
+
}, {
|
|
577
|
+
default: d(() => [
|
|
578
|
+
k("div", ct, I(c.value.total), 1),
|
|
579
|
+
o[4] || (o[4] = k("div", { class: "j-import-stat-label" }, "导入数量", -1))
|
|
580
|
+
]),
|
|
581
|
+
_: 1
|
|
582
|
+
}),
|
|
583
|
+
f(n(X), {
|
|
584
|
+
span: 4,
|
|
585
|
+
class: "j-import-stat-item"
|
|
586
|
+
}, {
|
|
587
|
+
default: d(() => [
|
|
588
|
+
k("div", mt, I(c.value.fail), 1),
|
|
589
|
+
o[5] || (o[5] = k("div", { class: "j-import-stat-label" }, "失败数量", -1))
|
|
590
|
+
]),
|
|
591
|
+
_: 1
|
|
592
|
+
}),
|
|
593
|
+
f(n(X), {
|
|
594
|
+
span: 4,
|
|
595
|
+
class: "j-import-stat-item"
|
|
596
|
+
}, {
|
|
597
|
+
default: d(() => [
|
|
598
|
+
k("div", ft, I(c.value.success), 1),
|
|
599
|
+
o[6] || (o[6] = k("div", { class: "j-import-stat-label" }, "成功数量", -1))
|
|
600
|
+
]),
|
|
601
|
+
_: 1
|
|
602
|
+
})
|
|
603
|
+
]),
|
|
604
|
+
_: 1
|
|
605
|
+
})
|
|
606
|
+
]),
|
|
607
|
+
_: 1
|
|
608
|
+
}),
|
|
609
|
+
f(n(X), {
|
|
610
|
+
span: 6,
|
|
611
|
+
class: "j-import-confirm-col"
|
|
612
|
+
}, {
|
|
613
|
+
default: d(() => [
|
|
614
|
+
f(n(_), {
|
|
615
|
+
type: "primary",
|
|
616
|
+
size: "small",
|
|
617
|
+
loading: i.value,
|
|
618
|
+
disabled: !m.value.length,
|
|
619
|
+
onClick: b
|
|
620
|
+
}, {
|
|
621
|
+
default: d(() => [...o[7] || (o[7] = [
|
|
622
|
+
A(" 确认导入 ", -1)
|
|
623
|
+
])]),
|
|
624
|
+
_: 1
|
|
625
|
+
}, 8, ["loading", "disabled"])
|
|
626
|
+
]),
|
|
627
|
+
_: 1
|
|
628
|
+
})
|
|
629
|
+
]),
|
|
630
|
+
_: 1
|
|
631
|
+
}),
|
|
632
|
+
f(n(Je), {
|
|
633
|
+
data: m.value,
|
|
634
|
+
border: "",
|
|
635
|
+
size: "small",
|
|
636
|
+
"max-height": "360",
|
|
637
|
+
class: "j-import-data-table"
|
|
638
|
+
}, {
|
|
639
|
+
default: d(() => [
|
|
640
|
+
(r(!0), x(G, null, Y(p.value, (w) => (r(), y(n(ae), {
|
|
641
|
+
key: w.prop,
|
|
642
|
+
prop: w.prop,
|
|
643
|
+
label: w.label,
|
|
644
|
+
"min-width": 120,
|
|
645
|
+
"show-overflow-tooltip": ""
|
|
646
|
+
}, null, 8, ["prop", "label"]))), 128)),
|
|
647
|
+
f(n(ae), {
|
|
648
|
+
label: "状态",
|
|
649
|
+
width: "110",
|
|
650
|
+
align: "center",
|
|
651
|
+
fixed: "right"
|
|
652
|
+
}, {
|
|
653
|
+
default: d(({ row: w }) => [
|
|
654
|
+
w._status === -1 ? (r(), x("span", pt, I(w._error || "创建失败"), 1)) : (r(), x("span", ht, I(v[w._status]), 1))
|
|
655
|
+
]),
|
|
656
|
+
_: 1
|
|
657
|
+
}),
|
|
658
|
+
f(n(ae), {
|
|
659
|
+
label: "操作",
|
|
660
|
+
width: "80",
|
|
661
|
+
align: "center",
|
|
662
|
+
fixed: "right"
|
|
663
|
+
}, {
|
|
664
|
+
default: d(({ $index: w, row: R }) => [
|
|
665
|
+
R._status === 0 ? (r(), y(n(_), {
|
|
666
|
+
key: 0,
|
|
667
|
+
size: "small",
|
|
668
|
+
onClick: (g) => $(w)
|
|
669
|
+
}, {
|
|
670
|
+
default: d(() => [...o[8] || (o[8] = [
|
|
671
|
+
A(" 删除 ", -1)
|
|
672
|
+
])]),
|
|
673
|
+
_: 1
|
|
674
|
+
}, 8, ["onClick"])) : C("", !0)
|
|
675
|
+
]),
|
|
676
|
+
_: 1
|
|
677
|
+
})
|
|
678
|
+
]),
|
|
679
|
+
_: 1
|
|
680
|
+
}, 8, ["data"])
|
|
681
|
+
]),
|
|
682
|
+
_: 1
|
|
683
|
+
}, 8, ["modelValue", "title"]));
|
|
690
684
|
}
|
|
691
|
-
}),
|
|
685
|
+
}), gt = /* @__PURE__ */ W(vt, [["__scopeId", "data-v-74dcefaa"]]), yt = { class: "j-sidebar__menu-item-title" }, bt = /* @__PURE__ */ z({
|
|
692
686
|
name: "JSideMenuItem",
|
|
693
687
|
__name: "JSideMenuItem",
|
|
694
688
|
props: {
|
|
@@ -697,45 +691,45 @@ const Re = ["disabled"], Ie = {
|
|
|
697
691
|
depth: { default: 0 }
|
|
698
692
|
},
|
|
699
693
|
emits: ["menu-click"],
|
|
700
|
-
setup(e, { emit:
|
|
701
|
-
const t = e, l =
|
|
694
|
+
setup(e, { emit: s }) {
|
|
695
|
+
const t = e, l = s, a = () => {
|
|
702
696
|
l("menu-click", t.menuItem);
|
|
703
697
|
};
|
|
704
|
-
return (
|
|
705
|
-
const
|
|
706
|
-
return e.menuItem.children && e.menuItem.children.length > 0 ? (
|
|
698
|
+
return (i, u) => {
|
|
699
|
+
const m = Me("JSideMenuItem", !0);
|
|
700
|
+
return e.menuItem.children && e.menuItem.children.length > 0 ? (r(), y(n(_e), {
|
|
707
701
|
key: 0,
|
|
708
702
|
index: e.menuItem.path,
|
|
709
703
|
class: U([`j-sidebar__depth-${e.depth}`])
|
|
710
704
|
}, {
|
|
711
|
-
title:
|
|
712
|
-
e.menuItem.icon && e.depth === 0 ? (
|
|
705
|
+
title: d(() => [
|
|
706
|
+
e.menuItem.icon && e.depth === 0 ? (r(), y(n(Z), {
|
|
713
707
|
key: 0,
|
|
714
708
|
icon: e.menuItem.icon
|
|
715
709
|
}, null, 8, ["icon"])) : C("", !0),
|
|
716
|
-
|
|
710
|
+
k("span", yt, I(e.menuItem.title || e.menuItem.name), 1)
|
|
717
711
|
]),
|
|
718
|
-
default:
|
|
719
|
-
(
|
|
720
|
-
key:
|
|
721
|
-
"menu-item":
|
|
712
|
+
default: d(() => [
|
|
713
|
+
(r(!0), x(G, null, Y(e.menuItem.children, (c) => (r(), y(m, {
|
|
714
|
+
key: c.path,
|
|
715
|
+
"menu-item": c,
|
|
722
716
|
"is-collapse": e.isCollapse,
|
|
723
717
|
depth: e.depth + 1,
|
|
724
|
-
onMenuClick:
|
|
718
|
+
onMenuClick: u[0] || (u[0] = (v) => l("menu-click", v))
|
|
725
719
|
}, null, 8, ["menu-item", "is-collapse", "depth"]))), 128))
|
|
726
720
|
]),
|
|
727
721
|
_: 1
|
|
728
|
-
}, 8, ["index", "class"])) : (
|
|
722
|
+
}, 8, ["index", "class"])) : (r(), y(n(ke), {
|
|
729
723
|
key: 1,
|
|
730
724
|
index: e.menuItem.path,
|
|
731
725
|
class: U([`j-sidebar__depth-${e.depth}`]),
|
|
732
|
-
onClick:
|
|
726
|
+
onClick: a
|
|
733
727
|
}, {
|
|
734
|
-
title:
|
|
735
|
-
|
|
728
|
+
title: d(() => [
|
|
729
|
+
k("span", null, I(e.menuItem.title || e.menuItem.name), 1)
|
|
736
730
|
]),
|
|
737
|
-
default:
|
|
738
|
-
e.menuItem.icon && e.depth === 0 ? (
|
|
731
|
+
default: d(() => [
|
|
732
|
+
e.menuItem.icon && e.depth === 0 ? (r(), y(n(Z), {
|
|
739
733
|
key: 0,
|
|
740
734
|
icon: e.menuItem.icon
|
|
741
735
|
}, null, 8, ["icon"])) : C("", !0)
|
|
@@ -744,7 +738,7 @@ const Re = ["disabled"], Ie = {
|
|
|
744
738
|
}, 8, ["index", "class"]));
|
|
745
739
|
};
|
|
746
740
|
}
|
|
747
|
-
}),
|
|
741
|
+
}), $e = /* @__PURE__ */ W(bt, [["__scopeId", "data-v-3a990426"]]), kt = { class: "j-sidebar__logo" }, wt = { class: "j-sidebar__title" }, Ct = { class: "j-sidebar__menu-wrapper" }, $t = { class: "j-sidebar__footer" }, jt = /* @__PURE__ */ z({
|
|
748
742
|
name: "JSidebar",
|
|
749
743
|
__name: "JSidebar",
|
|
750
744
|
props: {
|
|
@@ -758,69 +752,66 @@ const Re = ["disabled"], Ie = {
|
|
|
758
752
|
router: { type: Boolean, default: !0 }
|
|
759
753
|
},
|
|
760
754
|
emits: ["update:collapsed", "menu-click"],
|
|
761
|
-
setup(e, { emit:
|
|
762
|
-
const t = e, l =
|
|
763
|
-
|
|
764
|
-
|
|
755
|
+
setup(e, { emit: s }) {
|
|
756
|
+
const t = e, l = s, a = M(t.collapsed);
|
|
757
|
+
ye(() => t.collapsed, (u) => {
|
|
758
|
+
a.value = u;
|
|
765
759
|
});
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
};
|
|
769
|
-
return (i, r) => {
|
|
770
|
-
const c = w("el-menu");
|
|
771
|
-
return d(), I("div", {
|
|
772
|
-
class: U(["j-sidebar", n.value ? "j-sidebar--collapsed" : "j-sidebar--expanded"]),
|
|
773
|
-
style: le({ width: n.value ? `${e.collapsedWidth}px` : `${e.expandedWidth}px` })
|
|
774
|
-
}, [
|
|
775
|
-
y("div", tt, [
|
|
776
|
-
P(i.$slots, "logo", { collapsed: n.value }, () => {
|
|
777
|
-
var h;
|
|
778
|
-
return [
|
|
779
|
-
y("h2", nt, S(n.value ? e.collapsedTitle || ((h = e.title) == null ? void 0 : h.charAt(0)) || "" : e.title), 1)
|
|
780
|
-
];
|
|
781
|
-
}, !0)
|
|
782
|
-
]),
|
|
783
|
-
y("div", lt, [
|
|
784
|
-
f(c, {
|
|
785
|
-
"default-active": e.activeMenu,
|
|
786
|
-
class: "j-sidebar__menu",
|
|
787
|
-
router: e.router,
|
|
788
|
-
collapse: n.value,
|
|
789
|
-
"collapse-transition": !1
|
|
790
|
-
}, {
|
|
791
|
-
default: u(() => [
|
|
792
|
-
(d(!0), I(Z, null, Q(e.menus, (h) => (d(), b(fe, {
|
|
793
|
-
key: h.path,
|
|
794
|
-
"menu-item": h,
|
|
795
|
-
"is-collapse": n.value,
|
|
796
|
-
onMenuClick: r[0] || (r[0] = (_) => l("menu-click", _))
|
|
797
|
-
}, null, 8, ["menu-item", "is-collapse"]))), 128))
|
|
798
|
-
]),
|
|
799
|
-
_: 1
|
|
800
|
-
}, 8, ["default-active", "router", "collapse"])
|
|
801
|
-
]),
|
|
802
|
-
y("div", at, [
|
|
803
|
-
P(i.$slots, "footer", {
|
|
804
|
-
collapsed: n.value,
|
|
805
|
-
toggle: o
|
|
806
|
-
}, () => [
|
|
807
|
-
y("button", {
|
|
808
|
-
class: "j-sidebar__collapse-btn",
|
|
809
|
-
onClick: o
|
|
810
|
-
}, [
|
|
811
|
-
f(x(X), {
|
|
812
|
-
icon: n.value ? "mdi:chevron-right" : "mdi:chevron-left"
|
|
813
|
-
}, null, 8, ["icon"])
|
|
814
|
-
])
|
|
815
|
-
], !0)
|
|
816
|
-
])
|
|
817
|
-
], 6);
|
|
760
|
+
const i = () => {
|
|
761
|
+
a.value = !a.value, l("update:collapsed", a.value);
|
|
818
762
|
};
|
|
763
|
+
return (u, m) => (r(), x("div", {
|
|
764
|
+
class: U(["j-sidebar", a.value ? "j-sidebar--collapsed" : "j-sidebar--expanded"]),
|
|
765
|
+
style: oe({ width: a.value ? `${e.collapsedWidth}px` : `${e.expandedWidth}px` })
|
|
766
|
+
}, [
|
|
767
|
+
k("div", kt, [
|
|
768
|
+
D(u.$slots, "logo", { collapsed: a.value }, () => {
|
|
769
|
+
var c;
|
|
770
|
+
return [
|
|
771
|
+
k("h2", wt, I(a.value ? e.collapsedTitle || ((c = e.title) == null ? void 0 : c.charAt(0)) || "" : e.title), 1)
|
|
772
|
+
];
|
|
773
|
+
}, !0)
|
|
774
|
+
]),
|
|
775
|
+
k("div", Ct, [
|
|
776
|
+
f(n(we), {
|
|
777
|
+
"default-active": e.activeMenu,
|
|
778
|
+
class: "j-sidebar__menu",
|
|
779
|
+
router: e.router,
|
|
780
|
+
collapse: a.value,
|
|
781
|
+
"collapse-transition": !1
|
|
782
|
+
}, {
|
|
783
|
+
default: d(() => [
|
|
784
|
+
(r(!0), x(G, null, Y(e.menus, (c) => (r(), y($e, {
|
|
785
|
+
key: c.path,
|
|
786
|
+
"menu-item": c,
|
|
787
|
+
"is-collapse": a.value,
|
|
788
|
+
onMenuClick: m[0] || (m[0] = (v) => l("menu-click", v))
|
|
789
|
+
}, null, 8, ["menu-item", "is-collapse"]))), 128))
|
|
790
|
+
]),
|
|
791
|
+
_: 1
|
|
792
|
+
}, 8, ["default-active", "router", "collapse"])
|
|
793
|
+
]),
|
|
794
|
+
k("div", $t, [
|
|
795
|
+
D(u.$slots, "footer", {
|
|
796
|
+
collapsed: a.value,
|
|
797
|
+
toggle: i
|
|
798
|
+
}, () => [
|
|
799
|
+
k("button", {
|
|
800
|
+
class: "j-sidebar__collapse-btn",
|
|
801
|
+
onClick: i
|
|
802
|
+
}, [
|
|
803
|
+
f(n(Z), {
|
|
804
|
+
icon: a.value ? "mdi:chevron-right" : "mdi:chevron-left"
|
|
805
|
+
}, null, 8, ["icon"])
|
|
806
|
+
])
|
|
807
|
+
], !0)
|
|
808
|
+
])
|
|
809
|
+
], 6));
|
|
819
810
|
}
|
|
820
|
-
}),
|
|
811
|
+
}), je = /* @__PURE__ */ W(jt, [["__scopeId", "data-v-a3fac9de"]]), Et = { class: "j-admin-layout__right-panel" }, xt = { class: "j-admin-layout__header" }, It = { class: "j-admin-layout__header-left" }, Rt = {
|
|
821
812
|
key: 0,
|
|
822
813
|
class: "j-admin-layout__logo"
|
|
823
|
-
},
|
|
814
|
+
}, St = { class: "j-admin-layout__header-right" }, Mt = { class: "j-admin-layout__user" }, Bt = { class: "j-admin-layout__content-container" }, At = /* @__PURE__ */ z({
|
|
824
815
|
name: "JAdminLayout",
|
|
825
816
|
__name: "JAdminLayout",
|
|
826
817
|
props: {
|
|
@@ -846,417 +837,415 @@ const Re = ["disabled"], Ie = {
|
|
|
846
837
|
hideContentScrollbar: { type: Boolean, default: !1 }
|
|
847
838
|
},
|
|
848
839
|
emits: ["update:collapsed", "top-menu-select", "side-menu-click", "profile", "logout"],
|
|
849
|
-
setup(e, { emit:
|
|
850
|
-
const t = e, l =
|
|
840
|
+
setup(e, { emit: s }) {
|
|
841
|
+
const t = e, l = s, a = Q({
|
|
851
842
|
get: () => t.collapsed,
|
|
852
843
|
set: (c) => l("update:collapsed", c)
|
|
853
|
-
}),
|
|
844
|
+
}), i = Q(() => ({
|
|
854
845
|
"--j-admin-layout-header-height": t.headerHeight,
|
|
855
846
|
"--j-admin-layout-content-padding": t.contentPadding,
|
|
856
847
|
"--j-admin-layout-content-bg": t.contentBackground,
|
|
857
848
|
"--j-admin-layout-header-bg": t.headerBackground
|
|
858
|
-
})),
|
|
849
|
+
})), u = (c) => {
|
|
859
850
|
l("top-menu-select", c);
|
|
860
|
-
},
|
|
851
|
+
}, m = (c) => {
|
|
861
852
|
l("side-menu-click", c);
|
|
862
853
|
};
|
|
863
|
-
return (c,
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
854
|
+
return (c, v) => (r(), x("div", {
|
|
855
|
+
class: "j-admin-layout",
|
|
856
|
+
style: oe(i.value)
|
|
857
|
+
}, [
|
|
858
|
+
e.sideMenus.length > 0 ? (r(), y(n(je), {
|
|
859
|
+
key: 0,
|
|
860
|
+
collapsed: a.value,
|
|
861
|
+
"onUpdate:collapsed": v[0] || (v[0] = (p) => a.value = p),
|
|
862
|
+
menus: e.sideMenus,
|
|
863
|
+
"active-menu": e.activeMenu,
|
|
864
|
+
title: e.title,
|
|
865
|
+
"collapsed-title": e.collapsedTitle,
|
|
866
|
+
"collapsed-width": e.sidebarCollapsedWidth,
|
|
867
|
+
"expanded-width": e.sidebarExpandedWidth,
|
|
868
|
+
onMenuClick: m
|
|
869
|
+
}, Be({ _: 2 }, [
|
|
870
|
+
c.$slots.sidebarFooter ? {
|
|
871
|
+
name: "footer",
|
|
872
|
+
fn: d(({ collapsed: p, toggle: J }) => [
|
|
873
|
+
D(c.$slots, "sidebarFooter", {
|
|
874
|
+
collapsed: p,
|
|
875
|
+
toggle: J
|
|
876
|
+
}, void 0, !0)
|
|
877
|
+
]),
|
|
878
|
+
key: "0"
|
|
879
|
+
} : void 0
|
|
880
|
+
]), 1032, ["collapsed", "menus", "active-menu", "title", "collapsed-title", "collapsed-width", "expanded-width"])) : C("", !0),
|
|
881
|
+
k("div", Et, [
|
|
882
|
+
k("div", xt, [
|
|
883
|
+
k("div", It, [
|
|
884
|
+
e.sideMenus.length === 0 ? (r(), x("div", Rt, [
|
|
885
|
+
D(c.$slots, "logo", {}, () => [
|
|
886
|
+
k("h2", null, I(e.logoTitle || e.title), 1)
|
|
887
|
+
], !0)
|
|
888
|
+
])) : C("", !0),
|
|
889
|
+
f(n(we), {
|
|
890
|
+
mode: "horizontal",
|
|
891
|
+
"default-active": e.activeTopMenu,
|
|
892
|
+
class: "j-admin-layout__top-menu",
|
|
893
|
+
onSelect: u
|
|
894
|
+
}, {
|
|
895
|
+
default: d(() => [
|
|
896
|
+
(r(!0), x(G, null, Y(e.topMenus, (p) => (r(), y(n(ke), {
|
|
897
|
+
key: p.path,
|
|
898
|
+
index: p.path
|
|
899
|
+
}, {
|
|
900
|
+
default: d(() => [
|
|
901
|
+
p.icon ? (r(), y(n(Z), {
|
|
902
|
+
key: 0,
|
|
903
|
+
icon: p.icon,
|
|
904
|
+
class: "j-admin-layout__top-menu-icon"
|
|
905
|
+
}, null, 8, ["icon"])) : C("", !0),
|
|
906
|
+
k("span", null, I(p.title || p.name), 1)
|
|
907
|
+
]),
|
|
908
|
+
_: 2
|
|
909
|
+
}, 1032, ["index"]))), 128))
|
|
910
|
+
]),
|
|
911
|
+
_: 1
|
|
912
|
+
}, 8, ["default-active"])
|
|
913
|
+
]),
|
|
914
|
+
k("div", St, [
|
|
915
|
+
D(c.$slots, "headerRight", { username: e.username }, () => [
|
|
916
|
+
e.showProfile || e.showLogout ? (r(), y(n(Le), { key: 0 }, {
|
|
917
|
+
dropdown: d(() => [
|
|
918
|
+
f(n(Pe), null, {
|
|
919
|
+
default: d(() => [
|
|
920
|
+
e.showProfile ? (r(), y(n(fe), {
|
|
921
|
+
key: 0,
|
|
922
|
+
onClick: v[1] || (v[1] = (p) => l("profile"))
|
|
923
|
+
}, {
|
|
924
|
+
default: d(() => [
|
|
925
|
+
A(I(e.profileText), 1)
|
|
926
|
+
]),
|
|
927
|
+
_: 1
|
|
928
|
+
})) : C("", !0),
|
|
929
|
+
e.showLogout ? (r(), y(n(fe), {
|
|
930
|
+
key: 1,
|
|
931
|
+
onClick: v[2] || (v[2] = (p) => l("logout"))
|
|
932
|
+
}, {
|
|
933
|
+
default: d(() => [
|
|
934
|
+
A(I(e.logoutText), 1)
|
|
935
|
+
]),
|
|
936
|
+
_: 1
|
|
937
|
+
})) : C("", !0)
|
|
917
938
|
]),
|
|
918
|
-
_:
|
|
919
|
-
}
|
|
939
|
+
_: 1
|
|
940
|
+
})
|
|
920
941
|
]),
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
dropdown: u(() => [
|
|
928
|
-
f(g, null, {
|
|
929
|
-
default: u(() => [
|
|
930
|
-
e.showProfile ? (d(), b(j, {
|
|
931
|
-
key: 0,
|
|
932
|
-
onClick: h[1] || (h[1] = (m) => l("profile"))
|
|
933
|
-
}, {
|
|
934
|
-
default: u(() => [
|
|
935
|
-
D(S(e.profileText), 1)
|
|
936
|
-
]),
|
|
937
|
-
_: 1
|
|
938
|
-
})) : C("", !0),
|
|
939
|
-
e.showLogout ? (d(), b(j, {
|
|
940
|
-
key: 1,
|
|
941
|
-
onClick: h[2] || (h[2] = (m) => l("logout"))
|
|
942
|
-
}, {
|
|
943
|
-
default: u(() => [
|
|
944
|
-
D(S(e.logoutText), 1)
|
|
945
|
-
]),
|
|
946
|
-
_: 1
|
|
947
|
-
})) : C("", !0)
|
|
942
|
+
default: d(() => [
|
|
943
|
+
k("span", Mt, [
|
|
944
|
+
A(I(e.username) + " ", 1),
|
|
945
|
+
f(n(P), null, {
|
|
946
|
+
default: d(() => [
|
|
947
|
+
f(n(Ce))
|
|
948
948
|
]),
|
|
949
949
|
_: 1
|
|
950
950
|
})
|
|
951
|
-
])
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
default: u(() => [
|
|
957
|
-
f(x(me))
|
|
958
|
-
]),
|
|
959
|
-
_: 1
|
|
960
|
-
})
|
|
961
|
-
])
|
|
962
|
-
]),
|
|
963
|
-
_: 1
|
|
964
|
-
})) : C("", !0)
|
|
965
|
-
], !0)
|
|
966
|
-
])
|
|
967
|
-
]),
|
|
968
|
-
y("div", mt, [
|
|
969
|
-
P(c.$slots, "tabs", {}, void 0, !0),
|
|
970
|
-
y("div", {
|
|
971
|
-
class: U([
|
|
972
|
-
"j-admin-layout__content",
|
|
973
|
-
{ "j-admin-layout__content--scrollbar-hidden": e.hideContentScrollbar }
|
|
974
|
-
])
|
|
975
|
-
}, [
|
|
976
|
-
P(c.$slots, "default", {}, void 0, !0)
|
|
977
|
-
], 2)
|
|
951
|
+
])
|
|
952
|
+
]),
|
|
953
|
+
_: 1
|
|
954
|
+
})) : C("", !0)
|
|
955
|
+
], !0)
|
|
978
956
|
])
|
|
957
|
+
]),
|
|
958
|
+
k("div", Bt, [
|
|
959
|
+
D(c.$slots, "tabs", {}, void 0, !0),
|
|
960
|
+
k("div", {
|
|
961
|
+
class: U([
|
|
962
|
+
"j-admin-layout__content",
|
|
963
|
+
{ "j-admin-layout__content--scrollbar-hidden": e.hideContentScrollbar }
|
|
964
|
+
])
|
|
965
|
+
}, [
|
|
966
|
+
D(c.$slots, "default", {}, void 0, !0)
|
|
967
|
+
], 2)
|
|
979
968
|
])
|
|
980
|
-
]
|
|
981
|
-
|
|
969
|
+
])
|
|
970
|
+
], 4));
|
|
982
971
|
}
|
|
983
|
-
}),
|
|
984
|
-
function
|
|
985
|
-
return Array.isArray(e) ? e.map((t) =>
|
|
972
|
+
}), Tt = /* @__PURE__ */ W(At, [["__scopeId", "data-v-51b44ebf"]]);
|
|
973
|
+
function ue(e, s) {
|
|
974
|
+
return Array.isArray(e) ? e.map((t) => ue(t, s)) : e !== null && typeof e == "object" && !(e instanceof Date) ? s(e) : e;
|
|
986
975
|
}
|
|
987
|
-
function
|
|
976
|
+
function Vt(e, s = []) {
|
|
988
977
|
return Object.fromEntries(
|
|
989
978
|
Object.entries(e).map(([t, l]) => {
|
|
990
|
-
const
|
|
991
|
-
return
|
|
979
|
+
const a = ue(l, (u) => Vt(u, s));
|
|
980
|
+
return s.includes(t) ? [t, a] : [t.replace(/([A-Z])/g, "_$1").toLowerCase(), a];
|
|
992
981
|
})
|
|
993
982
|
);
|
|
994
983
|
}
|
|
995
|
-
function
|
|
984
|
+
function Ft(e, s = []) {
|
|
996
985
|
return Object.fromEntries(
|
|
997
986
|
Object.entries(e).map(([t, l]) => {
|
|
998
|
-
const
|
|
999
|
-
return
|
|
987
|
+
const a = ue(l, (u) => Ft(u, s));
|
|
988
|
+
return s.includes(t) ? [t, a] : [t.replace(/_([a-z])/g, (u, m) => m.toUpperCase()), a];
|
|
1000
989
|
})
|
|
1001
990
|
);
|
|
1002
991
|
}
|
|
1003
|
-
function
|
|
992
|
+
function Xt(e, s) {
|
|
1004
993
|
const t = {};
|
|
1005
|
-
for (const l of
|
|
994
|
+
for (const l of s)
|
|
1006
995
|
l in e && (t[l] = e[l]);
|
|
1007
996
|
return t;
|
|
1008
997
|
}
|
|
1009
|
-
function
|
|
998
|
+
function Zt(e, s) {
|
|
1010
999
|
const t = { ...e };
|
|
1011
|
-
for (const l of
|
|
1000
|
+
for (const l of s)
|
|
1012
1001
|
delete t[l];
|
|
1013
1002
|
return t;
|
|
1014
1003
|
}
|
|
1015
|
-
function
|
|
1004
|
+
function he(e) {
|
|
1016
1005
|
if (e === null || typeof e != "object") return e;
|
|
1017
1006
|
if (e instanceof Date) return new Date(e.getTime());
|
|
1018
1007
|
if (e instanceof RegExp) return new RegExp(e.source, e.flags);
|
|
1019
|
-
if (Array.isArray(e)) return e.map((t) =>
|
|
1020
|
-
const
|
|
1008
|
+
if (Array.isArray(e)) return e.map((t) => he(t));
|
|
1009
|
+
const s = {};
|
|
1021
1010
|
for (const t of Object.keys(e))
|
|
1022
|
-
|
|
1023
|
-
return
|
|
1011
|
+
s[t] = he(e[t]);
|
|
1012
|
+
return s;
|
|
1024
1013
|
}
|
|
1025
|
-
function
|
|
1014
|
+
function Dt(e, s = !1) {
|
|
1026
1015
|
const t = {};
|
|
1027
|
-
for (const [l,
|
|
1028
|
-
if (!(
|
|
1029
|
-
if (
|
|
1030
|
-
const
|
|
1031
|
-
Object.keys(
|
|
1016
|
+
for (const [l, a] of Object.entries(e))
|
|
1017
|
+
if (!(a == null || a === ""))
|
|
1018
|
+
if (s && typeof a == "object" && !Array.isArray(a) && !(a instanceof Date)) {
|
|
1019
|
+
const i = Dt(a, !0);
|
|
1020
|
+
Object.keys(i).length > 0 && (t[l] = i);
|
|
1032
1021
|
} else
|
|
1033
|
-
t[l] =
|
|
1022
|
+
t[l] = a;
|
|
1034
1023
|
return t;
|
|
1035
1024
|
}
|
|
1036
|
-
function
|
|
1025
|
+
function Jt(e, s = "", t = ".") {
|
|
1037
1026
|
const l = {};
|
|
1038
|
-
for (const [
|
|
1039
|
-
const
|
|
1040
|
-
|
|
1027
|
+
for (const [a, i] of Object.entries(e)) {
|
|
1028
|
+
const u = s ? `${s}${t}${a}` : a;
|
|
1029
|
+
i !== null && typeof i == "object" && !Array.isArray(i) && !(i instanceof Date) ? Object.assign(l, Jt(i, u, t)) : l[u] = i;
|
|
1041
1030
|
}
|
|
1042
1031
|
return l;
|
|
1043
1032
|
}
|
|
1044
|
-
function
|
|
1033
|
+
function Gt(e, s = ".") {
|
|
1045
1034
|
const t = {};
|
|
1046
|
-
for (const [l,
|
|
1047
|
-
const
|
|
1048
|
-
let
|
|
1049
|
-
for (let
|
|
1050
|
-
const c =
|
|
1051
|
-
c in
|
|
1035
|
+
for (const [l, a] of Object.entries(e)) {
|
|
1036
|
+
const i = l.split(s);
|
|
1037
|
+
let u = t;
|
|
1038
|
+
for (let m = 0; m < i.length - 1; m++) {
|
|
1039
|
+
const c = i[m];
|
|
1040
|
+
c in u || (u[c] = {}), u = u[c];
|
|
1052
1041
|
}
|
|
1053
|
-
i[
|
|
1042
|
+
u[i[i.length - 1]] = a;
|
|
1054
1043
|
}
|
|
1055
1044
|
return t;
|
|
1056
1045
|
}
|
|
1057
|
-
function
|
|
1058
|
-
return Object.entries(e).map(([
|
|
1059
|
-
id:
|
|
1046
|
+
function Qt(e) {
|
|
1047
|
+
return Object.entries(e).map(([s, t]) => ({
|
|
1048
|
+
id: s,
|
|
1060
1049
|
label: t,
|
|
1061
|
-
prop:
|
|
1050
|
+
prop: s
|
|
1062
1051
|
}));
|
|
1063
1052
|
}
|
|
1064
|
-
function
|
|
1053
|
+
function _t(e, s) {
|
|
1065
1054
|
if (!e) return null;
|
|
1066
1055
|
let t = e.replace(/^@\//, "");
|
|
1067
1056
|
t.startsWith("views/") || (t = `views/${t}`), t.endsWith(".vue") || (t = `${t}.vue`);
|
|
1068
1057
|
const l = `/src/${t}`;
|
|
1069
|
-
return
|
|
1058
|
+
return s[l] ?? s["/src/views/common/NotFound.vue"] ?? null;
|
|
1070
1059
|
}
|
|
1071
|
-
function
|
|
1072
|
-
const
|
|
1073
|
-
return e.forEach((l) =>
|
|
1074
|
-
const
|
|
1060
|
+
function Lt(e) {
|
|
1061
|
+
const s = /* @__PURE__ */ new Map(), t = [];
|
|
1062
|
+
return e.forEach((l) => s.set(l.name, { ...l, children: [] })), e.forEach((l) => {
|
|
1063
|
+
const a = s.get(l.name);
|
|
1075
1064
|
if (!l.parent_name)
|
|
1076
|
-
t.push(
|
|
1065
|
+
t.push(a);
|
|
1077
1066
|
else {
|
|
1078
|
-
const
|
|
1079
|
-
|
|
1067
|
+
const i = s.get(l.parent_name);
|
|
1068
|
+
i ? (i.children ?? (i.children = []), i.children.push(a)) : t.push(a);
|
|
1080
1069
|
}
|
|
1081
1070
|
}), t;
|
|
1082
1071
|
}
|
|
1083
|
-
function
|
|
1072
|
+
function Ee(e, s, t) {
|
|
1084
1073
|
return e.filter((l) => !t || !l.project || l.project === t).map((l) => {
|
|
1085
|
-
var
|
|
1086
|
-
const
|
|
1074
|
+
var u;
|
|
1075
|
+
const a = {
|
|
1087
1076
|
path: l.path,
|
|
1088
1077
|
name: l.name,
|
|
1089
1078
|
meta: {
|
|
1090
1079
|
requiresAuth: l.requiresAuth === 1,
|
|
1091
1080
|
title: l.title,
|
|
1092
|
-
permissions: l.permissions ? l.permissions.split(",").map((
|
|
1093
|
-
params: l.params ? l.params.split("&").map((
|
|
1081
|
+
permissions: l.permissions ? l.permissions.split(",").map((m) => m.trim()).filter(Boolean) : [],
|
|
1082
|
+
params: l.params ? l.params.split("&").map((m) => m.trim()).filter(Boolean) : []
|
|
1094
1083
|
}
|
|
1095
|
-
},
|
|
1096
|
-
return
|
|
1084
|
+
}, i = _t(l.component, s);
|
|
1085
|
+
return i && (a.component = i), l.redirect && (a.redirect = l.redirect), (u = l.children) != null && u.length && (a.children = Ee(l.children, s, t)), a;
|
|
1097
1086
|
});
|
|
1098
1087
|
}
|
|
1099
|
-
function
|
|
1100
|
-
const
|
|
1101
|
-
e.forEach((
|
|
1102
|
-
const
|
|
1103
|
-
let
|
|
1088
|
+
function Yt(e, s, t, l) {
|
|
1089
|
+
const a = /* @__PURE__ */ new Map();
|
|
1090
|
+
e.forEach((u) => a.set(u.name, u));
|
|
1091
|
+
const i = (u) => {
|
|
1092
|
+
let m = u.parent_name;
|
|
1104
1093
|
const c = /* @__PURE__ */ new Set();
|
|
1105
|
-
for (;
|
|
1106
|
-
if (
|
|
1107
|
-
if (c.has(
|
|
1108
|
-
c.add(
|
|
1109
|
-
const
|
|
1110
|
-
if (!
|
|
1111
|
-
|
|
1094
|
+
for (; m; ) {
|
|
1095
|
+
if (m === t) return !0;
|
|
1096
|
+
if (c.has(m)) return !1;
|
|
1097
|
+
c.add(m);
|
|
1098
|
+
const v = a.get(m);
|
|
1099
|
+
if (!v) return !1;
|
|
1100
|
+
m = v.parent_name;
|
|
1112
1101
|
}
|
|
1113
1102
|
return !1;
|
|
1114
1103
|
};
|
|
1115
1104
|
return e.filter(
|
|
1116
|
-
(
|
|
1117
|
-
).sort((
|
|
1105
|
+
(u) => u.name !== t && u.is_show === 1 && u.component && s.includes(u.code) && i(u) && (!l || !u.project || u.project === l)
|
|
1106
|
+
).sort((u, m) => u.sorts - m.sorts)[0];
|
|
1118
1107
|
}
|
|
1119
|
-
|
|
1120
|
-
const
|
|
1121
|
-
},
|
|
1122
|
-
},
|
|
1108
|
+
ie.configure({ showSpinner: !1 });
|
|
1109
|
+
const ve = (...e) => {
|
|
1110
|
+
}, ge = (...e) => {
|
|
1111
|
+
}, Pt = (...e) => {
|
|
1123
1112
|
console.error("[Router]", ...e);
|
|
1124
1113
|
};
|
|
1125
|
-
function
|
|
1114
|
+
function ea(e, s) {
|
|
1126
1115
|
const {
|
|
1127
1116
|
getRouteStore: t,
|
|
1128
1117
|
getPermissionStore: l,
|
|
1129
|
-
getUserStore:
|
|
1130
|
-
isAuthenticated:
|
|
1131
|
-
viewModules:
|
|
1132
|
-
homeComponent:
|
|
1118
|
+
getUserStore: a,
|
|
1119
|
+
isAuthenticated: i,
|
|
1120
|
+
viewModules: u,
|
|
1121
|
+
homeComponent: m,
|
|
1133
1122
|
notFoundComponent: c,
|
|
1134
|
-
projectName:
|
|
1135
|
-
layoutRouteName:
|
|
1136
|
-
publicPaths:
|
|
1137
|
-
loginRouteName:
|
|
1138
|
-
forbiddenRouteName:
|
|
1139
|
-
homeRouteName:
|
|
1140
|
-
homeRoutePath:
|
|
1141
|
-
homeTitle:
|
|
1142
|
-
noPermissionMessage:
|
|
1143
|
-
} =
|
|
1144
|
-
let
|
|
1145
|
-
function
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
}), e.hasRoute(
|
|
1150
|
-
path:
|
|
1151
|
-
name:
|
|
1152
|
-
component:
|
|
1153
|
-
meta: { title:
|
|
1123
|
+
projectName: v,
|
|
1124
|
+
layoutRouteName: p = "Layout",
|
|
1125
|
+
publicPaths: J = ["/login", "/register"],
|
|
1126
|
+
loginRouteName: T = "login",
|
|
1127
|
+
forbiddenRouteName: $ = "Forbidden",
|
|
1128
|
+
homeRouteName: b = "Home",
|
|
1129
|
+
homeRoutePath: B = "home",
|
|
1130
|
+
homeTitle: E = "首页",
|
|
1131
|
+
noPermissionMessage: h = "暂无权限"
|
|
1132
|
+
} = s;
|
|
1133
|
+
let o = !1;
|
|
1134
|
+
function w(g) {
|
|
1135
|
+
const j = Lt(g).find((V) => V.name === p), O = j != null && j.children ? Ee(j.children, u, v) : [];
|
|
1136
|
+
O.forEach((V) => {
|
|
1137
|
+
V.name && e.hasRoute(V.name) || (e.addRoute(p, V), ve(`Add route: ${String(V.name)} -> ${V.path}`));
|
|
1138
|
+
}), e.hasRoute(b) || e.addRoute(p, {
|
|
1139
|
+
path: B,
|
|
1140
|
+
name: b,
|
|
1141
|
+
component: m,
|
|
1142
|
+
meta: { title: E }
|
|
1154
1143
|
}), e.hasRoute("NotFound") || e.addRoute({
|
|
1155
1144
|
path: "/:pathMatch(.*)*",
|
|
1156
1145
|
name: "NotFound",
|
|
1157
1146
|
component: c
|
|
1158
|
-
}),
|
|
1147
|
+
}), ve(`Dynamic routes added: ${O.length}`);
|
|
1159
1148
|
}
|
|
1160
|
-
function R(
|
|
1161
|
-
if (
|
|
1162
|
-
|
|
1149
|
+
function R(g, L) {
|
|
1150
|
+
if (g === b) {
|
|
1151
|
+
L();
|
|
1163
1152
|
return;
|
|
1164
1153
|
}
|
|
1165
|
-
e.hasRoute(
|
|
1154
|
+
e.hasRoute(b) ? L({ name: b, replace: !0 }) : L();
|
|
1166
1155
|
}
|
|
1167
|
-
return e.beforeEach(async (
|
|
1168
|
-
if (
|
|
1156
|
+
return e.beforeEach(async (g, L, j) => {
|
|
1157
|
+
if (ie.start(), i() && !o)
|
|
1169
1158
|
try {
|
|
1170
|
-
const
|
|
1171
|
-
if (await
|
|
1172
|
-
R(
|
|
1159
|
+
const F = t(), H = l();
|
|
1160
|
+
if (await F.initRoutes(), await H.loadUserPermissions(), w(F.backendRoutes), o = !0, g.path === "/" || g.path === "") {
|
|
1161
|
+
R(g.name, j);
|
|
1173
1162
|
return;
|
|
1174
1163
|
}
|
|
1175
|
-
if (
|
|
1176
|
-
R(
|
|
1164
|
+
if (g.name === p) {
|
|
1165
|
+
R(g.name, j);
|
|
1177
1166
|
return;
|
|
1178
1167
|
}
|
|
1179
|
-
const
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1168
|
+
const N = F.backendRoutes.find((ee) => ee.name === g.name);
|
|
1169
|
+
if (N && !H.routePermissions.includes(N.code)) {
|
|
1170
|
+
ge("No route permission:", g.path), j({ name: $, replace: !0 });
|
|
1182
1171
|
return;
|
|
1183
1172
|
}
|
|
1184
|
-
|
|
1185
|
-
path:
|
|
1186
|
-
query:
|
|
1187
|
-
hash:
|
|
1173
|
+
j({
|
|
1174
|
+
path: g.path,
|
|
1175
|
+
query: g.query,
|
|
1176
|
+
hash: g.hash,
|
|
1188
1177
|
replace: !0
|
|
1189
1178
|
});
|
|
1190
1179
|
return;
|
|
1191
|
-
} catch (
|
|
1192
|
-
|
|
1180
|
+
} catch (F) {
|
|
1181
|
+
Pt("Failed to load route permissions:", F), o = !1, await a().logout(), j({ name: T, replace: !0 });
|
|
1193
1182
|
return;
|
|
1194
1183
|
}
|
|
1195
|
-
if (
|
|
1196
|
-
|
|
1184
|
+
if (J.includes(g.path)) {
|
|
1185
|
+
i() ? j({ path: "/", replace: !0 }) : j();
|
|
1197
1186
|
return;
|
|
1198
1187
|
}
|
|
1199
|
-
if (!
|
|
1200
|
-
|
|
1188
|
+
if (!i()) {
|
|
1189
|
+
j({ name: T, replace: !0 });
|
|
1201
1190
|
return;
|
|
1202
1191
|
}
|
|
1203
|
-
const
|
|
1204
|
-
if (
|
|
1205
|
-
|
|
1192
|
+
const O = l(), V = t();
|
|
1193
|
+
if (g.name === b) {
|
|
1194
|
+
j();
|
|
1206
1195
|
return;
|
|
1207
1196
|
}
|
|
1208
|
-
if (
|
|
1209
|
-
|
|
1197
|
+
if (O.routePermissions.length === 0) {
|
|
1198
|
+
g.path !== "/" ? (S.warning(h), j({ path: "/", replace: !0 })) : R(g.name, j);
|
|
1210
1199
|
return;
|
|
1211
1200
|
}
|
|
1212
|
-
if (
|
|
1213
|
-
R(
|
|
1201
|
+
if (g.path === "/") {
|
|
1202
|
+
R(g.name, j);
|
|
1214
1203
|
return;
|
|
1215
1204
|
}
|
|
1216
|
-
if (
|
|
1217
|
-
R(
|
|
1205
|
+
if (g.name === p) {
|
|
1206
|
+
R(g.name, j);
|
|
1218
1207
|
return;
|
|
1219
1208
|
}
|
|
1220
|
-
const
|
|
1221
|
-
if (
|
|
1222
|
-
|
|
1209
|
+
const K = V.backendRoutes.find((F) => F.name === g.name);
|
|
1210
|
+
if (K && !O.routePermissions.includes(K.code)) {
|
|
1211
|
+
ge("No route permission:", g.path), j({ name: $, replace: !0 });
|
|
1223
1212
|
return;
|
|
1224
1213
|
}
|
|
1225
|
-
|
|
1226
|
-
}), e.afterEach(() =>
|
|
1214
|
+
j();
|
|
1215
|
+
}), e.afterEach(() => ie.done()), {
|
|
1227
1216
|
resetRouterState: () => {
|
|
1228
|
-
|
|
1217
|
+
o = !1;
|
|
1229
1218
|
}
|
|
1230
1219
|
};
|
|
1231
1220
|
}
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1234
|
-
e.component(
|
|
1221
|
+
const zt = [Ze, it, Z, dt, gt, je, $e, Tt], Ot = (e) => {
|
|
1222
|
+
zt.forEach((s) => {
|
|
1223
|
+
e.component(s.name ?? s.__name ?? "", s);
|
|
1235
1224
|
});
|
|
1236
|
-
},
|
|
1225
|
+
}, ta = { install: Ot };
|
|
1237
1226
|
export {
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1227
|
+
Tt as JAdminLayout,
|
|
1228
|
+
Ze as JButton,
|
|
1229
|
+
Z as JIconRender,
|
|
1230
|
+
gt as JImportExcel,
|
|
1231
|
+
dt as JSearchHeader,
|
|
1232
|
+
$e as JSideMenuItem,
|
|
1233
|
+
je as JSidebar,
|
|
1234
|
+
it as JUploadImg,
|
|
1235
|
+
Lt as buildRouteTree,
|
|
1236
|
+
ea as createRouterGuard,
|
|
1237
|
+
he as deepClone,
|
|
1238
|
+
ta as default,
|
|
1239
|
+
Dt as filterEmpty,
|
|
1240
|
+
Yt as findFirstAllowedRoute,
|
|
1241
|
+
Jt as flatten,
|
|
1242
|
+
_t as getComponentImport,
|
|
1243
|
+
Zt as omit,
|
|
1244
|
+
Xt as pick,
|
|
1245
|
+
Ft as toCamelCase,
|
|
1246
|
+
Vt as toSnakeCase,
|
|
1247
|
+
Qt as toTableColumns,
|
|
1248
|
+
Ee as transformBackendRoutes,
|
|
1249
|
+
Gt as unflatten
|
|
1261
1250
|
};
|
|
1262
1251
|
//# sourceMappingURL=index.js.map
|