@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,49 @@
1
+ /*
2
+ * @Author: wei.li
3
+ * @Date: 2021-12-23 17:33:20
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2024-12-17 18:53:00
6
+ * @Description: file content
7
+ */
8
+ import { store } from '../index';
9
+ import { defineStore } from 'pinia';
10
+ import { getConfig, responsiveStorageNameSpace } from '../../config';
11
+ import { storageLocal } from '@utogether/utils';
12
+
13
+ export const useEpThemeStore = defineStore('udp-epTheme', {
14
+ state: () => ({
15
+ epThemeColor:
16
+ storageLocal.getItem(`${responsiveStorageNameSpace()}-layout`)?.epThemeColor ??
17
+ getConfig().EpThemeColor,
18
+ epTheme: storageLocal.getItem(`${responsiveStorageNameSpace()}-layout`)?.theme ?? getConfig().Theme
19
+ }),
20
+ getters: {
21
+ getEpThemeColor() {
22
+ return this.epThemeColor;
23
+ },
24
+ // 用于mix导航模式下hamburger-svg的fill属性
25
+ fill() {
26
+ if (this.epTheme === 'light') {
27
+ return '#409eff';
28
+ } else if (this.epTheme === 'yellow') {
29
+ return '#d25f00';
30
+ } else {
31
+ return '#fff';
32
+ }
33
+ }
34
+ },
35
+ actions: {
36
+ setEpThemeColor(newColor: string): void {
37
+ const layout = storageLocal.getItem(`${responsiveStorageNameSpace()}layout`);
38
+ this.epTheme = layout?.theme;
39
+ this.epThemeColor = newColor;
40
+ if (!layout) return;
41
+ layout.epThemeColor = newColor;
42
+ storageLocal.setItem(`${responsiveStorageNameSpace()}layout`, layout);
43
+ }
44
+ }
45
+ });
46
+
47
+ export function useEpThemeStoreHook() {
48
+ return useEpThemeStore(store);
49
+ }
@@ -0,0 +1,109 @@
1
+ /*
2
+ * @Author: wei.li
3
+ * @Date: 2021-12-23 17:33:20
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2024-07-03 10:27:36
6
+ * @Description: file content
7
+ */
8
+ import { defineStore } from 'pinia';
9
+ import { isEqual, isBoolean } from 'xe-utils';
10
+ import { storageLocal, isUrl } from '@utogether/utils';
11
+ import { store } from '../index';
12
+ import { routerArrays } from '../../layout/types';
13
+ import { usePermissionStoreHook } from './permission';
14
+ import { responsiveStorageNameSpace } from '../../config';
15
+ import type { multiType, positionType } from './types';
16
+
17
+ export const useMultiTagsStore = defineStore('udp-multiTags', {
18
+ state: () => ({
19
+ // 存储标签页信息(路由信息)
20
+ multiTags: storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.multiTagsCache
21
+ ? storageLocal.getItem(`${responsiveStorageNameSpace()}tags`)
22
+ : [...routerArrays, ...usePermissionStoreHook().flatteningRoutes.filter(v => v?.meta?.fixedTag)],
23
+ multiTagsCache: storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.multiTagsCache
24
+ }),
25
+ getters: {
26
+ getMultiTagsCache(state) {
27
+ return state.multiTagsCache;
28
+ }
29
+ },
30
+ actions: {
31
+ multiTagsCacheChange(multiTagsCache: boolean) {
32
+ this.multiTagsCache = multiTagsCache;
33
+ if (multiTagsCache) {
34
+ storageLocal.setItem(`${responsiveStorageNameSpace()}tags`, this.multiTags);
35
+ } else {
36
+ storageLocal.removeItem(`${responsiveStorageNameSpace()}tags`);
37
+ }
38
+ },
39
+ tagsCache(multiTags) {
40
+ this.getMultiTagsCache && storageLocal.setItem(`${responsiveStorageNameSpace()}tags`, multiTags);
41
+ },
42
+ handleTags<T>(mode: string, value?: T | multiType, position?: positionType): T {
43
+ switch (mode) {
44
+ case 'equal':
45
+ this.multiTags = value;
46
+ this.tagsCache(this.multiTags);
47
+ break;
48
+ case 'push':
49
+ {
50
+ const tagVal = value as multiType;
51
+ // 不添加到标签页
52
+ if (tagVal?.meta?.hiddenTag) return;
53
+ // 如果是外链无需添加信息到标签页
54
+ if (isUrl(tagVal?.name)) return;
55
+ // 如果title为空拒绝添加空信息到标签页
56
+ if (tagVal?.meta?.title?.length === 0) return;
57
+ // showLink:false 不添加到标签页
58
+ if (isBoolean(tagVal?.meta?.showLink) && !tagVal?.meta?.showLink) return;
59
+ const tagPath = tagVal.path;
60
+ // 判断tag是否已存在
61
+ const tagHasExits = this.multiTags.some(tag => {
62
+ return tag.path === tagPath;
63
+ });
64
+
65
+ // 判断tag中的query键值是否相等
66
+ const tagQueryHasExits = this.multiTags.some(tag => {
67
+ return isEqual(tag?.query, tagVal?.query);
68
+ });
69
+
70
+ // 判断tag中的params键值是否相等
71
+ const tagParamsHasExits = this.multiTags.some(tag => {
72
+ return isEqual(tag?.params, tagVal?.params);
73
+ });
74
+
75
+ if (tagHasExits && tagQueryHasExits && tagParamsHasExits) return;
76
+
77
+ // 动态路由可打开的最大数量
78
+ const dynamicLevel = tagVal?.meta?.dynamicLevel ?? -1;
79
+ if (dynamicLevel > 0) {
80
+ if (this.multiTags.filter(e => e?.path === tagPath).length >= dynamicLevel) {
81
+ // 如果当前已打开的动态路由数大于dynamicLevel,替换第一个动态路由标签
82
+ const index = this.multiTags.findIndex(item => item?.path === tagPath);
83
+ index !== -1 && this.multiTags.splice(index, 1);
84
+ }
85
+ }
86
+ this.multiTags.push(value);
87
+ this.tagsCache(this.multiTags);
88
+ }
89
+ break;
90
+ case 'splice':
91
+ if (!position) {
92
+ const index = this.multiTags.findIndex(v => v.path === value);
93
+ if (index === -1) return;
94
+ this.multiTags.splice(index, 1);
95
+ } else {
96
+ this.multiTags.splice(position?.startIndex, position?.length);
97
+ }
98
+ this.tagsCache(this.multiTags);
99
+ return this.multiTags;
100
+ case 'slice':
101
+ return this.multiTags.slice(-1);
102
+ }
103
+ }
104
+ }
105
+ });
106
+
107
+ export function useMultiTagsStoreHook() {
108
+ return useMultiTagsStore(store);
109
+ }
@@ -0,0 +1,103 @@
1
+ /*
2
+ * @Author: wei.li
3
+ * @Date: 2021-11-17 16:02:30
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2024-07-03 10:20:58
6
+ * @Description: file content
7
+ */
8
+ import { defineStore } from 'pinia';
9
+ import { store } from '../index';
10
+ import type { cacheType } from './types';
11
+ import { constantMenus } from '../../router';
12
+ import { clone, debounce, findLastIndexOf } from 'xe-utils';
13
+ import { getKeyList } from '../../utils';
14
+ import { ascending, filterTree, formatFlatteningRoutes } from '../../router/utils';
15
+ import { useMultiTagsStoreHook } from './multiTags';
16
+
17
+ export const usePermissionStore = defineStore('udp-permission', {
18
+ state: () => ({
19
+ // 静态路由生成的菜单
20
+ constantMenus,
21
+ // 整体路由生成的菜单(静态、动态)
22
+ wholeMenus: [],
23
+ // 深拷贝一个菜单树,与导航菜单不冲突
24
+ menusTree: [],
25
+ // 整体路由(一维数组格式)
26
+ flatteningRoutes: [],
27
+ buttonAuth: [],
28
+ // 缓存页面keepAlive
29
+ cachePageList: []
30
+ }),
31
+ getters: {
32
+ getButtonAuth() {
33
+ return this.buttonAuth;
34
+ }
35
+ },
36
+ actions: {
37
+ asyncActionRoutes(routes = []) {
38
+ if (this.wholeMenus.length > 0) return;
39
+ const idx = findLastIndexOf(routes, item => item.menuCode === 'SysHome');
40
+ const constantMenus = clone(this.constantMenus, true);
41
+ if (idx !== -1) {
42
+ const homeRouter = this.constantMenus.find(f => f.name === 'home');
43
+ // 过滤非路由分类非菜单的数据
44
+ routes[idx].children && homeRouter.children.push(...routes[idx].children);
45
+ routes.splice(idx, 1);
46
+ }
47
+ this.wholeMenus = filterTree(ascending(this.constantMenus.concat(routes)));
48
+ this.flatteningRoutes = formatFlatteningRoutes(this.constantMenus.concat(routes));
49
+ this.menusTree = clone(this.wholeMenus, true);
50
+ this.constantMenus = constantMenus;
51
+ },
52
+ async changeSetting(routes) {
53
+ await this.asyncActionRoutes(routes);
54
+ },
55
+ setAuthButton(buttonAuth) {
56
+ this.buttonAuth = buttonAuth;
57
+ },
58
+ setWholeMenus(wholeMenus) {
59
+ this.wholeMenus = wholeMenus;
60
+ },
61
+ cacheOperate({ mode, name }: cacheType) {
62
+ const delIndex = this.cachePageList.findIndex(v => v === name);
63
+ switch (mode) {
64
+ case 'refresh':
65
+ this.cachePageList = this.cachePageList.filter(v => v !== name);
66
+ break;
67
+ case 'add':
68
+ this.cachePageList.push(name);
69
+ break;
70
+ case 'delete':
71
+ delIndex !== -1 && this.cachePageList.splice(delIndex, 1);
72
+ break;
73
+ case 'reset':
74
+ this.cachePageList = [];
75
+ break;
76
+ }
77
+ /** 监听缓存页面是否存在于标签页,不存在则删除 */
78
+ debounce(() => {
79
+ let cacheLength = this.cachePageList.length;
80
+ const nameList = getKeyList(useMultiTagsStoreHook().multiTags, 'name');
81
+ while (cacheLength > 0) {
82
+ nameList.findIndex(v => v === this.cachePageList[cacheLength - 1]) === -1 &&
83
+ this.cachePageList.splice(
84
+ this.cachePageList.indexOf(this.cachePageList[cacheLength - 1]),
85
+ 1
86
+ );
87
+ cacheLength--;
88
+ }
89
+ }, 500)();
90
+ },
91
+ /** 清空缓存页面 */
92
+ clearAllCachePage() {
93
+ this.wholeMenus = [];
94
+ this.menusTree = [];
95
+ this.buttonAuth = [];
96
+ this.cachePageList = [];
97
+ }
98
+ }
99
+ });
100
+
101
+ export function usePermissionStoreHook() {
102
+ return usePermissionStore(store);
103
+ }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * @Author: wei.li
3
+ * @Date: 2021-12-23 17:33:20
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2024-07-02 08:54:14
6
+ * @Description: file content
7
+ */
8
+ import { defineStore } from 'pinia';
9
+ import { store } from '../index';
10
+ import type { setType } from './types';
11
+ import { getConfig } from '../../config';
12
+
13
+ export const useSettingStore = defineStore('udp-setting', {
14
+ state: (): setType => ({
15
+ fixedHeader: getConfig().FixedHeader,
16
+ hiddenSideBar: getConfig().HiddenSideBar
17
+ }),
18
+ getters: {
19
+ getFixedHeader() {
20
+ return this.fixedHeader;
21
+ },
22
+ getHiddenSideBar() {
23
+ return this.HiddenSideBar;
24
+ }
25
+ },
26
+ actions: {
27
+ CHANGE_SETTING({ key, value }) {
28
+ if (Reflect.has(this, key)) {
29
+ this[key] = value;
30
+ }
31
+ },
32
+ changeSetting(data) {
33
+ this.CHANGE_SETTING(data);
34
+ }
35
+ }
36
+ });
37
+
38
+ export function useSettingStoreHook() {
39
+ return useSettingStore(store);
40
+ }
@@ -0,0 +1,180 @@
1
+ /*
2
+ * @Author: wei.li
3
+ * @Date: 2021-11-17 16:40:44
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2024-06-26 15:48:18
6
+ * @Description: file content
7
+ */
8
+ import { defineStore } from 'pinia';
9
+ import { store } from '../index';
10
+ import { cookies, storageLocal } from '@utogether/utils';
11
+ import { usePermissionStoreHook } from './permission';
12
+
13
+ interface ISystemState {
14
+ baseURL: string;
15
+ userInfo: IRecord;
16
+ systemInfo: IRecord;
17
+ dataDict: IRecord;
18
+ sysConfig: IRecord;
19
+ menui18n: object;
20
+ i18n: object;
21
+ orgList: IRecord[];
22
+ dicts: IRecord[];
23
+ invOrgList: IRecord[];
24
+ homeMenus: IRecord[];
25
+ sessionKey: string;
26
+ userName: string;
27
+ orgId: string;
28
+ organizationId: string;
29
+ isAdminRole: boolean;
30
+ }
31
+
32
+ export const useSystemStore = defineStore('udp-system', {
33
+ state: (): ISystemState => ({
34
+ baseURL: '',
35
+ userInfo: {},
36
+ systemInfo: {},
37
+ dataDict: {},
38
+ sysConfig: {},
39
+ menui18n: {},
40
+ i18n: {},
41
+ dicts: [],
42
+ orgList: [],
43
+ invOrgList: [],
44
+ homeMenus: [],
45
+ sessionKey: '',
46
+ orgId: '',
47
+ userName: '',
48
+ organizationId: '',
49
+ isAdminRole: false
50
+ }),
51
+ getters: {
52
+ getBaseURL() {
53
+ return this.baseURL;
54
+ },
55
+ getUserInfo() {
56
+ return this.userInfo;
57
+ },
58
+ getSysConfig() {
59
+ return this.sysConfig;
60
+ },
61
+ getEmployee() {
62
+ return this.employee;
63
+ },
64
+ getSessionKey() {
65
+ return this.sessionKey;
66
+ },
67
+ getMenuI18n() {
68
+ return this.menui18n;
69
+ },
70
+ getI18n() {
71
+ return this.i18n;
72
+ },
73
+ getOrglist() {
74
+ return this.orgList;
75
+ },
76
+ getOrgId() {
77
+ return this.orgId;
78
+ },
79
+ getOrganizationId() {
80
+ return this.organizationId;
81
+ },
82
+ getDataDict() {
83
+ return this.dataDict;
84
+ },
85
+ getUserName() {
86
+ return this.userName;
87
+ },
88
+ getAdminRole(state) {
89
+ return state.isAdminRole;
90
+ },
91
+ getHomeMenus(state) {
92
+ return state.homeMenus;
93
+ },
94
+ getOrganizationCode(state) {
95
+ return state.invOrgList?.find(f => f.id === state.organizationId)?.organizationCode;
96
+ },
97
+ getOrg(state) {
98
+ return state.orgList.find(f => f.id === state.orgId);
99
+ }
100
+ },
101
+ actions: {
102
+ // baseURL
103
+ setBaseURL(data) {
104
+ this.sessionKey = data;
105
+ },
106
+ setSessionKey(data) {
107
+ this.sessionKey = data.access_token || data;
108
+ },
109
+ // sysConfig
110
+ setSysConfig(sysConfig) {
111
+ this.sysConfig = sysConfig;
112
+ },
113
+ // orgId
114
+ setOrgId(orgId) {
115
+ this.orgId = orgId;
116
+ },
117
+ setOrganizationId(organizationId) {
118
+ this.organizationId = organizationId;
119
+ },
120
+ setMenuI18n(menui18n) {
121
+ this.menui18n = menui18n;
122
+ },
123
+ setI18n(i18n) {
124
+ this.i18n = i18n;
125
+ },
126
+ setUserName(userName) {
127
+ this.userName = userName;
128
+ },
129
+ // 首页子菜单列表
130
+ setHomeMenus(menus) {
131
+ this.homeMenus = menus;
132
+ },
133
+ // 库存组织列表
134
+ setInvOrgList(invOrgList) {
135
+ this.invOrgList = invOrgList;
136
+ },
137
+ setOrgList(orgList) {
138
+ this.orgList = orgList;
139
+ },
140
+ setDict(datas) {
141
+ // 数据字典
142
+ this.dicts = datas;
143
+ datas?.forEach(data => {
144
+ this.dataDict[data.dictCode] = data;
145
+ });
146
+ storageLocal.setItem('kLov', this.dataDict);
147
+ },
148
+ // 系统信息
149
+ setSystemInfo(systemInfo) {
150
+ // 系统信息
151
+ this.systemInfo = systemInfo;
152
+ // 当前用户
153
+ const employee = systemInfo.employeeList?.length ? systemInfo.employeeList[0] : '';
154
+ this.userInfo = systemInfo.user || {};
155
+ // 当前员工
156
+ this.employee = Object.assign({}, employee, systemInfo.user);
157
+ // 用户当前的业务业务实体
158
+ this.orgId = systemInfo.orgId;
159
+ // 用户当前库存组织
160
+ this.organizationId = systemInfo.organizationId;
161
+ // 用户所在的业务实体
162
+ this.orgList = systemInfo.orgList;
163
+ // 将公共参数缓存到cookie中
164
+ const query = {
165
+ orgId: systemInfo.orgId,
166
+ organizationId: systemInfo.organizationId
167
+ };
168
+ cookies.set('kCookies_param', JSON.stringify(query));
169
+ this.isAdminRole = this.employee.sysRoles.some(
170
+ s => s.roleCode === 'admin' || ['管理员'].includes(s.roleName)
171
+ );
172
+ // 缓存按钮数据权限
173
+ usePermissionStoreHook().setAuthButton(systemInfo.dataMenus);
174
+ }
175
+ }
176
+ });
177
+
178
+ export function useSystemStoreHook() {
179
+ return useSystemStore(store);
180
+ }
@@ -0,0 +1,49 @@
1
+ /*
2
+ * @Author: wei.li
3
+ * @Date: 2024-06-05 08:25:25
4
+ * @LastEditors: wei.li
5
+ * @LastEditTime: 2024-07-02 08:54:26
6
+ * @Description: file content
7
+ */
8
+ import type { RouteRecordName } from 'vue-router';
9
+
10
+ export type cacheType = {
11
+ mode: string;
12
+ name?: RouteRecordName;
13
+ };
14
+
15
+ export type positionType = {
16
+ startIndex?: number;
17
+ length?: number;
18
+ };
19
+
20
+ export type appType = {
21
+ sidebar: {
22
+ opened: boolean;
23
+ withoutAnimation: boolean;
24
+ // 判断是否手动点击Collapse
25
+ isClickCollapse: boolean;
26
+ };
27
+ layout: string;
28
+ device: string;
29
+ };
30
+
31
+ export type multiType = {
32
+ path: string;
33
+ name: string;
34
+ meta: any;
35
+ query?: object;
36
+ params?: object;
37
+ };
38
+
39
+ export type setType = {
40
+ fixedHeader: boolean;
41
+ hiddenSideBar: boolean;
42
+ };
43
+
44
+ export type userType = {
45
+ token: string;
46
+ name?: string;
47
+ verifyCode?: string;
48
+ currentPage?: number;
49
+ };
@@ -0,0 +1,78 @@
1
+ .vxe-button.size--mini.type--button {
2
+ height: 25px;
3
+ }
4
+
5
+ .vxe-button.size--small.type--button {
6
+ height: 25px;
7
+ }
8
+
9
+ .vxe-button.type--button.theme--u-cyan,
10
+ .vxe-button.type--button.theme--u-cyan:hover {
11
+ color: #fff;
12
+ }
13
+
14
+ .vxe-button.type--button.theme--u-cyan {
15
+ background-color: #1cbbb4;
16
+ }
17
+
18
+ .vxe-button.type--button.theme--u-cyan:active {
19
+ background-color: #39b54a;
20
+ }
21
+
22
+ // 禁用状态
23
+ .vxe-button.type--button.theme--u-cyan.is--disabled {
24
+ background-color: #69e4de;
25
+ border-color: #69e4de;
26
+ }
27
+
28
+ .vxe-button.type--button.theme--u-color-shallow,
29
+ .vxe-button.type--button.theme--u-color-shallow:hover {
30
+ color: #fff;
31
+ }
32
+
33
+ .vxe-button.type--button.theme--u-color-shallow {
34
+ background-color: #fbbd08;
35
+ }
36
+
37
+ .vxe-button.type--button.theme--u-color-shallow:active {
38
+ background-color: #fff;
39
+ }
40
+
41
+ .layout-theme-default .vxe-button.type--button.theme--u-cyan:not(.is--disabled):hover {
42
+ background-color: #40e0d0;
43
+ border-color: #40e0d0;
44
+ }
45
+
46
+ .vxe-button.type--button:not(.is--disabled):hover {
47
+ color: #fff !important;
48
+
49
+ .vxe-button--icon {
50
+ color: #4169e1;
51
+ }
52
+ }
53
+
54
+ .u-color-royalBlue {
55
+ color: #4169e1;
56
+ }
57
+
58
+ .u-color-turquoise {
59
+ color: #40e0d0;
60
+ }
61
+
62
+ .el-dropdown {
63
+ .el-dropdown__caret-button {
64
+ margin-left: 0;
65
+ border-top-left-radius: 0;
66
+ border-bottom-left-radius: 0;
67
+ }
68
+
69
+ .el-button-group + .el-button {
70
+ border-top-right-radius: 0 !important;
71
+ border-bottom-right-radius: 0 !important;
72
+ }
73
+
74
+ .el-button:first-child {
75
+ border-top-right-radius: 0 !important;
76
+ border-bottom-right-radius: 0 !important;
77
+ }
78
+ }
@@ -0,0 +1,28 @@
1
+ @mixin clearfix {
2
+ &::after {
3
+ clear: both;
4
+ display: table;
5
+ content: '';
6
+ }
7
+ }
8
+
9
+ @mixin relative {
10
+ position: relative;
11
+ width: 100%;
12
+ height: 100%;
13
+ }
14
+
15
+ @mixin scrollBar {
16
+ &::-webkit-scrollbar-track-piece {
17
+ background: #d3dce6;
18
+ }
19
+
20
+ &::-webkit-scrollbar {
21
+ width: 6px;
22
+ }
23
+
24
+ &::-webkit-scrollbar-thumb {
25
+ background: #99a9bf;
26
+ border-radius: 20px;
27
+ }
28
+ }