halo-pc 1.0.21 → 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. package/dist/Article-C_3LULzy.js +200 -0
  2. package/dist/{ArticleFooter-CbvmQHCn.js → ArticleFooter-Do6I1mma.js} +24 -18
  3. package/dist/{Autocomplete-BrKsj5vx.js → Autocomplete-BLOOqTTn.js} +1 -1
  4. package/dist/Autocomplete-BLrbt1wN.js +53 -0
  5. package/dist/Autocomplete-C27XN8Sp.js +54 -0
  6. package/dist/{CSharp-DGmv2biT.js → CSharp-BGn9jf2B.js} +1 -1
  7. package/dist/{Calender-dCiW7eIK.js → Calender-4bSMqUzx.js} +4 -4
  8. package/dist/Callback-BHYDtogL.js +26 -0
  9. package/dist/Cascader-D3y3WjFF.js +87 -0
  10. package/dist/Cascader-D9Y8L7X2.js +47 -0
  11. package/dist/{Checkbox-DklZD5ff.js → Checkbox-DnTLeLjt.js} +1 -1
  12. package/dist/Checkbox-dDfYBhhc.js +76 -0
  13. package/dist/{Code-DVZ9QWgE.js → Code-Af5URLnL.js} +1 -1
  14. package/dist/Code-Bi9Y45vV.js +42 -0
  15. package/dist/Code-CWsSgkJq.js +60 -0
  16. package/dist/Code-QYs-sjcG.js +4 -0
  17. package/dist/Code.vue_vue_type_style_index_0_lang-CI6sLXKy.js +65 -0
  18. package/dist/Column-wzxM_-Vp.js +74 -0
  19. package/dist/Comment-BF8L1umD.js +104 -0
  20. package/dist/Compare-CjSQcnd3.js +43 -0
  21. package/dist/Compare-Cj_CPjIV.js +63 -0
  22. package/dist/Copy-BNt-Dwoo.js +49 -0
  23. package/dist/Custom-CYPkAqpf.js +57 -0
  24. package/dist/{DataExport-DAk1d4uG.js → DataExport-CHQtRKzA.js} +1 -1
  25. package/dist/{DataExport.vue_vue_type_script_setup_true_lang-Clh4Jvxi.js → DataExport.vue_vue_type_script_setup_true_lang-Dt2BAaAO.js} +42 -37
  26. package/dist/{DataImport-BLOSIbQ2.js → DataImport-CDcmH3Du.js} +1 -1
  27. package/dist/{DataImport.vue_vue_type_script_setup_true_lang-D5J7e_59.js → DataImport.vue_vue_type_script_setup_true_lang-dULXjbl_.js} +64 -60
  28. package/dist/{Date-D1KihBir.js → Date-BStpsA7n.js} +1 -1
  29. package/dist/Date-U1py5NaK.js +43 -0
  30. package/dist/DateRange-DxAx2gxI.js +63 -0
  31. package/dist/DateTime-B3609Ct6.js +44 -0
  32. package/dist/{DateTime-Dwg6aUf3.js → DateTime-CmJw1-WA.js} +1 -1
  33. package/dist/{DateTimeRange-Cir1-Js8.js → DateTimeRange-aDw57sTG.js} +19 -13
  34. package/dist/Daterange-C48t6usd.js +63 -0
  35. package/dist/{Decimal-tv9vqaXk.js → Decimal-Ca0K6NoZ.js} +1 -1
  36. package/dist/Delete-FhIvONUV.js +62 -0
  37. package/dist/{Detail-B2rtvufA.js → Detail-qqW0J946.js} +22 -17
  38. package/dist/Dictionary-CaXytFmK.js +59 -0
  39. package/dist/Email-H2DHJhMe.js +54 -0
  40. package/dist/{File-C63qevce.js → File-CjXewuui.js} +33 -28
  41. package/dist/Image-BSuCHshD.js +9 -0
  42. package/dist/Index-9KImKLrj.js +4 -0
  43. package/dist/Index-BIbR8SAU.js +178 -0
  44. package/dist/Index-BaoxkF9F.js +4 -0
  45. package/dist/{Index-Cc_CDbUJ.js → Index-BrI9x7i7.js} +1 -1
  46. package/dist/Index-CXR5RC6-.js +4 -0
  47. package/dist/{Index-B6Ec8rbl.js → Index-CpGonJ_m.js} +1 -1
  48. package/dist/{Index-Cev7Nudv.js → Index-DUgprnVp.js} +1 -1
  49. package/dist/{Index-BD6O3A9N.js → Index-icEhc88J.js} +25 -20
  50. package/dist/{Index.vue_vue_type_script_setup_true_lang-DaoT5edv.js → Index.vue_vue_type_script_setup_true_lang-Beb5UD_S.js} +21 -16
  51. package/dist/{Index.vue_vue_type_script_setup_true_lang-xNPG8cCE.js → Index.vue_vue_type_script_setup_true_lang-DJ8ZzZ2K.js} +21 -16
  52. package/dist/{Index.vue_vue_type_style_index_0_lang-F7HqBnCS.js → Index.vue_vue_type_style_index_0_lang-D7LuD-a2.js} +40 -35
  53. package/dist/{Install-CTAGNKPW.js → Install-FwXpJIWk.js} +29 -24
  54. package/dist/Int-CXl1QpEL.js +44 -0
  55. package/dist/Int-DAxz3ETu.js +46 -0
  56. package/dist/List-CV9bkdrq.js +79 -0
  57. package/dist/Maintaince-DZNq9aHX.js +20 -0
  58. package/dist/{Markdown-BJB6rQY8.js → Markdown-BhwqDlwa.js} +1 -1
  59. package/dist/{Month-ui1XorBW.js → Month-BEmnA7zU.js} +1 -1
  60. package/dist/Month-DXQBHoJU.js +43 -0
  61. package/dist/Month-bgEd_K7_.js +44 -0
  62. package/dist/{Normal-Cf7kP6RU.js → Normal-Dya4aqc7.js} +49 -45
  63. package/dist/Paging-JXDzxoM0.js +99 -0
  64. package/dist/{PagingHeader-BkFBl-r_.js → PagingHeader-BETGBySb.js} +31 -25
  65. package/dist/{PagingRow-eXCadgdO.js → PagingRow-BLqp1c9E.js} +28 -22
  66. package/dist/QueryApi-B5jI3sBl.js +20 -0
  67. package/dist/{Racebar-ClXzi9hV.js → Racebar-CozeXwLJ.js} +42 -37
  68. package/dist/{Radio-llyoK7PI.js → Radio-CuAxYw7j.js} +1 -1
  69. package/dist/{Register-BaHhaZMu.js → Register-B11jE2Ox.js} +70 -66
  70. package/dist/RichText-CxBE_cVg.js +47 -0
  71. package/dist/{SearchFooter-BgJxQrMo.js → SearchFooter-agTqPUGE.js} +1 -1
  72. package/dist/{SearchFooter.vue_vue_type_style_index_0_lang-C6DtjpFD.js → SearchFooter.vue_vue_type_style_index_0_lang-C-1Yr5_9.js} +1 -1
  73. package/dist/{SearchForm-CroUQ_3K.js → SearchForm-DNKmE8W0.js} +1 -1
  74. package/dist/{SearchForm.vue_vue_type_style_index_0_lang-DEu6hHys.js → SearchForm.vue_vue_type_style_index_0_lang-BzrMV0Wr.js} +37 -33
  75. package/dist/Select-BPa5rx_H.js +86 -0
  76. package/dist/{Select-BYw63gZy.js → Select-CRfEAtba.js} +35 -30
  77. package/dist/{Select-BtNeUq9h.js → Select-MqDjnB-C.js} +1 -1
  78. package/dist/{Single-CCVi3Pcj.js → Single-C5Kkr9SY.js} +106 -102
  79. package/dist/{Statistic-g3nQvsbW.js → Statistic-Ce_FMw5O.js} +34 -30
  80. package/dist/{Stock-CNqLeSld.js → Stock-BTjhpaxv.js} +1 -1
  81. package/dist/{Stock-C6Fxo31l.js → Stock-D8AJmsvb.js} +1 -1
  82. package/dist/{Stock.vue_vue_type_style_index_0_lang-BqXBN6CJ.js → Stock.vue_vue_type_style_index_0_lang-DTj2ITJ6.js} +30 -25
  83. package/dist/{Switch-NMkH-rhl.js → Switch-gwGbi34o.js} +1 -1
  84. package/dist/{Table-DpA4dO4P.js → Table-C03eUBYm.js} +66 -61
  85. package/dist/{Table-Cdd_tPoL.js → Table-DA8aGGEH.js} +69 -66
  86. package/dist/{Text-DanSgaL9.js → Text-B5uPrGof.js} +18 -12
  87. package/dist/Text-D-VS-lCk.js +59 -0
  88. package/dist/Text-NRww74M3.js +4 -0
  89. package/dist/Text.vue_vue_type_style_index_0_lang-Fsbur1tJ.js +59 -0
  90. package/dist/TextLink-B_Qg6CnF.js +65 -0
  91. package/dist/{Textarea-HhP_VFJV.js → Textarea-gtXLL6Qe.js} +1 -1
  92. package/dist/Time-DYOIZ2Rv.js +43 -0
  93. package/dist/Timeline-B4AYezYA.js +59 -0
  94. package/dist/{Tree-Ck_7r3nf.js → Tree-CRDb0vS5.js} +101 -97
  95. package/dist/Tree-CTmXjN1O.js +122 -0
  96. package/dist/TreeNode-HFcGpAOb.js +42 -0
  97. package/dist/{Update-DrmLFoty.js → Update-EHyhYK5k.js} +20 -15
  98. package/dist/{UpdateChild-CGCn-Eh4.js → UpdateChild-CC3b9evd.js} +23 -17
  99. package/dist/Upload-CkQ-5tVg.js +72 -0
  100. package/dist/Upload-um4BYzwO.js +150 -0
  101. package/dist/UploadApi-BmdGJGjh.js +20 -0
  102. package/dist/Year-DKBG5ihv.js +47 -0
  103. package/dist/{Year-RGAEzf_V.js → Year-Lhvyb9Vk.js} +1 -1
  104. package/dist/assets/@intlify-BISCQg1h.js +2189 -0
  105. package/dist/assets/@vue-aVYGocXp.js +93 -0
  106. package/dist/assets/clone-BZn0cTAu.js +134 -0
  107. package/dist/assets/file-saver-CwlpTZSc.js +74 -0
  108. package/dist/assets/liquidjs-C-LVcoaY.js +2893 -0
  109. package/dist/assets/moment-h96o7c8I.js +2578 -0
  110. package/dist/assets/sprintf-js-BPTdvBYM.js +148 -0
  111. package/dist/assets/underscore-B0BCaBxV.js +1070 -0
  112. package/dist/assets/underscore.string-DVXD2SZo.js +425 -0
  113. package/dist/assets/util-deprecate-Dzun97re.js +28 -0
  114. package/dist/assets/vue-i18n-CLr3brPz.js +1670 -0
  115. package/dist/main-C1iALE1f.js +8947 -0
  116. package/dist/main.js +130 -130
  117. package/dist/style.css +1 -1
  118. package/package.json +1 -1
  119. package/dist/Article-D3N6eVpH.js +0 -195
  120. package/dist/Autocomplete-C1Q-qo5y.js +0 -49
  121. package/dist/Autocomplete-C_t_3Onz.js +0 -48
  122. package/dist/Callback-BcjLHYz6.js +0 -20
  123. package/dist/Cascader-BMs1Kw-s.js +0 -81
  124. package/dist/Cascader-BoZLMQjq.js +0 -41
  125. package/dist/Checkbox-DeuCkQ_E.js +0 -70
  126. package/dist/Code-CmB3ZGnM.js +0 -54
  127. package/dist/Code-Q9ETcIfA.js +0 -36
  128. package/dist/Code-hiW76EUm.js +0 -4
  129. package/dist/Code.vue_vue_type_style_index_0_lang-DJO46RBx.js +0 -59
  130. package/dist/Column-K0p0pVuf.js +0 -69
  131. package/dist/Comment-B_jDWUXE.js +0 -98
  132. package/dist/Compare-CziDSVLD.js +0 -37
  133. package/dist/Compare-DFDzyQIR.js +0 -57
  134. package/dist/Copy-gHXEFE58.js +0 -43
  135. package/dist/Custom-DS1OrDHT.js +0 -51
  136. package/dist/Date-BOrgXdKV.js +0 -37
  137. package/dist/DateRange-Clg_We_d.js +0 -57
  138. package/dist/DateTime-Ba-L9NIq.js +0 -38
  139. package/dist/Daterange-Gaj6hNOK.js +0 -57
  140. package/dist/Delete-HzVURBlh.js +0 -57
  141. package/dist/Dictionary-DKnp-UJn.js +0 -55
  142. package/dist/Email-CpOxaSSw.js +0 -48
  143. package/dist/Image-DRIunv3_.js +0 -9
  144. package/dist/Index-DSKuNKCT.js +0 -4
  145. package/dist/Index-QIBRYf1L.js +0 -4
  146. package/dist/Index-ZOfKMgat.js +0 -4
  147. package/dist/Index-bxLda8lZ.js +0 -174
  148. package/dist/Int-DmNjhEfK.js +0 -38
  149. package/dist/Int-nUzbSSOv.js +0 -41
  150. package/dist/List-gNI3y_wH.js +0 -74
  151. package/dist/Maintaince-pTASKuMA.js +0 -14
  152. package/dist/Month-CHfaIo8p.js +0 -38
  153. package/dist/Month-DgztqRaq.js +0 -37
  154. package/dist/Paging-CBgVct8q.js +0 -95
  155. package/dist/QueryApi-Wf86Sm6m.js +0 -13
  156. package/dist/RichText-Cc_jptgY.js +0 -41
  157. package/dist/Select-wxKjwxJj.js +0 -80
  158. package/dist/Text-DgZjeg-u.js +0 -4
  159. package/dist/Text-GuLK7BYX.js +0 -53
  160. package/dist/Text.vue_vue_type_style_index_0_lang-CYGKr6vh.js +0 -53
  161. package/dist/TextLink-B_Ur1pg0.js +0 -59
  162. package/dist/Time-CmyrAm3i.js +0 -37
  163. package/dist/Timeline-B85T2wBn.js +0 -53
  164. package/dist/Tree-OqvNLgYj.js +0 -118
  165. package/dist/TreeNode-Ba2f55wK.js +0 -37
  166. package/dist/Upload-D9HeSZCg.js +0 -68
  167. package/dist/Upload-DXADyB6r.js +0 -147
  168. package/dist/UploadApi-DAT-xdsM.js +0 -13
  169. package/dist/Year-Dx_qNPrz.js +0 -41
  170. package/dist/assets/halo-fe-idvmXC0t.js +0 -15923
  171. package/dist/main-COiaaxGk.js +0 -3542
@@ -1,3542 +0,0 @@
1
- var Kt = Object.defineProperty;
2
- var Gt = (_, t, l) => t in _ ? Kt(_, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : _[t] = l;
3
- var N = (_, t, l) => Gt(_, typeof t != "symbol" ? t + "" : t, l);
4
- import { h as Qt, d as pe, _ as Z, R as Ae, G as ke, Y as K, l as Jt, a as _e, j as Te, I as Ct, U as dt, b as Zt, c as Oe, E as el, K as ue, s as Dt, O as tl, g as ze, e as ot, $ as He, t as $e, N as ve, H as Ce, M as Re, L as st, p as Fe, Q as Lt, y as ll, f as Me, P as j, i as ct, W as ol, D as et, k as sl, n as mt, m as Pe, o as Se, u as St, r as al, q as Vt, v as nl, w as rl, x as Rt } from "./assets/halo-fe-idvmXC0t.js";
5
- import il, { ElMessage as Je, ElMessageBox as Mt, ElNotification as it, ElDialog as ul } from "element-plus";
6
- import { reactive as dl, defineComponent as Y, mergeModels as Ie, toRefs as ne, useModel as je, ref as $, resolveComponent as O, openBlock as i, createElementBlock as b, Fragment as G, createVNode as x, unref as e, withCtx as h, createBlock as L, createTextVNode as B, createCommentVNode as W, renderSlot as ee, Teleport as pt, createElementVNode as f, onMounted as he, watch as be, computed as ce, normalizeClass as le, renderList as ae, toDisplayString as M, defineAsyncComponent as Le, onBeforeUnmount as vt, isRef as we, resolveDynamicComponent as at, onUnmounted as nt, nextTick as ut, normalizeStyle as xe, useSlots as Et, onUpdated as ft, withModifiers as De, createSlots as cl, TransitionGroup as ml, inject as Tt, provide as Pt, toRef as Ut } from "vue";
7
- import { z as pl, E as vl, h as fl } from "./assets/element-plus-Dp3QGoBh.js";
8
- import { createRouter as hl, createWebHistory as gl, useRoute as qe, useRouter as _l } from "vue-router";
9
- import { i as yl } from "./assets/intro.js-DxWjEdp_.js";
10
- class bl extends Qt {
11
- constructor() {
12
- super(...arguments);
13
- /**
14
- * 显示全局成功消息
15
- */
16
- N(this, "success", (l) => {
17
- Je({ message: l, type: "success", showClose: !0, offset: 10, grouping: !0 });
18
- });
19
- /**
20
- * 显示全局警告消息
21
- */
22
- N(this, "warning", (l) => {
23
- Je({ message: l, type: "warning", showClose: !0, duration: 5e3, offset: 10, grouping: !0 });
24
- });
25
- /**
26
- * 显示全局信息消息
27
- */
28
- N(this, "info", (l) => {
29
- Je({ message: l, type: "info", showClose: !0, duration: 5e3, offset: 10, grouping: !0 });
30
- });
31
- /**
32
- * 显示全局错误消息
33
- */
34
- N(this, "error", (l) => {
35
- Je({ message: l, type: "error", showClose: !0, duration: 5e3, offset: 10, grouping: !0 });
36
- });
37
- /**
38
- * 显示全局错误消息
39
- */
40
- N(this, "confirm", (l, o, n = null) => Mt.confirm(o, l, n));
41
- /**
42
- * 显示警告框
43
- */
44
- N(this, "alert", (l, o, n = null) => Mt.alert(o, l, n));
45
- /**
46
- * 通知
47
- */
48
- N(this, "notify", (l, o, n) => {
49
- if (n == "info")
50
- return it.info({ title: l, message: o });
51
- if (n == "success")
52
- return it.success({ title: l, message: o });
53
- if (n == "warning")
54
- return it.warning({ title: l, message: o });
55
- });
56
- }
57
- }
58
- let wl = new bl(), kl = [
59
- { path: "/install", component: () => import("./Install-CTAGNKPW.js") },
60
- { path: "/login", component: () => import("./Index-bxLda8lZ.js") },
61
- { path: "/register", component: () => import("./Register-BaHhaZMu.js") },
62
- { path: "/maintaince", component: () => import("./Maintaince-pTASKuMA.js") },
63
- { path: "/sso/callback", component: () => import("./Callback-BcjLHYz6.js") },
64
- //优先匹配自定义路由,自定义路由匹配不到后,再使用框架页面
65
- { path: "/:pathMatch(.*)*", component: () => import("./Index-QIBRYf1L.js") }
66
- ], xl = () => ({
67
- /**
68
- * 安装路由
69
- */
70
- install() {
71
- de.addRoutes(kl), de.router.beforeEach(async (_, t, l) => _.path == "/install" ? l() : (ye.setHideNav(_.query.hide_nav), await pe.init(), await Z.getSso() ? _.path == "/login" ? l({ path: "/" }) : Z.user ? l() : (Ae.reconnect = !0, await Ae.connect(), await Z.loadInfo(), await Z.loadMenus(), await ke.switchI18n(K.language), l({ ..._, replace: !0 })) : Z.menus != null ? l() : (await Z.getAnonymous(), await Z.loadMenus(), await ke.switchI18n(Jt.getLanguage()), l(_))));
72
- }
73
- });
74
- class $l {
75
- constructor(t) {
76
- //#region 属性
77
- /**
78
- * 侧边栏状态
79
- */
80
- N(this, "sidebar", {
81
- /**
82
- * 是否打开
83
- */
84
- opened: !1,
85
- /**
86
- * 侧边栏宽度
87
- */
88
- width: 200
89
- });
90
- /**
91
- * 控件大小
92
- */
93
- N(this, "size", null);
94
- /**
95
- * 是否隐藏侧边导航栏和顶部导航栏
96
- */
97
- N(this, "hideNav", !1);
98
- this.sidebar.width = t;
99
- }
100
- /**
101
- * 异步初始化
102
- */
103
- async init() {
104
- let t = await _e.getAsync("sidebarStatus");
105
- this.sidebar.opened = t == "1";
106
- let l = await _e.getAsync("size");
107
- this.size = l || "default";
108
- }
109
- //#endregion
110
- /**
111
- * 初始化
112
- */
113
- async useGlobal(t) {
114
- t.use(de.router), t.use(xl()), Ue.init(t), ul.props.closeOnClickModal = !1, t.use(il), t.use(ke.i18n), t.config.errorHandler = (l, o) => {
115
- let n = l.message, a = o.$el;
116
- throw a && a.className && (n += ` 对应dom类: .${a.className}`), Te.add("error", n, l.stack), l;
117
- };
118
- }
119
- /**
120
- * 注册自定义路由
121
- */
122
- useRoutes(t) {
123
- de.addRoutes(t);
124
- }
125
- /**
126
- * 注册多语言翻译
127
- */
128
- useI18n(t) {
129
- ke.addMessages(t);
130
- }
131
- /**
132
- * 注册自定义组件
133
- */
134
- useComponents(t, l, o, n) {
135
- Ue.register(t, l, o, n);
136
- }
137
- async toggleSideBar() {
138
- this.sidebar.opened = !this.sidebar.opened, this.sidebar.opened ? await _e.saveAsync("sidebarStatus", "1") : await _e.saveAsync("sidebarStatus", "0");
139
- }
140
- async closeSidebar() {
141
- await _e.saveAsync("sidebarStatus", "0"), this.sidebar.opened = !1;
142
- }
143
- /**
144
- * 防止侧边栏值变动,vue监听不到,导致右边内容区域宽度无法实时更新
145
- */
146
- async setSidebarWidth(t) {
147
- this.sidebar.width = t, await tt.setSidebarWidth(t);
148
- }
149
- /**
150
- * 如果已经设置过隐藏导航栏,那么就不再更新是否隐藏导航栏状态,保留之前状态
151
- */
152
- setHideNav(t) {
153
- this.hideNav || (this.hideNav = t !== void 0);
154
- }
155
- }
156
- class Cl {
157
- constructor() {
158
- /**
159
- * 目前系统中正在运行的首页组件
160
- */
161
- N(this, "pages", {});
162
- /**
163
- * 目前系统中注册的所有组件
164
- */
165
- N(this, "comps", []);
166
- }
167
- /**
168
- * 初始化&注册全局组件
169
- */
170
- init(t) {
171
- this.register(t, /* @__PURE__ */ Object.assign({ "../coms/controls/Autocomplete.vue": () => import("./Autocomplete-C1Q-qo5y.js"), "../coms/controls/Cascader.vue": () => import("./Cascader-BMs1Kw-s.js"), "../coms/controls/Checkbox.vue": () => import("./Checkbox-DeuCkQ_E.js"), "../coms/controls/Code.vue": () => import("./Code-CmB3ZGnM.js"), "../coms/controls/Color.vue": () => import("./Color-Da69pnQg.js"), "../coms/controls/Compare.vue": () => import("./Compare-DFDzyQIR.js"), "../coms/controls/Date.vue": () => import("./Date-BOrgXdKV.js"), "../coms/controls/DateRange.vue": () => import("./DateRange-Clg_We_d.js"), "../coms/controls/DateTime.vue": () => import("./DateTime-Ba-L9NIq.js"), "../coms/controls/DateTimeRange.vue": () => import("./DateTimeRange-Cir1-Js8.js"), "../coms/controls/Decimal.vue": () => import("./Decimal-C38-N54B.js"), "../coms/controls/Email.vue": () => import("./Email-CpOxaSSw.js"), "../coms/controls/Image.vue": () => import("./Image-DRIunv3_.js"), "../coms/controls/Index.vue": () => import("./Index-B6Ec8rbl.js"), "../coms/controls/Int.vue": () => import("./Int-nUzbSSOv.js"), "../coms/controls/Markdown.vue": () => import("./Markdown-BzMP3m7o.js"), "../coms/controls/Month.vue": () => import("./Month-CHfaIo8p.js"), "../coms/controls/Password.vue": () => import("./Password-DuyYEgzR.js"), "../coms/controls/Progress.vue": () => import("./Progress-C3D821AQ.js"), "../coms/controls/Radio.vue": () => import("./Radio-DkcBKBvX.js"), "../coms/controls/Rate.vue": () => import("./Rate-B7jKTFKT.js"), "../coms/controls/RichText.vue": () => import("./RichText-Cc_jptgY.js"), "../coms/controls/Select.vue": () => import("./Select-BYw63gZy.js"), "../coms/controls/Switch.vue": () => import("./Switch-DhFaku5L.js"), "../coms/controls/Text.vue": () => import("./Text-DanSgaL9.js"), "../coms/controls/Textarea.vue": () => import("./Textarea-D9TgF9ig.js"), "../coms/controls/Time.vue": () => import("./Time-CmyrAm3i.js"), "../coms/controls/Upload.vue": () => import("./Upload-DXADyB6r.js"), "../coms/controls/Year.vue": () => import("./Year-Dx_qNPrz.js") }), "../../halo-pc/coms/controls/", "control"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/lists/Calender.vue": () => import("./Calender-dCiW7eIK.js"), "../coms/lists/Racebar.vue": () => import("./Racebar-ClXzi9hV.js"), "../coms/lists/Statistic.vue": () => import("./Statistic-g3nQvsbW.js"), "../coms/lists/Stock.vue": () => import("./Stock-CNqLeSld.js"), "../coms/lists/Timeline.vue": () => import("./Timeline-B85T2wBn.js"), "../coms/lists/Tree.vue": () => import("./Tree-Ck_7r3nf.js") }), "../../halo-pc/coms/lists/", "list"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/pagings/Article.vue": () => import("./Article-D3N6eVpH.js"), "../coms/pagings/Code.vue": () => import("./Code-DVZ9QWgE.js"), "../coms/pagings/DataExport.vue": () => import("./DataExport-DAk1d4uG.js"), "../coms/pagings/DataImport.vue": () => import("./DataImport-BLOSIbQ2.js"), "../coms/pagings/File.vue": () => import("./File-C63qevce.js"), "../coms/pagings/Index.vue": () => import("./Index-Cc_CDbUJ.js"), "../coms/pagings/SearchFooter.vue": () => import("./SearchFooter-BgJxQrMo.js"), "../coms/pagings/SearchForm.vue": () => import("./SearchForm-CroUQ_3K.js"), "../coms/pagings/Table.vue": () => import("./Table-DpA4dO4P.js") }), "../../halo-pc/coms/pagings/", "paging"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/partials/ArticleFooter.vue": () => import("./ArticleFooter-CbvmQHCn.js"), "../coms/partials/Detail.vue": () => import("./Detail-B2rtvufA.js"), "../coms/partials/PagingHeader.vue": () => import("./PagingHeader-BkFBl-r_.js"), "../coms/partials/PagingRow.vue": () => import("./PagingRow-eXCadgdO.js"), "../coms/partials/TreeNode.vue": () => import("./TreeNode-Ba2f55wK.js"), "../coms/partials/Update.vue": () => import("./Update-DrmLFoty.js"), "../coms/partials/UpdateChild.vue": () => import("./UpdateChild-CGCn-Eh4.js") }), "../../halo-pc/coms/partials/", "partial"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/searches/Autocomplete.vue": () => import("./Autocomplete-C_t_3Onz.js"), "../coms/searches/Daterange.vue": () => import("./Daterange-Gaj6hNOK.js"), "../coms/searches/Index.vue": () => import("./Index-DSKuNKCT.js"), "../coms/searches/Int.vue": () => import("./Int-DmNjhEfK.js"), "../coms/searches/Month.vue": () => import("./Month-DgztqRaq.js"), "../coms/searches/Select.vue": () => import("./Select-wxKjwxJj.js"), "../coms/searches/Text.vue": () => import("./Text-GuLK7BYX.js") }), "../../halo-pc/coms/searches/", "search"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/singles/Code.vue": () => import("./Code-hiW76EUm.js"), "../coms/singles/Comment.vue": () => import("./Comment-B_jDWUXE.js"), "../coms/singles/Index.vue": () => import("./Index-Cev7Nudv.js"), "../coms/singles/Normal.vue": () => import("./Normal-Cf7kP6RU.js"), "../coms/singles/Statistic.vue": () => import("./Statistic-CTxHNeof.js"), "../coms/singles/Stock.vue": () => import("./Stock-C6Fxo31l.js"), "../coms/singles/Table.vue": () => import("./Table-Cdd_tPoL.js"), "../coms/singles/Tree.vue": () => import("./Tree-OqvNLgYj.js"), "../coms/singles/Tree_Old.vue": () => import("./Tree_Old-h__WmqFA.js") }), "../../halo-pc/coms/singles/", "update"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/texts/Autocomplete.vue": () => import("./Autocomplete-BrKsj5vx.js"), "../coms/texts/CSharp.vue": () => import("./CSharp-DGmv2biT.js"), "../coms/texts/Cascader.vue": () => import("./Cascader-BoZLMQjq.js"), "../coms/texts/Checkbox.vue": () => import("./Checkbox-DklZD5ff.js"), "../coms/texts/Code.vue": () => import("./Code-Q9ETcIfA.js"), "../coms/texts/Color.vue": () => import("./Color-CfXtJFUo.js"), "../coms/texts/Compare.vue": () => import("./Compare-CziDSVLD.js"), "../coms/texts/Copy.vue": () => import("./Copy-gHXEFE58.js"), "../coms/texts/Date.vue": () => import("./Date-D1KihBir.js"), "../coms/texts/DateRange.vue": () => import("./DateRange-DrYK_l0Y.js"), "../coms/texts/DateTime.vue": () => import("./DateTime-Dwg6aUf3.js"), "../coms/texts/Decimal.vue": () => import("./Decimal-tv9vqaXk.js"), "../coms/texts/Dictionary.vue": () => import("./Dictionary-DKnp-UJn.js"), "../coms/texts/Email.vue": () => import("./Email-BKW9GRcH.js"), "../coms/texts/Index.vue": () => import("./Index-BD6O3A9N.js"), "../coms/texts/Int.vue": () => import("./Int-B-t8edhd.js"), "../coms/texts/Markdown.vue": () => import("./Markdown-BJB6rQY8.js"), "../coms/texts/Month.vue": () => import("./Month-ui1XorBW.js"), "../coms/texts/Password.vue": () => import("./Password-yHtlY-Qa.js"), "../coms/texts/Progress.vue": () => import("./Progress-CKVzMO-W.js"), "../coms/texts/Radio.vue": () => import("./Radio-llyoK7PI.js"), "../coms/texts/Rate.vue": () => import("./Rate-BmC4gw_0.js"), "../coms/texts/RichText.vue": () => import("./RichText-Bk0Msyhl.js"), "../coms/texts/Select.vue": () => import("./Select-BtNeUq9h.js"), "../coms/texts/Switch.vue": () => import("./Switch-NMkH-rhl.js"), "../coms/texts/Text.vue": () => import("./Text-DgZjeg-u.js"), "../coms/texts/TextLink.vue": () => import("./TextLink-B_Ur1pg0.js"), "../coms/texts/Textarea.vue": () => import("./Textarea-HhP_VFJV.js"), "../coms/texts/Upload.vue": () => import("./Upload-D9HeSZCg.js"), "../coms/texts/Year.vue": () => import("./Year-RGAEzf_V.js") }), "../../halo-pc/coms/texts/", "text"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/controls/Autocomplete.vue": () => import("./Autocomplete-C1Q-qo5y.js"), "../coms/controls/Cascader.vue": () => import("./Cascader-BMs1Kw-s.js"), "../coms/controls/Checkbox.vue": () => import("./Checkbox-DeuCkQ_E.js"), "../coms/controls/Code.vue": () => import("./Code-CmB3ZGnM.js"), "../coms/controls/Color.vue": () => import("./Color-Da69pnQg.js"), "../coms/controls/Compare.vue": () => import("./Compare-DFDzyQIR.js"), "../coms/controls/Date.vue": () => import("./Date-BOrgXdKV.js"), "../coms/controls/DateRange.vue": () => import("./DateRange-Clg_We_d.js"), "../coms/controls/DateTime.vue": () => import("./DateTime-Ba-L9NIq.js"), "../coms/controls/DateTimeRange.vue": () => import("./DateTimeRange-Cir1-Js8.js"), "../coms/controls/Decimal.vue": () => import("./Decimal-C38-N54B.js"), "../coms/controls/Email.vue": () => import("./Email-CpOxaSSw.js"), "../coms/controls/Image.vue": () => import("./Image-DRIunv3_.js"), "../coms/controls/Index.vue": () => import("./Index-B6Ec8rbl.js"), "../coms/controls/Int.vue": () => import("./Int-nUzbSSOv.js"), "../coms/controls/Markdown.vue": () => import("./Markdown-BzMP3m7o.js"), "../coms/controls/Month.vue": () => import("./Month-CHfaIo8p.js"), "../coms/controls/Password.vue": () => import("./Password-DuyYEgzR.js"), "../coms/controls/Progress.vue": () => import("./Progress-C3D821AQ.js"), "../coms/controls/Radio.vue": () => import("./Radio-DkcBKBvX.js"), "../coms/controls/Rate.vue": () => import("./Rate-B7jKTFKT.js"), "../coms/controls/RichText.vue": () => import("./RichText-Cc_jptgY.js"), "../coms/controls/Select.vue": () => import("./Select-BYw63gZy.js"), "../coms/controls/Switch.vue": () => import("./Switch-DhFaku5L.js"), "../coms/controls/Text.vue": () => import("./Text-DanSgaL9.js"), "../coms/controls/Textarea.vue": () => import("./Textarea-D9TgF9ig.js"), "../coms/controls/Time.vue": () => import("./Time-CmyrAm3i.js"), "../coms/controls/Upload.vue": () => import("./Upload-DXADyB6r.js"), "../coms/controls/Year.vue": () => import("./Year-Dx_qNPrz.js") }), "../coms/controls/", "control"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/lists/Calender.vue": () => import("./Calender-dCiW7eIK.js"), "../coms/lists/Racebar.vue": () => import("./Racebar-ClXzi9hV.js"), "../coms/lists/Statistic.vue": () => import("./Statistic-g3nQvsbW.js"), "../coms/lists/Stock.vue": () => import("./Stock-CNqLeSld.js"), "../coms/lists/Timeline.vue": () => import("./Timeline-B85T2wBn.js"), "../coms/lists/Tree.vue": () => import("./Tree-Ck_7r3nf.js") }), "../coms/lists/", "list"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/pagings/Article.vue": () => import("./Article-D3N6eVpH.js"), "../coms/pagings/Code.vue": () => import("./Code-DVZ9QWgE.js"), "../coms/pagings/DataExport.vue": () => import("./DataExport-DAk1d4uG.js"), "../coms/pagings/DataImport.vue": () => import("./DataImport-BLOSIbQ2.js"), "../coms/pagings/File.vue": () => import("./File-C63qevce.js"), "../coms/pagings/Index.vue": () => import("./Index-Cc_CDbUJ.js"), "../coms/pagings/SearchFooter.vue": () => import("./SearchFooter-BgJxQrMo.js"), "../coms/pagings/SearchForm.vue": () => import("./SearchForm-CroUQ_3K.js"), "../coms/pagings/Table.vue": () => import("./Table-DpA4dO4P.js") }), "../coms/pagings/", "paging"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/partials/ArticleFooter.vue": () => import("./ArticleFooter-CbvmQHCn.js"), "../coms/partials/Detail.vue": () => import("./Detail-B2rtvufA.js"), "../coms/partials/PagingHeader.vue": () => import("./PagingHeader-BkFBl-r_.js"), "../coms/partials/PagingRow.vue": () => import("./PagingRow-eXCadgdO.js"), "../coms/partials/TreeNode.vue": () => import("./TreeNode-Ba2f55wK.js"), "../coms/partials/Update.vue": () => import("./Update-DrmLFoty.js"), "../coms/partials/UpdateChild.vue": () => import("./UpdateChild-CGCn-Eh4.js") }), "../coms/partials/", "partial"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/searches/Autocomplete.vue": () => import("./Autocomplete-C_t_3Onz.js"), "../coms/searches/Daterange.vue": () => import("./Daterange-Gaj6hNOK.js"), "../coms/searches/Index.vue": () => import("./Index-DSKuNKCT.js"), "../coms/searches/Int.vue": () => import("./Int-DmNjhEfK.js"), "../coms/searches/Month.vue": () => import("./Month-DgztqRaq.js"), "../coms/searches/Select.vue": () => import("./Select-wxKjwxJj.js"), "../coms/searches/Text.vue": () => import("./Text-GuLK7BYX.js") }), "../coms/searches/", "search"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/singles/Code.vue": () => import("./Code-hiW76EUm.js"), "../coms/singles/Comment.vue": () => import("./Comment-B_jDWUXE.js"), "../coms/singles/Index.vue": () => import("./Index-Cev7Nudv.js"), "../coms/singles/Normal.vue": () => import("./Normal-Cf7kP6RU.js"), "../coms/singles/Statistic.vue": () => import("./Statistic-CTxHNeof.js"), "../coms/singles/Stock.vue": () => import("./Stock-C6Fxo31l.js"), "../coms/singles/Table.vue": () => import("./Table-Cdd_tPoL.js"), "../coms/singles/Tree.vue": () => import("./Tree-OqvNLgYj.js"), "../coms/singles/Tree_Old.vue": () => import("./Tree_Old-h__WmqFA.js") }), "../coms/singles/", "update"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/texts/Autocomplete.vue": () => import("./Autocomplete-BrKsj5vx.js"), "../coms/texts/CSharp.vue": () => import("./CSharp-DGmv2biT.js"), "../coms/texts/Cascader.vue": () => import("./Cascader-BoZLMQjq.js"), "../coms/texts/Checkbox.vue": () => import("./Checkbox-DklZD5ff.js"), "../coms/texts/Code.vue": () => import("./Code-Q9ETcIfA.js"), "../coms/texts/Color.vue": () => import("./Color-CfXtJFUo.js"), "../coms/texts/Compare.vue": () => import("./Compare-CziDSVLD.js"), "../coms/texts/Copy.vue": () => import("./Copy-gHXEFE58.js"), "../coms/texts/Date.vue": () => import("./Date-D1KihBir.js"), "../coms/texts/DateRange.vue": () => import("./DateRange-DrYK_l0Y.js"), "../coms/texts/DateTime.vue": () => import("./DateTime-Dwg6aUf3.js"), "../coms/texts/Decimal.vue": () => import("./Decimal-tv9vqaXk.js"), "../coms/texts/Dictionary.vue": () => import("./Dictionary-DKnp-UJn.js"), "../coms/texts/Email.vue": () => import("./Email-BKW9GRcH.js"), "../coms/texts/Index.vue": () => import("./Index-BD6O3A9N.js"), "../coms/texts/Int.vue": () => import("./Int-B-t8edhd.js"), "../coms/texts/Markdown.vue": () => import("./Markdown-BJB6rQY8.js"), "../coms/texts/Month.vue": () => import("./Month-ui1XorBW.js"), "../coms/texts/Password.vue": () => import("./Password-yHtlY-Qa.js"), "../coms/texts/Progress.vue": () => import("./Progress-CKVzMO-W.js"), "../coms/texts/Radio.vue": () => import("./Radio-llyoK7PI.js"), "../coms/texts/Rate.vue": () => import("./Rate-BmC4gw_0.js"), "../coms/texts/RichText.vue": () => import("./RichText-Bk0Msyhl.js"), "../coms/texts/Select.vue": () => import("./Select-BtNeUq9h.js"), "../coms/texts/Switch.vue": () => import("./Switch-NMkH-rhl.js"), "../coms/texts/Text.vue": () => import("./Text-DgZjeg-u.js"), "../coms/texts/TextLink.vue": () => import("./TextLink-B_Ur1pg0.js"), "../coms/texts/Textarea.vue": () => import("./Textarea-HhP_VFJV.js"), "../coms/texts/Upload.vue": () => import("./Upload-D9HeSZCg.js"), "../coms/texts/Year.vue": () => import("./Year-RGAEzf_V.js") }), "../coms/texts/", "text");
172
- }
173
- /**
174
- * 注册全局异步或同步组件
175
- * 支持同步组件的目的:异步组件在执行到mounted内容仍没挂载,反而会执行到父组件mounted事件,导致父组件拿不到子组件实际高度
176
- */
177
- register(t, l, o, n) {
178
- let a = Ct.getComponents(l, o, n);
179
- Object.keys(a).forEach((d) => {
180
- this.comps.push(d), t.component(d, a[d]);
181
- });
182
- }
183
- /**
184
- * 根据路由获取组件
185
- */
186
- getComponent(t, l, o = null) {
187
- let n = Ct.getName(t, l), a = this.comps.find((s) => s == n || s == n + "-index");
188
- return a || (o ? `${l}-${o}` : null);
189
- }
190
- /**
191
- * 添加页面
192
- */
193
- addPage(t, l) {
194
- this.pages[t] = l;
195
- }
196
- /**
197
- * 删除页面
198
- */
199
- removePage(t) {
200
- delete this.pages[t];
201
- }
202
- }
203
- class Sl {
204
- constructor() {
205
- /**
206
- * 获取控件的值,自动区分搜索控件和提交表单控件
207
- */
208
- N(this, "getValue", (t, l, o, n) => {
209
- var s;
210
- return (s = t[o.name][l]) == null ? void 0 : s[n.name];
211
- });
212
- /**
213
- * 设置表单控件的值
214
- */
215
- N(this, "setValue", (t, l, o, n, a) => {
216
- let s = l[o.name][n];
217
- s && (s[a.name] = t);
218
- });
219
- /**
220
- * 设置多行中某字段的值
221
- */
222
- N(this, "setRowsValue", (t, l, o, n) => {
223
- let a = l[o.name];
224
- for (let s = 0; s < a.length; s++)
225
- a[s][n.name] = t;
226
- });
227
- /**
228
- * 把数组分成每行columns列的数组
229
- */
230
- N(this, "splitRows", (t, l) => {
231
- let o = [];
232
- for (let n = 0; n < t.length; n += l)
233
- o.push(t.slice(n, n + l));
234
- return o;
235
- });
236
- //region 控件相关,需要封装成类库
237
- /**
238
- * 获取不同布局控件配置,用于对控件的展示类型进行重写,但是不影响字段配置
239
- */
240
- N(this, "getConfig", (t, l, o) => o == "Table" && t.control.type == "Code" ? { control: { type: "Textarea" } } : null);
241
- /**
242
- * 获取控件样式
243
- */
244
- N(this, "getStyle", (t, l, o) => {
245
- let n = this.getHeight(t, l, o);
246
- return n ? `height: ${n}px;` : null;
247
- });
248
- /**
249
- * 获取控件高度
250
- */
251
- N(this, "getHeight", (t, l, o) => o == "Normal" ? t.control.height : null);
252
- //endregion
253
- /**
254
- * 转换值为指定类型
255
- */
256
- N(this, "convert", (t, l) => l == "String" ? dt.isNumber(t) ? t == null ? void 0 : t.toString() : t : l == "Int" ? parseFloat(t) : t);
257
- }
258
- }
259
- class Vl {
260
- constructor() {
261
- /**
262
- * 一行的总列数
263
- */
264
- N(this, "columns", 6);
265
- N(this, "dialog", {
266
- /**
267
- * 弹出对话框的宽度
268
- */
269
- width: "50%"
270
- });
271
- }
272
- setColumn(t) {
273
- this.columns = t;
274
- }
275
- setDialogWidth(t) {
276
- this.dialog.width = t;
277
- }
278
- }
279
- class Rl {
280
- constructor() {
281
- //#region 字段配置
282
- /**
283
- * 保存字段配置
284
- */
285
- N(this, "setColumnWidth", async (t, l, o, n) => {
286
- let a = await _e.getEntity("page");
287
- a || (a = {}), a[t] || (a[t] = {}), a[t][l] || (a[t][l] = {}), a[t][l][o] || (a[t][l][o] = {}), a[t][l][o].columnWidth = n, a[t].lastSetTime = Zt.formatSecondTime(/* @__PURE__ */ new Date()), await _e.saveEntity("page", a);
288
- });
289
- /**
290
- * 获取字段配置
291
- */
292
- N(this, "getFieldConfigs", async () => await _e.getEntity("page"));
293
- //#endregion
294
- /**
295
- * 设置侧边栏宽度
296
- */
297
- N(this, "setSidebarWidth", async (t) => {
298
- let l = await _e.getEntity("setting");
299
- l || (l = {}), l.width = t, await _e.saveEntity("setting", l);
300
- });
301
- /**
302
- * 获取侧边栏宽度
303
- */
304
- N(this, "getSidebarWidth", async () => {
305
- let t = await _e.getEntity("setting");
306
- return t && t.width ? t.width : Oe.web.sidebar && Oe.web.sidebar.width ? Oe.web.sidebar.width : 210;
307
- });
308
- /**
309
- * 获取抽屉宽度,得到的结果是相对于整个页面的宽度
310
- */
311
- N(this, "getDrawerWidth", (t) => t <= 690 ? "90%" : t <= 960 ? "80%" : t <= 1200 ? "70%" : t <= 1600 ? "60%" : "50%");
312
- /**
313
- * 把字符串转换成实际类型。场景1: query字符串转换
314
- */
315
- N(this, "convert", (t, l) => l == "Int" ? parseInt(t) : l == "Decimal" ? parseFloat(t) : t);
316
- }
317
- }
318
- class Ml extends el {
319
- constructor() {
320
- super(...arguments);
321
- /**
322
- * Element UI语言包
323
- */
324
- N(this, "locale");
325
- }
326
- /**
327
- * 切换多语言
328
- */
329
- async switchI18n(l) {
330
- await super.switchI18n(l), l == "zh" && (this.locale = pl), l == "en" && (this.locale = vl), l == "hu" && (this.locale = fl);
331
- }
332
- }
333
- class Ul {
334
- constructor() {
335
- //#region 属性
336
- /**
337
- * store中存储单独路由的目的是,防止类中导出对象,在npm包被引用的场景下,路由实例被创建2次,进而导致跳转失效
338
- */
339
- N(this, "router");
340
- }
341
- //#endregion
342
- //#region 开启
343
- open(t) {
344
- this.router = hl({
345
- history: gl(t),
346
- routes: [],
347
- parseQuery(l) {
348
- return ue.deserializeQs(l);
349
- },
350
- stringifyQuery(l) {
351
- return ue.serialize(l);
352
- }
353
- });
354
- }
355
- //#endregion
356
- /**
357
- * 跳转到指定地址,并返回跳转后的地址,要使用vue-route路由跳转,否则刷新页面后,参数会被解码
358
- */
359
- to(t, l = !0) {
360
- if (!t)
361
- return null;
362
- let o = ue.getToUrl(t, l);
363
- return this.router.push(o), o;
364
- }
365
- /**
366
- * 跳转到后退地址
367
- */
368
- toBackUrl() {
369
- let t = ue.getBackUrl();
370
- t && this.router.push(t);
371
- }
372
- /**
373
- * 添加路由集合
374
- */
375
- addRoutes(t) {
376
- t.forEach((l) => {
377
- this.router.addRoute(l);
378
- });
379
- }
380
- }
381
- class Il {
382
- constructor() {
383
- /**
384
- * 把数组中的元素按照列数,分割成多行,并且计算好每列的列宽
385
- */
386
- N(this, "getLines", (t, l, o, n) => {
387
- let a = [];
388
- if (l == 0)
389
- return a;
390
- let s = [], d = 0;
391
- for (let r = 0; r < t.length; r++) {
392
- let p = t[r], c = Math.ceil(24 / l * n(p));
393
- c > 24 && (c = 24), d += c, d <= 24 ? s.push({ data: o(p), span: c, index: r }) : (a.push(s), s = [], s.push({ data: o(p), span: c, index: r }), d = c), r == t.length - 1 && a.push(s);
394
- }
395
- return a;
396
- });
397
- /**
398
- * 获取表的默认行数据
399
- */
400
- N(this, "getDefaultRow", (t) => {
401
- let l = {};
402
- for (let o = 0; o < t.show.length; o++) {
403
- let n = t.show[o];
404
- l[n.name] = n.default;
405
- }
406
- return l;
407
- });
408
- /**
409
- * 获取所有数据表的搜索字段信息
410
- */
411
- N(this, "expandSearch", (t) => {
412
- let l = [];
413
- for (let o = 0; o < t.length; o++) {
414
- let n = t[o];
415
- n.search.forEach((a) => {
416
- a.table = n, l.push(a);
417
- });
418
- }
419
- return l;
420
- });
421
- /**
422
- * 展开数据和架构信息
423
- */
424
- N(this, "expandSet", (t, l) => {
425
- if (!t)
426
- return l;
427
- for (let o = 0; o < t.length; o++) {
428
- let n = t[o], a = l[n.name];
429
- if (a)
430
- for (let s = 0; s < a.length; s++) {
431
- const d = a[s];
432
- d[`Old_${n.key}`] = d[n.key];
433
- }
434
- }
435
- return l;
436
- });
437
- /**
438
- * 展开架构信息
439
- */
440
- N(this, "expandSchema", (t) => {
441
- if (!t)
442
- return t;
443
- for (let l = 0; l < t.length; l++) {
444
- let o = t[l];
445
- for (let a = 0; a < o.fields.length; a++) {
446
- let s = o.fields[a], d = [];
447
- if (s.control.required && d.push({ required: !0, message: `${s.label}不能为空`, trigger: "change" }), s.length && s.type == "String") {
448
- let r = {
449
- max: s.length,
450
- message: `${s.label}不能超过${s.length}个字符`,
451
- trigger: "change"
452
- };
453
- d.push(r);
454
- }
455
- s.rules = d;
456
- }
457
- if (o.show) {
458
- let a = [];
459
- for (let s = 0; s < o.show.length; s++) {
460
- const d = o.show[s];
461
- let r = d.name ?? d, p = o.fields.find((c) => c.name == r);
462
- a.push(p);
463
- }
464
- o.show = a;
465
- }
466
- o.search = o.fields.filter((a) => a.search != null);
467
- let n = o.key.name ?? o.key;
468
- o.key = o.fields.find((a) => a.name == n);
469
- }
470
- return t;
471
- });
472
- /**
473
- * 填充搜索条件中不存在的搜索条件表单
474
- */
475
- N(this, "getConditionForm", (t, l) => {
476
- let o = {};
477
- if (l && (o = Dt.decodeObj(l)), !t)
478
- return o;
479
- for (let n = 0; n < t.length; n++) {
480
- let a = t[n];
481
- o[a.name] || (o[a.name] = {});
482
- for (let s = 0; s < a.search.length; s++) {
483
- const d = a.search[s];
484
- o[a.name][d.name] == null && (o[a.name][d.name] = null);
485
- }
486
- }
487
- return o;
488
- });
489
- }
490
- /**
491
- * 获取验证规则
492
- */
493
- getRules(t, l, o, n) {
494
- let a = [];
495
- if (o.rules.length > 0 && a.push(...o.rules), t.length == 0)
496
- return a;
497
- let s = t.filter((d) => d.table == l.name && d.index == n && d.fields.indexOf(o.name) > -1);
498
- if (s.length == 0)
499
- return a;
500
- for (let d = 0; d < s.length; d++) {
501
- let p = {
502
- message: `${s[d].message}`,
503
- trigger: "change",
504
- validator(c, g, v) {
505
- v(new Error());
506
- }
507
- };
508
- a.push(p);
509
- }
510
- return a;
511
- }
512
- }
513
- class zl {
514
- constructor() {
515
- /**
516
- * 获取文件图标
517
- */
518
- N(this, "getFileIcon", (t) => `./default/images/files/${tl.getExtension(t).replace(".", "")}.png`);
519
- }
520
- }
521
- class Dl {
522
- constructor() {
523
- //#region 属性
524
- /**
525
- * 存储所有窗口
526
- */
527
- N(this, "windows", []);
528
- }
529
- //#endregion
530
- /**
531
- * 加载窗口
532
- */
533
- async loadWindows(t) {
534
- let l = await t.getAsync("windows");
535
- l && (this.windows = l);
536
- }
537
- /**
538
- * 获取窗口状态
539
- */
540
- get(t) {
541
- return this.windows.find((o) => o.id == t);
542
- }
543
- /**
544
- * 保存窗口状态
545
- */
546
- async save(t, l, o) {
547
- let n = this.windows.find((a) => a.id == t);
548
- if (n) {
549
- let a = this.windows.indexOf(n);
550
- this.windows[a] = l;
551
- } else
552
- this.windows.push(l);
553
- o && await o.saveAsync("windows", this.windows);
554
- }
555
- /**
556
- * 删除窗口
557
- */
558
- remove(t) {
559
- let l = this.windows.find((o) => o.id == t);
560
- ze.remove(this.windows, l);
561
- }
562
- }
563
- let Ll = async () => {
564
- tt = new Rl();
565
- let _ = await tt.getSidebarWidth();
566
- ye = dl(new $l(_)), await ye.init(), Ue = new Cl(), El = new Sl(), Tl = new Vl(), de = new Ul(), Ol = new Il(), Wl = new zl(), Ne = new Dl();
567
- }, ye = {}, Ue = {}, El = {}, Tl = {}, tt = {}, Pl = new Ml(), de = {}, Ol = {}, Wl = {}, Ne = {};
568
- const Bl = {
569
- key: 0,
570
- class: "fa fa-copy"
571
- }, Nl = {
572
- key: 1,
573
- class: "fa fa-plus"
574
- }, Al = {
575
- key: 0,
576
- class: "fa fa-edit btn-icon"
577
- }, jl = {
578
- key: 1,
579
- class: "fa fa-plus"
580
- }, Hl = /* @__PURE__ */ f("i", { class: "fa fa-eye" }, null, -1), Fl = /* @__PURE__ */ f("i", { class: "fa fa-copy" }, null, -1), ql = /* @__PURE__ */ f("i", { class: "fa fa-trash-alt" }, null, -1), Yl = /* @__PURE__ */ f("i", { class: "fa fa-list" }, null, -1), It = /* @__PURE__ */ Y({
581
- __name: "Crud",
582
- props: /* @__PURE__ */ Ie({
583
- module: {},
584
- readonly: { type: Boolean },
585
- size: {},
586
- to: {}
587
- }, {
588
- modelValue: {},
589
- modelModifiers: {}
590
- }),
591
- emits: /* @__PURE__ */ Ie(["succeed"], ["update:modelValue"]),
592
- setup(_, { emit: t }) {
593
- let l = t, o = _, { readonly: n, module: a, size: s, to: d } = ne(o), r = je(_, "modelValue"), p = $({ url: null, type: null, name: null, visible: !1 }), c = (D) => {
594
- g(D);
595
- }, g = (D) => {
596
- p.value.url = D, p.value.visible = !0;
597
- }, v = () => {
598
- n.value ? r.value ? g(`/${a.value}/copy?id=${r.value}`) : g(`/${a.value}/insert`) : r.value ? g(`/${a.value}/update?id=${r.value}`) : g(`/${a.value}/insert`);
599
- }, w = (D) => {
600
- p.value.type = D.module.type, p.value.name = D.module.name;
601
- }, T = async (D) => {
602
- p.value.visible = !1, l("succeed", D, p.value.name);
603
- };
604
- return (D, I) => {
605
- const R = O("el-dropdown-item"), S = O("el-dropdown-menu"), H = O("el-dropdown"), te = O("el-drawer");
606
- return i(), b(G, null, [
607
- x(H, {
608
- "split-button": "",
609
- size: e(s),
610
- onCommand: e(c),
611
- onClick: e(v)
612
- }, {
613
- dropdown: h(() => [
614
- x(S, null, {
615
- default: h(() => [
616
- e(r) ? (i(), L(R, {
617
- key: 0,
618
- command: `/${e(a)}/detail?id=${e(r)}`
619
- }, {
620
- default: h(() => [
621
- Hl,
622
- B("详情 ")
623
- ]),
624
- _: 1
625
- }, 8, ["command"])) : W("", !0),
626
- e(r) && !e(n) ? (i(), L(R, {
627
- key: 1,
628
- command: `/${e(a)}/copy?id=${e(r)}`
629
- }, {
630
- default: h(() => [
631
- Fl,
632
- B("复制 ")
633
- ]),
634
- _: 1
635
- }, 8, ["command"])) : W("", !0),
636
- e(r) && !e(n) ? (i(), L(R, {
637
- key: 2,
638
- command: `/${e(a)}/delete?id=${e(r)}`
639
- }, {
640
- default: h(() => [
641
- ql,
642
- B("删除 ")
643
- ]),
644
- _: 1
645
- }, 8, ["command"])) : W("", !0),
646
- x(R, {
647
- command: `/${e(a)}/paging`
648
- }, {
649
- default: h(() => [
650
- Yl,
651
- B("列表")
652
- ]),
653
- _: 1
654
- }, 8, ["command"]),
655
- ee(D.$slots, "default")
656
- ]),
657
- _: 3
658
- })
659
- ]),
660
- default: h(() => [
661
- e(n) ? (i(), b(G, { key: 0 }, [
662
- e(r) ? (i(), b("i", Bl)) : (i(), b("i", Nl))
663
- ], 64)) : (i(), b(G, { key: 1 }, [
664
- e(r) ? (i(), b("i", Al)) : (i(), b("i", jl))
665
- ], 64))
666
- ]),
667
- _: 3
668
- }, 8, ["size", "onCommand", "onClick"]),
669
- (i(), L(pt, {
670
- to: e(d),
671
- disabled: !e(d)
672
- }, [
673
- x(te, {
674
- title: e(ot)(e(p).type, e(p).name),
675
- size: "60%",
676
- modelValue: e(p).visible,
677
- "onUpdate:modelValue": I[0] || (I[0] = (A) => e(p).visible = A)
678
- }, {
679
- default: h(() => [
680
- e(p).url ? (i(), L(e(We), {
681
- key: 0,
682
- ref: "pageRef",
683
- url: e(p).url,
684
- onLoaded: e(w),
685
- onSucceed: e(T),
686
- onClose: e(T)
687
- }, null, 8, ["url", "onLoaded", "onSucceed", "onClose"])) : W("", !0)
688
- ]),
689
- _: 1
690
- }, 8, ["title", "modelValue"])
691
- ], 8, ["to", "disabled"]))
692
- ], 64);
693
- };
694
- }
695
- }), Xl = /* @__PURE__ */ Y({
696
- __name: "Form",
697
- props: {
698
- id: {},
699
- store: {},
700
- form: {}
701
- },
702
- emits: ["loaded"],
703
- setup(_, { emit: t }) {
704
- let l = t, o = _, { id: n, store: a, form: s } = ne(o), d;
705
- return he(async () => {
706
- d = await He.provider.getDefault(a.value);
707
- let r = await d.getAsync(n.value);
708
- r && $e.mergeTo(s.value, r), l("loaded", s.value);
709
- }), be(() => s.value, (r, p) => {
710
- d && d.saveAsync(n.value, s.value);
711
- }, { deep: !0 }), (r, p) => ee(r.$slots, "default");
712
- }
713
- }), Kl = { class: "option-text" }, Gl = { class: "option-suffix" }, Ql = { class: "option-text" }, Jl = { class: "option-suffix" }, Zl = { class: "option-text" }, eo = { class: "option-suffix" }, to = /* @__PURE__ */ Y({
714
- __name: "Driver",
715
- props: {
716
- id: {},
717
- readonly: { type: Boolean, default: !1 },
718
- label: { type: Boolean, default: !0 },
719
- class: {},
720
- width: { default: 80 },
721
- inline: { type: Boolean },
722
- kind: {},
723
- form: {}
724
- },
725
- emits: ["loaded", "change", "succeed"],
726
- setup(_, { expose: t, emit: l }) {
727
- let o = l, n = _, { id: a, form: s, inline: d, label: r, width: p, readonly: c, kind: g } = ne(n), v = $([]), w = $(), T = $(), D = async (X) => {
728
- let E = Ce.apps.find((q) => q.value == X);
729
- await A(X, s.value.env), S(s.value.name), oe(), o("change", "app", X, E);
730
- }, I = async (X) => {
731
- let E = Ce.envs.find((q) => q.value == X);
732
- await A(s.value.app, X), S(s.value.name), oe(), o("change", "env", X, E);
733
- }, R = (X) => {
734
- S(X);
735
- }, S = (X) => {
736
- let E = v.value.find((q) => q.text == X);
737
- if (E == null) {
738
- s.value.id = null, s.value.name = null, s.value.type = null;
739
- return;
740
- }
741
- s.value.id = E.value, s.value.type = E.suffix;
742
- }, H = async (X) => {
743
- Ce.loadApps(!0).then(), await A(s.value.app, s.value.env), oe();
744
- }, te = (X, E) => {
745
- if (!T.value)
746
- return !1;
747
- T.value.keyboard(X, E);
748
- }, A = async (X, E) => {
749
- if (!g.value)
750
- return;
751
- let q = {
752
- conditions: [
753
- { name: "App", value: X },
754
- { name: "Env", value: E },
755
- { name: "Kind", value: g.value }
756
- ]
757
- };
758
- return st.post("/app/driver", q).then((se) => {
759
- v.value = se.data;
760
- });
761
- }, oe = () => {
762
- o("loaded", Ce.apps, Ce.envs, v.value);
763
- }, re = async () => {
764
- await Promise.all([Ce.loadApps(), Ce.loadEnvs(), A(s.value.app, s.value.env)]), oe();
765
- };
766
- he(() => {
767
- a.value || re();
768
- });
769
- let fe = ce(() => ve.getClass(n.class, c.value ? "readonly" : null, d.value ? "inline" : null));
770
- return be(() => s.value.id, (X, E) => {
771
- let q = v.value.find((se) => se.value == X);
772
- o("change", "name", s.value.name, q);
773
- }), t({ keyboard: te }), (X, E) => {
774
- const q = O("el-option"), se = O("el-select"), U = O("el-form-item"), m = O("el-form");
775
- return i(), b(G, null, [
776
- e(a) ? (i(), L(Xl, {
777
- key: 0,
778
- store: "driver",
779
- id: e(a),
780
- form: e(s),
781
- onLoaded: e(re)
782
- }, null, 8, ["id", "form", "onLoaded"])) : W("", !0),
783
- x(m, {
784
- ref_key: "driverRef",
785
- ref: w,
786
- class: le(["ha-driver", e(fe)]),
787
- inline: e(d),
788
- "label-width": e(d) ? null : e(p)
789
- }, {
790
- default: h(() => [
791
- x(U, {
792
- class: "app",
793
- label: e(r) ? "应用" : null
794
- }, {
795
- default: h(() => [
796
- x(se, {
797
- filterable: "",
798
- clearable: "",
799
- placeholder: "请选择应用",
800
- onChange: e(D),
801
- modelValue: e(s).app,
802
- "onUpdate:modelValue": E[0] || (E[0] = (z) => e(s).app = z)
803
- }, {
804
- default: h(() => [
805
- (i(!0), b(G, null, ae(e(Ce).apps, (z) => (i(), L(q, {
806
- label: `${z.text}(${z.suffix})`,
807
- value: z.value,
808
- key: z.value
809
- }, {
810
- default: h(() => [
811
- f("span", Kl, M(z.text), 1),
812
- f("span", Gl, "(" + M(z.suffix) + ")", 1)
813
- ]),
814
- _: 2
815
- }, 1032, ["label", "value"]))), 128))
816
- ]),
817
- _: 1
818
- }, 8, ["onChange", "modelValue"]),
819
- e(c) ? W("", !0) : (i(), L(It, {
820
- key: 0,
821
- module: "ctl_app",
822
- onSucceed: e(H),
823
- modelValue: e(s).app,
824
- "onUpdate:modelValue": E[1] || (E[1] = (z) => e(s).app = z)
825
- }, null, 8, ["onSucceed", "modelValue"]))
826
- ]),
827
- _: 1
828
- }, 8, ["label"]),
829
- x(U, {
830
- class: "env",
831
- label: e(r) ? "环境" : null
832
- }, {
833
- default: h(() => [
834
- x(se, {
835
- clearable: "",
836
- filterable: "",
837
- placeholder: "请选择环境",
838
- onChange: e(I),
839
- modelValue: e(s).env,
840
- "onUpdate:modelValue": E[2] || (E[2] = (z) => e(s).env = z)
841
- }, {
842
- default: h(() => [
843
- (i(!0), b(G, null, ae(e(Ce).envs, (z) => (i(), L(q, {
844
- value: z.value,
845
- label: `${z.text}(${z.suffix})`,
846
- key: z.value
847
- }, {
848
- default: h(() => [
849
- f("span", Ql, M(z.text), 1),
850
- f("span", Jl, "(" + M(z.suffix) + ")", 1)
851
- ]),
852
- _: 2
853
- }, 1032, ["value", "label"]))), 128))
854
- ]),
855
- _: 1
856
- }, 8, ["onChange", "modelValue"])
857
- ]),
858
- _: 1
859
- }, 8, ["label"]),
860
- e(g) ? (i(), L(U, {
861
- key: 0,
862
- class: "name",
863
- label: e(r) ? e(Re)("DriverKind", e(g)) : null
864
- }, {
865
- default: h(() => [
866
- x(se, {
867
- clearable: "",
868
- filterable: "",
869
- placeholder: `请选择${e(Re)("DriverKind", e(g))}`,
870
- onChange: e(R),
871
- modelValue: e(s).name,
872
- "onUpdate:modelValue": E[3] || (E[3] = (z) => e(s).name = z)
873
- }, {
874
- default: h(() => [
875
- (i(!0), b(G, null, ae(e(v), (z) => (i(), L(q, {
876
- value: z.text,
877
- label: `${z.text}(${z.suffix})`,
878
- key: z.value
879
- }, {
880
- default: h(() => [
881
- ee(X.$slots, "driver", { option: z }, () => [
882
- f("span", Zl, M(z.text), 1),
883
- f("span", eo, "(" + M(z.suffix) + ")", 1)
884
- ])
885
- ]),
886
- _: 2
887
- }, 1032, ["value", "label"]))), 128))
888
- ]),
889
- _: 3
890
- }, 8, ["placeholder", "onChange", "modelValue"]),
891
- e(c) ? W("", !0) : (i(), L(It, {
892
- key: 0,
893
- module: "ctl_driver",
894
- onSucceed: e(H),
895
- modelValue: e(s).id,
896
- "onUpdate:modelValue": E[4] || (E[4] = (z) => e(s).id = z)
897
- }, null, 8, ["onSucceed", "modelValue"]))
898
- ]),
899
- _: 3
900
- }, 8, ["label"])) : W("", !0),
901
- ee(X.$slots, "default")
902
- ]),
903
- _: 3
904
- }, 8, ["class", "inline", "label-width"])
905
- ], 64);
906
- };
907
- }
908
- });
909
- let lo = Le(() => import("./Column-K0p0pVuf.js")), oo = Le(() => import("./Custom-DS1OrDHT.js")), so = Le(() => import("./Delete-HzVURBlh.js")), ao = Le(() => import("./Index-ZOfKMgat.js")), no = Le(() => import("./Paging-CBgVct8q.js")), Ze = Le(() => import("./Single-CCVi3Pcj.js")), ro = Le(() => import("./List-gNI3y_wH.js"));
910
- const io = {
911
- components: {
912
- CopyPage: Ze,
913
- ColumnPage: lo,
914
- CustomPage: oo,
915
- DeletePage: so,
916
- DetailPage: Ze,
917
- IndexPage: ao,
918
- InsertPage: Ze,
919
- PagingPage: no,
920
- ListPage: ro,
921
- UpdatePage: Ze
922
- }
923
- }, We = /* @__PURE__ */ Y({
924
- ...io,
925
- __name: "Index",
926
- props: {
927
- url: {},
928
- win: {}
929
- },
930
- emits: ["navigate", "loaded", "succeed", "close"],
931
- setup(_, { expose: t, emit: l }) {
932
- let o = l, n = _, { url: a, win: s } = ne(n), d = $(), r = $(), p = $(), c = $(!0), g = $(!0), v = $({ title: null, content: null }), w = $({ type: null, view: null }), T = new Fe(), D = "index-" + Lt.getUniqueId(), I, R = () => {
933
- var m;
934
- if (g.value) {
935
- te(a.value, !0);
936
- return;
937
- }
938
- let U = (m = r.value) == null ? void 0 : m.refresh;
939
- if (!U) {
940
- Me.warning("请在子组件实现并暴露refresh方法来实现刷新功能");
941
- return;
942
- }
943
- U();
944
- }, S = (U) => {
945
- var z;
946
- let m = (z = r.value) == null ? void 0 : z.beforeClose;
947
- m && m(U);
948
- }, H = (U, m) => {
949
- I = m, o("navigate", U);
950
- }, te = (U, m = !1, z = null) => {
951
- c.value = !0, g.value = m, v.value.title = null, v.value.content = null;
952
- let me = ue.getUrl(U, { schema: "" });
953
- st.get(me).then((k) => {
954
- p.value = k, g.value = !1, o("loaded", k.data), z && z(k);
955
- }).catch((k) => {
956
- throw v.value.title = k.message, v.value.content = k.stack, z && z(), k;
957
- }).finally(() => {
958
- c.value = !1;
959
- });
960
- }, A = (U, m) => {
961
- de.toBackUrl(), o("succeed", U, m);
962
- }, oe = () => {
963
- de.toBackUrl(), o("close");
964
- }, re = (U) => {
965
- c.value = !1, o("loaded", U);
966
- }, fe = (U, m) => {
967
- if (!r.value || !r.value.keyboard)
968
- return !1;
969
- r.value.keyboard(U, m);
970
- }, X = (U) => {
971
- if (!r.value || !r.value.handler)
972
- return !1;
973
- r.value.handler(U);
974
- }, E = (U) => {
975
- U[0].contentRect.width <= 650 ? d.value.classList.add("page--small") : d.value.classList.remove("page--small"), r.value && r.value.resize && r.value.resize(U[0]);
976
- }, q = (U) => {
977
- var k;
978
- let m = Ue.getComponent(U, "view");
979
- if (m) {
980
- w.value.type = "custom", w.value.view = m, g.value = !1;
981
- return;
982
- }
983
- let z = ["insert", "copy", "update", "detail", "paging", "list", "delete"], me = (k = ue.getLastSegment(U)) == null ? void 0 : k.toLowerCase();
984
- if (z.includes(me)) {
985
- if (w.value.type = me, !r.value) {
986
- te(U, !0);
987
- return;
988
- }
989
- if (!r.value.shouldLoad || !r.value.shouldLoad(U))
990
- return;
991
- let y = r.value.shouldSpin && r.value.shouldSpin(U);
992
- te(U, y, I), I = null;
993
- return;
994
- }
995
- w.value.type = "column", w.value.view = Ue.getComponent(U, "partial"), c.value = !1, g.value = !1;
996
- };
997
- q(a.value), he(() => {
998
- Ue.addPage(D, {}), T.resize(d.value, E);
999
- }), vt(() => {
1000
- Ue.removePage(D), T.dispose();
1001
- });
1002
- let se = ce(() => {
1003
- let U = ue.getRoute(a.value);
1004
- return U.fullPath = a.value, U;
1005
- });
1006
- return be(() => a.value, (U, m) => {
1007
- q(U);
1008
- }), t({ refresh: R, beforeClose: S, keyboard: fe, handler: X }), (U, m) => {
1009
- const z = O("custom-page"), me = O("column-page");
1010
- return i(), b("div", {
1011
- ref_key: "rootRef",
1012
- ref: d,
1013
- class: "ha-page"
1014
- }, [
1015
- x(e(ll), {
1016
- modelValue: e(c),
1017
- "onUpdate:modelValue": m[0] || (m[0] = (k) => we(c) ? c.value = k : c = k)
1018
- }, null, 8, ["modelValue"]),
1019
- e(g) ? (i(), L(e(Lo), {
1020
- key: 0,
1021
- title: e(v).title,
1022
- content: e(v).content,
1023
- onRetry: e(R)
1024
- }, null, 8, ["title", "content", "onRetry"])) : e(w).type == "custom" ? (i(), L(z, {
1025
- key: 1,
1026
- ref_key: "pageRef",
1027
- ref: r,
1028
- url: e(a),
1029
- win: e(s),
1030
- view: e(w).view,
1031
- onLoaded: e(re),
1032
- onNavigate: e(H)
1033
- }, null, 8, ["url", "win", "view", "onLoaded", "onNavigate"])) : e(w).type == "column" ? (i(), L(me, {
1034
- key: 2,
1035
- ref_key: "pageRef",
1036
- ref: r,
1037
- url: e(a),
1038
- view: e(w).view,
1039
- onLoaded: e(re),
1040
- onNavigate: e(H)
1041
- }, null, 8, ["url", "view", "onLoaded", "onNavigate"])) : (i(), L(at(`${e(w).type}-page`), {
1042
- key: 3,
1043
- ref_key: "pageRef",
1044
- ref: r,
1045
- url: e(a),
1046
- base: e(p),
1047
- route: e(se),
1048
- onNavigate: e(H),
1049
- onLoad: e(te),
1050
- onSucceed: e(A),
1051
- onClose: e(oe)
1052
- }, null, 40, ["url", "base", "route", "onNavigate", "onLoad", "onSucceed", "onClose"]))
1053
- ], 512);
1054
- };
1055
- }
1056
- }), Oa = /* @__PURE__ */ Y({
1057
- __name: "Drawer",
1058
- props: /* @__PURE__ */ Ie({
1059
- to: {},
1060
- url: {}
1061
- }, {
1062
- modelValue: { type: Boolean },
1063
- modelModifiers: {}
1064
- }),
1065
- emits: /* @__PURE__ */ Ie(["succeed", "navigate", "update:modelValue"], ["update:modelValue"]),
1066
- setup(_, { emit: t }) {
1067
- let l = t, o = _, { to: n, url: a } = ne(o), s = je(_, "modelValue"), d = $({ type: null, name: null }), r = $(800), p = (v) => {
1068
- d.value.type = v.module.type, d.value.name = v.module.name;
1069
- }, c = (v) => {
1070
- l("navigate", v);
1071
- }, g = (v) => {
1072
- l("update:modelValue", !1), l("succeed", v, d.value.name);
1073
- };
1074
- return (v, w) => {
1075
- const T = O("el-drawer");
1076
- return i(), L(pt, {
1077
- to: e(n),
1078
- disabled: !e(n)
1079
- }, [
1080
- x(T, {
1081
- title: e(ot)(e(d).type, e(d).name),
1082
- size: e(tt).getDrawerWidth(e(r)),
1083
- modelValue: e(s),
1084
- "onUpdate:modelValue": w[0] || (w[0] = (D) => we(s) ? s.value = D : s = D)
1085
- }, {
1086
- default: h(() => [
1087
- e(a) ? (i(), L(e(We), {
1088
- key: 0,
1089
- ref: "pageRef",
1090
- url: e(a),
1091
- onLoaded: e(p),
1092
- onNavigate: e(c),
1093
- onSucceed: e(g),
1094
- onClose: e(g)
1095
- }, null, 8, ["url", "onLoaded", "onNavigate", "onSucceed", "onClose"])) : W("", !0)
1096
- ]),
1097
- _: 1
1098
- }, 8, ["title", "size", "modelValue"])
1099
- ], 8, ["to", "disabled"]);
1100
- };
1101
- }
1102
- }), uo = {
1103
- key: 0,
1104
- class: "desktop-feedback"
1105
- }, co = /* @__PURE__ */ f("i", { class: "fa fa-plus" }, null, -1), mo = /* @__PURE__ */ f("i", { class: "fa fa-list" }, null, -1), po = /* @__PURE__ */ Y({
1106
- __name: "Feedback",
1107
- props: {
1108
- bottom: Number
1109
- },
1110
- setup(_, { expose: t }) {
1111
- let l = $({ visible: !1, current: "add", type: null, name: null, url: null }), o = $(), n = _, { bottom: a } = ne(n), s = (c) => {
1112
- l.value.url = c;
1113
- }, d = () => {
1114
- l.value.visible = !1;
1115
- }, r = (c) => {
1116
- l.value.type = c.module.type, l.value.name = c.module.name;
1117
- };
1118
- return t({ show: (c, g) => {
1119
- l.value.current = c, l.value.url = g, l.value.visible = !0;
1120
- } }), (c, g) => e(l).visible ? (i(), b("div", uo, [
1121
- x(e(yt), {
1122
- ref_key: "feedbackRef",
1123
- ref: o,
1124
- id: "feedback",
1125
- title: e(ot)(e(l).type, e(l).name),
1126
- bottom: e(a),
1127
- onClose: e(d),
1128
- modelValue: e(l).visible,
1129
- "onUpdate:modelValue": g[3] || (g[3] = (v) => e(l).visible = v)
1130
- }, {
1131
- side: h(() => [
1132
- x(e(At), {
1133
- modelValue: e(l).current,
1134
- "onUpdate:modelValue": g[2] || (g[2] = (v) => e(l).current = v)
1135
- }, {
1136
- default: h(() => [
1137
- x(e(lt), {
1138
- name: "add",
1139
- onClick: g[0] || (g[0] = (v) => e(s)("/ctl_feedback/insert"))
1140
- }, {
1141
- default: h(() => [
1142
- co,
1143
- B(" " + M(e(j)("feedback.create")), 1)
1144
- ]),
1145
- _: 1
1146
- }),
1147
- x(e(lt), {
1148
- name: "my",
1149
- onClick: g[1] || (g[1] = (v) => e(s)("/ctl_feedback/paging"))
1150
- }, {
1151
- default: h(() => [
1152
- mo,
1153
- B(" " + M(e(j)("feedback.my_feedback")), 1)
1154
- ]),
1155
- _: 1
1156
- })
1157
- ]),
1158
- _: 1
1159
- }, 8, ["modelValue"])
1160
- ]),
1161
- default: h(() => [
1162
- e(l).url ? (i(), L(e(We), {
1163
- key: 0,
1164
- url: e(l).url,
1165
- onLoaded: e(r),
1166
- onClose: e(d)
1167
- }, null, 8, ["url", "onLoaded", "onClose"])) : W("", !0)
1168
- ]),
1169
- _: 1
1170
- }, 8, ["title", "bottom", "onClose", "modelValue"])
1171
- ])) : W("", !0);
1172
- }
1173
- }), vo = {
1174
- key: 0,
1175
- class: "ha-layout-switch"
1176
- }, Wa = /* @__PURE__ */ Y({
1177
- __name: "Switch",
1178
- props: {
1179
- table: { type: Object, required: !0 },
1180
- layout: { type: Object, required: !0 }
1181
- },
1182
- emits: ["layout-change"],
1183
- setup(_, { emit: t }) {
1184
- let l = t, o = _, { table: n, layout: a } = ne(o), s = $(), d = (p) => {
1185
- l("layout-change", p);
1186
- };
1187
- return (() => {
1188
- s.value = a.value.type;
1189
- })(), (p, c) => {
1190
- const g = O("el-radio-button"), v = O("el-radio-group");
1191
- return e(n).layouts.length > 1 ? (i(), b("div", vo, [
1192
- x(v, {
1193
- size: "small",
1194
- onChange: e(d),
1195
- modelValue: e(s),
1196
- "onUpdate:modelValue": c[0] || (c[0] = (w) => we(s) ? s.value = w : s = w)
1197
- }, {
1198
- default: h(() => [
1199
- (i(!0), b(G, null, ae(e(n).layouts, ({ type: w }) => (i(), L(g, {
1200
- type: "primary",
1201
- value: w
1202
- }, {
1203
- default: h(() => [
1204
- B(M(e(j)(`sys.table.layout.${w}`)), 1)
1205
- ]),
1206
- _: 2
1207
- }, 1032, ["value"]))), 256))
1208
- ]),
1209
- _: 1
1210
- }, 8, ["onChange", "modelValue"])
1211
- ])) : W("", !0);
1212
- };
1213
- }
1214
- }), fo = { class: "welcome-tool" }, ht = /* @__PURE__ */ Y({
1215
- __name: "Welcome",
1216
- props: {
1217
- bottom: Number
1218
- },
1219
- emits: [],
1220
- setup(_, { emit: t }) {
1221
- let l = $({ ref: null, never: !1 }), o = _, { bottom: n } = ne(o), a = $({ width: 600, height: 400 }), s = [], d = $(), r = $(!0), p = () => {
1222
- let g = ct.random(0, s.length);
1223
- d.value = s[g], ze.remove(s, g);
1224
- }, c = () => {
1225
- r.value = !1, l.value.never && _e.saveEntity("welcomed", !0);
1226
- };
1227
- return he(() => {
1228
- let g = ke[K.language].tips;
1229
- g && (s = Object.keys(g)), r.value = !_e.getEntity("welcomed"), p();
1230
- }), (g, v) => {
1231
- const w = O("el-alert"), T = O("el-checkbox"), D = O("el-button");
1232
- return e(r) ? (i(), L(e(yt), {
1233
- key: 0,
1234
- ref: (I) => e(l).ref = I,
1235
- id: "welcome",
1236
- class: "ha-welcome",
1237
- title: e(j)("sys.tips_title"),
1238
- options: e(a),
1239
- bottom: e(n),
1240
- modelValue: e(r),
1241
- "onUpdate:modelValue": v[1] || (v[1] = (I) => we(r) ? r.value = I : r = I)
1242
- }, {
1243
- footer: h(() => [
1244
- x(T, {
1245
- modelValue: e(l).never,
1246
- "onUpdate:modelValue": v[0] || (v[0] = (I) => e(l).never = I)
1247
- }, {
1248
- default: h(() => [
1249
- B("不再提示")
1250
- ]),
1251
- _: 1
1252
- }, 8, ["modelValue"]),
1253
- f("div", fo, [
1254
- e(s).length ? (i(), L(D, {
1255
- key: 0,
1256
- type: "primary",
1257
- plain: "",
1258
- onClick: e(p)
1259
- }, {
1260
- default: h(() => [
1261
- B("下一条")
1262
- ]),
1263
- _: 1
1264
- }, 8, ["onClick"])) : W("", !0),
1265
- x(D, { onClick: e(c) }, {
1266
- default: h(() => [
1267
- B("关闭")
1268
- ]),
1269
- _: 1
1270
- }, 8, ["onClick"])
1271
- ])
1272
- ]),
1273
- default: h(() => [
1274
- x(w, {
1275
- title: e(j)("sys.welcome"),
1276
- type: "info",
1277
- style: { "margin-bottom": "10px" },
1278
- "show-icon": ""
1279
- }, null, 8, ["title"]),
1280
- f("div", null, M(e(j)(`tips.${e(d)}`)), 1)
1281
- ]),
1282
- _: 1
1283
- }, 8, ["title", "options", "bottom", "modelValue"])) : W("", !0);
1284
- };
1285
- }
1286
- }), ho = { class: "ha-captcha" }, go = { class: "image" }, _o = {
1287
- class: "content",
1288
- droppable: "true"
1289
- }, yo = ["src"], bo = ["src"], wo = /* @__PURE__ */ f("i", { class: "fa fa-arrow-right" }, null, -1), ko = [
1290
- wo
1291
- ], xo = /* @__PURE__ */ f("div", { class: "handle-text" }, "向右滑动填充拼图", -1), Ba = /* @__PURE__ */ Y({
1292
- __name: "Captcha",
1293
- props: {
1294
- content: String,
1295
- jigsaw: String
1296
- },
1297
- emits: ["refresh", "validate"],
1298
- setup(_, { emit: t }) {
1299
- let l = t, o = $(!1), n = $(!1), a = $(!1), s = 0, d = 0, r = $(), p = $(), c = $(), g = (R) => {
1300
- r.value.style.left = c.value.style.left = `${R}px`, p.value.style.width = `${R}px`, s = R;
1301
- }, v = () => {
1302
- l("refresh");
1303
- }, w = (R) => {
1304
- d = R.clientX - R.target.offsetLeft, o.value = !0;
1305
- }, T = (R) => {
1306
- if (o.value) {
1307
- let H = R.clientX - d;
1308
- H < 0 && (H = 0), H > 500 && (H = 500), g(H);
1309
- }
1310
- }, D = (R) => {
1311
- o.value && (l("validate", s), o.value = !1);
1312
- }, I = () => {
1313
- c.value.addEventListener("mousedown", w), document.addEventListener("mousemove", T), document.addEventListener("mouseup", D);
1314
- };
1315
- return he(() => {
1316
- I();
1317
- }), nt(() => {
1318
- c.value.removeEventListener("mousedown", w), document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", D);
1319
- }), (R, S) => (i(), b("div", ho, [
1320
- f("div", go, [
1321
- f("div", _o, [
1322
- f("img", {
1323
- src: _.content,
1324
- alt: "验证码"
1325
- }, null, 8, yo)
1326
- ]),
1327
- f("div", {
1328
- ref_key: "jigsawRef",
1329
- ref: r,
1330
- class: "jigsaw"
1331
- }, [
1332
- f("img", {
1333
- src: _.jigsaw,
1334
- alt: "拼图"
1335
- }, null, 8, bo)
1336
- ], 512),
1337
- f("i", {
1338
- class: "fa fa-refresh image-refresh",
1339
- onClick: S[0] || (S[0] = //@ts-ignore
1340
- (...H) => e(v) && e(v)(...H))
1341
- })
1342
- ]),
1343
- f("div", {
1344
- class: le(["handle", { moving: e(o), error: e(n), validating: e(a) }])
1345
- }, [
1346
- f("div", {
1347
- ref_key: "handlePackRef",
1348
- ref: p,
1349
- class: "handle-pack"
1350
- }, null, 512),
1351
- f("div", {
1352
- ref_key: "arrowRef",
1353
- ref: c,
1354
- class: "handle-arrow"
1355
- }, ko, 512),
1356
- xo
1357
- ], 2)
1358
- ]));
1359
- }
1360
- }), $o = {
1361
- id: "particles",
1362
- class: "ha-particles"
1363
- }, Na = /* @__PURE__ */ Y({
1364
- __name: "Particles",
1365
- setup(_) {
1366
- $();
1367
- let t = $(), l = (o) => {
1368
- if (!o)
1369
- return;
1370
- let n = "rgb(149,167,224)";
1371
- o == "dark" && (n = "rgb(141,158,180)"), n = n.replace("rgb(", "").replace(")", ""), t.value = { color: n, pointColor: n, count: 88, zIndex: 1 };
1372
- };
1373
- return he(() => {
1374
- l(K.theme);
1375
- }), be(() => K.theme, (o, n) => {
1376
- l(o);
1377
- }), (o, n) => (i(), b("div", $o));
1378
- }
1379
- }), Aa = /* @__PURE__ */ Y({
1380
- __name: "Table",
1381
- props: /* @__PURE__ */ Ie({
1382
- data: {},
1383
- interval: {},
1384
- sort: {},
1385
- autoHeight: { type: Boolean }
1386
- }, {
1387
- page: {},
1388
- pageModifiers: {},
1389
- size: {},
1390
- sizeModifiers: {}
1391
- }),
1392
- emits: /* @__PURE__ */ Ie(["row-click", "page-change", "size-change", "sort-change"], ["update:page", "update:size"]),
1393
- setup(_, { expose: t, emit: l }) {
1394
- let o = l, n = _, { data: a, interval: s, sort: d, autoHeight: r } = ne(n), p = je(_, "page"), c = je(_, "size"), g = $(["descending", "ascending", null]), v = $([]), w = null, T = $(a.value.length), D = $(), I = $(), R = $(), S = (U) => {
1395
- o("row-click", U);
1396
- }, H = (U) => {
1397
- o("page-change", U), ut(() => {
1398
- E();
1399
- });
1400
- }, te = (U) => {
1401
- o("size-change", U), ut(() => {
1402
- E();
1403
- });
1404
- }, A = ({ column: U, prop: m, order: z }) => {
1405
- o("sort-change", { prop: m, order: z }), ut(() => {
1406
- E();
1407
- });
1408
- }, oe = (U) => {
1409
- D.value.setCurrentRow(U);
1410
- }, re = () => {
1411
- if (!r.value)
1412
- return;
1413
- let U = D.value.$el, m = U.parentElement, z = ze.from(m.children), me = ve.filterStyle(z, (ie) => ie.position == "fixed" || ie.position == "absolute"), k = [U, ...me], y = ze.except(z, k), u = ve.getHeight(y), Q = ve.getAvailableHeight(m) - u;
1414
- R.value = `${Q}px`;
1415
- }, fe = (U) => {
1416
- re();
1417
- }, X = () => {
1418
- let U;
1419
- d.value && (d.value.order == "ascending" ? U = "asc" : d.value.order == "descending" ? U = "desc" : U = null);
1420
- let m = ze.orderBy(a.value, (me) => {
1421
- let k = ol.getValue(me, d.value.prop);
1422
- return ct.getNumber(k);
1423
- }, U);
1424
- return ct.filterPage(m, p.value, c.value);
1425
- }, E = () => {
1426
- v.value = X(), T.value = a.value.length;
1427
- }, q = () => {
1428
- w == null || w.interval(s.value, E);
1429
- }, se = () => {
1430
- E(), w == null || w.dispose();
1431
- };
1432
- return he(async () => {
1433
- re(), E(), s.value == null ? be(() => a.value, () => {
1434
- E();
1435
- }, { deep: !0 }) : w = await He.task.create("Memory");
1436
- }), nt(() => {
1437
- se();
1438
- }), t({ selectRow: oe, resize: fe, update: E, start: q, stop: se }), (U, m) => {
1439
- const z = O("el-table"), me = O("el-pagination");
1440
- return i(), b(G, null, [
1441
- x(z, {
1442
- ref_key: "tableRef",
1443
- ref: D,
1444
- class: "ha-table",
1445
- "show-overflow-tooltip": "",
1446
- "highlight-current-row": "",
1447
- border: "",
1448
- size: "small",
1449
- "max-height": e(R),
1450
- data: e(v),
1451
- "default-sort": e(d),
1452
- onRowClick: e(S),
1453
- onSortChange: e(A)
1454
- }, {
1455
- empty: h(() => [
1456
- B("No Data")
1457
- ]),
1458
- default: h(() => [
1459
- ee(U.$slots, "default", { sortOrders: e(g) }, () => [
1460
- B(" 请添加列 ")
1461
- ])
1462
- ]),
1463
- _: 3
1464
- }, 8, ["max-height", "data", "default-sort", "onRowClick", "onSortChange"]),
1465
- x(me, {
1466
- ref_key: "paginationRef",
1467
- ref: I,
1468
- layout: "total,prev,pager,next,jumper,sizes",
1469
- total: e(T),
1470
- "page-sizes": [10, 50, 500, 5e3, 5e4, 5e5],
1471
- "current-page": e(p),
1472
- "page-size": e(c),
1473
- onCurrentChange: e(H),
1474
- onSizeChange: e(te)
1475
- }, null, 8, ["total", "current-page", "page-size", "onCurrentChange", "onSizeChange"])
1476
- ], 64);
1477
- };
1478
- }
1479
- }), Co = ["onMouseenter"], ja = /* @__PURE__ */ Y({
1480
- __name: "TableColumn",
1481
- props: {
1482
- prop: { type: String },
1483
- label: { type: String },
1484
- width: { type: Number }
1485
- },
1486
- setup(_) {
1487
- let t = _, { prop: l, label: o, width: n } = ne(t), a = $(!1), s = (d, r) => {
1488
- let p = d.target.children[0], c = ve.getWidth(p) + 16, g = r.realWidth || r.width;
1489
- a.value = c > g;
1490
- };
1491
- return (d, r) => {
1492
- const p = O("el-tooltip"), c = O("el-table-column");
1493
- return i(), L(c, {
1494
- label: e(o),
1495
- prop: e(l),
1496
- width: e(n)
1497
- }, {
1498
- header: h((g) => [
1499
- x(p, {
1500
- placement: "top",
1501
- content: e(o),
1502
- disabled: !e(a)
1503
- }, {
1504
- default: h(() => [
1505
- f("span", {
1506
- onMouseenter: (v) => e(s)(v, g.column)
1507
- }, [
1508
- f("span", null, M(e(o)), 1)
1509
- ], 40, Co)
1510
- ]),
1511
- _: 2
1512
- }, 1032, ["content", "disabled"])
1513
- ]),
1514
- default: h((g) => [
1515
- ee(d.$slots, "default", { scope: g }, () => [
1516
- B(M(g.row[e(l)]), 1)
1517
- ])
1518
- ]),
1519
- _: 3
1520
- }, 8, ["label", "prop", "width"]);
1521
- };
1522
- }
1523
- }), So = {
1524
- key: 0,
1525
- class: "ha-spinner is-error"
1526
- }, Vo = { class: "spinner-title" }, Ro = {
1527
- key: 0,
1528
- class: "spinner-content"
1529
- }, Mo = { class: "stack" }, Uo = {
1530
- key: 1,
1531
- class: "ha-spinner is-loading"
1532
- }, Io = { class: "spinner-loading" }, zo = /* @__PURE__ */ f("div", { class: "spinner-dots" }, [
1533
- /* @__PURE__ */ f("i"),
1534
- /* @__PURE__ */ f("i"),
1535
- /* @__PURE__ */ f("i"),
1536
- /* @__PURE__ */ f("i")
1537
- ], -1), Do = { class: "spinner-text" }, Lo = /* @__PURE__ */ Y({
1538
- __name: "Spinner",
1539
- props: {
1540
- title: { type: String },
1541
- //错误标题
1542
- content: { type: String }
1543
- //错误消息
1544
- },
1545
- emits: ["retry"],
1546
- setup(_, { emit: t }) {
1547
- let l = t, o = _, { title: n, content: a } = ne(o), s = () => {
1548
- l("retry");
1549
- };
1550
- return (d, r) => e(n) || e(a) ? (i(), b("div", So, [
1551
- f("div", Vo, [
1552
- B(M(e(n)), 1),
1553
- f("a", {
1554
- class: "retry",
1555
- onClick: r[0] || (r[0] = //@ts-ignore
1556
- (...p) => e(s) && e(s)(...p))
1557
- }, M(e(j)("common.retry")), 1)
1558
- ]),
1559
- e(a) ? (i(), b("div", Ro, [
1560
- f("div", Mo, M(e(a)), 1)
1561
- ])) : W("", !0)
1562
- ])) : (i(), b("div", Uo, [
1563
- f("div", Io, [
1564
- zo,
1565
- f("div", Do, M(e(j)("common.loading")) + "...", 1)
1566
- ])
1567
- ]));
1568
- }
1569
- }), Eo = { class: "ha-resizer" }, Ot = /* @__PURE__ */ Y({
1570
- __name: "Resizer",
1571
- props: {
1572
- width: { type: Number, default: null }
1573
- //默认无宽度
1574
- },
1575
- emits: ["resize"],
1576
- setup(_, { emit: t }) {
1577
- let l = t, o = _, { width: n } = ne(o), a = $(!1), s = null, d = null, r = (v) => {
1578
- v.preventDefault(), a.value = !0, s = v, d = n.value, document.addEventListener("mousemove", p), document.addEventListener("mouseup", c);
1579
- }, p = (v) => {
1580
- let w = v.clientX - s.clientX, T = d + w;
1581
- g(T);
1582
- }, c = (v) => {
1583
- a.value = !1, s = null, d = null, document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", c);
1584
- }, g = (v) => {
1585
- l("resize", v);
1586
- };
1587
- return (v, w) => (i(), b("div", Eo, [
1588
- e(n) != null ? (i(), b("div", {
1589
- key: 0,
1590
- class: "resizer-left",
1591
- style: xe({ width: `${e(n)}px` })
1592
- }, [
1593
- ee(v.$slots, "left")
1594
- ], 4)) : W("", !0),
1595
- f("div", {
1596
- class: "resizer-right",
1597
- style: xe({ width: `calc(100% - ${e(n) ?? 0}px)` })
1598
- }, [
1599
- ee(v.$slots, "default")
1600
- ], 4),
1601
- e(n) != null ? (i(), b("div", {
1602
- key: 1,
1603
- class: le(["resizer-handle", { dragging: e(a) }]),
1604
- onMousedown: w[0] || (w[0] = //@ts-ignore
1605
- (...T) => e(r) && e(r)(...T)),
1606
- style: xe({ left: `${e(n)}px` })
1607
- }, null, 38)) : W("", !0)
1608
- ]));
1609
- }
1610
- }), To = { class: "panel-header" }, Po = { class: "header-title" }, Oo = { class: "header-operation" }, Wo = {
1611
- key: 0,
1612
- class: "panel-container"
1613
- }, Bo = {
1614
- key: 0,
1615
- class: "panel-content"
1616
- }, No = {
1617
- key: 1,
1618
- class: "panel-footer"
1619
- }, Ha = /* @__PURE__ */ Y({
1620
- __name: "Panel",
1621
- props: {
1622
- title: { type: String },
1623
- dark: { type: Boolean, default: !1 }
1624
- },
1625
- setup(_) {
1626
- let t = Et(), l = $(!1), o = $(!1), n = $(!1), a = () => {
1627
- t.default && (o.value = t.default()[0].children != "v-if"), l.value = (t.default || t["panel-footer"]) != null, n.value = t["panel-footer"] != null;
1628
- };
1629
- return a(), ft(() => {
1630
- a();
1631
- }), (s, d) => (i(), b("div", {
1632
- class: le(["ha-panel", { "panel-dark": _.dark }])
1633
- }, [
1634
- f("div", To, [
1635
- f("div", Po, [
1636
- ee(s.$slots, "title", {}, () => [
1637
- B(M(_.title), 1)
1638
- ])
1639
- ]),
1640
- f("div", Oo, [
1641
- ee(s.$slots, "operation")
1642
- ])
1643
- ]),
1644
- e(l) ? (i(), b("div", Wo, [
1645
- e(o) ? (i(), b("div", Bo, [
1646
- ee(s.$slots, "default")
1647
- ])) : W("", !0),
1648
- e(n) ? (i(), b("div", No, [
1649
- ee(s.$slots, "panel-footer")
1650
- ])) : W("", !0)
1651
- ])) : W("", !0)
1652
- ], 2));
1653
- }
1654
- }), Wt = (_, t) => {
1655
- const l = _.__vccOpts || _;
1656
- for (const [o, n] of t)
1657
- l[o] = n;
1658
- return l;
1659
- }, Ao = {}, jo = { class: "ha-group" };
1660
- function Ho(_, t) {
1661
- return i(), b("div", jo, [
1662
- ee(_.$slots, "default")
1663
- ]);
1664
- }
1665
- const Fa = /* @__PURE__ */ Wt(Ao, [["render", Ho]]), Fo = { class: "operation-left" }, qo = { class: "operation-right" }, qa = /* @__PURE__ */ Y({
1666
- __name: "Operation",
1667
- props: {
1668
- padding: {}
1669
- },
1670
- setup(_, { expose: t }) {
1671
- let l = _, { padding: o } = ne(l), n = $();
1672
- return ft(() => {
1673
- }), he(() => {
1674
- }), t({ ref: n }), (a, s) => (i(), b("div", {
1675
- ref_key: "operationRef",
1676
- ref: n,
1677
- class: "ha-operation",
1678
- style: xe({ padding: e(o) ? `${e(o)}px ${e(o) * 2}px` : null })
1679
- }, [
1680
- f("div", Fo, [
1681
- ee(a.$slots, "left")
1682
- ]),
1683
- f("div", qo, [
1684
- ee(a.$slots, "default")
1685
- ])
1686
- ], 4));
1687
- }
1688
- }), Yo = { class: "not-support" }, Ya = /* @__PURE__ */ Y({
1689
- __name: "Index",
1690
- props: {
1691
- schema: {},
1692
- table: {},
1693
- field: {},
1694
- searchData: {}
1695
- },
1696
- emits: ["change", "submit"],
1697
- setup(_, { emit: t }) {
1698
- let l = t, o = _, { schema: n, table: a, field: s, searchData: d } = ne(o), r = (c) => {
1699
- l("change", c);
1700
- }, p = () => {
1701
- l("submit");
1702
- };
1703
- return (c, g) => (i(), L(at(`search-${e(s).search.control.toLowerCase()}`), {
1704
- schema: e(n),
1705
- table: e(a),
1706
- field: e(s),
1707
- "search-data": e(d),
1708
- onChange: e(r),
1709
- onSubmit: e(p),
1710
- modelValue: e(d)[e(a).name][e(s).name],
1711
- "onUpdate:modelValue": g[0] || (g[0] = (v) => e(d)[e(a).name][e(s).name] = v)
1712
- }, {
1713
- default: h(() => [
1714
- f("div", Yo, M(e(j)("paging.not_implemented_search_control", e(s).search.control)), 1)
1715
- ]),
1716
- _: 1
1717
- }, 40, ["schema", "table", "field", "search-data", "onChange", "onSubmit", "modelValue"]));
1718
- }
1719
- }), Xo = /* @__PURE__ */ f("i", { class: "far fa-bell" }, null, -1), Ko = {
1720
- key: 0,
1721
- class: "message-number"
1722
- }, Go = { class: "content" }, Qo = { class: "title" }, Jo = {
1723
- key: 0,
1724
- class: "stack"
1725
- }, Zo = { class: "time" }, es = ["onClick"], ts = /* @__PURE__ */ f("i", { class: "el-icon-close" }, null, -1), ls = [
1726
- ts
1727
- ], os = {
1728
- key: 1,
1729
- class: "empty"
1730
- }, ss = /* @__PURE__ */ Y({
1731
- __name: "Log",
1732
- setup(_) {
1733
- let t = $(!1), l = $("all"), o = $(1), n = $(10), a = () => {
1734
- o.value = 1;
1735
- }, s = (v) => {
1736
- o.value = v;
1737
- }, d = (v) => {
1738
- t.value = v;
1739
- }, r = async (v) => {
1740
- Te.remove(v);
1741
- };
1742
- ce(() => Math.ceil(g.value.length / n.value));
1743
- let p = ce(() => {
1744
- let v = (o.value - 1) * n.value, w = o.value * n.value;
1745
- return g.value.filter((D, I) => I >= v && I < w);
1746
- }), c = ce(() => Te.logs.filter((v) => v.code != "Ok")), g = ce(() => l.value == "all" ? Te.logs : l.value == "success" ? Te.logs.filter((v) => v.code == "Ok") : Te.logs.filter((v) => v.code != "Ok"));
1747
- return (v, w) => {
1748
- const T = O("el-radio"), D = O("el-radio-group"), I = O("el-form-item"), R = O("el-form"), S = O("el-scrollbar"), H = O("el-pagination"), te = O("el-drawer");
1749
- return i(), b(G, null, [
1750
- f("div", {
1751
- class: "log-message",
1752
- onClick: w[0] || (w[0] = (A) => we(t) ? t.value = !0 : t = !0)
1753
- }, [
1754
- Xo,
1755
- e(c).length > 0 ? (i(), b("div", Ko, M(e(c).length), 1)) : W("", !0)
1756
- ]),
1757
- x(te, {
1758
- class: "logs",
1759
- size: "40%",
1760
- "append-to-body": "",
1761
- title: e(j)("common.log"),
1762
- onShow: w[2] || (w[2] = (A) => e(d)(!0)),
1763
- onHide: w[3] || (w[3] = (A) => e(d)(!1)),
1764
- modelValue: e(t),
1765
- "onUpdate:modelValue": w[4] || (w[4] = (A) => we(t) ? t.value = A : t = A)
1766
- }, {
1767
- default: h(() => [
1768
- x(R, null, {
1769
- default: h(() => [
1770
- x(I, null, {
1771
- default: h(() => [
1772
- x(D, {
1773
- onChange: e(a),
1774
- modelValue: e(l),
1775
- "onUpdate:modelValue": w[1] || (w[1] = (A) => we(l) ? l.value = A : l = A)
1776
- }, {
1777
- default: h(() => [
1778
- x(T, { value: "all" }, {
1779
- default: h(() => [
1780
- B(M(e(j)("common.all")), 1)
1781
- ]),
1782
- _: 1
1783
- }),
1784
- x(T, { value: "success" }, {
1785
- default: h(() => [
1786
- B(M(e(j)("common.success")), 1)
1787
- ]),
1788
- _: 1
1789
- }),
1790
- x(T, { value: "error" }, {
1791
- default: h(() => [
1792
- B(M(e(j)("common.error")), 1)
1793
- ]),
1794
- _: 1
1795
- })
1796
- ]),
1797
- _: 1
1798
- }, 8, ["onChange", "modelValue"])
1799
- ]),
1800
- _: 1
1801
- })
1802
- ]),
1803
- _: 1
1804
- }),
1805
- e(g).length > 0 ? (i(), L(S, {
1806
- key: 0,
1807
- style: { height: "calc(100% - 61px)" }
1808
- }, {
1809
- default: h(() => [
1810
- (i(!0), b(G, null, ae(e(p), (A, oe) => (i(), b("div", {
1811
- class: le(["log", A.code == "Ok" ? "success" : "error"]),
1812
- key: oe
1813
- }, [
1814
- f("div", Go, [
1815
- f("div", Qo, M(A.message), 1),
1816
- A.code != "Ok" ? (i(), b("div", Jo, M(A.stack), 1)) : W("", !0),
1817
- f("div", Zo, M(e(j)("common.time")) + ":" + M(A.time) + " " + M(e(j)("common.elapsed")) + ":" + M(A.elapsed) + "ms", 1)
1818
- ]),
1819
- f("div", {
1820
- class: "operation",
1821
- onClick: (re) => e(r)(oe)
1822
- }, ls, 8, es)
1823
- ], 2))), 128))
1824
- ]),
1825
- _: 1
1826
- })) : W("", !0),
1827
- e(g).length == 0 ? (i(), b("div", os, M(e(j)("common.no_data")), 1)) : W("", !0),
1828
- x(H, {
1829
- size: "small",
1830
- layout: "prev, pager, next, total",
1831
- "page-size": e(n),
1832
- total: e(g).length,
1833
- onCurrentChange: e(s)
1834
- }, null, 8, ["page-size", "total", "onCurrentChange"])
1835
- ]),
1836
- _: 1
1837
- }, 8, ["title", "modelValue"])
1838
- ], 64);
1839
- };
1840
- }
1841
- }), as = ["innerHTML"], ns = /* @__PURE__ */ f("div", { class: "footer-left" }, null, -1), rs = { class: "footer-right" }, is = /* @__PURE__ */ Y({
1842
- __name: "Setting",
1843
- emits: ["close"],
1844
- setup(_, { expose: t, emit: l }) {
1845
- let o = $(!1), n = $({
1846
- function: "personal",
1847
- layout: K.layout,
1848
- theme: K.theme,
1849
- background: K.background,
1850
- language: K.language,
1851
- font: K.font,
1852
- cdn: K.cdn
1853
- }), a = () => {
1854
- o.value = !0;
1855
- }, s = () => {
1856
- let r = n.value.background, p = n.value.layout;
1857
- p != K.layout && K.saveConfig("layout", p).then(() => {
1858
- document.documentElement.classList.remove(K.layout), document.documentElement.classList.add(p), K.layout = p, K.setBackground(r), Me.success("布局切换完成");
1859
- });
1860
- let c = n.value.theme;
1861
- c != K.theme && K.saveConfig("theme", c).then(() => {
1862
- ve.removeClass(document.documentElement, K.theme), ve.addClass(document.documentElement, c), K.theme = c, et.emit("theme", c), Me.success("主题切换完成");
1863
- }), r != K.background && K.saveConfig("background", r).then(() => {
1864
- K.setBackground(r), et.emit("background", r), Me.success("背景切换完成");
1865
- });
1866
- let g = n.value.language;
1867
- g != K.language && ke.switchI18n(g).then(() => {
1868
- K.language = g, K.saveConfig("language", g).then(() => {
1869
- Me.success("语言切换完成");
1870
- });
1871
- });
1872
- let v = n.value.font;
1873
- v != K.font && K.saveConfig("font", v).then(() => {
1874
- K.font = v, ve.addStyle(document.documentElement, "font-family", v), Me.success("字体切换完成");
1875
- }), o.value = !1;
1876
- }, d = () => {
1877
- o.value = !1;
1878
- };
1879
- return t({ show: a }), (r, p) => {
1880
- const c = O("el-form-item"), g = O("el-form"), v = O("el-tab-pane"), w = O("el-radio-button"), T = O("el-radio-group"), D = O("el-tabs"), I = O("el-button"), R = O("el-dialog");
1881
- return i(), L(R, {
1882
- class: "setting",
1883
- width: "750px",
1884
- draggable: "",
1885
- "append-to-body": "",
1886
- "destroy-on-close": "",
1887
- title: e(j)("common.setting"),
1888
- modelValue: e(o),
1889
- "onUpdate:modelValue": p[7] || (p[7] = (S) => we(o) ? o.value = S : o = S)
1890
- }, {
1891
- footer: h(() => [
1892
- ns,
1893
- f("div", rs, [
1894
- x(I, {
1895
- type: "primary",
1896
- onClick: e(s)
1897
- }, {
1898
- default: h(() => [
1899
- B(M(e(j)("common.confirm")), 1)
1900
- ]),
1901
- _: 1
1902
- }, 8, ["onClick"]),
1903
- x(I, { onClick: e(d) }, {
1904
- default: h(() => [
1905
- B(M(e(j)("common.cancel")), 1)
1906
- ]),
1907
- _: 1
1908
- }, 8, ["onClick"])
1909
- ])
1910
- ]),
1911
- default: h(() => [
1912
- x(D, {
1913
- "tab-position": "left",
1914
- modelValue: e(n).function,
1915
- "onUpdate:modelValue": p[6] || (p[6] = (S) => e(n).function = S)
1916
- }, {
1917
- default: h(() => [
1918
- x(v, {
1919
- name: "personal",
1920
- label: e(j)("common.personal")
1921
- }, {
1922
- default: h(() => [
1923
- x(g, { "label-width": 100 }, {
1924
- default: h(() => [
1925
- x(c, { label: "用户ID:" }, {
1926
- default: h(() => [
1927
- B(M(e(Z).user.userId), 1)
1928
- ]),
1929
- _: 1
1930
- }),
1931
- x(c, { label: "姓名:" }, {
1932
- default: h(() => [
1933
- B(M(e(Z).user.truename), 1)
1934
- ]),
1935
- _: 1
1936
- }),
1937
- x(c, { label: "调试权限:" }, {
1938
- default: h(() => [
1939
- B(M(e(Z).user.debugger), 1)
1940
- ]),
1941
- _: 1
1942
- })
1943
- ]),
1944
- _: 1
1945
- })
1946
- ]),
1947
- _: 1
1948
- }, 8, ["label"]),
1949
- x(v, {
1950
- name: "common",
1951
- label: e(j)("common.common")
1952
- }, {
1953
- default: h(() => [
1954
- x(g, null, {
1955
- default: h(() => [
1956
- e(pe).layouts.length > 0 ? (i(), L(c, {
1957
- key: 0,
1958
- label: e(j)("common.layout")
1959
- }, {
1960
- default: h(() => [
1961
- x(T, {
1962
- modelValue: e(n).layout,
1963
- "onUpdate:modelValue": p[0] || (p[0] = (S) => e(n).layout = S)
1964
- }, {
1965
- default: h(() => [
1966
- (i(!0), b(G, null, ae(e(pe).layouts, (S) => (i(), L(w, {
1967
- value: S.value
1968
- }, {
1969
- default: h(() => [
1970
- B(M(e(Re)("Layouts", S.value)), 1)
1971
- ]),
1972
- _: 2
1973
- }, 1032, ["value"]))), 256))
1974
- ]),
1975
- _: 1
1976
- }, 8, ["modelValue"])
1977
- ]),
1978
- _: 1
1979
- }, 8, ["label"])) : W("", !0),
1980
- e(pe).themes.length > 0 ? (i(), L(c, {
1981
- key: 1,
1982
- label: e(j)("common.theme")
1983
- }, {
1984
- default: h(() => [
1985
- x(T, {
1986
- modelValue: e(n).theme,
1987
- "onUpdate:modelValue": p[1] || (p[1] = (S) => e(n).theme = S)
1988
- }, {
1989
- default: h(() => [
1990
- (i(!0), b(G, null, ae(e(pe).themes, (S) => (i(), L(w, {
1991
- value: S.value
1992
- }, {
1993
- default: h(() => [
1994
- B(M(e(Re)("Themes", S.value)), 1)
1995
- ]),
1996
- _: 2
1997
- }, 1032, ["value"]))), 256))
1998
- ]),
1999
- _: 1
2000
- }, 8, ["modelValue"])
2001
- ]),
2002
- _: 1
2003
- }, 8, ["label"])) : W("", !0),
2004
- e(pe).backgrounds.length > 0 ? (i(), L(c, {
2005
- key: 2,
2006
- label: e(j)("common.background")
2007
- }, {
2008
- default: h(() => [
2009
- x(T, {
2010
- modelValue: e(n).background,
2011
- "onUpdate:modelValue": p[2] || (p[2] = (S) => e(n).background = S)
2012
- }, {
2013
- default: h(() => [
2014
- (i(!0), b(G, null, ae(e(pe).backgrounds, (S) => (i(), L(w, {
2015
- value: S.value
2016
- }, {
2017
- default: h(() => [
2018
- B(M(e(Re)("Backgrounds", S.value)), 1)
2019
- ]),
2020
- _: 2
2021
- }, 1032, ["value"]))), 256))
2022
- ]),
2023
- _: 1
2024
- }, 8, ["modelValue"])
2025
- ]),
2026
- _: 1
2027
- }, 8, ["label"])) : W("", !0),
2028
- e(pe).locales.length > 0 ? (i(), L(c, {
2029
- key: 3,
2030
- label: e(j)("common.language")
2031
- }, {
2032
- default: h(() => [
2033
- x(T, {
2034
- modelValue: e(n).language,
2035
- "onUpdate:modelValue": p[3] || (p[3] = (S) => e(n).language = S)
2036
- }, {
2037
- default: h(() => [
2038
- (i(!0), b(G, null, ae(e(pe).locales, (S) => (i(), L(w, {
2039
- value: S.value
2040
- }, {
2041
- default: h(() => [
2042
- B(M(e(Re)("Locales", S.value)), 1)
2043
- ]),
2044
- _: 2
2045
- }, 1032, ["value"]))), 256))
2046
- ]),
2047
- _: 1
2048
- }, 8, ["modelValue"])
2049
- ]),
2050
- _: 1
2051
- }, 8, ["label"])) : W("", !0),
2052
- e(pe).fonts.length > 0 ? (i(), L(c, {
2053
- key: 4,
2054
- label: e(j)("common.font")
2055
- }, {
2056
- default: h(() => [
2057
- x(T, {
2058
- modelValue: e(n).font,
2059
- "onUpdate:modelValue": p[4] || (p[4] = (S) => e(n).font = S)
2060
- }, {
2061
- default: h(() => [
2062
- (i(!0), b(G, null, ae(e(pe).fonts, (S) => (i(), L(w, {
2063
- value: S.value
2064
- }, {
2065
- default: h(() => [
2066
- B(M(e(Re)("Fonts", S.value)), 1)
2067
- ]),
2068
- _: 2
2069
- }, 1032, ["value"]))), 256))
2070
- ]),
2071
- _: 1
2072
- }, 8, ["modelValue"])
2073
- ]),
2074
- _: 1
2075
- }, 8, ["label"])) : W("", !0),
2076
- e(pe).cdns.length > 0 ? (i(), L(c, {
2077
- key: 5,
2078
- label: e(j)("common.cdn")
2079
- }, {
2080
- default: h(() => [
2081
- x(T, {
2082
- modelValue: e(n).cdn,
2083
- "onUpdate:modelValue": p[5] || (p[5] = (S) => e(n).cdn = S)
2084
- }, {
2085
- default: h(() => [
2086
- (i(!0), b(G, null, ae(e(pe).cdns, (S) => (i(), L(w, {
2087
- value: S.value
2088
- }, {
2089
- default: h(() => [
2090
- B(M(e(Re)("Cdns", S.value)), 1)
2091
- ]),
2092
- _: 2
2093
- }, 1032, ["value"]))), 256))
2094
- ]),
2095
- _: 1
2096
- }, 8, ["modelValue"])
2097
- ]),
2098
- _: 1
2099
- }, 8, ["label"])) : W("", !0)
2100
- ]),
2101
- _: 1
2102
- })
2103
- ]),
2104
- _: 1
2105
- }, 8, ["label"]),
2106
- x(v, {
2107
- name: "about",
2108
- label: e(j)("common.about"),
2109
- class: "setting-about"
2110
- }, {
2111
- default: h(() => [
2112
- f("div", {
2113
- innerHTML: e(j)("sys.description")
2114
- }, null, 8, as),
2115
- B(" " + M(e(j)("sys.version", e(pe).version)), 1)
2116
- ]),
2117
- _: 1
2118
- }, 8, ["label"])
2119
- ]),
2120
- _: 1
2121
- }, 8, ["modelValue"])
2122
- ]),
2123
- _: 1
2124
- }, 8, ["title", "modelValue"]);
2125
- };
2126
- }
2127
- }), us = /* @__PURE__ */ Y({
2128
- __name: "Debugger",
2129
- setup(_) {
2130
- let t = $({ text: null, conditions: [] }), l = $([]), o = $({ id: "", secret: "" }), n = $({ env: pe.env, app: pe.app }), a = async () => st.post("/sys_user/options", t.value).then(({ data: p }) => {
2131
- l.value = p;
2132
- }), s = (p, c) => {
2133
- p == "env" && (Z.env = c);
2134
- }, d = (p) => {
2135
- t.value.text = p, a();
2136
- }, r = async (p) => {
2137
- let c = await Z.getSso();
2138
- c && (o.value.id = c.userId), (await He.sso.create("secret")).login(o.value).then((v) => {
2139
- Me.success(v.message);
2140
- });
2141
- };
2142
- return (p, c) => {
2143
- const g = O("el-option"), v = O("el-select");
2144
- return i(), b(G, null, [
2145
- x(e(to), {
2146
- id: "debugger",
2147
- inline: "",
2148
- readonly: "",
2149
- form: e(n),
2150
- onChange: e(s)
2151
- }, null, 8, ["form", "onChange"]),
2152
- e(Z).debugger ? (i(), L(v, {
2153
- key: 0,
2154
- filterable: "",
2155
- remote: "",
2156
- clearable: "",
2157
- "remote-method": e(d),
2158
- onFocus: e(a),
2159
- onChange: e(r),
2160
- modelValue: e(o).secret,
2161
- "onUpdate:modelValue": c[0] || (c[0] = (w) => e(o).secret = w),
2162
- style: { width: "150px" }
2163
- }, {
2164
- default: h(() => [
2165
- (i(!0), b(G, null, ae(e(l), (w) => (i(), L(g, {
2166
- value: w.value,
2167
- label: `${w.text}(${w.value})`
2168
- }, {
2169
- default: h(() => [
2170
- B(M(w.text) + "(" + M(w.value) + ") ", 1)
2171
- ]),
2172
- _: 2
2173
- }, 1032, ["value", "label"]))), 256))
2174
- ]),
2175
- _: 1
2176
- }, 8, ["remote-method", "onFocus", "onChange", "modelValue"])) : W("", !0)
2177
- ], 64);
2178
- };
2179
- }
2180
- }), ds = { class: "header-right" }, cs = { class: "header-notice" }, ms = { key: 0 }, ps = {
2181
- key: 0,
2182
- class: "header-socket"
2183
- }, vs = /* @__PURE__ */ f("i", { class: "fa fa-warning" }, null, -1), fs = { class: "avatar-wrapper" }, hs = /* @__PURE__ */ f("i", { class: "fa fa-cog" }, null, -1), gs = {
2184
- key: 0,
2185
- class: "user-name"
2186
- }, _s = /* @__PURE__ */ f("i", { class: "fa fa-chevron-down" }, null, -1), ys = { class: "header-right-title" }, gt = /* @__PURE__ */ Y({
2187
- __name: "HeaderRight",
2188
- setup(_) {
2189
- let t = $(), l = $(), o = qe(), n = (r) => {
2190
- l.value.style.animationPlayState = r;
2191
- }, a = () => {
2192
- let r = o.path;
2193
- de.to(`/login?return_url=${r}`);
2194
- }, s = () => {
2195
- st.get("/app/cache/clear").then(({ message: r }) => {
2196
- Me.success(r);
2197
- });
2198
- }, d = () => {
2199
- Z.logout().then(() => {
2200
- a();
2201
- });
2202
- };
2203
- return (r, p) => {
2204
- const c = O("el-dropdown-item"), g = O("el-dropdown-menu"), v = O("el-dropdown");
2205
- return i(), b("div", ds, [
2206
- f("div", cs, [
2207
- e(sl)("sys.notice") ? (i(), b("div", ms, [
2208
- f("div", {
2209
- ref_key: "marqueeRef",
2210
- ref: l,
2211
- class: "header-marquee",
2212
- onMouseover: p[0] || (p[0] = (w) => e(n)("paused")),
2213
- onMouseout: p[1] || (p[1] = (w) => e(n)("running"))
2214
- }, M(e(j)("sys.notice")), 545)
2215
- ])) : W("", !0)
2216
- ]),
2217
- e(Ae).connected == !1 ? (i(), b("div", ps, [
2218
- vs,
2219
- B(" Socket连接已断开 ")
2220
- ])) : W("", !0),
2221
- e(Z).user ? (i(), L(us, { key: 1 })) : W("", !0),
2222
- x(ss),
2223
- x(is, {
2224
- ref_key: "settingRef",
2225
- ref: t
2226
- }, null, 512),
2227
- e(Z).user ? (i(), L(v, {
2228
- key: 2,
2229
- class: "avatar-container header-right-item",
2230
- trigger: "click"
2231
- }, {
2232
- dropdown: h(() => [
2233
- x(g, {
2234
- class: le({ "avatar-dropdown": !0 })
2235
- }, {
2236
- default: h(() => [
2237
- x(c, {
2238
- onClick: p[2] || (p[2] = (w) => e(t).show())
2239
- }, {
2240
- default: h(() => [
2241
- B(M(e(j)("common.setting")), 1)
2242
- ]),
2243
- _: 1
2244
- }),
2245
- x(c, { onClick: e(s) }, {
2246
- default: h(() => [
2247
- B(M(e(j)("setting.clear_cache")), 1)
2248
- ]),
2249
- _: 1
2250
- }, 8, ["onClick"]),
2251
- x(c, { onClick: e(d) }, {
2252
- default: h(() => [
2253
- B(M(e(j)("common.logout")), 1)
2254
- ]),
2255
- _: 1
2256
- }, 8, ["onClick"])
2257
- ]),
2258
- _: 1
2259
- })
2260
- ]),
2261
- default: h(() => [
2262
- f("div", fs, [
2263
- hs,
2264
- e(Z).user ? (i(), b("div", gs, M(e(Z).user.truename), 1)) : W("", !0),
2265
- _s
2266
- ])
2267
- ]),
2268
- _: 1
2269
- })) : (i(), b("div", {
2270
- key: 3,
2271
- class: "header-right-item",
2272
- onClick: p[3] || (p[3] = //@ts-ignore
2273
- (...w) => e(a) && e(a)(...w))
2274
- }, [
2275
- f("div", ys, M(e(j)("common.login")), 1)
2276
- ]))
2277
- ]);
2278
- };
2279
- }
2280
- }), bs = ["href"], ws = { class: "side-logo" }, ks = { class: "side-title" }, _t = /* @__PURE__ */ Y({
2281
- __name: "Logo",
2282
- emits: ["click"],
2283
- setup(_, { emit: t }) {
2284
- let l = t, o = (n) => {
2285
- l("click", n), de.to(n, !1);
2286
- };
2287
- return (n, a) => {
2288
- var s;
2289
- return i(), b("a", {
2290
- class: "logo",
2291
- href: e(Oe).home,
2292
- onClick: a[0] || (a[0] = De((d) => e(o)(e(Oe).home), ["prevent"]))
2293
- }, [
2294
- f("div", ws, M((s = e(ke).t_sys("title")) == null ? void 0 : s.substring(0, 1)), 1),
2295
- f("div", ks, [
2296
- (i(!0), b(G, null, ae(e(ke).t_sys("title"), (d, r) => (i(), b("div", {
2297
- style: xe({ animationDelay: r * 0.1 + "s" })
2298
- }, M(d), 5))), 256))
2299
- ])
2300
- ], 8, bs);
2301
- };
2302
- }
2303
- }), xs = { class: "desktop-tools nav-bar" }, $s = /* @__PURE__ */ f("div", { class: "header-middle" }, null, -1), Cs = {
2304
- key: 0,
2305
- class: "desktop-main"
2306
- }, Ss = {
2307
- key: 0,
2308
- class: "desktop-icon"
2309
- }, Vs = /* @__PURE__ */ f("i", { class: "fa fa-hourglass-empty" }, null, -1), Rs = { class: "title" }, Ms = ["href", "title", "onClick"], Us = { class: "title" }, Is = { class: "desktop-tasks" }, zs = ["onClick"], Ds = ["onClick"], Ls = { key: 1 }, Es = ["onClick"], Ts = {
2310
- key: 1,
2311
- class: "side-tab-suffix fa fa-chevron-right"
2312
- }, Ps = /* @__PURE__ */ Y({
2313
- __name: "Desktop",
2314
- setup(_) {
2315
- let t = $([]), l = $(), o = $(), n = new Fe(), a = new mt(), s = $({ height: 36 }), d = qe(), r, p = (k, y) => {
2316
- y.dialogRef = k;
2317
- }, c = (k, y) => {
2318
- y.pageRef = k;
2319
- }, g = (k) => {
2320
- let y = JSON.parse(k.data), { win: u } = y, C = t.value.find((Q) => Q.id == u);
2321
- C != null && C.pageRef.handler(y);
2322
- }, v = (k, y = null) => {
2323
- if (!y)
2324
- return;
2325
- y.bodyUrl = k;
2326
- let u = ue.getM(k).m;
2327
- if (!u)
2328
- return;
2329
- let C = Pe.getParentsById(u, "id", Z.menus, "children");
2330
- C.length > 1 ? y.sideMenuId = C[1].id : y.sideMenuId = u, y.headerMenuId = u;
2331
- }, w = (k, y, u, C) => {
2332
- if (C) {
2333
- E(k, y);
2334
- return;
2335
- }
2336
- u.sideMenuId = y, u.headerMenuId = y;
2337
- let Q;
2338
- y == u.sideMenu.id ? (Q = u.sideMenu, u.headerMenu = null) : (Q = u.sideMenu.children.find((ie) => ie.id == y), u.headerMenu = Q), u.menu = Q, u.bodyUrl = se(y), de.to(u.bodyUrl, !1);
2339
- }, T = (k, y, u, C) => {
2340
- if (C) {
2341
- E(k, y);
2342
- return;
2343
- }
2344
- u.headerMenuId = y;
2345
- let Q;
2346
- y == u.headerMenu.id ? Q = u.headerMenu : Q = u.headerMenu.children.find((ie) => ie.id == y), u.menu = Q, u.bodyUrl = se(y), de.to(u.bodyUrl, !1);
2347
- }, D = (k) => {
2348
- k.pageRef.refresh();
2349
- }, I = (k) => {
2350
- let y = Dt.encode({ Module: k.bodyUrl });
2351
- o.value.show("add", "/ctl_feedback/insert?default=" + y);
2352
- }, R = (k) => {
2353
- for (let y = 0; y < t.value.length; y++) {
2354
- let u = t.value[y];
2355
- u != k && u.dialogRef.blur();
2356
- }
2357
- }, S = (k) => {
2358
- let y = ue.getM(k.bodyUrl), u = ue.getUrl(k.bodyUrl, { m: `${y.m};min` });
2359
- de.to(u, !1);
2360
- }, H = (k) => {
2361
- let y = ue.getBackUrl();
2362
- y && (k.bodyUrl = y, de.to(y, !1));
2363
- }, te = (k) => {
2364
- let y = ue.getBackUrl();
2365
- y && (k.bodyUrl = y, de.to(y, !1));
2366
- }, A = (k) => {
2367
- ze.remove(t.value, k);
2368
- }, oe = (k) => {
2369
- fe("ctrlS", k);
2370
- }, re = (k) => {
2371
- fe("ctrlEnter", k);
2372
- }, fe = (k, y) => {
2373
- let u = q(t.value, (C) => C.dialogRef.options.state != "min");
2374
- !u.pageRef || !u.pageRef.keyboard || u.pageRef.keyboard(k, y);
2375
- }, X = (k) => {
2376
- k.dialogRef.toggleShow();
2377
- }, E = (k, y) => {
2378
- k.preventDefault();
2379
- let u = U(y);
2380
- u.bodyUrl = se(y), t.value.push(u), de.to(u.bodyUrl, !1);
2381
- }, q = (k, y = null) => {
2382
- let u = y ? k.filter(y) : k;
2383
- return ze.max(u, (Q) => Q.dialogRef.options.index);
2384
- }, se = (k) => {
2385
- let y = Pe.getById(k, "id", Z.menus, "children");
2386
- if (!y)
2387
- return null;
2388
- let u = { m: y.id };
2389
- return me.value.max ? u.m += ";max" : me.value.min && (u.m += ";min"), ue.getUrl(y.url, u);
2390
- }, U = (k) => {
2391
- if (!k)
2392
- return null;
2393
- let y = Pe.getParentsById(k, "id", Z.menus, "children", !0);
2394
- if (y.length == 0)
2395
- return null;
2396
- let u = {
2397
- visible: !0,
2398
- menu: null,
2399
- //当前激活菜单
2400
- sideMenu: null,
2401
- //侧边菜单,目的:减少菜单变更导致的赋值过程
2402
- headerMenu: null,
2403
- //顶部菜单,1:减少循环侧边菜单导致头部页面数据冗余;2:减少赋值过程
2404
- id: Lt.getUniqueId(8),
2405
- //防止前面元素被删除(如关闭先打开的窗口),导致所有窗口被重建而额外触发关闭事件
2406
- sideMenuId: null,
2407
- headerMenuId: null,
2408
- options: {},
2409
- //是否聚焦
2410
- focus: null,
2411
- //显示内容的url
2412
- bodyUrl: null
2413
- };
2414
- return u.menu = y[y.length - 1], u.sideMenu = y[0], u.headerMenu = y[1], y.length == 1 ? (u.sideMenuId = y[0].id, u) : (u.sideMenuId = y[1].id, y.length == 2 ? (u.headerMenuId = y[1].id, u) : (u.headerMenuId = y[2].id, u));
2415
- }, m = (k, y) => {
2416
- if (!k)
2417
- return;
2418
- dt.isObject(k) ? (y.type = k.module.type, y.name = k.module.name, y.env = k.module.env, y.i18n_title = null) : dt.isString(k) && (y.i18n_title = k);
2419
- let u = z(y.i18n_title, y.type, y.type);
2420
- ke.setTitle(u);
2421
- }, z = (k, y, u) => k ? j(k) : ot(y, u);
2422
- he(async () => {
2423
- a.ctrlS(document, oe), a.ctrlEnter(document, re), r = await He.provider.getDefault("desktop"), Ae.subscribe(g);
2424
- let k = await r.getAsync("taskbars");
2425
- if (k)
2426
- for (let y = 0; y < k.length; y++) {
2427
- let u = k[y], C = U(u.menu);
2428
- C.id = u.id, C.bodyUrl = u.url, t.value.push(C);
2429
- }
2430
- n.resize(l.value, (y) => {
2431
- for (let u = 0; u < t.value.length; u++) {
2432
- let C = t.value[u].dialogRef;
2433
- C.options.state == "max" ? (C.restore(), C.max()) : (C.options.state == "left" || C.options.state == "right") && C.affix();
2434
- }
2435
- });
2436
- }), vt(() => {
2437
- a.removeCtrlS(document), a.removeCtrlEnter(document), n.dispose(), Ae.unsubscribe();
2438
- }), be(() => K.language, (k, y) => {
2439
- for (let u = 0; u < t.value.length; u++) {
2440
- let C = t.value[u], Q = C.headerMenuId ?? C.sideMenuId, ie = Pe.getParentsById(Q, "id", Z.menus, "children", !0);
2441
- C.sideMenu = ie[0], C.headerMenu = ie[1];
2442
- }
2443
- }), be(() => t.value.find((k) => {
2444
- var y;
2445
- return ((y = k.dialogRef) == null ? void 0 : y.options.state) == "max";
2446
- }) != null, (k, y) => {
2447
- et.emit("maximize", k);
2448
- }), be(() => t.value, (k, y) => {
2449
- let u = [];
2450
- for (let C = 0; C < k.length; C++) {
2451
- let Q = k[C], ie = { id: Q.id, menu: Q.menu.id, url: Q.bodyUrl };
2452
- u.push(ie);
2453
- }
2454
- r && r.saveAsync("taskbars", u);
2455
- }, { deep: !0 });
2456
- let me = ce(() => ue.getM(d.fullPath));
2457
- return (k, y) => (i(), b("div", {
2458
- ref_key: "appRef",
2459
- ref: l,
2460
- class: "app-wrapper"
2461
- }, [
2462
- f("div", xs, [
2463
- $s,
2464
- x(e(gt))
2465
- ]),
2466
- e(Z).menus ? (i(), b("div", Cs, [
2467
- e(Z).menus.length == 0 ? (i(), b("a", Ss, [
2468
- Vs,
2469
- f("div", Rs, M(e(j)("common.no_permission")), 1)
2470
- ])) : (i(!0), b(G, { key: 1 }, ae(e(Z).menus, (u) => (i(), b("a", {
2471
- href: e(ue).getAnchor(u.url, { m: u.id }).href,
2472
- class: "desktop-icon",
2473
- title: e(Se)(u.id),
2474
- style: xe(`color:${u.color}`),
2475
- onClick: (C) => e(E)(C, u.id)
2476
- }, [
2477
- f("i", {
2478
- class: le(u.icon)
2479
- }, null, 2),
2480
- f("div", Us, M(e(Se)(u.id)), 1)
2481
- ], 12, Ms))), 256))
2482
- ])) : W("", !0),
2483
- f("div", Is, [
2484
- x(e(_t), {
2485
- onClick: y[0] || (y[0] = (u) => e(v)(u, e(t)[e(t).length - 1]))
2486
- }),
2487
- (i(!0), b(G, null, ae(e(t), (u) => (i(), b("div", {
2488
- class: le(["desktop-task", { focus: u.options.focus }]),
2489
- onClick: (C) => e(X)(u)
2490
- }, [
2491
- f("i", {
2492
- class: le(`icon ${u.menu.icon}`)
2493
- }, null, 2),
2494
- B(M(e(z)(u.i18n_title, u.type, u.name)), 1)
2495
- ], 10, zs))), 256))
2496
- ]),
2497
- (i(!0), b(G, null, ae(e(t), (u) => (i(), L(e(yt), {
2498
- ref_for: !0,
2499
- ref: (C) => e(p)(C, u),
2500
- id: u.id,
2501
- bottom: e(s).height,
2502
- options: u.options,
2503
- onMin: (C) => e(S)(u),
2504
- onClose: (C) => e(A)(u),
2505
- onFocus: (C) => e(R)(u),
2506
- key: u.id,
2507
- modelValue: u.visible,
2508
- "onUpdate:modelValue": (C) => u.visible = C
2509
- }, cl({
2510
- shortcut: h(() => [
2511
- f("i", {
2512
- class: "shortcut-refresh fa fa-refresh",
2513
- onClick: (C) => e(D)(u)
2514
- }, null, 8, Ds)
2515
- ]),
2516
- title: h(() => [
2517
- u.menu.icon ? (i(), b("i", {
2518
- key: 0,
2519
- class: le(`icon ${u.menu.icon}`)
2520
- }, null, 2)) : W("", !0),
2521
- B(" " + M(e(z)(u.i18n_title, u.type, u.name)) + " ", 1),
2522
- u.env ? (i(), b("span", Ls, "[" + M(u.env) + "]", 1)) : W("", !0)
2523
- ]),
2524
- toolbar: h(() => [
2525
- f("i", {
2526
- class: "toolbar-question",
2527
- onClick: (C) => e(I)(u)
2528
- }, null, 8, Es)
2529
- ]),
2530
- default: h(() => [
2531
- u.bodyUrl ? (i(), L(e(We), {
2532
- key: 0,
2533
- ref_for: !0,
2534
- ref: (C) => e(c)(C, u),
2535
- win: u.id,
2536
- url: u.bodyUrl,
2537
- onNavigate: (C) => e(v)(C, u),
2538
- onLoaded: (C) => e(m)(C, u),
2539
- onSucceed: (C) => e(H)(u),
2540
- onClose: (C) => e(te)(u)
2541
- }, null, 8, ["win", "url", "onNavigate", "onLoaded", "onSucceed", "onClose"])) : W("", !0)
2542
- ]),
2543
- _: 2
2544
- }, [
2545
- u.sideMenu.children.length ? {
2546
- name: "side",
2547
- fn: h(() => [
2548
- x(e(At), {
2549
- modelValue: u.sideMenuId,
2550
- "onUpdate:modelValue": (C) => u.sideMenuId = C
2551
- }, {
2552
- default: h(() => [
2553
- x(e(lt), {
2554
- name: u.sideMenu.id,
2555
- url: u.sideMenu.url,
2556
- title: e(Se)(u.sideMenu.id),
2557
- onClick: (C, Q, ie) => e(w)(C, u.sideMenu.id, u, ie)
2558
- }, {
2559
- default: h(() => [
2560
- u.sideMenu.icon ? (i(), b("i", {
2561
- key: 0,
2562
- class: le(`prefix ${u.sideMenu.icon}`)
2563
- }, null, 2)) : W("", !0),
2564
- B(" " + M(e(Se)(u.sideMenu.id)), 1)
2565
- ]),
2566
- _: 2
2567
- }, 1032, ["name", "url", "title", "onClick"]),
2568
- (i(!0), b(G, null, ae(u.sideMenu.children, (C) => (i(), L(e(lt), {
2569
- name: C.id,
2570
- url: C.url,
2571
- title: e(Se)(C.id),
2572
- onClick: (Q, ie, Ee) => e(w)(Q, C.id, u, Ee)
2573
- }, {
2574
- default: h(() => [
2575
- C.icon ? (i(), b("i", {
2576
- key: 0,
2577
- class: le(`prefix ${C.icon}`)
2578
- }, null, 2)) : W("", !0),
2579
- B(" " + M(e(Se)(C.id)) + " ", 1),
2580
- C.children.length ? (i(), b("i", Ts)) : W("", !0)
2581
- ]),
2582
- _: 2
2583
- }, 1032, ["name", "url", "title", "onClick"]))), 256))
2584
- ]),
2585
- _: 2
2586
- }, 1032, ["modelValue", "onUpdate:modelValue"])
2587
- ]),
2588
- key: "0"
2589
- } : void 0,
2590
- u.headerMenu && u.headerMenu.children.length ? {
2591
- name: "header",
2592
- fn: h(() => [
2593
- x(e(ma), {
2594
- modelValue: u.headerMenuId,
2595
- "onUpdate:modelValue": (C) => u.headerMenuId = C
2596
- }, {
2597
- default: h(() => [
2598
- x(e(zt), {
2599
- name: u.headerMenu.id,
2600
- url: u.headerMenu.url,
2601
- onClick: (C, Q, ie) => e(T)(C, u.headerMenu.id, u, ie)
2602
- }, {
2603
- default: h(() => [
2604
- f("i", {
2605
- class: le(u.headerMenu.icon)
2606
- }, null, 2),
2607
- B(" " + M(e(Se)(u.headerMenu.id)), 1)
2608
- ]),
2609
- _: 2
2610
- }, 1032, ["name", "url", "onClick"]),
2611
- (i(!0), b(G, null, ae(u.headerMenu.children, (C) => (i(), L(e(zt), {
2612
- name: C.id,
2613
- url: C.url,
2614
- onClick: (Q, ie, Ee) => e(T)(Q, C.id, u, Ee)
2615
- }, {
2616
- default: h(() => [
2617
- f("i", {
2618
- class: le(C.icon)
2619
- }, null, 2),
2620
- B(" " + M(e(Se)(C.id)), 1)
2621
- ]),
2622
- _: 2
2623
- }, 1032, ["name", "url", "onClick"]))), 256))
2624
- ]),
2625
- _: 2
2626
- }, 1032, ["modelValue", "onUpdate:modelValue"])
2627
- ]),
2628
- key: "1"
2629
- } : void 0
2630
- ]), 1032, ["id", "bottom", "options", "onMin", "onClose", "onFocus", "modelValue", "onUpdate:modelValue"]))), 128)),
2631
- x(e(po), {
2632
- ref_key: "feedbackRef",
2633
- ref: o,
2634
- bottom: e(s).height
2635
- }, null, 8, ["bottom"]),
2636
- x(e(ht), {
2637
- bottom: e(s).height
2638
- }, null, 8, ["bottom"])
2639
- ], 512));
2640
- }
2641
- }), Os = {
2642
- key: 0,
2643
- class: "no-redirect"
2644
- }, Ws = ["onClick"], Bs = /* @__PURE__ */ Y({
2645
- __name: "Breadcrumb",
2646
- setup(_) {
2647
- let t = null, l = qe();
2648
- _l();
2649
- let o = () => {
2650
- let s = l.matched.filter((r) => r.meta && r.meta.title);
2651
- const d = s[0];
2652
- n(d), t = s.filter((r) => r.meta && r.meta.title && r.meta.breadcrumb !== !1);
2653
- }, n = (s) => {
2654
- const d = s && s.name;
2655
- return d ? d.trim().toLocaleLowerCase() == "Dashboard".toLocaleLowerCase() : !1;
2656
- }, a = (s) => {
2657
- };
2658
- return he(() => {
2659
- o();
2660
- }), be(l, (s) => {
2661
- s.path.startsWith("/redirect/") || o();
2662
- }), (s, d) => {
2663
- const r = O("el-breadcrumb-item"), p = O("el-breadcrumb");
2664
- return i(), L(p, { separator: "/" }, {
2665
- default: h(() => [
2666
- x(ml, { name: "breadcrumb" }, {
2667
- default: h(() => [
2668
- (i(!0), b(G, null, ae(e(t), (c, g) => (i(), L(r, {
2669
- key: c.path
2670
- }, {
2671
- default: h(() => [
2672
- c.redirect == "noRedirect" || c == e(t)[e(t).length - 1] ? (i(), b("span", Os, M(c.meta.title), 1)) : (i(), b("a", {
2673
- key: 1,
2674
- onClick: De((v) => e(a)(c), ["prevent"])
2675
- }, M(c.meta.title), 9, Ws))
2676
- ]),
2677
- _: 2
2678
- }, 1024))), 128))
2679
- ]),
2680
- _: 1
2681
- })
2682
- ]),
2683
- _: 1
2684
- });
2685
- };
2686
- }
2687
- }), Ns = {
2688
- key: 0,
2689
- class: "fa fa-outdent"
2690
- }, As = {
2691
- key: 1,
2692
- class: "fa fa-indent"
2693
- }, js = /* @__PURE__ */ Y({
2694
- __name: "Hamburger",
2695
- props: {
2696
- isActive: { type: Boolean, default: !1 }
2697
- },
2698
- emits: ["toggleClick"],
2699
- setup(_, { emit: t }) {
2700
- let l = t, o = () => {
2701
- l("toggleClick");
2702
- };
2703
- return (n, a) => (i(), b("div", {
2704
- class: "hamburger",
2705
- onClick: a[0] || (a[0] = //@ts-ignore
2706
- (...s) => e(o) && e(o)(...s))
2707
- }, [
2708
- _.isActive ? (i(), b("i", Ns)) : (i(), b("i", As))
2709
- ]));
2710
- }
2711
- }), Hs = /* @__PURE__ */ f("i", { class: "fa fa-sync" }, null, -1), Fs = [
2712
- Hs
2713
- ], qs = /* @__PURE__ */ Y({
2714
- __name: "Refresh",
2715
- emits: ["refresh"],
2716
- setup(_, { emit: t }) {
2717
- let l = t, o = () => {
2718
- l("refresh");
2719
- };
2720
- return (n, a) => (i(), b("div", {
2721
- class: le(["btn-refresh", { loading: !1 }]),
2722
- onClick: a[0] || (a[0] = //@ts-ignore
2723
- (...s) => e(o) && e(o)(...s))
2724
- }, Fs));
2725
- }
2726
- }), Ys = { class: "header-left" }, Xs = { class: "header-middle" }, Bt = /* @__PURE__ */ Y({
2727
- __name: "Index",
2728
- emits: ["refresh"],
2729
- setup(_, { emit: t }) {
2730
- let l = t, o = async () => {
2731
- await ye.toggleSideBar();
2732
- };
2733
- he(() => {
2734
- setTimeout(() => {
2735
- yl().start();
2736
- }, 100);
2737
- });
2738
- let n = ce(() => Ue.getComponent("/", "header"));
2739
- return (a, s) => (i(), b(G, null, [
2740
- f("div", Ys, [
2741
- x(js, {
2742
- "is-active": e(ye).sidebar.opened,
2743
- onToggleClick: e(o)
2744
- }, null, 8, ["is-active", "onToggleClick"]),
2745
- x(qs, {
2746
- onRefresh: s[0] || (s[0] = (d) => e(l)("refresh"))
2747
- }),
2748
- x(Bs)
2749
- ]),
2750
- f("div", Xs, [
2751
- (i(), L(at(e(n))))
2752
- ]),
2753
- x(gt)
2754
- ], 64));
2755
- }
2756
- }), Ks = { class: "side-header" }, Gs = /* @__PURE__ */ f("i", { class: "fa fa-search" }, null, -1), Qs = { class: "side-body" }, Js = {
2757
- key: 1,
2758
- class: "ha-empty"
2759
- }, Zs = ["innerHTML"], ea = { class: "main-container" }, ta = {
2760
- key: 0,
2761
- class: "nav-bar"
2762
- }, la = {
2763
- components: { HeaderIndex: Bt }
2764
- }, oa = /* @__PURE__ */ Y({
2765
- ...la,
2766
- __name: "Side",
2767
- setup(_) {
2768
- let t = $(), l = qe(), o = $(), n = $(), a = $(), s = new mt(), d = () => {
2769
- t.value.refresh();
2770
- }, r = (R) => {
2771
- t.value.beforeClose(R);
2772
- }, p = (R) => {
2773
- typeof R == "string" && ke.setI18nTitle(R);
2774
- }, c = (R) => {
2775
- de.to(R, !1);
2776
- }, g = (R) => {
2777
- w("ctrlS", R);
2778
- }, v = (R) => {
2779
- w("ctrlEnter", R);
2780
- }, w = (R, S) => {
2781
- if (!t.value || !t.value.keyboard)
2782
- return !1;
2783
- t.value.keyboard(R, S);
2784
- }, T = async (R) => {
2785
- await ye.setSidebarWidth(R);
2786
- }, D = () => {
2787
- n.value = l.fullPath, a.value = l.query.m;
2788
- };
2789
- D(), he(() => {
2790
- St.bind(["beforeunload"], window, r), s.ctrlS(document, g), s.ctrlEnter(document, v);
2791
- }), nt(() => {
2792
- St.unbind(["beforeunload"], window, r), s.removeCtrlS(document), s.removeCtrlEnter(document);
2793
- });
2794
- let I = ce(() => Pe.searchTree(o.value, Z.menus, "children", ["name", "url"]));
2795
- return be(() => l.fullPath, (R, S) => {
2796
- D();
2797
- }), (R, S) => {
2798
- const H = O("el-input"), te = O("el-backtop");
2799
- return i(), L(e(Ot), {
2800
- class: "app-wrapper",
2801
- width: e(ye).sidebar.width,
2802
- onResize: e(T)
2803
- }, {
2804
- left: h(() => [
2805
- f("div", {
2806
- class: le(["side-nav", { hide: !e(ye).sidebar.opened }])
2807
- }, [
2808
- f("div", Ks, [
2809
- x(_t, { onClick: e(c) }, null, 8, ["onClick"]),
2810
- x(H, {
2811
- type: "text",
2812
- clearable: "",
2813
- placeholder: e(j)("common.search_menu"),
2814
- modelValue: e(o),
2815
- "onUpdate:modelValue": S[0] || (S[0] = (A) => we(o) ? o.value = A : o = A)
2816
- }, {
2817
- prefix: h(() => [
2818
- Gs
2819
- ]),
2820
- _: 1
2821
- }, 8, ["placeholder", "modelValue"])
2822
- ]),
2823
- f("div", Qs, [
2824
- e(I).length ? (i(), L(e(Nt), {
2825
- key: 0,
2826
- menus: e(I),
2827
- direction: "vertical",
2828
- "expand-active": "",
2829
- onClick: e(c),
2830
- modelValue: e(a),
2831
- "onUpdate:modelValue": S[1] || (S[1] = (A) => we(a) ? a.value = A : a = A)
2832
- }, null, 8, ["menus", "onClick", "modelValue"])) : (i(), b("div", Js, M(e(j)("common.no_permission")), 1))
2833
- ]),
2834
- f("div", {
2835
- class: "side-footer",
2836
- innerHTML: e(j)("sys.powered_by")
2837
- }, null, 8, Zs)
2838
- ], 2)
2839
- ]),
2840
- default: h(() => [
2841
- f("div", ea, [
2842
- e(ye).hideNav ? W("", !0) : (i(), b("div", ta, [
2843
- x(Bt, { onRefresh: e(d) }, null, 8, ["onRefresh"])
2844
- ])),
2845
- f("section", {
2846
- class: "ha-main",
2847
- style: xe({ height: e(ye).hideNav ? "100vh" : "calc(100vh - 49px)" })
2848
- }, [
2849
- x(e(We), {
2850
- ref_key: "mainRef",
2851
- ref: t,
2852
- url: e(n),
2853
- onLoaded: e(p),
2854
- onNavigate: e(c)
2855
- }, null, 8, ["url", "onLoaded", "onNavigate"]),
2856
- x(te, { target: ".ha-main" })
2857
- ], 4),
2858
- x(e(ht))
2859
- ])
2860
- ]),
2861
- _: 1
2862
- }, 8, ["width", "onResize"]);
2863
- };
2864
- }
2865
- }), sa = { class: "top-nav-header" }, aa = { class: "top-nav-menu" }, na = /* @__PURE__ */ f("div", { class: "header-middle" }, null, -1), ra = { class: "main-container" }, ia = { class: "ha-main" }, ua = /* @__PURE__ */ Y({
2866
- __name: "Top",
2867
- setup(_) {
2868
- let t = $(), l = $(), o = $(), n = $(), a = qe(), s = $(), d = new Fe(), r = new mt(), p = (I) => {
2869
- typeof I == "string" && ke.setI18nTitle(I);
2870
- }, c = (I) => {
2871
- de.to(I, !1);
2872
- }, g = (I) => {
2873
- w("ctrlS", I);
2874
- }, v = (I) => {
2875
- w("ctrlEnter", I);
2876
- }, w = (I, R) => {
2877
- if (!t.value || !t.value.keyboard)
2878
- return !1;
2879
- t.value.keyboard(I, R);
2880
- }, T = (I) => {
2881
- var R;
2882
- (R = n.value) == null || R.resize(I[0]);
2883
- }, D = () => {
2884
- l.value = a.fullPath, s.value = a.query.m;
2885
- };
2886
- return D(), he(() => {
2887
- d.resize(o.value, T), r.ctrlS(document, g), r.ctrlEnter(document, v);
2888
- }), vt(() => {
2889
- r.removeCtrlS(document), r.removeCtrlEnter(document), d.dispose();
2890
- }), be(() => a.fullPath, (I, R) => {
2891
- D();
2892
- }), (I, R) => {
2893
- const S = O("el-backtop");
2894
- return i(), b("div", {
2895
- ref_key: "appRef",
2896
- ref: o,
2897
- class: "app-wrapper"
2898
- }, [
2899
- f("div", sa, [
2900
- f("div", aa, [
2901
- x(_t, { onClick: e(c) }, null, 8, ["onClick"]),
2902
- x(e(Nt), {
2903
- ref_key: "menuRef",
2904
- ref: n,
2905
- menus: e(Z).menus,
2906
- modelValue: e(s),
2907
- "onUpdate:modelValue": R[0] || (R[0] = (H) => we(s) ? s.value = H : s = H),
2908
- onClick: e(c)
2909
- }, null, 8, ["menus", "modelValue", "onClick"]),
2910
- na,
2911
- x(gt)
2912
- ])
2913
- ]),
2914
- f("div", ra, [
2915
- f("section", ia, [
2916
- x(e(We), {
2917
- ref_key: "mainRef",
2918
- ref: t,
2919
- url: e(l),
2920
- onLoaded: e(p),
2921
- onNavigate: e(c)
2922
- }, null, 8, ["url", "onLoaded", "onNavigate"]),
2923
- x(S, { target: ".ha-main" })
2924
- ]),
2925
- x(e(ht))
2926
- ])
2927
- ], 512);
2928
- };
2929
- }
2930
- }), da = {
2931
- components: { DesktopLayout: Ps, SideLayout: oa, TopLayout: ua }
2932
- }, Xa = /* @__PURE__ */ Y({
2933
- ...da,
2934
- __name: "Index",
2935
- setup(_) {
2936
- let t = () => {
2937
- ke.setTitle(), et.emit("mounted", "主框架加载完毕事件");
2938
- };
2939
- return he(() => {
2940
- t();
2941
- }), (l, o) => {
2942
- const n = O("el-watermark");
2943
- return i(), L(n, {
2944
- class: "ha-watermark",
2945
- "z-index": 99,
2946
- content: e(pe).watermark
2947
- }, {
2948
- default: h(() => [
2949
- (i(), L(at(`${e(K).layout}-layout`), null, {
2950
- default: h(() => [
2951
- B(" 未实现的布局方式:" + M(e(K).layout), 1)
2952
- ]),
2953
- _: 1
2954
- }))
2955
- ]),
2956
- _: 1
2957
- }, 8, ["content"]);
2958
- };
2959
- }
2960
- }), ca = ["href", "target"], zt = /* @__PURE__ */ Y({
2961
- __name: "HeaderTab",
2962
- props: {
2963
- name: String,
2964
- url: String
2965
- },
2966
- emits: ["click"],
2967
- setup(_, { emit: t }) {
2968
- let l = t, o = _, { name: n, url: a } = ne(o), s = Tt("model"), d = (p, c, g) => {
2969
- p.preventDefault(), g || (s.value = c), l("click", p, c, g);
2970
- }, r = ce(() => ue.getAnchor(a.value, { m: n.value }));
2971
- return (p, c) => (i(), b("a", {
2972
- class: le(["ha-window-tab", { current: e(s) == e(n) }]),
2973
- href: e(r).href,
2974
- target: e(r).target,
2975
- onClick: [
2976
- c[0] || (c[0] = De((g) => e(d)(g, e(n), !1), ["exact"])),
2977
- c[1] || (c[1] = De((g) => e(d)(g, e(n), !0), ["ctrl"]))
2978
- ]
2979
- }, [
2980
- ee(p.$slots, "default")
2981
- ], 10, ca));
2982
- }
2983
- }), ma = /* @__PURE__ */ Y({
2984
- __name: "HeaderTabs",
2985
- props: {
2986
- modelValue: String
2987
- },
2988
- emits: ["update:modelValue"],
2989
- setup(_, { emit: t }) {
2990
- let l = t, o = _, { modelValue: n } = ne(o), a = ce({
2991
- get() {
2992
- return n.value;
2993
- },
2994
- set(s) {
2995
- l("update:modelValue", s);
2996
- }
2997
- });
2998
- return Pt("model", a), (s, d) => ee(s.$slots, "default");
2999
- }
3000
- }), pa = {}, va = { class: "ha-miss-component" }, fa = /* @__PURE__ */ f("div", { class: "miss-title" }, "404", -1), ha = { class: "miss-content" };
3001
- function ga(_, t) {
3002
- return i(), b("div", va, [
3003
- fa,
3004
- f("div", ha, [
3005
- ee(_.$slots, "default")
3006
- ])
3007
- ]);
3008
- }
3009
- const Ka = /* @__PURE__ */ Wt(pa, [["render", ga]]), _a = ["href", "target"], ya = { class: "menu-text" }, ba = {
3010
- key: 0,
3011
- class: "arrow fa fa-chevron-down"
3012
- }, wa = {
3013
- key: 1,
3014
- class: "arrow fa fa-chevron-right"
3015
- }, ka = /* @__PURE__ */ Y({
3016
- __name: "MenuItem",
3017
- props: {
3018
- menu: { type: Object, required: !0 },
3019
- level: { type: Number, required: !0 },
3020
- direction: { type: String },
3021
- //顶层菜单方向
3022
- opts: { type: Object },
3023
- activeIds: { type: Array },
3024
- modelValue: { type: String }
3025
- },
3026
- emits: ["click"],
3027
- setup(_, { expose: t, emit: l }) {
3028
- let o = l, n = _, { menu: a, level: s, direction: d, opts: r, activeIds: p, modelValue: c } = ne(n), g = $(), v = $(), w = $(), T = $(), D = $(!1), I = new Fe(), R = (E) => {
3029
- D.value = !1, o("click", E);
3030
- }, S = (E) => {
3031
- D.value = !1, o("click", E);
3032
- }, H = () => {
3033
- te(g.value);
3034
- }, te = (E) => {
3035
- let q = ve.getViewportStyle(E, ".menu-title", ".el-scrollbar__view", window.document.documentElement, re.value);
3036
- T.value = q, w.value && w.value.update();
3037
- }, A = (E) => {
3038
- te(E.currentTarget), D.value = !0, I.dispose();
3039
- }, oe = (E) => {
3040
- I.debounce(() => {
3041
- D.value = !1;
3042
- }, 100);
3043
- }, re = ce(() => {
3044
- let E;
3045
- return s.value == 1 && d.value == "horizontal" ? E = "bottom" : E = "right", E;
3046
- }), fe = ce(() => p.value.includes(a.value[r.value.id])), X = ce(() => ue.getAnchor(a.value.url, { m: a.value[r.value.id] }));
3047
- return t({ resize: H }), (E, q) => {
3048
- const se = O("menu-item", !0), U = O("el-scrollbar");
3049
- return i(), b("div", {
3050
- ref_key: "menuRef",
3051
- ref: g,
3052
- class: le(["ha-menu", { active: e(fe), current: e(a)[e(r).id] == e(c), horizontal: e(s) == 1 && e(d) == "horizontal", vertical: e(s) > 1 || e(d) == "vertical", hovered: e(D) }]),
3053
- onMouseover: q[2] || (q[2] = //@ts-ignore
3054
- (...m) => e(A) && e(A)(...m)),
3055
- onMouseout: q[3] || (q[3] = //@ts-ignore
3056
- (...m) => e(oe) && e(oe)(...m))
3057
- }, [
3058
- f("a", {
3059
- class: "menu-title",
3060
- href: e(X).href,
3061
- target: e(X).target,
3062
- onClick: q[0] || (q[0] = De((m) => e(R)(e(a)), ["prevent"])),
3063
- style: xe({ paddingLeft: e(s) * 20 + "px" })
3064
- }, [
3065
- f("i", {
3066
- class: le(["icon", e(a)[e(r).icon]])
3067
- }, null, 2),
3068
- f("span", ya, M(e(Se)(e(a)[e(r).id])), 1),
3069
- e(a)[e(r).children].length > 0 ? (i(), b(G, { key: 0 }, [
3070
- e(re) == "bottom" ? (i(), b("i", ba)) : (i(), b("i", wa))
3071
- ], 64)) : W("", !0)
3072
- ], 12, _a),
3073
- e(a)[e(r).children].length > 0 ? (i(), b("div", {
3074
- key: 0,
3075
- class: "menu-content",
3076
- style: xe(e(T))
3077
- }, [
3078
- x(U, {
3079
- ref_key: "scrollerRef",
3080
- ref: w
3081
- }, {
3082
- default: h(() => [
3083
- (i(!0), b(G, null, ae(e(a)[e(r).children], (m) => (i(), L(se, {
3084
- ref_for: !0,
3085
- ref_key: "menusRef",
3086
- ref: v,
3087
- menu: m,
3088
- level: e(s) + 1,
3089
- opts: e(r),
3090
- "active-ids": e(p),
3091
- onClick: e(S),
3092
- modelValue: e(c),
3093
- "onUpdate:modelValue": q[1] || (q[1] = (z) => we(c) ? c.value = z : c = z),
3094
- key: m[e(r).id]
3095
- }, null, 8, ["menu", "level", "opts", "active-ids", "onClick", "modelValue"]))), 128))
3096
- ]),
3097
- _: 1
3098
- }, 512)
3099
- ], 4)) : W("", !0)
3100
- ], 34);
3101
- };
3102
- }
3103
- }), Nt = /* @__PURE__ */ Y({
3104
- __name: "Menu",
3105
- props: {
3106
- menus: { type: Array, required: !0 },
3107
- direction: { type: String, default: "horizontal" },
3108
- //顶层菜单方向
3109
- expandActive: { type: Boolean, default: !1 },
3110
- //展开激活状态的菜单
3111
- options: { type: Object },
3112
- modelValue: { type: String }
3113
- },
3114
- emits: ["click", "update:modelValue"],
3115
- setup(_, { expose: t, emit: l }) {
3116
- let o = l, n = _, { menus: a, direction: s, options: d, modelValue: r } = ne(n), p = $(), c = (T) => {
3117
- let D = T[v.value.id], I = ue.getUrl(T[v.value.url], { m: D });
3118
- o("update:modelValue", D), o("click", I);
3119
- }, g = (T) => {
3120
- }, v = ce(() => {
3121
- var D, I, R, S, H;
3122
- return {
3123
- id: ((D = d.value) == null ? void 0 : D.id) || "id",
3124
- title: ((I = d.value) == null ? void 0 : I.title) || "title",
3125
- url: ((R = d.value) == null ? void 0 : R.url) || "url",
3126
- icon: ((S = d.value) == null ? void 0 : S.icon) || "icon",
3127
- children: ((H = d.value) == null ? void 0 : H.children) || "children"
3128
- };
3129
- }), w = ce(() => Pe.getParentsById(r.value, v.value.id, a.value, v.value.children, !0).map((I) => I[v.value.id]));
3130
- return t({ resize: g }), (T, D) => {
3131
- const I = O("el-scrollbar");
3132
- return i(), L(I, null, {
3133
- default: h(() => [
3134
- f("div", {
3135
- class: le(["ha-menus", e(s)])
3136
- }, [
3137
- (i(!0), b(G, null, ae(e(a), (R) => (i(), L(ka, {
3138
- ref_for: !0,
3139
- ref_key: "menusRef",
3140
- ref: p,
3141
- menu: R,
3142
- direction: e(s),
3143
- level: 1,
3144
- opts: e(v),
3145
- "active-ids": e(w),
3146
- onClick: e(c),
3147
- modelValue: e(r),
3148
- "onUpdate:modelValue": D[0] || (D[0] = (S) => we(r) ? r.value = S : r = S),
3149
- key: R[e(v).id]
3150
- }, null, 8, ["menu", "direction", "opts", "active-ids", "onClick", "modelValue"]))), 128))
3151
- ], 2)
3152
- ]),
3153
- _: 1
3154
- });
3155
- };
3156
- }
3157
- }), xa = ["href", "target", "title"], lt = /* @__PURE__ */ Y({
3158
- __name: "SideTab",
3159
- props: {
3160
- name: String,
3161
- url: String,
3162
- title: String
3163
- },
3164
- emits: ["click"],
3165
- setup(_, { emit: t }) {
3166
- let l = t, o = _, { name: n, url: a, title: s } = ne(o), d = Tt("model"), r = (c, g, v) => {
3167
- c.preventDefault(), v || (d.value = g), l("click", c, g, v);
3168
- }, p = ce(() => ue.getAnchor(a.value, { m: n.value }));
3169
- return (c, g) => (i(), b("a", {
3170
- class: le(["ha-window-tab", { current: e(d) == e(n) }]),
3171
- href: e(p).href,
3172
- target: e(p).target,
3173
- title: e(s),
3174
- onClick: [
3175
- g[0] || (g[0] = De((v) => e(r)(v, e(n), !1), ["exact"])),
3176
- g[1] || (g[1] = De((v) => e(r)(v, e(n), !0), ["ctrl"]))
3177
- ]
3178
- }, [
3179
- ee(c.$slots, "default")
3180
- ], 10, xa));
3181
- }
3182
- }), At = /* @__PURE__ */ Y({
3183
- __name: "SideTabs",
3184
- props: {
3185
- modelValue: String
3186
- },
3187
- emits: ["update:modelValue"],
3188
- setup(_, { emit: t }) {
3189
- let l = t, o = _, { modelValue: n } = ne(o), a = ce({
3190
- get() {
3191
- return n.value;
3192
- },
3193
- set(s) {
3194
- l("update:modelValue", s);
3195
- }
3196
- });
3197
- return Pt("model", a), (s, d) => ee(s.$slots, "default");
3198
- }
3199
- }), $a = { class: "window-header" }, Ca = { class: "window-main" }, Sa = { class: "window-main-body" }, Va = {
3200
- key: 1,
3201
- class: "window-main-footer"
3202
- }, Ra = { class: "window-resizer" }, yt = /* @__PURE__ */ Y({
3203
- __name: "Window",
3204
- props: /* @__PURE__ */ Ie({
3205
- id: {},
3206
- title: {},
3207
- class: {},
3208
- bottom: { default: 0 },
3209
- options: {}
3210
- }, {
3211
- modelValue: { type: Boolean },
3212
- modelModifiers: {}
3213
- }),
3214
- emits: /* @__PURE__ */ Ie(["focus", "blur", "min", "max", "close"], ["update:modelValue"]),
3215
- setup(_, { expose: t, emit: l }) {
3216
- let o = l, n = _, { id: a, title: s, bottom: d } = ne(n), r = $(), p = $(), c = $(), g = $(), v = $(), w = $(), T = $(), D = $(), I = $(), R = null, S = null, H = null, te = null, A = null, oe = null, re = null, fe = null, X, E = je(_, "modelValue"), q = $(!1), se = new Fe(), m = ((V) => {
3217
- let P;
3218
- return V ? (P = Ut(n.options), be(() => n.options, (J, F) => {
3219
- $e.mergeTo(m.value, J);
3220
- }, { deep: !0 })) : P = Ut({}), P;
3221
- })(n.options), z = () => {
3222
- let V = Et();
3223
- v.value = V.shortcutSlot != null, w.value = V.title != null, T.value = V.side != null, D.value = V.header != null, I.value = V.footer != null;
3224
- }, me = () => {
3225
- let V = ve.getWidth(document.body), P = ve.getHeight(document.body) - d.value;
3226
- if (m.value.side == null && T.value && (m.value.side = 120), m.value.width == null) {
3227
- let J = 0.6;
3228
- V < 800 ? J = 0.96 : V < 1200 && (J = 0.8), m.value.width = V * J;
3229
- }
3230
- if (m.value.height == null) {
3231
- let J = 0.6;
3232
- P < 800 ? J = 0.96 : P < 1200 && (J = 0.8), m.value.height = P * J;
3233
- }
3234
- m.value.x == null && (m.value.x = (V - m.value.width) / 2), m.value.y == null && (m.value.y = (P - m.value.height) / 2);
3235
- }, k = (V) => {
3236
- if (m.value.state == "max") {
3237
- Be();
3238
- return;
3239
- }
3240
- Xe();
3241
- }, y = (V) => 0, u = (V, P, J, F, ge) => {
3242
- if (!F) {
3243
- Ee(V);
3244
- return;
3245
- }
3246
- R = V, m.value.state == "max" ? (ie(V, re), S = $e.copy(m.value)) : m.value.state == "left" || m.value.state == "right" ? (ie(V, fe), S = $e.copy(m.value)) : (S = $e.copy(m.value), Ee(V));
3247
- }, C = () => {
3248
- R = null, q.value && (Q(), q.value = !1);
3249
- }, Q = () => {
3250
- let V = m.value.state;
3251
- V == "left" ? (m.value.x = 0, m.value.y = 0, m.value.width = document.body.clientWidth / 2, m.value.height = document.body.clientHeight - d.value) : V == "right" && (m.value.x = document.body.clientWidth / 2, m.value.y = 0, m.value.width = document.body.clientWidth / 2, m.value.height = document.body.clientHeight - d.value);
3252
- }, ie = (V, P) => {
3253
- let J = ve.getWidth(p.value), F = ve.getWidth(c.value), ge = ve.getWidth(g.value), Ge = r.value.getBoundingClientRect(), Qe = (V.x - Ge.x - J) / F, Xt = (P.width - J - ge) * Qe;
3254
- m.value.width = P.width, m.value.height = P.height, m.value.x = V.x - J - Xt, m.value.y = 0, m.value.state = null;
3255
- }, Ee = (V) => {
3256
- let P = V.x - R.x, J = V.y - R.y;
3257
- m.value.x = S.x + P, m.value.y = S.y + J, V.affix != null ? (fe = $e.copy(m.value), m.value.state = V.affix, q.value = !0) : (fe = null, m.value.state = null, q.value = !1);
3258
- }, Ve = (V, P) => {
3259
- V.preventDefault(), A = P, jt(), H = V, te = $e.copy(m.value);
3260
- }, bt = (V) => {
3261
- let P = A.split("-");
3262
- for (let J = 0; J < P.length; J++) {
3263
- let F = P[J];
3264
- if (F == "left") {
3265
- let ge = V.clientX - H.clientX;
3266
- m.value.x = V.clientX, m.value.width = te.width - ge;
3267
- }
3268
- if (F == "top") {
3269
- let ge = V.clientY - H.clientY;
3270
- m.value.y = V.clientY, m.value.height = te.height - ge;
3271
- }
3272
- if (F == "right") {
3273
- let ge = V.clientX - H.clientX;
3274
- m.value.width = te.width + ge;
3275
- }
3276
- if (F == "bottom") {
3277
- let ge = V.clientY - H.clientY;
3278
- m.value.height = te.height + ge;
3279
- }
3280
- }
3281
- }, wt = (V) => {
3282
- H = null, te = null, Ht();
3283
- }, jt = () => {
3284
- document.addEventListener("mousemove", bt), document.addEventListener("mouseup", wt);
3285
- }, Ht = () => {
3286
- document.removeEventListener("mousemove", bt), document.removeEventListener("mouseup", wt);
3287
- }, Ft = (V) => {
3288
- m.value.side = V;
3289
- }, Ye = () => {
3290
- oe = $e.copy(m.value), m.value.state = "min", o("min", "min");
3291
- }, Xe = () => {
3292
- re = $e.copy(m.value);
3293
- let V = ve.getWidth(document.body), P = ve.getHeight(document.body) - d.value;
3294
- m.value.x = 0, m.value.y = 0, m.value.width = V, m.value.height = P, m.value.state = "max", o("max", "max");
3295
- }, Be = () => {
3296
- let V = m.value.state == "min" ? oe : re;
3297
- V ? (m.value.x = V.x, m.value.y = V.y, m.value.width = V.width, m.value.height = V.height, m.value.state = V.state) : m.value.state = null, Ke();
3298
- }, kt = () => {
3299
- E.value = !1, Ne.remove(a.value), o("close");
3300
- }, xt = (V) => {
3301
- rt(), o("focus");
3302
- }, rt = () => {
3303
- m.value.focus = !0, Ke();
3304
- }, qt = () => {
3305
- m.value.focus = !1;
3306
- }, $t = () => ve.getMaxIndex(".ha-window"), Ke = () => {
3307
- m.value.index = $t() + 1;
3308
- }, Yt = () => {
3309
- if (m.value.state == "min")
3310
- Be();
3311
- else {
3312
- let V = $t();
3313
- m.value.index == V ? Ye() : Ke();
3314
- }
3315
- m.value.focus = !0, o("focus");
3316
- };
3317
- return ft(() => {
3318
- z();
3319
- }), he(async () => {
3320
- z(), X = await He.provider.getDefault("desktop"), await Ne.loadWindows(X);
3321
- let V = Ne.get(a.value);
3322
- if (V) {
3323
- let { current: F, min: ge, max: Ge, affix: Qe } = V;
3324
- $e.mergeTo(m.value, F), ge && (oe = ge), Ge && (re = Ge), Qe && (fe = Qe);
3325
- }
3326
- me(), m.value.index == null && Ke();
3327
- let P = new al(0, 0, document.body.clientWidth, document.body.clientHeight - d.value), J = { init: y, handler: u, end: C, range: P, affix: 10 };
3328
- se.drag(c.value, J);
3329
- }), nt(() => {
3330
- se.dispose();
3331
- }), be(() => m.value, (V, P) => {
3332
- let J = { id: a.value, current: V, min: oe, max: re, affix: fe };
3333
- Ne.save(a.value, J, X);
3334
- }, { deep: !0 }), t({ focus: rt, blur: qt, min: Ye, max: Xe, restore: Be, affix: Q, toggleShow: Yt, options: m.value }), (V, P) => {
3335
- const J = O("el-scrollbar");
3336
- return e(E) ? (i(), L(pt, {
3337
- key: 0,
3338
- to: "body"
3339
- }, [
3340
- f("div", {
3341
- ref_key: "windowRef",
3342
- ref: r,
3343
- class: le(["ha-window", [e(m).state, e(n).class, e(m).focus ? "focus" : ""]]),
3344
- style: xe({ left: e(m).x + "px", top: e(m).y + "px", width: e(m).width + "px", height: e(m).height + "px", zIndex: e(m).index }),
3345
- onMousedown: P[13] || (P[13] = //@ts-ignore
3346
- (...F) => e(xt) && e(xt)(...F))
3347
- }, [
3348
- f("div", $a, [
3349
- f("div", {
3350
- ref_key: "shortcutRef",
3351
- ref: p,
3352
- class: "header-shortcut"
3353
- }, [
3354
- ee(V.$slots, "shortcut")
3355
- ], 512),
3356
- f("div", {
3357
- ref_key: "titleRef",
3358
- ref: c,
3359
- class: "header-title",
3360
- onDblclick: P[0] || (P[0] = //@ts-ignore
3361
- (...F) => e(k) && e(k)(...F))
3362
- }, [
3363
- e(w) ? ee(V.$slots, "title", { key: 0 }) : (i(), b(G, { key: 1 }, [
3364
- B(M(e(s)), 1)
3365
- ], 64))
3366
- ], 544),
3367
- f("div", {
3368
- ref_key: "toolbarRef",
3369
- ref: g,
3370
- class: "header-toolbar"
3371
- }, [
3372
- ee(V.$slots, "toolbar"),
3373
- f("i", {
3374
- class: "toolbar-min",
3375
- onClick: P[1] || (P[1] = //@ts-ignore
3376
- (...F) => e(Ye) && e(Ye)(...F))
3377
- }),
3378
- e(m).state != "max" ? (i(), b("i", {
3379
- key: 0,
3380
- class: "toolbar-max",
3381
- onClick: P[2] || (P[2] = //@ts-ignore
3382
- (...F) => e(Xe) && e(Xe)(...F))
3383
- })) : (i(), b("i", {
3384
- key: 1,
3385
- class: "toolbar-restore",
3386
- onClick: P[3] || (P[3] = //@ts-ignore
3387
- (...F) => e(Be) && e(Be)(...F))
3388
- })),
3389
- f("i", {
3390
- class: "toolbar-close",
3391
- onClick: P[4] || (P[4] = //@ts-ignore
3392
- (...F) => e(kt) && e(kt)(...F))
3393
- })
3394
- ], 512)
3395
- ]),
3396
- x(e(Ot), {
3397
- class: "window-body",
3398
- width: e(m).side,
3399
- onResize: e(Ft)
3400
- }, {
3401
- left: h(() => [
3402
- e(T) ? (i(), L(J, {
3403
- key: 0,
3404
- class: "window-side"
3405
- }, {
3406
- default: h(() => [
3407
- ee(V.$slots, "side")
3408
- ]),
3409
- _: 3
3410
- })) : W("", !0)
3411
- ]),
3412
- default: h(() => [
3413
- f("div", Ca, [
3414
- e(D) ? (i(), L(J, {
3415
- key: 0,
3416
- class: "window-main-header",
3417
- onClick: e(rt)
3418
- }, {
3419
- default: h(() => [
3420
- ee(V.$slots, "header")
3421
- ]),
3422
- _: 3
3423
- }, 8, ["onClick"])) : W("", !0),
3424
- f("div", Sa, [
3425
- ee(V.$slots, "default")
3426
- ]),
3427
- e(I) ? (i(), b("div", Va, [
3428
- ee(V.$slots, "footer")
3429
- ])) : W("", !0)
3430
- ])
3431
- ]),
3432
- _: 3
3433
- }, 8, ["width", "onResize"]),
3434
- f("div", Ra, [
3435
- f("div", {
3436
- class: "left",
3437
- onMousedown: P[5] || (P[5] = (F) => e(Ve)(F, "left"))
3438
- }, null, 32),
3439
- f("div", {
3440
- class: "top",
3441
- onMousedown: P[6] || (P[6] = (F) => e(Ve)(F, "top"))
3442
- }, null, 32),
3443
- f("div", {
3444
- class: "right",
3445
- onMousedown: P[7] || (P[7] = (F) => e(Ve)(F, "right"))
3446
- }, null, 32),
3447
- f("div", {
3448
- class: "bottom",
3449
- onMousedown: P[8] || (P[8] = (F) => e(Ve)(F, "bottom"))
3450
- }, null, 32),
3451
- f("div", {
3452
- class: "left-top",
3453
- onMousedown: P[9] || (P[9] = (F) => e(Ve)(F, "left-top"))
3454
- }, null, 32),
3455
- f("div", {
3456
- class: "top-right",
3457
- onMousedown: P[10] || (P[10] = (F) => e(Ve)(F, "top-right"))
3458
- }, null, 32),
3459
- f("div", {
3460
- class: "right-bottom",
3461
- onMousedown: P[11] || (P[11] = (F) => e(Ve)(F, "right-bottom"))
3462
- }, null, 32),
3463
- f("div", {
3464
- class: "bottom-left",
3465
- onMousedown: P[12] || (P[12] = (F) => e(Ve)(F, "bottom-left"))
3466
- }, null, 32)
3467
- ]),
3468
- e(q) ? (i(), b("div", {
3469
- key: 0,
3470
- class: "window-widget",
3471
- style: xe({ height: `calc(100% - ${e(d)}px)` })
3472
- }, null, 4)) : W("", !0)
3473
- ], 38)
3474
- ])) : W("", !0);
3475
- };
3476
- }
3477
- });
3478
- class Ga {
3479
- constructor() {
3480
- /**
3481
- * 前端环境变量
3482
- */
3483
- N(this, "env");
3484
- /**
3485
- * 自定义路由
3486
- */
3487
- N(this, "routes");
3488
- /**
3489
- * 多语言配置
3490
- */
3491
- N(this, "lang");
3492
- }
3493
- }
3494
- let Ma = async () => {
3495
- await Rt.getElementPlus(), Rt.getFortAwesome(), await import("./assets/halo-fe-idvmXC0t.js").then((_) => _.aP), await Promise.resolve({ });
3496
- }, Qa = async (_, t) => {
3497
- Vt.useEnv(t.env);
3498
- let l = new nl();
3499
- l.baseUrl = Oe.api.url, l.messenger = wl, l.i18nSvc = Pl, await rl(l), await Ma(), await Ll(), de.open(Vt.env.base), await ye.useGlobal(_), ye.useRoutes(t.routes), ye.useI18n(t.lang);
3500
- };
3501
- export {
3502
- zt as A,
3503
- ma as B,
3504
- Nt as C,
3505
- lt as D,
3506
- At as E,
3507
- yt as F,
3508
- Fa as G,
3509
- Ka as H,
3510
- Ll as I,
3511
- Tl as J,
3512
- Pl as K,
3513
- Ne as L,
3514
- Ga as M,
3515
- We as _,
3516
- Wt as a,
3517
- Wa as b,
3518
- Ue as c,
3519
- El as d,
3520
- Ya as e,
3521
- Ot as f,
3522
- Ha as g,
3523
- ye as h,
3524
- qa as i,
3525
- Ba as j,
3526
- Xa as k,
3527
- Qa as l,
3528
- It as m,
3529
- to as n,
3530
- Oa as o,
3531
- tt as p,
3532
- Xl as q,
3533
- de as r,
3534
- Ol as s,
3535
- po as t,
3536
- Wl as u,
3537
- ht as v,
3538
- Na as w,
3539
- Aa as x,
3540
- ja as y,
3541
- Lo as z
3542
- };