hrp-ui-base 1.4.7 → 1.4.9
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.
- package/README.md +51 -51
- package/dist/components.cjs +1 -1
- package/dist/components.es.js +25 -25
- package/dist/style.css +1 -1
- package/package.json +101 -101
- package/packages/approval-process/.eslintrc +6 -6
- package/packages/approval-process/README.md +22 -22
- package/packages/approval-process/index.ts +65 -65
- package/packages/approval-process/package.json +17 -17
- package/packages/approval-process/packages/components/choose-member/BO/departBo.ts +8 -8
- package/packages/approval-process/packages/components/choose-member/BO/memberBo.ts +14 -14
- package/packages/approval-process/packages/components/choose-member/BO/roleBo.ts +16 -16
- package/packages/approval-process/packages/components/choose-member/index.vue +496 -496
- package/packages/approval-process/packages/components/choose-member/styles/common.scss +133 -133
- package/packages/approval-process/packages/components/comment/assets/download.svg +4 -4
- package/packages/approval-process/packages/components/comment/assets/mp3.svg +11 -11
- package/packages/approval-process/packages/components/comment/assets/mp4.svg +11 -11
- package/packages/approval-process/packages/components/comment/assets/other.svg +11 -11
- package/packages/approval-process/packages/components/comment/assets/pdf.svg +11 -11
- package/packages/approval-process/packages/components/comment/assets/ppt.svg +11 -11
- package/packages/approval-process/packages/components/comment/assets/preview.svg +4 -4
- package/packages/approval-process/packages/components/comment/assets/word.svg +11 -11
- package/packages/approval-process/packages/components/comment/assets/xls.svg +11 -11
- package/packages/approval-process/packages/components/comment/index.vue +843 -843
- package/packages/approval-process/packages/components/comment/modules/previewMp.vue +53 -53
- package/packages/approval-process/packages/components/comment/styles/comment-style.scss +303 -303
- package/packages/approval-process/packages/components/image-cropper/index.vue +202 -202
- package/packages/approval-process/packages/components/sign/index.vue +766 -766
- package/packages/approval-process/packages/components/sign/modules/full-screen-sign.vue +19 -19
- package/packages/approval-process/packages/components/urge-dialog/index.vue +120 -120
- package/packages/approval-process/packages/components/vue-esign/index.vue +289 -289
- package/packages/approval-process/packages/flow/approve-component/approve-success.vue +81 -81
- package/packages/approval-process/packages/flow/approve-component/route-params-error.vue +48 -48
- package/packages/approval-process/packages/flow/approve-component/submit-success.vue +58 -58
- package/packages/approval-process/packages/flow/examine-approve-itr.vue +978 -978
- package/packages/approval-process/packages/flow/examine-approve.vue +1065 -1065
- package/packages/approval-process/packages/flow/form-component/associated-approval-form/README.md +38 -38
- package/packages/approval-process/packages/flow/form-component/associated-approval-form/index.vue +158 -158
- package/packages/approval-process/packages/flow/form-component/associated-approval-form/modules/associated-approval-form-mobile.vue +297 -297
- package/packages/approval-process/packages/flow/form-component/associated-approval-form/modules/associated-approval-form-pc.vue +314 -314
- package/packages/approval-process/packages/flow/form-component/associated-approval-form/style/curd-area-mobile.scss +109 -109
- package/packages/approval-process/packages/flow/form-component/associated-approval-form/style/curd-area.scss +95 -95
- package/packages/approval-process/packages/flow/form-component/associated-approval-form/style/out-put.scss +47 -47
- package/packages/approval-process/packages/flow/form-component/show-sign.vue +27 -27
- package/packages/approval-process/packages/flow/styles/common.scss +133 -133
- package/packages/approval-process/packages/flow/styles/examine-approve-pc.scss +465 -465
- package/packages/approval-process/packages/flow/styles/examine-approve-phone.scss +292 -292
- package/packages/approval-process/packages/flow/styles/submit-approve-pc.scss +379 -379
- package/packages/approval-process/packages/flow/styles/submit-approve-phone.scss +336 -336
- package/packages/approval-process/packages/flow/submit-approve-itr.vue +622 -622
- package/packages/approval-process/packages/flow/submit-approve.vue +627 -627
- package/packages/approval-process/packages/flow/systemCom/BO/departBo.ts +8 -8
- package/packages/approval-process/packages/flow/systemCom/BO/memberBo.ts +14 -14
- package/packages/approval-process/packages/flow/systemCom/BO/roleBo.ts +16 -16
- package/packages/approval-process/packages/flow/systemCom/choose-depart.vue +398 -398
- package/packages/approval-process/packages/flow/systemCom/choose-member-phone.vue +514 -514
- package/packages/approval-process/packages/flow/systemCom/choose-member.vue +564 -564
- package/packages/approval-process/packages/flow/systemCom/choose-role.vue +300 -300
- package/packages/approval-process/packages/styles/common.scss +133 -133
- package/packages/approval-process/packages/styles/flex-common.scss +117 -117
- package/packages/approval-process/packages/styles/flexCommon.scss +72 -72
- package/packages/approval-process/packages/styles/main.css +216 -216
- package/packages/approval-process/packages/styles/router-page.scss +370 -370
- package/packages/approval-process/packages/styles/style-set.ts +207 -207
- package/packages/approval-process/packages/types.d.ts +3 -3
- package/packages/approval-process/packages/utils/base.ts +15 -15
- package/packages/approval-process/packages/utils/crypto.ts +66 -66
- package/packages/approval-process/packages/utils/ddUtils.ts +56 -56
- package/packages/approval-process/packages/utils/debounce.ts +35 -35
- package/packages/approval-process/packages/utils/des.js +1107 -1107
- package/packages/approval-process/packages/utils/download.ts +38 -38
- package/packages/approval-process/packages/utils/editor.ts +36 -36
- package/packages/approval-process/packages/utils/getEnv.ts +36 -36
- package/packages/approval-process/packages/utils/os.ts +20 -20
- package/packages/approval-process/packages/utils/path-util.ts +31 -31
- package/packages/approval-process/packages/utils/routerUtil.ts +304 -304
- package/packages/approval-process/packages/utils/string-utils.ts +13 -13
- package/packages/approval-process/packages/utils/throttle.ts +44 -44
- package/packages/approval-process/packages/utils/validate.ts +92 -92
- package/packages/approval-process/packages/utils/ws.ts +218 -218
- package/packages/approval-process/tsconfig.json +72 -72
- package/packages/approval-process/vite.config.ts +56 -56
- package/src/api/bms/dict/bo/DictConfigBO.ts +23 -23
- package/src/api/bms/dict/bo/DictConfigBaseVO.ts +24 -24
- package/src/api/bms/dict/bo/DictConfigSearchBO.ts +12 -12
- package/src/api/bms/dict/bo/DictImportBO.ts +6 -6
- package/src/api/bms/dict/bo/DictVO.ts +21 -21
- package/src/api/bms/dict/bo/PageBaseVO.ts +8 -8
- package/src/api/bms/dict/bo/TotalDictBO.ts +11 -11
- package/src/api/bms/dict/bo/TotalDictPageVO.ts +17 -17
- package/src/api/bms/dict/dict-controller.ts +78 -78
- package/src/api/bms/file/FileExportController.ts +19 -19
- package/src/api/bms/file/FileUploadController.ts +131 -131
- package/src/api/bms/file/bo/FileBaseInfo.ts +13 -13
- package/src/api/bms/file/bo/FileExportVO.ts +17 -17
- package/src/api/bms/file/bo/FilePreviewVO.ts +8 -8
- package/src/api/bms/file/bo/FileUploadInfo.ts +22 -22
- package/src/api/bms/file/bo/FileUrlVO.ts +10 -10
- package/src/api/bms/file/bo/StsTokenVO.ts +20 -20
- package/src/api/bms/flow/FlowCommentController.ts +50 -50
- package/src/api/bms/flow/FlowInstanceController.ts +179 -179
- package/src/api/bms/flow/FlowProcessController.ts +55 -55
- package/src/api/bms/flow/FlowSheetController.ts +27 -27
- package/src/api/bms/flow/FlowSignController.ts +76 -76
- package/src/api/bms/flow/bo/AssociatedApprovalBO.ts +15 -15
- package/src/api/bms/flow/bo/AssociatedApprovalVO.ts +35 -35
- package/src/api/bms/flow/bo/AuditBaseInfo.ts +39 -39
- package/src/api/bms/flow/bo/ButtonVo.ts +7 -7
- package/src/api/bms/flow/bo/DingCallbackBo.ts +13 -13
- package/src/api/bms/flow/bo/FlowCommentBO.ts +12 -12
- package/src/api/bms/flow/bo/FlowCommentVO.ts +23 -23
- package/src/api/bms/flow/bo/FlowInstanceBO.ts +14 -14
- package/src/api/bms/flow/bo/FlowNodeVO.ts +24 -24
- package/src/api/bms/flow/bo/FlowNoticeBO.ts +17 -17
- package/src/api/bms/flow/bo/FlowProcessBO.ts +13 -13
- package/src/api/bms/flow/bo/FlowProcessVO.ts +9 -9
- package/src/api/bms/flow/bo/FlowReplyVO.ts +23 -23
- package/src/api/bms/flow/bo/FlowSheetVO.ts +16 -16
- package/src/api/bms/flow/bo/InstanceBackBO.ts +9 -9
- package/src/api/bms/flow/bo/InstanceNodeBO.ts +13 -13
- package/src/api/bms/flow/bo/InstanceNodeVO.ts +21 -21
- package/src/api/bms/flow/bo/NodeShowVo.ts +19 -19
- package/src/api/bms/flow/bo/ReviewBO.ts +11 -11
- package/src/api/bms/flow/bo/SheetSearchBO.ts +11 -11
- package/src/api/bms/flow/bo/SystemVO.ts +7 -7
- package/src/api/bms/flow/bo/TransmitBO.ts +9 -9
- package/src/api/bms/flow/bo/UrgeFlowBO.ts +7 -7
- package/src/api/bms/flow/bo/UserBaseInfoVo.ts +13 -13
- package/src/api/bms/flow/bo/UserInfoVo.ts +44 -44
- package/src/api/bms/flow/bo/UserResultVo.ts +17 -17
- package/src/api/bms/flow/bo/ValueMapBo.ts +7 -7
- package/src/api/bms/home/HomeController.ts +106 -106
- package/src/api/bms/home/bo/CollectedMenuBo.ts +9 -9
- package/src/api/bms/home/bo/DeptBaseVo.ts +9 -9
- package/src/api/bms/home/bo/DomainVO.ts +13 -13
- package/src/api/bms/home/bo/FunPermission.ts +17 -17
- package/src/api/bms/home/bo/GroupVO.ts +10 -10
- package/src/api/bms/home/bo/HomeMenu.ts +22 -22
- package/src/api/bms/home/bo/HomeMenuVo.ts +11 -11
- package/src/api/bms/home/bo/PersonalizationBo.ts +17 -17
- package/src/api/bms/home/bo/PersonalizationVo.ts +19 -19
- package/src/api/bms/home/bo/PhoneMenu.ts +14 -14
- package/src/api/bms/home/bo/SearchMenuVo.ts +10 -10
- package/src/api/bms/home/bo/UserBaseInfoVo.ts +11 -11
- package/src/api/bms/permission-manage/PermissionController.ts +133 -133
- package/src/api/bms/permission-manage/bo/DataScopeConfig.ts +17 -17
- package/src/api/bms/permission-manage/bo/DataScopePoint.ts +15 -15
- package/src/api/bms/permission-manage/bo/DeptBaseVo.ts +9 -9
- package/src/api/bms/permission-manage/bo/FunPermissionConfig.ts +18 -18
- package/src/api/bms/permission-manage/bo/FunPointVo.ts +9 -9
- package/src/api/bms/permission-manage/bo/PermissionGroupBo.ts +11 -11
- package/src/api/bms/permission-manage/bo/PermissionGroupMemberVo.ts +18 -18
- package/src/api/bms/permission-manage/bo/PermissionGroupPageVo.ts +17 -17
- package/src/api/bms/permission-manage/bo/PermissionGroupVo.ts +17 -17
- package/src/api/bms/permission-manage/bo/RoleBaseVo.ts +9 -9
- package/src/api/bms/permission-manage/bo/TheFirstStepVo.ts +13 -13
- package/src/api/bms/permission-manage/bo/TheSecondStepVo.ts +14 -14
- package/src/api/bms/permission-manage/bo/UserBaseInfoVo.ts +11 -11
- package/src/api/bms/tabulation/TabulationController.ts +78 -78
- package/src/api/bms/tabulation/bo/FieldConditionBO.ts +10 -10
- package/src/api/bms/tabulation/bo/FieldConditionVO.ts +10 -10
- package/src/api/bms/tabulation/bo/OperateButtonVO.ts +9 -9
- package/src/api/bms/tabulation/bo/PersonViewVO.ts +33 -33
- package/src/api/bms/tabulation/bo/SearchVO.ts +33 -33
- package/src/api/bms/tabulation/bo/TabulationBO.ts +14 -14
- package/src/api/bms/tabulation/bo/ViewSortBO.ts +7 -7
- package/src/api/bms/tabulation/bo/ViewVO.ts +12 -12
- package/src/api/common/FileBaseInfo.ts +10 -10
- package/src/api/common/ResponseBean.ts +9 -9
- package/src/api/common/ResponseBeanList.ts +15 -15
- package/src/api/common/ResponseBeanTablePage.ts +21 -21
- package/src/api/common/TableQueryCriteriaVO.ts +10 -10
- package/src/api/common/bo/PageResult.ts +22 -22
- package/src/api/hrms/dept/bo/DeptBaseVo.ts +6 -6
- package/src/api/hrms/dept/bo/DeptTreeVo.ts +23 -23
- package/src/api/hrms/dept/bo/DeptUserVo.ts +9 -9
- package/src/api/hrms/dept/bo/DeptUsersVo.ts +10 -10
- package/src/api/hrms/dept/bo/DeptVo.ts +19 -19
- package/src/api/hrms/dept/bo/UserBaseInfoVo.ts +7 -7
- package/src/api/hrms/dept/deptController.ts +100 -100
- package/src/api/hrms/role/bo/RoleBaseVo.ts +6 -6
- package/src/api/hrms/role/bo/RoleGroupVo.ts +11 -11
- package/src/api/hrms/role/bo/RoleVo.ts +22 -22
- package/src/api/hrms/role/roleController.ts +19 -19
- package/src/api/hrms/user/bo/UserBaseInfoVo.ts +11 -11
- package/src/api/hrms/user/bo/UserCardVO.ts +13 -13
- package/src/api/hrms/user/bo/UserDeptBO.ts +13 -13
- package/src/api/hrms/user/bo/UserRoleBO.ts +11 -11
- package/src/api/hrms/user/bo/UserVO.ts +23 -23
- package/src/api/hrms/user/userController.ts +86 -86
- package/src/api/index.ts +9 -9
- package/src/api/notice/NoticeController.ts +73 -73
- package/src/api/notice/bo/NoticePageBO.ts +24 -24
- package/src/api/notice/bo/NoticeVO.ts +31 -31
- package/src/api/work-order-pc/flow/Bo/ValueMapBo.ts +7 -7
- package/src/api/work-order-pc/flow/ItrFlowProcessController.ts +41 -41
- package/src/api/work-order-pc/flow/Vo/FlowNodeVO.ts +24 -24
- package/src/api/work-order-pc/flow/Vo/UserInfoVo.ts +44 -44
- package/src/assets/layout/avatar-default.svg +6 -6
- package/src/assets/layout/collect-active.svg +7 -7
- package/src/assets/layout/collect-default.svg +7 -7
- package/src/assets/layout/download-active.svg +8 -8
- package/src/assets/layout/download-default.svg +8 -8
- package/src/assets/layout/export-dark.svg +7 -7
- package/src/assets/layout/export-default.svg +7 -7
- package/src/assets/layout/font-active.svg +6 -6
- package/src/assets/layout/font-default.svg +6 -6
- package/src/assets/layout/help-active.svg +10 -10
- package/src/assets/layout/help-default.svg +10 -10
- package/src/assets/layout/home-active.svg +6 -6
- package/src/assets/layout/home.svg +6 -6
- package/src/assets/layout/menu-expand.svg +6 -6
- package/src/assets/layout/menu-position-active.svg +6 -6
- package/src/assets/layout/menu-position-default.svg +6 -6
- package/src/assets/layout/message-active.svg +9 -9
- package/src/assets/layout/message-default.svg +9 -9
- package/src/assets/layout/moon.svg +8 -8
- package/src/assets/layout/router-all-dark.svg +11 -11
- package/src/assets/layout/router-all-default.svg +17 -17
- package/src/assets/layout/search-active.svg +20 -20
- package/src/assets/layout/search-default.svg +20 -20
- package/src/assets/layout/star-default.svg +3 -3
- package/src/assets/layout/sun-active.svg +6 -6
- package/src/assets/layout/sun-default.svg +6 -6
- package/src/assets/layout/switch-moon.svg +3 -3
- package/src/assets/layout/switch-sun.svg +41 -41
- package/src/assets/layout/todo-active.svg +12 -12
- package/src/assets/layout/todo-default.svg +12 -12
- package/src/assets/layout/user-dark.svg +13 -13
- package/src/assets/layout/user-default.svg +13 -13
- package/src/assets/no-permiss-dark.svg +16 -16
- package/src/assets/no-permiss-day.svg +16 -16
- package/src/assets/process/drawer/manyLevel1close.svg +9 -9
- package/src/assets/process/drawer/manyLevel1open.svg +6 -6
- package/src/assets/process/drawer/manyLevel2close.svg +6 -6
- package/src/assets/process/drawer/manyLevel2open.svg +6 -6
- package/src/assets/table-delete/table-delete.svg +2 -2
- package/src/components/annex-img-upload/assets/download.svg +4 -4
- package/src/components/annex-img-upload/assets/mp3.svg +11 -11
- package/src/components/annex-img-upload/assets/mp4.svg +11 -11
- package/src/components/annex-img-upload/assets/other.svg +11 -11
- package/src/components/annex-img-upload/assets/pdf.svg +11 -11
- package/src/components/annex-img-upload/assets/ppt.svg +11 -11
- package/src/components/annex-img-upload/assets/preview.svg +4 -4
- package/src/components/annex-img-upload/assets/word.svg +11 -11
- package/src/components/annex-img-upload/assets/xls.svg +11 -11
- package/src/components/annex-img-upload/index.vue +609 -609
- package/src/components/annex-img-upload/modules/previewMp.vue +53 -53
- package/src/components/annex-upload/assets/download.svg +4 -4
- package/src/components/annex-upload/assets/mp3.svg +11 -11
- package/src/components/annex-upload/assets/mp4.svg +11 -11
- package/src/components/annex-upload/assets/other.svg +11 -11
- package/src/components/annex-upload/assets/pdf.svg +11 -11
- package/src/components/annex-upload/assets/ppt.svg +11 -11
- package/src/components/annex-upload/assets/preview.svg +4 -4
- package/src/components/annex-upload/assets/word.svg +11 -11
- package/src/components/annex-upload/assets/xls.svg +11 -11
- package/src/components/annex-upload/index.vue +800 -800
- package/src/components/annex-upload/modules/previewMp.vue +53 -53
- package/src/components/annex-upload-weijian/assets/download.svg +4 -4
- package/src/components/annex-upload-weijian/assets/mp3.svg +11 -11
- package/src/components/annex-upload-weijian/assets/mp4.svg +11 -11
- package/src/components/annex-upload-weijian/assets/other.svg +11 -11
- package/src/components/annex-upload-weijian/assets/pdf.svg +11 -11
- package/src/components/annex-upload-weijian/assets/ppt.svg +11 -11
- package/src/components/annex-upload-weijian/assets/preview.svg +4 -4
- package/src/components/annex-upload-weijian/assets/word.svg +11 -11
- package/src/components/annex-upload-weijian/assets/xls.svg +11 -11
- package/src/components/annex-upload-weijian/index.vue +772 -772
- package/src/components/annex-upload-weijian/modules/previewMp.vue +53 -53
- package/src/components/base-layout/index.vue +199 -199
- package/src/components/button.vue +14 -14
- package/src/components/layout/ApprovalCenterDrawer.vue +231 -231
- package/src/components/layout/ExportCenterDrawer.vue +164 -164
- package/src/components/layout/LayoutContainer.vue +542 -542
- package/src/components/layout/SysHeader.vue +90 -90
- package/src/components/layout/SysHeaderLeft.vue +114 -114
- package/src/components/layout/SysHeaderRight.vue +112 -112
- package/src/components/layout/SysHeaderTabs.vue +289 -289
- package/src/components/layout/components/avatar-component.vue +77 -77
- package/src/components/layout/components/dark-component.vue +82 -82
- package/src/components/layout/components/download-component.vue +49 -49
- package/src/components/layout/components/font-size-component.vue +66 -66
- package/src/components/layout/components/menu-position-component.vue +97 -97
- package/src/components/layout/components/message-component.vue +64 -64
- package/src/components/layout/components/todo-component.vue +55 -55
- package/src/components/layout/index.ts +34 -34
- package/src/components/layout/message/message-dictionary.ts +27 -27
- package/src/components/layout/message/message-icon//345/205/250/351/203/250/351/200/232/347/237/245-/350/223/235.svg +8 -8
- package/src/components/layout/message/message-icon//345/205/250/351/203/250/351/200/232/347/237/245-/351/273/221.svg +8 -8
- package/src/components/layout/message/message-icon//345/205/250/351/203/250/351/200/232/347/237/245.svg +8 -8
- package/src/components/layout/message/message-icon//345/205/254/345/221/212/351/200/232/347/237/245-/350/223/235.svg +12 -12
- package/src/components/layout/message/message-icon//345/205/254/345/221/212/351/200/232/347/237/245-/351/273/221.svg +12 -12
- package/src/components/layout/message/message-icon//345/205/254/345/221/212/351/200/232/347/237/245.svg +12 -12
- package/src/components/layout/message/message-icon//345/256/241/346/211/271/351/200/232/347/237/245-/350/223/235.svg +8 -8
- package/src/components/layout/message/message-icon//345/256/241/346/211/271/351/200/232/347/237/245-/351/273/221.svg +8 -8
- package/src/components/layout/message/message-icon//345/256/241/346/211/271/351/200/232/347/237/245.svg +8 -8
- package/src/components/layout/message/message-icon//345/257/274/345/207/272/351/200/232/347/237/245-/350/223/235.svg +13 -13
- package/src/components/layout/message/message-icon//345/257/274/345/207/272/351/200/232/347/237/245-/351/273/221.svg +13 -13
- package/src/components/layout/message/message-icon//345/257/274/345/207/272/351/200/232/347/237/245.svg +13 -13
- package/src/components/layout/message/message-icon//346/234/252/350/257/273/351/200/232/347/237/245-/350/223/235.svg +11 -11
- package/src/components/layout/message/message-icon//346/234/252/350/257/273/351/200/232/347/237/245-/351/273/221.svg +11 -11
- package/src/components/layout/message/message-icon//346/234/252/350/257/273/351/200/232/347/237/245.svg +11 -11
- package/src/components/layout/message/message-icon//347/251/272/347/212/266/346/200/201.svg +17 -17
- package/src/components/layout/message/message-icon//347/263/273/347/273/237/351/200/232/347/237/245-/350/223/235.svg +13 -13
- package/src/components/layout/message/message-icon//347/263/273/347/273/237/351/200/232/347/237/245-/351/273/221.svg +13 -13
- package/src/components/layout/message/message-icon//347/263/273/347/273/237/351/200/232/347/237/245.svg +13 -13
- package/src/components/layout/message/message-notification-drawer.vue +533 -533
- package/src/components/layout/personal-sign/ImageCropper.vue +187 -187
- package/src/components/layout/personal-sign/PersonalSignDialog.vue +658 -658
- package/src/components/layout/personalization-guide-dialog.vue +255 -255
- package/src/components/layout/plugin.ts +32 -32
- package/src/components/layout/sideMenu-global.scss +115 -115
- package/src/components/layout/sideMenu.scss +312 -312
- package/src/components/layout/sideMenu.vue +541 -541
- package/src/components/layout/sideMenuSonList.vue +185 -185
- package/src/components/layout/stores/index.ts +5 -5
- package/src/components/layout/stores/useLayoutConfigStore.ts +231 -231
- package/src/components/layout/stores/useLayoutMenuStore.ts +232 -232
- package/src/components/layout/stores/useLayoutNoticeStore.ts +77 -77
- package/src/components/layout/stores/useLayoutTabsStore.ts +367 -367
- package/src/components/layout/styles/icon.scss +72 -72
- package/src/components/layout/types.ts +98 -98
- package/src/components/layout/utils/redirect.ts +144 -144
- package/src/components/list-search-content/components/index.ts +11 -11
- package/src/components/list-search-content/components/search-date-range.vue +74 -74
- package/src/components/list-search-content/components/search-date-time-range.vue +48 -48
- package/src/components/list-search-content/components/search-date.vue +97 -97
- package/src/components/list-search-content/components/search-input-number.vue +59 -59
- package/src/components/list-search-content/components/search-input.vue +46 -46
- package/src/components/list-search-content/components/search-multiple_select.vue +69 -69
- package/src/components/list-search-content/components/search-select.vue +64 -64
- package/src/components/list-search-content/index.vue +803 -803
- package/src/components/list-search-content/modules/add-views-package-dialog.vue +147 -147
- package/src/components/list-search-content/modules/search-condition-area.vue +252 -252
- package/src/components/list-search-content/modules/views-package-manage-dialog.vue +265 -265
- package/src/components/switch.vue +16 -16
- package/src/components.ts +67 -67
- package/src/enum/system/StorageEnum.ts +4 -4
- package/src/global.d.ts +19 -19
- package/src/index.ts +4 -4
- package/src/init.ts +37 -37
- package/src/styles/common.scss +133 -133
- package/src/styles/flex-common.scss +117 -117
- package/src/styles/flexCommon.scss +72 -72
- package/src/styles/main.css +277 -277
- package/src/styles/router-page.scss +370 -370
- package/src/styles/style-set.ts +809 -809
- package/src/utils/HttpUtil.ts +427 -427
- package/src/utils/base.ts +47 -47
- package/src/utils/cell-style.ts +11 -11
- package/src/utils/crypto.ts +98 -98
- package/src/utils/dd-utils.ts +157 -157
- package/src/utils/debounce.ts +35 -35
- package/src/utils/debounceleading.ts +48 -48
- package/src/utils/download.ts +38 -38
- package/src/utils/exitLogin.ts +58 -58
- package/src/utils/filter-key.ts +4 -4
- package/src/utils/formatter-handler.ts +12 -12
- package/src/utils/get-dict.ts +26 -26
- package/src/utils/get-env.ts +36 -36
- package/src/utils/login-path.ts +35 -35
- package/src/utils/path-utils.ts +31 -31
- package/src/utils/permit-utils.ts +68 -68
- package/src/utils/router-utils.ts +321 -321
- package/src/utils/string-utils.ts +166 -166
- package/src/utils/style-set.ts +750 -750
- package/src/utils/throttle.ts +62 -62
- package/src/utils/transform-data.ts +31 -31
- package/src/utils/validate.ts +92 -92
- package/src/utils/ws.ts +218 -218
- package/src/utils/wujie-son.ts +50 -50
- package/src/utils.ts +24 -24
|
@@ -1,533 +1,533 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<transition name="slide-left">
|
|
4
|
-
<div id="messageDrawer" v-if="dialogVisible" class="message-drawer el-drawer__body " style="width: 860px;max-width: 80%;height: calc(100%);
|
|
5
|
-
position: fixed;z-index: 1000;right: 0;display: flex;flex-direction: column;
|
|
6
|
-
bottom: 0;top: 0;border-radius: 5px 0 0 5px;" v-loading="formLoading">
|
|
7
|
-
<div class="title-wrapper">
|
|
8
|
-
<span class="msg-tittle">消息通知</span>
|
|
9
|
-
<el-icon size="20" color="#909399" class="closed-dialog-icon" @click="close">
|
|
10
|
-
<CloseBold />
|
|
11
|
-
</el-icon>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="menu-wrapper">
|
|
14
|
-
<el-select style="max-width: 180px;" @focus="focusIcon = false" @visible-change="focusIcon = !focusIcon"
|
|
15
|
-
@change="messageSelectHandler" v-model="notificationType">
|
|
16
|
-
<template #label="{ label, value }">
|
|
17
|
-
<div style="display: flex;align-items: center">
|
|
18
|
-
<el-icon class="el-icon--right" v-if="value === 'all'" style="margin-right: 5px;">
|
|
19
|
-
<img src="./message-icon/全部通知.svg" width="16" height="16" v-if="focusIcon" />
|
|
20
|
-
<img src="./message-icon/全部通知-黑.svg" width="16" height="16" v-else />
|
|
21
|
-
</el-icon>
|
|
22
|
-
<el-icon class="el-icon--right" v-if="value === 'unread'" style="margin-right: 5px;">
|
|
23
|
-
<img src="./message-icon/未读通知.svg" width="16" height="16" v-if="focusIcon" />
|
|
24
|
-
<img src="./message-icon/未读通知-黑.svg" width="16" height="16" v-else />
|
|
25
|
-
</el-icon>
|
|
26
|
-
<el-icon class="el-icon--right" v-if="value === 'approval-notice'" style="margin-right: 5px;">
|
|
27
|
-
<img src="./message-icon/审批通知.svg" width="16" height="16" v-if="focusIcon">
|
|
28
|
-
<img src="./message-icon/审批通知-黑.svg" width="16" height="16" v-else />
|
|
29
|
-
</el-icon>
|
|
30
|
-
<el-icon class="el-icon--right" v-if="value === 'system-notice'" style="margin-right: 5px;">
|
|
31
|
-
<img src="./message-icon/系统通知.svg" width="16" height="16" v-if="focusIcon">
|
|
32
|
-
<img src="./message-icon/系统通知-黑.svg" width="16" height="16" v-else>
|
|
33
|
-
</el-icon>
|
|
34
|
-
<el-icon class="el-icon--right" v-if="value === 'message-notice'" style="margin-right: 5px;">
|
|
35
|
-
<img src="./message-icon/公告通知.svg" width="16" height="16" v-if="focusIcon">
|
|
36
|
-
<img src="./message-icon/公告通知-黑.svg" width="16" height="16" v-else>
|
|
37
|
-
</el-icon>
|
|
38
|
-
<el-icon class="el-icon--right" v-if="value === 'file-notice'" style="margin-right: 5px;">
|
|
39
|
-
<img src="./message-icon/导出通知.svg" width="16" height="16" v-if="focusIcon">
|
|
40
|
-
<img src="./message-icon/导出通知-黑.svg" width="16" height="16" v-else>
|
|
41
|
-
</el-icon>
|
|
42
|
-
<span>{{ label }} </span>
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|
|
45
|
-
<el-option v-for="(item) in NOTIFICATION_TYPE" :label="item.name" :key="item.id" :value="item.id">
|
|
46
|
-
<div style="display: flex;align-items: center;" id="selectType">
|
|
47
|
-
<el-icon class="el-icon--right" v-if="item.id === 'all'">
|
|
48
|
-
<img src="./message-icon/全部通知-黑.svg" width="16" height="16" v-if="focusIcon" />
|
|
49
|
-
<img src="./message-icon/全部通知-蓝.svg" width="16" height="16" v-else />
|
|
50
|
-
</el-icon>
|
|
51
|
-
<el-icon class="el-icon--right" v-if="item.id === 'unread'">
|
|
52
|
-
<img src="./message-icon/未读通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType" />
|
|
53
|
-
<img src="./message-icon/未读通知-蓝.svg" width="16" height="16" v-else />
|
|
54
|
-
</el-icon>
|
|
55
|
-
<el-icon class="el-icon--right" v-if="item.id === 'approval-notice'">
|
|
56
|
-
<img src="./message-icon/审批通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
57
|
-
<img src="./message-icon/审批通知-蓝.svg" width="16" height="16" v-else>
|
|
58
|
-
</el-icon>
|
|
59
|
-
<el-icon class="el-icon--right" v-if="item.id === 'system-notice'">
|
|
60
|
-
<img src="./message-icon/系统通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
61
|
-
<img src="./message-icon/系统通知-蓝.svg" width="16" height="16" v-else>
|
|
62
|
-
</el-icon>
|
|
63
|
-
<el-icon class="el-icon--right" v-if="item.id === 'message-notice'">
|
|
64
|
-
<img src="./message-icon/公告通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
65
|
-
<img src="./message-icon/公告通知-蓝.svg" width="16" height="16" v-else>
|
|
66
|
-
</el-icon>
|
|
67
|
-
<el-icon class="el-icon--right" v-if="item.id === 'file-notice'">
|
|
68
|
-
<img src="./message-icon/导出通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
69
|
-
<img src="./message-icon/导出通知-蓝.svg" width="16" height="16" v-else>
|
|
70
|
-
</el-icon>
|
|
71
|
-
<span style="margin-left: 5px">{{ item.name }}</span>
|
|
72
|
-
</div>
|
|
73
|
-
</el-option>
|
|
74
|
-
</el-select>
|
|
75
|
-
<el-dropdown class="example-showcase" trigger="click">
|
|
76
|
-
<span class="el-dropdown-link">
|
|
77
|
-
<el-button plain>
|
|
78
|
-
批量操作
|
|
79
|
-
<el-icon class="el-icon--right"><arrow-down /></el-icon>
|
|
80
|
-
</el-button>
|
|
81
|
-
</span>
|
|
82
|
-
<template #dropdown>
|
|
83
|
-
<el-dropdown-menu>
|
|
84
|
-
<el-dropdown-item id="dropDownReadMenuItem" @click="readNoticeHandler">标记所有为已读</el-dropdown-item>
|
|
85
|
-
<el-dropdown-item id="dropDownReadMenuItem" @click="deleteReadNoticeHandler">删除所有已读通知</el-dropdown-item>
|
|
86
|
-
</el-dropdown-menu>
|
|
87
|
-
</template>
|
|
88
|
-
</el-dropdown>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="list-wrapper" @scroll="handleScroll" v-if="!ifEmpty">
|
|
91
|
-
<div v-for="(item) in noticeVO" :key="item.noticeId" class="message-item" @click="messageItemHandler(item)">
|
|
92
|
-
<el-badge is-dot class="item" :hidden="item.ifRead" style="display: inline-block">
|
|
93
|
-
<div v-if="item.noticeType === 'message-notice'" style="width:20px;height: 20px">
|
|
94
|
-
<img src="./message-icon/公告通知.svg" width="20" height="20" class="message-icon">
|
|
95
|
-
<img src="./message-icon/公告通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
96
|
-
</div>
|
|
97
|
-
<div v-if="item.noticeType === 'approval-notice'" style="width:20px;height: 20px">
|
|
98
|
-
<img src="./message-icon/审批通知.svg" width="20" height="20" class="message-icon">
|
|
99
|
-
<img src="./message-icon/审批通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
100
|
-
</div>
|
|
101
|
-
<div v-if="item.noticeType === 'file-notice'" style="width:20px;height: 20px">
|
|
102
|
-
<img src="./message-icon/导出通知.svg" width="20" height="20" class="message-icon">
|
|
103
|
-
<img src="./message-icon/导出通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
104
|
-
</div>
|
|
105
|
-
<div v-if="item.noticeType === 'system-notice'" style="width:20px;height: 20px">
|
|
106
|
-
<img src="./message-icon/系统通知.svg" width="20" height="20" class="message-icon">
|
|
107
|
-
<img src="./message-icon/系统通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
108
|
-
</div>
|
|
109
|
-
</el-badge>
|
|
110
|
-
<div class="message-info ">
|
|
111
|
-
<div class="flex-between">
|
|
112
|
-
<span :class="item.ifRead ? 'noticeType-color-read' : 'noticeType-color'" class="message-title">{{
|
|
113
|
-
item.noticeTitle
|
|
114
|
-
}}</span>
|
|
115
|
-
<el-icon color="#909399 " size="17" class="closed-icon" @click.stop="deleteNoticeInfoByNoticeIds(item)">
|
|
116
|
-
<CloseBold />
|
|
117
|
-
</el-icon>
|
|
118
|
-
</div>
|
|
119
|
-
<div class="message-content"
|
|
120
|
-
:class="item.ifRead ? 'message-content-color-read' : 'message-content-color'">
|
|
121
|
-
{{ item.noticeContent }}
|
|
122
|
-
</div>
|
|
123
|
-
<div style="height: 24px;width: 100%;font-size: var(--font-size-description);" class="flex-between">
|
|
124
|
-
<div :class="item.ifRead ? 'noticeFoot-color-read' : 'noticeFoot-color'">{{ item.noticeTime ?
|
|
125
|
-
getTime(item.noticeTime) : '年月日' }}</div>
|
|
126
|
-
<el-button plain type="primary" size="small" class="export-btn" v-if="item.noticeType === 'file-notice'"
|
|
127
|
-
@click.stop="downloadHandler(item)"><span
|
|
128
|
-
style="font-size:var(--font-size-description)">去下载</span></el-button>
|
|
129
|
-
<el-button plain type="primary" size="small" class="export-btn" v-if="item.noticeType !== 'file-notice'"
|
|
130
|
-
@click.stop="messageItemHandler(item)"><span
|
|
131
|
-
style="font-size: var(--font-size-description)">查看详情</span></el-button>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
<div class="foot-text" v-if="ifText" v-loading="moreLoading">
|
|
136
|
-
<span class="foot-text-more" v-if="ifTextMore" @click="getMore">查看更多</span>
|
|
137
|
-
<span v-else>已经没有更多消息了</span>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
<div v-else
|
|
141
|
-
style="flex-grow: 1;display: flex;justify-content: center;align-items: center;flex-direction: column">
|
|
142
|
-
<img src="./message-icon/空状态.svg" width="320px" height="320px">
|
|
143
|
-
<div class="foot-text"><span>已经没有更多消息了</span></div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</transition>
|
|
147
|
-
</div>
|
|
148
|
-
</template>
|
|
149
|
-
|
|
150
|
-
<script setup lang="ts">
|
|
151
|
-
import { ref, watch, inject } from "vue";
|
|
152
|
-
import { ArrowDown, CloseBold } from '@element-plus/icons-vue'
|
|
153
|
-
import { NOTIFICATION_TYPE } from "./message-dictionary";
|
|
154
|
-
import NoticeController from "../../../api/notice/NoticeController";
|
|
155
|
-
import type NoticePageBO from "../../../api/notice/bo/NoticePageBO";
|
|
156
|
-
import type NoticeVO from "../../../api/notice/bo/NoticeVO";
|
|
157
|
-
import moment from "moment";
|
|
158
|
-
import { ElMessage } from "element-plus";
|
|
159
|
-
|
|
160
|
-
const emit = defineEmits<{
|
|
161
|
-
(e: 'close'): void
|
|
162
|
-
(e: 'update-count'): void
|
|
163
|
-
(e: 'navigate', notice: NoticeVO): void
|
|
164
|
-
(e: 'download', notice: NoticeVO): void
|
|
165
|
-
}>()
|
|
166
|
-
|
|
167
|
-
const formLoading = ref<boolean>(false)
|
|
168
|
-
const moreLoading = ref<boolean>(false)
|
|
169
|
-
const dialogVisible = ref<boolean>(false)
|
|
170
|
-
const notificationType = ref<string>('all')
|
|
171
|
-
const ifEmpty = ref<boolean>(false)
|
|
172
|
-
const ifText = ref<boolean>(false)
|
|
173
|
-
const ifTextMore = ref<boolean>(false)
|
|
174
|
-
const focusIcon = ref<boolean>(false)
|
|
175
|
-
|
|
176
|
-
/** 打开弹窗 */
|
|
177
|
-
const open = async () => {
|
|
178
|
-
formLoading.value = true
|
|
179
|
-
dialogVisible.value = true
|
|
180
|
-
resetForm()
|
|
181
|
-
await selectNoticePage()
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const handleScroll = async (e: any) => {}
|
|
185
|
-
|
|
186
|
-
/** 点击加载更多 */
|
|
187
|
-
const getMore = async () => {
|
|
188
|
-
if (total.value > noticePageBO.value.offset + 10) {
|
|
189
|
-
moreLoading.value = true
|
|
190
|
-
noticePageBO.value.offset += 10
|
|
191
|
-
await selectNoticePage()
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/** 查询条件 */
|
|
196
|
-
const noticePageBO = ref<NoticePageBO>({
|
|
197
|
-
noticeType: '',
|
|
198
|
-
timeStamp: '',
|
|
199
|
-
offset: 0,
|
|
200
|
-
pageSize: 10,
|
|
201
|
-
pageNum: 1
|
|
202
|
-
})
|
|
203
|
-
|
|
204
|
-
/** 消息数组 */
|
|
205
|
-
const noticeVO = ref<NoticeVO[]>([])
|
|
206
|
-
const total = ref<number>(0)
|
|
207
|
-
|
|
208
|
-
/** 获得消息分页数组函数 */
|
|
209
|
-
const selectNoticePage = async () => {
|
|
210
|
-
noticePageBO.value.noticeType = notificationType.value
|
|
211
|
-
noticePageBO.value.timeStamp = moment.unix(moment().unix()).format("YYYY-MM-DD HH:mm:ss")
|
|
212
|
-
await NoticeController.selectNoticePage(noticePageBO.value).then(data => {
|
|
213
|
-
if (data.code === 200 && data.res) {
|
|
214
|
-
if (data.res.records) {
|
|
215
|
-
noticeVO.value.push(...data.res.records)
|
|
216
|
-
}
|
|
217
|
-
total.value = data.res.total
|
|
218
|
-
ifEmpty.value = noticeVO.value.length === 0
|
|
219
|
-
ifText.value = true
|
|
220
|
-
ifTextMore.value = total.value > noticePageBO.value.offset + 10
|
|
221
|
-
} else if (data.code === 200 && data.res === null) {
|
|
222
|
-
noticeVO.value = []
|
|
223
|
-
ifEmpty.value = true
|
|
224
|
-
ifText.value = true
|
|
225
|
-
ifTextMore.value = total.value > noticePageBO.value.offset + 10
|
|
226
|
-
}
|
|
227
|
-
}).finally(() => {
|
|
228
|
-
formLoading.value = false
|
|
229
|
-
moreLoading.value = false
|
|
230
|
-
})
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/** 获得时间 */
|
|
234
|
-
const getTime = (dateString: string) => {
|
|
235
|
-
let date = new Date(dateString)
|
|
236
|
-
return date.getFullYear() + "年" +
|
|
237
|
-
("0" + (date.getMonth() + 1)).slice(-2) + "月" +
|
|
238
|
-
("0" + date.getDate()).slice(-2) + "日 " +
|
|
239
|
-
date.getHours() + ":" +
|
|
240
|
-
("0" + date.getMinutes()).slice(-2);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// 给整个文档添加点击事件监听器
|
|
244
|
-
document.addEventListener('mouseup', function (event: any) {
|
|
245
|
-
let target = event.target;
|
|
246
|
-
let closeDom = document.querySelectorAll('.el-notification__closeBtn')
|
|
247
|
-
if (closeDom) {
|
|
248
|
-
for (let i = 0; i < closeDom.length; i++) {
|
|
249
|
-
closeDom[i].id = 'el-notification__closeBtn'
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
while (target && target.id !== 'tourMessageId' && target.id !== 'selectType'
|
|
253
|
-
&& target.id !== 'el-notification__closeBtn'
|
|
254
|
-
&& target.id !== 'dropDownReadMenuItem' && target.id !== 'messageDrawer') {
|
|
255
|
-
target = target.parentNode;
|
|
256
|
-
}
|
|
257
|
-
if (!target) {
|
|
258
|
-
close()
|
|
259
|
-
}
|
|
260
|
-
}, true);
|
|
261
|
-
|
|
262
|
-
/** 修改消息类型函数*/
|
|
263
|
-
const messageSelectHandler = async () => {
|
|
264
|
-
noticePageBO.value.pageNum = 1
|
|
265
|
-
noticeVO.value = []
|
|
266
|
-
noticePageBO.value.offset = 0
|
|
267
|
-
ifText.value = false
|
|
268
|
-
formLoading.value = true
|
|
269
|
-
await selectNoticePage()
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/** 删除单个消息函数*/
|
|
273
|
-
const deleteNoticeInfoByNoticeIds = (e: NoticeVO) => {
|
|
274
|
-
NoticeController.deleteNoticeInfoByNoticeIds([e.noticeId]).then(data => {
|
|
275
|
-
if (data.code === 200 && data) {
|
|
276
|
-
noticeVO.value = noticeVO.value.filter(item => item.noticeId !== e.noticeId)
|
|
277
|
-
noticePageBO.value.offset = noticePageBO.value.offset - 1
|
|
278
|
-
ifEmpty.value = noticeVO.value.length === 0 && !ifTextMore.value
|
|
279
|
-
emit('update-count')
|
|
280
|
-
}
|
|
281
|
-
})
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/** 标记所有为已读*/
|
|
285
|
-
const readNoticeHandler = async () => {
|
|
286
|
-
await NoticeController.readNoticeInfoByNoticeType(notificationType.value).then(async (data) => {
|
|
287
|
-
if (data.code === 200 && data) {
|
|
288
|
-
noticeVO.value = []
|
|
289
|
-
noticePageBO.value.pageNum = 1
|
|
290
|
-
noticePageBO.value.offset = 0
|
|
291
|
-
await selectNoticePage()
|
|
292
|
-
emit('update-count')
|
|
293
|
-
}
|
|
294
|
-
})
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/** 删除所有已读通知*/
|
|
298
|
-
const deleteReadNoticeHandler = async () => {
|
|
299
|
-
await NoticeController.deleteReadNoticeInfoByNoticeType(notificationType.value).then(async (data) => {
|
|
300
|
-
if (data.code === 200 && data) {
|
|
301
|
-
ElMessage({ type: 'success', message: '删除成功' })
|
|
302
|
-
noticeVO.value = []
|
|
303
|
-
noticePageBO.value.pageNum = 1
|
|
304
|
-
noticePageBO.value.offset = 0
|
|
305
|
-
await selectNoticePage()
|
|
306
|
-
}
|
|
307
|
-
})
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/** 点击跳转通知详情 - 通过事件通知 scm 处理路由跳转 */
|
|
311
|
-
const messageItemHandler = async (e: NoticeVO) => {
|
|
312
|
-
await NoticeController.readNoticeInfo(e.noticeId)
|
|
313
|
-
e.ifRead = true
|
|
314
|
-
if (e.noticeType === 'file-notice') {
|
|
315
|
-
emit('update-count')
|
|
316
|
-
return
|
|
317
|
-
}
|
|
318
|
-
emit('navigate', e)
|
|
319
|
-
emit('update-count')
|
|
320
|
-
close()
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
/** 文件下载 - 通过事件通知 scm 处理 */
|
|
324
|
-
const downloadHandler = async (e: NoticeVO) => {
|
|
325
|
-
if (!e.ifRead) {
|
|
326
|
-
e.ifRead = true
|
|
327
|
-
await NoticeController.readNoticeInfo(e.noticeId)
|
|
328
|
-
emit('update-count')
|
|
329
|
-
}
|
|
330
|
-
emit('download', e)
|
|
331
|
-
close()
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/** 表单重置 */
|
|
335
|
-
const resetForm = () => {
|
|
336
|
-
notificationType.value = 'all'
|
|
337
|
-
noticePageBO.value.pageNum = 1
|
|
338
|
-
noticePageBO.value.offset = 0
|
|
339
|
-
noticePageBO.value.timeStamp = ''
|
|
340
|
-
noticeVO.value = []
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/** 抽屉关闭 */
|
|
344
|
-
const close = () => {
|
|
345
|
-
dialogVisible.value = false
|
|
346
|
-
emit('close')
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
defineExpose({ open, close })
|
|
350
|
-
|
|
351
|
-
/** 获得messageInfo - 外部注入新通知 */
|
|
352
|
-
let messageInfo = inject('messageInfo', ref<NoticeVO>({
|
|
353
|
-
noticeId: '',
|
|
354
|
-
noticeType: '',
|
|
355
|
-
noticeContent: '',
|
|
356
|
-
noticeTitle: '',
|
|
357
|
-
urlRoute: '',
|
|
358
|
-
ifRead: false,
|
|
359
|
-
noticeTime: ''
|
|
360
|
-
}))
|
|
361
|
-
|
|
362
|
-
watch(() => { return messageInfo.value }, (value) => {
|
|
363
|
-
if (messageInfo.value.noticeType === notificationType.value
|
|
364
|
-
|| notificationType.value === 'all' || notificationType.value === 'unread') {
|
|
365
|
-
noticeVO.value.unshift(messageInfo.value)
|
|
366
|
-
ifEmpty.value = noticeVO.value.length === 0
|
|
367
|
-
}
|
|
368
|
-
}, { immediate: true, deep: true })
|
|
369
|
-
</script>
|
|
370
|
-
|
|
371
|
-
<style scoped lang="scss">
|
|
372
|
-
.slide-left-enter-active,
|
|
373
|
-
.slide-left-leave-active {
|
|
374
|
-
transition: all 0.7s ease;
|
|
375
|
-
}
|
|
376
|
-
.slide-left-enter-from {
|
|
377
|
-
transform: translateX(100%);
|
|
378
|
-
}
|
|
379
|
-
.slide-left-leave-to {
|
|
380
|
-
transform: translateX(100%);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.flex-between {
|
|
384
|
-
display: flex;
|
|
385
|
-
justify-content: space-between;
|
|
386
|
-
align-items: center;
|
|
387
|
-
margin-bottom: 5px;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.message-drawer {
|
|
391
|
-
background-color: var(--custom-theme-fill-7);
|
|
392
|
-
box-shadow: -1px 0px 4px 1px rgba(144, 147, 153, 0.2);
|
|
393
|
-
|
|
394
|
-
.title-wrapper {
|
|
395
|
-
padding: 10px;
|
|
396
|
-
display: flex;
|
|
397
|
-
justify-content: space-between;
|
|
398
|
-
align-items: center;
|
|
399
|
-
|
|
400
|
-
.msg-tittle {
|
|
401
|
-
font-size: var(--font-size-h1);
|
|
402
|
-
font-weight: bold;
|
|
403
|
-
color: var(--custom-theme-text-2)
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.menu-wrapper {
|
|
408
|
-
padding: 10px;
|
|
409
|
-
display: flex;
|
|
410
|
-
justify-content: space-between;
|
|
411
|
-
width: 100%;
|
|
412
|
-
border-bottom: var(--custom-theme-border-4) 1px solid;
|
|
413
|
-
flex-shrink: 0;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.list-wrapper {
|
|
417
|
-
display: flex;
|
|
418
|
-
flex-direction: column;
|
|
419
|
-
flex-grow: 1;
|
|
420
|
-
overflow: scroll;
|
|
421
|
-
box-sizing: border-box;
|
|
422
|
-
|
|
423
|
-
.message-item {
|
|
424
|
-
display: flex;
|
|
425
|
-
justify-content: flex-start;
|
|
426
|
-
padding: 10px;
|
|
427
|
-
border-bottom: var(--custom-theme-border-4) 1px solid;
|
|
428
|
-
|
|
429
|
-
.message-icon-blue,
|
|
430
|
-
.export-btn,
|
|
431
|
-
.closed-icon {
|
|
432
|
-
display: none;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.message-info {
|
|
436
|
-
margin-left: 5px;
|
|
437
|
-
display: inline-block;
|
|
438
|
-
width: calc(100% - 35px);
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.message-content {
|
|
442
|
-
margin: 8px 0;
|
|
443
|
-
overflow: hidden;
|
|
444
|
-
text-overflow: ellipsis;
|
|
445
|
-
white-space: nowrap;
|
|
446
|
-
width: 100%;
|
|
447
|
-
font-size: var(--font-size-description);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.message-title {
|
|
451
|
-
overflow: hidden;
|
|
452
|
-
text-overflow: ellipsis;
|
|
453
|
-
white-space: nowrap;
|
|
454
|
-
width: 100%;
|
|
455
|
-
font-size: var(--font-size-body);
|
|
456
|
-
font-weight: bold;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.message-content-color {
|
|
460
|
-
color: var(--custom-theme-text-1);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.message-content-color-read {
|
|
464
|
-
color: var(--el-color-info);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.message-item:hover {
|
|
469
|
-
cursor: pointer;
|
|
470
|
-
}
|
|
471
|
-
.message-item:hover .message-icon {
|
|
472
|
-
display: none;
|
|
473
|
-
}
|
|
474
|
-
.message-item:hover .message-icon-blue {
|
|
475
|
-
display: block;
|
|
476
|
-
}
|
|
477
|
-
.message-item:hover .export-btn {
|
|
478
|
-
display: block;
|
|
479
|
-
}
|
|
480
|
-
.message-item:hover .closed-icon {
|
|
481
|
-
display: block;
|
|
482
|
-
}
|
|
483
|
-
.message-item:hover {
|
|
484
|
-
background-color: var(--custom-theme-fill-4);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
.closed-dialog-icon:hover {
|
|
489
|
-
cursor: pointer;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
.foot-text {
|
|
493
|
-
font-size: var(--font-size-body);
|
|
494
|
-
color: var(--custom-theme-info-normal);
|
|
495
|
-
display: flex;
|
|
496
|
-
justify-content: center;
|
|
497
|
-
margin: 10px 0
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
.foot-text-more:hover {
|
|
501
|
-
cursor: pointer;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.noticeType-color {
|
|
505
|
-
color: var(--custom-theme-text-2);
|
|
506
|
-
}
|
|
507
|
-
.noticeType-color-read {
|
|
508
|
-
color: var(--custom-theme-text-4);
|
|
509
|
-
}
|
|
510
|
-
.noticeFoot-color {
|
|
511
|
-
color: var(--custom-theme-text-3);
|
|
512
|
-
}
|
|
513
|
-
.noticeFoot-color-read {
|
|
514
|
-
color: var(--custom-theme-text-5);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
</style>
|
|
518
|
-
<style lang="scss">
|
|
519
|
-
.message-drawer {
|
|
520
|
-
.el-drawer__header {
|
|
521
|
-
margin-bottom: 0;
|
|
522
|
-
border-bottom: var(--custom-theme-border-4) 1px solid;
|
|
523
|
-
padding-bottom: 5px
|
|
524
|
-
}
|
|
525
|
-
.el-drawer__body {
|
|
526
|
-
padding: 10px;
|
|
527
|
-
box-sizing: border-box;
|
|
528
|
-
display: flex;
|
|
529
|
-
flex-direction: column;
|
|
530
|
-
flex: 1;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<transition name="slide-left">
|
|
4
|
+
<div id="messageDrawer" v-if="dialogVisible" class="message-drawer el-drawer__body " style="width: 860px;max-width: 80%;height: calc(100%);
|
|
5
|
+
position: fixed;z-index: 1000;right: 0;display: flex;flex-direction: column;
|
|
6
|
+
bottom: 0;top: 0;border-radius: 5px 0 0 5px;" v-loading="formLoading">
|
|
7
|
+
<div class="title-wrapper">
|
|
8
|
+
<span class="msg-tittle">消息通知</span>
|
|
9
|
+
<el-icon size="20" color="#909399" class="closed-dialog-icon" @click="close">
|
|
10
|
+
<CloseBold />
|
|
11
|
+
</el-icon>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="menu-wrapper">
|
|
14
|
+
<el-select style="max-width: 180px;" @focus="focusIcon = false" @visible-change="focusIcon = !focusIcon"
|
|
15
|
+
@change="messageSelectHandler" v-model="notificationType">
|
|
16
|
+
<template #label="{ label, value }">
|
|
17
|
+
<div style="display: flex;align-items: center">
|
|
18
|
+
<el-icon class="el-icon--right" v-if="value === 'all'" style="margin-right: 5px;">
|
|
19
|
+
<img src="./message-icon/全部通知.svg" width="16" height="16" v-if="focusIcon" />
|
|
20
|
+
<img src="./message-icon/全部通知-黑.svg" width="16" height="16" v-else />
|
|
21
|
+
</el-icon>
|
|
22
|
+
<el-icon class="el-icon--right" v-if="value === 'unread'" style="margin-right: 5px;">
|
|
23
|
+
<img src="./message-icon/未读通知.svg" width="16" height="16" v-if="focusIcon" />
|
|
24
|
+
<img src="./message-icon/未读通知-黑.svg" width="16" height="16" v-else />
|
|
25
|
+
</el-icon>
|
|
26
|
+
<el-icon class="el-icon--right" v-if="value === 'approval-notice'" style="margin-right: 5px;">
|
|
27
|
+
<img src="./message-icon/审批通知.svg" width="16" height="16" v-if="focusIcon">
|
|
28
|
+
<img src="./message-icon/审批通知-黑.svg" width="16" height="16" v-else />
|
|
29
|
+
</el-icon>
|
|
30
|
+
<el-icon class="el-icon--right" v-if="value === 'system-notice'" style="margin-right: 5px;">
|
|
31
|
+
<img src="./message-icon/系统通知.svg" width="16" height="16" v-if="focusIcon">
|
|
32
|
+
<img src="./message-icon/系统通知-黑.svg" width="16" height="16" v-else>
|
|
33
|
+
</el-icon>
|
|
34
|
+
<el-icon class="el-icon--right" v-if="value === 'message-notice'" style="margin-right: 5px;">
|
|
35
|
+
<img src="./message-icon/公告通知.svg" width="16" height="16" v-if="focusIcon">
|
|
36
|
+
<img src="./message-icon/公告通知-黑.svg" width="16" height="16" v-else>
|
|
37
|
+
</el-icon>
|
|
38
|
+
<el-icon class="el-icon--right" v-if="value === 'file-notice'" style="margin-right: 5px;">
|
|
39
|
+
<img src="./message-icon/导出通知.svg" width="16" height="16" v-if="focusIcon">
|
|
40
|
+
<img src="./message-icon/导出通知-黑.svg" width="16" height="16" v-else>
|
|
41
|
+
</el-icon>
|
|
42
|
+
<span>{{ label }} </span>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
<el-option v-for="(item) in NOTIFICATION_TYPE" :label="item.name" :key="item.id" :value="item.id">
|
|
46
|
+
<div style="display: flex;align-items: center;" id="selectType">
|
|
47
|
+
<el-icon class="el-icon--right" v-if="item.id === 'all'">
|
|
48
|
+
<img src="./message-icon/全部通知-黑.svg" width="16" height="16" v-if="focusIcon" />
|
|
49
|
+
<img src="./message-icon/全部通知-蓝.svg" width="16" height="16" v-else />
|
|
50
|
+
</el-icon>
|
|
51
|
+
<el-icon class="el-icon--right" v-if="item.id === 'unread'">
|
|
52
|
+
<img src="./message-icon/未读通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType" />
|
|
53
|
+
<img src="./message-icon/未读通知-蓝.svg" width="16" height="16" v-else />
|
|
54
|
+
</el-icon>
|
|
55
|
+
<el-icon class="el-icon--right" v-if="item.id === 'approval-notice'">
|
|
56
|
+
<img src="./message-icon/审批通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
57
|
+
<img src="./message-icon/审批通知-蓝.svg" width="16" height="16" v-else>
|
|
58
|
+
</el-icon>
|
|
59
|
+
<el-icon class="el-icon--right" v-if="item.id === 'system-notice'">
|
|
60
|
+
<img src="./message-icon/系统通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
61
|
+
<img src="./message-icon/系统通知-蓝.svg" width="16" height="16" v-else>
|
|
62
|
+
</el-icon>
|
|
63
|
+
<el-icon class="el-icon--right" v-if="item.id === 'message-notice'">
|
|
64
|
+
<img src="./message-icon/公告通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
65
|
+
<img src="./message-icon/公告通知-蓝.svg" width="16" height="16" v-else>
|
|
66
|
+
</el-icon>
|
|
67
|
+
<el-icon class="el-icon--right" v-if="item.id === 'file-notice'">
|
|
68
|
+
<img src="./message-icon/导出通知-黑.svg" width="16" height="16" v-if="item.id !== notificationType">
|
|
69
|
+
<img src="./message-icon/导出通知-蓝.svg" width="16" height="16" v-else>
|
|
70
|
+
</el-icon>
|
|
71
|
+
<span style="margin-left: 5px">{{ item.name }}</span>
|
|
72
|
+
</div>
|
|
73
|
+
</el-option>
|
|
74
|
+
</el-select>
|
|
75
|
+
<el-dropdown class="example-showcase" trigger="click">
|
|
76
|
+
<span class="el-dropdown-link">
|
|
77
|
+
<el-button plain>
|
|
78
|
+
批量操作
|
|
79
|
+
<el-icon class="el-icon--right"><arrow-down /></el-icon>
|
|
80
|
+
</el-button>
|
|
81
|
+
</span>
|
|
82
|
+
<template #dropdown>
|
|
83
|
+
<el-dropdown-menu>
|
|
84
|
+
<el-dropdown-item id="dropDownReadMenuItem" @click="readNoticeHandler">标记所有为已读</el-dropdown-item>
|
|
85
|
+
<el-dropdown-item id="dropDownReadMenuItem" @click="deleteReadNoticeHandler">删除所有已读通知</el-dropdown-item>
|
|
86
|
+
</el-dropdown-menu>
|
|
87
|
+
</template>
|
|
88
|
+
</el-dropdown>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="list-wrapper" @scroll="handleScroll" v-if="!ifEmpty">
|
|
91
|
+
<div v-for="(item) in noticeVO" :key="item.noticeId" class="message-item" @click="messageItemHandler(item)">
|
|
92
|
+
<el-badge is-dot class="item" :hidden="item.ifRead" style="display: inline-block">
|
|
93
|
+
<div v-if="item.noticeType === 'message-notice'" style="width:20px;height: 20px">
|
|
94
|
+
<img src="./message-icon/公告通知.svg" width="20" height="20" class="message-icon">
|
|
95
|
+
<img src="./message-icon/公告通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
96
|
+
</div>
|
|
97
|
+
<div v-if="item.noticeType === 'approval-notice'" style="width:20px;height: 20px">
|
|
98
|
+
<img src="./message-icon/审批通知.svg" width="20" height="20" class="message-icon">
|
|
99
|
+
<img src="./message-icon/审批通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
100
|
+
</div>
|
|
101
|
+
<div v-if="item.noticeType === 'file-notice'" style="width:20px;height: 20px">
|
|
102
|
+
<img src="./message-icon/导出通知.svg" width="20" height="20" class="message-icon">
|
|
103
|
+
<img src="./message-icon/导出通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
104
|
+
</div>
|
|
105
|
+
<div v-if="item.noticeType === 'system-notice'" style="width:20px;height: 20px">
|
|
106
|
+
<img src="./message-icon/系统通知.svg" width="20" height="20" class="message-icon">
|
|
107
|
+
<img src="./message-icon/系统通知-蓝.svg" width="20" height="20" class="message-icon-blue">
|
|
108
|
+
</div>
|
|
109
|
+
</el-badge>
|
|
110
|
+
<div class="message-info ">
|
|
111
|
+
<div class="flex-between">
|
|
112
|
+
<span :class="item.ifRead ? 'noticeType-color-read' : 'noticeType-color'" class="message-title">{{
|
|
113
|
+
item.noticeTitle
|
|
114
|
+
}}</span>
|
|
115
|
+
<el-icon color="#909399 " size="17" class="closed-icon" @click.stop="deleteNoticeInfoByNoticeIds(item)">
|
|
116
|
+
<CloseBold />
|
|
117
|
+
</el-icon>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="message-content"
|
|
120
|
+
:class="item.ifRead ? 'message-content-color-read' : 'message-content-color'">
|
|
121
|
+
{{ item.noticeContent }}
|
|
122
|
+
</div>
|
|
123
|
+
<div style="height: 24px;width: 100%;font-size: var(--font-size-description);" class="flex-between">
|
|
124
|
+
<div :class="item.ifRead ? 'noticeFoot-color-read' : 'noticeFoot-color'">{{ item.noticeTime ?
|
|
125
|
+
getTime(item.noticeTime) : '年月日' }}</div>
|
|
126
|
+
<el-button plain type="primary" size="small" class="export-btn" v-if="item.noticeType === 'file-notice'"
|
|
127
|
+
@click.stop="downloadHandler(item)"><span
|
|
128
|
+
style="font-size:var(--font-size-description)">去下载</span></el-button>
|
|
129
|
+
<el-button plain type="primary" size="small" class="export-btn" v-if="item.noticeType !== 'file-notice'"
|
|
130
|
+
@click.stop="messageItemHandler(item)"><span
|
|
131
|
+
style="font-size: var(--font-size-description)">查看详情</span></el-button>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="foot-text" v-if="ifText" v-loading="moreLoading">
|
|
136
|
+
<span class="foot-text-more" v-if="ifTextMore" @click="getMore">查看更多</span>
|
|
137
|
+
<span v-else>已经没有更多消息了</span>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
<div v-else
|
|
141
|
+
style="flex-grow: 1;display: flex;justify-content: center;align-items: center;flex-direction: column">
|
|
142
|
+
<img src="./message-icon/空状态.svg" width="320px" height="320px">
|
|
143
|
+
<div class="foot-text"><span>已经没有更多消息了</span></div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</transition>
|
|
147
|
+
</div>
|
|
148
|
+
</template>
|
|
149
|
+
|
|
150
|
+
<script setup lang="ts">
|
|
151
|
+
import { ref, watch, inject } from "vue";
|
|
152
|
+
import { ArrowDown, CloseBold } from '@element-plus/icons-vue'
|
|
153
|
+
import { NOTIFICATION_TYPE } from "./message-dictionary";
|
|
154
|
+
import NoticeController from "../../../api/notice/NoticeController";
|
|
155
|
+
import type NoticePageBO from "../../../api/notice/bo/NoticePageBO";
|
|
156
|
+
import type NoticeVO from "../../../api/notice/bo/NoticeVO";
|
|
157
|
+
import moment from "moment";
|
|
158
|
+
import { ElMessage } from "element-plus";
|
|
159
|
+
|
|
160
|
+
const emit = defineEmits<{
|
|
161
|
+
(e: 'close'): void
|
|
162
|
+
(e: 'update-count'): void
|
|
163
|
+
(e: 'navigate', notice: NoticeVO): void
|
|
164
|
+
(e: 'download', notice: NoticeVO): void
|
|
165
|
+
}>()
|
|
166
|
+
|
|
167
|
+
const formLoading = ref<boolean>(false)
|
|
168
|
+
const moreLoading = ref<boolean>(false)
|
|
169
|
+
const dialogVisible = ref<boolean>(false)
|
|
170
|
+
const notificationType = ref<string>('all')
|
|
171
|
+
const ifEmpty = ref<boolean>(false)
|
|
172
|
+
const ifText = ref<boolean>(false)
|
|
173
|
+
const ifTextMore = ref<boolean>(false)
|
|
174
|
+
const focusIcon = ref<boolean>(false)
|
|
175
|
+
|
|
176
|
+
/** 打开弹窗 */
|
|
177
|
+
const open = async () => {
|
|
178
|
+
formLoading.value = true
|
|
179
|
+
dialogVisible.value = true
|
|
180
|
+
resetForm()
|
|
181
|
+
await selectNoticePage()
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const handleScroll = async (e: any) => {}
|
|
185
|
+
|
|
186
|
+
/** 点击加载更多 */
|
|
187
|
+
const getMore = async () => {
|
|
188
|
+
if (total.value > noticePageBO.value.offset + 10) {
|
|
189
|
+
moreLoading.value = true
|
|
190
|
+
noticePageBO.value.offset += 10
|
|
191
|
+
await selectNoticePage()
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** 查询条件 */
|
|
196
|
+
const noticePageBO = ref<NoticePageBO>({
|
|
197
|
+
noticeType: '',
|
|
198
|
+
timeStamp: '',
|
|
199
|
+
offset: 0,
|
|
200
|
+
pageSize: 10,
|
|
201
|
+
pageNum: 1
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
/** 消息数组 */
|
|
205
|
+
const noticeVO = ref<NoticeVO[]>([])
|
|
206
|
+
const total = ref<number>(0)
|
|
207
|
+
|
|
208
|
+
/** 获得消息分页数组函数 */
|
|
209
|
+
const selectNoticePage = async () => {
|
|
210
|
+
noticePageBO.value.noticeType = notificationType.value
|
|
211
|
+
noticePageBO.value.timeStamp = moment.unix(moment().unix()).format("YYYY-MM-DD HH:mm:ss")
|
|
212
|
+
await NoticeController.selectNoticePage(noticePageBO.value).then(data => {
|
|
213
|
+
if (data.code === 200 && data.res) {
|
|
214
|
+
if (data.res.records) {
|
|
215
|
+
noticeVO.value.push(...data.res.records)
|
|
216
|
+
}
|
|
217
|
+
total.value = data.res.total
|
|
218
|
+
ifEmpty.value = noticeVO.value.length === 0
|
|
219
|
+
ifText.value = true
|
|
220
|
+
ifTextMore.value = total.value > noticePageBO.value.offset + 10
|
|
221
|
+
} else if (data.code === 200 && data.res === null) {
|
|
222
|
+
noticeVO.value = []
|
|
223
|
+
ifEmpty.value = true
|
|
224
|
+
ifText.value = true
|
|
225
|
+
ifTextMore.value = total.value > noticePageBO.value.offset + 10
|
|
226
|
+
}
|
|
227
|
+
}).finally(() => {
|
|
228
|
+
formLoading.value = false
|
|
229
|
+
moreLoading.value = false
|
|
230
|
+
})
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** 获得时间 */
|
|
234
|
+
const getTime = (dateString: string) => {
|
|
235
|
+
let date = new Date(dateString)
|
|
236
|
+
return date.getFullYear() + "年" +
|
|
237
|
+
("0" + (date.getMonth() + 1)).slice(-2) + "月" +
|
|
238
|
+
("0" + date.getDate()).slice(-2) + "日 " +
|
|
239
|
+
date.getHours() + ":" +
|
|
240
|
+
("0" + date.getMinutes()).slice(-2);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// 给整个文档添加点击事件监听器
|
|
244
|
+
document.addEventListener('mouseup', function (event: any) {
|
|
245
|
+
let target = event.target;
|
|
246
|
+
let closeDom = document.querySelectorAll('.el-notification__closeBtn')
|
|
247
|
+
if (closeDom) {
|
|
248
|
+
for (let i = 0; i < closeDom.length; i++) {
|
|
249
|
+
closeDom[i].id = 'el-notification__closeBtn'
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
while (target && target.id !== 'tourMessageId' && target.id !== 'selectType'
|
|
253
|
+
&& target.id !== 'el-notification__closeBtn'
|
|
254
|
+
&& target.id !== 'dropDownReadMenuItem' && target.id !== 'messageDrawer') {
|
|
255
|
+
target = target.parentNode;
|
|
256
|
+
}
|
|
257
|
+
if (!target) {
|
|
258
|
+
close()
|
|
259
|
+
}
|
|
260
|
+
}, true);
|
|
261
|
+
|
|
262
|
+
/** 修改消息类型函数*/
|
|
263
|
+
const messageSelectHandler = async () => {
|
|
264
|
+
noticePageBO.value.pageNum = 1
|
|
265
|
+
noticeVO.value = []
|
|
266
|
+
noticePageBO.value.offset = 0
|
|
267
|
+
ifText.value = false
|
|
268
|
+
formLoading.value = true
|
|
269
|
+
await selectNoticePage()
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** 删除单个消息函数*/
|
|
273
|
+
const deleteNoticeInfoByNoticeIds = (e: NoticeVO) => {
|
|
274
|
+
NoticeController.deleteNoticeInfoByNoticeIds([e.noticeId]).then(data => {
|
|
275
|
+
if (data.code === 200 && data) {
|
|
276
|
+
noticeVO.value = noticeVO.value.filter(item => item.noticeId !== e.noticeId)
|
|
277
|
+
noticePageBO.value.offset = noticePageBO.value.offset - 1
|
|
278
|
+
ifEmpty.value = noticeVO.value.length === 0 && !ifTextMore.value
|
|
279
|
+
emit('update-count')
|
|
280
|
+
}
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/** 标记所有为已读*/
|
|
285
|
+
const readNoticeHandler = async () => {
|
|
286
|
+
await NoticeController.readNoticeInfoByNoticeType(notificationType.value).then(async (data) => {
|
|
287
|
+
if (data.code === 200 && data) {
|
|
288
|
+
noticeVO.value = []
|
|
289
|
+
noticePageBO.value.pageNum = 1
|
|
290
|
+
noticePageBO.value.offset = 0
|
|
291
|
+
await selectNoticePage()
|
|
292
|
+
emit('update-count')
|
|
293
|
+
}
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** 删除所有已读通知*/
|
|
298
|
+
const deleteReadNoticeHandler = async () => {
|
|
299
|
+
await NoticeController.deleteReadNoticeInfoByNoticeType(notificationType.value).then(async (data) => {
|
|
300
|
+
if (data.code === 200 && data) {
|
|
301
|
+
ElMessage({ type: 'success', message: '删除成功' })
|
|
302
|
+
noticeVO.value = []
|
|
303
|
+
noticePageBO.value.pageNum = 1
|
|
304
|
+
noticePageBO.value.offset = 0
|
|
305
|
+
await selectNoticePage()
|
|
306
|
+
}
|
|
307
|
+
})
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** 点击跳转通知详情 - 通过事件通知 scm 处理路由跳转 */
|
|
311
|
+
const messageItemHandler = async (e: NoticeVO) => {
|
|
312
|
+
await NoticeController.readNoticeInfo(e.noticeId)
|
|
313
|
+
e.ifRead = true
|
|
314
|
+
if (e.noticeType === 'file-notice') {
|
|
315
|
+
emit('update-count')
|
|
316
|
+
return
|
|
317
|
+
}
|
|
318
|
+
emit('navigate', e)
|
|
319
|
+
emit('update-count')
|
|
320
|
+
close()
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** 文件下载 - 通过事件通知 scm 处理 */
|
|
324
|
+
const downloadHandler = async (e: NoticeVO) => {
|
|
325
|
+
if (!e.ifRead) {
|
|
326
|
+
e.ifRead = true
|
|
327
|
+
await NoticeController.readNoticeInfo(e.noticeId)
|
|
328
|
+
emit('update-count')
|
|
329
|
+
}
|
|
330
|
+
emit('download', e)
|
|
331
|
+
close()
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/** 表单重置 */
|
|
335
|
+
const resetForm = () => {
|
|
336
|
+
notificationType.value = 'all'
|
|
337
|
+
noticePageBO.value.pageNum = 1
|
|
338
|
+
noticePageBO.value.offset = 0
|
|
339
|
+
noticePageBO.value.timeStamp = ''
|
|
340
|
+
noticeVO.value = []
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** 抽屉关闭 */
|
|
344
|
+
const close = () => {
|
|
345
|
+
dialogVisible.value = false
|
|
346
|
+
emit('close')
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
defineExpose({ open, close })
|
|
350
|
+
|
|
351
|
+
/** 获得messageInfo - 外部注入新通知 */
|
|
352
|
+
let messageInfo = inject('messageInfo', ref<NoticeVO>({
|
|
353
|
+
noticeId: '',
|
|
354
|
+
noticeType: '',
|
|
355
|
+
noticeContent: '',
|
|
356
|
+
noticeTitle: '',
|
|
357
|
+
urlRoute: '',
|
|
358
|
+
ifRead: false,
|
|
359
|
+
noticeTime: ''
|
|
360
|
+
}))
|
|
361
|
+
|
|
362
|
+
watch(() => { return messageInfo.value }, (value) => {
|
|
363
|
+
if (messageInfo.value.noticeType === notificationType.value
|
|
364
|
+
|| notificationType.value === 'all' || notificationType.value === 'unread') {
|
|
365
|
+
noticeVO.value.unshift(messageInfo.value)
|
|
366
|
+
ifEmpty.value = noticeVO.value.length === 0
|
|
367
|
+
}
|
|
368
|
+
}, { immediate: true, deep: true })
|
|
369
|
+
</script>
|
|
370
|
+
|
|
371
|
+
<style scoped lang="scss">
|
|
372
|
+
.slide-left-enter-active,
|
|
373
|
+
.slide-left-leave-active {
|
|
374
|
+
transition: all 0.7s ease;
|
|
375
|
+
}
|
|
376
|
+
.slide-left-enter-from {
|
|
377
|
+
transform: translateX(100%);
|
|
378
|
+
}
|
|
379
|
+
.slide-left-leave-to {
|
|
380
|
+
transform: translateX(100%);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.flex-between {
|
|
384
|
+
display: flex;
|
|
385
|
+
justify-content: space-between;
|
|
386
|
+
align-items: center;
|
|
387
|
+
margin-bottom: 5px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.message-drawer {
|
|
391
|
+
background-color: var(--custom-theme-fill-7);
|
|
392
|
+
box-shadow: -1px 0px 4px 1px rgba(144, 147, 153, 0.2);
|
|
393
|
+
|
|
394
|
+
.title-wrapper {
|
|
395
|
+
padding: 10px;
|
|
396
|
+
display: flex;
|
|
397
|
+
justify-content: space-between;
|
|
398
|
+
align-items: center;
|
|
399
|
+
|
|
400
|
+
.msg-tittle {
|
|
401
|
+
font-size: var(--font-size-h1);
|
|
402
|
+
font-weight: bold;
|
|
403
|
+
color: var(--custom-theme-text-2)
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.menu-wrapper {
|
|
408
|
+
padding: 10px;
|
|
409
|
+
display: flex;
|
|
410
|
+
justify-content: space-between;
|
|
411
|
+
width: 100%;
|
|
412
|
+
border-bottom: var(--custom-theme-border-4) 1px solid;
|
|
413
|
+
flex-shrink: 0;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.list-wrapper {
|
|
417
|
+
display: flex;
|
|
418
|
+
flex-direction: column;
|
|
419
|
+
flex-grow: 1;
|
|
420
|
+
overflow: scroll;
|
|
421
|
+
box-sizing: border-box;
|
|
422
|
+
|
|
423
|
+
.message-item {
|
|
424
|
+
display: flex;
|
|
425
|
+
justify-content: flex-start;
|
|
426
|
+
padding: 10px;
|
|
427
|
+
border-bottom: var(--custom-theme-border-4) 1px solid;
|
|
428
|
+
|
|
429
|
+
.message-icon-blue,
|
|
430
|
+
.export-btn,
|
|
431
|
+
.closed-icon {
|
|
432
|
+
display: none;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.message-info {
|
|
436
|
+
margin-left: 5px;
|
|
437
|
+
display: inline-block;
|
|
438
|
+
width: calc(100% - 35px);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.message-content {
|
|
442
|
+
margin: 8px 0;
|
|
443
|
+
overflow: hidden;
|
|
444
|
+
text-overflow: ellipsis;
|
|
445
|
+
white-space: nowrap;
|
|
446
|
+
width: 100%;
|
|
447
|
+
font-size: var(--font-size-description);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.message-title {
|
|
451
|
+
overflow: hidden;
|
|
452
|
+
text-overflow: ellipsis;
|
|
453
|
+
white-space: nowrap;
|
|
454
|
+
width: 100%;
|
|
455
|
+
font-size: var(--font-size-body);
|
|
456
|
+
font-weight: bold;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.message-content-color {
|
|
460
|
+
color: var(--custom-theme-text-1);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.message-content-color-read {
|
|
464
|
+
color: var(--el-color-info);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.message-item:hover {
|
|
469
|
+
cursor: pointer;
|
|
470
|
+
}
|
|
471
|
+
.message-item:hover .message-icon {
|
|
472
|
+
display: none;
|
|
473
|
+
}
|
|
474
|
+
.message-item:hover .message-icon-blue {
|
|
475
|
+
display: block;
|
|
476
|
+
}
|
|
477
|
+
.message-item:hover .export-btn {
|
|
478
|
+
display: block;
|
|
479
|
+
}
|
|
480
|
+
.message-item:hover .closed-icon {
|
|
481
|
+
display: block;
|
|
482
|
+
}
|
|
483
|
+
.message-item:hover {
|
|
484
|
+
background-color: var(--custom-theme-fill-4);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.closed-dialog-icon:hover {
|
|
489
|
+
cursor: pointer;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.foot-text {
|
|
493
|
+
font-size: var(--font-size-body);
|
|
494
|
+
color: var(--custom-theme-info-normal);
|
|
495
|
+
display: flex;
|
|
496
|
+
justify-content: center;
|
|
497
|
+
margin: 10px 0
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.foot-text-more:hover {
|
|
501
|
+
cursor: pointer;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.noticeType-color {
|
|
505
|
+
color: var(--custom-theme-text-2);
|
|
506
|
+
}
|
|
507
|
+
.noticeType-color-read {
|
|
508
|
+
color: var(--custom-theme-text-4);
|
|
509
|
+
}
|
|
510
|
+
.noticeFoot-color {
|
|
511
|
+
color: var(--custom-theme-text-3);
|
|
512
|
+
}
|
|
513
|
+
.noticeFoot-color-read {
|
|
514
|
+
color: var(--custom-theme-text-5);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
</style>
|
|
518
|
+
<style lang="scss">
|
|
519
|
+
.message-drawer {
|
|
520
|
+
.el-drawer__header {
|
|
521
|
+
margin-bottom: 0;
|
|
522
|
+
border-bottom: var(--custom-theme-border-4) 1px solid;
|
|
523
|
+
padding-bottom: 5px
|
|
524
|
+
}
|
|
525
|
+
.el-drawer__body {
|
|
526
|
+
padding: 10px;
|
|
527
|
+
box-sizing: border-box;
|
|
528
|
+
display: flex;
|
|
529
|
+
flex-direction: column;
|
|
530
|
+
flex: 1;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
</style>
|