dlzn-ui 1.93.0 → 1.95.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 (164) hide show
  1. package/assets/LoginBg-9HH4oQBJ.css +1 -0
  2. package/assets/button-CoP5-rI4.css +2 -0
  3. package/chunks/{Common-B_fOVewz.mjs → Common-Cx8evfsI.mjs} +3 -3
  4. package/chunks/{Day-J83Okbcs.mjs → Day-B_L-4G7r.mjs} +3 -3
  5. package/chunks/{Hour-zpP7cab8.mjs → Hour-BoPa9lUc.mjs} +1 -1
  6. package/chunks/{Index-DOnJAYUb.mjs → Index-B2DLdn8E.mjs} +12 -13
  7. package/chunks/{Index-DujthBDk.mjs → Index-BbkM7HWR.mjs} +1 -1
  8. package/chunks/{Index-C26IC9j5.mjs → Index-BtCphN_L.mjs} +1 -1
  9. package/chunks/{Index-BEDBQBqH.mjs → Index-CFqKMPsW.mjs} +4 -4
  10. package/chunks/{Index-CHCsBymt.mjs → Index-Cdiby2pA.mjs} +1 -1
  11. package/chunks/{Index-ZW1zDBUE.mjs → Index-D0K4Ai1m.mjs} +10 -10
  12. package/chunks/{Index-DOX5elbu.mjs → Index-DXm9TIsz.mjs} +1 -1
  13. package/chunks/{Index-D-UsxAx-.mjs → Index-KbZFUlC6.mjs} +7 -7
  14. package/chunks/{IndexItem-rd9PLxFu.mjs → IndexItem-BM6uGIZB.mjs} +16 -16
  15. package/chunks/LoginBg-BPY-OcAF.mjs +36 -0
  16. package/chunks/MenuNode-DUrmFCgV.mjs +60 -0
  17. package/chunks/{Minute-D5hHwQbr.mjs → Minute-D9KPTG2q.mjs} +1 -1
  18. package/chunks/{Month-DKBThQCT.mjs → Month-QvaptAFC.mjs} +1 -1
  19. package/chunks/{Second-CpyxAPSW.mjs → Second-BMlnxwXg.mjs} +1 -1
  20. package/chunks/UserInfo-BydBVUCg.mjs +81 -0
  21. package/chunks/button-DWWr8rbi.mjs +1153 -0
  22. package/chunks/{checkbox-group-D7jGdbHp.mjs → checkbox-group-YP6Zs24H.mjs} +4 -4
  23. package/chunks/{custom-page-list-tscjv8y5.mjs → custom-page-list-6pTTm3FF.mjs} +4 -4
  24. package/chunks/{custom-page-table-BDReG7BA.mjs → custom-page-table-Re33Gkku.mjs} +2 -2
  25. package/chunks/{date-picker-CTGIcHXL.mjs → date-picker-a5izI55t.mjs} +8 -8
  26. package/chunks/{form-iyDxFJGm.mjs → form-DDECRusH.mjs} +35 -35
  27. package/chunks/{gradient-text-CRqJzz7N.mjs → gradient-text-B6JwSk-u.mjs} +16 -16
  28. package/chunks/{input-number-Bt1mbd1D.mjs → input-number-D55mzch-.mjs} +11 -11
  29. package/chunks/{overview-BB7h4V3u.mjs → overview-DlWs1w6r.mjs} +1 -1
  30. package/chunks/{page-list-6ZKGfu67.mjs → page-list-gSwymVpQ.mjs} +45 -46
  31. package/chunks/{page-query-Cd_ULbqY.mjs → page-query-d9mh2elg.mjs} +1 -1
  32. package/chunks/{page-table-BMN86ain.mjs → page-table-BgaJqpoa.mjs} +7 -7
  33. package/chunks/{pagination-BtXI5_uR.mjs → pagination-iPAiud09.mjs} +11 -11
  34. package/chunks/{radio-group-D29D9RMN.mjs → radio-group-C3AjJtmo.mjs} +3 -3
  35. package/chunks/{select-DbGBggUm.mjs → select-D37IzAHf.mjs} +4 -4
  36. package/chunks/{select-sys-user-Bj08BwIs.mjs → select-sys-user-ByPdQiNS.mjs} +5 -6
  37. package/chunks/{table-G32fdSB1.mjs → table-DOmgDY1k.mjs} +25 -25
  38. package/chunks/{tree-Bn-WY5dz.mjs → tree-Bmj2il_w.mjs} +1 -1
  39. package/chunks/{tree-szMrY26E.mjs → tree-CgTvu0bm.mjs} +1 -1
  40. package/chunks/{tree-select-C-HywxXx.mjs → tree-select-CIu8DIrE.mjs} +1 -1
  41. package/chunks/{upload-CvqlmOVo.mjs → upload-GrQ6xgLf.mjs} +21 -22
  42. package/components/button/index.mjs +1 -1
  43. package/components/button/src/button.mjs +1 -1
  44. package/components/checkbox-group/index.mjs +1 -1
  45. package/components/checkbox-group/src/checkbox-group.mjs +1 -1
  46. package/components/cron/src/Common.mjs +1 -1
  47. package/components/cron/src/Day.mjs +1 -1
  48. package/components/cron/src/Hour.mjs +1 -1
  49. package/components/cron/src/Minute.mjs +1 -1
  50. package/components/cron/src/Month.mjs +1 -1
  51. package/components/cron/src/Picker.mjs +14 -14
  52. package/components/cron/src/Second.mjs +1 -1
  53. package/components/cron/src/cron.vue.d.ts +1 -1
  54. package/components/custom-page-list/index.mjs +1 -1
  55. package/components/custom-page-list/src/custom-page-list.mjs +1 -1
  56. package/components/custom-page-table/index.mjs +1 -1
  57. package/components/custom-page-table/src/custom-page-table.mjs +1 -1
  58. package/components/date-picker/index.mjs +1 -1
  59. package/components/date-picker/src/date-picker.mjs +1 -1
  60. package/components/form/index.mjs +1 -1
  61. package/components/form/src/form.mjs +1 -1
  62. package/components/gradient-text/index.mjs +1 -1
  63. package/components/gradient-text/src/gradient-text.mjs +1 -1
  64. package/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
  65. package/components/index.mjs +41 -41
  66. package/components/input/src/input.vue.d.ts +1 -1
  67. package/components/input-number/index.mjs +1 -1
  68. package/components/input-number/src/input-number.mjs +1 -1
  69. package/components/input-number/src/input-number.vue.d.ts +1 -1
  70. package/components/overview/index.mjs +1 -1
  71. package/components/overview/src/DicLabel/Index.mjs +1 -1
  72. package/components/overview/src/IndexItem.mjs +1 -1
  73. package/components/overview/src/OptionLabel/Index.mjs +1 -1
  74. package/components/overview/src/overview.mjs +1 -1
  75. package/components/page-list/index.mjs +1 -1
  76. package/components/page-list/src/page-list.d.ts +48 -48
  77. package/components/page-list/src/page-list.mjs +1 -1
  78. package/components/page-query/index.mjs +1 -1
  79. package/components/page-query/src/page-query.mjs +1 -1
  80. package/components/page-table/index.mjs +1 -1
  81. package/components/page-table/src/page-table.mjs +1 -1
  82. package/components/page-table/src/page-table.vue.d.ts +2 -2
  83. package/components/pagination/index.mjs +1 -1
  84. package/components/pagination/src/pagination.mjs +1 -1
  85. package/components/radio-group/index.mjs +1 -1
  86. package/components/radio-group/src/radio-group.mjs +1 -1
  87. package/components/range-input/src/range-input.vue.d.ts +1 -1
  88. package/components/select/index.mjs +1 -1
  89. package/components/select/src/select.mjs +1 -1
  90. package/components/select/src/select.vue.d.ts +1 -1
  91. package/components/select-sys-user/index.mjs +1 -1
  92. package/components/select-sys-user/src/Picker.mjs +1 -1
  93. package/components/select-sys-user/src/select-sys-user.mjs +1 -1
  94. package/components/table/index.mjs +1 -1
  95. package/components/table/src/table.mjs +1 -1
  96. package/components/table/src/table.vue.d.ts +2 -2
  97. package/components/textarea/src/textarea.vue.d.ts +1 -1
  98. package/components/tree/index.mjs +2 -2
  99. package/components/tree/src/tree.mjs +1 -1
  100. package/components/tree/src/tree.vue.d.ts +1 -1
  101. package/components/tree-select/index.mjs +1 -1
  102. package/components/tree-select/src/tree-select.mjs +1 -1
  103. package/components/upload/index.mjs +1 -1
  104. package/components/upload/src/upload.mjs +1 -1
  105. package/hooks/useDicOptions/index.mjs +2 -2
  106. package/hooks/useSysUser/index.mjs +2 -2
  107. package/index.d.ts +1 -0
  108. package/index.mjs +41 -41
  109. package/layout/Home.mjs +10 -0
  110. package/layout/Home.vue.d.ts +4 -0
  111. package/layout/Index.mjs +2 -0
  112. package/layout/Index.vue.d.ts +4 -0
  113. package/layout/Login.mjs +91 -0
  114. package/layout/Login.vue.d.ts +4 -0
  115. package/layout/index.d.ts +4 -0
  116. package/layout/index2.mjs +24 -0
  117. package/layout/modules/Aside.mjs +2 -0
  118. package/layout/modules/Aside.vue.d.ts +4 -0
  119. package/layout/modules/Breadcrumb.mjs +2 -0
  120. package/layout/modules/Breadcrumb.vue.d.ts +10 -0
  121. package/layout/modules/Header.mjs +2 -0
  122. package/layout/modules/Header.vue.d.ts +4 -0
  123. package/layout/modules/LoginBg.mjs +2 -0
  124. package/layout/modules/LoginBg.vue.d.ts +14 -0
  125. package/layout/modules/LoginBgBak.mjs +50 -0
  126. package/layout/modules/LoginBgBak.vue.d.ts +14 -0
  127. package/layout/modules/MenuNode.mjs +2 -0
  128. package/layout/modules/MenuNode.vue.d.ts +9 -0
  129. package/layout/profile/Index.mjs +99 -0
  130. package/layout/profile/Index.vue.d.ts +4 -0
  131. package/layout/profile/ResetPwd.mjs +1 -1
  132. package/layout/profile/UserInfo.mjs +2 -0
  133. package/layout/profile/UserInfo.vue.d.ts +8 -0
  134. package/layout/vueBits/LightRays.mjs +218 -0
  135. package/layout/vueBits/LightRays.vue.d.ts +34 -0
  136. package/layout/vueBits/Plasma.mjs +110 -0
  137. package/layout/vueBits/Plasma.vue.d.ts +19 -0
  138. package/layout/vueBits/Prism.mjs +157 -0
  139. package/layout/vueBits/Prism.vue.d.ts +43 -0
  140. package/package.json +6 -1
  141. package/plugins/autoImport/$alova/index.mjs +2 -2
  142. package/plugins/captcha/captcha.mjs +1 -1
  143. package/plugins/echarts/china.json.d.ts +27327 -0
  144. package/plugins/tableRenders/cell/Buttons/Index.mjs +1 -1
  145. package/plugins/tableRenders/cell/DicLabel/Index.mjs +1 -1
  146. package/plugins/tableRenders/cell/Icon/Index.mjs +1 -1
  147. package/plugins/tableRenders/cell/Image/Index.mjs +1 -1
  148. package/plugins/tableRenders/cell/ImageViewer/Index.vue.d.ts +2 -2
  149. package/plugins/tableRenders/cell/Input/Index.vue.d.ts +1 -1
  150. package/plugins/tableRenders/cell/InputNumber/Index.mjs +1 -1
  151. package/plugins/tableRenders/cell/InputNumber/Index.vue.d.ts +1 -1
  152. package/plugins/tableRenders/cell/Select/Index.mjs +1 -1
  153. package/plugins/tableRenders/cell/Select/Index.vue.d.ts +1 -1
  154. package/plugins/tableRenders/cell/index.mjs +6 -6
  155. package/router/index.d.ts +1 -1
  156. package/router/index.mjs +2 -41
  157. package/store/modules/common.mjs +1 -1
  158. package/store/modules/login.mjs +1 -1
  159. package/store/modules/recentRouters.mjs +2 -43
  160. package/store/modules/router.mjs +1 -1
  161. package/store/modules/user.mjs +2 -2
  162. package/assets/button-DssPYT-h.css +0 -1
  163. package/chunks/button-Cb2lySJu.mjs +0 -202
  164. package/chunks/user-DsSzsUIW.mjs +0 -562
@@ -0,0 +1,1153 @@
1
+ import { n as e } from "./useAppContext-D47amIp5.mjs";
2
+ import t from "../plugins/autoImport/$loading/index.mjs";
3
+ import { passwordReg as n, passwordRegMessage as r } from "../constants/others.mjs";
4
+ import i from "../plugins/autoImport/$msg/index.mjs";
5
+ import a from "../layout/index2.mjs";
6
+ import { t as o } from "./scrollbar-Bf2VJTtD.mjs";
7
+ import s from "../hooks/useMQ/index.mjs";
8
+ import c from "../store/modules/excludeKPname.mjs";
9
+ import { t as l } from "./gradient-text-B6JwSk-u.mjs";
10
+ import { t as u } from "./plugin-vue_export-helper-B3ysoDQm.mjs";
11
+ import { t as d } from "./image-BEsiUWeF.mjs";
12
+ import { t as f } from "./icon-COjp1yrx.mjs";
13
+ import { t as p } from "./MenuNode-DUrmFCgV.mjs";
14
+ import m from "../hooks/useContextMenu/index.mjs";
15
+ import h from "../plugins/autoImport/$dialog/index.mjs";
16
+ import g from "../plugins/autoImport/$confirm/index.mjs";
17
+ import { isFalsy as _ } from "../utils/boolean.mjs";
18
+ import { stringDisplay as v } from "../utils/string.mjs";
19
+ import { saveAs as ee } from "../utils/tool.mjs";
20
+ import { useClearList as te } from "../hooks/useList/index.mjs";
21
+ import ne from "../plugins/autoImport/$drawer/index.mjs";
22
+ import { t as re } from "./popconfirm-DxWa7vWm.mjs";
23
+ import { Fragment as y, KeepAlive as ie, computed as b, createBlock as x, createCommentVNode as ae, createElementBlock as oe, createElementVNode as se, createSlots as ce, createTextVNode as S, createVNode as C, defineComponent as w, getCurrentInstance as le, guardReactiveProps as ue, h as de, markRaw as fe, mergeDefaults as pe, mergeProps as me, nextTick as he, normalizeClass as ge, normalizeProps as _e, openBlock as T, ref as E, renderList as D, renderSlot as ve, resolveComponent as O, resolveDynamicComponent as k, toDisplayString as A, unref as j, useAttrs as ye, useTemplateRef as M, watch as N, withCtx as P, withModifiers as be } from "vue";
24
+ import { useElementSize as xe, useFocus as Se } from "@vueuse/core";
25
+ import { Breadcrumb as Ce, BreadcrumbItem as we, Button as Te, Content as Ee, Drawer as De, Dropdown as Oe, HeadMenu as ke, Header as Ae, Layout as je, Menu as Me, MenuItem as Ne } from "tdesign-vue-next";
26
+ import { cloneDeep as F, isPlainObject as Pe } from "lodash-es";
27
+ import { defineStore as I } from "pinia";
28
+ import { createRouter as Fe, createWebHistory as Ie, useRoute as L, useRouter as R } from "vue-router";
29
+ import { createAlova as Le } from "alova";
30
+ import Re from "alova/fetch";
31
+ import ze from "alova/vue";
32
+ import Be from "path-browserify";
33
+ import Ve from "virtual:dlzn-ui/app-params";
34
+ import '../assets/button-CoP5-rI4.css';//#region ../../packages/dlzn-ui/components/button/src/button.ts
35
+ var He = {
36
+ autoIcon: !0,
37
+ autoLoading: !0,
38
+ autoTheme: !0,
39
+ loading: void 0
40
+ };
41
+ //#endregion
42
+ //#region ../../packages/dlzn-ui/store/modules/common.ts
43
+ function Ue() {
44
+ return Z.Get("common/appInfo", { meta: {
45
+ useFailMsg: !1,
46
+ useLoading: !1,
47
+ useSysFailMsg: !1,
48
+ useToken: !1
49
+ } });
50
+ }
51
+ var z = I("common", () => {
52
+ let e = E(!0), t = E(250), n = E({
53
+ appName: VITE_APP_NAME,
54
+ version: ""
55
+ });
56
+ N(() => n.value.appName, (e) => {
57
+ e && (document.title = e);
58
+ });
59
+ function r() {
60
+ Ue().then((e) => {
61
+ n.value = e;
62
+ }).catch((e) => {
63
+ console.log(`${VITE_APP_NAME} 获取应用信息失败`, e);
64
+ });
65
+ }
66
+ let i = E(!0), a = null;
67
+ function o() {
68
+ a !== null && (clearTimeout(a), a = null), i.value = !1, a = setTimeout(() => {
69
+ i.value = !0;
70
+ }, 9e5);
71
+ }
72
+ return {
73
+ appInfo: n,
74
+ drawerOpen: e,
75
+ drawerSize: t,
76
+ getAppInfo: r,
77
+ isRequestSleep: i,
78
+ requestActive: o
79
+ };
80
+ }, { persist: { pick: ["drawerOpen", "drawerSize"] } }), B = I("recentRouters", () => {
81
+ let e = E([]), t = L(), n = R();
82
+ function r() {
83
+ e.value = e.value.filter((e) => n.hasRoute(e.name));
84
+ }
85
+ function i(t, n) {
86
+ let r = F(n), i = e.value.findIndex((e) => e.name === r.name || X(e.name).meta.title === X(r.name).meta.title);
87
+ if (delete r.query._fromLeftTree, i === -1) {
88
+ let n = e.value.findIndex((e) => e.name === t);
89
+ n === -1 ? e.value.push(r) : e.value.splice(n + 1, 0, r);
90
+ } else e.value[i] = r;
91
+ }
92
+ function a(t) {
93
+ let n = e.value.findIndex((e) => e.name === t);
94
+ n !== -1 && e.value.splice(n, 1);
95
+ }
96
+ function o(r) {
97
+ if (t.name === r) {
98
+ let t = e.value.findIndex((e) => e.name === r), i = e.value[t - 1];
99
+ i === void 0 ? n.push(e.value[t + 1]) : n.push(i);
100
+ }
101
+ a(r);
102
+ }
103
+ function s() {
104
+ e.value = [];
105
+ }
106
+ return {
107
+ add: i,
108
+ clear: s,
109
+ close: o,
110
+ init: r,
111
+ recentRouters: e,
112
+ remove: a
113
+ };
114
+ }, { persist: { pick: ["recentRouters"] } });
115
+ //#endregion
116
+ //#region ../../packages/dlzn-ui/store/modules/router.ts
117
+ function We() {
118
+ return Z.Get("getRouters", { meta: {
119
+ useFailMsg: "获取用户路由失败",
120
+ useLoading: "正在获取用户路由..."
121
+ } });
122
+ }
123
+ function Ge(e) {
124
+ return e.children !== void 0 || e.component !== void 0;
125
+ }
126
+ function Ke(e) {
127
+ let t = [];
128
+ return e.forEach((e) => {
129
+ e.path === "/" ? t.push({
130
+ ...e.children[0],
131
+ hidden: e.hidden
132
+ }) : t.push(e);
133
+ }), t;
134
+ }
135
+ function qe(e) {
136
+ let t = (e, n) => {
137
+ let r = [];
138
+ return e.forEach((e) => {
139
+ let i = {
140
+ meta: {
141
+ fullScreen: e.meta?.fullScreen ?? (typeof e.component == "string" && e.component.split("___")[1] === "0"),
142
+ hidden: e.hidden ?? e.meta?.hidden ?? !1,
143
+ icon: e.meta?.icon === "#" ? "" : e.meta?.icon ?? "",
144
+ noCache: e.meta?.noCache ?? !1,
145
+ parentName: n?.name ?? "",
146
+ title: e.meta?.title ?? ""
147
+ },
148
+ name: e.name,
149
+ path: e.path.startsWith("/") && n !== null ? e.path.slice(1) : e.path
150
+ };
151
+ if (e.children !== void 0) {
152
+ let n = t(e.children, i);
153
+ if (n.length > 0) {
154
+ i.children = n;
155
+ let e = n.find((e) => !e.meta.hidden);
156
+ e !== void 0 && (i.redirect = { name: e.name });
157
+ }
158
+ }
159
+ e.component !== void 0 && !["Layout", "ParentView"].includes(e.component) && (i.component = Qe(e)), Ge(i) && r.push(i);
160
+ }), r;
161
+ }, n = vt();
162
+ return n.children.push(...e), t([n], null);
163
+ }
164
+ function Je(e) {
165
+ let t = (e) => {
166
+ let n = [...e], r = n.length;
167
+ for (let e = r - 1; e >= 0; e--) {
168
+ let r = n[e];
169
+ r.children !== void 0 && (r.redirect === void 0 ? (r.children.forEach((r) => {
170
+ n.splice(e + 1, 0, ...t([r]));
171
+ }), delete r.children) : r.children = t(r.children));
172
+ }
173
+ return n;
174
+ };
175
+ return t(e);
176
+ }
177
+ var Ye = Ve.viewsEntryLazyImport, Xe = [];
178
+ function Ze(e) {
179
+ return `/src/views/${e.split("___")[0]}.vue`;
180
+ }
181
+ function Qe(e) {
182
+ if (typeof e.component == "function" || typeof e.component == "string") {
183
+ let t = e.component, n = typeof t == "string" ? Ye[Ze(t)] : t;
184
+ if (n === void 0) {
185
+ let e = `路由组件${Ze(t)}不存在`;
186
+ return console.error(e), a["./NotFound.vue"];
187
+ }
188
+ return typeof t == "string" && Xe.push(Ze(t)), () => n().then((t) => ({
189
+ ...t.default,
190
+ name: e.name
191
+ }));
192
+ }
193
+ return e.component;
194
+ }
195
+ var V = I("router", () => {
196
+ let e = E([]), t = R(), n = Q();
197
+ async function r() {
198
+ let r = await We();
199
+ Xe.length = 0, e.value = fe(Je(qe(Ke(r)))), n.isAdmin && Object.keys(Ye).forEach((e) => {
200
+ if (!Xe.includes(e)) {
201
+ let t = `${e} 页面对应的路由不存在`;
202
+ console.error(t);
203
+ }
204
+ }), t.hasRoute("Index") && t.removeRoute("Index"), e.value.forEach((e) => {
205
+ t.addRoute(e);
206
+ }), B().init();
207
+ }
208
+ function i() {
209
+ e.value.forEach((e) => {
210
+ t.removeRoute(e.name);
211
+ }), e.value = [];
212
+ }
213
+ return {
214
+ clear: i,
215
+ getRouters: r,
216
+ routersRaw: e
217
+ };
218
+ }), $e = { class: "ml-2! flex items-center" }, et = /*#__PURE__*/ u(/* @__PURE__ */ w({
219
+ __name: "Aside",
220
+ setup(e) {
221
+ let t = L(), n = z(), r = b(() => n.appInfo.appName), i = Object.values(import.meta.glob("img/side_logo.*", {
222
+ eager: !0,
223
+ import: "default",
224
+ query: "?url"
225
+ }))[0], a = V(), o = E([]);
226
+ N(() => t.name, () => {
227
+ t.matched.map((e) => e.name).forEach((e) => {
228
+ o.value.includes(e) || o.value.push(e);
229
+ });
230
+ }, { immediate: !0 });
231
+ let s = b(() => {
232
+ let { hidden: e, parentName: n } = t.meta;
233
+ return n !== "" && e === !0 ? n : t.name;
234
+ });
235
+ return (e, t) => (T(), x(j(Me), {
236
+ expanded: o.value,
237
+ "onUpdate:expanded": t[0] ||= (e) => o.value = e,
238
+ class: "w-full!",
239
+ value: s.value
240
+ }, {
241
+ logo: P(() => [se("div", $e, [C(j(d), {
242
+ class: "logo",
243
+ src: j(i),
244
+ style: {
245
+ width: "28px",
246
+ height: "28px"
247
+ }
248
+ }, null, 8, ["src"]), C(j(l), {
249
+ "animation-speed": 8,
250
+ "class-name": "ml-2 text-xl !font-bold",
251
+ "show-border": !1,
252
+ text: r.value
253
+ }, null, 8, ["text"])])]),
254
+ default: P(() => [C(p, { model: j(a).routersRaw[0]?.children ?? [] }, null, 8, ["model"])]),
255
+ _: 1
256
+ }, 8, ["expanded", "value"]));
257
+ }
258
+ }), [["__scopeId", "data-v-2740d135"]]), tt = /* @__PURE__ */ w({
259
+ __name: "Breadcrumb",
260
+ setup(e, { expose: t }) {
261
+ let n = L(), r = R(), i = B(), a = b(() => {
262
+ let e = n.matched.map((e) => ({
263
+ name: e.name,
264
+ title: e.meta.title
265
+ }));
266
+ return e.length < 3 ? [] : e.slice(1).map((e) => ({
267
+ ...e,
268
+ disabled: !i.recentRouters.some((t) => t.name === e.name) || n.name === e.name
269
+ }));
270
+ });
271
+ function o(e) {
272
+ r.push(i.recentRouters.find((t) => t.name === e));
273
+ }
274
+ return t({ items: a }), (e, t) => a.value.length > 0 ? (T(), x(j(Ce), {
275
+ key: 0,
276
+ class: "absolute top-px z-10 py-1!"
277
+ }, {
278
+ default: P(() => [(T(!0), oe(y, null, D(a.value, (e) => (T(), x(j(we), {
279
+ key: e.name,
280
+ disabled: e.disabled,
281
+ onClick: (t) => o(e.name)
282
+ }, {
283
+ default: P(() => [S(A(e.title), 1)]),
284
+ _: 2
285
+ }, 1032, ["disabled", "onClick"]))), 128))]),
286
+ _: 1
287
+ })) : ae("v-if", !0);
288
+ }
289
+ }), H = /* @__PURE__ */ new Map();
290
+ function nt(e) {
291
+ let t = Z.Get(`system/dict/data/types/${e.join(",")}`, { meta: { useLoading: !1 } }).then((e) => e.map((e) => ({
292
+ cssClass: e.cssClass,
293
+ dictType: e.dictType,
294
+ label: e.dictLabel,
295
+ remark: e.remark,
296
+ value: e.dictValue
297
+ })));
298
+ e.forEach((e) => {
299
+ H.set(e, t.then((t) => t.filter((t) => t.dictType === e)));
300
+ });
301
+ }
302
+ var U = [];
303
+ function rt(e) {
304
+ return U.includes(e) || U.push(e), new Promise((t) => {
305
+ setTimeout(() => {
306
+ let n = U.filter((e) => !H.has(e));
307
+ n.length > 0 && nt(n), U.length = 0, H.get(e).then((e) => {
308
+ t(e);
309
+ });
310
+ });
311
+ });
312
+ }
313
+ var W = /* @__PURE__ */ new Map();
314
+ function it() {
315
+ U.length = 0, H.clear(), W.clear();
316
+ }
317
+ function at(e, t) {
318
+ let n = ot(e);
319
+ return b(() => {
320
+ if (t === void 0) return n.value.map((e) => e.label);
321
+ if (Array.isArray(t)) return n.value.length === 0 ? [] : t.map((e) => n.value.find((t) => String(t.value) === String(e))?.label ?? v(e));
322
+ if (n.value.length === 0) return "";
323
+ if (typeof t == "string") {
324
+ let e = t.split(",").filter(Boolean);
325
+ if (e.length > 0) return e.map((e) => n.value.find((t) => String(t.value) === e)?.label ?? e).join(",");
326
+ }
327
+ return n.value.find((e) => String(e.value) === String(t))?.label ?? v(t);
328
+ });
329
+ }
330
+ function ot(e, t) {
331
+ let n;
332
+ return W.has(e) ? n = W.get(e) : (n = E([]), W.set(e, n), rt(e).then((e) => {
333
+ n.value = e;
334
+ })), b(() => n.value.filter((e) => t === void 0 || t.includes(e.value)));
335
+ }
336
+ function st(e) {
337
+ H.delete(e), W.has(e) && rt(e).then((t) => {
338
+ W.get(e).value = t;
339
+ });
340
+ }
341
+ //#endregion
342
+ //#region ../../packages/dlzn-ui/hooks/useSysUser/index.ts
343
+ var G = /* @__PURE__ */ new Map();
344
+ function ct(e) {
345
+ let t = Z.Post("system/user/listByIds", { userIds: e }, { meta: { useLoading: !1 } }).then((e) => e.map((e) => ({
346
+ ...e,
347
+ label: e.userName,
348
+ value: e.userId
349
+ })));
350
+ e.forEach((e) => {
351
+ G.set(e, t.then((t) => t.find((t) => t.value === e)));
352
+ });
353
+ }
354
+ var K = [];
355
+ function lt(e) {
356
+ return K.includes(e) || K.push(e), new Promise((t) => {
357
+ setTimeout(() => {
358
+ let n = K.filter((e) => !G.has(e));
359
+ n.length > 0 && ct(n), K.length = 0, G.get(e).then((e) => {
360
+ t(e);
361
+ });
362
+ });
363
+ });
364
+ }
365
+ var q = /* @__PURE__ */ new Map();
366
+ function ut() {
367
+ K.length = 0, G.clear(), q.clear();
368
+ }
369
+ function dt(e) {
370
+ G.delete(e), q.has(e) && lt(e).then((t) => {
371
+ q.get(e).value = t;
372
+ });
373
+ }
374
+ function ft(e) {
375
+ let t;
376
+ return q.has(e) ? t = q.get(e) : (t = E(null), q.set(e, t), lt(e).then((e) => {
377
+ t.value = e;
378
+ })), t;
379
+ }
380
+ //#endregion
381
+ //#region ../../packages/dlzn-ui/store/modules/login.ts
382
+ function pt(e) {
383
+ return Z.Post("login", e, { meta: {
384
+ useLoading: "登录中...",
385
+ useToken: !1
386
+ } });
387
+ }
388
+ function mt() {
389
+ return Z.Post("logout", void 0, { meta: {
390
+ useLoading: "退出登录中...",
391
+ useSuccessMsg: !0
392
+ } });
393
+ }
394
+ var J = I("login", () => {
395
+ let e = E(""), t = L(), n = R();
396
+ async function r(t) {
397
+ let n = await pt(t);
398
+ e.value = n.token, await Q().getUserInfo();
399
+ }
400
+ function i() {
401
+ e.value = "", c().clear(), V().clear(), Q().clear(), it(), ut(), te();
402
+ }
403
+ N(() => t.name, () => {
404
+ t.name === "Login" && i();
405
+ });
406
+ async function a() {
407
+ await mt(), await n.push({ name: "Login" }), i();
408
+ }
409
+ return {
410
+ login: r,
411
+ logout: a,
412
+ token: e
413
+ };
414
+ }, { persist: { pick: ["token"] } }), ht = { class: "flex items-center justify-between" }, gt = /*#__PURE__*/ u(/* @__PURE__ */ w({
415
+ __name: "Header",
416
+ setup(e) {
417
+ let t = L(), n = R(), r = Q(), i = z(), a = B();
418
+ function o(e) {
419
+ n.push(a.recentRouters.find((t) => t.name === e));
420
+ }
421
+ function c(e) {
422
+ a.close(e);
423
+ }
424
+ let l = async (e) => {
425
+ let { value: t } = e;
426
+ t === "profile" ? n.push({ name: "Profile" }) : t === "logout" && (await g("确定要退出登录吗?"), J().logout());
427
+ }, u = s.isMd;
428
+ function d(e, r) {
429
+ let i = [], o = a.recentRouters, s = o.findIndex((e) => e.name === r), l = o.findIndex((e) => e.name === t.name), u = o[s];
430
+ a.recentRouters.length > 1 && i.push({
431
+ content: "关闭",
432
+ onClick: () => c(r)
433
+ }, {
434
+ content: "关闭其他",
435
+ onClick: () => {
436
+ l !== s && n.push(u), a.recentRouters = [u];
437
+ }
438
+ }), s > 0 && i.push({
439
+ content: "关闭左侧",
440
+ onClick: () => {
441
+ l < s && n.push(u), a.recentRouters = a.recentRouters.slice(s);
442
+ }
443
+ }), s < a.recentRouters.length - 1 && i.push({
444
+ content: "关闭右侧",
445
+ onClick: () => {
446
+ l > s && n.push(u), a.recentRouters = a.recentRouters.slice(0, s + 1);
447
+ }
448
+ }), m(e, i);
449
+ }
450
+ return (e, n) => (T(), x(j(Ae), { class: "border-b border-b-(--td-border-level-2-color)" }, {
451
+ default: P(() => [C(j(ke), {
452
+ "expand-type": "popup",
453
+ value: j(t).name,
454
+ onChange: o
455
+ }, {
456
+ logo: P(() => [C(j($), {
457
+ class: "ml-0! shrink-0",
458
+ shape: "circle",
459
+ size: "large",
460
+ variant: "text",
461
+ onClick: n[0] ||= (e) => j(i).drawerOpen = !j(i).drawerOpen
462
+ }, {
463
+ default: P(() => [C(j(f), { icon: "lineicons:menu-hamburger-1" })]),
464
+ _: 1
465
+ })]),
466
+ operations: P(() => [C(j(Oe), {
467
+ options: [{
468
+ content: "个人中心",
469
+ value: "profile"
470
+ }, {
471
+ content: "退出登录",
472
+ value: "logout"
473
+ }],
474
+ placement: "bottom",
475
+ trigger: "click",
476
+ onClick: l
477
+ }, {
478
+ default: P(() => [j(u) ? (T(), x(j($), {
479
+ key: 0,
480
+ shape: "square",
481
+ variant: "text"
482
+ }, {
483
+ icon: P(() => [C(j(f), { icon: "material-symbols:account-circle" })]),
484
+ _: 1
485
+ })) : (T(), x(j($), {
486
+ key: 1,
487
+ variant: "text"
488
+ }, {
489
+ icon: P(() => [C(j(f), {
490
+ class: "mr-2!",
491
+ icon: "material-symbols:account-circle"
492
+ })]),
493
+ suffix: P(() => [C(j(f), {
494
+ icon: "icon-park-outline:down",
495
+ size: "18"
496
+ })]),
497
+ default: P(() => [S(" " + A(j(r).userInfo.userName) + " ", 1)]),
498
+ _: 1
499
+ }))]),
500
+ _: 1
501
+ })]),
502
+ default: P(() => [(T(!0), oe(y, null, D(j(a).recentRouters, (e) => (T(), x(j(Ne), {
503
+ key: e.name,
504
+ value: e.name,
505
+ onContextmenu: (t) => d(t, e.name)
506
+ }, {
507
+ default: P(() => [se("div", ht, [se("span", null, A(j(X)(e.name).meta.title), 1), j(a).recentRouters.length > 1 ? (T(), x(j($), {
508
+ key: 0,
509
+ class: "ml-1!",
510
+ shape: "square",
511
+ size: "small",
512
+ variant: "text",
513
+ onClick: be((t) => c(e.name), ["stop"])
514
+ }, {
515
+ icon: P(() => [C(j(f), {
516
+ icon: "material-symbols:close",
517
+ style: { "font-size": "12px !important" }
518
+ })]),
519
+ _: 1
520
+ }, 8, ["onClick"])) : ae("v-if", !0)])]),
521
+ _: 2
522
+ }, 1032, ["value", "onContextmenu"]))), 128))]),
523
+ _: 1
524
+ }, 8, ["value"])]),
525
+ _: 1
526
+ }));
527
+ }
528
+ }), [["__scopeId", "data-v-cdf58b1a"]]), _t = /*#__PURE__*/ u(/* @__PURE__ */ w({
529
+ __name: "Index",
530
+ setup(e) {
531
+ let t = L(), n = z(), r = B(), i = c(), a = b(() => r.recentRouters.filter((e) => X(e.name).meta.noCache === !1).map((e) => e.name)), l = M("breadcrumb"), u = b(() => (l.value?.items.length ?? 0) > 0), d = b(() => s.isMd.value ? { "p-2": !0 } : { "p-3": !0 }), f = s.isMd, p = M("contentRef"), { height: m } = xe(p);
532
+ function h({ size: e }) {
533
+ n.drawerSize = e;
534
+ }
535
+ let g = b(() => t.meta.fullScreen);
536
+ return (e, t) => {
537
+ let r = O("RouterView");
538
+ return g.value ? (T(), x(r, { key: 0 }, {
539
+ default: P(({ Component: e }) => [(T(), x(k(e)))]),
540
+ _: 1
541
+ })) : (T(), x(j(je), {
542
+ key: 1,
543
+ class: "h-full"
544
+ }, {
545
+ default: P(() => [
546
+ C(gt),
547
+ C(j(De), {
548
+ visible: j(n).drawerOpen,
549
+ "onUpdate:visible": t[0] ||= (e) => j(n).drawerOpen = e,
550
+ footer: !1,
551
+ mode: j(f) ? "overlay" : "push",
552
+ placement: "left",
553
+ "show-overlay": j(f),
554
+ size: j(f) ? "200px" : `${j(n).drawerSize}px`,
555
+ "size-draggable": {
556
+ max: 450,
557
+ min: 180
558
+ },
559
+ onSizeDragEnd: h
560
+ }, {
561
+ default: P(() => [C(et, { class: "no_drawer_body_padding" })]),
562
+ _: 1
563
+ }, 8, [
564
+ "visible",
565
+ "mode",
566
+ "show-overlay",
567
+ "size"
568
+ ]),
569
+ C(j(Ee), {
570
+ ref_key: "contentRef",
571
+ ref: p,
572
+ class: "overflow-hidden"
573
+ }, {
574
+ default: P(() => [C(j(o), {
575
+ always: "",
576
+ "view-class": ge(["relative flex flex-col", {
577
+ ...d.value,
578
+ "pt-8": u.value
579
+ }]),
580
+ "view-style": {
581
+ minWidth: "1200px",
582
+ minHeight: `${Math.max(j(m), 438)}px`
583
+ }
584
+ }, {
585
+ default: P(() => [C(tt, { ref: "breadcrumb" }, null, 512), C(r, null, {
586
+ default: P(({ Component: e }) => [(T(), x(ie, {
587
+ exclude: j(i).excludeKPname,
588
+ include: a.value
589
+ }, [(T(), x(k(e), { class: "flex-auto" }))], 1032, ["exclude", "include"]))]),
590
+ _: 1
591
+ })]),
592
+ _: 1
593
+ }, 8, ["view-class", "view-style"])]),
594
+ _: 1
595
+ }, 512)
596
+ ]),
597
+ _: 1
598
+ }));
599
+ };
600
+ }
601
+ }), [["__scopeId", "data-v-0f5b5eef"]]);
602
+ //#endregion
603
+ //#region ../../packages/dlzn-ui/router/index.ts
604
+ function vt() {
605
+ return {
606
+ children: [{
607
+ children: [{
608
+ component: a["./profile/Index.vue"],
609
+ meta: {
610
+ fullScreen: !1,
611
+ hidden: !0,
612
+ icon: "",
613
+ noCache: !1,
614
+ parentName: "",
615
+ title: "个人中心"
616
+ },
617
+ name: "Profile",
618
+ path: "profile"
619
+ }],
620
+ component: a["./Home.vue"],
621
+ meta: {
622
+ fullScreen: !1,
623
+ hidden: !1,
624
+ icon: "streamline-flex-color:home-2-flat",
625
+ noCache: !1,
626
+ parentName: "",
627
+ title: "首页"
628
+ },
629
+ name: "Home",
630
+ path: "home"
631
+ }],
632
+ component: _t,
633
+ name: "Index",
634
+ path: "/"
635
+ };
636
+ }
637
+ var Y = Fe({
638
+ history: Ie(VITE_BASE_URL),
639
+ routes: [
640
+ vt(),
641
+ {
642
+ component: a["./Login.vue"],
643
+ meta: {
644
+ fullScreen: !1,
645
+ hidden: !0,
646
+ icon: "",
647
+ noCache: !1,
648
+ parentName: "",
649
+ title: "登录"
650
+ },
651
+ name: "Login",
652
+ path: "/login"
653
+ },
654
+ {
655
+ component: a["./NotFound.vue"],
656
+ meta: {
657
+ fullScreen: !1,
658
+ hidden: !0,
659
+ icon: "",
660
+ noCache: !1,
661
+ parentName: "",
662
+ title: "404"
663
+ },
664
+ name: "NotFound",
665
+ path: "/:pathMatch(.*)*"
666
+ }
667
+ ],
668
+ sensitive: !0,
669
+ strict: !0
670
+ });
671
+ Y.beforeEach(async (e) => {
672
+ if (e.query._fromLeftTree === "true" && c().add(e.name), e.name !== "Login") return J().token === "" ? { name: "Login" } : V().routersRaw.length > 0 ? void 0 : (await Q().getUserInfo(), Y.resolve({
673
+ path: e.path,
674
+ query: e.query
675
+ }));
676
+ }), Y.afterEach((e, t, n) => {
677
+ h.closeAll(), ne.closeAll();
678
+ let { meta: r, name: i } = e, { fullScreen: a, parentName: o, title: s } = r;
679
+ document.title = s || z().appInfo.appName;
680
+ let l = B();
681
+ if (!["Login", "NotFound"].includes(i) && !a) {
682
+ let n = o === t.name || e.query._fromLeftTree !== "true" ? t.name : void 0;
683
+ l.add(n, {
684
+ name: i,
685
+ query: e.query
686
+ });
687
+ }
688
+ c().remove(i);
689
+ });
690
+ function X(e) {
691
+ if (Y.hasRoute(e)) return Y.getRoutes().find((t) => t.name === e);
692
+ }
693
+ //#endregion
694
+ //#region ../../packages/dlzn-ui/plugins/autoImport/$alova/index.ts
695
+ var yt = 15e3, bt = "网络错误,请稍后再试";
696
+ function xt(e, t = !0) {
697
+ let n = {};
698
+ return Object.keys(e).forEach((r) => {
699
+ (!t || (Array.isArray(e[r]) ? e[r].length > 0 : !_(e[r]))) && (n[r] = e[r]);
700
+ }), n;
701
+ }
702
+ function St(e, t = !0) {
703
+ return new URLSearchParams(xt(e, t)).toString();
704
+ }
705
+ var Z = Le({
706
+ baseURL: VITE_BASE_URL,
707
+ beforeRequest(e) {
708
+ e.config.credentials = e.config.credentials ?? "omit";
709
+ let [n, ...r] = VITE_API_PREFIX_ARRAY;
710
+ !e.url.startsWith("http") && !r.some((t) => Be.join("/", e.url).startsWith(Be.join("/", t, "/"))) && (e.url = Be.join(n, e.url)), e.meta = {
711
+ use600Alert: !0,
712
+ useDataResult: !0,
713
+ useDownload: !1,
714
+ useEmptyData: !1,
715
+ useEmptyParams: !0,
716
+ useFailMsg: !0,
717
+ useFormData: !1,
718
+ useInPolling: !1,
719
+ useLoading: !0,
720
+ useResponseBlob: !1,
721
+ useResponseText: !1,
722
+ useSuccessMsg: !1,
723
+ useSysFailMsg: !0,
724
+ useToken: !0,
725
+ ...e.meta ?? {}
726
+ };
727
+ let i = J(), { useEmptyData: a, useEmptyParams: o, useFormData: s, useInPolling: c, useLoading: l, useResponseBlob: u, useToken: d } = e.meta;
728
+ c || z().requestActive(), d && (i.token ? e.config.headers.Authorization = i.token : e.abort()), l !== !1 && t.show(l === !0 ? void 0 : l);
729
+ let f = e.config.params;
730
+ if (typeof f != "string" && (e.config.params = St(f, o)), a && Pe(e.data)) {
731
+ let t = {}, n = e.data;
732
+ Object.keys(n).forEach((e) => {
733
+ _(n[e]) || (t[e] = n[e]);
734
+ }), e.data = t;
735
+ }
736
+ if (s) {
737
+ let t = new FormData();
738
+ Object.keys(e.data).forEach((n) => {
739
+ t.append(n, e.data[n]);
740
+ }), e.data = t;
741
+ }
742
+ e.config.timeout === yt && (s || e.data instanceof FormData || u) && (e.config.timeout = 0);
743
+ },
744
+ cacheFor: null,
745
+ requestAdapter: Re(),
746
+ responded: {
747
+ onComplete: (e) => {
748
+ e.meta.useLoading !== !1 && t.hide();
749
+ },
750
+ onError: async (e, t) => {
751
+ let { useSysFailMsg: n } = t.meta;
752
+ if (e instanceof Error) {
753
+ let { message: t } = e;
754
+ if (t.toLowerCase().includes("abort")) return Promise.reject(e);
755
+ if (t.toLowerCase().includes("timeout")) return n && i.error("请求超时"), Promise.reject(e);
756
+ }
757
+ return n && i.error(bt), Promise.reject(e);
758
+ },
759
+ onSuccess: async (t, n) => {
760
+ if (typeof t == "string") return t;
761
+ let { useDataResult: r, useDownload: a, useFailMsg: o, useResponseBlob: s, useResponseText: c, useSuccessMsg: l, useSysFailMsg: u, useToken: d } = n.meta, { headers: f, ok: p, status: m } = t;
762
+ if (p === !1) {
763
+ if (u) {
764
+ let e = {
765
+ 403: "当前操作没有权限",
766
+ 404: "访问资源不存在",
767
+ 500: "服务不可用,请稍后再试或联系管理员!"
768
+ }[m] ?? bt;
769
+ i.error(e);
770
+ }
771
+ return Promise.reject(t);
772
+ }
773
+ if (s && !f.get("content-type")?.includes("application/json")) {
774
+ let n;
775
+ try {
776
+ n = await t.blob();
777
+ } catch (t) {
778
+ return e.error("返回的 response 不能被blob() 方法所解析"), Promise.reject(t);
779
+ }
780
+ if (a !== !1) {
781
+ if (typeof a == "string") ee(n, a);
782
+ else {
783
+ let r = new URLSearchParams((t.headers.get("content-disposition") ?? "").replace(/;\s*/g, "&")).get("filename");
784
+ r ? ee(n, r) : e.error("返回的 response header 没有文件名");
785
+ }
786
+ }
787
+ return n;
788
+ }
789
+ if (c && !f.get("content-type")?.includes("application/json")) {
790
+ let n;
791
+ try {
792
+ n = await t.text();
793
+ } catch (t) {
794
+ return e.error("返回的 response text() 方法所解析"), Promise.reject(t);
795
+ }
796
+ return n;
797
+ }
798
+ let h;
799
+ try {
800
+ h = await t.json();
801
+ } catch (t) {
802
+ return e.error("返回的 response 不能被json() 方法所解析"), Promise.reject(t);
803
+ }
804
+ if (h?.code !== void 0) {
805
+ let { code: e, data: t, msg: n } = h;
806
+ if (e >= 400) {
807
+ if (e === 600) {
808
+ if (!s) return h;
809
+ } else e === 401 && d ? Y.push({ name: "Login" }) : o !== !1 && i.error(o === !0 ? n : o);
810
+ return Promise.reject(h);
811
+ }
812
+ {
813
+ let a = Ve.alovaResCodeSuccessCb?.({
814
+ code: e,
815
+ data: t,
816
+ msg: n
817
+ });
818
+ return a === void 0 ? (l && i(n), r ? t === void 0 ? h : t : h) : a;
819
+ }
820
+ }
821
+ return h;
822
+ }
823
+ },
824
+ shareRequest: !1,
825
+ statesHook: ze,
826
+ timeout: yt
827
+ }), Ct = /* @__PURE__ */ w({
828
+ __name: "ResetPwd",
829
+ props: { showFooter: {
830
+ type: Boolean,
831
+ default: !0
832
+ } },
833
+ setup(e, { expose: t }) {
834
+ let i = L(), a = [
835
+ {
836
+ _label: "旧密码",
837
+ _required: !0,
838
+ component: "TInput",
839
+ model: "oldPassword",
840
+ type: "password"
841
+ },
842
+ {
843
+ _label: "新密码",
844
+ _required: !0,
845
+ _rules: [{
846
+ message: r,
847
+ pattern: n
848
+ }],
849
+ component: "TInput",
850
+ model: "newPassword",
851
+ type: "password"
852
+ },
853
+ {
854
+ __others: ({ formData: e }) => ({ _rules: [{ validator: (t) => t === e.newPassword || {
855
+ message: "两次输入的密码不一致",
856
+ result: !1
857
+ } }] }),
858
+ _label: "确认密码",
859
+ _required: !0,
860
+ component: "TInput",
861
+ model: "confirmPassword",
862
+ type: "password"
863
+ },
864
+ ...e.showFooter ? [{ slot: "footer" }] : []
865
+ ], o = M("form");
866
+ function s() {
867
+ B().close(i.name);
868
+ }
869
+ async function c() {
870
+ let e = await o.value.validate();
871
+ await Z.Put("system/user/profile/updatePwd", void 0, {
872
+ meta: {
873
+ useLoading: "保存中...",
874
+ useSuccessMsg: !0
875
+ },
876
+ params: {
877
+ newPassword: e.newPassword,
878
+ oldPassword: e.oldPassword
879
+ }
880
+ }), J().logout();
881
+ }
882
+ return t({ handleSubmit: c }), (e, t) => {
883
+ let n = O("TButton"), r = O("TForm");
884
+ return T(), x(r, {
885
+ ref: "form",
886
+ items: a,
887
+ "label-align": "right",
888
+ layout: "vertical"
889
+ }, {
890
+ footer: P(() => [C(n, { onClick: c }, {
891
+ default: P(() => [...t[0] ||= [S("保存", -1)]]),
892
+ _: 1
893
+ }), C(n, {
894
+ class: "ml-4!",
895
+ theme: "default",
896
+ onClick: s
897
+ }, {
898
+ default: P(() => [...t[1] ||= [S("关闭", -1)]]),
899
+ _: 1
900
+ })]),
901
+ _: 1
902
+ }, 512);
903
+ };
904
+ }
905
+ });
906
+ //#endregion
907
+ //#region ../../packages/dlzn-ui/store/modules/user.ts
908
+ function wt() {
909
+ return Z.Get("getInfo", { meta: {
910
+ useFailMsg: "获取用户信息失败",
911
+ useLoading: "正在获取用户信息..."
912
+ } });
913
+ }
914
+ var Tt = {
915
+ admin: !1,
916
+ dept: { deptName: "" },
917
+ needChangePwd: 0,
918
+ nickName: "",
919
+ userId: "",
920
+ userName: ""
921
+ }, Q = I("user", () => {
922
+ let e = E(F(Tt)), t = E([]), n = E([]);
923
+ function r() {
924
+ e.value = F(Tt), t.value = [], n.value = [];
925
+ }
926
+ let i = b(() => e.value.admin), a = E("");
927
+ async function o(r = !0) {
928
+ let i = await wt();
929
+ e.value = i.user, a.value !== e.value.userId && B().clear(), a.value = e.value.userId, t.value = i.permissions, n.value = i.roles, r && await V().getRouters();
930
+ }
931
+ N(() => e.value.needChangePwd, (e) => {
932
+ e === 1 && VITE_FORCE_PWD_CHANGE && he(() => {
933
+ let e = E(null);
934
+ g({
935
+ body: () => de(Ct, {
936
+ labelAlign: "top",
937
+ ref: e,
938
+ showFooter: !1
939
+ }),
940
+ cancelBtn: null,
941
+ closeBtn: !1,
942
+ closeWhenCloseAll: !1,
943
+ header: "请修改密码",
944
+ onConfirmCallback: async () => {
945
+ await e.value.handleSubmit();
946
+ },
947
+ width: 430
948
+ });
949
+ });
950
+ }, { immediate: !0 });
951
+ function s(e) {
952
+ if (e === void 0) return !0;
953
+ let n = Array.isArray(e) ? e : [e];
954
+ return t.value.some((e) => e === "*:*:*" || n.includes(e));
955
+ }
956
+ return {
957
+ checkPermissions: s,
958
+ clear: r,
959
+ getUserInfo: o,
960
+ isAdmin: i,
961
+ lastUserId: a,
962
+ permissions: t,
963
+ roles: n,
964
+ userInfo: e
965
+ };
966
+ }, { persist: { pick: ["lastUserId"] } }), $ = /*#__PURE__*/ u(/* @__PURE__ */ w({
967
+ inheritAttrs: !1,
968
+ name: "TButton",
969
+ __name: "button",
970
+ props: /*@__PURE__*/ pe({
971
+ autoIcon: { type: Boolean },
972
+ autoLoading: { type: Boolean },
973
+ autoTheme: { type: Boolean },
974
+ icon: {},
975
+ permission: {},
976
+ popconfirm: {},
977
+ block: { type: Boolean },
978
+ default: {},
979
+ disabled: { type: Boolean },
980
+ form: {},
981
+ ghost: { type: Boolean },
982
+ href: {},
983
+ loading: { type: Boolean },
984
+ loadingProps: {},
985
+ shape: {},
986
+ size: {},
987
+ suffix: {},
988
+ tag: {},
989
+ theme: {},
990
+ type: {},
991
+ variant: {},
992
+ onClick: { type: Function },
993
+ class: { type: [
994
+ Boolean,
995
+ null,
996
+ String,
997
+ Object,
998
+ Array
999
+ ] },
1000
+ style: { type: [
1001
+ Boolean,
1002
+ null,
1003
+ String,
1004
+ Object,
1005
+ Array
1006
+ ] }
1007
+ }, He),
1008
+ setup(e) {
1009
+ let n = e, r = E("");
1010
+ function i() {
1011
+ if (!n.autoTheme || r.value.trim() === "") return {};
1012
+ let e = /* @__PURE__ */ new Map([
1013
+ [{ theme: "danger" }, ["删除", "清除"]],
1014
+ [{
1015
+ theme: "primary",
1016
+ variant: "outline"
1017
+ }, [
1018
+ "上传",
1019
+ "导入",
1020
+ "导出",
1021
+ "下载"
1022
+ ]],
1023
+ [{ theme: "warning" }, ["预警"]]
1024
+ ]), t = {};
1025
+ for (let [n, i] of e) if (i.some((e) => r.value.includes(e))) {
1026
+ t = n;
1027
+ break;
1028
+ }
1029
+ return t;
1030
+ }
1031
+ let a = E(!1), o = t.isLoading, s = E(null), { focused: c } = Se(s), l, u;
1032
+ N(o, (e) => {
1033
+ e ? (clearTimeout(u), u = void 0, l = setTimeout(() => {
1034
+ a.value = c.value, clearTimeout(l), l = void 0;
1035
+ }, 150)) : l === void 0 ? u = setTimeout(() => {
1036
+ a.value = !1;
1037
+ }, 150) : (clearTimeout(l), l = void 0, a.value = !1);
1038
+ }, { immediate: !0 }), N(c, (e) => {
1039
+ e && o.value && (a.value = !0);
1040
+ });
1041
+ let d = b(() => n.loading === void 0 ? n.autoLoading ? a.value : !1 : n.loading), p = b(() => {
1042
+ let e = {
1043
+ ...n,
1044
+ ...i(),
1045
+ loading: d.value
1046
+ };
1047
+ return Object.keys(e).forEach((t) => {
1048
+ e[t] === void 0 && delete e[t];
1049
+ }), delete e.permission, delete e.popconfirm, delete e.autoIcon, delete e.autoLoading, delete e.autoTheme, delete e.icon, e;
1050
+ }), m = Te, h = le();
1051
+ function g(e) {
1052
+ let t = e ?? {};
1053
+ h.exposed = t, s.value = t.$el;
1054
+ }
1055
+ function _() {
1056
+ r.value = s.value?.textContent ?? "";
1057
+ }
1058
+ let v = b(() => {
1059
+ if (!n.autoIcon || r.value.trim() === "") return;
1060
+ let e = {
1061
+ "mdi:plus": [
1062
+ "新增",
1063
+ "添加",
1064
+ "加入"
1065
+ ],
1066
+ "mdi:cancel": ["取消"],
1067
+ "mdi:remove": ["清除"],
1068
+ "entypo:switch": ["开启"],
1069
+ "material-symbols:pause": ["暂停"],
1070
+ "ri:edit-line": ["编辑"],
1071
+ "uil:edit": ["修改"],
1072
+ "boxicons:send": ["发送"],
1073
+ "carbon:executable-program": ["执行"],
1074
+ "ri:save-line": ["保存", "提交"],
1075
+ "uiw:down": ["展开"],
1076
+ "uiw:up": ["收起"],
1077
+ "mdi:close": ["关闭"],
1078
+ "ri:reset-left-fill": ["重置"],
1079
+ "tabler:refresh": [
1080
+ "刷新",
1081
+ "换一批",
1082
+ "更新"
1083
+ ],
1084
+ "tabler:restore": ["还原", "恢复"],
1085
+ "codicon:debug-rerun": ["重跑"],
1086
+ "ix:select-alt": ["选择"],
1087
+ "iconoir:search": ["查询", "搜索"],
1088
+ "material-symbols:cell-merge": ["合并"],
1089
+ "mdi:upload-outline": ["上传", "导入"],
1090
+ "carbon:inspection": ["检查"],
1091
+ "material-symbols:delete-outline": ["删除"],
1092
+ "mdi:download-outline": ["下载", "导出"],
1093
+ "ri:alert-line": ["预警"],
1094
+ "material-symbols:login": ["登录"],
1095
+ "carbon:report": ["报告"],
1096
+ "icon-park-outline:setting-config": ["配置"],
1097
+ "subway:mark-1": ["标记"],
1098
+ "tdesign:summary": ["汇总"],
1099
+ "ph:open-ai-logo": ["AI"],
1100
+ "material-symbols:comment-outline": ["评论"],
1101
+ "hugeicons:view": ["预览", "查看"],
1102
+ "majesticons:checkbox-list-detail-line": ["详情", "详细"],
1103
+ "lucide:user-round": ["角色", "用户"],
1104
+ "material-symbols:folder-outline": ["文件夹"],
1105
+ "mdi:file-outline": ["文件"],
1106
+ "bi:journal-text": ["日志"],
1107
+ "material-symbols:security": ["权限"]
1108
+ }, t;
1109
+ for (let [n, i] of Object.entries(e)) if (i.some((e) => r.value.includes(e))) {
1110
+ t = n;
1111
+ break;
1112
+ }
1113
+ if (t !== void 0) return t;
1114
+ }), ee = ye(), te = b(() => me(ee, {
1115
+ ...p.value,
1116
+ ref: g
1117
+ }, { class: "flex-shrink-0" })), ne = b(() => {
1118
+ if (n.popconfirm) return {
1119
+ ...n.popconfirm,
1120
+ onVisibleChange: (...e) => {
1121
+ n.popconfirm?.onVisibleChange?.(...e), !e[0] && (document.activeElement?.classList.contains("t-popconfirm__confirm") || document.activeElement?.classList.contains("t-popconfirm__cancel")) && (c.value = !0);
1122
+ }
1123
+ };
1124
+ });
1125
+ return (t, n) => j(Q)().checkPermissions(e.permission) ? (T(), oe(y, { key: 0 }, [ne.value ? (T(), x(re, _e(me({ key: 0 }, ne.value)), {
1126
+ default: P(() => [(T(), x(k(de(j(m), te.value)), {
1127
+ onVnodeMounted: _,
1128
+ onVnodeUpdated: _
1129
+ }, ce({ _: 2 }, [e.icon || v.value ? {
1130
+ name: "icon",
1131
+ fn: P(() => [C(f, { icon: e.icon || v.value }, null, 8, ["icon"])]),
1132
+ key: "0"
1133
+ } : void 0, D(Object.keys(t.$slots), (e) => ({
1134
+ name: e,
1135
+ fn: P((n) => [ve(t.$slots, e, _e(ue(n)), void 0, !0)])
1136
+ }))]), 1536))]),
1137
+ _: 3
1138
+ }, 16)) : (T(), x(k(de(j(m), te.value)), {
1139
+ key: 1,
1140
+ onVnodeMounted: _,
1141
+ onVnodeUpdated: _
1142
+ }, ce({ _: 2 }, [e.icon || v.value ? {
1143
+ name: "icon",
1144
+ fn: P(() => [C(f, { icon: e.icon || v.value }, null, 8, ["icon"])]),
1145
+ key: "0"
1146
+ } : void 0, D(Object.keys(t.$slots), (e) => ({
1147
+ name: e,
1148
+ fn: P((n) => [ve(t.$slots, e, _e(ue(n)), void 0, !0)])
1149
+ }))]), 1536))], 64)) : ae("v-if", !0);
1150
+ }
1151
+ }), [["__scopeId", "data-v-3c1aac41"]]);
1152
+ //#endregion
1153
+ export { We as C, He as D, z as E, et as S, B as T, it as _, Z as a, st as b, X as c, _t as d, gt as f, ft as g, dt as h, Ct as i, vt as l, ut as m, wt as n, xt as o, J as p, Q as r, St as s, $ as t, Y as u, at as v, V as w, tt as x, ot as y };