dlzn-ui 1.95.0 → 1.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/assets/Picker-Cyw0VxVm.css +1 -0
  2. package/assets/button-Dwzndalp.css +2 -0
  3. package/assets/menu-CgQB8NyR.css +1 -0
  4. package/assets/table-BAM00F7-.css +1 -0
  5. package/chunks/{Common-Cx8evfsI.mjs → Common-DEnkEenA.mjs} +22 -24
  6. package/chunks/{Day-B_L-4G7r.mjs → Day-BJk-nwsB.mjs} +15 -17
  7. package/chunks/{Hour-BoPa9lUc.mjs → Hour-nvQIVCKw.mjs} +1 -1
  8. package/chunks/{Index-Cdiby2pA.mjs → Index-BAZNGkfP.mjs} +5 -5
  9. package/chunks/{Index-DXm9TIsz.mjs → Index-CPTcMvNy.mjs} +1 -1
  10. package/chunks/{Index-BtCphN_L.mjs → Index-DkZ1A8A0.mjs} +1 -1
  11. package/chunks/{Index-B2DLdn8E.mjs → Index-DtNVp8Jl.mjs} +8 -8
  12. package/chunks/{IndexItem-BM6uGIZB.mjs → IndexItem-C4w0eN1d.mjs} +1 -1
  13. package/chunks/MenuNode-B8rjEp8n.mjs +56 -0
  14. package/chunks/{Minute-D9KPTG2q.mjs → Minute-idRXtDVQ.mjs} +1 -1
  15. package/chunks/{Month-QvaptAFC.mjs → Month-CIhYqqTE.mjs} +1 -1
  16. package/chunks/{Second-BMlnxwXg.mjs → Second-DfCTit3h.mjs} +1 -1
  17. package/chunks/{UserInfo-BydBVUCg.mjs → UserInfo-DqHkhnLr.mjs} +9 -10
  18. package/chunks/Wrapper-LEchQmDn.mjs +47 -0
  19. package/chunks/button-DqozxOkh.mjs +2280 -0
  20. package/chunks/{custom-page-list-6pTTm3FF.mjs → custom-page-list-dwWHpOuz.mjs} +4 -4
  21. package/chunks/{custom-page-table-Re33Gkku.mjs → custom-page-table-DwmFejZX.mjs} +2 -2
  22. package/chunks/{menu-DTGuCZKc.mjs → menu-ByFEkFXJ.mjs} +3 -3
  23. package/chunks/{overview-DlWs1w6r.mjs → overview-B8RZSoRQ.mjs} +1 -1
  24. package/chunks/{page-list-gSwymVpQ.mjs → page-list-qQTRGef9.mjs} +52 -52
  25. package/chunks/page-query-D0O5XScF.mjs +124 -0
  26. package/chunks/{page-table-BgaJqpoa.mjs → page-table-CvB-sMda.mjs} +6 -6
  27. package/chunks/{pagination-iPAiud09.mjs → pagination-BL-oNG9D.mjs} +11 -11
  28. package/chunks/{table-DOmgDY1k.mjs → table-C7ub7He7.mjs} +152 -155
  29. package/components/button/index.mjs +1 -1
  30. package/components/button/src/button.mjs +1 -1
  31. package/components/checkbox-group/index.mjs +1 -1
  32. package/components/checkbox-group/src/checkbox-group.mjs +1 -1
  33. package/components/cron/index.mjs +1 -1
  34. package/components/cron/src/Common.mjs +1 -1
  35. package/components/cron/src/Day.mjs +1 -1
  36. package/components/cron/src/Hour.mjs +1 -1
  37. package/components/cron/src/Minute.mjs +1 -1
  38. package/components/cron/src/Month.mjs +1 -1
  39. package/components/cron/src/Picker.mjs +48 -48
  40. package/components/cron/src/Second.mjs +1 -1
  41. package/components/cron/src/cron.mjs +1 -1
  42. package/components/custom-page-list/index.mjs +1 -1
  43. package/components/custom-page-list/src/custom-page-list.mjs +1 -1
  44. package/components/custom-page-list/src/custom-page-list.vue.d.ts +1 -1
  45. package/components/custom-page-table/index.mjs +1 -1
  46. package/components/custom-page-table/src/custom-page-table.mjs +1 -1
  47. package/components/date-picker/src/date-picker.vue.d.ts +1 -1
  48. package/components/form/index.mjs +1 -1
  49. package/components/form/src/form.mjs +1 -1
  50. package/components/index.mjs +29 -39
  51. package/components/overview/index.mjs +1 -1
  52. package/components/overview/src/DicLabel/Index.mjs +1 -1
  53. package/components/overview/src/IndexItem.mjs +1 -1
  54. package/components/overview/src/overview.mjs +1 -1
  55. package/components/page-list/index.mjs +1 -1
  56. package/components/page-list/src/page-list.d.ts +238 -238
  57. package/components/page-list/src/page-list.mjs +1 -1
  58. package/components/page-list/src/page-list.vue.d.ts +1 -1
  59. package/components/page-query/index.mjs +1 -1
  60. package/components/page-query/src/page-query.mjs +1 -1
  61. package/components/page-query/src/page-query.vue.d.ts +2 -3
  62. package/components/page-table/index.mjs +1 -1
  63. package/components/page-table/src/page-table.mjs +1 -1
  64. package/components/pagination/index.mjs +1 -1
  65. package/components/pagination/src/pagination.mjs +1 -1
  66. package/components/radio-group/index.mjs +1 -1
  67. package/components/radio-group/src/radio-group.mjs +1 -1
  68. package/components/select/index.mjs +2 -2
  69. package/components/select/src/select.mjs +1 -1
  70. package/components/select-sys-user/index.mjs +1 -1
  71. package/components/select-sys-user/src/Picker.mjs +17 -19
  72. package/components/select-sys-user/src/select-sys-user.mjs +1 -1
  73. package/components/table/index.mjs +1 -1
  74. package/components/table/src/table.mjs +1 -1
  75. package/components/tree/index.mjs +2 -3
  76. package/components/tree/src/tree.mjs +1 -1
  77. package/components/tree-select/index.mjs +1 -1
  78. package/components/tree-select/src/tree-select.mjs +1 -1
  79. package/components/upload/index.mjs +2 -2
  80. package/components/upload/src/upload.mjs +1 -1
  81. package/hooks/useContextMenu/menu/index.mjs +1 -1
  82. package/hooks/useContextMenu/menu/src/MenuNode.mjs +1 -1
  83. package/hooks/useContextMenu/menu/src/menu.mjs +1 -1
  84. package/hooks/useDicOptions/index.mjs +1 -1
  85. package/hooks/useSysUser/index.mjs +2 -2
  86. package/index.mjs +29 -39
  87. package/layout/Index.mjs +1 -1
  88. package/layout/Login.mjs +14 -15
  89. package/layout/NotFound.mjs +19 -20
  90. package/layout/modules/Aside.mjs +1 -1
  91. package/layout/modules/Breadcrumb.mjs +1 -1
  92. package/layout/modules/Header.mjs +1 -1
  93. package/layout/profile/Index.mjs +45 -48
  94. package/layout/profile/ResetPwd.mjs +1 -1
  95. package/layout/profile/UserInfo.mjs +1 -1
  96. package/package.json +1 -1
  97. package/plugins/autoImport/$alova/index.mjs +2 -2
  98. package/plugins/autoImport/$confirm/index.mjs +2 -32
  99. package/plugins/autoImport/$dialog/index.mjs +2 -54
  100. package/plugins/captcha/captcha.mjs +111 -112
  101. package/plugins/captcha/index.mjs +1 -1
  102. package/plugins/initialize/webUpdateNotify.mjs +1 -1
  103. package/plugins/tableRenders/Wrapper.mjs +1 -1
  104. package/plugins/tableRenders/cell/Buttons/Index.mjs +1 -1
  105. package/plugins/tableRenders/cell/DicLabel/Index.mjs +1 -1
  106. package/plugins/tableRenders/cell/Select/Index.mjs +1 -1
  107. package/plugins/tableRenders/cell/index.mjs +4 -4
  108. package/plugins/tableRenders/title/index.mjs +1 -1
  109. package/router/index.mjs +2 -2
  110. package/store/modules/common.mjs +1 -1
  111. package/store/modules/login.mjs +1 -1
  112. package/store/modules/recentRouters.mjs +1 -1
  113. package/store/modules/router.mjs +1 -1
  114. package/store/modules/user.mjs +1 -1
  115. package/assets/Picker-Bg1T3ak_.css +0 -1
  116. package/assets/button-CoP5-rI4.css +0 -2
  117. package/assets/form-BEBdn52r.css +0 -2
  118. package/assets/menu-DaBAai1-.css +0 -1
  119. package/assets/select-cEZdThYc.css +0 -1
  120. package/assets/table-h04EVpJK.css +0 -1
  121. package/assets/upload-CWjniRuv.css +0 -1
  122. package/chunks/MenuNode-B0BuD3Z-.mjs +0 -55
  123. package/chunks/Wrapper-DerfLvaX.mjs +0 -49
  124. package/chunks/button-DWWr8rbi.mjs +0 -1153
  125. package/chunks/checkbox-group-YP6Zs24H.mjs +0 -72
  126. package/chunks/cron-C0hsPMmz.mjs +0 -107
  127. package/chunks/form-DDECRusH.mjs +0 -281
  128. package/chunks/page-query-d9mh2elg.mjs +0 -127
  129. package/chunks/radio-group-C3AjJtmo.mjs +0 -70
  130. package/chunks/select-D37IzAHf.mjs +0 -161
  131. package/chunks/select-sys-user-ByPdQiNS.mjs +0 -108
  132. package/chunks/tree-Bmj2il_w.mjs +0 -25
  133. package/chunks/tree-CgTvu0bm.mjs +0 -81
  134. package/chunks/tree-select-CIu8DIrE.mjs +0 -114
  135. package/chunks/upload-GrQ6xgLf.mjs +0 -151
@@ -0,0 +1,2280 @@
1
+ import { t as e } from "./icon-COjp1yrx.mjs";
2
+ import { t } from "./popconfirm-DxWa7vWm.mjs";
3
+ import { n, t as r } from "./useAppContext-D47amIp5.mjs";
4
+ import i from "../plugins/autoImport/$loading/index.mjs";
5
+ import { t as a } from "./checkbox-CLlUEbkk.mjs";
6
+ import o from "../plugins/autoImport/$msg/index.mjs";
7
+ import s from "../layout/index2.mjs";
8
+ import { t as c } from "./scrollbar-Bf2VJTtD.mjs";
9
+ import l from "../hooks/useMQ/index.mjs";
10
+ import u from "../store/modules/excludeKPname.mjs";
11
+ import { t as d } from "./gradient-text-B6JwSk-u.mjs";
12
+ import { t as f } from "./plugin-vue_export-helper-B3ysoDQm.mjs";
13
+ import { t as p } from "./image-BEsiUWeF.mjs";
14
+ import { t as m } from "./MenuNode-DUrmFCgV.mjs";
15
+ import h from "../hooks/useContextMenu/index.mjs";
16
+ import { t as ee } from "./Provider-D_6GI2ye.mjs";
17
+ import { passwordReg as te, passwordRegMessage as g } from "../constants/others.mjs";
18
+ import { isFalsy as _, isValidNumberString as v } from "../utils/boolean.mjs";
19
+ import { stringDisplay as y } from "../utils/string.mjs";
20
+ import { saveAs as b } from "../utils/tool.mjs";
21
+ import x, { useClearList as ne } from "../hooks/useList/index.mjs";
22
+ import re from "../plugins/autoImport/$drawer/index.mjs";
23
+ import { n as ie, t as ae } from "./input-B8jjJrK5.mjs";
24
+ import { t as oe } from "./date-picker-a5izI55t.mjs";
25
+ import { t as se } from "./input-number-D55mzch-.mjs";
26
+ import { t as ce } from "./range-input-8ddDrOBB.mjs";
27
+ import { n as le, t as ue } from "./tag-input-iNXrRXk2.mjs";
28
+ import { t as de } from "./slider-C63Gzbld.mjs";
29
+ import { t as fe } from "./switch-CqV3-avv.mjs";
30
+ import { t as pe } from "./textarea-xkwOhNut.mjs";
31
+ import { Fragment as S, KeepAlive as me, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as he, createSlots as ge, createTextVNode as D, createVNode as O, defineAsyncComponent as _e, defineComponent as k, getCurrentInstance as A, guardReactiveProps as ve, h as j, inject as ye, markRaw as be, mergeDefaults as M, mergeProps as N, nextTick as P, normalizeClass as xe, normalizeProps as F, onMounted as Se, openBlock as I, provide as Ce, reactive as we, ref as L, renderList as R, renderSlot as Te, resolveComponent as Ee, resolveDynamicComponent as z, shallowRef as De, toDisplayString as B, unref as V, useAttrs as Oe, useSlots as ke, useTemplateRef as Ae, watch as H, withCtx as U, withModifiers as je } from "vue";
32
+ import { useElementSize as Me, useElementVisibility as Ne, useFocus as Pe, useMutationObserver as Fe, useResizeObserver as Ie } from "@vueuse/core";
33
+ import { Breadcrumb as Le, BreadcrumbItem as Re, Button as ze, CheckboxGroup as Be, Content as Ve, DialogPlugin as He, Drawer as Ue, Dropdown as We, Form as Ge, FormItem as Ke, HeadMenu as qe, Header as Je, InputAdornment as Ye, Layout as Xe, Menu as Ze, MenuItem as Qe, RadioGroup as $e, Select as et, Tree as tt, TreeSelect as nt, Upload as rt } from "tdesign-vue-next";
34
+ import { cloneDeep as it, isPlainObject as at } from "lodash-es";
35
+ import { defineStore as W } from "pinia";
36
+ import { createRouter as ot, createWebHistory as st, useRoute as G, useRouter as ct } from "vue-router";
37
+ import lt from "virtual:dlzn-ui/app-params";
38
+ import { createAlova as ut } from "alova";
39
+ import dt from "alova/fetch";
40
+ import ft from "alova/vue";
41
+ import pt from "path-browserify";
42
+ import '../assets/button-Dwzndalp.css';//#region ../../packages/dlzn-ui/components/button/src/button.ts
43
+ var mt = {
44
+ autoIcon: !0,
45
+ autoLoading: !0,
46
+ autoTheme: !0,
47
+ loading: void 0
48
+ }, ht = {
49
+ autoLabelWidth: !0,
50
+ colon: !0,
51
+ data: () => we({}),
52
+ disabled: !1,
53
+ labelAlign: "top",
54
+ layout: "inline",
55
+ msgErrorWhenValidate: !0,
56
+ preventSubmitDefault: !0,
57
+ readonly: !1,
58
+ requiredMark: void 0,
59
+ resetType: "initial",
60
+ showErrorMessage: !0
61
+ };
62
+ //#endregion
63
+ //#region ../../packages/dlzn-ui/store/modules/common.ts
64
+ function gt() {
65
+ return X.Get("common/appInfo", { meta: {
66
+ useFailMsg: !1,
67
+ useLoading: !1,
68
+ useSysFailMsg: !1,
69
+ useToken: !1
70
+ } });
71
+ }
72
+ var K = W("common", () => {
73
+ let e = L(!0), t = L(250), n = L({
74
+ appName: VITE_APP_NAME,
75
+ version: ""
76
+ });
77
+ H(() => n.value.appName, (e) => {
78
+ e && (document.title = e);
79
+ });
80
+ function r() {
81
+ gt().then((e) => {
82
+ n.value = e;
83
+ }).catch((e) => {
84
+ console.log(`${VITE_APP_NAME} 获取应用信息失败`, e);
85
+ });
86
+ }
87
+ let i = L(!0), a = null;
88
+ function o() {
89
+ a !== null && (clearTimeout(a), a = null), i.value = !1, a = setTimeout(() => {
90
+ i.value = !0;
91
+ }, 9e5);
92
+ }
93
+ return {
94
+ appInfo: n,
95
+ drawerOpen: e,
96
+ drawerSize: t,
97
+ getAppInfo: r,
98
+ isRequestSleep: i,
99
+ requestActive: o
100
+ };
101
+ }, { persist: { pick: ["drawerOpen", "drawerSize"] } }), q = W("recentRouters", () => {
102
+ let e = L([]), t = G(), n = ct();
103
+ function r() {
104
+ e.value = e.value.filter((e) => n.hasRoute(e.name));
105
+ }
106
+ function i(t, n) {
107
+ let r = it(n), i = e.value.findIndex((e) => e.name === r.name || Yt(e.name).meta.title === Yt(r.name).meta.title);
108
+ if (delete r.query._fromLeftTree, i === -1) {
109
+ let n = e.value.findIndex((e) => e.name === t);
110
+ n === -1 ? e.value.push(r) : e.value.splice(n + 1, 0, r);
111
+ } else e.value[i] = r;
112
+ }
113
+ function a(t) {
114
+ let n = e.value.findIndex((e) => e.name === t);
115
+ n !== -1 && e.value.splice(n, 1);
116
+ }
117
+ function o(r) {
118
+ if (t.name === r) {
119
+ let t = e.value.findIndex((e) => e.name === r), i = e.value[t - 1];
120
+ i === void 0 ? n.push(e.value[t + 1]) : n.push(i);
121
+ }
122
+ a(r);
123
+ }
124
+ function s() {
125
+ e.value = [];
126
+ }
127
+ return {
128
+ add: i,
129
+ clear: s,
130
+ close: o,
131
+ init: r,
132
+ recentRouters: e,
133
+ remove: a
134
+ };
135
+ }, { persist: { pick: ["recentRouters"] } });
136
+ //#endregion
137
+ //#region ../../packages/dlzn-ui/store/modules/router.ts
138
+ function _t() {
139
+ return X.Get("getRouters", { meta: {
140
+ useFailMsg: "获取用户路由失败",
141
+ useLoading: "正在获取用户路由..."
142
+ } });
143
+ }
144
+ function vt(e) {
145
+ return e.children !== void 0 || e.component !== void 0;
146
+ }
147
+ function yt(e) {
148
+ let t = [];
149
+ return e.forEach((e) => {
150
+ e.path === "/" ? t.push({
151
+ ...e.children[0],
152
+ hidden: e.hidden
153
+ }) : t.push(e);
154
+ }), t;
155
+ }
156
+ function bt(e) {
157
+ let t = (e, n) => {
158
+ let r = [];
159
+ return e.forEach((e) => {
160
+ let i = {
161
+ meta: {
162
+ fullScreen: e.meta?.fullScreen ?? (typeof e.component == "string" && e.component.split("___")[1] === "0"),
163
+ hidden: e.hidden ?? e.meta?.hidden ?? !1,
164
+ icon: e.meta?.icon === "#" ? "" : e.meta?.icon ?? "",
165
+ noCache: e.meta?.noCache ?? !1,
166
+ parentName: n?.name ?? "",
167
+ title: e.meta?.title ?? ""
168
+ },
169
+ name: e.name,
170
+ path: e.path.startsWith("/") && n !== null ? e.path.slice(1) : e.path
171
+ };
172
+ if (e.children !== void 0) {
173
+ let n = t(e.children, i);
174
+ if (n.length > 0) {
175
+ i.children = n;
176
+ let e = n.find((e) => !e.meta.hidden);
177
+ e !== void 0 && (i.redirect = { name: e.name });
178
+ }
179
+ }
180
+ e.component !== void 0 && !["Layout", "ParentView"].includes(e.component) && (i.component = Tt(e)), vt(i) && r.push(i);
181
+ }), r;
182
+ }, n = Jt();
183
+ return n.children.push(...e), t([n], null);
184
+ }
185
+ function xt(e) {
186
+ let t = (e) => {
187
+ let n = [...e], r = n.length;
188
+ for (let e = r - 1; e >= 0; e--) {
189
+ let r = n[e];
190
+ r.children !== void 0 && (r.redirect === void 0 ? (r.children.forEach((r) => {
191
+ n.splice(e + 1, 0, ...t([r]));
192
+ }), delete r.children) : r.children = t(r.children));
193
+ }
194
+ return n;
195
+ };
196
+ return t(e);
197
+ }
198
+ var St = lt.viewsEntryLazyImport, Ct = [];
199
+ function wt(e) {
200
+ return `/src/views/${e.split("___")[0]}.vue`;
201
+ }
202
+ function Tt(e) {
203
+ if (typeof e.component == "function" || typeof e.component == "string") {
204
+ let t = e.component, n = typeof t == "string" ? St[wt(t)] : t;
205
+ if (n === void 0) {
206
+ let e = `路由组件${wt(t)}不存在`;
207
+ return console.error(e), s["./NotFound.vue"];
208
+ }
209
+ return typeof t == "string" && Ct.push(wt(t)), () => n().then((t) => ({
210
+ ...t.default,
211
+ name: e.name
212
+ }));
213
+ }
214
+ return e.component;
215
+ }
216
+ var Et = W("router", () => {
217
+ let e = L([]), t = ct(), n = Q();
218
+ async function r() {
219
+ let r = await _t();
220
+ Ct.length = 0, e.value = be(xt(bt(yt(r)))), n.isAdmin && Object.keys(St).forEach((e) => {
221
+ if (!Ct.includes(e)) {
222
+ let t = `${e} 页面对应的路由不存在`;
223
+ console.error(t);
224
+ }
225
+ }), t.hasRoute("Index") && t.removeRoute("Index"), e.value.forEach((e) => {
226
+ t.addRoute(e);
227
+ }), q().init();
228
+ }
229
+ function i() {
230
+ e.value.forEach((e) => {
231
+ t.removeRoute(e.name);
232
+ }), e.value = [];
233
+ }
234
+ return {
235
+ clear: i,
236
+ getRouters: r,
237
+ routersRaw: e
238
+ };
239
+ }), Dt = { class: "ml-2! flex items-center" }, Ot = /*#__PURE__*/ f(/* @__PURE__ */ k({
240
+ __name: "Aside",
241
+ setup(e) {
242
+ let t = G(), n = K(), r = C(() => n.appInfo.appName), i = Object.values(import.meta.glob("img/side_logo.*", {
243
+ eager: !0,
244
+ import: "default",
245
+ query: "?url"
246
+ }))[0], a = Et(), o = L([]);
247
+ H(() => t.name, () => {
248
+ t.matched.map((e) => e.name).forEach((e) => {
249
+ o.value.includes(e) || o.value.push(e);
250
+ });
251
+ }, { immediate: !0 });
252
+ let s = C(() => {
253
+ let { hidden: e, parentName: n } = t.meta;
254
+ return n !== "" && e === !0 ? n : t.name;
255
+ });
256
+ return (e, t) => (I(), w(V(Ze), {
257
+ expanded: o.value,
258
+ "onUpdate:expanded": t[0] ||= (e) => o.value = e,
259
+ class: "w-full!",
260
+ value: s.value
261
+ }, {
262
+ logo: U(() => [he("div", Dt, [O(V(p), {
263
+ class: "logo",
264
+ src: V(i),
265
+ style: {
266
+ width: "28px",
267
+ height: "28px"
268
+ }
269
+ }, null, 8, ["src"]), O(V(d), {
270
+ "animation-speed": 8,
271
+ "class-name": "ml-2 text-xl !font-bold",
272
+ "show-border": !1,
273
+ text: r.value
274
+ }, null, 8, ["text"])])]),
275
+ default: U(() => [O(m, { model: V(a).routersRaw[0]?.children ?? [] }, null, 8, ["model"])]),
276
+ _: 1
277
+ }, 8, ["expanded", "value"]));
278
+ }
279
+ }), [["__scopeId", "data-v-2740d135"]]), kt = /* @__PURE__ */ k({
280
+ __name: "Breadcrumb",
281
+ setup(e, { expose: t }) {
282
+ let n = G(), r = ct(), i = q(), a = C(() => {
283
+ let e = n.matched.map((e) => ({
284
+ name: e.name,
285
+ title: e.meta.title
286
+ }));
287
+ return e.length < 3 ? [] : e.slice(1).map((e) => ({
288
+ ...e,
289
+ disabled: !i.recentRouters.some((t) => t.name === e.name) || n.name === e.name
290
+ }));
291
+ });
292
+ function o(e) {
293
+ r.push(i.recentRouters.find((t) => t.name === e));
294
+ }
295
+ return t({ items: a }), (e, t) => a.value.length > 0 ? (I(), w(V(Le), {
296
+ key: 0,
297
+ class: "absolute top-px z-10 py-1!"
298
+ }, {
299
+ default: U(() => [(I(!0), E(S, null, R(a.value, (e) => (I(), w(V(Re), {
300
+ key: e.name,
301
+ disabled: e.disabled,
302
+ onClick: (t) => o(e.name)
303
+ }, {
304
+ default: U(() => [D(B(e.title), 1)]),
305
+ _: 2
306
+ }, 1032, ["disabled", "onClick"]))), 128))]),
307
+ _: 1
308
+ })) : T("v-if", !0);
309
+ }
310
+ }), At = /* @__PURE__ */ function(e) {
311
+ return e.alert = "alert", e.closeAll = "closeAll", e.confirm = "confirm", e;
312
+ }(At || {}), jt = /* @__PURE__ */ new Set();
313
+ function Mt(e, t, n) {
314
+ let i = C(() => typeof t.body == "function" ? t.body(j) : t.body), a = L(document.activeElement instanceof HTMLElement ? document.activeElement : null), { isVisible: o, stop: s } = Ne(a, {
315
+ controls: !0,
316
+ initialValue: !0
317
+ }), c = {
318
+ closeBtn: () => j($, {
319
+ icon: "mdi:close",
320
+ shape: "circle",
321
+ size: "small",
322
+ theme: "default",
323
+ variant: "base"
324
+ }),
325
+ closeOnEscKeydown: !1,
326
+ closeOnOverlayClick: !1,
327
+ closeWhenCloseAll: !0,
328
+ destroyOnClose: !0,
329
+ draggable: !0,
330
+ header: "提示",
331
+ mode: "modal",
332
+ placement: "center",
333
+ width: "fit-content",
334
+ ...t ?? {},
335
+ body: () => j(ee, {}, { default: () => i.value })
336
+ }, l, u = {
337
+ ...c,
338
+ onClosed: () => {
339
+ a.value !== null && o.value && a.value.focus(), s(), c.onClosed?.(), jt.delete(l);
340
+ }
341
+ };
342
+ delete u.closeWhenCloseAll;
343
+ let d = r();
344
+ return l = e === void 0 ? He(u, n ?? d) : He[e](u, n ?? d), c.closeWhenCloseAll && jt.add(l), l;
345
+ }
346
+ var Nt = function(...e) {
347
+ return Mt(void 0, ...e);
348
+ };
349
+ Object.values(At).forEach((e) => {
350
+ Nt[e] = e === "closeAll" ? () => {
351
+ jt.forEach((e) => {
352
+ e.hide();
353
+ });
354
+ } : (...t) => Mt(e, ...t);
355
+ });
356
+ //#endregion
357
+ //#region ../../packages/dlzn-ui/plugins/autoImport/$confirm/index.ts
358
+ var Pt = (e, t) => {
359
+ let n = { ...typeof e == "string" ? {} : e };
360
+ return delete n.useReject, delete n.onCancelCallback, delete n.onConfirmCallback, new Promise((r, i) => {
361
+ let a = Nt(typeof e == "string" ? {
362
+ body: e,
363
+ onConfirm: () => {
364
+ a.hide(), r();
365
+ },
366
+ theme: "warning"
367
+ } : we({
368
+ ...n,
369
+ onClose: (t) => {
370
+ let { trigger: n } = t;
371
+ n === "cancel" ? Promise.resolve(e.onCancelCallback?.()).then(() => {
372
+ a.hide(), e.useReject === !0 && i(/* @__PURE__ */ Error("confirm_cancel"));
373
+ }) : a.hide();
374
+ },
375
+ onConfirm: () => {
376
+ a.setConfirmLoading(!0), Promise.resolve(e.onConfirmCallback?.()).then(() => {
377
+ a.hide(), r();
378
+ }).finally(() => {
379
+ a.setConfirmLoading(!1);
380
+ });
381
+ }
382
+ }), t);
383
+ });
384
+ }, Ft = /* @__PURE__ */ new Map();
385
+ function It(e) {
386
+ let t = X.Post("system/user/listByIds", { userIds: e }, { meta: { useLoading: !1 } }).then((e) => e.map((e) => ({
387
+ ...e,
388
+ label: e.userName,
389
+ value: e.userId
390
+ })));
391
+ e.forEach((e) => {
392
+ Ft.set(e, t.then((t) => t.find((t) => t.value === e)));
393
+ });
394
+ }
395
+ var Lt = [];
396
+ function Rt(e) {
397
+ return Lt.includes(e) || Lt.push(e), new Promise((t) => {
398
+ setTimeout(() => {
399
+ let n = Lt.filter((e) => !Ft.has(e));
400
+ n.length > 0 && It(n), Lt.length = 0, Ft.get(e).then((e) => {
401
+ t(e);
402
+ });
403
+ });
404
+ });
405
+ }
406
+ var J = /* @__PURE__ */ new Map();
407
+ function zt() {
408
+ Lt.length = 0, Ft.clear(), J.clear();
409
+ }
410
+ function Bt(e) {
411
+ Ft.delete(e), J.has(e) && Rt(e).then((t) => {
412
+ J.get(e).value = t;
413
+ });
414
+ }
415
+ function Vt(e) {
416
+ let t;
417
+ return J.has(e) ? t = J.get(e) : (t = L(null), J.set(e, t), Rt(e).then((e) => {
418
+ t.value = e;
419
+ })), t;
420
+ }
421
+ //#endregion
422
+ //#region ../../packages/dlzn-ui/store/modules/login.ts
423
+ function Ht(e) {
424
+ return X.Post("login", e, { meta: {
425
+ useLoading: "登录中...",
426
+ useToken: !1
427
+ } });
428
+ }
429
+ function Ut() {
430
+ return X.Post("logout", void 0, { meta: {
431
+ useLoading: "退出登录中...",
432
+ useSuccessMsg: !0
433
+ } });
434
+ }
435
+ var Wt = W("login", () => {
436
+ let e = L(""), t = G(), n = ct();
437
+ async function r(t) {
438
+ let n = await Ht(t);
439
+ e.value = n.token, await Q().getUserInfo();
440
+ }
441
+ function i() {
442
+ e.value = "", u().clear(), Et().clear(), Q().clear(), an(), zt(), ne();
443
+ }
444
+ H(() => t.name, () => {
445
+ t.name === "Login" && i();
446
+ });
447
+ async function a() {
448
+ await Ut(), await n.push({ name: "Login" }), i();
449
+ }
450
+ return {
451
+ login: r,
452
+ logout: a,
453
+ token: e
454
+ };
455
+ }, { persist: { pick: ["token"] } }), Gt = { class: "flex items-center justify-between" }, Kt = /*#__PURE__*/ f(/* @__PURE__ */ k({
456
+ __name: "Header",
457
+ setup(t) {
458
+ let n = G(), r = ct(), i = Q(), a = K(), o = q();
459
+ function s(e) {
460
+ r.push(o.recentRouters.find((t) => t.name === e));
461
+ }
462
+ function c(e) {
463
+ o.close(e);
464
+ }
465
+ let u = async (e) => {
466
+ let { value: t } = e;
467
+ t === "profile" ? r.push({ name: "Profile" }) : t === "logout" && (await Pt("确定要退出登录吗?"), Wt().logout());
468
+ }, d = l.isMd;
469
+ function f(e, t) {
470
+ let i = [], a = o.recentRouters, s = a.findIndex((e) => e.name === t), l = a.findIndex((e) => e.name === n.name), u = a[s];
471
+ o.recentRouters.length > 1 && i.push({
472
+ content: "关闭",
473
+ onClick: () => c(t)
474
+ }, {
475
+ content: "关闭其他",
476
+ onClick: () => {
477
+ l !== s && r.push(u), o.recentRouters = [u];
478
+ }
479
+ }), s > 0 && i.push({
480
+ content: "关闭左侧",
481
+ onClick: () => {
482
+ l < s && r.push(u), o.recentRouters = o.recentRouters.slice(s);
483
+ }
484
+ }), s < o.recentRouters.length - 1 && i.push({
485
+ content: "关闭右侧",
486
+ onClick: () => {
487
+ l > s && r.push(u), o.recentRouters = o.recentRouters.slice(0, s + 1);
488
+ }
489
+ }), h(e, i);
490
+ }
491
+ return (t, r) => (I(), w(V(Je), { class: "border-b border-b-(--td-border-level-2-color)" }, {
492
+ default: U(() => [O(V(qe), {
493
+ "expand-type": "popup",
494
+ value: V(n).name,
495
+ onChange: s
496
+ }, {
497
+ logo: U(() => [O(V($), {
498
+ class: "ml-0! shrink-0",
499
+ shape: "circle",
500
+ size: "large",
501
+ variant: "text",
502
+ onClick: r[0] ||= (e) => V(a).drawerOpen = !V(a).drawerOpen
503
+ }, {
504
+ default: U(() => [O(V(e), { icon: "lineicons:menu-hamburger-1" })]),
505
+ _: 1
506
+ })]),
507
+ operations: U(() => [O(V(We), {
508
+ options: [{
509
+ content: "个人中心",
510
+ value: "profile"
511
+ }, {
512
+ content: "退出登录",
513
+ value: "logout"
514
+ }],
515
+ placement: "bottom",
516
+ trigger: "click",
517
+ onClick: u
518
+ }, {
519
+ default: U(() => [V(d) ? (I(), w(V($), {
520
+ key: 0,
521
+ shape: "square",
522
+ variant: "text"
523
+ }, {
524
+ icon: U(() => [O(V(e), { icon: "material-symbols:account-circle" })]),
525
+ _: 1
526
+ })) : (I(), w(V($), {
527
+ key: 1,
528
+ variant: "text"
529
+ }, {
530
+ icon: U(() => [O(V(e), {
531
+ class: "mr-2!",
532
+ icon: "material-symbols:account-circle"
533
+ })]),
534
+ suffix: U(() => [O(V(e), {
535
+ icon: "icon-park-outline:down",
536
+ size: "18"
537
+ })]),
538
+ default: U(() => [D(" " + B(V(i).userInfo.userName) + " ", 1)]),
539
+ _: 1
540
+ }))]),
541
+ _: 1
542
+ })]),
543
+ default: U(() => [(I(!0), E(S, null, R(V(o).recentRouters, (t) => (I(), w(V(Qe), {
544
+ key: t.name,
545
+ value: t.name,
546
+ onContextmenu: (e) => f(e, t.name)
547
+ }, {
548
+ default: U(() => [he("div", Gt, [he("span", null, B(V(Yt)(t.name).meta.title), 1), V(o).recentRouters.length > 1 ? (I(), w(V($), {
549
+ key: 0,
550
+ class: "ml-1!",
551
+ shape: "square",
552
+ size: "small",
553
+ variant: "text",
554
+ onClick: je((e) => c(t.name), ["stop"])
555
+ }, {
556
+ icon: U(() => [O(V(e), {
557
+ icon: "material-symbols:close",
558
+ style: { "font-size": "12px !important" }
559
+ })]),
560
+ _: 1
561
+ }, 8, ["onClick"])) : T("v-if", !0)])]),
562
+ _: 2
563
+ }, 1032, ["value", "onContextmenu"]))), 128))]),
564
+ _: 1
565
+ }, 8, ["value"])]),
566
+ _: 1
567
+ }));
568
+ }
569
+ }), [["__scopeId", "data-v-cdf58b1a"]]), qt = /*#__PURE__*/ f(/* @__PURE__ */ k({
570
+ __name: "Index",
571
+ setup(e) {
572
+ let t = G(), n = K(), r = q(), i = u(), a = C(() => r.recentRouters.filter((e) => Yt(e.name).meta.noCache === !1).map((e) => e.name)), o = Ae("breadcrumb"), s = C(() => (o.value?.items.length ?? 0) > 0), d = C(() => l.isMd.value ? { "p-2": !0 } : { "p-3": !0 }), f = l.isMd, p = Ae("contentRef"), { height: m } = Me(p);
573
+ function h({ size: e }) {
574
+ n.drawerSize = e;
575
+ }
576
+ let ee = C(() => t.meta.fullScreen);
577
+ return (e, t) => {
578
+ let r = Ee("RouterView");
579
+ return ee.value ? (I(), w(r, { key: 0 }, {
580
+ default: U(({ Component: e }) => [(I(), w(z(e)))]),
581
+ _: 1
582
+ })) : (I(), w(V(Xe), {
583
+ key: 1,
584
+ class: "h-full"
585
+ }, {
586
+ default: U(() => [
587
+ O(Kt),
588
+ O(V(Ue), {
589
+ visible: V(n).drawerOpen,
590
+ "onUpdate:visible": t[0] ||= (e) => V(n).drawerOpen = e,
591
+ footer: !1,
592
+ mode: V(f) ? "overlay" : "push",
593
+ placement: "left",
594
+ "show-overlay": V(f),
595
+ size: V(f) ? "200px" : `${V(n).drawerSize}px`,
596
+ "size-draggable": {
597
+ max: 450,
598
+ min: 180
599
+ },
600
+ onSizeDragEnd: h
601
+ }, {
602
+ default: U(() => [O(Ot, { class: "no_drawer_body_padding" })]),
603
+ _: 1
604
+ }, 8, [
605
+ "visible",
606
+ "mode",
607
+ "show-overlay",
608
+ "size"
609
+ ]),
610
+ O(V(Ve), {
611
+ ref_key: "contentRef",
612
+ ref: p,
613
+ class: "overflow-hidden"
614
+ }, {
615
+ default: U(() => [O(V(c), {
616
+ always: "",
617
+ "view-class": xe(["relative flex flex-col", {
618
+ ...d.value,
619
+ "pt-8": s.value
620
+ }]),
621
+ "view-style": {
622
+ minWidth: "1200px",
623
+ minHeight: `${Math.max(V(m), 438)}px`
624
+ }
625
+ }, {
626
+ default: U(() => [O(kt, { ref: "breadcrumb" }, null, 512), O(r, null, {
627
+ default: U(({ Component: e }) => [(I(), w(me, {
628
+ exclude: V(i).excludeKPname,
629
+ include: a.value
630
+ }, [(I(), w(z(e), { class: "flex-auto" }))], 1032, ["exclude", "include"]))]),
631
+ _: 1
632
+ })]),
633
+ _: 1
634
+ }, 8, ["view-class", "view-style"])]),
635
+ _: 1
636
+ }, 512)
637
+ ]),
638
+ _: 1
639
+ }));
640
+ };
641
+ }
642
+ }), [["__scopeId", "data-v-0f5b5eef"]]);
643
+ //#endregion
644
+ //#region ../../packages/dlzn-ui/router/index.ts
645
+ function Jt() {
646
+ return {
647
+ children: [{
648
+ children: [{
649
+ component: s["./profile/Index.vue"],
650
+ meta: {
651
+ fullScreen: !1,
652
+ hidden: !0,
653
+ icon: "",
654
+ noCache: !1,
655
+ parentName: "",
656
+ title: "个人中心"
657
+ },
658
+ name: "Profile",
659
+ path: "profile"
660
+ }],
661
+ component: s["./Home.vue"],
662
+ meta: {
663
+ fullScreen: !1,
664
+ hidden: !1,
665
+ icon: "streamline-flex-color:home-2-flat",
666
+ noCache: !1,
667
+ parentName: "",
668
+ title: "首页"
669
+ },
670
+ name: "Home",
671
+ path: "home"
672
+ }],
673
+ component: qt,
674
+ name: "Index",
675
+ path: "/"
676
+ };
677
+ }
678
+ var Y = ot({
679
+ history: st(VITE_BASE_URL),
680
+ routes: [
681
+ Jt(),
682
+ {
683
+ component: s["./Login.vue"],
684
+ meta: {
685
+ fullScreen: !1,
686
+ hidden: !0,
687
+ icon: "",
688
+ noCache: !1,
689
+ parentName: "",
690
+ title: "登录"
691
+ },
692
+ name: "Login",
693
+ path: "/login"
694
+ },
695
+ {
696
+ component: s["./NotFound.vue"],
697
+ meta: {
698
+ fullScreen: !1,
699
+ hidden: !0,
700
+ icon: "",
701
+ noCache: !1,
702
+ parentName: "",
703
+ title: "404"
704
+ },
705
+ name: "NotFound",
706
+ path: "/:pathMatch(.*)*"
707
+ }
708
+ ],
709
+ sensitive: !0,
710
+ strict: !0
711
+ });
712
+ Y.beforeEach(async (e) => {
713
+ if (e.query._fromLeftTree === "true" && u().add(e.name), e.name !== "Login") return Wt().token === "" ? { name: "Login" } : Et().routersRaw.length > 0 ? void 0 : (await Q().getUserInfo(), Y.resolve({
714
+ path: e.path,
715
+ query: e.query
716
+ }));
717
+ }), Y.afterEach((e, t, n) => {
718
+ Nt.closeAll(), re.closeAll();
719
+ let { meta: r, name: i } = e, { fullScreen: a, parentName: o, title: s } = r;
720
+ document.title = s || K().appInfo.appName;
721
+ let c = q();
722
+ if (!["Login", "NotFound"].includes(i) && !a) {
723
+ let n = o === t.name || e.query._fromLeftTree !== "true" ? t.name : void 0;
724
+ c.add(n, {
725
+ name: i,
726
+ query: e.query
727
+ });
728
+ }
729
+ u().remove(i);
730
+ });
731
+ function Yt(e) {
732
+ if (Y.hasRoute(e)) return Y.getRoutes().find((t) => t.name === e);
733
+ }
734
+ //#endregion
735
+ //#region ../../packages/dlzn-ui/plugins/autoImport/$alova/index.ts
736
+ var Xt = 15e3, Zt = "网络错误,请稍后再试";
737
+ function Qt(e, t = !0) {
738
+ let n = {};
739
+ return Object.keys(e).forEach((r) => {
740
+ (!t || (Array.isArray(e[r]) ? e[r].length > 0 : !_(e[r]))) && (n[r] = e[r]);
741
+ }), n;
742
+ }
743
+ function $t(e, t = !0) {
744
+ return new URLSearchParams(Qt(e, t)).toString();
745
+ }
746
+ var X = ut({
747
+ baseURL: VITE_BASE_URL,
748
+ beforeRequest(e) {
749
+ e.config.credentials = e.config.credentials ?? "omit";
750
+ let [t, ...n] = VITE_API_PREFIX_ARRAY;
751
+ !e.url.startsWith("http") && !n.some((t) => pt.join("/", e.url).startsWith(pt.join("/", t, "/"))) && (e.url = pt.join(t, e.url)), e.meta = {
752
+ use600Alert: !0,
753
+ useDataResult: !0,
754
+ useDownload: !1,
755
+ useEmptyData: !1,
756
+ useEmptyParams: !0,
757
+ useFailMsg: !0,
758
+ useFormData: !1,
759
+ useInPolling: !1,
760
+ useLoading: !0,
761
+ useResponseBlob: !1,
762
+ useResponseText: !1,
763
+ useSuccessMsg: !1,
764
+ useSysFailMsg: !0,
765
+ useToken: !0,
766
+ ...e.meta ?? {}
767
+ };
768
+ let r = Wt(), { useEmptyData: a, useEmptyParams: o, useFormData: s, useInPolling: c, useLoading: l, useResponseBlob: u, useToken: d } = e.meta;
769
+ c || K().requestActive(), d && (r.token ? e.config.headers.Authorization = r.token : e.abort()), l !== !1 && i.show(l === !0 ? void 0 : l);
770
+ let f = e.config.params;
771
+ if (typeof f != "string" && (e.config.params = $t(f, o)), a && at(e.data)) {
772
+ let t = {}, n = e.data;
773
+ Object.keys(n).forEach((e) => {
774
+ _(n[e]) || (t[e] = n[e]);
775
+ }), e.data = t;
776
+ }
777
+ if (s) {
778
+ let t = new FormData();
779
+ Object.keys(e.data).forEach((n) => {
780
+ t.append(n, e.data[n]);
781
+ }), e.data = t;
782
+ }
783
+ e.config.timeout === Xt && (s || e.data instanceof FormData || u) && (e.config.timeout = 0);
784
+ },
785
+ cacheFor: null,
786
+ requestAdapter: dt(),
787
+ responded: {
788
+ onComplete: (e) => {
789
+ e.meta.useLoading !== !1 && i.hide();
790
+ },
791
+ onError: async (e, t) => {
792
+ let { useSysFailMsg: n } = t.meta;
793
+ if (e instanceof Error) {
794
+ let { message: t } = e;
795
+ if (t.toLowerCase().includes("abort")) return Promise.reject(e);
796
+ if (t.toLowerCase().includes("timeout")) return n && o.error("请求超时"), Promise.reject(e);
797
+ }
798
+ return n && o.error(Zt), Promise.reject(e);
799
+ },
800
+ onSuccess: async (e, t) => {
801
+ if (typeof e == "string") return e;
802
+ let { useDataResult: r, useDownload: i, useFailMsg: a, useResponseBlob: s, useResponseText: c, useSuccessMsg: l, useSysFailMsg: u, useToken: d } = t.meta, { headers: f, ok: p, status: m } = e;
803
+ if (p === !1) {
804
+ if (u) {
805
+ let e = {
806
+ 403: "当前操作没有权限",
807
+ 404: "访问资源不存在",
808
+ 500: "服务不可用,请稍后再试或联系管理员!"
809
+ }[m] ?? Zt;
810
+ o.error(e);
811
+ }
812
+ return Promise.reject(e);
813
+ }
814
+ if (s && !f.get("content-type")?.includes("application/json")) {
815
+ let t;
816
+ try {
817
+ t = await e.blob();
818
+ } catch (e) {
819
+ return n.error("返回的 response 不能被blob() 方法所解析"), Promise.reject(e);
820
+ }
821
+ if (i !== !1) {
822
+ if (typeof i == "string") b(t, i);
823
+ else {
824
+ let r = new URLSearchParams((e.headers.get("content-disposition") ?? "").replace(/;\s*/g, "&")).get("filename");
825
+ r ? b(t, r) : n.error("返回的 response header 没有文件名");
826
+ }
827
+ }
828
+ return t;
829
+ }
830
+ if (c && !f.get("content-type")?.includes("application/json")) {
831
+ let t;
832
+ try {
833
+ t = await e.text();
834
+ } catch (e) {
835
+ return n.error("返回的 response text() 方法所解析"), Promise.reject(e);
836
+ }
837
+ return t;
838
+ }
839
+ let h;
840
+ try {
841
+ h = await e.json();
842
+ } catch (e) {
843
+ return n.error("返回的 response 不能被json() 方法所解析"), Promise.reject(e);
844
+ }
845
+ if (h?.code !== void 0) {
846
+ let { code: e, data: t, msg: n } = h;
847
+ if (e >= 400) {
848
+ if (e === 600) {
849
+ if (!s) return h;
850
+ } else e === 401 && d ? Y.push({ name: "Login" }) : a !== !1 && o.error(a === !0 ? n : a);
851
+ return Promise.reject(h);
852
+ }
853
+ {
854
+ let i = lt.alovaResCodeSuccessCb?.({
855
+ code: e,
856
+ data: t,
857
+ msg: n
858
+ });
859
+ return i === void 0 ? (l && o(n), r ? t === void 0 ? h : t : h) : i;
860
+ }
861
+ }
862
+ return h;
863
+ }
864
+ },
865
+ shareRequest: !1,
866
+ statesHook: ft,
867
+ timeout: Xt
868
+ }), en = /* @__PURE__ */ new Map();
869
+ function tn(e) {
870
+ let t = X.Get(`system/dict/data/types/${e.join(",")}`, { meta: { useLoading: !1 } }).then((e) => e.map((e) => ({
871
+ cssClass: e.cssClass,
872
+ dictType: e.dictType,
873
+ label: e.dictLabel,
874
+ remark: e.remark,
875
+ value: e.dictValue
876
+ })));
877
+ e.forEach((e) => {
878
+ en.set(e, t.then((t) => t.filter((t) => t.dictType === e)));
879
+ });
880
+ }
881
+ var nn = [];
882
+ function rn(e) {
883
+ return nn.includes(e) || nn.push(e), new Promise((t) => {
884
+ setTimeout(() => {
885
+ let n = nn.filter((e) => !en.has(e));
886
+ n.length > 0 && tn(n), nn.length = 0, en.get(e).then((e) => {
887
+ t(e);
888
+ });
889
+ });
890
+ });
891
+ }
892
+ var Z = /* @__PURE__ */ new Map();
893
+ function an() {
894
+ nn.length = 0, en.clear(), Z.clear();
895
+ }
896
+ function on(e, t) {
897
+ let n = sn(e);
898
+ return C(() => {
899
+ if (t === void 0) return n.value.map((e) => e.label);
900
+ if (Array.isArray(t)) return n.value.length === 0 ? [] : t.map((e) => n.value.find((t) => String(t.value) === String(e))?.label ?? y(e));
901
+ if (n.value.length === 0) return "";
902
+ if (typeof t == "string") {
903
+ let e = t.split(",").filter(Boolean);
904
+ if (e.length > 0) return e.map((e) => n.value.find((t) => String(t.value) === e)?.label ?? e).join(",");
905
+ }
906
+ return n.value.find((e) => String(e.value) === String(t))?.label ?? y(t);
907
+ });
908
+ }
909
+ function sn(e, t) {
910
+ let n;
911
+ return Z.has(e) ? n = Z.get(e) : (n = L([]), Z.set(e, n), rn(e).then((e) => {
912
+ n.value = e;
913
+ })), C(() => n.value.filter((e) => t === void 0 || t.includes(e.value)));
914
+ }
915
+ function cn(e) {
916
+ en.delete(e), Z.has(e) && rn(e).then((t) => {
917
+ Z.get(e).value = t;
918
+ });
919
+ }
920
+ //#endregion
921
+ //#region ../../packages/dlzn-ui/components/checkbox-group/src/checkbox-group.vue
922
+ var ln = /* @__PURE__ */ k({
923
+ inheritAttrs: !1,
924
+ name: "TCheckboxGroup",
925
+ __name: "checkbox-group",
926
+ props: {
927
+ dicCode: {},
928
+ modelValue: {},
929
+ options: {},
930
+ showCheckAll: {
931
+ type: Boolean,
932
+ default: !1
933
+ },
934
+ disabled: {
935
+ type: Boolean,
936
+ default: void 0
937
+ },
938
+ lazyLoad: { type: Boolean },
939
+ max: {},
940
+ name: {},
941
+ readonly: {
942
+ type: Boolean,
943
+ default: void 0
944
+ },
945
+ onChange: {}
946
+ },
947
+ emits: ["update:modelValue"],
948
+ setup(e, { emit: t }) {
949
+ let r = e, i = t, a = Be, o = A();
950
+ function s(e) {
951
+ o.exposed = e ?? {};
952
+ }
953
+ let c = C(() => {
954
+ let e;
955
+ return r.dicCode ? (r.options && n.error("TCheckboxGroup: dicCode and options cannot be used together"), e = sn(r.dicCode).value) : e = typeof r.options == "string" ? x(r.options).value : r.options, r.showCheckAll && (e === void 0 ? n.error("TCheckboxGroup: options is required, when showCheckAll is true") : e.unshift({
956
+ checkAll: !0,
957
+ label: "全选"
958
+ })), e;
959
+ }), l = C(() => {
960
+ if (!Array.isArray(r.modelValue)) n.error("TCheckboxGroup: modelValue must be an array");
961
+ else if (c.value !== void 0) {
962
+ let e = c.value.every((e) => typeof (e.value ?? e) == "string"), t = c.value.every((e) => typeof (e.value ?? e) == "number");
963
+ if (e) return r.modelValue.map((e) => _(e) ? e : String(e));
964
+ if (t) return r.modelValue.map((e) => v(e) ? Number(e) : e);
965
+ }
966
+ return r.modelValue;
967
+ }), u = C(() => {
968
+ let e = { ...r };
969
+ return delete e.dicCode, delete e.showCheckAll, Object.keys(e).forEach((t) => {
970
+ e[t] === void 0 && delete e[t];
971
+ }), e;
972
+ });
973
+ return (e, t) => (I(), w(z(j(V(a), N(e.$attrs, {
974
+ ...u.value,
975
+ options: c.value,
976
+ modelValue: l.value,
977
+ onChange: (...e) => {
978
+ i("update:modelValue", e[0]), r.onChange?.(...e);
979
+ },
980
+ ref: s
981
+ }), e.$slots))));
982
+ }
983
+ }), un = /* @__PURE__ */ k({
984
+ inheritAttrs: !1,
985
+ __name: "cron",
986
+ props: /*@__PURE__*/ M({
987
+ modelValue: {},
988
+ adornment: {},
989
+ align: {},
990
+ allowInputOverMax: { type: Boolean },
991
+ autoWidth: { type: Boolean },
992
+ autocomplete: {},
993
+ autofocus: { type: Boolean },
994
+ borderless: { type: Boolean },
995
+ clearable: { type: Boolean },
996
+ disabled: { type: Boolean },
997
+ format: { type: Function },
998
+ inputClass: {},
999
+ label: {},
1000
+ maxcharacter: {},
1001
+ maxlength: {},
1002
+ name: {},
1003
+ placeholder: {},
1004
+ prefixIcon: {},
1005
+ readonly: { type: Boolean },
1006
+ showClearIconOnEmpty: { type: Boolean },
1007
+ showLimitNumber: { type: Boolean },
1008
+ size: {},
1009
+ spellCheck: { type: Boolean },
1010
+ status: {},
1011
+ suffix: {},
1012
+ suffixIcon: {},
1013
+ tips: {},
1014
+ type: {},
1015
+ onBlur: { type: Function },
1016
+ onChange: { type: Function },
1017
+ onClear: { type: Function },
1018
+ onClick: { type: Function },
1019
+ onCompositionend: { type: Function },
1020
+ onCompositionstart: { type: Function },
1021
+ onEnter: { type: Function },
1022
+ onFocus: { type: Function },
1023
+ onKeydown: { type: Function },
1024
+ onKeypress: { type: Function },
1025
+ onKeyup: { type: Function },
1026
+ onMouseenter: { type: Function },
1027
+ onMouseleave: { type: Function },
1028
+ onPaste: { type: Function },
1029
+ onValidate: { type: Function },
1030
+ onWheel: { type: Function }
1031
+ }, ie),
1032
+ emits: ["update:modelValue"],
1033
+ setup(e, { emit: t }) {
1034
+ let n = e, r = t, i = ye("isFormDisabled", C(() => !1)), a = ye("isFormReadonly", C(() => !1)), o = C(() => {
1035
+ let e = n.disabled ?? i.value, t = n.readonly ?? a.value;
1036
+ return {
1037
+ ...n,
1038
+ adornment: { append: () => j($, {
1039
+ default: "cron",
1040
+ onClick: () => {
1041
+ let i = L(null);
1042
+ Pt({
1043
+ body: () => j(_e(() => import("../components/cron/src/Picker.mjs")), {
1044
+ disabled: e,
1045
+ modelValue: n.modelValue,
1046
+ onVnodeMounted: (e) => {
1047
+ i.value = e.component.exposed;
1048
+ },
1049
+ onVnodeUnmounted: () => {
1050
+ i.value = null;
1051
+ },
1052
+ readonly: t
1053
+ }),
1054
+ header: "cron表达式",
1055
+ onConfirmCallback: async () => {
1056
+ let e = await i.value.handleSubmit();
1057
+ r("update:modelValue", e);
1058
+ },
1059
+ width: 1e3
1060
+ });
1061
+ },
1062
+ variant: "text"
1063
+ }) }
1064
+ };
1065
+ }), s = Oe(), c = A();
1066
+ function l(e) {
1067
+ c.exposed = e ?? {};
1068
+ }
1069
+ let u = C(() => N(s, {
1070
+ ...o.value,
1071
+ onChange: (...e) => {
1072
+ r("update:modelValue", e[0]), n.onChange?.(...e);
1073
+ },
1074
+ ref: l
1075
+ }));
1076
+ return (e, t) => (I(), w(V(ae), F(ve(u.value)), null, 16));
1077
+ }
1078
+ }), dn = /* @__PURE__ */ k({
1079
+ inheritAttrs: !1,
1080
+ name: "TRadioGroup",
1081
+ __name: "radio-group",
1082
+ props: {
1083
+ dicCode: {},
1084
+ modelValue: { type: [
1085
+ String,
1086
+ Number,
1087
+ Boolean
1088
+ ] },
1089
+ options: {},
1090
+ allowUncheck: { type: Boolean },
1091
+ direction: {},
1092
+ disabled: {
1093
+ type: Boolean,
1094
+ default: void 0
1095
+ },
1096
+ name: {},
1097
+ readonly: {
1098
+ type: Boolean,
1099
+ default: void 0
1100
+ },
1101
+ size: {},
1102
+ theme: {},
1103
+ variant: {},
1104
+ onChange: {}
1105
+ },
1106
+ emits: ["update:modelValue"],
1107
+ setup(e, { emit: t }) {
1108
+ let r = e, i = t, a = $e, o = A();
1109
+ function s(e) {
1110
+ o.exposed = e ?? {};
1111
+ }
1112
+ let c = C(() => r.dicCode ? (r.options && n.error("TRadioGroup: dicCode and options cannot be used together"), sn(r.dicCode).value) : typeof r.options == "string" ? x(r.options).value : r.options), l = C(() => {
1113
+ let e = { ...r };
1114
+ return delete e.dicCode, Object.keys(e).forEach((t) => {
1115
+ e[t] === void 0 && delete e[t];
1116
+ }), e;
1117
+ }), u = C(() => {
1118
+ if (c.value !== void 0 && !_(r.modelValue)) {
1119
+ let e = c.value.every((e) => typeof (e.value ?? e) == "string"), t = c.value.every((e) => typeof (e.value ?? e) == "number");
1120
+ if (e) return y(r.modelValue);
1121
+ if (t) return v(r.modelValue) ? Number(r.modelValue) : r.modelValue;
1122
+ }
1123
+ return r.modelValue;
1124
+ });
1125
+ return (e, t) => (I(), w(z(j(V(a), N(e.$attrs, {
1126
+ ...l.value,
1127
+ options: c.value,
1128
+ modelValue: u.value,
1129
+ onChange: (...e) => {
1130
+ let [t, ...n] = e, a = V(_)(t) ? "" : t;
1131
+ i("update:modelValue", a), r.onChange?.(a, ...n);
1132
+ },
1133
+ ref: s
1134
+ }), e.$slots))));
1135
+ }
1136
+ }), fn = {
1137
+ clearable: !0,
1138
+ disabled: void 0,
1139
+ filterable: void 0,
1140
+ inputValue: void 0,
1141
+ keys: () => ({
1142
+ disabled: "disabled",
1143
+ label: "label",
1144
+ value: "value"
1145
+ }),
1146
+ minCollapsedNum: 1,
1147
+ multiple: !1,
1148
+ placeholder: "请选择",
1149
+ popupVisible: void 0,
1150
+ readonly: void 0,
1151
+ scroll: () => ({
1152
+ threshold: 150,
1153
+ type: "virtual"
1154
+ }),
1155
+ showArrow: !0,
1156
+ showCheckAll: !1
1157
+ }, pn = /* @__PURE__ */ k({
1158
+ inheritAttrs: !1,
1159
+ name: "TSelect",
1160
+ __name: "select",
1161
+ props: /*@__PURE__*/ M({
1162
+ adornment: {},
1163
+ dicCode: {},
1164
+ modelValue: {},
1165
+ "onUpdate:inputValue": { type: Function },
1166
+ "onUpdate:modelValue": { type: Function },
1167
+ "onUpdate:popupVisible": { type: Function },
1168
+ options: {},
1169
+ showCheckAll: { type: Boolean },
1170
+ autoWidth: { type: Boolean },
1171
+ autofocus: { type: Boolean },
1172
+ borderless: { type: Boolean },
1173
+ clearable: { type: Boolean },
1174
+ collapsedItems: {},
1175
+ creatable: { type: Boolean },
1176
+ disabled: { type: Boolean },
1177
+ empty: {},
1178
+ filter: { type: Function },
1179
+ filterable: { type: Boolean },
1180
+ inputProps: {},
1181
+ inputValue: {},
1182
+ defaultInputValue: {},
1183
+ keys: {},
1184
+ label: {},
1185
+ loading: { type: Boolean },
1186
+ loadingText: {},
1187
+ max: {},
1188
+ minCollapsedNum: {},
1189
+ multiple: { type: Boolean },
1190
+ panelBottomContent: {},
1191
+ panelTopContent: {},
1192
+ placeholder: {},
1193
+ popupProps: {},
1194
+ popupVisible: { type: Boolean },
1195
+ defaultPopupVisible: { type: Boolean },
1196
+ prefixIcon: {},
1197
+ readonly: { type: Boolean },
1198
+ reserveKeyword: { type: Boolean },
1199
+ scroll: {},
1200
+ selectInputProps: {},
1201
+ showArrow: { type: Boolean },
1202
+ size: {},
1203
+ status: {},
1204
+ suffix: {},
1205
+ suffixIcon: {},
1206
+ tagInputProps: {},
1207
+ tagProps: {},
1208
+ tips: {},
1209
+ valueDisplay: {},
1210
+ valueType: {},
1211
+ onBlur: { type: Function },
1212
+ onChange: { type: Function },
1213
+ onClear: { type: Function },
1214
+ onCreate: { type: Function },
1215
+ onEnter: { type: Function },
1216
+ onFocus: { type: Function },
1217
+ onInputChange: { type: Function },
1218
+ onPopupVisibleChange: { type: Function },
1219
+ onRemove: { type: Function },
1220
+ onSearch: { type: Function }
1221
+ }, fn),
1222
+ setup(e) {
1223
+ let t = e, r = et, i = A();
1224
+ function a(e) {
1225
+ i.exposed = e ?? {};
1226
+ }
1227
+ let o = C(() => {
1228
+ let e;
1229
+ return t.dicCode === void 0 ? e = typeof t.options == "string" ? x(t.options).value : t.options : (t.options && n.error("TSelect: dicCode and options cannot be used together"), e = sn(t.dicCode).value), t.showCheckAll && (t.multiple ? e === void 0 ? n.error("TSelect: options is required, when showCheckAll is true") : e.unshift({
1230
+ checkAll: !0,
1231
+ [t.keys?.label ?? "label"]: "全选"
1232
+ }) : n.error("TSelect: showCheckAll is supported only for multiple select")), e;
1233
+ }), s = C(() => {
1234
+ if (o.value !== void 0) {
1235
+ let e = o.value.flatMap((e) => e.children ?? [e]), n = t.keys?.value ?? "value", r = e.every((e) => typeof e[n] == "string"), i = e.every((e) => typeof e[n] == "number");
1236
+ if (t.multiple) {
1237
+ if (Array.isArray(t.modelValue)) {
1238
+ if (r) return t.modelValue.map((e) => _(e) ? e : String(e));
1239
+ if (i) return t.modelValue.map((e) => v(e) ? Number(e) : e);
1240
+ }
1241
+ } else if (r) return y(t.modelValue);
1242
+ else if (i) return v(t.modelValue) ? Number(t.modelValue) : t.modelValue;
1243
+ }
1244
+ return t.modelValue;
1245
+ }), c = C(() => {
1246
+ let e = {
1247
+ ...t,
1248
+ filterable: t.filterable ?? o.value.length > 8
1249
+ };
1250
+ return delete e.dicCode, delete e.showCheckAll, delete e.adornment, Object.keys(e).forEach((t) => {
1251
+ e[t] === void 0 && delete e[t];
1252
+ }), e;
1253
+ }), l = L(0);
1254
+ Se(() => {
1255
+ Ie(i.exposed.$el, () => {
1256
+ l.value = i.exposed.$el.offsetWidth;
1257
+ }, { box: "border-box" });
1258
+ });
1259
+ let u = C(() => {
1260
+ if (c.value.scroll?.type === "virtual" && o.value.length > (c.value.scroll?.threshold ?? 150)) return "300px";
1261
+ }), d = C(() => ({
1262
+ ...c.value,
1263
+ modelValue: s.value,
1264
+ onChange: (...e) => {
1265
+ let [n, ...r] = e, i = _(n) ? "" : n;
1266
+ t["onUpdate:modelValue"]?.(i), t.onChange?.(i, ...r);
1267
+ },
1268
+ options: o.value,
1269
+ popupProps: {
1270
+ ...c.value.popupProps ?? {},
1271
+ overlayInnerStyle: (e, t) => ({
1272
+ ...u.value === void 0 ? {} : { height: u.value },
1273
+ minWidth: `${l.value}px`,
1274
+ width: "auto",
1275
+ ...typeof c.value.popupProps?.overlayInnerStyle == "function" ? c.value.popupProps.overlayInnerStyle(e, t) : c.value.popupProps?.overlayInnerStyle ?? {}
1276
+ })
1277
+ },
1278
+ ref: a
1279
+ })), f = Ye;
1280
+ return (t, n) => e.adornment ? (I(), w(z(j(V(f), t.$attrs, {
1281
+ ...e.adornment,
1282
+ default: () => j(V(r), d.value, t.$slots)
1283
+ })), { key: 0 })) : (I(), w(z(j(V(r), N(t.$attrs, d.value), t.$slots)), { key: 1 }));
1284
+ }
1285
+ }), mn = /* @__PURE__ */ k({
1286
+ inheritAttrs: !1,
1287
+ __name: "select-sys-user",
1288
+ props: /*@__PURE__*/ M({
1289
+ modelValue: {},
1290
+ adornment: {},
1291
+ autoWidth: { type: Boolean },
1292
+ borderless: { type: Boolean },
1293
+ clearable: { type: Boolean },
1294
+ collapsedItems: {},
1295
+ disabled: { type: Boolean },
1296
+ dragSort: { type: Boolean },
1297
+ excessTagsDisplayType: {},
1298
+ inputProps: {},
1299
+ inputValue: {},
1300
+ defaultInputValue: {},
1301
+ label: {},
1302
+ max: {},
1303
+ minCollapsedNum: {},
1304
+ placeholder: {},
1305
+ prefixIcon: {},
1306
+ readonly: { type: Boolean },
1307
+ size: {},
1308
+ status: {},
1309
+ suffix: {},
1310
+ suffixIcon: {},
1311
+ tag: {},
1312
+ tagProps: {},
1313
+ tips: {},
1314
+ valueDisplay: {},
1315
+ onBlur: { type: Function },
1316
+ onChange: { type: Function },
1317
+ onClear: { type: Function },
1318
+ onClick: { type: Function },
1319
+ onDragSort: { type: Function },
1320
+ onEnter: { type: Function },
1321
+ onFocus: { type: Function },
1322
+ onInputChange: { type: Function },
1323
+ onMouseenter: { type: Function },
1324
+ onMouseleave: { type: Function },
1325
+ onPaste: { type: Function },
1326
+ onRemove: { type: Function }
1327
+ }, le),
1328
+ emits: ["update:modelValue"],
1329
+ setup(e, { emit: t }) {
1330
+ let n = e, r = t, i = ye("isFormDisabled", C(() => !1)), a = ye("isFormReadonly", C(() => !1)), o = C(() => {
1331
+ let e = n.disabled ?? i.value, t = n.readonly ?? a.value;
1332
+ return {
1333
+ ...n,
1334
+ adornment: e || t ? void 0 : { append: () => j($, {
1335
+ default: "选择用户",
1336
+ onClick: () => {
1337
+ let e = L(null);
1338
+ Pt({
1339
+ body: () => j(_e(() => import("../components/select-sys-user/src/Picker.mjs")), {
1340
+ max: n.max,
1341
+ modelValue: n.modelValue,
1342
+ onVnodeMounted: (t) => {
1343
+ e.value = t.component.exposed;
1344
+ },
1345
+ onVnodeUnmounted: () => {
1346
+ e.value = null;
1347
+ }
1348
+ }),
1349
+ header: "选择用户",
1350
+ onConfirmCallback: async () => {
1351
+ let t = await e.value.handleSubmit();
1352
+ r("update:modelValue", t);
1353
+ },
1354
+ width: 1e3
1355
+ });
1356
+ },
1357
+ variant: "text"
1358
+ }) }
1359
+ };
1360
+ }), s = Oe(), c = A();
1361
+ function l(e) {
1362
+ c.exposed = e ?? {};
1363
+ }
1364
+ let u = C(() => N(s, {
1365
+ ...o.value,
1366
+ inputProps: {
1367
+ readonly: !0,
1368
+ ...n.inputProps ?? {}
1369
+ },
1370
+ onChange: (...e) => {
1371
+ r("update:modelValue", e[0]), n.onChange?.(...e);
1372
+ },
1373
+ placeholder: "请选择用户",
1374
+ ref: l
1375
+ }));
1376
+ return (e, t) => (I(), w(V(ue), F(ve(u.value)), {
1377
+ tag: U(({ value: e }) => [D(B(V(Vt)(e).value?.userName), 1)]),
1378
+ _: 1
1379
+ }, 16));
1380
+ }
1381
+ }), hn = {
1382
+ checkable: !1,
1383
+ disabled: void 0,
1384
+ expandOnClickNode: void 0,
1385
+ hover: !0,
1386
+ icon: () => (t, n) => {
1387
+ let r = "";
1388
+ return n.getChildren && n.getChildren(!1) && (n.expanded ? (r = "cuida:caret-down-outline", n.loading && (r = "line-md:loading-twotone-loop")) : r = "cuida:caret-right-outline"), r === "" ? null : j($, {
1389
+ shape: "circle",
1390
+ size: "small",
1391
+ variant: "outline"
1392
+ }, { icon: () => j(e, { icon: r }) });
1393
+ },
1394
+ label: !0,
1395
+ lazy: !0,
1396
+ line: !0,
1397
+ transition: !0,
1398
+ valueMode: "all"
1399
+ }, gn = /* @__PURE__ */ k({
1400
+ inheritAttrs: !1,
1401
+ name: "TTree",
1402
+ __name: "tree",
1403
+ props: /*@__PURE__*/ M({
1404
+ "onUpdate:actived": { type: Function },
1405
+ "onUpdate:expanded": { type: Function },
1406
+ "onUpdate:modelValue": { type: Function },
1407
+ activable: { type: Boolean },
1408
+ activeMultiple: { type: Boolean },
1409
+ actived: {},
1410
+ defaultActived: {},
1411
+ allowDrop: { type: Function },
1412
+ allowFoldNodeOnFilter: { type: Boolean },
1413
+ checkProps: {},
1414
+ checkStrictly: { type: Boolean },
1415
+ checkable: { type: Boolean },
1416
+ data: {},
1417
+ disableCheck: { type: [Boolean, Function] },
1418
+ disabled: { type: Boolean },
1419
+ draggable: { type: Boolean },
1420
+ empty: {},
1421
+ expandAll: { type: Boolean },
1422
+ expandLevel: {},
1423
+ expandMutex: { type: Boolean },
1424
+ expandOnClickNode: { type: Boolean },
1425
+ expandParent: { type: Boolean },
1426
+ expanded: {},
1427
+ defaultExpanded: {},
1428
+ filter: { type: Function },
1429
+ height: {},
1430
+ hover: { type: Boolean },
1431
+ icon: { type: Boolean },
1432
+ keys: {},
1433
+ label: { type: [String, Boolean] },
1434
+ lazy: { type: Boolean },
1435
+ line: { type: Boolean },
1436
+ load: { type: Function },
1437
+ maxHeight: {},
1438
+ operations: {},
1439
+ scroll: {},
1440
+ transition: { type: Boolean },
1441
+ defaultValue: {},
1442
+ modelValue: {},
1443
+ valueMode: {},
1444
+ onActive: { type: Function },
1445
+ onChange: { type: Function },
1446
+ onClick: { type: Function },
1447
+ onDragEnd: { type: Function },
1448
+ onDragLeave: { type: Function },
1449
+ onDragOver: { type: Function },
1450
+ onDragStart: { type: Function },
1451
+ onDrop: { type: Function },
1452
+ onExpand: { type: Function },
1453
+ onLoad: { type: Function },
1454
+ onScroll: { type: Function },
1455
+ treeStore: {}
1456
+ }, hn),
1457
+ setup(e, { expose: t }) {
1458
+ let n = e, r = ke(), i = C(() => {
1459
+ let e = { ...n };
1460
+ return e.expandOnClickNode = e.expandOnClickNode ?? !e.checkable, r.icon && delete e.icon, Object.keys(e).forEach((t) => {
1461
+ e[t] === void 0 && delete e[t];
1462
+ }), e;
1463
+ }), a = tt, o = A();
1464
+ function s(e) {
1465
+ o.exposed = e ?? {};
1466
+ }
1467
+ return t({}), (e, t) => (I(), w(z(j(V(a), N(e.$attrs, {
1468
+ ...i.value,
1469
+ ref: s
1470
+ }), e.$slots))));
1471
+ }
1472
+ }), _n = /* @__PURE__ */ k({
1473
+ inheritAttrs: !1,
1474
+ name: "TTreeSelect",
1475
+ __name: "tree-select",
1476
+ props: {
1477
+ data: {},
1478
+ modelValue: {},
1479
+ "onUpdate:inputValue": {},
1480
+ "onUpdate:modelValue": {},
1481
+ "onUpdate:popupVisible": {},
1482
+ autoWidth: { type: Boolean },
1483
+ borderless: { type: Boolean },
1484
+ clearable: {
1485
+ type: Boolean,
1486
+ default: !0
1487
+ },
1488
+ collapsedItems: {},
1489
+ disabled: {
1490
+ type: Boolean,
1491
+ default: void 0
1492
+ },
1493
+ empty: {},
1494
+ filter: {},
1495
+ filterable: {
1496
+ type: Boolean,
1497
+ default: !0
1498
+ },
1499
+ inputProps: {},
1500
+ inputValue: {},
1501
+ defaultInputValue: {},
1502
+ keys: {},
1503
+ loading: { type: Boolean },
1504
+ loadingText: {},
1505
+ max: {},
1506
+ minCollapsedNum: {},
1507
+ multiple: { type: Boolean },
1508
+ panelBottomContent: {},
1509
+ panelTopContent: {},
1510
+ placeholder: {},
1511
+ popupProps: {},
1512
+ popupVisible: {
1513
+ type: Boolean,
1514
+ default: void 0
1515
+ },
1516
+ prefixIcon: {},
1517
+ readonly: {
1518
+ type: Boolean,
1519
+ default: void 0
1520
+ },
1521
+ selectInputProps: {},
1522
+ size: {},
1523
+ suffix: {},
1524
+ suffixIcon: {},
1525
+ tagProps: {},
1526
+ treeProps: {},
1527
+ valueDisplay: {},
1528
+ valueType: {},
1529
+ onBlur: {},
1530
+ onChange: {},
1531
+ onClear: {},
1532
+ onFocus: {},
1533
+ onInputChange: {},
1534
+ onPopupVisibleChange: {},
1535
+ onRemove: {},
1536
+ onSearch: {}
1537
+ },
1538
+ setup(e) {
1539
+ let t = e, n = C(() => typeof t.data == "string" ? x(t.data).value : t.data), r = C(() => {
1540
+ let e = { ...t };
1541
+ return e.selectInputProps = {
1542
+ minCollapsedNum: 2,
1543
+ ...e.selectInputProps ?? {}
1544
+ }, e.treeProps = {
1545
+ ...hn,
1546
+ checkable: !!t.multiple,
1547
+ expandOnClickNode: !!t.multiple,
1548
+ icon: hn.icon(),
1549
+ ...e.treeProps ?? {}
1550
+ }, Object.keys(e).forEach((t) => {
1551
+ e[t] === void 0 && delete e[t];
1552
+ }), e;
1553
+ }), i = nt, a = A();
1554
+ function o(e) {
1555
+ a.exposed = e ?? {};
1556
+ }
1557
+ let s = L(0);
1558
+ return Se(() => {
1559
+ Ie(a.exposed.$el, () => {
1560
+ s.value = a.exposed.$el.offsetWidth;
1561
+ }, { box: "border-box" });
1562
+ }), (e, t) => (I(), w(z(j(V(i), N(e.$attrs, {
1563
+ ...r.value,
1564
+ data: n.value,
1565
+ ref: o,
1566
+ popupProps: {
1567
+ ...r.value.popupProps ?? {},
1568
+ overlayInnerStyle: (e, t) => ({
1569
+ width: "auto",
1570
+ minWidth: `${s.value}px`,
1571
+ ...typeof r.value.popupProps?.overlayInnerStyle == "function" ? r.value.popupProps.overlayInnerStyle(e, t) : r.value.popupProps?.overlayInnerStyle ?? {}
1572
+ })
1573
+ }
1574
+ }), e.$slots))));
1575
+ }
1576
+ }), vn = ".xlsx,.xls", yn = { class: "flex items-center" }, bn = {
1577
+ key: 1,
1578
+ class: "ml-3 text-xs text-(--td-text-color-placeholder)"
1579
+ }, xn = /*#__PURE__*/ f(/* @__PURE__ */ k({
1580
+ inheritAttrs: !1,
1581
+ name: "TUpload",
1582
+ __name: "upload",
1583
+ props: {
1584
+ downloadTemplate: {},
1585
+ "onUpdate:modelValue": {},
1586
+ requestMethod: {},
1587
+ abridgeName: {},
1588
+ accept: { default: vn },
1589
+ allowUploadDuplicateFile: { type: Boolean },
1590
+ autoUpload: { type: Boolean },
1591
+ beforeAllFilesUpload: {},
1592
+ beforeUpload: {},
1593
+ cancelUploadButton: {},
1594
+ default: {},
1595
+ disabled: {
1596
+ type: Boolean,
1597
+ default: void 0
1598
+ },
1599
+ dragContent: {},
1600
+ draggable: { type: Boolean },
1601
+ fileListDisplay: {},
1602
+ imageViewerProps: {},
1603
+ inputAttributes: {},
1604
+ isBatchUpload: { type: Boolean },
1605
+ locale: {},
1606
+ max: {},
1607
+ mockProgressDuration: {},
1608
+ multiple: {
1609
+ type: Boolean,
1610
+ default: !1
1611
+ },
1612
+ placeholder: {},
1613
+ showImageFileName: { type: Boolean },
1614
+ showThumbnail: { type: Boolean },
1615
+ showUploadProgress: { type: Boolean },
1616
+ sizeLimit: {},
1617
+ status: {},
1618
+ theme: { default: "file" },
1619
+ tips: {},
1620
+ trigger: {},
1621
+ triggerButtonProps: {},
1622
+ uploadAllFilesInOneRequest: { type: Boolean },
1623
+ uploadButton: {},
1624
+ uploadPastedFiles: { type: Boolean },
1625
+ useMockProgress: {
1626
+ type: Boolean,
1627
+ default: !0
1628
+ },
1629
+ modelValue: {},
1630
+ withCredentials: { type: Boolean },
1631
+ onCancelUpload: {},
1632
+ onChange: {},
1633
+ onDragenter: {},
1634
+ onDragleave: {},
1635
+ onDrop: {},
1636
+ onFail: {},
1637
+ onOneFileFail: {},
1638
+ onOneFileSuccess: {},
1639
+ onPreview: {},
1640
+ onProgress: {},
1641
+ onRemove: {},
1642
+ onSelectChange: {},
1643
+ onSuccess: {},
1644
+ onValidate: {},
1645
+ onWaitingUploadFilesChange: {}
1646
+ },
1647
+ setup(e, { expose: t }) {
1648
+ let n = e, r = C(() => {
1649
+ if (n.requestMethod !== void 0) return (e) => new Promise((t) => {
1650
+ typeof n.requestMethod == "function" ? n.requestMethod(e).then((e) => {
1651
+ t({
1652
+ response: e,
1653
+ status: "success"
1654
+ });
1655
+ }).catch((e) => {
1656
+ t({
1657
+ error: e.message ?? "上传失败",
1658
+ response: {},
1659
+ status: "fail"
1660
+ });
1661
+ }) : X.Post(n.requestMethod.ossUrl ?? "common/uploadOss", {
1662
+ biz: n.requestMethod.biz,
1663
+ file: e.raw
1664
+ }, { meta: { useFormData: !0 } }).then((e) => {
1665
+ t({
1666
+ response: { url: e },
1667
+ status: "success"
1668
+ });
1669
+ }).catch((e) => {
1670
+ t({
1671
+ error: e.message ?? "上传失败",
1672
+ response: {},
1673
+ status: "fail"
1674
+ });
1675
+ });
1676
+ });
1677
+ });
1678
+ function i() {
1679
+ typeof n.downloadTemplate == "string" ? b(n.downloadTemplate) : n.downloadTemplate.send();
1680
+ }
1681
+ let a = C(() => {
1682
+ let e = { ...n };
1683
+ return ["image", "image-flow"].includes(e.theme) && (e.accept = e.accept === ".xlsx,.xls" ? "image/*" : e.accept), Object.keys(e).forEach((t) => {
1684
+ e[t] === void 0 && delete e[t];
1685
+ }), delete e.downloadTemplate, e.theme === "file" && delete e.tips, e;
1686
+ }), o = rt, s = A();
1687
+ function c(e) {
1688
+ s.exposed = e ?? {};
1689
+ }
1690
+ return t({}), (t, s) => (I(), w(z(j(V(o), N(t.$attrs, {
1691
+ ...a.value,
1692
+ requestMethod: r.value,
1693
+ ref: c
1694
+ }, { class: a.value.theme }))), null, ge({ _: 2 }, [R(Object.keys(t.$slots), (e) => ({
1695
+ name: e,
1696
+ fn: U((n) => [Te(t.$slots, e, F(ve(n)), void 0, !0)])
1697
+ })), a.value.theme === "file" && !Object.hasOwn(t.$slots, "trigger") ? {
1698
+ name: "trigger",
1699
+ fn: U(({ files: t }) => [he("div", yn, [
1700
+ O(V($), { theme: "primary" }, {
1701
+ default: U(() => [D(B(t.length > 0 ? a.value.multiple ? "继续上传" : "重新上传" : "选择文件"), 1)]),
1702
+ _: 2
1703
+ }, 1024),
1704
+ e.downloadTemplate ? (I(), w(V($), {
1705
+ key: 0,
1706
+ theme: "primary",
1707
+ variant: "outline",
1708
+ onClick: je(i, ["stop"])
1709
+ }, {
1710
+ default: U(() => [...s[0] ||= [D("下载模板", -1)]]),
1711
+ _: 1
1712
+ })) : T("v-if", !0),
1713
+ n.tips ? (I(), E("span", bn, B(n.tips), 1)) : T("v-if", !0)
1714
+ ])]),
1715
+ key: "0"
1716
+ } : void 0]), 1024));
1717
+ }
1718
+ }), [["__scopeId", "data-v-730cff70"]]), Sn = /*#__PURE__*/ f(/* @__PURE__ */ k({
1719
+ inheritAttrs: !1,
1720
+ name: "TForm",
1721
+ __name: "form",
1722
+ props: /*@__PURE__*/ M({
1723
+ autoLabelWidth: { type: Boolean },
1724
+ data: {},
1725
+ items: {},
1726
+ labelAlign: {},
1727
+ msgErrorWhenValidate: { type: Boolean },
1728
+ colon: { type: Boolean },
1729
+ disabled: { type: Boolean },
1730
+ errorMessage: {},
1731
+ id: {},
1732
+ layout: {},
1733
+ preventSubmitDefault: { type: Boolean },
1734
+ readonly: { type: Boolean },
1735
+ requiredMark: { type: Boolean },
1736
+ requiredMarkPosition: {},
1737
+ resetType: {},
1738
+ rules: {},
1739
+ scrollToFirstError: {},
1740
+ showErrorMessage: { type: Boolean },
1741
+ statusIcon: { type: Boolean },
1742
+ submitWithWarningMessage: { type: Boolean },
1743
+ onReset: { type: Function },
1744
+ onSubmit: { type: Function },
1745
+ onValidate: { type: Function }
1746
+ }, ht),
1747
+ setup(e, { expose: t }) {
1748
+ let r = e, { customerFormItemComponentInitialValueMap: i, customerFormItemComponentMap: s } = lt, c = A(), l = L(null), u = C(() => r.items.map((e) => {
1749
+ if (typeof e.__others == "function") {
1750
+ let t = {
1751
+ ...e,
1752
+ ...e.__others({
1753
+ exposed: l,
1754
+ formData: r.data
1755
+ })
1756
+ };
1757
+ return delete t.__others, t;
1758
+ }
1759
+ return e;
1760
+ }));
1761
+ function d() {
1762
+ u.value.forEach((e) => {
1763
+ if (e.model !== void 0 && !Object.hasOwn(r.data, e.model)) {
1764
+ if (i.has(e.component)) {
1765
+ let t = i.get(e.component);
1766
+ r.data[e.model] = t(e);
1767
+ return;
1768
+ }
1769
+ let t = [
1770
+ "TCheckboxGroup",
1771
+ "TRangeInput",
1772
+ "TSelectSysUser",
1773
+ "TTagInput",
1774
+ "TUpload"
1775
+ ].includes(e.component) || e.component === "TSelect" && e.multiple === !0 || e.component === "TDatePicker" && [
1776
+ "daterange",
1777
+ "dates",
1778
+ "datetimerange",
1779
+ "monthrange",
1780
+ "months",
1781
+ "yearrange",
1782
+ "years"
1783
+ ].includes(e.type) || e.component === "TSlider" && e.range === !0;
1784
+ r.data[e.model] = t ? [] : e.component === "TCheckbox" ? !1 : e.component === "TSwitch" ? Array.isArray(e.customValue) ? e.customValue[1] : !1 : "";
1785
+ }
1786
+ });
1787
+ }
1788
+ H(u, d, {
1789
+ deep: 2,
1790
+ immediate: !0
1791
+ }), H(() => r.data, () => {
1792
+ n.error("TForm: data is changed");
1793
+ });
1794
+ let f = /* @__PURE__ */ new Map(), p = {
1795
+ TCheckbox: a,
1796
+ TCheckboxGroup: ln,
1797
+ TCron: un,
1798
+ TDatePicker: oe,
1799
+ TInput: ae,
1800
+ TInputNumber: se,
1801
+ TRadioGroup: dn,
1802
+ TRangeInput: ce,
1803
+ TSelect: pn,
1804
+ TSelectSysUser: mn,
1805
+ TSlider: de,
1806
+ TSwitch: fe,
1807
+ TTagInput: ue,
1808
+ TTextarea: pe,
1809
+ TTree: gn,
1810
+ TTreeSelect: _n,
1811
+ TUpload: xn
1812
+ };
1813
+ function m(e) {
1814
+ return typeof e == "string" ? s.has(e) ? (f.has(e) || f.set(e, _e(s.get(e))), f.get(e)) : p[e] : ae;
1815
+ }
1816
+ function h(e) {
1817
+ let t = {};
1818
+ for (let n in e) !n.startsWith("_") && ![
1819
+ "component",
1820
+ "model",
1821
+ "show"
1822
+ ].includes(n) && (t[n] = e[n]);
1823
+ return t;
1824
+ }
1825
+ function ee(e) {
1826
+ let t = {};
1827
+ for (let n in e) n.startsWith("_") && (t[n.slice(1)] = e[n]);
1828
+ let n = [
1829
+ "TCheckbox",
1830
+ "TCheckboxGroup",
1831
+ "TRadioGroup"
1832
+ ].includes(e.component), i = e.component === "TUpload" ? "请上传文件" : typeof t.label == "string" ? n ? `请选择${t.label}` : `请填写${t.label}` : "必填";
1833
+ return t.required === !0 && (t.rules === void 0 && (t.rules = []), !t.rules.some((e) => e.required === !0) && r.rules?.[e.model ?? ""] === void 0 && t.rules.unshift({
1834
+ message: i,
1835
+ required: !0
1836
+ }, {
1837
+ message: i,
1838
+ whitespace: !0
1839
+ }), t.rules.length === 0 && delete t.rules, delete t.required), t.rules?.find((e) => e.required === !0) !== void 0 && !t.rules.some((e) => e.whitespace === !0) && t.rules.unshift({
1840
+ message: t.rules.find((e) => e.required === !0).message ?? i,
1841
+ whitespace: !0
1842
+ }), t;
1843
+ }
1844
+ let te = C(() => {
1845
+ let e = { ...r };
1846
+ if (e.rules !== void 0) {
1847
+ let t = {};
1848
+ Object.keys(e.rules).forEach((n) => {
1849
+ t[n] = [];
1850
+ let r = e.rules[n];
1851
+ r.forEach((e) => {
1852
+ t[n].push(e), e.required === !0 && !r.some((e) => e.whitespace === !0) && t[n].push({
1853
+ message: e.message,
1854
+ whitespace: !0
1855
+ });
1856
+ });
1857
+ }), e.rules = t;
1858
+ }
1859
+ return delete e.items, delete e.msgErrorWhenValidate, delete e.autoLabelWidth, Object.keys(e).forEach((t) => {
1860
+ e[t] === void 0 && delete e[t];
1861
+ }), e;
1862
+ }), g = Ge, v = () => {
1863
+ let e = { ...r.data };
1864
+ return u.value.forEach((t) => {
1865
+ t.show === !1 && delete e[t.model];
1866
+ }), e;
1867
+ };
1868
+ function y(e) {
1869
+ if (e !== null) {
1870
+ let t = e;
1871
+ if (!t.validate._alreadyReplace) {
1872
+ let e = t.validate;
1873
+ t.validate = (...t) => new Promise((n, i) => {
1874
+ e(...t).then((e) => {
1875
+ e === !0 ? n(v()) : (r.msgErrorWhenValidate && Object.keys(e).forEach((t) => {
1876
+ e[t].forEach((e) => {
1877
+ e.result === !1 && o.error(e.message);
1878
+ });
1879
+ }), i(e));
1880
+ });
1881
+ }), t.validate._alreadyReplace = !0;
1882
+ }
1883
+ if (!t.validate._alreadyReplace) {
1884
+ let e = t.validateOnly;
1885
+ t.validateOnly = (...t) => new Promise((n, r) => {
1886
+ e(...t).then((e) => {
1887
+ e === !0 ? n(v()) : r(e);
1888
+ });
1889
+ }), t.validateOnly._alreadyReplace = !0;
1890
+ }
1891
+ if (!t.clearValidate._alreadyReplace) {
1892
+ let e = t.clearValidate;
1893
+ t.clearValidate = (...t) => {
1894
+ P(() => {
1895
+ P(() => {
1896
+ P(() => {
1897
+ P(() => {
1898
+ P(() => {
1899
+ e(...t);
1900
+ });
1901
+ });
1902
+ });
1903
+ });
1904
+ });
1905
+ }, t.clearValidate._alreadyReplace = !0;
1906
+ }
1907
+ t.getFormData = v, t.setFormData = (e, t) => {
1908
+ let { ignoreKeys: n = [], isNotFalsy: i = !0, numberToStringKeys: a = [], override: o = {}, splitToArrKeys: s = [] } = t ?? {};
1909
+ Object.keys(r.data).forEach((t) => {
1910
+ n.includes(t) || (s.includes(t) ? r.data[t] = typeof e[t] == "string" ? e[t].split(",").filter(Boolean) : [] : i && _(e[t]) || (r.data[t] = e[t]), a.includes(t) && typeof r.data[t] == "number" && (r.data[t] = String(r.data[t])));
1911
+ }), Object.assign(r.data, o);
1912
+ };
1913
+ }
1914
+ let t = e ?? {};
1915
+ l.value = t, c.exposed = t;
1916
+ }
1917
+ let b = De();
1918
+ Se(() => {
1919
+ b.value = c.exposed.$el.getElementsByClassName("t-form__label"), x(), Fe(c.exposed.$el, () => {
1920
+ x();
1921
+ }, {
1922
+ attributeFilter: ["class"],
1923
+ characterData: !0,
1924
+ childList: !0,
1925
+ subtree: !0
1926
+ }), Ie(c.exposed.$el, () => {
1927
+ x();
1928
+ });
1929
+ });
1930
+ function x() {
1931
+ let e = [...b.value];
1932
+ if (e.forEach((e) => {
1933
+ e.style.minWidth = "auto";
1934
+ }), r.labelAlign === "top" || !r.autoLabelWidth) return;
1935
+ let t = 0;
1936
+ e.forEach((e) => {
1937
+ t = Math.max(t, e.offsetWidth);
1938
+ }), e.forEach((e) => {
1939
+ e.style.minWidth = `${t}px`;
1940
+ });
1941
+ }
1942
+ return Ce("formData", r.data), Ce("formExposed", l), Ce("isFormDisabled", C(() => r.disabled)), Ce("isFormReadonly", C(() => r.readonly)), t({}), (t, n) => (I(), E(S, null, [T(" eslint-disable vue/no-mutating-props "), (I(), w(z(V(g)), N(N(t.$attrs, {
1943
+ ...te.value,
1944
+ ref: y
1945
+ }), { "label-width": "fit-content" }), {
1946
+ default: U(() => [(I(!0), E(S, null, R(u.value.filter((e) => e.show !== !1), (n) => (I(), w(V(Ke), N({ key: n.model ?? n.slot }, { ref_for: !0 }, N({ ...ee(n) }, { class: { no_label_item: V(_)(n._label) } }), { name: n.model }), {
1947
+ default: U(() => [n.slot ? Te(t.$slots, n.slot, {}, void 0, !0, 0) : (I(), w(z(m(n.component)), N({
1948
+ key: 1,
1949
+ modelValue: e.data[n.model],
1950
+ "onUpdate:modelValue": (t) => e.data[n.model] = t
1951
+ }, { ref_for: !0 }, h(n)), null, 16, ["modelValue", "onUpdate:modelValue"]))]),
1952
+ _: 2
1953
+ }, 1040, ["name"]))), 128))]),
1954
+ _: 3
1955
+ }, 16))], 2112));
1956
+ }
1957
+ }), [["__scopeId", "data-v-a75484d4"]]), Cn = /* @__PURE__ */ k({
1958
+ __name: "ResetPwd",
1959
+ props: { showFooter: {
1960
+ type: Boolean,
1961
+ default: !0
1962
+ } },
1963
+ setup(e, { expose: t }) {
1964
+ let n = G(), r = [
1965
+ {
1966
+ _label: "旧密码",
1967
+ _required: !0,
1968
+ component: "TInput",
1969
+ model: "oldPassword",
1970
+ type: "password"
1971
+ },
1972
+ {
1973
+ _label: "新密码",
1974
+ _required: !0,
1975
+ _rules: [{
1976
+ message: g,
1977
+ pattern: te
1978
+ }],
1979
+ component: "TInput",
1980
+ model: "newPassword",
1981
+ type: "password"
1982
+ },
1983
+ {
1984
+ __others: ({ formData: e }) => ({ _rules: [{ validator: (t) => t === e.newPassword || {
1985
+ message: "两次输入的密码不一致",
1986
+ result: !1
1987
+ } }] }),
1988
+ _label: "确认密码",
1989
+ _required: !0,
1990
+ component: "TInput",
1991
+ model: "confirmPassword",
1992
+ type: "password"
1993
+ },
1994
+ ...e.showFooter ? [{ slot: "footer" }] : []
1995
+ ], i = Ae("form");
1996
+ function a() {
1997
+ q().close(n.name);
1998
+ }
1999
+ async function o() {
2000
+ let e = await i.value.validate();
2001
+ await X.Put("system/user/profile/updatePwd", void 0, {
2002
+ meta: {
2003
+ useLoading: "保存中...",
2004
+ useSuccessMsg: !0
2005
+ },
2006
+ params: {
2007
+ newPassword: e.newPassword,
2008
+ oldPassword: e.oldPassword
2009
+ }
2010
+ }), Wt().logout();
2011
+ }
2012
+ return t({ handleSubmit: o }), (e, t) => (I(), w(V(Sn), {
2013
+ ref: "form",
2014
+ items: r,
2015
+ "label-align": "right",
2016
+ layout: "vertical"
2017
+ }, {
2018
+ footer: U(() => [O(V($), { onClick: o }, {
2019
+ default: U(() => [...t[0] ||= [D("保存", -1)]]),
2020
+ _: 1
2021
+ }), O(V($), {
2022
+ class: "ml-4!",
2023
+ theme: "default",
2024
+ onClick: a
2025
+ }, {
2026
+ default: U(() => [...t[1] ||= [D("关闭", -1)]]),
2027
+ _: 1
2028
+ })]),
2029
+ _: 1
2030
+ }, 512));
2031
+ }
2032
+ });
2033
+ //#endregion
2034
+ //#region ../../packages/dlzn-ui/store/modules/user.ts
2035
+ function wn() {
2036
+ return X.Get("getInfo", { meta: {
2037
+ useFailMsg: "获取用户信息失败",
2038
+ useLoading: "正在获取用户信息..."
2039
+ } });
2040
+ }
2041
+ var Tn = {
2042
+ admin: !1,
2043
+ dept: { deptName: "" },
2044
+ needChangePwd: 0,
2045
+ nickName: "",
2046
+ userId: "",
2047
+ userName: ""
2048
+ }, Q = W("user", () => {
2049
+ let e = L(it(Tn)), t = L([]), n = L([]);
2050
+ function r() {
2051
+ e.value = it(Tn), t.value = [], n.value = [];
2052
+ }
2053
+ let i = C(() => e.value.admin), a = L("");
2054
+ async function o(r = !0) {
2055
+ let i = await wn();
2056
+ e.value = i.user, a.value !== e.value.userId && q().clear(), a.value = e.value.userId, t.value = i.permissions, n.value = i.roles, r && await Et().getRouters();
2057
+ }
2058
+ H(() => e.value.needChangePwd, (e) => {
2059
+ e === 1 && VITE_FORCE_PWD_CHANGE && P(() => {
2060
+ let e = L(null);
2061
+ Pt({
2062
+ body: () => j(Cn, {
2063
+ labelAlign: "top",
2064
+ ref: e,
2065
+ showFooter: !1
2066
+ }),
2067
+ cancelBtn: null,
2068
+ closeBtn: !1,
2069
+ closeWhenCloseAll: !1,
2070
+ header: "请修改密码",
2071
+ onConfirmCallback: async () => {
2072
+ await e.value.handleSubmit();
2073
+ },
2074
+ width: 430
2075
+ });
2076
+ });
2077
+ }, { immediate: !0 });
2078
+ function s(e) {
2079
+ if (e === void 0) return !0;
2080
+ let n = Array.isArray(e) ? e : [e];
2081
+ return t.value.some((e) => e === "*:*:*" || n.includes(e));
2082
+ }
2083
+ return {
2084
+ checkPermissions: s,
2085
+ clear: r,
2086
+ getUserInfo: o,
2087
+ isAdmin: i,
2088
+ lastUserId: a,
2089
+ permissions: t,
2090
+ roles: n,
2091
+ userInfo: e
2092
+ };
2093
+ }, { persist: { pick: ["lastUserId"] } }), $ = /*#__PURE__*/ f(/* @__PURE__ */ k({
2094
+ inheritAttrs: !1,
2095
+ name: "TButton",
2096
+ __name: "button",
2097
+ props: /*@__PURE__*/ M({
2098
+ autoIcon: { type: Boolean },
2099
+ autoLoading: { type: Boolean },
2100
+ autoTheme: { type: Boolean },
2101
+ icon: {},
2102
+ permission: {},
2103
+ popconfirm: {},
2104
+ block: { type: Boolean },
2105
+ default: {},
2106
+ disabled: { type: Boolean },
2107
+ form: {},
2108
+ ghost: { type: Boolean },
2109
+ href: {},
2110
+ loading: { type: Boolean },
2111
+ loadingProps: {},
2112
+ shape: {},
2113
+ size: {},
2114
+ suffix: {},
2115
+ tag: {},
2116
+ theme: {},
2117
+ type: {},
2118
+ variant: {},
2119
+ onClick: { type: Function },
2120
+ class: { type: [
2121
+ Boolean,
2122
+ null,
2123
+ String,
2124
+ Object,
2125
+ Array
2126
+ ] },
2127
+ style: { type: [
2128
+ Boolean,
2129
+ null,
2130
+ String,
2131
+ Object,
2132
+ Array
2133
+ ] }
2134
+ }, mt),
2135
+ setup(n) {
2136
+ let r = n, a = L("");
2137
+ function o() {
2138
+ if (!r.autoTheme || a.value.trim() === "") return {};
2139
+ let e = /* @__PURE__ */ new Map([
2140
+ [{ theme: "danger" }, ["删除", "清除"]],
2141
+ [{
2142
+ theme: "primary",
2143
+ variant: "outline"
2144
+ }, [
2145
+ "上传",
2146
+ "导入",
2147
+ "导出",
2148
+ "下载"
2149
+ ]],
2150
+ [{ theme: "warning" }, ["预警"]]
2151
+ ]), t = {};
2152
+ for (let [n, r] of e) if (r.some((e) => a.value.includes(e))) {
2153
+ t = n;
2154
+ break;
2155
+ }
2156
+ return t;
2157
+ }
2158
+ let s = L(!1), c = i.isLoading, l = L(null), { focused: u } = Pe(l), d, f;
2159
+ H(c, (e) => {
2160
+ e ? (clearTimeout(f), f = void 0, d = setTimeout(() => {
2161
+ s.value = u.value, clearTimeout(d), d = void 0;
2162
+ }, 150)) : d === void 0 ? f = setTimeout(() => {
2163
+ s.value = !1;
2164
+ }, 150) : (clearTimeout(d), d = void 0, s.value = !1);
2165
+ }, { immediate: !0 }), H(u, (e) => {
2166
+ e && c.value && (s.value = !0);
2167
+ });
2168
+ let p = C(() => r.loading === void 0 ? r.autoLoading ? s.value : !1 : r.loading), m = C(() => {
2169
+ let e = {
2170
+ ...r,
2171
+ ...o(),
2172
+ loading: p.value
2173
+ };
2174
+ return Object.keys(e).forEach((t) => {
2175
+ e[t] === void 0 && delete e[t];
2176
+ }), delete e.permission, delete e.popconfirm, delete e.autoIcon, delete e.autoLoading, delete e.autoTheme, delete e.icon, e;
2177
+ }), h = ze, ee = A();
2178
+ function te(e) {
2179
+ let t = e ?? {};
2180
+ ee.exposed = t, l.value = t.$el;
2181
+ }
2182
+ function g() {
2183
+ a.value = l.value?.textContent ?? "";
2184
+ }
2185
+ let _ = C(() => {
2186
+ if (!r.autoIcon || a.value.trim() === "") return;
2187
+ let e = {
2188
+ "mdi:plus": [
2189
+ "新增",
2190
+ "添加",
2191
+ "加入"
2192
+ ],
2193
+ "mdi:cancel": ["取消"],
2194
+ "mdi:remove": ["清除"],
2195
+ "entypo:switch": ["开启"],
2196
+ "material-symbols:pause": ["暂停"],
2197
+ "ri:edit-line": ["编辑"],
2198
+ "uil:edit": ["修改"],
2199
+ "boxicons:send": ["发送"],
2200
+ "carbon:executable-program": ["执行"],
2201
+ "ri:save-line": ["保存", "提交"],
2202
+ "uiw:down": ["展开"],
2203
+ "uiw:up": ["收起"],
2204
+ "mdi:close": ["关闭"],
2205
+ "ri:reset-left-fill": ["重置"],
2206
+ "tabler:refresh": [
2207
+ "刷新",
2208
+ "换一批",
2209
+ "更新"
2210
+ ],
2211
+ "tabler:restore": ["还原", "恢复"],
2212
+ "codicon:debug-rerun": ["重跑"],
2213
+ "ix:select-alt": ["选择"],
2214
+ "iconoir:search": ["查询", "搜索"],
2215
+ "material-symbols:cell-merge": ["合并"],
2216
+ "mdi:upload-outline": ["上传", "导入"],
2217
+ "carbon:inspection": ["检查"],
2218
+ "material-symbols:delete-outline": ["删除"],
2219
+ "mdi:download-outline": ["下载", "导出"],
2220
+ "ri:alert-line": ["预警"],
2221
+ "material-symbols:login": ["登录"],
2222
+ "carbon:report": ["报告"],
2223
+ "icon-park-outline:setting-config": ["配置"],
2224
+ "subway:mark-1": ["标记"],
2225
+ "tdesign:summary": ["汇总"],
2226
+ "ph:open-ai-logo": ["AI"],
2227
+ "material-symbols:comment-outline": ["评论"],
2228
+ "hugeicons:view": ["预览", "查看"],
2229
+ "majesticons:checkbox-list-detail-line": ["详情", "详细"],
2230
+ "lucide:user-round": ["角色", "用户"],
2231
+ "material-symbols:folder-outline": ["文件夹"],
2232
+ "mdi:file-outline": ["文件"],
2233
+ "bi:journal-text": ["日志"],
2234
+ "material-symbols:security": ["权限"]
2235
+ }, t;
2236
+ for (let [n, r] of Object.entries(e)) if (r.some((e) => a.value.includes(e))) {
2237
+ t = n;
2238
+ break;
2239
+ }
2240
+ if (t !== void 0) return t;
2241
+ }), v = Oe(), y = C(() => N(v, {
2242
+ ...m.value,
2243
+ ref: te
2244
+ }, { class: "flex-shrink-0" })), b = C(() => {
2245
+ if (r.popconfirm) return {
2246
+ ...r.popconfirm,
2247
+ onVisibleChange: (...e) => {
2248
+ r.popconfirm?.onVisibleChange?.(...e), !e[0] && (document.activeElement?.classList.contains("t-popconfirm__confirm") || document.activeElement?.classList.contains("t-popconfirm__cancel")) && (u.value = !0);
2249
+ }
2250
+ };
2251
+ });
2252
+ return (r, i) => V(Q)().checkPermissions(n.permission) ? (I(), E(S, { key: 0 }, [b.value ? (I(), w(V(t), F(N({ key: 0 }, b.value)), {
2253
+ default: U(() => [(I(), w(z(j(V(h), y.value)), {
2254
+ onVnodeMounted: g,
2255
+ onVnodeUpdated: g
2256
+ }, ge({ _: 2 }, [n.icon || _.value ? {
2257
+ name: "icon",
2258
+ fn: U(() => [O(V(e), { icon: n.icon || _.value }, null, 8, ["icon"])]),
2259
+ key: "0"
2260
+ } : void 0, R(Object.keys(r.$slots), (e) => ({
2261
+ name: e,
2262
+ fn: U((t) => [Te(r.$slots, e, F(ve(t)), void 0, !0)])
2263
+ }))]), 1536))]),
2264
+ _: 3
2265
+ }, 16)) : (I(), w(z(j(V(h), y.value)), {
2266
+ key: 1,
2267
+ onVnodeMounted: g,
2268
+ onVnodeUpdated: g
2269
+ }, ge({ _: 2 }, [n.icon || _.value ? {
2270
+ name: "icon",
2271
+ fn: U(() => [O(V(e), { icon: n.icon || _.value }, null, 8, ["icon"])]),
2272
+ key: "0"
2273
+ } : void 0, R(Object.keys(r.$slots), (e) => ({
2274
+ name: e,
2275
+ fn: U((t) => [Te(r.$slots, e, F(ve(t)), void 0, !0)])
2276
+ }))]), 1536))], 64)) : T("v-if", !0);
2277
+ }
2278
+ }), [["__scopeId", "data-v-41e01020"]]);
2279
+ //#endregion
2280
+ export { zt as A, K as B, $t as C, qt as D, Y as E, kt as F, mt as H, Ot as I, _t as L, Vt as M, Pt as N, Kt as O, Nt as P, Et as R, Qt as S, Jt as T, ht as V, an as _, Sn as a, cn as b, _n as c, mn as d, pn as f, ln as g, un as h, Cn as i, Bt as j, Wt as k, gn as l, dn as m, wn as n, xn as o, fn as p, Q as r, vn as s, $ as t, hn as u, on as v, Yt as w, X as x, sn as y, q as z };