@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,67 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-03-10 11:26:15
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2024-06-28 13:51:52
6
+ * @Description: 搜索底部
7
+ -->
8
+ <template>
9
+ <div class="search-footer text-[#333] dark:text-white">
10
+ <span class="search-footer-item">
11
+ <enterOutlined class="icon" />
12
+ {{ $t('message.btn.confirm') }}
13
+ </span>
14
+ <span class="search-footer-item">
15
+ <IconifyIconOffline :icon="ArrowUpLine" class="icon" />
16
+ <IconifyIconOffline :icon="ArrowDownLine" class="icon" />
17
+ {{ $t('message.btn.toggle') }}
18
+ </span>
19
+ <span class="search-footer-item">
20
+ <mdiKeyboardEsc class="icon" />
21
+ {{ $t('message.btn.close') }}
22
+ </span>
23
+ <p v-if="device !== 'mobile' && props.total > 0" class="search-footer-total">
24
+ 共{{ props.total }}项
25
+ </p>
26
+ </div>
27
+ </template>
28
+
29
+ <script lang="ts" setup>
30
+ import { useNav } from '../../../hooks/useNav';
31
+ import enterOutlined from '../../../../assets/svg/enter_outlined.svg?component';
32
+ import mdiKeyboardEsc from '../../../../assets/svg/mdi_keyboard_esc.svg?component';
33
+ import ArrowUpLine from '@iconify-icons/ri/arrow-up-line';
34
+ import ArrowDownLine from '@iconify-icons/ri/arrow-down-line';
35
+
36
+ const props = withDefaults(defineProps<{ total: number }>(), {
37
+ total: 0
38
+ });
39
+
40
+ const { device } = useNav();
41
+ </script>
42
+ <style lang="scss" scoped>
43
+ .search-footer {
44
+ display: flex;
45
+
46
+ .search-footer-item {
47
+ display: flex;
48
+ align-items: center;
49
+ margin-right: 14px;
50
+ }
51
+
52
+ .icon {
53
+ padding: 2px;
54
+ margin-right: 3px;
55
+ font-size: 20px;
56
+ box-shadow:
57
+ inset 0 -2px #cdcde6,
58
+ inset 0 0 1px 1px #fff,
59
+ 0 1px 2px 1px #1e235a66;
60
+ }
61
+
62
+ .search-footer-total {
63
+ position: absolute;
64
+ right: 20px;
65
+ }
66
+ }
67
+ </style>
@@ -0,0 +1,189 @@
1
+ <template>
2
+ <el-dialog
3
+ v-model="show"
4
+ class="udp-search-dialog"
5
+ top="5vh"
6
+ append-to-body
7
+ :show-close="false"
8
+ :width="device === 'mobile' ? '80vw' : '40vw'"
9
+ :style="{
10
+ borderRadius: '6px'
11
+ }"
12
+ :title="$t('message.udp.menuQuery')"
13
+ :before-close="handleClose"
14
+ @opened="inputRef.focus()"
15
+ @closed="inputRef.blur()"
16
+ >
17
+ <el-input
18
+ ref="inputRef"
19
+ v-model="keyword"
20
+ :placeholder="$t('message.udp.menuQuery')"
21
+ size="large"
22
+ clearable
23
+ @input="handleSearch"
24
+ >
25
+ <template #prefix>
26
+ <IconifyIconOffline :icon="Search" class="text-primary w-[24px] h-[24px]" />
27
+ </template>
28
+ </el-input>
29
+ <div class="search-result-container">
30
+ <el-scrollbar ref="scrollbarRef" max-height="calc(90vh - 140px)">
31
+ <el-empty v-if="resultOptions.length === 0" :description="$t('message.emptyData')" />
32
+ <SearchResult
33
+ v-else
34
+ ref="resultRef"
35
+ v-model:value="activePath"
36
+ :options="resultOptions"
37
+ @click="handleEnter"
38
+ />
39
+ </el-scrollbar>
40
+ </div>
41
+ <template #footer>
42
+ <SearchFooter :total="resultOptions.length" />
43
+ </template>
44
+ </el-dialog>
45
+ </template>
46
+ <script lang="ts" setup>
47
+ import { ref, watch, computed, nextTick, shallowRef } from 'vue';
48
+ import { useDebounceFn, onKeyStroke } from '@vueuse/core';
49
+ import { useRouter } from 'vue-router';
50
+ import { clone } from 'xe-utils';
51
+ import SearchResult from './SearchResult.vue';
52
+ import SearchFooter from './SearchFooter.vue';
53
+ import { useNav } from '../../../hooks/useNav';
54
+ import { transformI18n } from '../../../../plugins/i18n';
55
+ import { usePermissionStoreHook } from '../../../../store/modules/permission';
56
+ import Search from '@iconify-icons/ri/search-line';
57
+
58
+ interface Props {
59
+ /** 弹窗显隐 */
60
+ value: boolean;
61
+ }
62
+
63
+ interface Emits {
64
+ (e: 'update:value', val: boolean): void;
65
+ }
66
+
67
+ const { device } = useNav();
68
+ const emit = defineEmits<Emits>();
69
+ const props = withDefaults(defineProps<Props>(), {});
70
+ const router = useRouter();
71
+
72
+ const keyword = ref('');
73
+ const activePath = ref('');
74
+ const scrollbarRef = ref();
75
+ const resultRef = ref();
76
+ const inputRef = ref<HTMLInputElement | null>(null);
77
+ const resultOptions = shallowRef([]);
78
+ const handleSearch = useDebounceFn(search, 300);
79
+
80
+ /** 菜单树形结构 */
81
+ const menusData = computed(() => {
82
+ return clone(usePermissionStoreHook().wholeMenus);
83
+ });
84
+
85
+ const show = computed({
86
+ get() {
87
+ return props.value;
88
+ },
89
+ set(val: boolean) {
90
+ emit('update:value', val);
91
+ }
92
+ });
93
+
94
+ watch(show, async val => {
95
+ if (val) {
96
+ /** 自动聚焦 */
97
+ await nextTick();
98
+ inputRef.value?.focus();
99
+ }
100
+ });
101
+
102
+ /** 将菜单树形结构扁平化为一维数组,用于菜单查询 */
103
+ function flatTree(arr) {
104
+ const res = [];
105
+ function deep(arr) {
106
+ arr.forEach(item => {
107
+ res.push(item);
108
+ item.children && deep(item.children);
109
+ });
110
+ }
111
+ deep(arr);
112
+ return res;
113
+ }
114
+
115
+ /** 查询 */
116
+ function search() {
117
+ const flatMenusData = flatTree(menusData.value);
118
+ resultOptions.value = flatMenusData.filter(
119
+ menu =>
120
+ keyword.value &&
121
+ transformI18n(menu.meta?.title)
122
+ .toLocaleLowerCase()
123
+ .includes(keyword.value.toLocaleLowerCase().trim())
124
+ );
125
+ if (resultOptions.value?.length > 0) {
126
+ activePath.value = resultOptions.value[0].path;
127
+ } else {
128
+ activePath.value = '';
129
+ }
130
+ }
131
+
132
+ function handleClose() {
133
+ show.value = false;
134
+ /** 延时处理防止用户看到某些操作 */
135
+ setTimeout(() => {
136
+ resultOptions.value = [];
137
+ keyword.value = '';
138
+ }, 200);
139
+ }
140
+
141
+ function scrollTo(index) {
142
+ const scrollTop = resultRef.value.handleScroll(index);
143
+ scrollbarRef.value.setScrollTop(scrollTop);
144
+ }
145
+
146
+ /** key up */
147
+ function handleUp() {
148
+ const { length } = resultOptions.value;
149
+ if (length === 0) return;
150
+ const index = resultOptions.value.findIndex(item => item.path === activePath.value);
151
+ if (index === 0) {
152
+ activePath.value = resultOptions.value[length - 1].path;
153
+ scrollTo(resultOptions.value.length - 1);
154
+ } else {
155
+ activePath.value = resultOptions.value[index - 1].path;
156
+ scrollTo(index - 1);
157
+ }
158
+ }
159
+
160
+ /** key down */
161
+ function handleDown() {
162
+ const { length } = resultOptions.value;
163
+ if (length === 0) return;
164
+ const index = resultOptions.value.findIndex(item => item.path === activePath.value);
165
+ if (index + 1 === length) {
166
+ activePath.value = resultOptions.value[0].path;
167
+ } else {
168
+ activePath.value = resultOptions.value[index + 1].path;
169
+ }
170
+ }
171
+
172
+ /** key enter */
173
+ function handleEnter() {
174
+ const { length } = resultOptions.value;
175
+ if (length === 0 || activePath.value === '') return;
176
+ router.push(activePath.value);
177
+ handleClose();
178
+ }
179
+
180
+ onKeyStroke('Enter', handleEnter);
181
+ onKeyStroke('ArrowUp', handleUp);
182
+ onKeyStroke('ArrowDown', handleDown);
183
+ </script>
184
+
185
+ <style lang="scss" scoped>
186
+ .search-result-container {
187
+ margin-top: 12px;
188
+ }
189
+ </style>
@@ -0,0 +1,132 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-03-10 11:26:15
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2022-03-10 11:34:25
6
+ * @Description: 菜单搜索结果页
7
+ -->
8
+ <template>
9
+ <div ref="resultRef" class="result">
10
+ <div
11
+ v-for="(item, index) in options"
12
+ :key="item.path"
13
+ :ref="'resultItemRef' + index"
14
+ class="result-item dark:bg-[#1d1d1d]"
15
+ :style="itemStyle(item)"
16
+ @click="handleTo"
17
+ @mouseenter="handleMouse(item)"
18
+ >
19
+ <component :is="useRenderIcon(item.meta?.icon ?? Bookmark2Line)" />
20
+ <span class="result-item-title">{{ $t(item.meta?.title) }}</span>
21
+ <enterOutlined />
22
+ </div>
23
+ </div>
24
+ </template>
25
+
26
+ <script lang="ts" setup>
27
+ import { useResizeObserver } from '@vueuse/core';
28
+ import { ref, computed, getCurrentInstance, onMounted } from 'vue';
29
+ import { useEpThemeStoreHook } from '../../../../store/modules/epTheme';
30
+ import { useRenderIcon } from '../../../../components/ReIcon/src/hooks';
31
+ import enterOutlined from '../../../../assets/svg/enter_outlined.svg?component';
32
+ import Bookmark2Line from '@iconify-icons/ri/bookmark-2-line';
33
+
34
+ interface optionsItem {
35
+ path: string;
36
+ meta?: {
37
+ icon?: string;
38
+ title?: string;
39
+ };
40
+ }
41
+
42
+ interface Props {
43
+ value: string;
44
+ options: Array<optionsItem>;
45
+ }
46
+
47
+ interface Emits {
48
+ (e: 'update:value', val: string): void;
49
+ (e: 'enter'): void;
50
+ }
51
+
52
+ const resultRef = ref();
53
+ const innerHeight = ref();
54
+ const props = withDefaults(defineProps<Props>(), {});
55
+ const emit = defineEmits<Emits>();
56
+
57
+ const instance = getCurrentInstance()!;
58
+
59
+ const itemStyle = computed(() => {
60
+ return item => {
61
+ return {
62
+ background: item?.path === active.value ? useEpThemeStoreHook().epThemeColor : '',
63
+ color: item.path === active.value ? '#fff' : '',
64
+ fontSize: item.path === active.value ? '16px' : '14px'
65
+ };
66
+ };
67
+ });
68
+
69
+ const active = computed({
70
+ get() {
71
+ return props.value;
72
+ },
73
+ set(val: string) {
74
+ emit('update:value', val);
75
+ }
76
+ });
77
+
78
+ /** 鼠标移入 */
79
+ async function handleMouse(item) {
80
+ active.value = item.path;
81
+ }
82
+
83
+ function handleTo() {
84
+ emit('enter');
85
+ }
86
+
87
+ function resizeResult() {
88
+ // el-scrollbar max-height="calc(90vh - 140px)"
89
+ innerHeight.value = window.innerHeight - window.innerHeight / 10 - 140;
90
+ }
91
+
92
+ useResizeObserver(resultRef, () => {
93
+ resizeResult();
94
+ });
95
+
96
+ function handleScroll(index: number) {
97
+ const curInstance = instance?.proxy?.$refs[`resultItemRef${index}`];
98
+ if (!curInstance) return 0;
99
+ const curRef = curInstance[0] as ElRef;
100
+ const scrollTop = curRef.offsetTop + 128; // 128 两个result-item(56px+56px=112px)高度加上下margin(8px+8px=16px)
101
+ return scrollTop > innerHeight.value ? scrollTop - innerHeight.value : 0;
102
+ }
103
+
104
+ onMounted(() => {
105
+ resizeResult();
106
+ });
107
+
108
+ defineExpose({ handleScroll });
109
+ </script>
110
+ <style lang="scss" scoped>
111
+ .result {
112
+ padding-bottom: 12px;
113
+
114
+ &-item {
115
+ display: flex;
116
+ align-items: center;
117
+ height: 56px;
118
+ padding: 14px;
119
+ margin-top: 8px;
120
+ cursor: pointer;
121
+ border: 0.1px solid #ccc;
122
+ border-radius: 4px;
123
+ transition: all 0.3s;
124
+
125
+ &-title {
126
+ display: flex;
127
+ flex: 1;
128
+ margin-left: 5px;
129
+ }
130
+ }
131
+ }
132
+ </style>
@@ -0,0 +1,10 @@
1
+ /*
2
+ * @Author: wei.li
3
+ * @Date: 2022-03-10 11:26:15
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2022-03-10 11:34:09
6
+ * @Description: file content
7
+ */
8
+ import SearchModal from './SearchModal.vue';
9
+
10
+ export { SearchModal };
@@ -0,0 +1,25 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-03-10 11:26:15
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2023-10-12 11:43:49
6
+ * @Description: 菜单栏搜索
7
+ -->
8
+ <script lang="ts" setup>
9
+ import { SearchModal } from './components';
10
+ import { useBoolean } from '../../hooks/useBoolean';
11
+ const { bool: show, toggle } = useBoolean();
12
+ function handleSearch() {
13
+ toggle();
14
+ }
15
+ </script>
16
+
17
+ <template>
18
+ <div
19
+ class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
20
+ @click="handleSearch"
21
+ >
22
+ <IconifyIconOffline icon="ri:search-line" />
23
+ </div>
24
+ <SearchModal v-model:value="show" />
25
+ </template>
@@ -0,0 +1,69 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2021-11-27 16:16:11
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-04-16 14:27:14
6
+ * @Description: file content
7
+ -->
8
+
9
+ <!-- 业务单元选择 -->
10
+ <template>
11
+ <div style="width: 240px">
12
+ <el-select v-model="orgId" size="small" @change="onChange">
13
+ <el-option
14
+ v-for="element in orgList"
15
+ :key="element.id"
16
+ :label="element.orgName"
17
+ :value="element.id"
18
+ />
19
+ </el-select>
20
+ </div>
21
+ </template>
22
+
23
+ <script lang="ts">
24
+ export default { name: 'OrgSelect' };
25
+ </script>
26
+
27
+ <script setup lang="ts">
28
+ import { unref, computed } from 'vue';
29
+ import to from 'await-to-js';
30
+ import { getServiceApi } from '../../../api';
31
+ import { useRoute, useRouter } from 'vue-router';
32
+ import { cookies } from '@utogether/utils';
33
+ import { useSystemStoreHook } from '../../../store/modules/system';
34
+ import { usePermissionStoreHook } from '../../../store/modules/permission';
35
+
36
+ const route = useRoute();
37
+ const router = useRouter();
38
+ const orgList = computed(() => useSystemStoreHook().getOrglist);
39
+ const orgId = computed(() => useSystemStoreHook().getOrgId);
40
+
41
+ const onChange = async orgId => {
42
+ const [err] = await to(getServiceApi().post('/uums/org/toggle', { orgId }));
43
+ if (!err) {
44
+ useSystemStoreHook().setOrgId(orgId);
45
+ let organizationId;
46
+ const query = { pageSize: 100, pageNum: 1 };
47
+ const [err, data]: [Error, any] = await to(getServiceApi().get('/uums/cusOrganization', query));
48
+ if (!err && data.list?.length) {
49
+ useSystemStoreHook().setInvOrgList(data.list || []);
50
+ const invOrg = data.list.find(f => f.orgId === orgId);
51
+ organizationId = invOrg.id;
52
+ useSystemStoreHook().setOrganizationId(organizationId);
53
+ }
54
+ const param = { orgId, organizationId };
55
+ cookies.set('kCookies_param', JSON.stringify(param));
56
+ usePermissionStoreHook().cacheOperate({ mode: 'reset' });
57
+ onFresh();
58
+ }
59
+ };
60
+
61
+ /** 刷新路由 */
62
+ function onFresh() {
63
+ const { fullPath, query } = unref(route);
64
+ router.replace({
65
+ path: '/redirect' + fullPath,
66
+ query: query
67
+ });
68
+ }
69
+ </script>