@utogether/udp-core 1.0.1 → 1.0.2

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 (239) hide show
  1. package/build/plugins.ts +13 -2
  2. package/dist/{403-JWjatlxJ.js → 403-B1rIjAAu.js} +7 -6
  3. package/dist/{404-BcdMJfPb.js → 404-mBqc2y4t.js} +14 -13
  4. package/dist/{500-bsa3F_cc.js → 500-BoI45Zdh.js} +10 -9
  5. package/dist/{AuthorityInfo-CqItgNs5.js → AuthorityInfo-B08NBIIn.js} +1 -1
  6. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BLP1SaiH.js +100 -0
  7. package/dist/{AuthorityPanel-BaLMwMgW.js → AuthorityPanel-BeBNiwqc.js} +1 -1
  8. package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js → AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js} +6 -6
  9. package/dist/{Company-DVff9IA7.js → Company-JGGyWEWH.js} +3 -3
  10. package/dist/{CompanyPanel-CNrdq4XE.js → CompanyPanel-BQ_cCmDx.js} +16 -16
  11. package/dist/{Department-CqcpfL4i.js → Department-z2iO6hwM.js} +10 -10
  12. package/dist/{DepartmentPanel-Bvti4LGu.js → DepartmentPanel-BtQe7zwU.js} +108 -78
  13. package/dist/{DesignPanel-CjykspE1.js → DesignPanel-7mhtVWas.js} +1 -1
  14. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-BK9EERdd.js → DesignPanel.vue_vue_type_style_index_0_lang-4EsHemj_.js} +24 -26
  15. package/dist/DictView-CjchV2Yk.js +109 -0
  16. package/dist/InvOrganization-Pn1O_XP0.js +74 -0
  17. package/dist/Org-BqytV_vi.js +39 -0
  18. package/dist/{Preview-Cm_7RhYU.js → Preview-CLpUUMay.js} +2 -2
  19. package/dist/{ReportDefine-CJVlQ--7.js → ReportDefine-Cz1KtEUF.js} +1 -1
  20. package/dist/{ReportDesign-B0unlrkt.js → ReportDesign-BaORYud4.js} +46 -46
  21. package/dist/{ReportQuery-BKuMCEvF.js → ReportQuery-CPCPXiXz.js} +5 -5
  22. package/dist/{ReportQueryFrom-DAngMJLU.js → ReportQueryFrom-C_AcrfkJ.js} +1 -1
  23. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CPpwmztJ.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Bm67ejay.js} +6 -5
  24. package/dist/{ReportTemplate-8YH3L8Pv.js → ReportTemplate-CFiNMz79.js} +26 -26
  25. package/dist/{Role-MxI30-0W.js → Role-B-XDoJd5.js} +6 -6
  26. package/dist/{RoleAssign-BzUY_y_y.js → RoleAssign-BolW8YVs.js} +9 -9
  27. package/dist/{RolePanel-DS_TErTn.js → RolePanel-2kfs5tw9.js} +1 -1
  28. package/dist/{RolePanel-CXdcvsR5.js → RolePanel-HilSuYns.js} +1 -1
  29. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CE4gApUY.js +132 -0
  30. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Ddl-A7Zh.js → RolePanel.vue_vue_type_script_setup_true_lang-DPzgfAyV.js} +42 -36
  31. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-DnchUgIF.js → ScrollPanel.vue_vue_type_style_index_0_lang-CCTH4RkH.js} +20 -20
  32. package/dist/{Staff-D7tXo_Gn.js → Staff-BTk3whFC.js} +3 -3
  33. package/dist/{StaffInfo-Bk8BY8PO.js → StaffInfo-d3AuSzlA.js} +1 -1
  34. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DqKwZi5f.js → StaffInfo.vue_vue_type_script_setup_true_lang-eOL4VlfE.js} +13 -13
  35. package/dist/{StaffPanel-VtpGCTIq.js → StaffPanel-DV-D4jjz.js} +1 -1
  36. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-4sFq3CEo.js +135 -0
  37. package/dist/{SysUser-D0Q6OvD7.js → SysUser-BnjYytws.js} +2 -2
  38. package/dist/{SysUserPanel-1_vrsANQ.js → SysUserPanel-CBoyD-Qi.js} +1 -1
  39. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-PrTlTZR-.js +341 -0
  40. package/dist/{SystemMenu-9PG3vESE.js → SystemMenu-kYB_ZaUt.js} +49 -47
  41. package/dist/{UserInfo-qgXUEGwi.js → UserInfo-4dx97VBL.js} +1 -1
  42. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-CN0C5rVk.js → UserInfo.vue_vue_type_style_index_0_lang-BpbC_ZDm.js} +35 -33
  43. package/dist/{childView-C7ZSA5fR.js → childView-CHPNfTEb.js} +1 -1
  44. package/dist/{childView-yV2QLwfA.js → childView-CKA_JgVZ.js} +1 -1
  45. package/dist/{childView.vue_vue_type_style_index_0_lang-DdKxPGdh.js → childView.vue_vue_type_style_index_0_lang-Bym2fQRd.js} +7 -7
  46. package/dist/childView.vue_vue_type_style_index_0_lang-W7bCtXeu.js +177 -0
  47. package/dist/{code-rule-95K1jr-u.js → code-rule-CbxuZg0-.js} +42 -41
  48. package/dist/core.es.js +19 -10
  49. package/dist/{cron-task-DGrQwOHs.js → cron-task-nTOpqQYf.js} +5 -5
  50. package/dist/flow-task-B07st2aD.js +10 -0
  51. package/dist/{frameView-7SmME93D.js → frameView-Z1tPUyCh.js} +15 -14
  52. package/dist/img/l_img.svg +1 -1
  53. package/dist/img/minicolors.png +0 -0
  54. package/dist/img/v_img.svg +1 -1
  55. package/dist/index-C3q8HoJM.js +4650 -0
  56. package/dist/{layoutView-C6WIVWGZ.js → layoutView--MGA9zUB.js} +1776 -1764
  57. package/dist/{log-in-e7D5Ss1P.js → log-in-CSYJDA6m.js} +36 -29
  58. package/dist/log-out-DiwGCg7p.js +130 -0
  59. package/dist/login-C6Y0ajDp.js +251 -0
  60. package/dist/{login-log-CvVnyGi3.js → login-log-C0V-_l3F.js} +6 -4
  61. package/dist/{lov-view-DoF5LqFQ.js → lov-view-Cmv7wZZ9.js} +9 -9
  62. package/dist/{menuInfo-CNzGQwOD.js → menuInfo-UeutJpOa.js} +1 -1
  63. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-51SYxVc_.js → menuInfo.vue_vue_type_style_index_0_lang-CWX4Mu67.js} +144 -121
  64. package/dist/pda-app-B6w99SJo.js +710 -0
  65. package/dist/redirect-BqegffKC.js +15 -0
  66. package/dist/{resource-gVFFMO9l.js → resource-BybJvUv0.js} +17 -17
  67. package/dist/{su-welcome-BN_s_RX_.js → su-welcome-C1bmxHoY.js} +124 -126
  68. package/dist/sys-config-BnmIDnCj.js +370 -0
  69. package/dist/udp-core.css +1 -9
  70. package/dist/utogether-MlnyYtNS.js +4 -0
  71. package/index.ts +19 -6
  72. package/package.json +18 -17
  73. package/src/App.vue +2 -7
  74. package/src/api/http.ts +1 -4
  75. package/src/api/index.ts +5 -3
  76. package/src/api/user.ts +2 -2
  77. package/src/components/SuCharts/src/UserInfo.vue +3 -3
  78. package/src/components/SuScrollTree/ScrollPanel.vue +4 -9
  79. package/src/components/udp/content/index.vue +88 -0
  80. package/src/components/udp/form/form.vue +109 -0
  81. package/src/components/udp/grid/index.vue +524 -0
  82. package/src/components/udp/index.ts +5 -4
  83. package/src/components/udp/ut-stamp-badge/index.vue +271 -0
  84. package/src/components/udp/utils.ts +408 -40
  85. package/src/directives/permission/index.ts +1 -1
  86. package/src/layout/components/lay-navbar/index.vue +9 -7
  87. package/src/layout/components/lay-panel/index.vue +3 -3
  88. package/src/layout/components/lay-search/index.vue +1 -1
  89. package/src/layout/components/lay-select-org/index.vue +4 -9
  90. package/src/layout/components/lay-setting/index.vue +503 -510
  91. package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
  92. package/src/layout/components/lay-sidebar/horizontal.vue +8 -6
  93. package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
  94. package/src/layout/components/lay-sidebar/sidebar-logo.vue +101 -98
  95. package/src/layout/components/lay-tag/index.vue +598 -625
  96. package/src/layout/hooks/useDataThemeChange.ts +1 -1
  97. package/src/layout/hooks/useNav.ts +176 -173
  98. package/src/layout/hooks/useTag.ts +227 -233
  99. package/src/layout/layoutView.vue +215 -215
  100. package/src/layout/types.ts +93 -92
  101. package/src/main.ts +115 -109
  102. package/src/plugins/i18n/en.ts +26 -13
  103. package/src/plugins/i18n/module/u-workflow.ts +1 -1
  104. package/src/plugins/i18n/zh.ts +363 -337
  105. package/src/plugins/vxe-table/index.ts +74 -4
  106. package/src/plugins/vxe-table/render.tsx +186 -58
  107. package/src/router/index.ts +187 -183
  108. package/src/router/modules/flow.ts +35 -0
  109. package/src/router/modules/home.ts +32 -32
  110. package/src/router/modules/remaining.ts +1 -26
  111. package/src/router/utils.ts +420 -377
  112. package/src/store/modules/app.ts +2 -4
  113. package/src/store/modules/epTheme.ts +48 -49
  114. package/src/store/modules/multiTags.ts +15 -14
  115. package/src/store/modules/permission.ts +25 -15
  116. package/src/store/modules/system.ts +1 -3
  117. package/src/style/button.scss +11 -4
  118. package/src/style/login.css +1 -1
  119. package/src/style/tailwind.css +1 -68
  120. package/src/style/vxetable.scss +103 -11
  121. package/src/utils/authority/index.ts +1 -1
  122. package/src/utils/dataFormat/index.ts +223 -223
  123. package/src/utils/index.ts +3 -1
  124. package/src/utils/lifecycle.ts +39 -20
  125. package/src/utils/propTypes.ts +1 -6
  126. package/src/utils/storage/index.ts +2 -2
  127. package/src/utils/{http → udp/http}/index.ts +27 -30
  128. package/src/utils/{http → udp/http}/types.d.ts +2 -6
  129. package/src/views/login/login-view.vue +6 -20
  130. package/src/views/organization/company/CompanyPanel.vue +2 -2
  131. package/src/views/organization/department/Department.vue +58 -58
  132. package/src/views/organization/department/DepartmentPanel.vue +303 -283
  133. package/src/views/organization/inv-org/InvOrganization.vue +23 -9
  134. package/src/views/organization/org/Org.vue +9 -5
  135. package/src/views/organization/staff/StaffInfo.vue +127 -133
  136. package/src/views/organization/staff/StaffPanel.vue +162 -145
  137. package/src/views/system/cron/cron-task.vue +2 -12
  138. package/src/views/system/menu/AuthorityPanel.vue +2 -2
  139. package/src/views/system/menu/SystemMenu.vue +14 -20
  140. package/src/views/system/menu/menuInfo.vue +39 -23
  141. package/src/views/system/role/AuthorityInfo.vue +19 -15
  142. package/src/views/system/role/Role.vue +1 -5
  143. package/src/views/system/role/RolePanel.vue +11 -2
  144. package/src/views/system/role/UserInfo.vue +11 -9
  145. package/src/views/system/role-assign/RoleAssign.vue +2 -2
  146. package/src/views/system/role-assign/RolePanel.vue +12 -9
  147. package/src/views/system/sys/sys-config.vue +70 -21
  148. package/src/views/system/sysUser/SysUserPanel.vue +347 -278
  149. package/src/views/uapp/pda/pda-app.vue +48 -16
  150. package/src/views/udev/coderule/code-rule.vue +132 -121
  151. package/src/views/udev/dict/DictView.vue +118 -106
  152. package/src/views/udev/dict/childView.vue +183 -222
  153. package/src/views/udev/lov/childView.vue +1 -7
  154. package/src/views/ufile/aggregation/File.vue +5 -5
  155. package/src/views/ufile/file/water-mark.vue +14 -14
  156. package/src/views/uhome/components/menu-favorite.vue +314 -331
  157. package/src/views/uhome/su-welcome.vue +319 -339
  158. package/src/views/ulogin/login.vue +325 -316
  159. package/src/views/upms/interface/log-in.vue +100 -106
  160. package/src/views/upms/interface/log-out.vue +104 -107
  161. package/src/views/upms/user/login-log.vue +54 -60
  162. package/src/views/urpt/design/DesignPanel.vue +16 -35
  163. package/src/views/urpt/design/Preview.vue +1 -0
  164. package/src/views/urpt/design/ReportDesign.vue +17 -23
  165. package/src/views/urpt/static-resource/resource.vue +3 -3
  166. package/src/views/urpt/template/ReportTemplate.vue +7 -7
  167. package/src/views/utask/flow-task.vue +18 -0
  168. package/types/global.d.ts +231 -236
  169. package/vite.config.ts +13 -2
  170. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-32L40GY2.js +0 -102
  171. package/dist/DictView-q7kR9K--.js +0 -95
  172. package/dist/InvOrganization-DI45LqZV.js +0 -260
  173. package/dist/Org-CZju_ZiR.js +0 -35
  174. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DJKu6PXz.js +0 -126
  175. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-C3Ixs12y.js +0 -111
  176. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-C5XEmxsV.js +0 -288
  177. package/dist/childView.vue_vue_type_style_index_0_lang-bkmucBUL.js +0 -187
  178. package/dist/core.umd.js +0 -173
  179. package/dist/index-OswH7SsT.js +0 -9937
  180. package/dist/log-out--RRncZhN.js +0 -120
  181. package/dist/login-BhCMeCLS.js +0 -251
  182. package/dist/pda-app-nn3llDUx.js +0 -2209
  183. package/dist/redirect-CmMplDV4.js +0 -15
  184. package/dist/sys-config-DGutV-VX.js +0 -277
  185. package/dist/utogether-wFDCI28t.js +0 -182
  186. package/src/assets/images/empty.png +0 -0
  187. package/src/assets/images/logo.png +0 -0
  188. package/src/components/ReCountTo/README.md +0 -2
  189. package/src/components/ReCountTo/index.ts +0 -18
  190. package/src/components/ReCountTo/src/normal/index.tsx +0 -165
  191. package/src/components/ReCountTo/src/normal/props.ts +0 -37
  192. package/src/components/ReCountTo/src/rebound/index.tsx +0 -67
  193. package/src/components/ReCountTo/src/rebound/props.ts +0 -14
  194. package/src/components/ReCountTo/src/rebound/rebound.css +0 -77
  195. package/src/components/ReCropper/index.ts +0 -14
  196. package/src/components/ReCropper/src/index.tsx +0 -141
  197. package/src/components/ReFlicker/index.css +0 -39
  198. package/src/components/ReFlicker/index.ts +0 -50
  199. package/src/components/ReFlop/index.ts +0 -14
  200. package/src/components/ReFlop/src/Filpper.tsx +0 -99
  201. package/src/components/ReFlop/src/filpper.css +0 -184
  202. package/src/components/ReFlop/src/index.vue +0 -126
  203. package/src/components/ReFlowChart/index.ts +0 -24
  204. package/src/components/ReFlowChart/src/Control.vue +0 -139
  205. package/src/components/ReFlowChart/src/DataDialog.vue +0 -12
  206. package/src/components/ReFlowChart/src/NodePanel.vue +0 -151
  207. package/src/components/ReFlowChart/src/adpterForTurbo.ts +0 -160
  208. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +0 -49
  209. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
  210. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +0 -61
  211. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +0 -58
  212. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +0 -47
  213. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
  214. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
  215. package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
  216. package/src/components/ReFlowChart/src/config.ts +0 -62
  217. package/src/components/ReSplitPane/index.css +0 -49
  218. package/src/components/ReSplitPane/index.tsx +0 -119
  219. package/src/components/ReSplitPane/resizer.css +0 -45
  220. package/src/components/ReSplitPane/resizer.tsx +0 -30
  221. package/src/components/SuCommon/card/components/Card.vue +0 -148
  222. package/src/components/SuCommon/card/components/DialogForm.vue +0 -127
  223. package/src/components/SuCommon/card/index.vue +0 -142
  224. package/src/components/SuCommon/icon-select/index.vue +0 -241
  225. package/src/components/SuCommon/table/index.vue +0 -208
  226. package/src/components/SuCommon/utils/index.ts +0 -103
  227. package/src/components/SuCommon/utils/slot.tsx +0 -50
  228. package/src/components/udp/form-upload.vue +0 -132
  229. package/src/components/udp/modal-form.vue +0 -180
  230. package/src/utils/udp/useRender.ts +0 -420
  231. package/src/views/components/contextmenu/basic.vue +0 -74
  232. package/src/views/components/contextmenu/context-menu.vue +0 -40
  233. package/src/views/components/contextmenu/menuDynamic.vue +0 -99
  234. package/src/views/components/contextmenu/menuGroup.vue +0 -71
  235. package/src/views/components/count-to/index.vue +0 -43
  236. package/src/views/components/cropping/index.vue +0 -59
  237. package/src/views/components/cropping/picture.jpeg +0 -0
  238. package/src/views/components/split-pane/index.vue +0 -82
  239. package/src/views/components/video/index.vue +0 -57
@@ -1,339 +1,319 @@
1
- <!--
2
- * @Author: levi7754 levi7754@163.com
3
- * @Date: 2023-11-02 10:04:05
4
- * @LastEditors: levi7754 levi7754@163.com
5
- * @LastEditTime: 2025-04-29 17:04:36
6
- * @FilePath: /front-web-mes/src/views/uhome/su-welcome.vue
7
- * @Description: 欢迎页面
8
- -->
9
- <template>
10
- <div class="ut-home m-3">
11
- <!-- 顶部 -->
12
- <div class="h-32 mb-4 p-4 flex justify-between items-center bg-white home-page">
13
- <div class="flex flex-row items-center flex-[2]">
14
- <div>
15
- <el-avatar size="large" class="text-4xl font-bold bg-[var(--el-color-primary)]">{{
16
- firstName
17
- }}</el-avatar>
18
- </div>
19
- <div class="ml-4 text-xs flex-[2]">
20
- <div class="flex justify-center items-center">
21
- <span> {{ getCurrentPeriod() }}, {{ systemHook.getUserInfo?.name || '' }},欢迎回来! </span>
22
- <div
23
- class="flex flex-[2] justify-center items-center font-bold"
24
- style="color: var(--el-color-primary)"
25
- >
26
- 星光不问赶路人,岁月不负有心人,以梦为马,不负韶华!
27
- </div>
28
- </div>
29
- <div class="py-2 text-gray-500 flex">
30
- <span class="inline-block"> 所属角色: </span>
31
- <div class="w-2/3">{{ getRole() }}</div>
32
- </div>
33
- <div class="text-gray-500 flex">
34
- <span class="inline-block"> 所属组织: </span>
35
- <div class="w-2/3">{{ getOrg() }}</div>
36
- </div>
37
- </div>
38
- </div>
39
- <div class="flex flex-col">
40
- <span class="text-4xl">
41
- <ut-countdown :show-days="false" :show-labels="false" />
42
- </span>
43
- <div class="mt-1 ml-3">{{ getLunarDay() }}</div>
44
- </div>
45
- </div>
46
- <!-- 底部 -->
47
- <el-row class="m-2" :gutter="10">
48
- <el-col v-spinning="loading" :lg="24" :md="24" class="">
49
- <el-card class="mb-2">
50
- <template #header>
51
- <div class="flex items-center justify-between dark:bg-black">
52
- <span class="font-bold">常用菜单</span>
53
- <span class="text-xs text-gray-400 cursor-pointer" @click="onFavoriteMenu">
54
- <span>更多</span>
55
- <i class="vxe-icon-arrow-right" />
56
- </span>
57
- </div>
58
- </template>
59
-
60
- <div class="default:bg-white dark:bg-black">
61
- <el-empty
62
- v-if="!menuList.length"
63
- :image-size="100"
64
- description="快来添加常用菜单吧!"
65
- class="p-0 pb-3"
66
- />
67
- <ul
68
- class="p-0 w-full h-full grid grid-rows-1 grid-cols-8 u-dashed-menu"
69
- :class="{ 'grid-rows-2': menuList.length > 8 }"
70
- >
71
- <li
72
- v-for="(item, idx) in menuList"
73
- :key="item.id"
74
- class="text-center list-none bg-white"
75
- @click="onClickMenu(item)"
76
- >
77
- <div class="h-20 flex justify-center items-center flex-col">
78
- <div
79
- class="rounded-full w-10 h-10 flex items-center justify-center"
80
- :style="{ backgroundColor: getColor(idx) }"
81
- >
82
- <iconify-icon-offline
83
- :icon="item.icon || `ri:${icons[idx]}-line`"
84
- class="text-2xl text-white"
85
- />
86
- </div>
87
- <span class="text-xs mt-2">{{ item.menuName }}</span>
88
- </div>
89
- </li>
90
- </ul>
91
- </div>
92
- <div />
93
- </el-card>
94
- </el-col>
95
-
96
- <el-col :xl="16" :lg="12" :md="24">
97
- <el-card class="mb-2">
98
- <template #header>
99
- <div class="font-bold">
100
- <span>个人动态</span>
101
- </div>
102
- </template>
103
- <div class="p-3">
104
- <ul class="p-0 w-full h-full">
105
- <li
106
- v-for="item in logList"
107
- :key="item.id"
108
- class="w-full list-none p-2 border-b border-gray-200"
109
- >
110
- <div class="flex">
111
- <div>
112
- <el-avatar class="text-base">{{ firstName }}</el-avatar>
113
- </div>
114
- <div class="ml-3">
115
- <div>
116
- <span class="text-blue-600 mr-3">{{ item.browser }}</span>
117
- <span>{{ item.browserVersion || item.platformVersion }}</span>
118
- </div>
119
- <div class="text-gray-400 text-sm">{{ item.loginTime }}</div>
120
- </div>
121
- </div>
122
- </li>
123
- </ul>
124
- </div>
125
- </el-card>
126
- </el-col>
127
-
128
- <!-- 右侧 -->
129
- <el-col :xl="8" :lg="12" :md="24" class="">
130
- <el-card class="mb-2">
131
- <template #header>
132
- <div class="font-bold">
133
- <span>日历</span>
134
- </div>
135
- </template>
136
- <div class="p-1">
137
- <ut-calendar :holidays="holidays" :statutory-holiday="statutoryHoliday" />
138
- </div>
139
- </el-card>
140
- </el-col>
141
- </el-row>
142
- <menu-favorite
143
- v-if="showFavorite"
144
- :data-source="menuList"
145
- :user-name="systemHook.getUserInfo.userName"
146
- :icons="icons"
147
- @close="showFavorite = false"
148
- @success="getMenuList"
149
- />
150
- </div>
151
- </template>
152
-
153
- <script setup lang="ts">
154
- import { ref, onMounted, computed } from 'vue';
155
- import { useRouter } from 'vue-router';
156
- import dayjs from 'dayjs';
157
- import { lunarCalendar, cookies } from '@utogether/utils';
158
- import { useSystemStoreHook } from '../../store/modules/system';
159
- import { getServiceApi } from '../../api';
160
- import { kLOGINER } from '../../contant';
161
- import menuFavorite from './components/menu-favorite.vue';
162
- defineOptions({ name: 'SuHome' });
163
-
164
- const systemHook = useSystemStoreHook();
165
- const router = useRouter();
166
-
167
- const menuList = ref([]);
168
- const logList = ref([]);
169
- const showFavorite = ref(false);
170
- const loading = ref(false);
171
-
172
- const firstName = computed(() => {
173
- return systemHook.getUserInfo.name?.slice(0, 1);
174
- });
175
-
176
- // 角色
177
- const getRole = () => {
178
- const isAdmin = systemHook.isAdminRole;
179
- if (isAdmin) {
180
- return '系统管理员';
181
- } else {
182
- return systemHook.getUserInfo?.sysRoles?.map(m => m.roleName).join(',');
183
- }
184
- };
185
-
186
- // 组织
187
- const getOrg = () => {
188
- const isAdmin = systemHook.isAdminRole;
189
- if (isAdmin) {
190
- return '【系统管理员】拥有所有组织';
191
- } else {
192
- if (getRole() === '项目组管理员') {
193
- return '【项目组管理员】拥有所有组织';
194
- }
195
- return systemHook.getOrglist?.map(m => m.orgName).join(',');
196
- }
197
- };
198
-
199
- // 获取时间段
200
- const getCurrentPeriod = () => {
201
- const hour = Number(dayjs().format('HH'));
202
- return hour < 12 ? '上午好' : hour < 18 ? '下午好' : '晚上好';
203
- };
204
-
205
- const getLunarDay = () => {
206
- const time = new Date();
207
- const lunarday = lunarCalendar.solar2lunar(
208
- time.getFullYear(),
209
- time.getMonth() + 1,
210
- time.getDate()
211
- ) as IRecord;
212
- const { gzYear, IMonthCn, IDayCn, cMonth, cDay, ncWeek } = lunarday;
213
- return `${cMonth}月${cDay}日 ${gzYear}${IMonthCn}${IDayCn} ${ncWeek}`;
214
- };
215
-
216
- /** 查询收藏菜单功能 */
217
- const getMenuList = () => {
218
- const url = '/upms/v1/menuFavority';
219
- loading.value = true;
220
- const query = { pageSize: 20, pageNum: 1, userName: cookies.get(kLOGINER) };
221
- getServiceApi()
222
- .get(url, query)
223
- .then((res: IResponseData) => {
224
- menuList.value = res?.list || [];
225
- })
226
- .finally(() => {
227
- loading.value = false;
228
- });
229
- };
230
-
231
- const onClickMenu = item => {
232
- router.push(item.menuPath);
233
- };
234
-
235
- const getUserLog = () => {
236
- const url = '/upms/v1/userMonitor';
237
- const query = { pageSize: 8, pageNum: 1, employeeName: systemHook.getUserInfo?.name };
238
- getServiceApi()
239
- .get(url, query)
240
- .then((res: IResponseData) => {
241
- logList.value = res?.list || [];
242
- });
243
- };
244
-
245
- const onFavoriteMenu = () => {
246
- showFavorite.value = true;
247
- };
248
-
249
- onMounted(() => {
250
- getMenuList();
251
- getUserLog();
252
- });
253
-
254
- const getColor = idx => {
255
- const colorSet = ['#409eff', '#67c23a', '#13c2c2', '#e85f33', 'orange'];
256
- return colorSet[idx % 5];
257
- };
258
-
259
- const icons = [
260
- 'community',
261
- 'shield-star',
262
- 'group',
263
- 'settings',
264
- 'star',
265
- 'train',
266
- 'send-plane',
267
- 'rocket',
268
- 'device',
269
- 'compass',
270
- 'map-pin',
271
- 'keynote',
272
- 'article',
273
- 'tv',
274
- 'database-2',
275
- 'calendar'
276
- ];
277
-
278
- // 假期设置
279
- const holidays = [
280
- {
281
- 2023: { 12: { 30: '班', 31: '班' } }
282
- },
283
- {
284
- 2024: {
285
- 1: { 1: '假' },
286
- 2: {
287
- 4: '班',
288
- 10: '',
289
- 11: '',
290
- 12: '',
291
- 13: '',
292
- 14: '',
293
- 15: '',
294
- 16: '',
295
- 17: '假',
296
- 18: '班'
297
- },
298
- 4: { 4: '假', 5: '假', 6: '假', 7: '班', 28: '班' },
299
- 5: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 11: '班' },
300
- 6: { 8: '假', 9: '假', 10: '假' },
301
- 9: { 15: '假', 16: '假', 17: '假', 14: '班', 29: '班' },
302
- 10: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 6: '假', 7: '假', 12: '班' }
303
- }
304
- }
305
- ];
306
- // 法定假日;
307
- const statutoryHoliday = [
308
- { name: '元旦', date: '2024-01-01' },
309
- { name: '春节', date: '2024-02-10' },
310
- { name: '清明节', date: '2024-04-04' },
311
- { name: '劳动节', date: '2024-05-01' },
312
- { name: '端午节', date: '2024-06-10' },
313
- { name: '中秋节', date: '2024-09-17' },
314
- { name: '国庆节', date: '2024-10-01' }
315
- ];
316
- </script>
317
-
318
- <style lang="scss" scoped>
319
- .ut-home {
320
- .el-avatar--large {
321
- --el-avatar-size: 72px;
322
- }
323
-
324
- ::v-deep(.el-card__body) {
325
- padding: 0 !important;
326
- }
327
- }
328
-
329
- // .u-dashed-menu {
330
- // li {
331
- // box-shadow: 1px 0 0 0 #e8e8e8, 0 1px 0 0 #e8e8e8, 1px 1px 0 0 #e8e8e8, 1px 0 0 0 #e8e8e8 inset,
332
- // 0 1px 0 0 #e8e8e8 inset;
333
- // }
334
-
335
- // li:hover {
336
- // box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
337
- // }
338
- // }
339
- </style>
1
+ <!--
2
+ * @Author: levi7754 levi7754@163.com
3
+ * @Date: 2023-11-02 10:04:05
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-12-02 18:28:17
6
+ * @FilePath: /front-web-mes/src/views/uhome/su-welcome.vue
7
+ * @Description: 欢迎页面
8
+ -->
9
+ <template>
10
+ <div class="ut-home m-3">
11
+ <!-- 顶部 -->
12
+ <div class="h-32 mb-4 p-4 flex justify-between items-center bg-white home-page">
13
+ <div class="flex flex-row items-center flex-[2]">
14
+ <div>
15
+ <el-avatar size="large" class="text-4xl font-bold bg-[var(--el-color-primary)]">{{ firstName }}</el-avatar>
16
+ </div>
17
+ <div class="ml-4 text-xs flex-[2]">
18
+ <div class="flex justify-center items-center">
19
+ <span> {{ getCurrentPeriod() }}, {{ systemHook.getUserInfo?.name || '' }},欢迎回来! </span>
20
+ <div class="flex flex-[2] justify-center items-center font-bold" style="color: var(--el-color-primary)">
21
+ 星光不问赶路人,岁月不负有心人,以梦为马,不负韶华!
22
+ </div>
23
+ </div>
24
+ <div class="py-2 text-gray-500 flex">
25
+ <span class="inline-block"> 所属角色: </span>
26
+ <div class="w-2/3">{{ getRole() }}</div>
27
+ </div>
28
+ <div class="text-gray-500 flex">
29
+ <span class="inline-block"> 所属组织: </span>
30
+ <div class="w-2/3">{{ getOrg() }}</div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ <div class="flex flex-col">
35
+ <span class="text-4xl">
36
+ <ut-flip-down :show-days="false" :show-labels="false" />
37
+ </span>
38
+ <div class="mt-1 ml-3">{{ getLunarDay() }}</div>
39
+ </div>
40
+ </div>
41
+ <!-- 底部 -->
42
+ <el-row class="m-2" :gutter="10">
43
+ <el-col v-spinning="loading" :lg="24" :md="24" class="">
44
+ <el-card class="mb-2">
45
+ <template #header>
46
+ <div class="flex items-center justify-between dark:bg-black">
47
+ <span class="font-bold">常用菜单</span>
48
+ <span class="text-xs text-gray-400 cursor-pointer" @click="onFavoriteMenu">
49
+ <span>更多</span>
50
+ <i class="vxe-icon-arrow-right" />
51
+ </span>
52
+ </div>
53
+ </template>
54
+
55
+ <div class="default:bg-white dark:bg-black">
56
+ <el-empty v-if="!menuList.length" :image-size="100" description="快来添加常用菜单吧!" class="p-0 pb-3" />
57
+ <ul
58
+ class="p-0 w-full h-full grid grid-rows-1 grid-cols-8 u-dashed-menu"
59
+ :class="{ 'grid-rows-2': menuList.length > 8 }"
60
+ >
61
+ <li
62
+ v-for="(item, idx) in menuList"
63
+ :key="item.id"
64
+ class="text-center list-none bg-white"
65
+ @click="onClickMenu(item)"
66
+ >
67
+ <div class="h-20 flex justify-center items-center flex-col">
68
+ <div
69
+ class="rounded-full w-10 h-10 flex items-center justify-center"
70
+ :style="{ backgroundColor: getColor(idx) }"
71
+ >
72
+ <iconify-icon-offline :icon="item.icon || `ri:${icons[idx]}-line`" class="text-2xl text-white" />
73
+ </div>
74
+ <span class="text-xs mt-2">{{ item.menuName }}</span>
75
+ </div>
76
+ </li>
77
+ </ul>
78
+ </div>
79
+ <div />
80
+ </el-card>
81
+ </el-col>
82
+
83
+ <el-col :xl="16" :lg="12" :md="24">
84
+ <el-card class="mb-2">
85
+ <template #header>
86
+ <div class="font-bold">
87
+ <span>个人动态</span>
88
+ </div>
89
+ </template>
90
+ <div class="p-3">
91
+ <ul class="p-0 w-full h-full">
92
+ <li v-for="item in logList" :key="item.id" class="w-full list-none p-2 border-b border-gray-200">
93
+ <div class="flex">
94
+ <div>
95
+ <el-avatar class="text-base">{{ firstName }}</el-avatar>
96
+ </div>
97
+ <div class="ml-3">
98
+ <div>
99
+ <span class="text-blue-600 mr-3">{{ item.browser }}</span>
100
+ <span>{{ item.browserVersion || item.platformVersion }}</span>
101
+ </div>
102
+ <div class="text-gray-400 text-sm">{{ item.loginTime }}</div>
103
+ </div>
104
+ </div>
105
+ </li>
106
+ </ul>
107
+ </div>
108
+ </el-card>
109
+ </el-col>
110
+
111
+ <!-- 右侧 -->
112
+ <el-col :xl="8" :lg="12" :md="24" class="">
113
+ <el-card class="mb-2">
114
+ <template #header>
115
+ <div class="font-bold">
116
+ <span>日历</span>
117
+ </div>
118
+ </template>
119
+ <div class="p-1">
120
+ <ut-calendar :holidays="holidays" :statutory-holiday="statutoryHoliday" />
121
+ </div>
122
+ </el-card>
123
+ </el-col>
124
+ </el-row>
125
+ <menu-favorite
126
+ v-if="showFavorite"
127
+ :data-source="menuList"
128
+ :user-name="systemHook.getUserInfo.userName"
129
+ :icons="icons"
130
+ @close="showFavorite = false"
131
+ @success="getMenuList"
132
+ />
133
+ </div>
134
+ </template>
135
+
136
+ <script setup lang="ts">
137
+ import { ref, onMounted, computed } from 'vue';
138
+ import { useRouter } from 'vue-router';
139
+ import dayjs from 'dayjs';
140
+ import { lunarCalendar, cookies } from '@utogether/utils';
141
+ import { useSystemStoreHook } from '../../store/modules/system';
142
+ import { getServiceApi } from '../../api';
143
+ import { kLOGINER } from '../../contant';
144
+ import menuFavorite from './components/menu-favorite.vue';
145
+
146
+ defineOptions({ name: 'UdpWelcome' });
147
+
148
+ const systemHook = useSystemStoreHook();
149
+ const router = useRouter();
150
+
151
+ const menuList = ref([]);
152
+ const logList = ref([]);
153
+ const showFavorite = ref(false);
154
+ const loading = ref(false);
155
+
156
+ const firstName = computed(() => {
157
+ return systemHook.getUserInfo.name?.slice(0, 1);
158
+ });
159
+
160
+ // 角色
161
+ const getRole = () => {
162
+ const isAdmin = systemHook.isAdminRole;
163
+ if (isAdmin) {
164
+ return '系统管理员';
165
+ } else {
166
+ return systemHook.getUserInfo?.sysRoles?.map(m => m.roleName).join(',');
167
+ }
168
+ };
169
+
170
+ // 组织
171
+ const getOrg = () => {
172
+ const isAdmin = systemHook.isAdminRole;
173
+ if (isAdmin) {
174
+ return '【系统管理员】拥有所有组织';
175
+ } else {
176
+ if (getRole() === '项目组管理员') {
177
+ return '【项目组管理员】拥有所有组织';
178
+ }
179
+ return systemHook.getOrglist?.map(m => m.orgName).join(',');
180
+ }
181
+ };
182
+
183
+ // 获取时间段
184
+ const getCurrentPeriod = () => {
185
+ const hour = Number(dayjs().format('HH'));
186
+ return hour < 12 ? '上午好' : hour < 18 ? '下午好' : '晚上好';
187
+ };
188
+
189
+ const getLunarDay = () => {
190
+ const time = new Date();
191
+ const lunarday = lunarCalendar.solar2lunar(time.getFullYear(), time.getMonth() + 1, time.getDate()) as IRecord;
192
+ const { gzYear, IMonthCn, IDayCn, cMonth, cDay, ncWeek } = lunarday;
193
+ return `${cMonth}月${cDay}日 ${gzYear}${IMonthCn}${IDayCn} ${ncWeek}`;
194
+ };
195
+
196
+ /** 查询收藏菜单功能 */
197
+ const getMenuList = () => {
198
+ const url = '/upfm/v1/menuFavority';
199
+ loading.value = true;
200
+ const query = { pageSize: 20, pageNum: 1, userName: cookies.get(kLOGINER) };
201
+ getServiceApi()
202
+ .get(url, query)
203
+ .then((res: IResponseData) => {
204
+ menuList.value = res?.list || [];
205
+ })
206
+ .finally(() => {
207
+ loading.value = false;
208
+ });
209
+ };
210
+
211
+ const onClickMenu = item => {
212
+ router.push(item.menuPath);
213
+ };
214
+
215
+ const getUserLog = () => {
216
+ const url = '/upfm/v1/userMonitor';
217
+ const query = { pageSize: 8, pageNum: 1, employeeName: systemHook.getUserInfo?.name };
218
+ getServiceApi()
219
+ .get(url, query)
220
+ .then((res: IResponseData) => {
221
+ logList.value = res?.list || [];
222
+ });
223
+ };
224
+
225
+ const onFavoriteMenu = () => {
226
+ showFavorite.value = true;
227
+ };
228
+
229
+ onMounted(() => {
230
+ getMenuList();
231
+ getUserLog();
232
+ });
233
+
234
+ const getColor = idx => {
235
+ const colorSet = ['#409eff', '#67c23a', '#13c2c2', '#e85f33', 'orange'];
236
+ return colorSet[idx % 5];
237
+ };
238
+
239
+ const icons = [
240
+ 'community',
241
+ 'shield-star',
242
+ 'group',
243
+ 'settings',
244
+ 'star',
245
+ 'train',
246
+ 'send-plane',
247
+ 'rocket',
248
+ 'device',
249
+ 'compass',
250
+ 'map-pin',
251
+ 'keynote',
252
+ 'article',
253
+ 'tv',
254
+ 'database-2',
255
+ 'calendar'
256
+ ];
257
+
258
+ // 假期设置
259
+ const holidays = [
260
+ {
261
+ 2023: { 12: { 30: '', 31: '班' } }
262
+ },
263
+ {
264
+ 2024: {
265
+ 1: { 1: '' },
266
+ 2: {
267
+ 4: '',
268
+ 10: '',
269
+ 11: '',
270
+ 12: '',
271
+ 13: '',
272
+ 14: '',
273
+ 15: '',
274
+ 16: '',
275
+ 17: '',
276
+ 18: '班'
277
+ },
278
+ 4: { 4: '假', 5: '假', 6: '假', 7: '班', 28: '班' },
279
+ 5: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 11: '班' },
280
+ 6: { 8: '假', 9: '假', 10: '假' },
281
+ 9: { 15: '假', 16: '假', 17: '假', 14: '班', 29: '班' },
282
+ 10: { 1: '假', 2: '假', 3: '假', 4: '假', 5: '假', 6: '假', 7: '假', 12: '班' }
283
+ }
284
+ }
285
+ ];
286
+ // 法定假日;
287
+ const statutoryHoliday = [
288
+ { name: '元旦', date: '2024-01-01' },
289
+ { name: '春节', date: '2024-02-10' },
290
+ { name: '清明节', date: '2024-04-04' },
291
+ { name: '劳动节', date: '2024-05-01' },
292
+ { name: '端午节', date: '2024-06-10' },
293
+ { name: '中秋节', date: '2024-09-17' },
294
+ { name: '国庆节', date: '2024-10-01' }
295
+ ];
296
+ </script>
297
+
298
+ <style lang="scss" scoped>
299
+ .ut-home {
300
+ .el-avatar--large {
301
+ --el-avatar-size: 72px;
302
+ }
303
+
304
+ ::v-deep(.el-card__body) {
305
+ padding: 0 !important;
306
+ }
307
+ }
308
+
309
+ // .u-dashed-menu {
310
+ // li {
311
+ // box-shadow: 1px 0 0 0 #e8e8e8, 0 1px 0 0 #e8e8e8, 1px 1px 0 0 #e8e8e8, 1px 0 0 0 #e8e8e8 inset,
312
+ // 0 1px 0 0 #e8e8e8 inset;
313
+ // }
314
+
315
+ // li:hover {
316
+ // box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
317
+ // }
318
+ // }
319
+ </style>