@utogether/udp-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/build/index.ts +90 -0
  2. package/build/plugins.ts +26 -0
  3. package/dist/403-B1R-4vXw.js +64 -0
  4. package/dist/404-fXPl8csw.js +64 -0
  5. package/dist/500-eI5842YB.js +66 -0
  6. package/dist/AuthorityInfo-CfVH6PaB.js +4 -0
  7. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +102 -0
  8. package/dist/AuthorityPanel-BaLMwMgW.js +4 -0
  9. package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js +107 -0
  10. package/dist/Company-CYC9Avfz.js +25 -0
  11. package/dist/CompanyPanel-B4MzoqN_.js +206 -0
  12. package/dist/DataSet-DT-rGICv.js +147 -0
  13. package/dist/Department-B4BNSiYx.js +25 -0
  14. package/dist/DepartmentPanel-zJO89L2O.js +224 -0
  15. package/dist/DesignPanel-S8P0J97f.js +4 -0
  16. package/dist/DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js +1015 -0
  17. package/dist/DictView-bIS5-rK-.js +95 -0
  18. package/dist/InvOrganization-MuM2jtsG.js +66 -0
  19. package/dist/Org-kXHSjsgJ.js +35 -0
  20. package/dist/Preview-CRyiwUIR.js +48 -0
  21. package/dist/ReportDefine-WZYIx8Sm.js +10 -0
  22. package/dist/ReportDesign-D-7GKgpb.js +165 -0
  23. package/dist/ReportQuery-BIIJny6w.js +75 -0
  24. package/dist/ReportQueryFrom-OoUl7N2O.js +4 -0
  25. package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js +177 -0
  26. package/dist/ReportTemplate-Cfeq9US-.js +161 -0
  27. package/dist/Role-BwTV2QMH.js +25 -0
  28. package/dist/RoleAssign-De1JjOun.js +26 -0
  29. package/dist/RolePanel-E3RcdByM.js +4 -0
  30. package/dist/RolePanel-pUBXsqCM.js +4 -0
  31. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js +148 -0
  32. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +126 -0
  33. package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js +100 -0
  34. package/dist/Staff-Czm7A8vI.js +25 -0
  35. package/dist/StaffInfo-DJzvBuxy.js +4 -0
  36. package/dist/StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js +108 -0
  37. package/dist/StaffPanel-CHk60LEz.js +4 -0
  38. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js +114 -0
  39. package/dist/SysUser-BGwbttRn.js +15 -0
  40. package/dist/SysUserPanel-BCbKoLKt.js +4 -0
  41. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +289 -0
  42. package/dist/SystemMenu-BkqZSDKl.js +151 -0
  43. package/dist/UserInfo-BsyAcT2d.js +4 -0
  44. package/dist/UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js +158 -0
  45. package/dist/await-to-js.es5-BtRbN2QH.js +10 -0
  46. package/dist/childView-CF83nhxb.js +4 -0
  47. package/dist/childView-CyuLTUqC.js +4 -0
  48. package/dist/childView.vue_vue_type_style_index_0_lang-CNSgGda3.js +187 -0
  49. package/dist/childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js +144 -0
  50. package/dist/code-rule-Bz-gnktN.js +147 -0
  51. package/dist/core.es.js +13 -0
  52. package/dist/core.umd.js +173 -0
  53. package/dist/cron-task-CIifSUdW.js +135 -0
  54. package/dist/frameView-_d2mqjjQ.js +43 -0
  55. package/dist/img/l_img.svg +1 -0
  56. package/dist/img/minicolors.png +0 -0
  57. package/dist/img/v_img.svg +1 -0
  58. package/dist/index-BKIw8tSn.js +9195 -0
  59. package/dist/layoutView-DLKVepB8.js +3317 -0
  60. package/dist/log-in-e7D5Ss1P.js +110 -0
  61. package/dist/log-out--RRncZhN.js +120 -0
  62. package/dist/login-LREiDfFU.js +251 -0
  63. package/dist/login-log-CvVnyGi3.js +68 -0
  64. package/dist/lov-view-DDrIVILB.js +97 -0
  65. package/dist/menuInfo-B1FUV-Sk.js +4 -0
  66. package/dist/menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js +338 -0
  67. package/dist/pda-app-CRhVGijN.js +2209 -0
  68. package/dist/redirect-DiaNDu8F.js +15 -0
  69. package/dist/resource-BCwx9fEv.js +97 -0
  70. package/dist/su-welcome-189A7N4r.js +526 -0
  71. package/dist/sys-config-BZ3sejow.js +277 -0
  72. package/dist/udp-core.css +9 -0
  73. package/dist/utogether-r08LNiIZ.js +182 -0
  74. package/index.ts +36 -0
  75. package/package.json +16 -0
  76. package/public/img/l_img.svg +1 -0
  77. package/public/img/minicolors.png +0 -0
  78. package/public/img/v_img.svg +1 -0
  79. package/src/App.vue +70 -0
  80. package/src/api/http.ts +50 -0
  81. package/src/api/index.ts +31 -0
  82. package/src/api/mock.ts +20 -0
  83. package/src/api/user.ts +43 -0
  84. package/src/assets/images/avatars.jpg +0 -0
  85. package/src/assets/images/empty.png +0 -0
  86. package/src/assets/images/login.png +0 -0
  87. package/src/assets/images/logo.png +0 -0
  88. package/src/assets/images/mask-text.jpg +0 -0
  89. package/src/assets/images/minicolors.png +0 -0
  90. package/src/assets/images/utogether.png +0 -0
  91. package/src/assets/images/welcome.png +0 -0
  92. package/src/assets/status/403.svg +1 -0
  93. package/src/assets/status/404.svg +1 -0
  94. package/src/assets/status/500.svg +1 -0
  95. package/src/assets/svg/back_top.svg +1 -0
  96. package/src/assets/svg/bg.svg +1 -0
  97. package/src/assets/svg/close.svg +1 -0
  98. package/src/assets/svg/close_all.svg +1 -0
  99. package/src/assets/svg/close_left.svg +1 -0
  100. package/src/assets/svg/close_other.svg +1 -0
  101. package/src/assets/svg/close_right.svg +1 -0
  102. package/src/assets/svg/dark.svg +1 -0
  103. package/src/assets/svg/day.svg +1 -0
  104. package/src/assets/svg/enter_outlined.svg +1 -0
  105. package/src/assets/svg/exit_screen.svg +1 -0
  106. package/src/assets/svg/full_screen.svg +1 -0
  107. package/src/assets/svg/globalization.svg +1 -0
  108. package/src/assets/svg/loading.svg +17 -0
  109. package/src/assets/svg/mdi_keyboard_esc.svg +1 -0
  110. package/src/assets/svg/refresh.svg +1 -0
  111. package/src/assets/svg/system.svg +1 -0
  112. package/src/components/ReCountTo/README.md +2 -0
  113. package/src/components/ReCountTo/index.ts +18 -0
  114. package/src/components/ReCountTo/src/normal/index.tsx +165 -0
  115. package/src/components/ReCountTo/src/normal/props.ts +37 -0
  116. package/src/components/ReCountTo/src/rebound/index.tsx +67 -0
  117. package/src/components/ReCountTo/src/rebound/props.ts +14 -0
  118. package/src/components/ReCountTo/src/rebound/rebound.css +77 -0
  119. package/src/components/ReCropper/index.ts +14 -0
  120. package/src/components/ReCropper/src/index.tsx +141 -0
  121. package/src/components/ReFlicker/index.css +39 -0
  122. package/src/components/ReFlicker/index.ts +50 -0
  123. package/src/components/ReFlop/index.ts +14 -0
  124. package/src/components/ReFlop/src/Filpper.tsx +99 -0
  125. package/src/components/ReFlop/src/filpper.css +184 -0
  126. package/src/components/ReFlop/src/index.vue +126 -0
  127. package/src/components/ReFlowChart/index.ts +24 -0
  128. package/src/components/ReFlowChart/src/Control.vue +139 -0
  129. package/src/components/ReFlowChart/src/DataDialog.vue +12 -0
  130. package/src/components/ReFlowChart/src/NodePanel.vue +151 -0
  131. package/src/components/ReFlowChart/src/adpterForTurbo.ts +160 -0
  132. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +49 -0
  133. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
  134. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +61 -0
  135. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +58 -0
  136. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +47 -0
  137. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
  138. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
  139. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
  140. package/src/components/ReFlowChart/src/config.ts +62 -0
  141. package/src/components/ReIcon/index.ts +12 -0
  142. package/src/components/ReIcon/src/Icon.vue +81 -0
  143. package/src/components/ReIcon/src/hooks.ts +63 -0
  144. package/src/components/ReIcon/src/iconfont.ts +45 -0
  145. package/src/components/ReIcon/src/iconifyIconOffline.ts +36 -0
  146. package/src/components/ReIcon/src/iconifyIconOnline.ts +28 -0
  147. package/src/components/ReIcon/src/offlineIcon.ts +64 -0
  148. package/src/components/ReIcon/src/types.ts +20 -0
  149. package/src/components/ReSplitPane/index.css +49 -0
  150. package/src/components/ReSplitPane/index.tsx +119 -0
  151. package/src/components/ReSplitPane/resizer.css +45 -0
  152. package/src/components/ReSplitPane/resizer.tsx +30 -0
  153. package/src/components/SuCharts/index.ts +36 -0
  154. package/src/components/SuCharts/src/EchartBar.vue +134 -0
  155. package/src/components/SuCharts/src/UserInfo.vue +78 -0
  156. package/src/components/SuCharts/src/echart-line.vue +85 -0
  157. package/src/components/SuCharts/src/echart-pie.vue +95 -0
  158. package/src/components/SuCommon/card/components/Card.vue +148 -0
  159. package/src/components/SuCommon/card/components/DialogForm.vue +127 -0
  160. package/src/components/SuCommon/card/index.vue +142 -0
  161. package/src/components/SuCommon/icon-select/index.vue +241 -0
  162. package/src/components/SuCommon/table/index.vue +208 -0
  163. package/src/components/SuCommon/utils/index.ts +103 -0
  164. package/src/components/SuCommon/utils/slot.tsx +50 -0
  165. package/src/components/SuFloatButton/index.vue +159 -0
  166. package/src/components/SuQrcode/index.ts +14 -0
  167. package/src/components/SuQrcode/src/index.scss +9 -0
  168. package/src/components/SuQrcode/src/index.tsx +236 -0
  169. package/src/components/SuScrollTree/ScrollPanel.vue +175 -0
  170. package/src/components/SuTable/SuTable.vue +334 -0
  171. package/src/components/SuTypeit/index.ts +51 -0
  172. package/src/config/index.ts +35 -0
  173. package/src/contant/index.ts +20 -0
  174. package/src/directives/elResizeDetector/index.ts +33 -0
  175. package/src/directives/index.ts +11 -0
  176. package/src/directives/permission/index.ts +29 -0
  177. package/src/layout/components/lay-chrome/index.vue +30 -0
  178. package/src/layout/components/lay-content/index.vue +143 -0
  179. package/src/layout/components/lay-navbar/index.vue +237 -0
  180. package/src/layout/components/lay-notice/data.ts +59 -0
  181. package/src/layout/components/lay-notice/index.vue +83 -0
  182. package/src/layout/components/lay-notice/noticeItem.vue +160 -0
  183. package/src/layout/components/lay-notice/noticeList.vue +19 -0
  184. package/src/layout/components/lay-panel/index.vue +150 -0
  185. package/src/layout/components/lay-search/components/SearchFooter.vue +67 -0
  186. package/src/layout/components/lay-search/components/SearchModal.vue +189 -0
  187. package/src/layout/components/lay-search/components/SearchResult.vue +132 -0
  188. package/src/layout/components/lay-search/components/index.ts +10 -0
  189. package/src/layout/components/lay-search/index.vue +25 -0
  190. package/src/layout/components/lay-select-org/index.vue +69 -0
  191. package/src/layout/components/lay-setting/index.vue +510 -0
  192. package/src/layout/components/lay-sidebar/breadCrumb.vue +131 -0
  193. package/src/layout/components/lay-sidebar/extraIcon.vue +25 -0
  194. package/src/layout/components/lay-sidebar/hamBurger.vue +72 -0
  195. package/src/layout/components/lay-sidebar/horizontal.vue +191 -0
  196. package/src/layout/components/lay-sidebar/mixNav.vue +258 -0
  197. package/src/layout/components/lay-sidebar/sidebar-logo.vue +98 -0
  198. package/src/layout/components/lay-sidebar/sidebarItem.vue +205 -0
  199. package/src/layout/components/lay-sidebar/vertical.vue +94 -0
  200. package/src/layout/components/lay-tag/index.scss +375 -0
  201. package/src/layout/components/lay-tag/index.vue +625 -0
  202. package/src/layout/frameView.vue +71 -0
  203. package/src/layout/hooks/useBoolean.ts +33 -0
  204. package/src/layout/hooks/useDataThemeChange.ts +142 -0
  205. package/src/layout/hooks/useLayout.ts +65 -0
  206. package/src/layout/hooks/useNav.ts +173 -0
  207. package/src/layout/hooks/useTag.ts +233 -0
  208. package/src/layout/hooks/useTranslationLang.ts +51 -0
  209. package/src/layout/layoutView.vue +215 -0
  210. package/src/layout/redirect.vue +30 -0
  211. package/src/layout/routerView/parent.vue +23 -0
  212. package/src/layout/types.ts +92 -0
  213. package/src/main.ts +108 -0
  214. package/src/plugins/echarts/index.ts +58 -0
  215. package/src/plugins/echarts/theme.json +394 -0
  216. package/src/plugins/i18n/en.ts +289 -0
  217. package/src/plugins/i18n/index.ts +76 -0
  218. package/src/plugins/i18n/module/u-report.ts +64 -0
  219. package/src/plugins/i18n/module/u-workflow.ts +71 -0
  220. package/src/plugins/i18n/module/umsg.ts +28 -0
  221. package/src/plugins/i18n/zh.ts +337 -0
  222. package/src/plugins/vxe-table/index.ts +46 -0
  223. package/src/plugins/vxe-table/render.tsx +397 -0
  224. package/src/router/createComponent.tsx +25 -0
  225. package/src/router/index.ts +183 -0
  226. package/src/router/modules/error.ts +32 -0
  227. package/src/router/modules/home.ts +32 -0
  228. package/src/router/modules/nested.ts +93 -0
  229. package/src/router/modules/remaining.ts +83 -0
  230. package/src/router/modules/tabs.ts +55 -0
  231. package/src/router/utils.ts +377 -0
  232. package/src/store/index.ts +9 -0
  233. package/src/store/modules/app.ts +69 -0
  234. package/src/store/modules/epTheme.ts +49 -0
  235. package/src/store/modules/multiTags.ts +109 -0
  236. package/src/store/modules/permission.ts +103 -0
  237. package/src/store/modules/settings.ts +40 -0
  238. package/src/store/modules/system.ts +180 -0
  239. package/src/store/modules/types.ts +49 -0
  240. package/src/style/button.scss +78 -0
  241. package/src/style/clear-mixin.scss +28 -0
  242. package/src/style/dark.scss +218 -0
  243. package/src/style/element-plus.scss +206 -0
  244. package/src/style/index.scss +76 -0
  245. package/src/style/login.css +336 -0
  246. package/src/style/login2.css +106 -0
  247. package/src/style/print-lock.css +375 -0
  248. package/src/style/reset.scss +272 -0
  249. package/src/style/sidebar.scss +770 -0
  250. package/src/style/suprint.css +985 -0
  251. package/src/style/tailwind.css +68 -0
  252. package/src/style/theme.scss +143 -0
  253. package/src/style/transition.scss +42 -0
  254. package/src/style/vxetable.scss +256 -0
  255. package/src/utils/authority/index.ts +29 -0
  256. package/src/utils/browers.ts +59 -0
  257. package/src/utils/dataFormat/index.ts +223 -0
  258. package/src/utils/http/index.ts +297 -0
  259. package/src/utils/http/types.d.ts +46 -0
  260. package/src/utils/index.ts +47 -0
  261. package/src/utils/lifecycle.ts +20 -0
  262. package/src/utils/mitt.ts +19 -0
  263. package/src/utils/propTypes.ts +47 -0
  264. package/src/utils/storage/index.ts +51 -0
  265. package/src/views/components/contextmenu/basic.vue +74 -0
  266. package/src/views/components/contextmenu/context-menu.vue +40 -0
  267. package/src/views/components/contextmenu/menuDynamic.vue +99 -0
  268. package/src/views/components/contextmenu/menuGroup.vue +71 -0
  269. package/src/views/components/count-to/index.vue +43 -0
  270. package/src/views/components/cropping/index.vue +59 -0
  271. package/src/views/components/cropping/picture.jpeg +0 -0
  272. package/src/views/components/split-pane/index.vue +82 -0
  273. package/src/views/components/video/index.vue +57 -0
  274. package/src/views/error/403.vue +50 -0
  275. package/src/views/error/404.vue +50 -0
  276. package/src/views/error/500.vue +52 -0
  277. package/src/views/login/login-view.vue +314 -0
  278. package/src/views/login/utils/motion.ts +47 -0
  279. package/src/views/login/utils/rule.ts +70 -0
  280. package/src/views/login/utils/verifyCode.ts +52 -0
  281. package/src/views/organization/company/Company.vue +56 -0
  282. package/src/views/organization/company/CompanyPanel.vue +259 -0
  283. package/src/views/organization/department/Department.vue +58 -0
  284. package/src/views/organization/department/DepartmentPanel.vue +283 -0
  285. package/src/views/organization/inv-org/InvOrganization.vue +53 -0
  286. package/src/views/organization/org/Org.vue +43 -0
  287. package/src/views/organization/staff/Staff.vue +58 -0
  288. package/src/views/organization/staff/StaffInfo.vue +163 -0
  289. package/src/views/organization/staff/StaffPanel.vue +144 -0
  290. package/src/views/system/cron/cron-task.vue +157 -0
  291. package/src/views/system/menu/AuthorityPanel.vue +140 -0
  292. package/src/views/system/menu/SystemMenu.vue +191 -0
  293. package/src/views/system/menu/menuInfo.vue +368 -0
  294. package/src/views/system/role/AuthorityInfo.vue +147 -0
  295. package/src/views/system/role/Role.vue +57 -0
  296. package/src/views/system/role/RolePanel.vue +191 -0
  297. package/src/views/system/role/UserInfo.vue +193 -0
  298. package/src/views/system/role-assign/RoleAssign.vue +57 -0
  299. package/src/views/system/role-assign/RolePanel.vue +136 -0
  300. package/src/views/system/sys/sys-config.vue +291 -0
  301. package/src/views/system/sysUser/SysUser.vue +45 -0
  302. package/src/views/system/sysUser/SysUserPanel.vue +278 -0
  303. package/src/views/uapp/pda/pda-app.vue +176 -0
  304. package/src/views/udev/coderule/code-rule.vue +121 -0
  305. package/src/views/udev/dict/DictView.vue +106 -0
  306. package/src/views/udev/dict/childView.vue +222 -0
  307. package/src/views/udev/lov/childView.vue +180 -0
  308. package/src/views/udev/lov/lov-view.vue +91 -0
  309. package/src/views/ufile/aggregation/File.vue +87 -0
  310. package/src/views/ufile/file/water-mark.vue +103 -0
  311. package/src/views/uhome/components/menu-favorite.vue +331 -0
  312. package/src/views/uhome/su-welcome.vue +339 -0
  313. package/src/views/ulogin/login.vue +316 -0
  314. package/src/views/umsg/monitor/msg-monitor.vue +36 -0
  315. package/src/views/umsg/msg/TemplateContent.vue +103 -0
  316. package/src/views/umsg/msg/msg-template.vue +66 -0
  317. package/src/views/umsg/send/childView.vue +142 -0
  318. package/src/views/umsg/send/msg-send.vue +95 -0
  319. package/src/views/upms/interface/log-in.vue +106 -0
  320. package/src/views/upms/interface/log-out.vue +107 -0
  321. package/src/views/upms/user/login-log.vue +60 -0
  322. package/src/views/urpt/dataSet/DataSet.vue +139 -0
  323. package/src/views/urpt/design/DesignPanel.vue +526 -0
  324. package/src/views/urpt/design/Preview.vue +65 -0
  325. package/src/views/urpt/design/ReportDesign.vue +249 -0
  326. package/src/views/urpt/design/bg.png +0 -0
  327. package/src/views/urpt/design/panel.ts +841 -0
  328. package/src/views/urpt/design/print-data.ts +59 -0
  329. package/src/views/urpt/query/ReportQuery.vue +122 -0
  330. package/src/views/urpt/query/ReportQueryFrom.vue +252 -0
  331. package/src/views/urpt/report-request/ReportDefine.vue +10 -0
  332. package/src/views/urpt/static-resource/resource.vue +116 -0
  333. package/src/views/urpt/template/ReportTemplate.vue +198 -0
  334. package/tsconfig.json +30 -0
  335. package/types/env.d.ts +1 -0
  336. package/types/global-components.d.ts +12 -0
  337. package/types/global.d.ts +236 -0
  338. package/types/image.d.ts +7 -0
  339. package/types/index.d.ts +73 -0
  340. package/types/router.d.ts +107 -0
  341. package/types/shims-tsx.d.ts +22 -0
  342. package/types/shims-vue.d.ts +20 -0
  343. package/vite.config.ts +73 -0
@@ -0,0 +1,72 @@
1
+ <!--
2
+ * @Author: levi7754 levi7754@163.com
3
+ * @Date: 2023-06-19 09:14:18
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-04-16 16:24:02
6
+ * @FilePath: /udp-front/packages/udp-core/src/layout/components/lay-sidebar/hamBurger.vue
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ -->
9
+ <template>
10
+ <div
11
+ :class="classes.container"
12
+ :title="props.isActive ? $t('message.udp.collapse') : $t('message.udp.expand')"
13
+ @click="toggleClick"
14
+ @mouseenter="fillColor = useEpThemeStoreHook().epThemeColor"
15
+ @mouseleave="fillColor = ''"
16
+ >
17
+ <svg
18
+ :fill="fillColor"
19
+ :class="['hamburger', props.isActive ? 'is-active' : 'color-primary']"
20
+ class="hover:color-primary color-primary dark:fill-light-900"
21
+ viewBox="0 0 1024 1024"
22
+ xmlns="http://www.w3.org/2000/svg"
23
+ width="64"
24
+ height="64"
25
+ >
26
+ <path
27
+ d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
28
+ />
29
+ </svg>
30
+ </div>
31
+ </template>
32
+
33
+ <script setup lang="ts">
34
+ import { ref } from 'vue';
35
+ import { useEpThemeStoreHook } from '../../../store/modules/epTheme';
36
+ export interface Props {
37
+ isActive: boolean;
38
+ }
39
+
40
+ const props = withDefaults(defineProps<Props>(), {
41
+ isActive: false
42
+ });
43
+
44
+ const fillColor = ref<string>('');
45
+
46
+ const emit = defineEmits<{
47
+ (e: 'toggleClick'): void;
48
+ }>();
49
+
50
+ const toggleClick = () => {
51
+ emit('toggleClick');
52
+ };
53
+ </script>
54
+
55
+ <style module="classes" scoped>
56
+ .container {
57
+ padding: 0 15px;
58
+ }
59
+ </style>
60
+
61
+ <style scoped>
62
+ .hamburger {
63
+ display: inline-block;
64
+ width: 20px;
65
+ height: 20px;
66
+ vertical-align: middle;
67
+ }
68
+
69
+ .is-active {
70
+ transform: rotate(180deg);
71
+ }
72
+ </style>
@@ -0,0 +1,191 @@
1
+ <script setup lang="ts">
2
+ import { ref, nextTick } from 'vue';
3
+ import { storageLocal } from '@utogether/utils';
4
+ import { useNav } from '../../hooks/useNav';
5
+ import OrgSelect from '../lay-select-org/index.vue';
6
+ import Search from '../lay-search/index.vue';
7
+ // import Notice from '../lay-notice/index.vue';
8
+ import SidebarItem from './sidebarItem.vue';
9
+ import avatars from '../../../assets/images/avatars.jpg';
10
+ import { kSYSCONFIG } from '../../../contant';
11
+ import { useTranslationLang } from '../../hooks/useTranslationLang';
12
+ import globalization from '../../../assets/svg/globalization.svg?component';
13
+
14
+ import utogether from '../../../assets/images/utogether.png';
15
+ import { usePermissionStoreHook } from '../../../store/modules/permission';
16
+
17
+ const menuRef = ref();
18
+ const { route, locale, translationCh, translationEn } = useTranslationLang(menuRef);
19
+ const routeStore = usePermissionStoreHook();
20
+
21
+ const sysConfig = storageLocal.getItem(kSYSCONFIG) || {};
22
+
23
+ const logo = ref(sysConfig['logo'] || utogether);
24
+ const {
25
+ title,
26
+ logout,
27
+ backHome,
28
+ onPanel,
29
+ userInfo,
30
+ avatarsStyle,
31
+ getDropdownItemStyle,
32
+ getDropdownItemClass,
33
+ passwordItems
34
+ } = useNav();
35
+
36
+ const record: IRecord = {};
37
+
38
+ const refScrollbar = ref(null);
39
+ const showModal = ref(false);
40
+
41
+ nextTick(() => {
42
+ menuRef.value?.handleResize();
43
+ });
44
+
45
+ /**
46
+ * @description: 重置密码
47
+ */
48
+ const handleResetPwd = (): void => {
49
+ record.id = userInfo['id'];
50
+ showModal.value = true;
51
+ };
52
+
53
+ const handleScroll = e => {
54
+ const wheelDelta = e.wheelDelta || -e.deltaY * 40;
55
+ const scrollbar = refScrollbar.value;
56
+ // scrollbar.wrap$获取到包裹容器的element对象
57
+ scrollbar.setScrollLeft(scrollbar.wrapRef.scrollLeft + wheelDelta);
58
+ };
59
+ </script>
60
+ <script lang="ts">
61
+ export default { name: 'LayoutHorizontal' };
62
+ </script>
63
+ <template>
64
+ <div v-spinning="usePermissionStoreHook().wholeMenus.length === 0" class="horizontal-header">
65
+ <div class="flex flex-1 horizontal-header-left" @click="backHome">
66
+ <img :src="logo" class="h-full" />
67
+ <span class="text-xl u-project-text">{{ title }}</span>
68
+ </div>
69
+ <el-scrollbar ref="refScrollbar" class="flex-[3]" @wheel.prevent="handleScroll">
70
+ <template #default>
71
+ <el-menu
72
+ :default-active="route.path"
73
+ :ellipsis="false"
74
+ unique-opened
75
+ router
76
+ popper-class="udp-scrollbar"
77
+ class="horizontal-header-menu"
78
+ mode="horizontal"
79
+ >
80
+ <sidebar-item
81
+ v-for="route in routeStore.wholeMenus"
82
+ :key="route.path"
83
+ :item="route"
84
+ :base-path="route.path"
85
+ />
86
+ </el-menu>
87
+ </template>
88
+ </el-scrollbar>
89
+ <div class="horizontal-header-right flex-[2]">
90
+ <!-- 业务单元选择 -->
91
+ <OrgSelect class="udp-horizontal" />
92
+ <!-- 菜单搜索 -->
93
+ <Search />
94
+ <!-- 通知 -->
95
+ <!-- <Notice id="header-notice" /> -->
96
+ <!-- 国际化 -->
97
+ <el-dropdown id="header-translation" trigger="click">
98
+ <globalization
99
+ class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
100
+ />
101
+ <template #dropdown>
102
+ <el-dropdown-menu class="translation">
103
+ <el-dropdown-item
104
+ :style="getDropdownItemStyle(locale, 'zh')"
105
+ :class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
106
+ @click="translationCh"
107
+ >
108
+ <span v-show="locale === 'zh'" class="check-zh">
109
+ <IconifyIconOffline icon="check" />
110
+ </span>
111
+ 简体中文
112
+ </el-dropdown-item>
113
+ <el-dropdown-item
114
+ :style="getDropdownItemStyle(locale, 'en')"
115
+ :class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
116
+ @click="translationEn"
117
+ >
118
+ <span v-show="locale === 'en'" class="check-en">
119
+ <IconifyIconOffline icon="check" />
120
+ </span>
121
+ English
122
+ </el-dropdown-item>
123
+ </el-dropdown-menu>
124
+ </template>
125
+ </el-dropdown>
126
+ <!-- 退出登录 -->
127
+ <el-dropdown trigger="click">
128
+ <span class="el-dropdown-link navbar-bg-hover">
129
+ <img v-if="avatars" :src="avatars" :style="avatarsStyle" />
130
+ <p class="dark:text-white">{{ userInfo.name }}</p>
131
+ </span>
132
+ <template #dropdown>
133
+ <el-dropdown-menu class="user-dropdown">
134
+ <el-dropdown-item @click="handleResetPwd">
135
+ <IconifyIconOffline icon="edit" />
136
+ {{ $t('message.udp.passwordReset') }}</el-dropdown-item
137
+ >
138
+ <el-divider style="margin: 3px 0 !important" />
139
+ <el-dropdown-item @click="logout">
140
+ <IconifyIconOffline icon="switch-button" />
141
+ {{ $t('message.udp.logout') }}
142
+ </el-dropdown-item>
143
+ </el-dropdown-menu>
144
+ </template>
145
+ </el-dropdown>
146
+ <span class="el-icon-setting navbar-bg-hover" @click="onPanel">
147
+ <IconifyIconOffline icon="ri:settings-5-fill" />
148
+ </span>
149
+ </div>
150
+ <ut-modal-form
151
+ v-if="showModal"
152
+ :record="record"
153
+ :items="passwordItems()"
154
+ :width="360"
155
+ :height="240"
156
+ :title="$t('message.udp.passwordReset')"
157
+ data-status="update"
158
+ url="/user/updatePwd"
159
+ method="put"
160
+ @close="showModal = false"
161
+ />
162
+ </div>
163
+ </template>
164
+
165
+ <style lang="scss" scoped>
166
+ .translation {
167
+ ::v-deep(.el-dropdown-menu__item) {
168
+ padding: 5px 40px;
169
+ }
170
+
171
+ .check-zh {
172
+ position: absolute;
173
+ left: 20px;
174
+ }
175
+
176
+ .check-en {
177
+ position: absolute;
178
+ left: 20px;
179
+ }
180
+ }
181
+
182
+ .logout {
183
+ max-width: 120px;
184
+
185
+ ::v-deep(.el-dropdown-menu__item) {
186
+ display: inline-flex;
187
+ flex-wrap: wrap;
188
+ min-width: 100%;
189
+ }
190
+ }
191
+ </style>
@@ -0,0 +1,258 @@
1
+ <script setup lang="ts">
2
+ import { ref, watch, toRaw, onMounted, nextTick } from 'vue';
3
+ import OrgSelect from '../lay-select-org/index.vue';
4
+ import Search from '../lay-search/index.vue';
5
+ // import Notice from '../lay-notice/index.vue';
6
+ import extraIcon from './extraIcon.vue';
7
+ import avatars from '../../../assets/images/avatars.jpg';
8
+ import { transformI18n } from '../../../plugins/i18n';
9
+ import { useRenderIcon } from '../../../components/ReIcon/src/hooks';
10
+ import { useEpThemeStoreHook } from '../../../store/modules/epTheme';
11
+ import { getParentPaths, findRouteByPath } from '../../../router/utils';
12
+ import { useNav } from '../../hooks/useNav';
13
+ import { useTranslationLang } from '../../hooks/useTranslationLang';
14
+ import { usePermissionStoreHook } from '../../../store/modules/permission';
15
+ import globalization from '../../../assets/svg/globalization.svg?component';
16
+
17
+ const menuRef = ref();
18
+ const { route, locale, translationCh, translationEn } = useTranslationLang(menuRef);
19
+
20
+ const {
21
+ device,
22
+ logout,
23
+ onPanel,
24
+ toggleSideBar,
25
+ resolvePath,
26
+ appHook,
27
+ userInfo,
28
+ getDivStyle,
29
+ avatarsStyle,
30
+ getDropdownItemStyle,
31
+ getDropdownItemClass,
32
+ passwordItems
33
+ } = useNav();
34
+
35
+ const refScrollbar = ref(null);
36
+ const defaultActive = ref(null);
37
+ const record: IRecord = {};
38
+
39
+ const showModal = ref(false);
40
+
41
+ function getDefaultActive(routePath) {
42
+ const wholeMenus = usePermissionStoreHook().wholeMenus;
43
+ // 当前路由的父级路径
44
+ const parentRoutes = getParentPaths(routePath, wholeMenus)[0];
45
+ defaultActive.value = findRouteByPath(parentRoutes, wholeMenus)?.children[0]?.path;
46
+ }
47
+
48
+ onMounted(() => {
49
+ getDefaultActive(route.path);
50
+ });
51
+
52
+ nextTick(() => {
53
+ menuRef.value?.handleResize();
54
+ });
55
+
56
+ watch(
57
+ () => route.path,
58
+ () => {
59
+ getDefaultActive(route.path);
60
+ }
61
+ );
62
+
63
+ const handleResetPwd = (): void => {
64
+ record.id = userInfo['id'];
65
+ showModal.value = true;
66
+ };
67
+
68
+ const handleScroll = e => {
69
+ const wheelDelta = e.wheelDelta || -e.deltaY * 40;
70
+ const scrollbar = refScrollbar.value;
71
+ // scrollbar.wrap$获取到包裹容器的element对象
72
+ scrollbar.setScrollLeft(scrollbar.wrapRef.scrollLeft + wheelDelta);
73
+ };
74
+ </script>
75
+
76
+ <template>
77
+ <div v-if="device !== 'mobile'" class="horizontal-header">
78
+ <div
79
+ :class="classes.container"
80
+ :title="appHook.sidebar.opened ? $t('message.udp.collapse') : $t('message.udp.expand')"
81
+ @click="toggleSideBar"
82
+ >
83
+ <svg
84
+ :fill="useEpThemeStoreHook().fill"
85
+ :class="['hamburger', appHook.sidebar.opened ? 'is-active-hamburger' : '']"
86
+ viewBox="0 0 1024 1024"
87
+ xmlns="http://www.w3.org/2000/svg"
88
+ width="64"
89
+ height="64"
90
+ >
91
+ <path
92
+ d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
93
+ />
94
+ </svg>
95
+ </div>
96
+
97
+ <el-scrollbar ref="refScrollbar" style="max-width: 66%" @wheel.prevent="handleScroll">
98
+ <template #default>
99
+ <el-menu
100
+ ref="menu"
101
+ :default-active="defaultActive"
102
+ :ellipsis="false"
103
+ class="horizontal-header-menu"
104
+ mode="horizontal"
105
+ router
106
+ >
107
+ <el-menu-item
108
+ v-for="route in usePermissionStoreHook().wholeMenus"
109
+ :key="route.path"
110
+ :index="resolvePath(route) || route.redirect"
111
+ >
112
+ <template #title>
113
+ <div v-if="toRaw(route.meta.icon)" :class="['sub-menu-icon', route.meta.icon]">
114
+ <component :is="useRenderIcon(route.meta && toRaw(route.meta.icon))" />
115
+ </div>
116
+ <!-- <span class="select-none">{{ transformI18n(route.meta.title) }}</span>
117
+ <FontIcon
118
+ v-if="route.meta.extraIcon"
119
+ width="30px"
120
+ height="30px"
121
+ style="position: absolute; right: 10px"
122
+ :icon="route.meta.extraIcon"
123
+ :svg="route.meta.extraIcon ? true : false"
124
+ /> -->
125
+ <div :style="getDivStyle">
126
+ <span class="select-none">
127
+ {{ transformI18n(route.meta.title) }}
128
+ </span>
129
+ <extraIcon :extra-icon="route.meta.extraIcon" />
130
+ </div>
131
+ </template>
132
+ </el-menu-item>
133
+ </el-menu>
134
+ </template>
135
+ </el-scrollbar>
136
+ <div class="horizontal-header-right">
137
+ <!-- 业务单元选择 -->
138
+ <OrgSelect />
139
+ <!-- 菜单搜索 -->
140
+ <Search />
141
+ <!-- 通知 -->
142
+ <!-- <Notice id="header-notice" /> -->
143
+ <!-- 国际化 -->
144
+ <el-dropdown id="header-translation" trigger="click">
145
+ <globalization
146
+ class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
147
+ />
148
+ <template #dropdown>
149
+ <el-dropdown-menu class="translation">
150
+ <el-dropdown-item
151
+ :style="getDropdownItemStyle(locale, 'zh')"
152
+ :class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
153
+ @click="translationCh"
154
+ >
155
+ <span v-show="locale === 'zh'" class="check-zh">
156
+ <IconifyIconOffline icon="ri:check-line" />
157
+ </span>
158
+ 简体中文
159
+ </el-dropdown-item>
160
+ <el-dropdown-item
161
+ :style="getDropdownItemStyle(locale, 'en')"
162
+ :class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
163
+ @click="translationEn"
164
+ >
165
+ <span v-show="locale === 'en'" class="check-en">
166
+ <IconifyIconOffline icon="ri:check-line" />
167
+ </span>
168
+ English
169
+ </el-dropdown-item>
170
+ </el-dropdown-menu>
171
+ </template>
172
+ </el-dropdown>
173
+ <!-- 退出登陆 -->
174
+ <el-dropdown trigger="click">
175
+ <span class="select-none el-dropdown-link navbar-bg-hover">
176
+ <img v-if="avatars" :src="avatars" :style="avatarsStyle" />
177
+ <p class="dark:text-white">{{ userInfo.name }}</p>
178
+ </span>
179
+ <template #dropdown>
180
+ <el-dropdown-menu class="logout">
181
+ <el-dropdown-item @click="handleResetPwd">
182
+ <IconifyIconOffline icon="ri:edit-2-fill" />
183
+ {{ $t('message.udp.passwordReset') }}
184
+ </el-dropdown-item>
185
+ <el-divider style="margin: 3px 0 !important" />
186
+ <el-dropdown-item @click="logout">
187
+ <IconifyIconOffline icon="switch-button" />
188
+ {{ $t('message.udp.logout') }}
189
+ </el-dropdown-item>
190
+ </el-dropdown-menu>
191
+ </template>
192
+ </el-dropdown>
193
+ <span class="el-icon-setting navbar-bg-hover" @click="onPanel">
194
+ <IconifyIconOffline icon="ri:settings-5-fill" />
195
+ </span>
196
+ </div>
197
+
198
+ <ut-modal-form
199
+ v-if="showModal"
200
+ :record="record"
201
+ :items="passwordItems()"
202
+ :width="360"
203
+ :height="240"
204
+ :title="$t('message.udp.passwordReset')"
205
+ data-status="update"
206
+ url="/uums/user/updatePwd"
207
+ method="put"
208
+ @close="showModal = false"
209
+ />
210
+ </div>
211
+ </template>
212
+
213
+ <style module="classes" scoped>
214
+ .container {
215
+ padding: 0 15px;
216
+ }
217
+ </style>
218
+
219
+ <style lang="scss" scoped>
220
+ .hamburger {
221
+ width: 20px;
222
+ height: 20px;
223
+
224
+ &:hover {
225
+ cursor: pointer;
226
+ }
227
+ }
228
+
229
+ .is-active-hamburger {
230
+ transform: rotate(180deg);
231
+ }
232
+
233
+ .translation {
234
+ ::v-deep(.el-dropdown-menu__item) {
235
+ padding: 5px 40px;
236
+ }
237
+
238
+ .check-zh {
239
+ position: absolute;
240
+ left: 20px;
241
+ }
242
+
243
+ .check-en {
244
+ position: absolute;
245
+ left: 20px;
246
+ }
247
+ }
248
+
249
+ .logout {
250
+ max-width: 120px;
251
+
252
+ ::v-deep(.el-dropdown-menu__item) {
253
+ display: inline-flex;
254
+ flex-wrap: wrap;
255
+ min-width: 100%;
256
+ }
257
+ }
258
+ </style>
@@ -0,0 +1,98 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2021-11-17 16:02:30
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-04-17 17:15:15
6
+ * @Description: file content
7
+ -->
8
+ <script setup lang="ts">
9
+ import { ref } from 'vue';
10
+ import { storageLocal } from '@utogether/utils';
11
+ import { kSYSCONFIG } from '../../../contant';
12
+ import utogether from '../../../assets/images/utogether.png';
13
+
14
+ const props = defineProps({
15
+ collapse: Boolean
16
+ });
17
+
18
+ const sysConfig = storageLocal.getItem(kSYSCONFIG) || {};
19
+
20
+ const title = sysConfig['title'];
21
+ const logo = ref(sysConfig['logo'] || utogether);
22
+ // console.log(logo);
23
+ </script>
24
+
25
+ <template>
26
+ <div class="sidebar-logo-container" :class="{ collapses: props.collapse }">
27
+ <transition name="sidebarLogoFade">
28
+ <router-link
29
+ v-if="props.collapse"
30
+ key="props.collapse"
31
+ :title="title"
32
+ class="sidebar-logo-link"
33
+ to="/"
34
+ >
35
+ <img :src="logo" class="ut-collapse-img ut-sidebar-logo" />
36
+ </router-link>
37
+ <router-link v-else key="expand" :title="title" class="sidebar-logo-link" to="/">
38
+ <img :src="logo" class="ut-sidebar-logo h-10" />
39
+ <span class="sidebar-title">{{ title }}</span>
40
+ </router-link>
41
+ </transition>
42
+ </div>
43
+ </template>
44
+
45
+ <style lang="scss" scoped>
46
+ .sidebar-logo-container {
47
+ position: relative;
48
+ width: 100%;
49
+ height: 48px;
50
+ overflow: hidden;
51
+ text-align: center;
52
+ background-color: var(--udp-theme-sidebar-logo);
53
+
54
+ .sidebar-logo-link {
55
+ // margin-top: 5px;
56
+ display: flex;
57
+ flex-direction: column;
58
+ height: 100%;
59
+ overflow: hidden;
60
+ text-overflow: ellipsis;
61
+ white-space: nowrap;
62
+
63
+ .ut-sidebar-logo {
64
+ height: 100%;
65
+ }
66
+
67
+ .ut-collapse-img {
68
+ width: 100%;
69
+ }
70
+
71
+ .sidebar-title {
72
+ display: block;
73
+ // width: 140px;
74
+ // margin-top: 10px;
75
+ margin-left: 10px;
76
+ overflow: hidden;
77
+ text-overflow: ellipsis;
78
+ font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
79
+ font-size: 24px;
80
+ font-weight: 600;
81
+ color: var(--udp-theme-project-text);
82
+ text-align: left;
83
+ white-space: nowrap;
84
+ }
85
+ }
86
+
87
+ .collapses {
88
+ .sidebar-logo {
89
+ margin-right: 0;
90
+ }
91
+ }
92
+
93
+ svg {
94
+ width: 50px;
95
+ height: 50px;
96
+ }
97
+ }
98
+ </style>