@skyfox2000/webui 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +441 -91
- package/lib/assets/modules/{file-upload-Cf9uxE2y.js → file-upload-D4bA7go8.js} +1 -1
- package/lib/assets/modules/{form-excel-DnROEQ0w.js → form-excel-DL2_SNiS.js} +1 -1
- package/lib/assets/modules/{index-BkbOMv2e.js → index-BZvwPKou.js} +1 -1
- package/lib/assets/modules/{index-D4mESG0b.js → index-CKMDsqve.js} +683 -661
- package/lib/assets/modules/{index-DvbJb5Ha.js → index-D16E7UbH.js} +2 -2
- package/lib/assets/modules/{menuTabs-DgX7pUbX.js → menuTabs-izaFx0kk.js} +196 -175
- package/lib/assets/modules/{toolIcon-C0bp66dj.js → toolIcon-66dclHit.js} +1 -1
- package/lib/assets/modules/{uploadList-CWhqNLX9.js → uploadList-Dw6eRrJT.js} +3 -3
- package/lib/components/common/icon/index.vue.d.ts +1 -1
- package/lib/es/AceEditor/index.js +3 -3
- package/lib/es/BasicLayout/index.js +3 -3
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +4 -4
- package/lib/es/UploadForm/index.js +4 -4
- package/lib/stores/userInfo.d.ts +3 -1
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +279 -290
- package/package.json +2 -2
- package/src/components/layout/header/headerExits.vue +5 -4
- package/src/components/layout/header/index.vue +4 -2
- package/src/components/layout/header/user.vue +4 -1
- package/src/directives/permission.ts +6 -2
- package/src/stores/appInfo.ts +64 -26
- package/src/stores/pageInfo.ts +1 -0
- package/src/stores/settingInfo.ts +1 -7
- package/src/stores/userInfo.ts +77 -52
- package/src/utils/main-openapis.ts +1 -9
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { inject as G, ref as
|
|
5
|
-
import { AutoComplete as
|
|
6
|
-
import { createPinia as
|
|
7
|
-
import
|
|
8
|
-
import { combineParams as
|
|
9
|
-
import { ResStatus as
|
|
1
|
+
var la = Object.defineProperty;
|
|
2
|
+
var ia = (e, t, a) => t in e ? la(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
+
var k = (e, t, a) => ia(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
+
import { inject as G, ref as u, provide as ye, watch as R, toRaw as Qe, h as C, nextTick as ua, shallowRef as Ve, defineComponent as X, reactive as ca, useAttrs as ne, onMounted as oe, onUnmounted as le, createElementBlock as O, openBlock as A, createVNode as j, unref as x, mergeProps as ie, withCtx as Q, createCommentVNode as B, Fragment as J, renderList as Te, createBlock as Re, normalizeClass as Ge, createTextVNode as we, toDisplayString as z, createElementVNode as fa } from "vue";
|
|
5
|
+
import { AutoComplete as pa, CheckboxGroup as da, Checkbox as ha, RadioGroup as ma, Radio as va, Select as ga, SelectOption as ya } from "ant-design-vue";
|
|
6
|
+
import { createPinia as ba, defineStore as Z } from "pinia";
|
|
7
|
+
import Sa from "pinia-plugin-persistedstate";
|
|
8
|
+
import { combineParams as Pe, EnvConfig as te, AppAction as Ue, AppSource as Ce, isMicroApp as Ne, mainAppApis as D, isBaseMicroApp as Ia } from "@skyfox2000/microbase";
|
|
9
|
+
import { ResStatus as E, httpPost as K, setToken as be, fieldMapping as xa, parseFieldTemplate as Aa, API_HOST as Se, SERVER_HOST as Ea } from "@skyfox2000/fapi";
|
|
10
10
|
import S from "vue-m-message";
|
|
11
|
-
import
|
|
12
|
-
import { createRouter as
|
|
11
|
+
import Oe from "async-validator";
|
|
12
|
+
import { createRouter as Ta, createWebHashHistory as Ra } from "vue-router";
|
|
13
13
|
import "dayjs";
|
|
14
14
|
import "vue-draggable-next";
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
var
|
|
15
|
+
const wa = ba();
|
|
16
|
+
wa.use(Sa);
|
|
17
|
+
var U = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))(U || {});
|
|
18
18
|
const T = class T {
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
k(T, "dict", {}), k(T, "Keys", {
|
|
21
21
|
EnableDisable: "EnableDisable",
|
|
22
22
|
SuccessResult: "SuccessResult",
|
|
23
23
|
YesNo: "YesNo",
|
|
@@ -27,25 +27,25 @@ P(T, "dict", {}), P(T, "Keys", {
|
|
|
27
27
|
* @param key 名称
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
k(T, "getOptions", (t) => T.dict[t]), /**
|
|
31
31
|
* 静态选择项对象
|
|
32
32
|
* @param key 名称
|
|
33
33
|
* @param value 值
|
|
34
34
|
* @returns
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
k(T, "getOptionItem", (t, a) => T.dict[t].find((s) => s.value === a)), /**
|
|
37
37
|
* 设置静态选择项
|
|
38
38
|
* @param key 名称
|
|
39
39
|
* @param list 列表
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
k(T, "setOptions", (t, a) => {
|
|
42
42
|
T.dict[t] = a;
|
|
43
43
|
}), /**
|
|
44
44
|
* 启用/停用选项
|
|
45
45
|
* - 启用 1
|
|
46
46
|
* - 停用 0
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
k(T, "EnableDisable", [
|
|
49
49
|
{
|
|
50
50
|
label: "启用",
|
|
51
51
|
text: "✅ 启用",
|
|
@@ -61,7 +61,7 @@ P(T, "EnableDisable", [
|
|
|
61
61
|
* - 成功 1
|
|
62
62
|
* - 失败 0
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
k(T, "SuccessResult", [
|
|
65
65
|
{
|
|
66
66
|
label: "成功",
|
|
67
67
|
text: "✅ 成功",
|
|
@@ -77,7 +77,7 @@ P(T, "SuccessResult", [
|
|
|
77
77
|
* - 是 1
|
|
78
78
|
* - 否 0
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
k(T, "YesNo", [
|
|
81
81
|
{
|
|
82
82
|
label: "是",
|
|
83
83
|
text: "✅ 是",
|
|
@@ -93,7 +93,7 @@ P(T, "YesNo", [
|
|
|
93
93
|
* - 男 M
|
|
94
94
|
* - 女 F
|
|
95
95
|
*/
|
|
96
|
-
|
|
96
|
+
k(T, "MaleFemale", [
|
|
97
97
|
{
|
|
98
98
|
label: "男",
|
|
99
99
|
text: "男 👨",
|
|
@@ -105,12 +105,12 @@ P(T, "MaleFemale", [
|
|
|
105
105
|
value: "F"
|
|
106
106
|
}
|
|
107
107
|
]);
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const
|
|
108
|
+
let M = T;
|
|
109
|
+
M.setOptions("EnableDisable", M.EnableDisable);
|
|
110
|
+
M.setOptions("SuccessResult", M.SuccessResult);
|
|
111
|
+
M.setOptions("YesNo", M.YesNo);
|
|
112
|
+
M.setOptions("MaleFemale", M.MaleFemale);
|
|
113
|
+
const ue = {
|
|
114
114
|
/**
|
|
115
115
|
* 自动接口加载数据
|
|
116
116
|
* - 默认为true
|
|
@@ -202,29 +202,29 @@ const ie = {
|
|
|
202
202
|
type: [String, Array],
|
|
203
203
|
required: !1
|
|
204
204
|
}
|
|
205
|
-
},
|
|
206
|
-
var
|
|
205
|
+
}, w = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, ce = (e, t) => {
|
|
206
|
+
var r;
|
|
207
207
|
return {
|
|
208
208
|
url: "",
|
|
209
|
-
...(
|
|
209
|
+
...(r = e.page.urls) == null ? void 0 : r[t.urlKey],
|
|
210
210
|
...e.url,
|
|
211
211
|
...t.url,
|
|
212
212
|
loadingText: t.loadingText
|
|
213
213
|
};
|
|
214
|
-
},
|
|
214
|
+
}, fe = (e, t) => {
|
|
215
215
|
const a = e.page, s = t.url;
|
|
216
216
|
if (!s || !s.url) {
|
|
217
|
-
const
|
|
218
|
-
return console.warn(
|
|
217
|
+
const n = `URL未设置: ${t.urlKey}`;
|
|
218
|
+
return console.warn(n), Promise.reject(new Error(n));
|
|
219
219
|
}
|
|
220
220
|
s.api || (s.api = a.api), s.authorize === void 0 && (s.authorize = a.authorize);
|
|
221
|
-
let
|
|
222
|
-
return t.processParams && (
|
|
221
|
+
let r = JSON.parse(JSON.stringify(t.params));
|
|
222
|
+
return t.processParams && (r = t.processParams(r)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), K(s, r).then((n) => (t.loadingState && (t.loadingState.value = !1), n)).catch((n) => (t.loadingState && (t.loadingState.value = !1), null));
|
|
223
223
|
}, ke = (e, t) => {
|
|
224
224
|
t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
|
|
225
|
-
const a =
|
|
226
|
-
return t.url = a,
|
|
227
|
-
}, At = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url =
|
|
225
|
+
const a = ce(e, t);
|
|
226
|
+
return t.url = a, fe(e, t);
|
|
227
|
+
}, At = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = ce(e, t), fe(e, t).then((a) => ((a == null ? void 0 : a.status) === E.SUCCESS && (t.hideErrorToast || S.success("执行成功!")), a))), qe = (e, t = {}) => {
|
|
228
228
|
const a = t.primaryKey || "Id";
|
|
229
229
|
if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
|
|
230
230
|
return S.error("错误!无保存数据!"), Promise.resolve(null);
|
|
@@ -234,30 +234,30 @@ const ie = {
|
|
|
234
234
|
loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
|
|
235
235
|
};
|
|
236
236
|
s.params.Query[a] = s.params.Data[a];
|
|
237
|
-
const
|
|
238
|
-
return s.url =
|
|
239
|
-
},
|
|
237
|
+
const r = ce(e, s);
|
|
238
|
+
return s.url = r, fe(e, s).then((n) => ((n == null ? void 0 : n.status) === E.SUCCESS && (t.hideErrorToast || S.success("保存成功!")), n));
|
|
239
|
+
}, Pa = (e, t, a = {}) => {
|
|
240
240
|
const s = a.primaryKey || "Id";
|
|
241
241
|
a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
|
|
242
|
-
const
|
|
242
|
+
const r = {
|
|
243
243
|
...a,
|
|
244
244
|
urlKey: "delete",
|
|
245
245
|
loadingText: a.loadingText === !1 ? !1 : a.loadingText || "数据删除中..."
|
|
246
246
|
};
|
|
247
|
-
if (Array.isArray(t) ?
|
|
247
|
+
if (Array.isArray(t) ? r.params.Query[s] = t : r.params.Query[s] = t[s], w(r.params.Query) || w(r.params.Query[s]))
|
|
248
248
|
return S.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
|
|
249
|
-
const
|
|
250
|
-
return
|
|
249
|
+
const n = ce(e, r);
|
|
250
|
+
return r.url = n, fe(e, r).then((o) => ((o == null ? void 0 : o.status) === E.SUCCESS && (a.hideErrorToast || S.success("删除成功!")), o));
|
|
251
251
|
}, Oa = (e, t) => ke(e, {
|
|
252
252
|
urlKey: "tree",
|
|
253
253
|
params: {},
|
|
254
254
|
loadingState: e.isTreeLoading,
|
|
255
255
|
loadingText: !1,
|
|
256
|
-
processParams: () =>
|
|
257
|
-
}).then((a) => (a == null ? void 0 : a.status) ===
|
|
258
|
-
let
|
|
259
|
-
const
|
|
260
|
-
|
|
256
|
+
processParams: () => Pe(e.treeQuery, t)
|
|
257
|
+
}).then((a) => (a == null ? void 0 : a.status) === E.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
|
|
258
|
+
let W;
|
|
259
|
+
const Et = (e) => {
|
|
260
|
+
W = new Oe({}), W.messages({
|
|
261
261
|
required: "${label}不能为空",
|
|
262
262
|
types: {
|
|
263
263
|
number: "${label}必须是数字"
|
|
@@ -283,77 +283,77 @@ const Tt = (e) => {
|
|
|
283
283
|
},
|
|
284
284
|
...e
|
|
285
285
|
});
|
|
286
|
-
},
|
|
287
|
-
if (!e ||
|
|
286
|
+
}, Tt = (e) => {
|
|
287
|
+
if (!e || w(e))
|
|
288
288
|
return [];
|
|
289
|
-
const t = [], a =
|
|
289
|
+
const t = [], a = W.messages(), s = (n, o, l) => {
|
|
290
290
|
const i = o.type;
|
|
291
291
|
if (i && a.types && i in a.types) {
|
|
292
|
-
const
|
|
293
|
-
|
|
292
|
+
const f = a.types[i];
|
|
293
|
+
r(f, n, { type: i }, l);
|
|
294
294
|
}
|
|
295
|
-
const
|
|
296
|
-
for (const
|
|
297
|
-
if (i ===
|
|
298
|
-
const p = a[
|
|
299
|
-
for (const
|
|
300
|
-
|
|
295
|
+
const c = ["string", "number", "array"];
|
|
296
|
+
for (const f of c)
|
|
297
|
+
if (i === f && a[f]) {
|
|
298
|
+
const p = a[f], v = ["len", "min", "max", "range"];
|
|
299
|
+
for (const g of v)
|
|
300
|
+
g === "range" && o.min != null && o.max != null && p.range ? r(p.range, n, { min: o.min, max: o.max }, l) : g !== "range" && o[g] != null && p[g] && r(p[g], n, { [g]: o[g] }, l);
|
|
301
301
|
}
|
|
302
|
-
if (o.required && a.required &&
|
|
303
|
-
const
|
|
304
|
-
|
|
302
|
+
if (o.required && a.required && r(a.required, n, {}, l), o.pattern && a.pattern && r(o.message, n, {}, l), o.enum && Array.isArray(o.enum) && a.enum) {
|
|
303
|
+
const f = o.enum.join(", ");
|
|
304
|
+
r(a.enum, n, { enum: f }, l);
|
|
305
305
|
}
|
|
306
|
-
},
|
|
307
|
-
if (
|
|
306
|
+
}, r = (n, o, l, i) => {
|
|
307
|
+
if (n)
|
|
308
308
|
try {
|
|
309
|
-
let
|
|
310
|
-
if (typeof
|
|
311
|
-
const
|
|
309
|
+
let c;
|
|
310
|
+
if (typeof n == "function") {
|
|
311
|
+
const f = [o];
|
|
312
312
|
for (const p in l)
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
f.push(l[p]);
|
|
314
|
+
c = n.apply(null, f), c && i.push(c);
|
|
315
315
|
} else {
|
|
316
|
-
|
|
317
|
-
for (const
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
c = String(n);
|
|
317
|
+
for (const f in l)
|
|
318
|
+
c = c.replace(new RegExp(`\\$\\{${f}\\}`, "g"), l[f]);
|
|
319
|
+
c = c.replace(/\$\{label\}/g, ""), c && i.push(c);
|
|
320
320
|
}
|
|
321
|
-
} catch (
|
|
322
|
-
console.error("格式化验证消息出错:",
|
|
321
|
+
} catch (c) {
|
|
322
|
+
console.error("格式化验证消息出错:", c);
|
|
323
323
|
}
|
|
324
324
|
};
|
|
325
|
-
return Object.keys(e).forEach((
|
|
326
|
-
const o = e[
|
|
325
|
+
return Object.keys(e).forEach((n) => {
|
|
326
|
+
const o = e[n], l = [];
|
|
327
327
|
try {
|
|
328
|
-
s(
|
|
329
|
-
|
|
328
|
+
s(n, o, l), Array.isArray(o) && o.forEach((c) => {
|
|
329
|
+
c && typeof c == "object" && s(n, c, l);
|
|
330
330
|
}), o && typeof o == "object" && "fields" in o;
|
|
331
|
-
} catch (
|
|
332
|
-
console.error("处理验证规则出错:",
|
|
331
|
+
} catch (c) {
|
|
332
|
+
console.error("处理验证规则出错:", c);
|
|
333
333
|
}
|
|
334
334
|
const i = Array.from(new Set(l));
|
|
335
|
-
|
|
336
|
-
field:
|
|
335
|
+
n && i.length > 0 && t.push({
|
|
336
|
+
field: n,
|
|
337
337
|
rules: i
|
|
338
338
|
});
|
|
339
339
|
}), t;
|
|
340
|
-
},
|
|
340
|
+
}, pe = async (e) => {
|
|
341
341
|
const t = e.formData.value, a = e.formRules.value;
|
|
342
|
-
|
|
342
|
+
w(a) || (Le(e), e.ruleValidator || (e.ruleValidator = new Oe({}), e.ruleValidator.messages(W.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
|
|
343
343
|
}).catch(({ fields: s }) => s));
|
|
344
|
-
},
|
|
344
|
+
}, Rt = async (e, t, a) => (a || (a = new Oe({}), a.messages(W.messages()), a.define(t)), a.validate(e).then(() => {
|
|
345
345
|
}).catch(({ fields: s }) => s)), Le = (e) => {
|
|
346
346
|
e.ruleResults.value = void 0;
|
|
347
|
-
},
|
|
348
|
-
const e = G(
|
|
347
|
+
}, de = () => {
|
|
348
|
+
const e = G(U.EditorControl, void 0), t = u(G(U.LabelText, "")), a = u(G(U.RuleKey, "")), s = G(U.ErrInfo, void 0);
|
|
349
349
|
return {
|
|
350
350
|
editorCtrl: e,
|
|
351
351
|
labelText: t,
|
|
352
352
|
ruleKey: a,
|
|
353
353
|
errInfo: s
|
|
354
354
|
};
|
|
355
|
-
},
|
|
356
|
-
let a =
|
|
355
|
+
}, ka = (e, t) => {
|
|
356
|
+
let a = u({
|
|
357
357
|
msg: "",
|
|
358
358
|
errClass: ""
|
|
359
359
|
});
|
|
@@ -362,65 +362,65 @@ const Tt = (e) => {
|
|
|
362
362
|
const s = t == null ? void 0 : t.ruleResults;
|
|
363
363
|
return R(
|
|
364
364
|
() => s == null ? void 0 : s.value,
|
|
365
|
-
(
|
|
366
|
-
if (a.value.errClass = "", a.value.msg = "", !
|
|
367
|
-
const
|
|
365
|
+
(r) => {
|
|
366
|
+
if (a.value.errClass = "", a.value.msg = "", !w(r)) {
|
|
367
|
+
const n = La(
|
|
368
368
|
{
|
|
369
369
|
label: e.label,
|
|
370
370
|
rule: e.rule
|
|
371
371
|
},
|
|
372
372
|
t == null ? void 0 : t.formRules.value,
|
|
373
|
-
Qe(
|
|
373
|
+
Qe(r)
|
|
374
374
|
);
|
|
375
|
-
a.value.errClass =
|
|
375
|
+
a.value.errClass = n.errClass.value, a.value.msg = n.msg.value;
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
378
|
{ deep: !0 }
|
|
379
379
|
), a;
|
|
380
|
-
},
|
|
381
|
-
const s =
|
|
380
|
+
}, La = (e, t, a) => {
|
|
381
|
+
const s = u([]), r = u(""), n = u("");
|
|
382
382
|
if (!e.rule || !t || !a)
|
|
383
|
-
return { msg:
|
|
383
|
+
return { msg: r, ruleErrors: s, errClass: n };
|
|
384
384
|
e.rule.split("|").forEach((i) => {
|
|
385
385
|
if (i = i.trim(), i)
|
|
386
386
|
if (a[i])
|
|
387
387
|
s.value.push(...a[i]);
|
|
388
388
|
else {
|
|
389
|
-
const
|
|
390
|
-
for (let
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
const c = [];
|
|
390
|
+
for (let f in a)
|
|
391
|
+
f !== i && f.startsWith(i + ".") && c.push(...a[f]);
|
|
392
|
+
c.length > 0 && s.value.push(...c);
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
const l = /\${\w+}/g;
|
|
396
396
|
return s.value.forEach((i) => {
|
|
397
|
-
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
|
|
397
|
+
r.value && (r.value += " / "), r.value += i.message.replace("${label}", e.label ?? "");
|
|
398
|
+
const c = t[i.field];
|
|
399
|
+
if (c) {
|
|
400
|
+
const f = r.value.match(l);
|
|
401
|
+
f && f.forEach((p) => {
|
|
402
|
+
const v = p.replace("${", "").replace("}", "");
|
|
403
|
+
r.value = r.value.replace(p, c[v] ?? "");
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
|
-
}), s.value.length > 0 && (
|
|
407
|
-
},
|
|
408
|
-
|
|
409
|
-
const a =
|
|
410
|
-
return
|
|
406
|
+
}), s.value.length > 0 && (n.value = "error"), { msg: r, ruleErrors: s, errClass: n };
|
|
407
|
+
}, wt = (e, t) => {
|
|
408
|
+
ye(U.LabelText, e.label || ""), ye(U.RuleKey, e.rule || "");
|
|
409
|
+
const a = ka(e, t);
|
|
410
|
+
return ye(U.ErrInfo, a), a;
|
|
411
411
|
}, Pt = (e) => {
|
|
412
412
|
je(e);
|
|
413
|
-
},
|
|
413
|
+
}, Ot = (e) => {
|
|
414
414
|
const t = e.page, a = e.formData.value;
|
|
415
415
|
a[e.primaryKey ?? t.primaryKey] = null, je(e);
|
|
416
|
-
},
|
|
416
|
+
}, kt = (e) => {
|
|
417
417
|
e.visible.value = !1;
|
|
418
418
|
}, je = async (e) => {
|
|
419
419
|
var s;
|
|
420
420
|
const t = e.page;
|
|
421
421
|
if (e.isFormSaving.value = !0, Le(e), e.beforeSave && e.beforeSave() === !1)
|
|
422
422
|
return e.isFormSaving.value = !1, Promise.resolve();
|
|
423
|
-
if (e.formRules.value && await
|
|
423
|
+
if (e.formRules.value && await pe(e), e.ruleResults.value)
|
|
424
424
|
return S.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
|
|
425
425
|
const a = e.formData.value;
|
|
426
426
|
return qe(
|
|
@@ -440,20 +440,20 @@ const Tt = (e) => {
|
|
|
440
440
|
// 隐藏自动错误提示,特殊判断控制
|
|
441
441
|
loadingState: e.isFormSaving
|
|
442
442
|
}
|
|
443
|
-
).then((
|
|
444
|
-
var
|
|
445
|
-
if ((
|
|
443
|
+
).then((r) => {
|
|
444
|
+
var n, o;
|
|
445
|
+
if ((r == null ? void 0 : r.status) === E.SUCCESS)
|
|
446
446
|
S.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(), e.autoClose !== !1 && (e.visible.value = !1);
|
|
447
|
-
else if (
|
|
448
|
-
const l = (o =
|
|
447
|
+
else if (r != null && r.msg && ((n = r == null ? void 0 : r.msg) == null ? void 0 : n.indexOf("Duplicate entry")) > -1) {
|
|
448
|
+
const l = (o = r == null ? void 0 : r.msg) == null ? void 0 : o.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
|
|
449
449
|
if (l && l.length > 2 && l[1] && l[2]) {
|
|
450
|
-
const i = l[1],
|
|
451
|
-
if (
|
|
450
|
+
const i = l[1], c = l[2].replace(/Idx_/g, "").split("_"), f = e.formRules.value;
|
|
451
|
+
if (f && c.length > 0) {
|
|
452
452
|
const p = {};
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
c.forEach((v) => {
|
|
454
|
+
f[v] && (p[v] = [
|
|
455
455
|
{
|
|
456
|
-
field:
|
|
456
|
+
field: v,
|
|
457
457
|
fieldValue: i,
|
|
458
458
|
message: "数据重复"
|
|
459
459
|
}
|
|
@@ -461,18 +461,18 @@ const Tt = (e) => {
|
|
|
461
461
|
}), Object.keys(p).length > 0 && (console.error("保存失败!", p), e.ruleResults.value = p);
|
|
462
462
|
}
|
|
463
463
|
S.error(`保存失败!数据 \`${i}\` 已存在!`);
|
|
464
|
-
} else S.error((
|
|
464
|
+
} else S.error((r == null ? void 0 : r.msg) ?? "保存失败!");
|
|
465
465
|
} else
|
|
466
|
-
S.error((
|
|
466
|
+
S.error((r == null ? void 0 : r.msg) ?? "保存失败!");
|
|
467
467
|
});
|
|
468
|
-
},
|
|
468
|
+
}, Lt = async (e) => {
|
|
469
469
|
const t = e.page, a = e.grid;
|
|
470
470
|
e.isFormLoading.value = !0;
|
|
471
|
-
const s = e.formData.value,
|
|
472
|
-
return
|
|
473
|
-
e.isFormLoading.value = !1,
|
|
471
|
+
const s = e.formData.value, r = e.primaryKey ?? t.primaryKey;
|
|
472
|
+
return ea(a, { [r]: s[r] }, e.detailUrl).then((n) => {
|
|
473
|
+
e.isFormLoading.value = !1, n && Be(e, n);
|
|
474
474
|
});
|
|
475
|
-
},
|
|
475
|
+
}, Mt = (e) => {
|
|
476
476
|
const t = e.grid;
|
|
477
477
|
t && (t.rowData.value = void 0), e && (Je(e), e.visible && (e.visible.value = !1), setTimeout(() => {
|
|
478
478
|
e.visible.value = !0;
|
|
@@ -481,27 +481,27 @@ const Tt = (e) => {
|
|
|
481
481
|
Je(e), e.formData.value = { ...e.formData.value, ...t };
|
|
482
482
|
}, Je = (e) => {
|
|
483
483
|
e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Le(e);
|
|
484
|
-
},
|
|
484
|
+
}, se = "/login/", ae = [], Ma = (e) => {
|
|
485
485
|
for (const t of e) {
|
|
486
486
|
const a = ae.findIndex((s) => s.path === t.path);
|
|
487
|
-
a !== -1 && ae.splice(a, 1), ae.push(t),
|
|
487
|
+
a !== -1 && ae.splice(a, 1), ae.push(t), Y.addRoute(t);
|
|
488
488
|
}
|
|
489
489
|
}, ze = (e, t, a, s = "") => {
|
|
490
|
-
const
|
|
491
|
-
t[
|
|
492
|
-
},
|
|
493
|
-
history:
|
|
490
|
+
const r = s + (s ? "/" : "") + e.path;
|
|
491
|
+
t[r] = { ...e, parent: a }, e.children && e.children.forEach((n) => ze(n, t, e, r));
|
|
492
|
+
}, Y = Ta({
|
|
493
|
+
history: Ra("/"),
|
|
494
494
|
routes: ae
|
|
495
|
-
}),
|
|
496
|
-
var
|
|
497
|
-
const a = ((
|
|
495
|
+
}), $a = (e, t) => {
|
|
496
|
+
var r, n;
|
|
497
|
+
const a = ((r = e.meta) == null ? void 0 : r.roles) ?? [], s = (n = e.meta) == null ? void 0 : n.permission;
|
|
498
498
|
if (!t)
|
|
499
499
|
return a.length === 0 && !s;
|
|
500
500
|
if (t) {
|
|
501
|
-
const o =
|
|
502
|
-
if (
|
|
501
|
+
const o = _();
|
|
502
|
+
if (te.VITE_PERMISSION_MODE === "role")
|
|
503
503
|
return a.length === 0 ? !0 : o.hasRole(a);
|
|
504
|
-
if (
|
|
504
|
+
if (te.VITE_PERMISSION_MODE === "permit") {
|
|
505
505
|
if (a.length === 0 && !s)
|
|
506
506
|
return !0;
|
|
507
507
|
let l = !1, i = !1;
|
|
@@ -509,20 +509,20 @@ const Tt = (e) => {
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
return !1;
|
|
512
|
-
},
|
|
513
|
-
|
|
512
|
+
}, q = u(null);
|
|
513
|
+
Y.beforeEach((e, t, a) => {
|
|
514
514
|
var l;
|
|
515
515
|
const s = e;
|
|
516
|
-
if (e.path.startsWith("/error/") || e.path.startsWith(
|
|
516
|
+
if (e.path.startsWith("/error/") || e.path.startsWith(se))
|
|
517
517
|
return a();
|
|
518
|
-
const
|
|
518
|
+
const r = s.meta, o = ((r == null ? void 0 : r.roles) ?? []).length > 0 || ((l = r == null ? void 0 : r.permission) == null ? void 0 : l.length);
|
|
519
519
|
if (e.path === "/") {
|
|
520
|
-
const i =
|
|
520
|
+
const i = N();
|
|
521
521
|
if (!i.menuLoaded) {
|
|
522
|
-
|
|
522
|
+
q.value = {
|
|
523
523
|
to: e,
|
|
524
|
-
next: (
|
|
525
|
-
a({ path:
|
|
524
|
+
next: (c) => {
|
|
525
|
+
a({ path: c });
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
528
|
return;
|
|
@@ -533,35 +533,35 @@ W.beforeEach((e, t, a) => {
|
|
|
533
533
|
if (!o)
|
|
534
534
|
a();
|
|
535
535
|
else {
|
|
536
|
-
const i =
|
|
536
|
+
const i = _();
|
|
537
537
|
if (!i.isLogin)
|
|
538
|
-
a({ path:
|
|
538
|
+
a({ path: se });
|
|
539
539
|
else {
|
|
540
|
-
if (!
|
|
541
|
-
|
|
540
|
+
if (!N().menuLoaded) {
|
|
541
|
+
q.value = {
|
|
542
542
|
to: e,
|
|
543
543
|
next: a
|
|
544
544
|
};
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
const
|
|
547
|
+
const f = $a(s, i.isLogin);
|
|
548
548
|
a();
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
554
|
-
const { to: t, next: a } =
|
|
555
|
-
|
|
552
|
+
const Da = (e) => {
|
|
553
|
+
if (q.value) {
|
|
554
|
+
const { to: t, next: a } = q.value;
|
|
555
|
+
q.value = null, t.path === "/" ? a(e) : a(t.path);
|
|
556
556
|
}
|
|
557
|
-
},
|
|
557
|
+
}, Ua = (e) => {
|
|
558
558
|
const t = Me();
|
|
559
559
|
if (t.TabEnabled) {
|
|
560
|
-
if (
|
|
560
|
+
if (Ca(e.key, t.TabPanes))
|
|
561
561
|
return;
|
|
562
562
|
t.TabPanes.push(e);
|
|
563
563
|
}
|
|
564
|
-
},
|
|
564
|
+
}, Ca = (e, t) => t.find((a) => a.key === e), Me = Z("pageInfo", {
|
|
565
565
|
state: () => ({
|
|
566
566
|
TabActive: "",
|
|
567
567
|
TabPanes: [],
|
|
@@ -574,16 +574,16 @@ const $a = (e) => {
|
|
|
574
574
|
*/
|
|
575
575
|
removeTabPane(e) {
|
|
576
576
|
if (this.TabEnabled) {
|
|
577
|
-
|
|
577
|
+
N().excludeComponent(e);
|
|
578
578
|
let a = 0, s = [...this.TabPanes];
|
|
579
|
-
for (let
|
|
580
|
-
if (s[
|
|
581
|
-
s.splice(
|
|
579
|
+
for (let r = 0; r < s.length; r++)
|
|
580
|
+
if (s[r].key === e) {
|
|
581
|
+
s.splice(r, 1), a = r - 1 < 0 ? 0 : r - 1;
|
|
582
582
|
break;
|
|
583
583
|
}
|
|
584
|
-
for (let
|
|
585
|
-
if (s[
|
|
586
|
-
a =
|
|
584
|
+
for (let r = 0; r < s.length; r++)
|
|
585
|
+
if (s[r].key === this.TabActive) {
|
|
586
|
+
a = r;
|
|
587
587
|
break;
|
|
588
588
|
}
|
|
589
589
|
this.TabPanes = s, this.setTabActive(s[a].key);
|
|
@@ -595,7 +595,7 @@ const $a = (e) => {
|
|
|
595
595
|
* @returns
|
|
596
596
|
*/
|
|
597
597
|
async setTabActive(e) {
|
|
598
|
-
let a =
|
|
598
|
+
let a = N().findRoute(e);
|
|
599
599
|
if (!a) return;
|
|
600
600
|
const s = {
|
|
601
601
|
key: e,
|
|
@@ -606,36 +606,44 @@ const $a = (e) => {
|
|
|
606
606
|
// 默认为true
|
|
607
607
|
keepAlive: !(a.meta && !a.meta.keepAlive)
|
|
608
608
|
};
|
|
609
|
-
|
|
609
|
+
Ua(s), this.TabActive = e;
|
|
610
610
|
}
|
|
611
|
-
}
|
|
612
|
-
|
|
611
|
+
},
|
|
612
|
+
persist: !1
|
|
613
|
+
}), Na = {
|
|
613
614
|
appList: {
|
|
614
615
|
api: "PLATFORM_API",
|
|
615
616
|
authorize: !0,
|
|
616
617
|
url: "/api/RCTenanetOpSrv/getApps",
|
|
617
618
|
loadingText: !1
|
|
618
619
|
}
|
|
619
|
-
},
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
620
|
+
}, Ie = /* @__PURE__ */ new Map(), Fa = (e) => {
|
|
621
|
+
const t = _(), { roles: a, permission: s } = e.meta || {};
|
|
622
|
+
if (w(a) && w(s))
|
|
623
|
+
return !0;
|
|
624
|
+
if (te.VITE_PERMISSION_MODE === "role")
|
|
625
|
+
return !w(a) && a ? t.hasRole(a) : !0;
|
|
626
|
+
if (te.VITE_PERMISSION_MODE === "permit") {
|
|
627
|
+
let r = !1, n = !1;
|
|
628
|
+
return !w(a) && a && (r = t.hasRole(a)), t.isAdmin() ? r : (!w(s) && s && (n = t.hasPermit(e.path, s)), r || n);
|
|
629
|
+
}
|
|
630
|
+
return !1;
|
|
631
|
+
}, We = (e) => e.map((t) => {
|
|
632
|
+
const a = { ...t };
|
|
633
|
+
return Fa(a) ? (a.children && (a.children = We(a.children)), a) : null;
|
|
634
|
+
}).filter(Boolean), Ye = (e, t = "") => {
|
|
627
635
|
for (const a of e) {
|
|
628
636
|
if (!a.children && !a.redirect) {
|
|
629
637
|
let s = t + a.path;
|
|
630
638
|
return s.startsWith("/") || (s = "/" + s), s;
|
|
631
639
|
}
|
|
632
640
|
if (a.children && a.children.length > 0 && a.path !== "/error" && a.path !== "/login" && a.path !== "/:page(.*)") {
|
|
633
|
-
const s =
|
|
641
|
+
const s = Ye(a.children, t + a.path + "/");
|
|
634
642
|
if (s)
|
|
635
643
|
return s;
|
|
636
644
|
}
|
|
637
645
|
}
|
|
638
|
-
},
|
|
646
|
+
}, N = Z("appInfo", {
|
|
639
647
|
state: () => ({
|
|
640
648
|
appInfo: {
|
|
641
649
|
Id: "",
|
|
@@ -643,8 +651,8 @@ const $a = (e) => {
|
|
|
643
651
|
AppCode: "",
|
|
644
652
|
Version: "",
|
|
645
653
|
Host: "",
|
|
646
|
-
Source:
|
|
647
|
-
Action:
|
|
654
|
+
Source: Ce.Manual,
|
|
655
|
+
Action: Ue.App,
|
|
648
656
|
Path: "",
|
|
649
657
|
Icon: "",
|
|
650
658
|
Routes: [],
|
|
@@ -669,13 +677,13 @@ const $a = (e) => {
|
|
|
669
677
|
});
|
|
670
678
|
},
|
|
671
679
|
async getRemoteAppList() {
|
|
672
|
-
return
|
|
680
|
+
return K(Na.appList, {
|
|
673
681
|
Query: {
|
|
674
682
|
AppCode: this.appInfo.AppCode,
|
|
675
683
|
Enabled: 1
|
|
676
684
|
}
|
|
677
685
|
}).then((e) => {
|
|
678
|
-
(e == null ? void 0 : e.status) ===
|
|
686
|
+
(e == null ? void 0 : e.status) === E.SUCCESS && e.data && (this.appList.length = 0, this.appList.push(...e.data));
|
|
679
687
|
});
|
|
680
688
|
},
|
|
681
689
|
async toDefaultApp(e) {
|
|
@@ -686,14 +694,14 @@ const $a = (e) => {
|
|
|
686
694
|
let t = "";
|
|
687
695
|
const a = window.location.pathname.split("/");
|
|
688
696
|
if (a.length > 1) {
|
|
689
|
-
for (let
|
|
690
|
-
if (a[
|
|
691
|
-
t = a[
|
|
697
|
+
for (let r = a.length - 1; r >= 0; r--)
|
|
698
|
+
if (a[r] !== "") {
|
|
699
|
+
t = a[r];
|
|
692
700
|
break;
|
|
693
701
|
}
|
|
694
702
|
}
|
|
695
703
|
let s = null;
|
|
696
|
-
t && t != "login" ? s = this.appList.find((
|
|
704
|
+
t && t != "login" ? s = this.appList.find((r) => r.AppCode === t) : s = this.appList.find((r) => r.Default), t = s ? s.AppCode : this.appList[0].AppCode, await this.setActiveApp(t), (!e || e.startsWith("/#/") || e.includes("/error/") || window.location.hash.includes("/error/")) && this.push(this.appInfo.defaultPage);
|
|
697
705
|
},
|
|
698
706
|
/**
|
|
699
707
|
* 设置当前应用
|
|
@@ -708,7 +716,7 @@ const $a = (e) => {
|
|
|
708
716
|
flattenRoutes: {},
|
|
709
717
|
Routes: t ?? [],
|
|
710
718
|
defaultPage: ""
|
|
711
|
-
}), (!
|
|
719
|
+
}), (!Ne() || !Ia()) && (await _().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
|
|
712
720
|
},
|
|
713
721
|
/**
|
|
714
722
|
* 设置当前应用路由信息
|
|
@@ -722,16 +730,20 @@ const $a = (e) => {
|
|
|
722
730
|
defaultPage: ""
|
|
723
731
|
};
|
|
724
732
|
const t = this.appInfo.flattenRoutes;
|
|
725
|
-
for (const
|
|
726
|
-
ze(
|
|
727
|
-
Object.keys(t).forEach((
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
})
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
733
|
+
for (const a of e)
|
|
734
|
+
ze(a, t, void 0);
|
|
735
|
+
if (Object.keys(t).forEach((a) => {
|
|
736
|
+
const s = t[a];
|
|
737
|
+
s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(a) : this.CachedComponents.push(a));
|
|
738
|
+
}), _().isLogin) {
|
|
739
|
+
const a = We(this.appInfo.Routes);
|
|
740
|
+
if (Ma(a), this.appInfo.defaultPage = Ye(a) || "", this.appInfo.defaultPage) {
|
|
741
|
+
if (this.menuLoaded = !0, D.value && D.value.mainAppPush) {
|
|
742
|
+
const s = this.formatRoute(this.appInfo.defaultPage);
|
|
743
|
+
D.value.mainAppPush(s);
|
|
744
|
+
}
|
|
745
|
+
Da(this.appInfo.defaultPage);
|
|
746
|
+
}
|
|
735
747
|
}
|
|
736
748
|
},
|
|
737
749
|
/**
|
|
@@ -748,10 +760,10 @@ const $a = (e) => {
|
|
|
748
760
|
* @param path 路由地址
|
|
749
761
|
*/
|
|
750
762
|
push(e) {
|
|
751
|
-
this.findRoute(e) && Me().setTabActive(e),
|
|
752
|
-
if (
|
|
763
|
+
this.findRoute(e) && Me().setTabActive(e), ua(() => {
|
|
764
|
+
if (Y.push({ path: e }), D.value && D.value.mainAppPush) {
|
|
753
765
|
const a = this.formatRoute(e);
|
|
754
|
-
|
|
766
|
+
D.value.mainAppPush(a);
|
|
755
767
|
}
|
|
756
768
|
});
|
|
757
769
|
},
|
|
@@ -770,7 +782,7 @@ const $a = (e) => {
|
|
|
770
782
|
* @returns 组件实例
|
|
771
783
|
*/
|
|
772
784
|
cacheComponent(e, t) {
|
|
773
|
-
let a =
|
|
785
|
+
let a = Ie.get(t.path);
|
|
774
786
|
if (!a)
|
|
775
787
|
if (this.CachedComponents.includes(t.path))
|
|
776
788
|
a = {
|
|
@@ -779,7 +791,7 @@ const $a = (e) => {
|
|
|
779
791
|
render() {
|
|
780
792
|
return C(e);
|
|
781
793
|
}
|
|
782
|
-
},
|
|
794
|
+
}, Ie.set(t.path, a);
|
|
783
795
|
else return e;
|
|
784
796
|
return a;
|
|
785
797
|
},
|
|
@@ -788,7 +800,7 @@ const $a = (e) => {
|
|
|
788
800
|
* @param path 路由地址
|
|
789
801
|
*/
|
|
790
802
|
excludeComponent(e) {
|
|
791
|
-
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1),
|
|
803
|
+
this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), Ie.delete(e);
|
|
792
804
|
},
|
|
793
805
|
/**
|
|
794
806
|
* 路由路径层级查询,返回面包屑
|
|
@@ -808,8 +820,8 @@ const $a = (e) => {
|
|
|
808
820
|
AppCode: "",
|
|
809
821
|
Version: "",
|
|
810
822
|
Host: "",
|
|
811
|
-
Source:
|
|
812
|
-
Action:
|
|
823
|
+
Source: Ce.Manual,
|
|
824
|
+
Action: Ue.App,
|
|
813
825
|
Path: "",
|
|
814
826
|
Icon: "",
|
|
815
827
|
Routes: [],
|
|
@@ -819,15 +831,11 @@ const $a = (e) => {
|
|
|
819
831
|
}, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
|
|
820
832
|
},
|
|
821
833
|
logout() {
|
|
822
|
-
this.clean(),
|
|
834
|
+
this.clean(), Y.push({ path: se + "#/" }), Ne() && D.value && D.value.mainAppPush && D.value.mainAppPush(se + "#/");
|
|
823
835
|
}
|
|
824
836
|
},
|
|
825
|
-
persist:
|
|
826
|
-
|
|
827
|
-
storage: localStorage,
|
|
828
|
-
pick: ["appList"]
|
|
829
|
-
}
|
|
830
|
-
}), Ua = "userInfoStore", Ye = "Token解析失败", _e = "登录过期,请重新登录", $e = {
|
|
837
|
+
persist: !1
|
|
838
|
+
}), Xe = "Token解析失败", Fe = "登录过期,请重新登录", $e = {
|
|
831
839
|
login: {
|
|
832
840
|
api: "PLATFORM_API",
|
|
833
841
|
url: "/openapi/LoginSrv/login",
|
|
@@ -847,44 +855,46 @@ const $a = (e) => {
|
|
|
847
855
|
}
|
|
848
856
|
}, _a = (e) => {
|
|
849
857
|
let t = {
|
|
850
|
-
Option: {
|
|
858
|
+
Option: {
|
|
859
|
+
Mode: "MicroApp"
|
|
860
|
+
},
|
|
851
861
|
Query: e
|
|
852
862
|
};
|
|
853
|
-
return
|
|
863
|
+
return K($e.login, t).then((a) => (a == null ? void 0 : a.status) === E.SUCCESS ? a : null);
|
|
854
864
|
}, Ka = (e) => {
|
|
855
865
|
let t = {
|
|
856
866
|
Query: {
|
|
857
867
|
AppId: e
|
|
858
868
|
}
|
|
859
869
|
};
|
|
860
|
-
return
|
|
870
|
+
return K($e.auth, t).then((a) => (a == null ? void 0 : a.status) === E.SUCCESS ? a.data : (S.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
|
|
861
871
|
}, Ha = () => {
|
|
862
872
|
let e = {
|
|
863
873
|
Option: {},
|
|
864
874
|
Query: {}
|
|
865
875
|
};
|
|
866
|
-
return
|
|
876
|
+
return K($e.logout, e).then((t) => (t == null ? void 0 : t.status) === E.SUCCESS ? t.data : null);
|
|
867
877
|
}, Qa = (e) => {
|
|
868
878
|
try {
|
|
869
879
|
const a = JSON.parse(atob(e.split(".")[1])).exp;
|
|
870
880
|
return Date.now() / 1e3 > a;
|
|
871
881
|
} catch (t) {
|
|
872
|
-
return console.error(
|
|
882
|
+
return console.error(Xe, t), !0;
|
|
873
883
|
}
|
|
874
|
-
},
|
|
884
|
+
}, _e = (e, t) => e == "" ? (S.error(Fe, {
|
|
875
885
|
duration: 3e3,
|
|
876
886
|
onClose: t
|
|
877
|
-
}), !1) : Qa(e) ? (S.error(
|
|
887
|
+
}), !1) : Qa(e) ? (S.error(Fe, {
|
|
878
888
|
duration: 3e3,
|
|
879
889
|
onClose: t
|
|
880
|
-
}), !1) : !0,
|
|
890
|
+
}), !1) : !0, Va = (e) => {
|
|
881
891
|
try {
|
|
882
892
|
const t = JSON.parse(atob(e.token.split(".")[1]));
|
|
883
893
|
return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
|
|
884
894
|
} catch (t) {
|
|
885
|
-
return console.error(
|
|
895
|
+
return console.error(Xe, t), !1;
|
|
886
896
|
}
|
|
887
|
-
},
|
|
897
|
+
}, L = u(""), V = u(null), _ = Z("userInfo", {
|
|
888
898
|
state: () => ({
|
|
889
899
|
isLogin: !1,
|
|
890
900
|
userInfo: {
|
|
@@ -892,18 +902,12 @@ const $a = (e) => {
|
|
|
892
902
|
Name: "",
|
|
893
903
|
Code: "",
|
|
894
904
|
TenantId: null,
|
|
895
|
-
UserLevel: "
|
|
905
|
+
UserLevel: ""
|
|
896
906
|
},
|
|
897
907
|
token: "",
|
|
898
908
|
refreshToken: ""
|
|
899
909
|
}),
|
|
900
910
|
actions: {
|
|
901
|
-
/**
|
|
902
|
-
* 启动时初始化用户信息
|
|
903
|
-
*/
|
|
904
|
-
init() {
|
|
905
|
-
this.token && this.isLogin ? (Se(this.token, () => this.clean()), Z(this.token)) : this.clean();
|
|
906
|
-
},
|
|
907
911
|
/**
|
|
908
912
|
* 登录操作
|
|
909
913
|
* @param loginInfo 登录信息
|
|
@@ -916,17 +920,17 @@ const $a = (e) => {
|
|
|
916
920
|
if (s.errno)
|
|
917
921
|
return s;
|
|
918
922
|
{
|
|
919
|
-
const
|
|
920
|
-
if (this.token =
|
|
923
|
+
const r = a.data;
|
|
924
|
+
if (this.token = r.token, be(this.token), this.isLogin = !0, Va(r))
|
|
921
925
|
this.userInfo = {
|
|
922
926
|
...this.userInfo,
|
|
923
|
-
...
|
|
924
|
-
};
|
|
927
|
+
...r.UserInfo
|
|
928
|
+
}, L.value = r.UserInfo.UserLevel;
|
|
925
929
|
else {
|
|
926
930
|
S.error("用户信息解析失败");
|
|
927
931
|
return;
|
|
928
932
|
}
|
|
929
|
-
t && (
|
|
933
|
+
t && N().toDefaultApp();
|
|
930
934
|
}
|
|
931
935
|
}
|
|
932
936
|
},
|
|
@@ -938,13 +942,12 @@ const $a = (e) => {
|
|
|
938
942
|
async getRolePermits(e) {
|
|
939
943
|
if (!this.isLogin || !this.token)
|
|
940
944
|
return !1;
|
|
941
|
-
if (
|
|
945
|
+
if (V.value && V.value.appId === e)
|
|
942
946
|
return !0;
|
|
943
947
|
try {
|
|
944
948
|
const t = await Ka(e);
|
|
945
|
-
return t ? (
|
|
949
|
+
return t ? (V.value = {
|
|
946
950
|
appId: e,
|
|
947
|
-
level: this.userInfo.UserLevel,
|
|
948
951
|
permits: t.permits || [],
|
|
949
952
|
lastTime: t.lastTime
|
|
950
953
|
}, !0) : !1;
|
|
@@ -958,16 +961,18 @@ const $a = (e) => {
|
|
|
958
961
|
* @returns 是否有角色权限
|
|
959
962
|
*/
|
|
960
963
|
hasRole(e) {
|
|
961
|
-
return
|
|
964
|
+
return L.value ? Array.isArray(e) ? e.includes(L.value) : L.value === e : !1;
|
|
962
965
|
},
|
|
963
966
|
/**
|
|
964
967
|
* 检查功能权限
|
|
968
|
+
* @param url 所在页面
|
|
965
969
|
* @param permitCode 资源权限编码
|
|
966
970
|
* @returns 是否有功能权限
|
|
967
971
|
*/
|
|
968
972
|
hasPermit(e, t) {
|
|
969
|
-
var
|
|
970
|
-
|
|
973
|
+
var s;
|
|
974
|
+
const a = V.value;
|
|
975
|
+
return !a || !a.permits ? !1 : ((s = a.permits[e]) == null ? void 0 : s.includes(t)) ?? !1;
|
|
971
976
|
},
|
|
972
977
|
/**
|
|
973
978
|
* 获取用户信息
|
|
@@ -976,25 +981,50 @@ const $a = (e) => {
|
|
|
976
981
|
getUserInfo() {
|
|
977
982
|
return this.userInfo;
|
|
978
983
|
},
|
|
984
|
+
/**
|
|
985
|
+
* 设置用户信息
|
|
986
|
+
* 仅允许设置一次,启动时设置,避免通过其它方式设置
|
|
987
|
+
* @param userInfo 用户信息
|
|
988
|
+
* @param token 用户Token
|
|
989
|
+
*/
|
|
979
990
|
setUserInfo(e, t) {
|
|
980
|
-
if (!
|
|
991
|
+
if (!_e(t)) {
|
|
981
992
|
this.clean();
|
|
982
993
|
return;
|
|
983
994
|
}
|
|
984
|
-
this.userInfo = {
|
|
995
|
+
L.value || (L.value = e.UserLevel, this.userInfo = {
|
|
985
996
|
...this.userInfo,
|
|
986
997
|
...e
|
|
987
|
-
}, this.token = t,
|
|
998
|
+
}, this.token = t, be(this.token), this.isLogin = !0);
|
|
988
999
|
},
|
|
989
1000
|
/**
|
|
990
1001
|
* 获取用户Token
|
|
991
1002
|
* @returns 用户Token
|
|
992
1003
|
*/
|
|
993
1004
|
getToken() {
|
|
994
|
-
return
|
|
1005
|
+
return _e(this.token, () => {
|
|
995
1006
|
this.clean(), this.logout();
|
|
996
1007
|
}) ? this.token : "";
|
|
997
1008
|
},
|
|
1009
|
+
/**
|
|
1010
|
+
* 是否超级管理员
|
|
1011
|
+
*/
|
|
1012
|
+
isSuperAdmin() {
|
|
1013
|
+
return L.value === "Super";
|
|
1014
|
+
},
|
|
1015
|
+
/**
|
|
1016
|
+
* 是否管理员
|
|
1017
|
+
*/
|
|
1018
|
+
isAdmin() {
|
|
1019
|
+
return L.value === "Super" || L.value === "Admin";
|
|
1020
|
+
},
|
|
1021
|
+
/**
|
|
1022
|
+
* 获取用户级别
|
|
1023
|
+
* @returns 用户级别
|
|
1024
|
+
*/
|
|
1025
|
+
getUserLevel() {
|
|
1026
|
+
return L.value;
|
|
1027
|
+
},
|
|
998
1028
|
/*
|
|
999
1029
|
* 清理登录信息
|
|
1000
1030
|
*/
|
|
@@ -1005,7 +1035,7 @@ const $a = (e) => {
|
|
|
1005
1035
|
Code: "",
|
|
1006
1036
|
TenantId: "",
|
|
1007
1037
|
UserLevel: ""
|
|
1008
|
-
}, this.token = "",
|
|
1038
|
+
}, this.token = "", be(this.token), this.isLogin = !1, V.value = null, L.value = "", N().clean(), Promise.resolve();
|
|
1009
1039
|
},
|
|
1010
1040
|
/**
|
|
1011
1041
|
* 登出操作
|
|
@@ -1020,21 +1050,17 @@ const $a = (e) => {
|
|
|
1020
1050
|
await this.clean(), setTimeout(async () => {
|
|
1021
1051
|
S.success("已退出登录");
|
|
1022
1052
|
}, 1e3), setTimeout(async () => {
|
|
1023
|
-
(
|
|
1053
|
+
N().logout();
|
|
1024
1054
|
}, 2e3);
|
|
1025
1055
|
}
|
|
1026
1056
|
return Promise.resolve();
|
|
1027
1057
|
}
|
|
1028
1058
|
},
|
|
1029
|
-
persist:
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
pick: ["isLogin", "userInfo", "token", "refreshToken"]
|
|
1033
|
-
}
|
|
1034
|
-
}), Ct = (e, t) => {
|
|
1035
|
-
const a = Q();
|
|
1059
|
+
persist: !1
|
|
1060
|
+
}), $t = (e, t) => {
|
|
1061
|
+
const a = _();
|
|
1036
1062
|
return e.filter((s) => {
|
|
1037
|
-
if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(
|
|
1063
|
+
if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(Y.currentRoute.value.path, s.permit))
|
|
1038
1064
|
return !1;
|
|
1039
1065
|
if (!t) {
|
|
1040
1066
|
if (s.visible === !1)
|
|
@@ -1046,13 +1072,13 @@ const $a = (e) => {
|
|
|
1046
1072
|
});
|
|
1047
1073
|
}, Dt = (e, t) => {
|
|
1048
1074
|
const a = t == null ? void 0 : t.filter((s) => {
|
|
1049
|
-
const
|
|
1050
|
-
(
|
|
1075
|
+
const r = e.find(
|
|
1076
|
+
(n) => n.dataIndex === s.dataIndex || n.key === s.key || n.title === s.title
|
|
1051
1077
|
);
|
|
1052
|
-
return
|
|
1078
|
+
return r ? { ...s, ...r } : !1;
|
|
1053
1079
|
});
|
|
1054
1080
|
return [...a || [], ...e.filter((s) => !(a != null && a.includes(s)))];
|
|
1055
|
-
},
|
|
1081
|
+
}, Ga = (e) => (e.remotePage = !1, Ze(e).then((t) => t.rows)), Ze = (e) => {
|
|
1056
1082
|
e.gridQuery || (e.gridQuery = {});
|
|
1057
1083
|
const t = e.remotePage ? "find" : "list";
|
|
1058
1084
|
return ke(e, {
|
|
@@ -1061,11 +1087,11 @@ const $a = (e) => {
|
|
|
1061
1087
|
params: e.gridQuery,
|
|
1062
1088
|
loadingState: e.isGridLoading,
|
|
1063
1089
|
processParams: (a) => {
|
|
1064
|
-
var
|
|
1065
|
-
return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]),
|
|
1090
|
+
var r;
|
|
1091
|
+
return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), Pe((r = e.gridUrl) == null ? void 0 : r.params, a, e.gridQuery);
|
|
1066
1092
|
}
|
|
1067
1093
|
}).then((a) => {
|
|
1068
|
-
if ((a == null ? void 0 : a.status) ===
|
|
1094
|
+
if ((a == null ? void 0 : a.status) === E.SUCCESS) {
|
|
1069
1095
|
let s = a.data;
|
|
1070
1096
|
return s.rows ? (e.tableData.value = s.rows, e.total.value = s.total) : (e.tableData.value = a.data, e.total.value = a.data.length, s = {
|
|
1071
1097
|
total: e.total.value,
|
|
@@ -1086,29 +1112,29 @@ const $a = (e) => {
|
|
|
1086
1112
|
},
|
|
1087
1113
|
loadingState: e.isGridSaving,
|
|
1088
1114
|
...a
|
|
1089
|
-
}).then((s) => ((s == null ? void 0 : s.status) ===
|
|
1115
|
+
}).then((s) => ((s == null ? void 0 : s.status) === E.SUCCESS && setTimeout(() => {
|
|
1090
1116
|
e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
|
|
1091
|
-
}, 50), s)),
|
|
1117
|
+
}, 50), s)), Ut = (e, t) => {
|
|
1092
1118
|
const a = {};
|
|
1093
1119
|
return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], qa(e, a, {
|
|
1094
1120
|
loadingText: !1,
|
|
1095
1121
|
hideErrorToast: !0
|
|
1096
1122
|
});
|
|
1097
|
-
},
|
|
1123
|
+
}, ea = async (e, t, a) => await ke(e, {
|
|
1098
1124
|
urlKey: "detail",
|
|
1099
1125
|
url: a,
|
|
1100
1126
|
params: t,
|
|
1101
1127
|
loadingState: e.isGridLoading
|
|
1102
|
-
}),
|
|
1128
|
+
}), Ct = (e, t) => {
|
|
1103
1129
|
const a = t;
|
|
1104
|
-
return
|
|
1105
|
-
},
|
|
1130
|
+
return ea(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === E.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
|
|
1131
|
+
}, Nt = (e, t) => {
|
|
1106
1132
|
let a = e.editor;
|
|
1107
1133
|
e.rowData.value = t, a && (Be(a, t), a.visible.value = !0);
|
|
1108
|
-
},
|
|
1134
|
+
}, Ft = (e, t) => Pa(e, t, {
|
|
1109
1135
|
url: e.deleteUrl,
|
|
1110
1136
|
primaryKey: e.primaryKey
|
|
1111
|
-
}).then((a) => ((a == null ? void 0 : a.status) ===
|
|
1137
|
+
}).then((a) => ((a == null ? void 0 : a.status) === E.SUCCESS && setTimeout(() => {
|
|
1112
1138
|
e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
|
|
1113
1139
|
}, 50), a)), y = {
|
|
1114
1140
|
PageOption: {
|
|
@@ -1120,12 +1146,12 @@ const $a = (e) => {
|
|
|
1120
1146
|
primaryKey: "Id",
|
|
1121
1147
|
statusKey: "Enabled",
|
|
1122
1148
|
remotePage: !0,
|
|
1123
|
-
tableSize:
|
|
1124
|
-
selectable:
|
|
1125
|
-
searchBar:
|
|
1126
|
-
pageSize:
|
|
1127
|
-
rowExpand:
|
|
1128
|
-
buttons:
|
|
1149
|
+
tableSize: u("small"),
|
|
1150
|
+
selectable: u(!1),
|
|
1151
|
+
searchBar: u(!0),
|
|
1152
|
+
pageSize: u(10),
|
|
1153
|
+
rowExpand: u(!1),
|
|
1154
|
+
buttons: u(["New"]),
|
|
1129
1155
|
tools: ["Reload", "RowHeight", "TableHeadset"],
|
|
1130
1156
|
operates: ["Edit", "Delete"]
|
|
1131
1157
|
},
|
|
@@ -1139,7 +1165,7 @@ const $a = (e) => {
|
|
|
1139
1165
|
TreeOption: {
|
|
1140
1166
|
autoload: !0
|
|
1141
1167
|
}
|
|
1142
|
-
},
|
|
1168
|
+
}, _t = (e) => {
|
|
1143
1169
|
y.PageOption = {
|
|
1144
1170
|
...y.PageOption,
|
|
1145
1171
|
...e.pageOption
|
|
@@ -1158,64 +1184,64 @@ const $a = (e) => {
|
|
|
1158
1184
|
...y.EditorOption,
|
|
1159
1185
|
name: "",
|
|
1160
1186
|
default: a ? JSON.parse(JSON.stringify(a)) : void 0,
|
|
1161
|
-
visible:
|
|
1187
|
+
visible: u(!1),
|
|
1162
1188
|
page: t,
|
|
1163
|
-
formData:
|
|
1164
|
-
formRules:
|
|
1165
|
-
ruleResults:
|
|
1166
|
-
updateData:
|
|
1189
|
+
formData: u(a ? JSON.parse(JSON.stringify(a)) : void 0),
|
|
1190
|
+
formRules: u(s),
|
|
1191
|
+
ruleResults: u({}),
|
|
1192
|
+
updateData: u(void 0),
|
|
1167
1193
|
saveUrl: e.urls.save,
|
|
1168
1194
|
detailUrl: e.urls.detail,
|
|
1169
|
-
isFormSaving:
|
|
1170
|
-
isFormLoading:
|
|
1195
|
+
isFormSaving: u(!1),
|
|
1196
|
+
isFormLoading: u(!1)
|
|
1171
1197
|
}
|
|
1172
1198
|
}), Ba = (e, t, a) => {
|
|
1173
1199
|
const s = {
|
|
1174
1200
|
...y.GridOption,
|
|
1175
|
-
tableSize:
|
|
1176
|
-
selectable:
|
|
1177
|
-
searchBar:
|
|
1178
|
-
pageSize:
|
|
1179
|
-
rowExpand:
|
|
1180
|
-
buttons:
|
|
1201
|
+
tableSize: u(y.GridOption.tableSize.value),
|
|
1202
|
+
selectable: u(y.GridOption.selectable.value),
|
|
1203
|
+
searchBar: u(y.GridOption.searchBar.value),
|
|
1204
|
+
pageSize: u(y.GridOption.pageSize.value),
|
|
1205
|
+
rowExpand: u(y.GridOption.rowExpand.value),
|
|
1206
|
+
buttons: u([...y.GridOption.buttons.value]),
|
|
1181
1207
|
tools: [...y.GridOption.tools],
|
|
1182
1208
|
operates: [...y.GridOption.operates],
|
|
1183
|
-
columns:
|
|
1184
|
-
reload:
|
|
1185
|
-
pageNo:
|
|
1186
|
-
total:
|
|
1209
|
+
columns: u(a || []),
|
|
1210
|
+
reload: u(!1),
|
|
1211
|
+
pageNo: u(1),
|
|
1212
|
+
total: u(0),
|
|
1187
1213
|
page: t,
|
|
1188
|
-
selectKeys:
|
|
1189
|
-
selectRows:
|
|
1190
|
-
rowData:
|
|
1214
|
+
selectKeys: u([]),
|
|
1215
|
+
selectRows: u([]),
|
|
1216
|
+
rowData: u(void 0),
|
|
1191
1217
|
gridQuery: {},
|
|
1192
|
-
tableData:
|
|
1193
|
-
expandRows:
|
|
1194
|
-
isGridLoading:
|
|
1195
|
-
isGridSaving:
|
|
1218
|
+
tableData: Ve(void 0),
|
|
1219
|
+
expandRows: u({}),
|
|
1220
|
+
isGridLoading: u(!1),
|
|
1221
|
+
isGridSaving: u(!1),
|
|
1196
1222
|
gridUrl: e.urls.list || e.urls.find,
|
|
1197
1223
|
updateUrl: e.urls.update,
|
|
1198
1224
|
deleteUrl: e.urls.delete
|
|
1199
1225
|
};
|
|
1200
1226
|
return R(
|
|
1201
1227
|
() => s.reload.value,
|
|
1202
|
-
(
|
|
1203
|
-
|
|
1228
|
+
(r) => {
|
|
1229
|
+
r && (setTimeout(() => {
|
|
1204
1230
|
s.reload.value = !1;
|
|
1205
|
-
}, 1), s.remotePage ?
|
|
1231
|
+
}, 1), s.remotePage ? Ze(s) : Ga(s));
|
|
1206
1232
|
}
|
|
1207
1233
|
), {
|
|
1208
1234
|
gridCtrl: s
|
|
1209
1235
|
};
|
|
1210
|
-
},
|
|
1236
|
+
}, Kt = (e, t) => {
|
|
1211
1237
|
const a = {
|
|
1212
1238
|
...y.TreeOption,
|
|
1213
|
-
reload:
|
|
1239
|
+
reload: u(!1),
|
|
1214
1240
|
page: t,
|
|
1215
|
-
node:
|
|
1241
|
+
node: u(void 0),
|
|
1216
1242
|
url: e.urls.tree,
|
|
1217
|
-
data:
|
|
1218
|
-
isTreeLoading:
|
|
1243
|
+
data: Ve(void 0),
|
|
1244
|
+
isTreeLoading: u(!1)
|
|
1219
1245
|
};
|
|
1220
1246
|
return R(
|
|
1221
1247
|
() => a.reload.value,
|
|
@@ -1227,27 +1253,27 @@ const $a = (e) => {
|
|
|
1227
1253
|
), {
|
|
1228
1254
|
treeCtrl: a
|
|
1229
1255
|
};
|
|
1230
|
-
},
|
|
1256
|
+
}, Ht = (e, t, a) => {
|
|
1231
1257
|
for (const o in e.urls)
|
|
1232
1258
|
e.urls[o] && (e.urls[o].api || (e.urls[o].api = e.api), e.urls[o].authorize === void 0 && (e.urls[o].authorize = e.authorize));
|
|
1233
1259
|
const s = {
|
|
1234
1260
|
...y.PageOption,
|
|
1235
1261
|
...e
|
|
1236
|
-
}, { editorCtrl:
|
|
1237
|
-
return s.editor =
|
|
1262
|
+
}, { editorCtrl: r } = ja(e, s, t, a), { gridCtrl: n } = Ba(e, s);
|
|
1263
|
+
return s.editor = r, s.grid = n, n.editor = r, n.tools = ["Reload", "RowHeight", "TableHeadset", "Fullscreen"], r.grid = n, {
|
|
1238
1264
|
pageCtrl: s,
|
|
1239
|
-
editorCtrl:
|
|
1240
|
-
gridCtrl:
|
|
1265
|
+
editorCtrl: r,
|
|
1266
|
+
gridCtrl: n
|
|
1241
1267
|
};
|
|
1242
1268
|
};
|
|
1243
|
-
var
|
|
1269
|
+
var aa = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(aa || {});
|
|
1244
1270
|
class Ja {
|
|
1245
1271
|
constructor() {
|
|
1246
|
-
|
|
1272
|
+
k(this, "listeners", {});
|
|
1247
1273
|
}
|
|
1248
1274
|
// 检查事件名是否符合前缀
|
|
1249
1275
|
isValidPrefix(t) {
|
|
1250
|
-
return Object.values(
|
|
1276
|
+
return Object.values(aa).some((a) => t.startsWith(a + "."));
|
|
1251
1277
|
}
|
|
1252
1278
|
/**
|
|
1253
1279
|
* 事件订阅
|
|
@@ -1287,51 +1313,51 @@ class Ja {
|
|
|
1287
1313
|
this.listeners[t] && this.listeners[t].forEach((s) => s(t, ...a));
|
|
1288
1314
|
}
|
|
1289
1315
|
}
|
|
1290
|
-
const
|
|
1316
|
+
const re = new Ja(), he = (e, t, a, s, r, n) => {
|
|
1291
1317
|
if (s && t.reloadEvent && (s.reloadHandler = (o, l) => {
|
|
1292
|
-
za(
|
|
1293
|
-
},
|
|
1318
|
+
za(r, t, l, a);
|
|
1319
|
+
}, re.on(t.reloadEvent, s.reloadHandler)), t.data)
|
|
1294
1320
|
R(
|
|
1295
1321
|
() => t.data,
|
|
1296
1322
|
() => {
|
|
1297
|
-
|
|
1323
|
+
De(t, t.data, a, !0);
|
|
1298
1324
|
},
|
|
1299
1325
|
{ deep: !0, immediate: !0 }
|
|
1300
1326
|
);
|
|
1301
|
-
else if (
|
|
1302
|
-
e !== !1 &&
|
|
1327
|
+
else if (r && r.url)
|
|
1328
|
+
e !== !1 && ta(r, t, n ?? {}, a);
|
|
1303
1329
|
else {
|
|
1304
|
-
const o =
|
|
1330
|
+
const o = u(G(U.LabelText, ""));
|
|
1305
1331
|
S.error("`" + o.value + "` 未配置选项数据!", {
|
|
1306
1332
|
duration: 5e3
|
|
1307
1333
|
});
|
|
1308
1334
|
}
|
|
1309
|
-
},
|
|
1335
|
+
}, De = (e, t, a, s) => {
|
|
1310
1336
|
if (!t || t.length === 0) {
|
|
1311
1337
|
a.value = [];
|
|
1312
1338
|
return;
|
|
1313
1339
|
}
|
|
1314
1340
|
if (s) {
|
|
1315
|
-
const
|
|
1341
|
+
const r = {
|
|
1316
1342
|
...e.fieldMap
|
|
1317
1343
|
};
|
|
1318
|
-
t =
|
|
1344
|
+
t = xa(r, t);
|
|
1319
1345
|
}
|
|
1320
1346
|
t = JSON.parse(JSON.stringify(t)), e.all && t.unshift({
|
|
1321
1347
|
label: "全部",
|
|
1322
1348
|
value: void 0
|
|
1323
1349
|
}), a.value = t;
|
|
1324
1350
|
}, za = (e, t, a, s) => {
|
|
1325
|
-
Array.isArray(a) ?
|
|
1326
|
-
},
|
|
1327
|
-
t && e.reloadEvent && t.reloadHandler &&
|
|
1328
|
-
},
|
|
1329
|
-
const
|
|
1330
|
-
Wa(e, t.fieldMap,
|
|
1331
|
-
|
|
1351
|
+
Array.isArray(a) ? De(t, a, s, !0) : ta(e, t, { Query: a }, s);
|
|
1352
|
+
}, me = (e, t) => {
|
|
1353
|
+
t && e.reloadEvent && t.reloadHandler && re.off(e.reloadEvent, t.reloadHandler);
|
|
1354
|
+
}, ta = (e, t, a, s) => {
|
|
1355
|
+
const r = Pe(e.params, a, t.params);
|
|
1356
|
+
Wa(e, t.fieldMap, r).then((n) => {
|
|
1357
|
+
De(t, n, s, !1);
|
|
1332
1358
|
});
|
|
1333
1359
|
}, Wa = (e, t, a) => {
|
|
1334
|
-
const { fieldMap: s, ...
|
|
1360
|
+
const { fieldMap: s, ...r } = e, o = {
|
|
1335
1361
|
...{
|
|
1336
1362
|
url: "",
|
|
1337
1363
|
cacheTime: 6e4,
|
|
@@ -1340,49 +1366,49 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1340
1366
|
...e.fieldMap
|
|
1341
1367
|
}
|
|
1342
1368
|
},
|
|
1343
|
-
...
|
|
1369
|
+
...r
|
|
1344
1370
|
};
|
|
1345
|
-
return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}),
|
|
1371
|
+
return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}), K(o, a).then((l) => (l == null ? void 0 : l.status) === E.SUCCESS && l.data ? l.data : []);
|
|
1346
1372
|
}, Ya = (e, t) => {
|
|
1347
1373
|
if (e !== void 0)
|
|
1348
1374
|
return Array.isArray(e) ? t.filter((a) => e.includes(a.value)) : t.find((a) => a.value === e);
|
|
1349
|
-
},
|
|
1375
|
+
}, xe = (e, t, a) => {
|
|
1350
1376
|
const s = t.split(".");
|
|
1351
|
-
let
|
|
1352
|
-
for (let
|
|
1353
|
-
const o = s[
|
|
1354
|
-
|
|
1377
|
+
let r = e;
|
|
1378
|
+
for (let n = 0; n < s.length - 1; n++) {
|
|
1379
|
+
const o = s[n];
|
|
1380
|
+
r[o] || (r[o] = {}), r = r[o];
|
|
1355
1381
|
}
|
|
1356
|
-
|
|
1357
|
-
},
|
|
1382
|
+
r[s[s.length - 1]] = a;
|
|
1383
|
+
}, sa = (e, t, a) => {
|
|
1358
1384
|
if (a == null) {
|
|
1359
1385
|
Object.entries(t).forEach(([s]) => {
|
|
1360
|
-
|
|
1386
|
+
xe(e, s, a);
|
|
1361
1387
|
});
|
|
1362
1388
|
return;
|
|
1363
1389
|
}
|
|
1364
|
-
Array.isArray(a) || Object.entries(t).forEach(([s,
|
|
1365
|
-
if (
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1390
|
+
Array.isArray(a) || Object.entries(t).forEach(([s, r]) => {
|
|
1391
|
+
if (r.includes("${")) {
|
|
1392
|
+
const n = Aa(r, a);
|
|
1393
|
+
xe(e, s, n);
|
|
1368
1394
|
} else
|
|
1369
|
-
|
|
1395
|
+
xe(e, s, a[r]);
|
|
1370
1396
|
});
|
|
1371
|
-
},
|
|
1372
|
-
var r;
|
|
1373
|
-
s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && fe(s.editorCtrl);
|
|
1374
|
-
const n = Ya(t, a.value);
|
|
1375
|
-
return e.formData && e.outFields && ta(e.formData, e.outFields, n), e.changeEvent && (Array.isArray(e.changeEvent) ? e.changeEvent.every((o) => {
|
|
1376
|
-
se.emit(o, t, n);
|
|
1377
|
-
}) : se.emit(e.changeEvent, t, n)), s.inputEmit && s.inputEmit("change", t, n), n;
|
|
1378
|
-
}, ve = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], Xa = 7 * 24 * 60 * 60 * 1e3, xe = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Set(), N = f({}), Gt = N, Vt = (e) => {
|
|
1397
|
+
}, ve = (e, t, a, s) => {
|
|
1379
1398
|
var n;
|
|
1380
|
-
|
|
1381
|
-
const
|
|
1399
|
+
s.editorCtrl && ((n = s.errInfo) != null && n.value.errClass) && pe(s.editorCtrl);
|
|
1400
|
+
const r = Ya(t, a.value);
|
|
1401
|
+
return e.formData && e.outFields && sa(e.formData, e.outFields, r), e.changeEvent && (Array.isArray(e.changeEvent) ? e.changeEvent.every((o) => {
|
|
1402
|
+
re.emit(o, t, r);
|
|
1403
|
+
}) : re.emit(e.changeEvent, t, r)), s.inputEmit && s.inputEmit("change", t, r), r;
|
|
1404
|
+
}, ge = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], Xa = 7 * 24 * 60 * 60 * 1e3, Ae = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Set(), F = u({}), Qt = F, Vt = (e) => {
|
|
1405
|
+
var r;
|
|
1406
|
+
if (!e.iconUrl) return Ee;
|
|
1407
|
+
const t = u(!0), a = u("");
|
|
1382
1408
|
let s = !0;
|
|
1383
|
-
return (
|
|
1409
|
+
return (r = e.icons) != null && r.length && (s = e.icons.every((n) => F.value[n] !== void 0)), (e.icon && !F.value[e.icon] || !s) && Za(e, t).then(() => {
|
|
1384
1410
|
tt(e.iconUrl, e.monoColor || !1), t.value = !0;
|
|
1385
|
-
}),
|
|
1411
|
+
}), X({
|
|
1386
1412
|
props: {
|
|
1387
1413
|
icon: {
|
|
1388
1414
|
type: String
|
|
@@ -1408,40 +1434,40 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1408
1434
|
}
|
|
1409
1435
|
},
|
|
1410
1436
|
emits: ["update:iconIndex"],
|
|
1411
|
-
setup(
|
|
1412
|
-
const l =
|
|
1413
|
-
|
|
1437
|
+
setup(n, { emit: o }) {
|
|
1438
|
+
const l = u(n.icon), i = u(0), c = () => {
|
|
1439
|
+
n.icons && i.value++;
|
|
1414
1440
|
};
|
|
1415
1441
|
return R(
|
|
1416
|
-
() =>
|
|
1417
|
-
(
|
|
1418
|
-
|
|
1442
|
+
() => n.iconIndex,
|
|
1443
|
+
(f) => {
|
|
1444
|
+
f !== void 0 && (i.value = f);
|
|
1419
1445
|
},
|
|
1420
1446
|
{ immediate: !0 }
|
|
1421
1447
|
), R(
|
|
1422
1448
|
() => i.value,
|
|
1423
|
-
(
|
|
1424
|
-
|
|
1449
|
+
(f) => {
|
|
1450
|
+
n.icons && (f >= n.icons.length && (i.value = 0), l.value = n.icons[i.value], ee(a, l, l.value), o("update:iconIndex", i.value));
|
|
1425
1451
|
},
|
|
1426
1452
|
{ immediate: !0 }
|
|
1427
1453
|
), R(
|
|
1428
|
-
() =>
|
|
1454
|
+
() => F.value,
|
|
1429
1455
|
() => {
|
|
1430
1456
|
ee(a, l, l.value);
|
|
1431
1457
|
},
|
|
1432
1458
|
{ deep: !0 }
|
|
1433
1459
|
), R(
|
|
1434
|
-
() =>
|
|
1435
|
-
(
|
|
1436
|
-
ee(a, l,
|
|
1460
|
+
() => n.icon,
|
|
1461
|
+
(f) => {
|
|
1462
|
+
ee(a, l, f);
|
|
1437
1463
|
}
|
|
1438
|
-
), ee(a, l, l.value), { isLoaded: t, Icon: a, handleClick:
|
|
1464
|
+
), ee(a, l, l.value), { isLoaded: t, Icon: a, handleClick: c };
|
|
1439
1465
|
},
|
|
1440
1466
|
render() {
|
|
1441
1467
|
if (!t.value)
|
|
1442
|
-
return
|
|
1443
|
-
let
|
|
1444
|
-
Array.isArray(
|
|
1468
|
+
return Ee;
|
|
1469
|
+
let n = this.class, o = "";
|
|
1470
|
+
Array.isArray(n) ? o = n.join(" ") : typeof n == "string" && (o = n);
|
|
1445
1471
|
let l = [o];
|
|
1446
1472
|
return !/\bw-/.test(o) && !/$w-/.test(o) && l.push("w-4"), !/\bh-/.test(o) && !/$h-/.test(o) && l.push("h-4"), a.value ? C(Qe(a.value), {
|
|
1447
1473
|
onClick: this.$props.clickable ? this.handleClick : void 0,
|
|
@@ -1449,7 +1475,7 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1449
1475
|
style: {
|
|
1450
1476
|
fill: "currentColor",
|
|
1451
1477
|
cursor: this.$props.clickable ? "pointer" : "default",
|
|
1452
|
-
transform:
|
|
1478
|
+
transform: rt(this.angle, this.flip)
|
|
1453
1479
|
}
|
|
1454
1480
|
}) : C("div", { class: "w-[14px] h-[14px]" });
|
|
1455
1481
|
}
|
|
@@ -1458,16 +1484,16 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1458
1484
|
let a = e.iconUrl;
|
|
1459
1485
|
if (!a)
|
|
1460
1486
|
return console.error("图标库地址不能为空"), Promise.resolve();
|
|
1461
|
-
if (
|
|
1487
|
+
if (Ae.has(a))
|
|
1462
1488
|
return Promise.resolve();
|
|
1463
1489
|
const s = na(a);
|
|
1464
1490
|
if (s)
|
|
1465
|
-
return new Promise(async (
|
|
1491
|
+
return new Promise(async (n) => (ra(s.scriptContent), n()));
|
|
1466
1492
|
t.value = !1;
|
|
1467
|
-
const
|
|
1468
|
-
await et(a, e.monoColor || !1),
|
|
1493
|
+
const r = new Promise(async (n) => {
|
|
1494
|
+
await et(a, e.monoColor || !1), n(), Ae.delete(a);
|
|
1469
1495
|
});
|
|
1470
|
-
return
|
|
1496
|
+
return Ae.set(a, r), r;
|
|
1471
1497
|
}, et = async (e, t) => {
|
|
1472
1498
|
try {
|
|
1473
1499
|
const a = await fetch(e);
|
|
@@ -1477,30 +1503,30 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1477
1503
|
}
|
|
1478
1504
|
let s = await a.text();
|
|
1479
1505
|
s = t ? s.replace(/fill=\"[^\"]*\"/gi, "") : s;
|
|
1480
|
-
let
|
|
1481
|
-
const
|
|
1482
|
-
if (
|
|
1483
|
-
let o =
|
|
1506
|
+
let r = /^window\.(\w+)\s*=/;
|
|
1507
|
+
const n = s.match(r);
|
|
1508
|
+
if (n && n.length > 1) {
|
|
1509
|
+
let o = n[1];
|
|
1484
1510
|
at(e, o, t, s);
|
|
1485
1511
|
}
|
|
1486
|
-
|
|
1512
|
+
ra(s);
|
|
1487
1513
|
return;
|
|
1488
1514
|
} catch (a) {
|
|
1489
1515
|
return console.error("网络异常,无法加载图标库:", a), null;
|
|
1490
1516
|
}
|
|
1491
|
-
},
|
|
1517
|
+
}, ra = (e) => {
|
|
1492
1518
|
const t = document.createElement("script");
|
|
1493
1519
|
t.textContent = e, document.head.appendChild(t);
|
|
1494
1520
|
}, at = (e, t, a, s) => {
|
|
1495
|
-
let
|
|
1496
|
-
const
|
|
1521
|
+
let r = `icon_cache:${e}`;
|
|
1522
|
+
const n = {
|
|
1497
1523
|
windowKey: t,
|
|
1498
1524
|
monoColor: a,
|
|
1499
1525
|
scriptContent: s,
|
|
1500
1526
|
expireTime: Date.now() + Xa
|
|
1501
1527
|
// 缓存时间:7天
|
|
1502
1528
|
};
|
|
1503
|
-
localStorage.setItem(
|
|
1529
|
+
localStorage.setItem(r, JSON.stringify(n));
|
|
1504
1530
|
}, na = (e) => {
|
|
1505
1531
|
let t = `icon_cache:${e}`;
|
|
1506
1532
|
const a = localStorage.getItem(t);
|
|
@@ -1508,11 +1534,11 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1508
1534
|
let s;
|
|
1509
1535
|
try {
|
|
1510
1536
|
s = JSON.parse(a);
|
|
1511
|
-
} catch (
|
|
1512
|
-
return console.error("解析缓存失败:",
|
|
1537
|
+
} catch (r) {
|
|
1538
|
+
return console.error("解析缓存失败:", r), null;
|
|
1513
1539
|
}
|
|
1514
1540
|
return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
|
|
1515
|
-
},
|
|
1541
|
+
}, Gt = () => {
|
|
1516
1542
|
const e = Date.now();
|
|
1517
1543
|
for (const t in localStorage)
|
|
1518
1544
|
if (t.startsWith("icon_cache:")) {
|
|
@@ -1521,9 +1547,9 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1521
1547
|
}
|
|
1522
1548
|
}, ee = (e, t, a) => {
|
|
1523
1549
|
setTimeout(() => {
|
|
1524
|
-
t.value = a, t.value && (e.value =
|
|
1550
|
+
t.value = a, t.value && (e.value = F.value[t.value]);
|
|
1525
1551
|
}, 1);
|
|
1526
|
-
},
|
|
1552
|
+
}, Ee = C(
|
|
1527
1553
|
"svg",
|
|
1528
1554
|
{ class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
|
|
1529
1555
|
[
|
|
@@ -1549,50 +1575,50 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1549
1575
|
s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !Ke.has(s) && (Ke.add(s), st(s, t));
|
|
1550
1576
|
});
|
|
1551
1577
|
}, st = (e, t) => {
|
|
1552
|
-
const a = window[e],
|
|
1553
|
-
for (const l of
|
|
1554
|
-
const i = l.id,
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
})),
|
|
1578
|
+
const a = window[e], n = new DOMParser().parseFromString(a, "image/svg+xml").getElementsByTagName("symbol"), o = document.querySelectorAll("symbol");
|
|
1579
|
+
for (const l of n) {
|
|
1580
|
+
const i = l.id, c = Array.from(o).find((f) => f.id === i);
|
|
1581
|
+
c && t && (c.innerHTML = l.innerHTML, c.querySelectorAll("*").forEach((f) => {
|
|
1582
|
+
f.hasAttribute("fill") && f.removeAttribute("fill");
|
|
1583
|
+
})), F.value[i] || (F.value[i] = C("svg", { fill: "currentColor" }, [C("use", { "xlink:href": `#${i}` })]));
|
|
1558
1584
|
}
|
|
1559
|
-
},
|
|
1585
|
+
}, rt = (e, t) => {
|
|
1560
1586
|
let a = "";
|
|
1561
1587
|
return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
|
|
1562
|
-
},
|
|
1563
|
-
|
|
1564
|
-
},
|
|
1565
|
-
var o, l, i,
|
|
1566
|
-
const
|
|
1588
|
+
}, qt = (e, t, a, s) => {
|
|
1589
|
+
oa(e, [], a, s).forEach((n) => t.push(n));
|
|
1590
|
+
}, oa = (e, t, a, s) => {
|
|
1591
|
+
var o, l, i, c, f;
|
|
1592
|
+
const r = [], n = _();
|
|
1567
1593
|
for (const p of e) {
|
|
1568
|
-
if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (o = p.meta) == null ? void 0 : o.roles) != null && l.length && !
|
|
1594
|
+
if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (o = p.meta) == null ? void 0 : o.roles) != null && l.length && !n.hasRole(p.meta.roles) && (i = p.meta) != null && i.permission && !n.hasPermit(p.meta.permission, ":page"))
|
|
1569
1595
|
continue;
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1572
|
-
const
|
|
1573
|
-
key:
|
|
1574
|
-
label: ((
|
|
1575
|
-
title: ((
|
|
1596
|
+
const v = p.path.split("/");
|
|
1597
|
+
v.unshift(...t);
|
|
1598
|
+
const g = oa(p.children || [], v, a, s), P = {
|
|
1599
|
+
key: v.join("/"),
|
|
1600
|
+
label: ((c = p.name) == null ? void 0 : c.toString()) ?? "",
|
|
1601
|
+
title: ((f = p.name) == null ? void 0 : f.toString()) ?? "",
|
|
1576
1602
|
icon: p.icon ? C(a, { ...s, icon: p.icon }) : void 0,
|
|
1577
|
-
children:
|
|
1603
|
+
children: g.length > 0 ? g : void 0
|
|
1578
1604
|
};
|
|
1579
|
-
(
|
|
1605
|
+
(g.length > 0 || !p.children) && r.push(P);
|
|
1580
1606
|
}
|
|
1581
|
-
return
|
|
1582
|
-
}, He =
|
|
1607
|
+
return r;
|
|
1608
|
+
}, He = ca([]), jt = () => {
|
|
1583
1609
|
He.length = 0;
|
|
1584
|
-
const e =
|
|
1610
|
+
const e = N();
|
|
1585
1611
|
let a = Me().TabActive;
|
|
1586
|
-
e.matchedRoutes(a).forEach((
|
|
1612
|
+
e.matchedRoutes(a).forEach((r, n) => {
|
|
1587
1613
|
var l;
|
|
1588
1614
|
const o = {
|
|
1589
|
-
index:
|
|
1590
|
-
path:
|
|
1591
|
-
breadcrumbName: ((l =
|
|
1615
|
+
index: n,
|
|
1616
|
+
path: r.path,
|
|
1617
|
+
breadcrumbName: ((l = r.name) == null ? void 0 : l.toString()) ?? ""
|
|
1592
1618
|
};
|
|
1593
1619
|
He.push(o);
|
|
1594
1620
|
});
|
|
1595
|
-
},
|
|
1621
|
+
}, nt = {
|
|
1596
1622
|
host: {
|
|
1597
1623
|
api: "SITEHOST_API",
|
|
1598
1624
|
url: "/openapi/RCSiteHostSrv/get",
|
|
@@ -1604,7 +1630,7 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1604
1630
|
// 不显示错误
|
|
1605
1631
|
hideErrorToast: !0
|
|
1606
1632
|
}
|
|
1607
|
-
},
|
|
1633
|
+
}, Bt = Z("hostInfo", {
|
|
1608
1634
|
state: () => ({
|
|
1609
1635
|
hostInfo: {
|
|
1610
1636
|
Host: "",
|
|
@@ -1628,15 +1654,15 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1628
1654
|
return;
|
|
1629
1655
|
}
|
|
1630
1656
|
return new Promise((s) => {
|
|
1631
|
-
|
|
1632
|
-
const
|
|
1633
|
-
|
|
1657
|
+
Se.SITEHOST_API || (Se.SITEHOST_API = e);
|
|
1658
|
+
const r = t || window.location.origin;
|
|
1659
|
+
K(nt.host, {
|
|
1634
1660
|
Query: {
|
|
1635
|
-
Host:
|
|
1661
|
+
Host: r
|
|
1636
1662
|
}
|
|
1637
|
-
}).then((
|
|
1638
|
-
if ((
|
|
1639
|
-
const o =
|
|
1663
|
+
}).then((n) => {
|
|
1664
|
+
if ((n == null ? void 0 : n.status) === E.SUCCESS && n.data) {
|
|
1665
|
+
const o = n.data;
|
|
1640
1666
|
this._setHostInfo(o);
|
|
1641
1667
|
}
|
|
1642
1668
|
s();
|
|
@@ -1651,7 +1677,7 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1651
1677
|
...this.hostInfo,
|
|
1652
1678
|
...e
|
|
1653
1679
|
}, this.hostInfo.API_HOST)
|
|
1654
|
-
for (const t in this.hostInfo.API_HOST)
|
|
1680
|
+
for (const t in this.hostInfo.API_HOST) Se[t] = this.hostInfo.API_HOST[t];
|
|
1655
1681
|
if (this.hostInfo.SERVER_HOST)
|
|
1656
1682
|
for (const t in this.hostInfo.SERVER_HOST) Ea[t] = this.hostInfo.SERVER_HOST[t];
|
|
1657
1683
|
},
|
|
@@ -1666,7 +1692,7 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1666
1692
|
// storage: localStorage,
|
|
1667
1693
|
// pick: ['hostInfo'],
|
|
1668
1694
|
// },
|
|
1669
|
-
}),
|
|
1695
|
+
}), Jt = Z("settingInfo", {
|
|
1670
1696
|
state: () => ({
|
|
1671
1697
|
fullscreen: !1,
|
|
1672
1698
|
menuCollapse: !1,
|
|
@@ -1707,16 +1733,12 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1707
1733
|
});
|
|
1708
1734
|
}
|
|
1709
1735
|
},
|
|
1710
|
-
persist:
|
|
1711
|
-
|
|
1712
|
-
storage: localStorage,
|
|
1713
|
-
pick: ["fullscreen", "menuCollapse", "tableColumns"]
|
|
1714
|
-
}
|
|
1715
|
-
}), Wt = /* @__PURE__ */ Y({
|
|
1736
|
+
persist: !1
|
|
1737
|
+
}), zt = /* @__PURE__ */ X({
|
|
1716
1738
|
inheritAttrs: !1,
|
|
1717
1739
|
__name: "index",
|
|
1718
1740
|
props: {
|
|
1719
|
-
...
|
|
1741
|
+
...ue,
|
|
1720
1742
|
autoload: {
|
|
1721
1743
|
type: Boolean,
|
|
1722
1744
|
default: !1
|
|
@@ -1750,78 +1772,78 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1750
1772
|
},
|
|
1751
1773
|
emits: ["update:value", "select", "change", "update:labels"],
|
|
1752
1774
|
setup(e, { emit: t }) {
|
|
1753
|
-
var
|
|
1754
|
-
const a = e, s = ne(),
|
|
1775
|
+
var P, h, b;
|
|
1776
|
+
const a = e, s = ne(), r = u({
|
|
1755
1777
|
...a.url,
|
|
1756
|
-
url: ((
|
|
1757
|
-
fieldMap: a.fieldMap || ((
|
|
1778
|
+
url: ((P = a.url) == null ? void 0 : P.url) || "",
|
|
1779
|
+
fieldMap: a.fieldMap || ((h = a.url) == null ? void 0 : h.fieldMap),
|
|
1758
1780
|
params: a.params || ((b = a.url) == null ? void 0 : b.params),
|
|
1759
1781
|
loadingText: !1
|
|
1760
|
-
}),
|
|
1782
|
+
}), n = u(void 0);
|
|
1761
1783
|
R(
|
|
1762
1784
|
() => a.value,
|
|
1763
1785
|
() => {
|
|
1764
|
-
|
|
1786
|
+
n.value = a.value;
|
|
1765
1787
|
},
|
|
1766
1788
|
{ immediate: !0 }
|
|
1767
1789
|
), R(
|
|
1768
|
-
() =>
|
|
1769
|
-
(
|
|
1770
|
-
a.autoClean && a.formData && a.outFields &&
|
|
1790
|
+
() => n.value,
|
|
1791
|
+
(m) => {
|
|
1792
|
+
a.autoClean && a.formData && a.outFields && m !== a.value && sa(a.formData, a.outFields, null);
|
|
1771
1793
|
}
|
|
1772
1794
|
);
|
|
1773
|
-
const o =
|
|
1774
|
-
o.inputEmit =
|
|
1775
|
-
const p =
|
|
1776
|
-
var
|
|
1777
|
-
if (p.value = [],
|
|
1778
|
-
let d =
|
|
1779
|
-
...
|
|
1795
|
+
const o = de(), { editorCtrl: l, errInfo: i, labelText: c } = o, f = t;
|
|
1796
|
+
o.inputEmit = f;
|
|
1797
|
+
const p = u([]), v = (m) => {
|
|
1798
|
+
var $;
|
|
1799
|
+
if (p.value = [], m === "") return;
|
|
1800
|
+
let d = m.trim(), I = {
|
|
1801
|
+
...r.value.params,
|
|
1780
1802
|
Query: {
|
|
1781
|
-
...(
|
|
1803
|
+
...($ = r.value.params) == null ? void 0 : $.Query
|
|
1782
1804
|
}
|
|
1783
1805
|
};
|
|
1784
1806
|
a.searchField && (I.Query[a.searchField] = {
|
|
1785
1807
|
$like: "%" + d + "%"
|
|
1786
|
-
}), a.onsearch && a.onsearch(d, I),
|
|
1787
|
-
},
|
|
1788
|
-
const d =
|
|
1789
|
-
|
|
1790
|
-
const I =
|
|
1791
|
-
|
|
1808
|
+
}), a.onsearch && a.onsearch(d, I), he(!0, a, p, o, r.value, I);
|
|
1809
|
+
}, g = (m) => {
|
|
1810
|
+
const d = ve(a, m, p, o);
|
|
1811
|
+
f("update:value", m), f("select", m);
|
|
1812
|
+
const I = ge(d);
|
|
1813
|
+
f("update:labels", I), i != null && i.value.errClass && l && pe(l);
|
|
1792
1814
|
};
|
|
1793
|
-
return
|
|
1794
|
-
|
|
1815
|
+
return oe(() => {
|
|
1816
|
+
r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
1795
1817
|
title: "Name",
|
|
1796
1818
|
label: "Name",
|
|
1797
1819
|
value: "Name",
|
|
1798
1820
|
key: "Id"
|
|
1799
1821
|
});
|
|
1800
|
-
}),
|
|
1801
|
-
|
|
1802
|
-
}), (
|
|
1822
|
+
}), le(() => {
|
|
1823
|
+
me(a, o);
|
|
1824
|
+
}), (m, d) => {
|
|
1803
1825
|
var I;
|
|
1804
|
-
return
|
|
1805
|
-
|
|
1806
|
-
value:
|
|
1807
|
-
"onUpdate:value": d[0] || (d[0] = (
|
|
1826
|
+
return A(), O("div", null, [
|
|
1827
|
+
j(x(pa), ie({
|
|
1828
|
+
value: n.value,
|
|
1829
|
+
"onUpdate:value": d[0] || (d[0] = ($) => n.value = $),
|
|
1808
1830
|
class: [(I = x(i)) == null ? void 0 : I.errClass, "error w-full"],
|
|
1809
1831
|
options: p.value,
|
|
1810
|
-
onSearch:
|
|
1811
|
-
onSelect:
|
|
1812
|
-
placeholder: a.url && !a.url.loading ? "请输入并选择" + x(
|
|
1832
|
+
onSearch: v,
|
|
1833
|
+
onSelect: g,
|
|
1834
|
+
placeholder: a.url && !a.url.loading ? "请输入并选择" + x(c) : ""
|
|
1813
1835
|
}, x(s)), null, 16, ["value", "class", "options", "placeholder"])
|
|
1814
1836
|
]);
|
|
1815
1837
|
};
|
|
1816
1838
|
}
|
|
1817
|
-
}),
|
|
1839
|
+
}), ot = { class: "min-h-[32px] pt-[5px]" }, lt = {
|
|
1818
1840
|
key: 1,
|
|
1819
1841
|
class: "text-center text-gray-500"
|
|
1820
|
-
},
|
|
1842
|
+
}, Wt = /* @__PURE__ */ X({
|
|
1821
1843
|
inheritAttrs: !1,
|
|
1822
1844
|
__name: "index",
|
|
1823
1845
|
props: {
|
|
1824
|
-
...
|
|
1846
|
+
...ue,
|
|
1825
1847
|
nodata: {
|
|
1826
1848
|
type: String,
|
|
1827
1849
|
default: ""
|
|
@@ -1838,66 +1860,66 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1838
1860
|
},
|
|
1839
1861
|
emits: ["change", "update:labels"],
|
|
1840
1862
|
setup(e, { emit: t }) {
|
|
1841
|
-
var
|
|
1842
|
-
const a = e, s = ne(),
|
|
1863
|
+
var f, p, v;
|
|
1864
|
+
const a = e, s = ne(), r = u({
|
|
1843
1865
|
...a.url,
|
|
1844
|
-
url: ((
|
|
1866
|
+
url: ((f = a.url) == null ? void 0 : f.url) || "",
|
|
1845
1867
|
fieldMap: a.fieldMap || ((p = a.url) == null ? void 0 : p.fieldMap),
|
|
1846
|
-
params: a.params || ((
|
|
1868
|
+
params: a.params || ((v = a.url) == null ? void 0 : v.params),
|
|
1847
1869
|
loadingText: !1
|
|
1848
|
-
}),
|
|
1849
|
-
|
|
1850
|
-
const i =
|
|
1851
|
-
const
|
|
1870
|
+
}), n = de(), { errInfo: o } = n, l = t;
|
|
1871
|
+
n.inputEmit = l;
|
|
1872
|
+
const i = u([]), c = (g) => {
|
|
1873
|
+
const h = ve(a, g, i, n), b = ge(h);
|
|
1852
1874
|
l("update:labels", b);
|
|
1853
1875
|
};
|
|
1854
|
-
return
|
|
1855
|
-
|
|
1876
|
+
return oe(() => {
|
|
1877
|
+
r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
1856
1878
|
title: "Name",
|
|
1857
1879
|
label: "Name",
|
|
1858
1880
|
value: "Id",
|
|
1859
1881
|
key: "Id"
|
|
1860
|
-
}),
|
|
1861
|
-
}),
|
|
1862
|
-
|
|
1863
|
-
}), (
|
|
1864
|
-
|
|
1865
|
-
onChange:
|
|
1882
|
+
}), he(a.autoload, a, i, n, r.value, r.value.params);
|
|
1883
|
+
}), le(() => {
|
|
1884
|
+
me(a, n);
|
|
1885
|
+
}), (g, P) => (A(), O("div", ot, [
|
|
1886
|
+
j(x(da), ie({
|
|
1887
|
+
onChange: c,
|
|
1866
1888
|
class: "w-full mb-[-3px]"
|
|
1867
1889
|
}, x(s)), {
|
|
1868
|
-
default:
|
|
1869
|
-
i.value.length > 0 ? (
|
|
1890
|
+
default: Q(() => [
|
|
1891
|
+
i.value.length > 0 ? (A(!0), O(J, { key: 0 }, Te(i.value, (h) => {
|
|
1870
1892
|
var b;
|
|
1871
|
-
return
|
|
1872
|
-
key:
|
|
1873
|
-
value:
|
|
1874
|
-
disabled:
|
|
1875
|
-
class:
|
|
1893
|
+
return A(), Re(x(ha), {
|
|
1894
|
+
key: h.value,
|
|
1895
|
+
value: h.value,
|
|
1896
|
+
disabled: h.disabled || h.value && e.disabledItems && e.disabledItems.indexOf(h.value.toString()) > -1,
|
|
1897
|
+
class: Ge([
|
|
1876
1898
|
((b = x(o)) == null ? void 0 : b.errClass) === "error" ? "error !text-red-400" : "",
|
|
1877
1899
|
"text-nowrap",
|
|
1878
1900
|
"pb-1",
|
|
1879
1901
|
e.wrap ? `w-1/${a.wrap}` : ""
|
|
1880
1902
|
])
|
|
1881
1903
|
}, {
|
|
1882
|
-
default:
|
|
1883
|
-
we(
|
|
1904
|
+
default: Q(() => [
|
|
1905
|
+
we(z(h.label), 1)
|
|
1884
1906
|
]),
|
|
1885
1907
|
_: 2
|
|
1886
1908
|
}, 1032, ["value", "disabled", "class"]);
|
|
1887
|
-
}), 128)) : e.nodata ? (
|
|
1909
|
+
}), 128)) : e.nodata ? (A(), O("div", lt, z(e.nodata), 1)) : B("", !0)
|
|
1888
1910
|
]),
|
|
1889
1911
|
_: 1
|
|
1890
1912
|
}, 16)
|
|
1891
1913
|
]));
|
|
1892
1914
|
}
|
|
1893
|
-
}),
|
|
1915
|
+
}), it = { class: "min-h-[32px] pt-1" }, ut = {
|
|
1894
1916
|
key: 1,
|
|
1895
1917
|
class: "text-center text-gray-500"
|
|
1896
|
-
},
|
|
1918
|
+
}, Yt = /* @__PURE__ */ X({
|
|
1897
1919
|
inheritAttrs: !1,
|
|
1898
1920
|
__name: "index",
|
|
1899
1921
|
props: {
|
|
1900
|
-
...
|
|
1922
|
+
...ue,
|
|
1901
1923
|
value: {
|
|
1902
1924
|
type: [String, Number, null, Array],
|
|
1903
1925
|
default: void 0
|
|
@@ -1915,84 +1937,84 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
1915
1937
|
},
|
|
1916
1938
|
emits: ["change", "update:value", "update:labels"],
|
|
1917
1939
|
setup(e, { emit: t }) {
|
|
1918
|
-
var
|
|
1919
|
-
const a = e, s = ne(),
|
|
1940
|
+
var v, g, P;
|
|
1941
|
+
const a = e, s = ne(), r = u({
|
|
1920
1942
|
...a.url,
|
|
1921
|
-
url: ((
|
|
1922
|
-
fieldMap: a.fieldMap || ((
|
|
1923
|
-
params: a.params || ((
|
|
1943
|
+
url: ((v = a.url) == null ? void 0 : v.url) || "",
|
|
1944
|
+
fieldMap: a.fieldMap || ((g = a.url) == null ? void 0 : g.fieldMap),
|
|
1945
|
+
params: a.params || ((P = a.url) == null ? void 0 : P.params),
|
|
1924
1946
|
loadingText: !1
|
|
1925
|
-
}),
|
|
1926
|
-
o.inputEmit =
|
|
1927
|
-
() =>
|
|
1928
|
-
(
|
|
1929
|
-
|
|
1947
|
+
}), n = u(a.value), o = de(), { errInfo: l } = o, i = u([]), c = t;
|
|
1948
|
+
o.inputEmit = c, R(
|
|
1949
|
+
() => n.value,
|
|
1950
|
+
(h) => {
|
|
1951
|
+
c("update:value", h);
|
|
1930
1952
|
}
|
|
1931
1953
|
);
|
|
1932
|
-
const
|
|
1933
|
-
if (typeof
|
|
1934
|
-
const
|
|
1935
|
-
return
|
|
1954
|
+
const f = (h, b) => {
|
|
1955
|
+
if (typeof h == "object" && typeof b == "object") {
|
|
1956
|
+
const m = JSON.stringify(h) === JSON.stringify(b);
|
|
1957
|
+
return m && (n.value = h), m;
|
|
1936
1958
|
}
|
|
1937
|
-
return
|
|
1938
|
-
}, p = (
|
|
1939
|
-
const b =
|
|
1940
|
-
|
|
1959
|
+
return h === b;
|
|
1960
|
+
}, p = (h) => {
|
|
1961
|
+
const b = h.target.value, m = ve(a, b, i, o), d = ge(m);
|
|
1962
|
+
c("update:labels", d);
|
|
1941
1963
|
};
|
|
1942
|
-
return
|
|
1943
|
-
var
|
|
1944
|
-
|
|
1964
|
+
return oe(() => {
|
|
1965
|
+
var h;
|
|
1966
|
+
r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
1945
1967
|
label: "Name",
|
|
1946
1968
|
value: "Id",
|
|
1947
1969
|
key: "Id"
|
|
1948
|
-
}),
|
|
1949
|
-
}),
|
|
1950
|
-
|
|
1951
|
-
}), (
|
|
1952
|
-
|
|
1953
|
-
value:
|
|
1954
|
-
"onUpdate:value": b[0] || (b[0] = (
|
|
1970
|
+
}), he(a.autoload, a, i, o, r.value, (h = r.value) == null ? void 0 : h.params);
|
|
1971
|
+
}), le(() => {
|
|
1972
|
+
me(a, o);
|
|
1973
|
+
}), (h, b) => (A(), O("div", it, [
|
|
1974
|
+
j(x(ma), ie({
|
|
1975
|
+
value: n.value,
|
|
1976
|
+
"onUpdate:value": b[0] || (b[0] = (m) => n.value = m),
|
|
1955
1977
|
autocheck: !1,
|
|
1956
1978
|
onChange: p,
|
|
1957
1979
|
class: "w-full flex align-items flex-wrap mb-[-3px]"
|
|
1958
1980
|
}, x(s)), {
|
|
1959
|
-
default:
|
|
1960
|
-
i.value.length > 0 ? (
|
|
1981
|
+
default: Q(() => [
|
|
1982
|
+
i.value.length > 0 ? (A(!0), O(J, { key: 0 }, Te(i.value, (m) => {
|
|
1961
1983
|
var d;
|
|
1962
|
-
return
|
|
1963
|
-
key:
|
|
1984
|
+
return A(), O(J, {
|
|
1985
|
+
key: m.value
|
|
1964
1986
|
}, [
|
|
1965
|
-
|
|
1987
|
+
m.visible !== !1 ? (A(), Re(x(va), {
|
|
1966
1988
|
key: 0,
|
|
1967
|
-
checked:
|
|
1968
|
-
value:
|
|
1969
|
-
class:
|
|
1989
|
+
checked: f(m.value, a.value),
|
|
1990
|
+
value: m.value,
|
|
1991
|
+
class: Ge([
|
|
1970
1992
|
((d = x(l)) == null ? void 0 : d.errClass) === "error" ? "error !text-red-400" : "",
|
|
1971
1993
|
"text-nowrap",
|
|
1972
1994
|
"pb-1",
|
|
1973
1995
|
e.wrap ? `w-1/${a.wrap}` : ""
|
|
1974
1996
|
])
|
|
1975
1997
|
}, {
|
|
1976
|
-
default:
|
|
1977
|
-
we(
|
|
1998
|
+
default: Q(() => [
|
|
1999
|
+
we(z(m.label), 1)
|
|
1978
2000
|
]),
|
|
1979
2001
|
_: 2
|
|
1980
|
-
}, 1032, ["checked", "value", "class"])) :
|
|
2002
|
+
}, 1032, ["checked", "value", "class"])) : B("", !0)
|
|
1981
2003
|
], 64);
|
|
1982
|
-
}), 128)) : e.nodata ? (
|
|
2004
|
+
}), 128)) : e.nodata ? (A(), O("div", ut, z(e.nodata), 1)) : B("", !0)
|
|
1983
2005
|
]),
|
|
1984
2006
|
_: 1
|
|
1985
2007
|
}, 16, ["value"])
|
|
1986
2008
|
]));
|
|
1987
2009
|
}
|
|
1988
|
-
}),
|
|
2010
|
+
}), ct = {
|
|
1989
2011
|
key: 0,
|
|
1990
2012
|
class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
|
|
1991
|
-
},
|
|
2013
|
+
}, Xt = /* @__PURE__ */ X({
|
|
1992
2014
|
inheritAttrs: !1,
|
|
1993
2015
|
__name: "index",
|
|
1994
2016
|
props: {
|
|
1995
|
-
...
|
|
2017
|
+
...ue,
|
|
1996
2018
|
value: {
|
|
1997
2019
|
type: [String, Number, Array, null],
|
|
1998
2020
|
default: void 0
|
|
@@ -2030,86 +2052,86 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
2030
2052
|
},
|
|
2031
2053
|
emits: ["change", "update:value", "update:labels"],
|
|
2032
2054
|
setup(e, { emit: t }) {
|
|
2033
|
-
var
|
|
2034
|
-
const a = e, s = ne(),
|
|
2055
|
+
var h, b, m;
|
|
2056
|
+
const a = e, s = ne(), r = u({
|
|
2035
2057
|
...a.url,
|
|
2036
|
-
url: ((
|
|
2058
|
+
url: ((h = a.url) == null ? void 0 : h.url) || "",
|
|
2037
2059
|
fieldMap: a.fieldMap || ((b = a.url) == null ? void 0 : b.fieldMap),
|
|
2038
|
-
params: a.params || ((
|
|
2060
|
+
params: a.params || ((m = a.url) == null ? void 0 : m.params),
|
|
2039
2061
|
loadingText: !1
|
|
2040
|
-
}),
|
|
2041
|
-
|
|
2042
|
-
const p =
|
|
2062
|
+
}), n = de(), { editorCtrl: o, errInfo: l, labelText: i } = n, c = u(void 0), f = t;
|
|
2063
|
+
n.inputEmit = f;
|
|
2064
|
+
const p = u([]);
|
|
2043
2065
|
R(
|
|
2044
2066
|
() => p.value,
|
|
2045
2067
|
(d) => {
|
|
2046
|
-
d.length > 0 &&
|
|
2068
|
+
d.length > 0 && w(a.value) && a.selectFirst ? (c.value = d[0].value, P(d[0].value)) : c.value = a.value === null ? void 0 : a.value;
|
|
2047
2069
|
}
|
|
2048
2070
|
);
|
|
2049
|
-
const
|
|
2071
|
+
const v = u(s.placeholder);
|
|
2050
2072
|
R(
|
|
2051
|
-
() =>
|
|
2073
|
+
() => r.value.loading,
|
|
2052
2074
|
(d) => {
|
|
2053
|
-
d ?
|
|
2075
|
+
d ? v.value = "" : v.value || (v.value = "请选择" + i.value);
|
|
2054
2076
|
},
|
|
2055
2077
|
{ immediate: !0 }
|
|
2056
2078
|
);
|
|
2057
|
-
const
|
|
2079
|
+
const g = u(a.value);
|
|
2058
2080
|
R(
|
|
2059
|
-
() =>
|
|
2081
|
+
() => c.value,
|
|
2060
2082
|
(d) => {
|
|
2061
|
-
if (s.mode === "multiple" &&
|
|
2062
|
-
|
|
2083
|
+
if (s.mode === "multiple" && w(d) && w(g.value)) {
|
|
2084
|
+
f("update:value", g.value);
|
|
2063
2085
|
return;
|
|
2064
2086
|
}
|
|
2065
|
-
|
|
2087
|
+
f("update:value", d);
|
|
2066
2088
|
}
|
|
2067
2089
|
);
|
|
2068
|
-
const
|
|
2069
|
-
const I =
|
|
2070
|
-
|
|
2090
|
+
const P = (d) => {
|
|
2091
|
+
const I = ve(a, d, p, n), $ = ge(I);
|
|
2092
|
+
c.value = d, f("update:labels", $), f("change", d), l != null && l.value.errClass && o && pe(o);
|
|
2071
2093
|
};
|
|
2072
|
-
return
|
|
2094
|
+
return oe(() => {
|
|
2073
2095
|
var d;
|
|
2074
|
-
if (
|
|
2096
|
+
if (r.value && !r.value.fieldMap && (r.value.fieldMap = {
|
|
2075
2097
|
label: "Name",
|
|
2076
2098
|
value: "Id",
|
|
2077
2099
|
key: "Id"
|
|
2078
2100
|
}), a.dataKey) {
|
|
2079
|
-
const I = JSON.parse(JSON.stringify(
|
|
2101
|
+
const I = JSON.parse(JSON.stringify(M.getOptions(a.dataKey)));
|
|
2080
2102
|
p.value = I;
|
|
2081
|
-
} else
|
|
2082
|
-
}),
|
|
2083
|
-
|
|
2103
|
+
} else he(a.autoload, a, p, n, r.value, (d = r.value) == null ? void 0 : d.params);
|
|
2104
|
+
}), le(() => {
|
|
2105
|
+
me(a, n);
|
|
2084
2106
|
}), (d, I) => {
|
|
2085
|
-
var
|
|
2086
|
-
return
|
|
2087
|
-
a.url && a.url.loading === !0 ? (
|
|
2088
|
-
|
|
2089
|
-
I[1] || (I[1] =
|
|
2090
|
-
])) :
|
|
2091
|
-
|
|
2092
|
-
class: [(
|
|
2093
|
-
value:
|
|
2094
|
-
"onUpdate:value": I[0] || (I[0] = (
|
|
2107
|
+
var $;
|
|
2108
|
+
return A(), O("div", null, [
|
|
2109
|
+
a.url && a.url.loading === !0 ? (A(), O("div", ct, [
|
|
2110
|
+
j(x(Ee), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
2111
|
+
I[1] || (I[1] = fa("span", null, "数据加载中...", -1))
|
|
2112
|
+
])) : B("", !0),
|
|
2113
|
+
j(x(ga), ie({
|
|
2114
|
+
class: [($ = x(l)) == null ? void 0 : $.errClass, "w-full"],
|
|
2115
|
+
value: c.value,
|
|
2116
|
+
"onUpdate:value": I[0] || (I[0] = (H) => c.value = H),
|
|
2095
2117
|
"allow-clear": !0,
|
|
2096
|
-
onChange:
|
|
2097
|
-
placeholder:
|
|
2118
|
+
onChange: P,
|
|
2119
|
+
placeholder: v.value,
|
|
2098
2120
|
"label-in-value": !1
|
|
2099
2121
|
}, x(s)), {
|
|
2100
|
-
default:
|
|
2101
|
-
(
|
|
2102
|
-
key:
|
|
2122
|
+
default: Q(() => [
|
|
2123
|
+
(A(!0), O(J, null, Te(p.value, (H) => (A(), O(J, {
|
|
2124
|
+
key: H.value
|
|
2103
2125
|
}, [
|
|
2104
|
-
|
|
2126
|
+
H.visible !== !1 ? (A(), Re(x(ya), {
|
|
2105
2127
|
key: 0,
|
|
2106
|
-
value:
|
|
2128
|
+
value: H.value
|
|
2107
2129
|
}, {
|
|
2108
|
-
default:
|
|
2109
|
-
we(
|
|
2130
|
+
default: Q(() => [
|
|
2131
|
+
we(z(H.label), 1)
|
|
2110
2132
|
]),
|
|
2111
2133
|
_: 2
|
|
2112
|
-
}, 1032, ["value"])) :
|
|
2134
|
+
}, 1032, ["value"])) : B("", !0)
|
|
2113
2135
|
], 64))), 128))
|
|
2114
2136
|
]),
|
|
2115
2137
|
_: 1
|
|
@@ -2119,73 +2141,73 @@ const se = new Ja(), de = (e, t, a, s, n, r) => {
|
|
|
2119
2141
|
}
|
|
2120
2142
|
});
|
|
2121
2143
|
export {
|
|
2122
|
-
|
|
2144
|
+
Tt as $,
|
|
2123
2145
|
ke as A,
|
|
2124
|
-
|
|
2125
|
-
|
|
2146
|
+
wa as B,
|
|
2147
|
+
_t as C,
|
|
2126
2148
|
ja as D,
|
|
2127
2149
|
Ba as E,
|
|
2128
|
-
|
|
2129
|
-
|
|
2150
|
+
Kt as F,
|
|
2151
|
+
Ht as G,
|
|
2130
2152
|
Ya as H,
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2153
|
+
sa as I,
|
|
2154
|
+
ve as J,
|
|
2155
|
+
ge as K,
|
|
2156
|
+
Qt as L,
|
|
2157
|
+
Gt as M,
|
|
2136
2158
|
st as N,
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2159
|
+
M as O,
|
|
2160
|
+
U as P,
|
|
2161
|
+
rt as Q,
|
|
2162
|
+
qt as R,
|
|
2141
2163
|
He as S,
|
|
2142
|
-
|
|
2164
|
+
jt as T,
|
|
2143
2165
|
je as U,
|
|
2144
|
-
|
|
2166
|
+
Lt as V,
|
|
2145
2167
|
Be as W,
|
|
2146
|
-
|
|
2147
|
-
|
|
2168
|
+
Et as X,
|
|
2169
|
+
Rt as Y,
|
|
2148
2170
|
Le as Z,
|
|
2149
|
-
|
|
2150
|
-
|
|
2171
|
+
zt as _,
|
|
2172
|
+
Jt as a,
|
|
2151
2173
|
Dt as a0,
|
|
2152
2174
|
qa as a1,
|
|
2153
|
-
|
|
2154
|
-
|
|
2175
|
+
ea as a2,
|
|
2176
|
+
Ct as a3,
|
|
2155
2177
|
At as a4,
|
|
2156
2178
|
qe as a5,
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2179
|
+
Pa as a6,
|
|
2180
|
+
aa as a7,
|
|
2181
|
+
re as a8,
|
|
2182
|
+
q as a9,
|
|
2161
2183
|
ae as aa,
|
|
2162
|
-
|
|
2163
|
-
|
|
2184
|
+
N as ab,
|
|
2185
|
+
Bt as ac,
|
|
2164
2186
|
Me as ad,
|
|
2165
|
-
|
|
2166
|
-
|
|
2187
|
+
W as ae,
|
|
2188
|
+
Ot as b,
|
|
2167
2189
|
Vt as c,
|
|
2168
2190
|
Pt as d,
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2191
|
+
wt as e,
|
|
2192
|
+
Nt as f,
|
|
2193
|
+
Ft as g,
|
|
2194
|
+
$t as h,
|
|
2195
|
+
w as i,
|
|
2196
|
+
Mt as j,
|
|
2197
|
+
de as k,
|
|
2198
|
+
he as l,
|
|
2199
|
+
me as m,
|
|
2200
|
+
pe as n,
|
|
2201
|
+
kt as o,
|
|
2202
|
+
Ze as p,
|
|
2203
|
+
Ga as q,
|
|
2204
|
+
Y as r,
|
|
2205
|
+
Ut as s,
|
|
2184
2206
|
Oa as t,
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2207
|
+
_ as u,
|
|
2208
|
+
ue as v,
|
|
2209
|
+
Ee as w,
|
|
2210
|
+
Wt as x,
|
|
2211
|
+
Yt as y,
|
|
2212
|
+
Xt as z
|
|
2191
2213
|
};
|