hrp-ui-base 1.0.1 → 1.0.3

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 (269) hide show
  1. package/dist/components.cjs +1 -1
  2. package/dist/components.es.js +3595 -1224
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.es.js +100 -67
  5. package/dist/style.css +1 -1
  6. package/package.json +16 -4
  7. package/packages/approval-process/.eslintrc +7 -0
  8. package/packages/approval-process/README.md +130 -0
  9. package/packages/approval-process/index.ts +65 -0
  10. package/packages/approval-process/package.json +17 -0
  11. package/packages/approval-process/packages/components/choose-member/BO/departBo.ts +8 -0
  12. package/packages/approval-process/packages/components/choose-member/BO/memberBo.ts +14 -0
  13. package/packages/approval-process/packages/components/choose-member/BO/role.svg +1 -0
  14. package/packages/approval-process/packages/components/choose-member/BO/roleBo.ts +16 -0
  15. package/packages/approval-process/packages/components/choose-member/index.vue +497 -0
  16. package/packages/approval-process/packages/components/choose-member/styles/common.scss +134 -0
  17. package/packages/approval-process/packages/components/comment/assets/avatar.svg +1 -0
  18. package/packages/approval-process/packages/components/comment/assets/download.svg +4 -0
  19. package/packages/approval-process/packages/components/comment/assets/mp3.svg +11 -0
  20. package/packages/approval-process/packages/components/comment/assets/mp4.svg +11 -0
  21. package/packages/approval-process/packages/components/comment/assets/other.svg +11 -0
  22. package/packages/approval-process/packages/components/comment/assets/pdf.svg +11 -0
  23. package/packages/approval-process/packages/components/comment/assets/ppt.svg +11 -0
  24. package/packages/approval-process/packages/components/comment/assets/preview.svg +4 -0
  25. package/packages/approval-process/packages/components/comment/assets/remove.png +0 -0
  26. package/packages/approval-process/packages/components/comment/assets/word.svg +11 -0
  27. package/packages/approval-process/packages/components/comment/assets/xls.svg +11 -0
  28. package/packages/approval-process/packages/components/comment/index.vue +843 -0
  29. package/packages/approval-process/packages/components/comment/modules/previewMp.vue +54 -0
  30. package/packages/approval-process/packages/components/comment/styles/comment-style.scss +304 -0
  31. package/packages/approval-process/packages/components/image-cropper/index.vue +202 -0
  32. package/packages/approval-process/packages/components/sign/index.vue +766 -0
  33. package/packages/approval-process/packages/components/sign/modules/full-screen-sign.vue +20 -0
  34. package/packages/approval-process/packages/components/urge-dialog/index.vue +121 -0
  35. package/packages/approval-process/packages/components/vue-esign/index.vue +289 -0
  36. package/packages/approval-process/packages/flow/approve-component/approve-success.vue +82 -0
  37. package/packages/approval-process/packages/flow/approve-component/route-params-error.vue +49 -0
  38. package/packages/approval-process/packages/flow/approve-component/submit-success.vue +59 -0
  39. package/packages/approval-process/packages/flow/examine-approve-itr.vue +978 -0
  40. package/packages/approval-process/packages/flow/examine-approve.vue +1065 -0
  41. package/packages/approval-process/packages/flow/form-component/associated-approval-form/README.md +38 -0
  42. package/packages/approval-process/packages/flow/form-component/associated-approval-form/assets/avatar.svg +1 -0
  43. package/packages/approval-process/packages/flow/form-component/associated-approval-form/index.vue +159 -0
  44. package/packages/approval-process/packages/flow/form-component/associated-approval-form/modules/associated-approval-form-mobile.vue +297 -0
  45. package/packages/approval-process/packages/flow/form-component/associated-approval-form/modules/associated-approval-form-pc.vue +314 -0
  46. package/packages/approval-process/packages/flow/form-component/associated-approval-form/style/curd-area-mobile.scss +110 -0
  47. package/packages/approval-process/packages/flow/form-component/associated-approval-form/style/curd-area.scss +96 -0
  48. package/packages/approval-process/packages/flow/form-component/associated-approval-form/style/out-put.scss +48 -0
  49. package/packages/approval-process/packages/flow/form-component/show-sign.vue +27 -0
  50. package/packages/approval-process/packages/flow/styles/common.scss +134 -0
  51. package/packages/approval-process/packages/flow/styles/examine-approve-pc.scss +465 -0
  52. package/packages/approval-process/packages/flow/styles/examine-approve-phone.scss +293 -0
  53. package/packages/approval-process/packages/flow/styles/submit-approve-pc.scss +379 -0
  54. package/packages/approval-process/packages/flow/styles/submit-approve-phone.scss +337 -0
  55. package/packages/approval-process/packages/flow/submit-approve-itr.vue +623 -0
  56. package/packages/approval-process/packages/flow/submit-approve.vue +628 -0
  57. package/packages/approval-process/packages/flow/systemCom/BO/departBo.ts +8 -0
  58. package/packages/approval-process/packages/flow/systemCom/BO/memberBo.ts +14 -0
  59. package/packages/approval-process/packages/flow/systemCom/BO/role.svg +1 -0
  60. package/packages/approval-process/packages/flow/systemCom/BO/roleBo.ts +16 -0
  61. package/packages/approval-process/packages/flow/systemCom/choose-depart.vue +399 -0
  62. package/packages/approval-process/packages/flow/systemCom/choose-member-phone.vue +515 -0
  63. package/packages/approval-process/packages/flow/systemCom/choose-member.vue +565 -0
  64. package/packages/approval-process/packages/flow/systemCom/choose-role.vue +301 -0
  65. package/packages/approval-process/packages/styles/common.scss +134 -0
  66. package/packages/approval-process/packages/styles/flex-common.scss +118 -0
  67. package/packages/approval-process/packages/styles/flexCommon.scss +73 -0
  68. package/packages/approval-process/packages/styles/main.css +216 -0
  69. package/packages/approval-process/packages/styles/router-page.scss +371 -0
  70. package/packages/approval-process/packages/styles/style-set.ts +207 -0
  71. package/packages/approval-process/packages/types.d.ts +4 -0
  72. package/packages/approval-process/packages/utils/base.ts +15 -0
  73. package/packages/approval-process/packages/utils/crypto.ts +67 -0
  74. package/packages/approval-process/packages/utils/ddUtils.ts +56 -0
  75. package/packages/approval-process/packages/utils/debounce.ts +36 -0
  76. package/packages/approval-process/packages/utils/des.js +1107 -0
  77. package/packages/approval-process/packages/utils/download.ts +38 -0
  78. package/packages/approval-process/packages/utils/editor.ts +37 -0
  79. package/packages/approval-process/packages/utils/getEnv.ts +36 -0
  80. package/packages/approval-process/packages/utils/os.ts +20 -0
  81. package/packages/approval-process/packages/utils/path-util.ts +31 -0
  82. package/packages/approval-process/packages/utils/routerUtil.ts +304 -0
  83. package/packages/approval-process/packages/utils/string-utils.ts +13 -0
  84. package/packages/approval-process/packages/utils/throttle.ts +44 -0
  85. package/packages/approval-process/packages/utils/validate.ts +92 -0
  86. package/packages/approval-process/packages/utils/ws.ts +218 -0
  87. package/packages/approval-process/tsconfig.json +72 -0
  88. package/packages/approval-process/vite.config.ts +56 -0
  89. package/src/api/bms/flow/FlowCommentController.ts +50 -0
  90. package/src/api/bms/flow/FlowInstanceController.ts +167 -0
  91. package/src/api/bms/flow/FlowProcessController.ts +55 -0
  92. package/src/api/bms/flow/FlowSheetController.ts +27 -0
  93. package/src/api/bms/flow/FlowSignController.ts +76 -0
  94. package/src/api/bms/flow/bo/AssociatedApprovalBO.ts +15 -0
  95. package/src/api/bms/flow/bo/AssociatedApprovalVO.ts +35 -0
  96. package/src/api/bms/flow/bo/AuditBaseInfo.ts +39 -0
  97. package/src/api/bms/flow/bo/ButtonVo.ts +7 -0
  98. package/src/api/bms/flow/bo/DingCallbackBo.ts +13 -0
  99. package/src/api/bms/flow/bo/FlowCommentBO.ts +12 -0
  100. package/src/api/bms/flow/bo/FlowCommentVO.ts +23 -0
  101. package/src/api/bms/flow/bo/FlowInstanceBO.ts +14 -0
  102. package/src/api/bms/flow/bo/FlowNodeVO.ts +24 -0
  103. package/src/api/bms/flow/bo/FlowNoticeBO.ts +17 -0
  104. package/src/api/bms/flow/bo/FlowProcessBO.ts +13 -0
  105. package/src/api/bms/flow/bo/FlowProcessVO.ts +9 -0
  106. package/src/api/bms/flow/bo/FlowReplyVO.ts +23 -0
  107. package/src/api/bms/flow/bo/FlowSheetVO.ts +16 -0
  108. package/src/api/bms/flow/bo/InstanceBackBO.ts +9 -0
  109. package/src/api/bms/flow/bo/InstanceNodeBO.ts +13 -0
  110. package/src/api/bms/flow/bo/InstanceNodeVO.ts +21 -0
  111. package/src/api/bms/flow/bo/NodeShowVo.ts +19 -0
  112. package/src/api/bms/flow/bo/ReviewBO.ts +11 -0
  113. package/src/api/bms/flow/bo/SheetSearchBO.ts +11 -0
  114. package/src/api/bms/flow/bo/SystemVO.ts +7 -0
  115. package/src/api/bms/flow/bo/TransmitBO.ts +9 -0
  116. package/src/api/bms/flow/bo/UrgeFlowBO.ts +7 -0
  117. package/src/api/bms/flow/bo/UserBaseInfoVo.ts +13 -0
  118. package/src/api/bms/flow/bo/UserInfoVo.ts +44 -0
  119. package/src/api/bms/flow/bo/UserResultVo.ts +17 -0
  120. package/src/api/bms/flow/bo/ValueMapBo.ts +7 -0
  121. package/src/api/bms/home/HomeController.ts +106 -0
  122. package/src/api/bms/home/bo/CollectedMenuBo.ts +9 -0
  123. package/src/api/bms/home/bo/DeptBaseVo.ts +9 -0
  124. package/src/api/bms/home/bo/DomainVO.ts +13 -0
  125. package/src/api/bms/home/bo/FunPermission.ts +17 -0
  126. package/src/api/bms/home/bo/GroupVO.ts +10 -0
  127. package/src/api/bms/home/bo/HomeMenu.ts +22 -0
  128. package/src/api/bms/home/bo/HomeMenuVo.ts +11 -0
  129. package/src/api/bms/home/bo/PersonalizationBo.ts +17 -0
  130. package/src/api/bms/home/bo/PersonalizationVo.ts +19 -0
  131. package/src/api/bms/home/bo/PhoneMenu.ts +14 -0
  132. package/src/api/bms/home/bo/SearchMenuVo.ts +10 -0
  133. package/src/api/bms/home/bo/UserBaseInfoVo.ts +11 -0
  134. package/src/api/hrms/dept/bo/DeptBaseVo.ts +6 -0
  135. package/src/api/hrms/dept/bo/DeptTreeVo.ts +23 -0
  136. package/src/api/hrms/dept/bo/DeptUserVo.ts +9 -0
  137. package/src/api/hrms/dept/bo/DeptUsersVo.ts +10 -0
  138. package/src/api/hrms/dept/bo/DeptVo.ts +19 -0
  139. package/src/api/hrms/dept/bo/UserBaseInfoVo.ts +8 -0
  140. package/src/api/hrms/dept/deptController.ts +100 -0
  141. package/src/api/hrms/role/bo/RoleBaseVo.ts +6 -0
  142. package/src/api/hrms/role/bo/RoleGroupVo.ts +11 -0
  143. package/src/api/hrms/role/bo/RoleVo.ts +22 -0
  144. package/src/api/hrms/role/roleController.ts +19 -0
  145. package/src/api/hrms/user/bo/UserBaseInfoVo.ts +11 -0
  146. package/src/api/hrms/user/bo/UserCardVO.ts +14 -0
  147. package/src/api/hrms/user/bo/UserDeptBO.ts +13 -0
  148. package/src/api/hrms/user/bo/UserRoleBO.ts +11 -0
  149. package/src/api/hrms/user/bo/UserVO.ts +23 -0
  150. package/src/api/hrms/user/userController.ts +86 -0
  151. package/src/api/notice/NoticeController.ts +73 -0
  152. package/src/api/notice/bo/NoticePageBO.ts +24 -0
  153. package/src/api/notice/bo/NoticeVO.ts +31 -0
  154. package/src/api/work-order-pc/flow/Bo/ValueMapBo.ts +7 -0
  155. package/src/api/work-order-pc/flow/ItrFlowProcessController.ts +42 -0
  156. package/src/api/work-order-pc/flow/Vo/FlowNodeVO.ts +24 -0
  157. package/src/api/work-order-pc/flow/Vo/UserInfoVo.ts +44 -0
  158. package/src/assets/layout/avatar-default.svg +6 -0
  159. package/src/assets/layout/collect-active.svg +7 -0
  160. package/src/assets/layout/collect-default.svg +7 -0
  161. package/src/assets/layout/download-active.svg +8 -0
  162. package/src/assets/layout/download-default.svg +8 -0
  163. package/src/assets/layout/export-dark.svg +7 -0
  164. package/src/assets/layout/export-default.svg +7 -0
  165. package/src/assets/layout/font-active.svg +6 -0
  166. package/src/assets/layout/font-default.svg +6 -0
  167. package/src/assets/layout/help-active.svg +10 -0
  168. package/src/assets/layout/help-default.svg +10 -0
  169. package/src/assets/layout/home-active.svg +6 -0
  170. package/src/assets/layout/home.svg +6 -0
  171. package/src/assets/layout/menu-expand.svg +6 -0
  172. package/src/assets/layout/menu-icon.png +0 -0
  173. package/src/assets/layout/menu-position-active.svg +6 -0
  174. package/src/assets/layout/menu-position-default.svg +6 -0
  175. package/src/assets/layout/message-active.svg +9 -0
  176. package/src/assets/layout/message-default.svg +9 -0
  177. package/src/assets/layout/moon.svg +8 -0
  178. package/src/assets/layout/router-all-dark.svg +11 -0
  179. package/src/assets/layout/router-all-default.svg +17 -0
  180. package/src/assets/layout/search-active.svg +20 -0
  181. package/src/assets/layout/search-default.svg +20 -0
  182. package/src/assets/layout/star-active.svg +1 -0
  183. package/src/assets/layout/star-default.svg +3 -0
  184. package/src/assets/layout/sun-active.svg +6 -0
  185. package/src/assets/layout/sun-default.svg +6 -0
  186. package/src/assets/layout/switch-moon.svg +3 -0
  187. package/src/assets/layout/switch-sun.svg +41 -0
  188. package/src/assets/layout/todo-active.svg +12 -0
  189. package/src/assets/layout/todo-default.svg +12 -0
  190. package/src/assets/layout/user-dark.svg +13 -0
  191. package/src/assets/layout/user-default.svg +13 -0
  192. package/src/assets/process/agree.png +0 -0
  193. package/src/assets/process/defaultAvatar.png +0 -0
  194. package/src/assets/process/drawer/departManagerJump.png +0 -0
  195. package/src/assets/process/drawer/manyLevel1close.svg +10 -0
  196. package/src/assets/process/drawer/manyLevel1open.svg +7 -0
  197. package/src/assets/process/drawer/manyLevel2close.svg +7 -0
  198. package/src/assets/process/drawer/manyLevel2open.svg +7 -0
  199. package/src/assets/process/inProcess.png +0 -0
  200. package/src/assets/process/manyPeople.png +0 -0
  201. package/src/assets/process/manyPeople2.png +0 -0
  202. package/src/assets/process/reject.png +0 -0
  203. package/src/assets/process/revoke.png +0 -0
  204. package/src/components/annex-img-upload/index.vue +4 -4
  205. package/src/components/annex-img-upload/modules/previewMp.vue +1 -1
  206. package/src/components/annex-upload/index.vue +4 -4
  207. package/src/components/annex-upload/modules/previewMp.vue +1 -1
  208. package/src/components/annex-upload-weijian/index.vue +4 -4
  209. package/src/components/annex-upload-weijian/modules/previewMp.vue +1 -1
  210. package/src/components/base-layout/index.vue +198 -0
  211. package/src/components/layout/SysHeader.vue +90 -0
  212. package/src/components/layout/SysHeaderLeft.vue +116 -0
  213. package/src/components/layout/SysHeaderRight.vue +112 -0
  214. package/src/components/layout/SysHeaderTabs.vue +289 -0
  215. package/src/components/layout/components/avatar-component.vue +77 -0
  216. package/src/components/layout/components/dark-component.vue +82 -0
  217. package/src/components/layout/components/download-component.vue +49 -0
  218. package/src/components/layout/components/font-size-component.vue +66 -0
  219. package/src/components/layout/components/menu-position-component.vue +97 -0
  220. package/src/components/layout/components/message-component.vue +64 -0
  221. package/src/components/layout/components/todo-component.vue +55 -0
  222. package/src/components/layout/index.ts +24 -0
  223. package/src/components/layout/message/message-dictionary.ts +27 -0
  224. package/src/components/layout/message/message-icon//345/205/250/351/203/250/351/200/232/347/237/245-/350/223/235.svg +8 -0
  225. package/src/components/layout/message/message-icon//345/205/250/351/203/250/351/200/232/347/237/245-/351/273/221.svg +8 -0
  226. package/src/components/layout/message/message-icon//345/205/250/351/203/250/351/200/232/347/237/245.svg +8 -0
  227. package/src/components/layout/message/message-icon//345/205/254/345/221/212/351/200/232/347/237/245-/350/223/235.svg +12 -0
  228. package/src/components/layout/message/message-icon//345/205/254/345/221/212/351/200/232/347/237/245-/351/273/221.svg +12 -0
  229. package/src/components/layout/message/message-icon//345/205/254/345/221/212/351/200/232/347/237/245.svg +12 -0
  230. package/src/components/layout/message/message-icon//345/256/241/346/211/271/351/200/232/347/237/245-/350/223/235.svg +8 -0
  231. package/src/components/layout/message/message-icon//345/256/241/346/211/271/351/200/232/347/237/245-/351/273/221.svg +8 -0
  232. package/src/components/layout/message/message-icon//345/256/241/346/211/271/351/200/232/347/237/245.svg +8 -0
  233. package/src/components/layout/message/message-icon//345/257/274/345/207/272/351/200/232/347/237/245-/350/223/235.svg +13 -0
  234. package/src/components/layout/message/message-icon//345/257/274/345/207/272/351/200/232/347/237/245-/351/273/221.svg +13 -0
  235. package/src/components/layout/message/message-icon//345/257/274/345/207/272/351/200/232/347/237/245.svg +13 -0
  236. package/src/components/layout/message/message-icon//346/234/252/350/257/273/351/200/232/347/237/245-/350/223/235.svg +11 -0
  237. package/src/components/layout/message/message-icon//346/234/252/350/257/273/351/200/232/347/237/245-/351/273/221.svg +11 -0
  238. package/src/components/layout/message/message-icon//346/234/252/350/257/273/351/200/232/347/237/245.svg +11 -0
  239. package/src/components/layout/message/message-icon//347/251/272/347/212/266/346/200/201.svg +17 -0
  240. package/src/components/layout/message/message-icon//347/263/273/347/273/237/351/200/232/347/237/245-/350/223/235.svg +13 -0
  241. package/src/components/layout/message/message-icon//347/263/273/347/273/237/351/200/232/347/237/245-/351/273/221.svg +13 -0
  242. package/src/components/layout/message/message-icon//347/263/273/347/273/237/351/200/232/347/237/245.svg +13 -0
  243. package/src/components/layout/message/message-notification-drawer.vue +529 -0
  244. package/src/components/layout/personalization-guide-dialog.vue +255 -0
  245. package/src/components/layout/sideMenu-global.scss +115 -0
  246. package/src/components/layout/sideMenu.scss +312 -0
  247. package/src/components/layout/sideMenu.vue +542 -0
  248. package/src/components/layout/sideMenuSonList.vue +185 -0
  249. package/src/components/layout/styles/icon.scss +72 -0
  250. package/src/components/layout/types.ts +98 -0
  251. package/src/components/list-search-content/components/search-date-range.vue +1 -1
  252. package/src/components/list-search-content/components/search-date-time-range.vue +1 -1
  253. package/src/components/list-search-content/components/search-date.vue +1 -1
  254. package/src/components/list-search-content/components/search-input-number.vue +1 -1
  255. package/src/components/list-search-content/components/search-input.vue +1 -1
  256. package/src/components/list-search-content/components/search-multiple_select.vue +1 -1
  257. package/src/components/list-search-content/components/search-select.vue +1 -1
  258. package/src/components/list-search-content/index.vue +6 -6
  259. package/src/components/list-search-content/modules/add-views-package-dialog.vue +3 -3
  260. package/src/components/list-search-content/modules/search-condition-area.vue +2 -2
  261. package/src/components/list-search-content/modules/views-package-manage-dialog.vue +5 -5
  262. package/src/components.ts +19 -4
  263. package/src/index.ts +1 -0
  264. package/src/utils/dd-utils.ts +1 -1
  265. package/src/utils/get-dict.ts +2 -2
  266. package/src/utils/permit-utils.ts +2 -2
  267. package/src/api/bms/dict/bo/TotalDictSearchBO.ts +0 -8
  268. package/src/api/bms/file/FileExportController.ts +0 -18
  269. package/src/api/bms/file/bo/FileExportVO.ts +0 -17
@@ -0,0 +1,116 @@
1
+ <template>
2
+ <div class="sys-header-left" ref="headerLeftRef">
3
+ <img
4
+ ref="logoRef"
5
+ src="../../assets/layout/avatar-default.svg"
6
+ style="width: 30px;height: 30px;cursor: pointer;"
7
+ @click="emit('logo-click')"
8
+ />
9
+ <span class="sys-left-area-title" ref="titleRef">
10
+ {{ currentApplication.domainName || "-" }}
11
+ </span>
12
+ <div
13
+ class="second-menu-list"
14
+ ref="secondMenuRef"
15
+ :style="{ width: secondMenuWidth + 'px' }"
16
+ v-if="Array.isArray(menuList) && menuList.length > 0"
17
+ >
18
+ <SideMenu
19
+ :menuList="menuList"
20
+ :menuPosition="menuPosition"
21
+ :show-submenu-drawer="showSubmenuDrawer"
22
+ :currentPath="currentPath"
23
+ :navigationBar="navigationBar"
24
+ @parent-click="(item, index) => emit('parent-click', item, index)"
25
+ @menu-item-click="(item) => emit('menu-item-click', item)"
26
+ @collapse-change="(val) => emit('collapse-change', val)"
27
+ />
28
+ </div>
29
+ </div>
30
+ </template>
31
+
32
+ <script lang="ts" setup>
33
+ import { computed, onMounted, onUnmounted, ref, nextTick, watch, PropType } from "vue";
34
+ import SideMenu from "./sideMenu.vue";
35
+ import type HomeMenu from "../../api/bms/home/bo/HomeMenu";
36
+ import type { DomainInfo } from "./types";
37
+
38
+ const props = defineProps({
39
+ menuList: { type: Array as PropType<HomeMenu[]>, default: () => [] },
40
+ currentApplication: { type: Object as PropType<DomainInfo>, default: () => ({ domainName: '-' }) },
41
+ menuPosition: { type: String as PropType<"top" | "left">, default: "top" },
42
+ currentPath: { type: String, default: '' },
43
+ showSubmenuDrawer: { type: Boolean, default: true },
44
+ navigationBar: { type: Boolean, default: false },
45
+ });
46
+
47
+ const emit = defineEmits<{
48
+ (e: 'parent-click', item: HomeMenu, index: number): void
49
+ (e: 'menu-item-click', item: HomeMenu): void
50
+ (e: 'logo-click'): void
51
+ (e: 'collapse-change', collapsed: boolean): void
52
+ }>();
53
+
54
+ const headerLeftRef = ref<HTMLElement | null>(null);
55
+ const logoRef = ref<HTMLImageElement | null>(null);
56
+ const titleRef = ref<HTMLElement | null>(null);
57
+ const secondMenuRef = ref<HTMLElement | null>(null);
58
+ const secondMenuWidth = ref<number>(0);
59
+
60
+ const calculateSecondMenuWidth = () => {
61
+ if (!headerLeftRef.value || !logoRef.value || !titleRef.value) return;
62
+ const headerLeftWidth = headerLeftRef.value.offsetWidth;
63
+ const logoWidth = logoRef.value.offsetWidth;
64
+ const titleWidth = titleRef.value.offsetWidth;
65
+ const marginOffset = 16;
66
+ secondMenuWidth.value = Math.max(headerLeftWidth - logoWidth - titleWidth - marginOffset, 0);
67
+ };
68
+
69
+ const handleResize = () => { calculateSecondMenuWidth(); };
70
+
71
+ onMounted(async () => {
72
+ await nextTick();
73
+ calculateSecondMenuWidth();
74
+ window.addEventListener('resize', handleResize);
75
+ });
76
+
77
+ watch(() => props.menuPosition, async () => {
78
+ await nextTick();
79
+ calculateSecondMenuWidth();
80
+ });
81
+
82
+ onUnmounted(() => {
83
+ window.removeEventListener('resize', handleResize);
84
+ });
85
+ </script>
86
+ <style scoped lang="scss">
87
+ .sys-header-left {
88
+ display: flex;
89
+ align-items: center;
90
+ user-select: none;
91
+ flex-direction: row;
92
+ margin-left: 19px;
93
+ height: 100%;
94
+ flex: 1;
95
+ min-width: 0;
96
+ }
97
+
98
+ .second-menu-list {
99
+ margin-left: 10px;
100
+ padding: 4px;
101
+ overflow-x: auto;
102
+ overflow-y: hidden;
103
+ }
104
+
105
+ .sys-left-area-title {
106
+ color: var(--custom-theme-text-1);
107
+ font-size: 18px;
108
+ font-weight: 500;
109
+ margin-left: 6px;
110
+ width: auto;
111
+ color: var(--header-system-big-title);
112
+ white-space: nowrap;
113
+ flex-shrink: 0;
114
+ cursor: pointer;
115
+ }
116
+ </style>
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <div class="sys-header-right">
3
+ <!-- 下载中心 -->
4
+ <DownloadComponent :active="downloadActive" @click="emit('download-click')" />
5
+ <!-- 审批中心 -->
6
+ <TodoComponent :approvalCount="approvalCount" :active="todoActive" @click="emit('todo-click')" />
7
+ <!-- 消息 -->
8
+ <MessageComponent
9
+ :noticeCount="noticeCount"
10
+ ref="messageComponentRef"
11
+ @click="handleMessageClick"
12
+ />
13
+ <!-- 昼夜模式 -->
14
+ <DarkComponent
15
+ :dayOrNight="userConfig.dayOrNight"
16
+ :followSystem="userConfig.followSystem"
17
+ @change-dark="(val, ref) => emit('change-dark', val, ref)"
18
+ @change-follow-system="(val) => emit('change-follow-system', val)"
19
+ />
20
+ <!-- 菜单栏位置 -->
21
+ <MenuPositionComponent
22
+ :menuPosition="userConfig.menuPosition"
23
+ @change="(val) => emit('change-menu-position', val)"
24
+ />
25
+ <!-- 修改字体 -->
26
+ <FontSizeComponent
27
+ :fontSize="userConfig.fontSize"
28
+ @change="(val) => emit('change-font-size', val)"
29
+ />
30
+ <!-- 个人信息 -->
31
+ <AvatarComponent
32
+ :avatar="avatar"
33
+ @personal-sign="emit('personal-sign')"
34
+ @clean-cache="emit('clean-cache')"
35
+ @logout="emit('logout')"
36
+ />
37
+ <!-- 消息通知抽屉 -->
38
+ <MessageNotificationDrawer
39
+ ref="messageDrawerRef"
40
+ @close="handleMessageClose"
41
+ @update-count="emit('message-update-count')"
42
+ @navigate="(notice) => emit('message-navigate', notice)"
43
+ @download="(notice) => emit('message-download', notice)"
44
+ />
45
+ </div>
46
+ </template>
47
+
48
+ <script lang="ts" setup>
49
+ import { ref, PropType } from "vue";
50
+ import TodoComponent from './components/todo-component.vue'
51
+ import MessageComponent from './components/message-component.vue'
52
+ import DownloadComponent from './components/download-component.vue'
53
+ import DarkComponent from './components/dark-component.vue'
54
+ import FontSizeComponent from './components/font-size-component.vue'
55
+ import MenuPositionComponent from './components/menu-position-component.vue'
56
+ import AvatarComponent from './components/avatar-component.vue'
57
+ import MessageNotificationDrawer from './message/message-notification-drawer.vue'
58
+ import type { UserConfig } from "./types";
59
+ import type NoticeVO from "../../api/notice/bo/NoticeVO";
60
+
61
+ defineProps({
62
+ userConfig: { type: Object as PropType<UserConfig>, required: true },
63
+ noticeCount: { type: Number, default: 0 },
64
+ approvalCount: { type: Number, default: 0 },
65
+ avatar: { type: String, default: '' },
66
+ downloadActive: { type: Boolean, default: false },
67
+ todoActive: { type: Boolean, default: false },
68
+ });
69
+
70
+ const emit = defineEmits<{
71
+ (e: 'change-dark', value: string, ref?: HTMLElement): void
72
+ (e: 'change-follow-system', value: boolean): void
73
+ (e: 'change-font-size', value: string): void
74
+ (e: 'change-menu-position', value: string): void
75
+ (e: 'download-click'): void
76
+ (e: 'todo-click'): void
77
+ (e: 'message-click', isOpen: boolean): void
78
+ (e: 'message-navigate', notice: NoticeVO): void
79
+ (e: 'message-download', notice: NoticeVO): void
80
+ (e: 'message-update-count'): void
81
+ (e: 'personal-sign'): void
82
+ (e: 'clean-cache'): void
83
+ (e: 'logout'): void
84
+ }>();
85
+
86
+ const messageComponentRef = ref()
87
+ const messageDrawerRef = ref()
88
+
89
+ const handleMessageClick = (isOpen: boolean) => {
90
+ emit('message-click', isOpen)
91
+ if (isOpen) {
92
+ messageDrawerRef.value?.open()
93
+ } else {
94
+ messageDrawerRef.value?.close()
95
+ }
96
+ }
97
+
98
+ const handleMessageClose = () => {
99
+ messageComponentRef.value?.close()
100
+ }
101
+ </script>
102
+ <style scoped lang="scss">
103
+ .sys-header-right {
104
+ width: auto;
105
+ flex-shrink: 0;
106
+ display: flex;
107
+ align-items: center;
108
+ user-select: none;
109
+ flex-direction: row;
110
+ margin-right: 9px;
111
+ }
112
+ </style>
@@ -0,0 +1,289 @@
1
+ <template>
2
+ <div class="top-tabs-header" @wheel="handleWheel">
3
+ <el-scrollbar ref="scrollbar" class="scroll-container">
4
+ <div ref="container" class="scrollbar-flex-content">
5
+ <div
6
+ v-for="item in tabs"
7
+ :key="item.path"
8
+ :ref="(el) => setTabRef(item.path, el)"
9
+ :class="{ active: activeTab === item.path }"
10
+ class="tags-view-item"
11
+ >
12
+ <span
13
+ class="tags-view-item-link"
14
+ @click="handleTabClick(item)"
15
+ @contextmenu.prevent="openMenu(item, $event)"
16
+ >
17
+ {{ item.name || item.title }}
18
+ </span>
19
+ <el-icon v-if="item.path !== homeUrl" @click="handleTabClose(item)">
20
+ <Close />
21
+ </el-icon>
22
+ </div>
23
+ </div>
24
+ </el-scrollbar>
25
+ <ul
26
+ v-show="visible"
27
+ :style="{ left: coord.left + 'px', top: coord.top + 'px' }"
28
+ class="contextmenu"
29
+ >
30
+ <li
31
+ v-if="selectedTag?.path !== homeUrl"
32
+ @click="handleTabClose(selectedTag!)"
33
+ >
34
+ 关闭当前
35
+ </li>
36
+ <li @click="handleCloseOthers">关闭其他</li>
37
+ <li v-if="!isFirstView()" @click="handleCloseLeft">关闭左侧</li>
38
+ <li v-if="!isLastView()" @click="handleCloseRight">关闭右侧</li>
39
+ <li @click="handleCloseAll">全部关闭</li>
40
+ </ul>
41
+ </div>
42
+ </template>
43
+
44
+ <script lang="ts" setup>
45
+ import { computed, ref, watch, nextTick, PropType } from "vue";
46
+ import { ElScrollbar } from "element-plus";
47
+ import type { TabItem } from "./types";
48
+
49
+ const props = defineProps({
50
+ tabs: {
51
+ type: Array as PropType<TabItem[]>,
52
+ default: () => []
53
+ },
54
+ activeTab: {
55
+ type: String,
56
+ default: ''
57
+ },
58
+ homeUrl: {
59
+ type: String,
60
+ default: '/application-entry'
61
+ }
62
+ });
63
+
64
+ const emit = defineEmits<{
65
+ (e: 'tab-click', tab: TabItem): void
66
+ (e: 'tab-close', tab: TabItem): void
67
+ (e: 'tab-close-other', tab: TabItem): void
68
+ (e: 'tab-close-all'): void
69
+ (e: 'tab-close-left', tab: TabItem): void
70
+ (e: 'tab-close-right', tab: TabItem): void
71
+ }>();
72
+
73
+ const scrollbar = ref<InstanceType<typeof ElScrollbar>>();
74
+ const container = ref<HTMLElement>();
75
+ const tabRefs = ref<Record<string, HTMLElement | null>>({});
76
+
77
+ /** 右键菜单状态 */
78
+ const visible = ref(false);
79
+ const coord = ref({ left: 0, top: 0 });
80
+ const selectedTag = ref<TabItem>();
81
+
82
+ /** 设置标签引用 */
83
+ function setTabRef(path: string, el: any) {
84
+ tabRefs.value["tag" + path] = el;
85
+ }
86
+
87
+ /** 点击标签 */
88
+ function handleTabClick(tab: TabItem) {
89
+ emit('tab-click', tab);
90
+ }
91
+
92
+ /** 关闭标签 */
93
+ function handleTabClose(tab: TabItem) {
94
+ if (tab.path === props.homeUrl) return;
95
+ emit('tab-close', tab);
96
+ }
97
+
98
+ /** 打开右键菜单 */
99
+ function openMenu(tag: TabItem, e: MouseEvent) {
100
+ coord.value.left = e.clientX;
101
+ coord.value.top = e.clientY;
102
+ visible.value = true;
103
+ selectedTag.value = tag;
104
+ }
105
+
106
+ /** 关闭右键菜单 */
107
+ function closeMenu() {
108
+ visible.value = false;
109
+ }
110
+
111
+ /** 关闭其他标签 */
112
+ function handleCloseOthers() {
113
+ if (selectedTag.value) {
114
+ emit('tab-close-other', selectedTag.value);
115
+ }
116
+ }
117
+
118
+ /** 关闭全部标签 */
119
+ function handleCloseAll() {
120
+ emit('tab-close-all');
121
+ }
122
+
123
+ /** 关闭左侧标签 */
124
+ function handleCloseLeft() {
125
+ if (selectedTag.value) {
126
+ emit('tab-close-left', selectedTag.value);
127
+ }
128
+ }
129
+
130
+ /** 关闭右侧标签 */
131
+ function handleCloseRight() {
132
+ if (selectedTag.value) {
133
+ emit('tab-close-right', selectedTag.value);
134
+ }
135
+ }
136
+
137
+ /** 是否是第一个标签 */
138
+ function isFirstView(): boolean {
139
+ if (!selectedTag.value || props.tabs.length === 0) return true;
140
+ return selectedTag.value.path === props.tabs[0]?.path;
141
+ }
142
+
143
+ /** 是否是最后一个标签 */
144
+ function isLastView(): boolean {
145
+ if (!selectedTag.value || props.tabs.length === 0) return true;
146
+ return selectedTag.value.path === props.tabs[props.tabs.length - 1]?.path;
147
+ }
148
+
149
+ /** 滚动到当前标签 */
150
+ function scrollToActiveTab() {
151
+ nextTick(() => {
152
+ const activeTabRef = tabRefs.value["tag" + props.activeTab];
153
+ if (activeTabRef && scrollbar.value) {
154
+ const containerWidth = container.value?.offsetWidth || 0;
155
+ const tabLeft = activeTabRef.offsetLeft;
156
+ const tabWidth = activeTabRef.offsetWidth;
157
+ if (tabLeft + tabWidth > containerWidth) {
158
+ scrollbar.value.setScrollLeft(tabLeft - containerWidth + tabWidth + 20);
159
+ }
160
+ }
161
+ });
162
+ }
163
+
164
+ /** 处理鼠标滚轮事件 */
165
+ function handleWheel(event: WheelEvent) {
166
+ event.preventDefault();
167
+ if (scrollbar.value) {
168
+ const wrapRef = scrollbar.value.wrapRef;
169
+ if (wrapRef) {
170
+ wrapRef.scrollLeft += event.deltaY;
171
+ }
172
+ }
173
+ }
174
+
175
+ /** 监听右键菜单显示状态 */
176
+ watch(visible, (value) => {
177
+ if (value) {
178
+ document.body.addEventListener("click", closeMenu);
179
+ } else {
180
+ document.body.removeEventListener("click", closeMenu);
181
+ }
182
+ });
183
+
184
+ /** 监听 activeTab 变化滚动到对应位置 */
185
+ watch(() => props.activeTab, () => {
186
+ scrollToActiveTab();
187
+ });
188
+
189
+ /** 暴露方法 */
190
+ defineExpose({ scrollToActiveTab });
191
+ </script>
192
+
193
+ <style lang="scss" scoped>
194
+ .top-tabs-header {
195
+ height: 32px;
196
+ position: relative;
197
+ overflow: visible;
198
+ box-sizing: border-box;
199
+ background: var(--custom-theme-fill-1);
200
+
201
+ :deep(.el-scrollbar) {
202
+ height: 32px;
203
+ overflow: visible;
204
+
205
+ .el-scrollbar__wrap {
206
+ overflow-x: scroll;
207
+ overflow-y: hidden;
208
+ scrollbar-width: none;
209
+ -ms-overflow-style: none;
210
+ &::-webkit-scrollbar { display: none; }
211
+ }
212
+
213
+ .el-scrollbar__bar.is-horizontal {
214
+ height: 6px;
215
+ bottom: -6px;
216
+ left: 0;
217
+ right: 0;
218
+ border-radius: 3px;
219
+ background-color: var(--custom-theme-fill-4);
220
+ .el-scrollbar__thumb {
221
+ background-color: var(--custom-theme-text-4);
222
+ border-radius: 3px;
223
+ &:hover { background-color: var(--custom-theme-text-3); }
224
+ }
225
+ }
226
+
227
+ .el-scrollbar__bar.is-vertical { display: none; }
228
+ }
229
+
230
+ .scrollbar-flex-content {
231
+ display: flex;
232
+ background: var(--custom-theme-fill-7);
233
+ height: 32px;
234
+ padding-top: 2px;
235
+ }
236
+
237
+ .tags-view-item {
238
+ display: flex;
239
+ flex-shrink: 0;
240
+ align-items: center;
241
+ justify-content: center;
242
+ cursor: pointer;
243
+ height: 30px;
244
+ line-height: 30px;
245
+ border-right: 1px solid var(--custom-theme-border-3);
246
+ border-bottom: 1px solid var(--custom-theme-border-3);
247
+ color: var(--custom-theme-text-2);
248
+ background: var(--custom-theme-fill-7);
249
+ font-size: var(--el-menu-item-font-size);
250
+ padding: 0 10px;
251
+
252
+ .tags-view-item-link {
253
+ display: inline-block;
254
+ padding: 0 8px;
255
+ }
256
+ }
257
+
258
+ .tags-view-item.active {
259
+ background: var(--custom-main-bg-fill);
260
+ color: var(--custom-theme-normal-normal);
261
+ border-bottom: none;
262
+ }
263
+
264
+ .contextmenu {
265
+ margin: 0;
266
+ background: var(--custom-theme-fill-7);
267
+ z-index: 3000;
268
+ position: fixed;
269
+ list-style-type: none;
270
+ padding: 5px 0;
271
+ border-radius: 4px;
272
+ font-size: 12px;
273
+ font-weight: 400;
274
+ color: var(--custom-theme-text-1);
275
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
276
+ border: 1px solid var(--custom-theme-border-3);
277
+
278
+ li {
279
+ margin: 0;
280
+ padding: 7px 16px;
281
+ cursor: pointer;
282
+ &:hover {
283
+ background: var(--custom-theme-fill-4);
284
+ color: var(--custom-theme-normal-normal);
285
+ }
286
+ }
287
+ }
288
+ }
289
+ </style>
@@ -0,0 +1,77 @@
1
+ <!--
2
+ * @description: 用户头像组件
3
+ * @fileName: avatar-component.vue
4
+ !-->
5
+ <template>
6
+ <div>
7
+ <el-dropdown>
8
+ <div class="icon-box" style="border:none;margin-right: 10px;">
9
+ <img :src="(avatar ? avatar : AvatarDefaultImg)"
10
+ style="width: 30px;border-radius: 6px;" id="tourPersonalId">
11
+ </div>
12
+ <template #dropdown>
13
+ <el-dropdown-menu>
14
+ <el-dropdown-item @click="handlePersonalSignClick">个人签名</el-dropdown-item>
15
+ </el-dropdown-menu>
16
+ <el-dropdown-menu>
17
+ <el-dropdown-item @click="handleCleanCache">清理缓存</el-dropdown-item>
18
+ </el-dropdown-menu>
19
+ <el-dropdown-menu v-if="!isInDD && !isInOA">
20
+ <el-dropdown-item @click="handleExitLogin">退出登录</el-dropdown-item>
21
+ </el-dropdown-menu>
22
+ </template>
23
+ </el-dropdown>
24
+ </div>
25
+ </template>
26
+
27
+ <script setup lang='ts'>
28
+ import { ref, onMounted } from 'vue'
29
+ import AvatarDefaultImg from "../../../assets/layout/avatar-default.svg";
30
+ import dd from "dingtalk-jsapi";
31
+
32
+ const props = defineProps<{
33
+ avatar?: string
34
+ }>()
35
+
36
+ const emit = defineEmits<{
37
+ (e: 'personal-sign'): void
38
+ (e: 'clean-cache'): void
39
+ (e: 'logout'): void
40
+ }>()
41
+
42
+ const isInDD = ref<boolean>(false)
43
+ const isInOA = ref<boolean>(false)
44
+ const avatar = ref(props.avatar)
45
+
46
+ import { watch } from 'vue'
47
+ watch(() => props.avatar, (val) => { avatar.value = val })
48
+
49
+ const handlePersonalSignClick = () => {
50
+ emit('personal-sign')
51
+ }
52
+
53
+ const handleCleanCache = () => {
54
+ emit('clean-cache')
55
+ }
56
+
57
+ const handleExitLogin = () => {
58
+ emit('logout')
59
+ }
60
+
61
+ onMounted(() => {
62
+ if (dd.env.platform !== "notInDingTalk") {
63
+ isInDD.value = true
64
+ } else {
65
+ isInDD.value = false
66
+ }
67
+ if ((window as any).oaTool && (window as any).oaTool.isOA) {
68
+ isInOA.value = true
69
+ } else {
70
+ isInOA.value = false
71
+ }
72
+ })
73
+ </script>
74
+
75
+ <style scoped lang='scss'>
76
+ @use '../styles/icon.scss';
77
+ </style>
@@ -0,0 +1,82 @@
1
+ <!--
2
+ * @description: 昼夜模式切换组件
3
+ * @fileName: dark-component.vue
4
+ !-->
5
+ <template>
6
+ <div>
7
+ <!-- 昼夜模式 -->
8
+ <el-dropdown trigger="click" @visible-change="clickChange">
9
+ <div :class="'icon-box ' + (isClick ?'icon-box-active':'')" id="tourDarkId" ref="iconRef" @mouseenter="mouseEnterIcon"
10
+ @mouseleave="mouseLeaveIcon" @mousemove="mouseEnterIcon">
11
+ <img :src="sunDefaultIcon" v-if="!isClick">
12
+ <img :src="sunActiveIcon" v-if="isClick">
13
+ </div>
14
+ <template #dropdown>
15
+ <div class="flex-row-center common-switch-box">
16
+ <span>是否跟随系统</span>
17
+ <el-switch v-model="localFollowSystem" style="margin: 0 12px;"
18
+ @change="changeFollowSystem" :active-value="true" :inactive-value="false"/>
19
+ </div>
20
+ <div v-if="!localFollowSystem" class="flex-row-center common-switch-box" ref="changeDarkRef">
21
+ <span>黑夜模式</span>
22
+ <el-switch v-model="localDayOrNight"
23
+ style="--el-switch-on-color: #333333;--el-switch-off-color:var(--custom-theme-info-normal);--switch-border-color:#f3f3f3;margin: 0 12px;"
24
+ @change="handleDarkChange" active-action-icon="Moon"
25
+ inactive-action-icon="Sunny" active-value="night" inactive-value="day"/>
26
+ </div>
27
+ </template>
28
+ </el-dropdown>
29
+ <div class="popover-tooltip-custom" ref="popoverTooptipRef" v-show="isMouseEnter && !isClick" style="left: -50%;">
30
+ <div class="triangle-top"></div>
31
+ <div>昼夜模式切换</div>
32
+ </div>
33
+ </div>
34
+ </template>
35
+
36
+ <script setup lang='ts'>
37
+ import { ref, watch } from 'vue'
38
+ import sunDefaultIcon from '../../../assets/layout/sun-default.svg'
39
+ import sunActiveIcon from '../../../assets/layout/sun-active.svg'
40
+
41
+ const props = defineProps<{
42
+ dayOrNight: string
43
+ followSystem: boolean
44
+ }>()
45
+
46
+ const emit = defineEmits<{
47
+ (e: 'change-dark', value: string, ref?: HTMLElement): void
48
+ (e: 'change-follow-system', value: boolean): void
49
+ }>()
50
+
51
+ const isMouseEnter = ref(false)
52
+ const isClick = ref(false)
53
+ const changeDarkRef = ref<HTMLElement>()
54
+ const localFollowSystem = ref(props.followSystem)
55
+ const localDayOrNight = ref(props.dayOrNight)
56
+
57
+ watch(() => props.followSystem, (val) => { localFollowSystem.value = val })
58
+ watch(() => props.dayOrNight, (val) => { localDayOrNight.value = val })
59
+
60
+ const mouseEnterIcon = () => { isMouseEnter.value = true }
61
+ const mouseLeaveIcon = () => { isMouseEnter.value = false }
62
+
63
+ const changeFollowSystem = () => {
64
+ emit('change-follow-system', localFollowSystem.value)
65
+ }
66
+
67
+ const handleDarkChange = () => {
68
+ emit('change-dark', localDayOrNight.value, changeDarkRef.value)
69
+ }
70
+
71
+ const popoverTooptipRef = ref()
72
+ const iconRef = ref()
73
+
74
+ const clickChange = (isVisiable: boolean) => {
75
+ isClick.value = isVisiable
76
+ isMouseEnter.value = false
77
+ }
78
+ </script>
79
+
80
+ <style scoped lang='scss'>
81
+ @use '../styles/icon.scss';
82
+ </style>