hrp-ui-base 1.4.7 → 1.4.8
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
package/src/utils/debounce.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 防抖(TS)
|
|
3
|
-
* @param fn 需要包装的函数
|
|
4
|
-
* @param delay 每次执行的等待时间-单位ms
|
|
5
|
-
* @param immediate 是否默认执行一次(第一次不延迟)
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* TS中的this单独在函数中使用却是大大受限制的
|
|
10
|
-
* 所以在TS中我们使用class来解决这一问题
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
// 定义类debounce
|
|
14
|
-
class debounce {
|
|
15
|
-
public use = (
|
|
16
|
-
fn: Function,
|
|
17
|
-
delay: number,
|
|
18
|
-
immediate: boolean = false
|
|
19
|
-
): Function => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
let timer: null | NodeJS.Timeout
|
|
22
|
-
return (...args: any) => {
|
|
23
|
-
if (immediate) {
|
|
24
|
-
fn.apply(this, args) // 确保引用函数的指向正确,并且函数的参数也不变
|
|
25
|
-
immediate = false
|
|
26
|
-
}
|
|
27
|
-
if (timer) clearTimeout(timer)
|
|
28
|
-
timer = setTimeout(() => {
|
|
29
|
-
fn.apply(this, args) // 确保引用函数的指向正确,并且函数的参数也不变
|
|
30
|
-
}, delay)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// 导出防抖函数
|
|
1
|
+
/**
|
|
2
|
+
* 防抖(TS)
|
|
3
|
+
* @param fn 需要包装的函数
|
|
4
|
+
* @param delay 每次执行的等待时间-单位ms
|
|
5
|
+
* @param immediate 是否默认执行一次(第一次不延迟)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* TS中的this单独在函数中使用却是大大受限制的
|
|
10
|
+
* 所以在TS中我们使用class来解决这一问题
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// 定义类debounce
|
|
14
|
+
class debounce {
|
|
15
|
+
public use = (
|
|
16
|
+
fn: Function,
|
|
17
|
+
delay: number,
|
|
18
|
+
immediate: boolean = false
|
|
19
|
+
): Function => {
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
let timer: null | NodeJS.Timeout
|
|
22
|
+
return (...args: any) => {
|
|
23
|
+
if (immediate) {
|
|
24
|
+
fn.apply(this, args) // 确保引用函数的指向正确,并且函数的参数也不变
|
|
25
|
+
immediate = false
|
|
26
|
+
}
|
|
27
|
+
if (timer) clearTimeout(timer)
|
|
28
|
+
timer = setTimeout(() => {
|
|
29
|
+
fn.apply(this, args) // 确保引用函数的指向正确,并且函数的参数也不变
|
|
30
|
+
}, delay)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 导出防抖函数
|
|
36
36
|
export default debounce
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { ElMessage } from "element-plus";
|
|
2
|
-
|
|
3
|
-
class debounceleading {
|
|
4
|
-
public use = (
|
|
5
|
-
fn: Function,
|
|
6
|
-
delay: number
|
|
7
|
-
): Function => {
|
|
8
|
-
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
9
|
-
let isFirstCall = true;
|
|
10
|
-
let startTime = 0;
|
|
11
|
-
|
|
12
|
-
return (...args: any[]) => {
|
|
13
|
-
if (isFirstCall) {
|
|
14
|
-
// 首次调用时,立即执行函数并记录时间
|
|
15
|
-
fn.apply(this, args);
|
|
16
|
-
startTime = Date.now();
|
|
17
|
-
isFirstCall = false;
|
|
18
|
-
} else {
|
|
19
|
-
// 如果有正在进行的延迟调用,清除它
|
|
20
|
-
if (timer) {
|
|
21
|
-
clearTimeout(timer);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// 判断是否在延迟时间内再次点击
|
|
25
|
-
const elapsedTime = Date.now() - startTime;
|
|
26
|
-
if (elapsedTime < delay) {
|
|
27
|
-
ElMessage({
|
|
28
|
-
message: "请不要频繁点击哦..",
|
|
29
|
-
type: "warning",
|
|
30
|
-
grouping: true,
|
|
31
|
-
});
|
|
32
|
-
} else {
|
|
33
|
-
// 如果超过了延迟时间,重新开始计时并执行函数
|
|
34
|
-
startTime = Date.now();
|
|
35
|
-
fn.apply(this, args);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// 设置新的延迟调用,以应对后续的快速点击
|
|
40
|
-
timer = setTimeout(() => {
|
|
41
|
-
timer = null;
|
|
42
|
-
isFirstCall = true; // 重置为首次调用状态,以便下次立即执行
|
|
43
|
-
}, delay);
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
// 导出节流函数
|
|
48
|
-
export default debounceleading;
|
|
1
|
+
import { ElMessage } from "element-plus";
|
|
2
|
+
|
|
3
|
+
class debounceleading {
|
|
4
|
+
public use = (
|
|
5
|
+
fn: Function,
|
|
6
|
+
delay: number
|
|
7
|
+
): Function => {
|
|
8
|
+
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
9
|
+
let isFirstCall = true;
|
|
10
|
+
let startTime = 0;
|
|
11
|
+
|
|
12
|
+
return (...args: any[]) => {
|
|
13
|
+
if (isFirstCall) {
|
|
14
|
+
// 首次调用时,立即执行函数并记录时间
|
|
15
|
+
fn.apply(this, args);
|
|
16
|
+
startTime = Date.now();
|
|
17
|
+
isFirstCall = false;
|
|
18
|
+
} else {
|
|
19
|
+
// 如果有正在进行的延迟调用,清除它
|
|
20
|
+
if (timer) {
|
|
21
|
+
clearTimeout(timer);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 判断是否在延迟时间内再次点击
|
|
25
|
+
const elapsedTime = Date.now() - startTime;
|
|
26
|
+
if (elapsedTime < delay) {
|
|
27
|
+
ElMessage({
|
|
28
|
+
message: "请不要频繁点击哦..",
|
|
29
|
+
type: "warning",
|
|
30
|
+
grouping: true,
|
|
31
|
+
});
|
|
32
|
+
} else {
|
|
33
|
+
// 如果超过了延迟时间,重新开始计时并执行函数
|
|
34
|
+
startTime = Date.now();
|
|
35
|
+
fn.apply(this, args);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 设置新的延迟调用,以应对后续的快速点击
|
|
40
|
+
timer = setTimeout(() => {
|
|
41
|
+
timer = null;
|
|
42
|
+
isFirstCall = true; // 重置为首次调用状态,以便下次立即执行
|
|
43
|
+
}, delay);
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// 导出节流函数
|
|
48
|
+
export default debounceleading;
|
package/src/utils/download.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
const download0 = (data: Blob, fileName: string, mineType: string) => {
|
|
2
|
-
// 创建 blob
|
|
3
|
-
const blob = new Blob([data], { type: mineType })
|
|
4
|
-
// 创建 href 超链接,点击进行下载
|
|
5
|
-
window.URL = window.URL || window.webkitURL
|
|
6
|
-
const href = URL.createObjectURL(blob)
|
|
7
|
-
const downA = document.createElement('a')
|
|
8
|
-
downA.href = href
|
|
9
|
-
downA.download = fileName
|
|
10
|
-
downA.click()
|
|
11
|
-
// 销毁超连接
|
|
12
|
-
window.URL.revokeObjectURL(href)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const download = {
|
|
16
|
-
// 下载 Excel 方法
|
|
17
|
-
excel: (data:any, fileName: string) => {
|
|
18
|
-
download0(data, fileName, 'application/vnd.ms-excel')
|
|
19
|
-
},
|
|
20
|
-
// 下载 Word 方法
|
|
21
|
-
word: (data: Blob, fileName: string) => {
|
|
22
|
-
download0(data, fileName, 'application/msword')
|
|
23
|
-
},
|
|
24
|
-
// 下载 Zip 方法
|
|
25
|
-
zip: (data: Blob, fileName: string) => {
|
|
26
|
-
download0(data, fileName, 'application/zip')
|
|
27
|
-
},
|
|
28
|
-
// 下载 Html 方法
|
|
29
|
-
html: (data: Blob, fileName: string) => {
|
|
30
|
-
download0(data, fileName, 'text/html')
|
|
31
|
-
},
|
|
32
|
-
// 下载 Markdown 方法
|
|
33
|
-
markdown: (data: Blob, fileName: string) => {
|
|
34
|
-
download0(data, fileName, 'text/markdown')
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default download
|
|
1
|
+
const download0 = (data: Blob, fileName: string, mineType: string) => {
|
|
2
|
+
// 创建 blob
|
|
3
|
+
const blob = new Blob([data], { type: mineType })
|
|
4
|
+
// 创建 href 超链接,点击进行下载
|
|
5
|
+
window.URL = window.URL || window.webkitURL
|
|
6
|
+
const href = URL.createObjectURL(blob)
|
|
7
|
+
const downA = document.createElement('a')
|
|
8
|
+
downA.href = href
|
|
9
|
+
downA.download = fileName
|
|
10
|
+
downA.click()
|
|
11
|
+
// 销毁超连接
|
|
12
|
+
window.URL.revokeObjectURL(href)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const download = {
|
|
16
|
+
// 下载 Excel 方法
|
|
17
|
+
excel: (data:any, fileName: string) => {
|
|
18
|
+
download0(data, fileName, 'application/vnd.ms-excel')
|
|
19
|
+
},
|
|
20
|
+
// 下载 Word 方法
|
|
21
|
+
word: (data: Blob, fileName: string) => {
|
|
22
|
+
download0(data, fileName, 'application/msword')
|
|
23
|
+
},
|
|
24
|
+
// 下载 Zip 方法
|
|
25
|
+
zip: (data: Blob, fileName: string) => {
|
|
26
|
+
download0(data, fileName, 'application/zip')
|
|
27
|
+
},
|
|
28
|
+
// 下载 Html 方法
|
|
29
|
+
html: (data: Blob, fileName: string) => {
|
|
30
|
+
download0(data, fileName, 'text/html')
|
|
31
|
+
},
|
|
32
|
+
// 下载 Markdown 方法
|
|
33
|
+
markdown: (data: Blob, fileName: string) => {
|
|
34
|
+
download0(data, fileName, 'text/markdown')
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default download
|
package/src/utils/exitLogin.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import qs from "qs";
|
|
2
|
-
|
|
3
|
-
import { ElMessageBox } from "element-plus";
|
|
4
|
-
import { debounce } from "lodash";
|
|
5
|
-
import { getLoginUrl } from "./login-path";
|
|
6
|
-
|
|
7
|
-
type RouterLike = {
|
|
8
|
-
currentRoute?: {
|
|
9
|
-
value?: {
|
|
10
|
-
fullPath?: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
let runtimeRouter: RouterLike | null = null;
|
|
16
|
-
|
|
17
|
-
export const setExitLoginRouter = (router: RouterLike | null) => {
|
|
18
|
-
runtimeRouter = router;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const getCurrentFullPath = () => {
|
|
22
|
-
return (
|
|
23
|
-
runtimeRouter?.currentRoute?.value?.fullPath ||
|
|
24
|
-
window.location.hash?.replace(/^#/, "") ||
|
|
25
|
-
window.location.pathname + window.location.search
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const remind = debounce(() => {
|
|
30
|
-
alert("登录失效,请重新登录");
|
|
31
|
-
}, 1000, { leading: true, trailing: false })
|
|
32
|
-
export default function exitLogin(clear?: number) {
|
|
33
|
-
localStorage.setItem("preRoute", getCurrentFullPath());
|
|
34
|
-
localStorage.setItem("toRouter", window.location.search);
|
|
35
|
-
let toRouter = localStorage.getItem("toRouter")
|
|
36
|
-
let currentRouterInfo: any = localStorage.getItem("currentRouterInfo");
|
|
37
|
-
localStorage.setItem("toRouterObject", currentRouterInfo)
|
|
38
|
-
|
|
39
|
-
/**传递参数clear == 1表示退出登录 未传代表401 */
|
|
40
|
-
if (clear && clear === 1) {
|
|
41
|
-
window.sessionStorage.clear()
|
|
42
|
-
window.localStorage.clear()
|
|
43
|
-
window.location.href = getLoginUrl(); // 去登录页
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
localStorage.setItem("toRouter", window.location.search);
|
|
48
|
-
let path = getCurrentFullPath();
|
|
49
|
-
sessionStorage.setItem("preRoute", path);
|
|
50
|
-
|
|
51
|
-
window.localStorage.removeItem('TOKEN')
|
|
52
|
-
window.localStorage.removeItem('clientId')
|
|
53
|
-
remind()
|
|
54
|
-
// 使用setTimeout确保alert完全显示后再跳转
|
|
55
|
-
setTimeout(() => {
|
|
56
|
-
window.location.href = getLoginUrl();
|
|
57
|
-
}, 100); // 100ms延迟足够确保alert显示
|
|
58
|
-
}
|
|
1
|
+
import qs from "qs";
|
|
2
|
+
|
|
3
|
+
import { ElMessageBox } from "element-plus";
|
|
4
|
+
import { debounce } from "lodash";
|
|
5
|
+
import { getLoginUrl } from "./login-path";
|
|
6
|
+
|
|
7
|
+
type RouterLike = {
|
|
8
|
+
currentRoute?: {
|
|
9
|
+
value?: {
|
|
10
|
+
fullPath?: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let runtimeRouter: RouterLike | null = null;
|
|
16
|
+
|
|
17
|
+
export const setExitLoginRouter = (router: RouterLike | null) => {
|
|
18
|
+
runtimeRouter = router;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const getCurrentFullPath = () => {
|
|
22
|
+
return (
|
|
23
|
+
runtimeRouter?.currentRoute?.value?.fullPath ||
|
|
24
|
+
window.location.hash?.replace(/^#/, "") ||
|
|
25
|
+
window.location.pathname + window.location.search
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const remind = debounce(() => {
|
|
30
|
+
alert("登录失效,请重新登录");
|
|
31
|
+
}, 1000, { leading: true, trailing: false })
|
|
32
|
+
export default function exitLogin(clear?: number) {
|
|
33
|
+
localStorage.setItem("preRoute", getCurrentFullPath());
|
|
34
|
+
localStorage.setItem("toRouter", window.location.search);
|
|
35
|
+
let toRouter = localStorage.getItem("toRouter")
|
|
36
|
+
let currentRouterInfo: any = localStorage.getItem("currentRouterInfo");
|
|
37
|
+
localStorage.setItem("toRouterObject", currentRouterInfo)
|
|
38
|
+
|
|
39
|
+
/**传递参数clear == 1表示退出登录 未传代表401 */
|
|
40
|
+
if (clear && clear === 1) {
|
|
41
|
+
window.sessionStorage.clear()
|
|
42
|
+
window.localStorage.clear()
|
|
43
|
+
window.location.href = getLoginUrl(); // 去登录页
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
localStorage.setItem("toRouter", window.location.search);
|
|
48
|
+
let path = getCurrentFullPath();
|
|
49
|
+
sessionStorage.setItem("preRoute", path);
|
|
50
|
+
|
|
51
|
+
window.localStorage.removeItem('TOKEN')
|
|
52
|
+
window.localStorage.removeItem('clientId')
|
|
53
|
+
remind()
|
|
54
|
+
// 使用setTimeout确保alert完全显示后再跳转
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
window.location.href = getLoginUrl();
|
|
57
|
+
}, 100); // 100ms延迟足够确保alert显示
|
|
58
|
+
}
|
package/src/utils/filter-key.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default function filterKey(list: any[], key: string | undefined, searchField: string) {
|
|
2
|
-
if (!key) return list.slice(); // 如果没有关键字,则返回整个列表
|
|
3
|
-
const reg = new RegExp(key.replace(/\s*/g, ''), 'ig');
|
|
4
|
-
return list.filter(item => item[searchField].match(reg) != null);
|
|
1
|
+
export default function filterKey(list: any[], key: string | undefined, searchField: string) {
|
|
2
|
+
if (!key) return list.slice(); // 如果没有关键字,则返回整个列表
|
|
3
|
+
const reg = new RegExp(key.replace(/\s*/g, ''), 'ig');
|
|
4
|
+
return list.filter(item => item[searchField].match(reg) != null);
|
|
5
5
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const formatterHandler = (val: string): string => {
|
|
2
|
-
// 首先移除所有负号
|
|
3
|
-
let result = val.replace(/-/g, '');
|
|
4
|
-
|
|
5
|
-
// 使用正则表达式限制最多两位小数
|
|
6
|
-
// 如果有小数点,且小数点后超过两位,则保留前两位小数
|
|
7
|
-
// 如果没有小数点或者小数点后不足两位,则不做处理
|
|
8
|
-
result = result.replace(/(\d+)(\.\d{2})\d*/, '$1$2');
|
|
9
|
-
|
|
10
|
-
return result;
|
|
11
|
-
};
|
|
12
|
-
|
|
1
|
+
const formatterHandler = (val: string): string => {
|
|
2
|
+
// 首先移除所有负号
|
|
3
|
+
let result = val.replace(/-/g, '');
|
|
4
|
+
|
|
5
|
+
// 使用正则表达式限制最多两位小数
|
|
6
|
+
// 如果有小数点,且小数点后超过两位,则保留前两位小数
|
|
7
|
+
// 如果没有小数点或者小数点后不足两位,则不做处理
|
|
8
|
+
result = result.replace(/(\d+)(\.\d{2})\d*/, '$1$2');
|
|
9
|
+
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
13
|
export default formatterHandler;
|
package/src/utils/get-dict.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import DictController from "hrp-ui-base/api/bms/dict/dict-controller";
|
|
2
|
-
import DictConfigBO from "hrp-ui-base/api/bms/dict/bo/DictConfigBO";
|
|
3
|
-
// 获取字典配置
|
|
4
|
-
export const getDictConfigs = async (
|
|
5
|
-
pageId: string,
|
|
6
|
-
fieldIds: string[],
|
|
7
|
-
fieldNames: string[]
|
|
8
|
-
): Promise<{
|
|
9
|
-
ifRequiredConfigs: Record<string, boolean>;
|
|
10
|
-
ifHideConfigs: Record<string, boolean>;
|
|
11
|
-
}> => {
|
|
12
|
-
const ifRequiredConfigs: Record<string, boolean> = {};
|
|
13
|
-
const ifHideConfigs: Record<string, boolean> = {};
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
for (const fieldId of fieldIds) {
|
|
17
|
-
const res = await DictController.getDictConfig(pageId, fieldId);
|
|
18
|
-
if (res.code === 200 && res.res) {
|
|
19
|
-
ifRequiredConfigs[fieldId] = !!res.res['ifRequired'];
|
|
20
|
-
ifHideConfigs[fieldId] = res.res['ifHide'] === 'hide'; // 将 "show" 或 "hide" 转换为布尔值
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
} catch (error) {
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return { ifRequiredConfigs, ifHideConfigs };
|
|
1
|
+
import DictController from "hrp-ui-base/api/bms/dict/dict-controller";
|
|
2
|
+
import DictConfigBO from "hrp-ui-base/api/bms/dict/bo/DictConfigBO";
|
|
3
|
+
// 获取字典配置
|
|
4
|
+
export const getDictConfigs = async (
|
|
5
|
+
pageId: string,
|
|
6
|
+
fieldIds: string[],
|
|
7
|
+
fieldNames: string[]
|
|
8
|
+
): Promise<{
|
|
9
|
+
ifRequiredConfigs: Record<string, boolean>;
|
|
10
|
+
ifHideConfigs: Record<string, boolean>;
|
|
11
|
+
}> => {
|
|
12
|
+
const ifRequiredConfigs: Record<string, boolean> = {};
|
|
13
|
+
const ifHideConfigs: Record<string, boolean> = {};
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
for (const fieldId of fieldIds) {
|
|
17
|
+
const res = await DictController.getDictConfig(pageId, fieldId);
|
|
18
|
+
if (res.code === 200 && res.res) {
|
|
19
|
+
ifRequiredConfigs[fieldId] = !!res.res['ifRequired'];
|
|
20
|
+
ifHideConfigs[fieldId] = res.res['ifHide'] === 'hide'; // 将 "show" 或 "hide" 转换为布尔值
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
} catch (error) {
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return { ifRequiredConfigs, ifHideConfigs };
|
|
27
27
|
};
|
package/src/utils/get-env.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
// 判断当前环境是否为手机 true 当前为移动端 false 当前是pc端
|
|
2
|
-
export const IsPhone = () => {
|
|
3
|
-
const userAgent = navigator.userAgent.toLowerCase();
|
|
4
|
-
// 移动端标识(兼容鸿蒙系统)
|
|
5
|
-
const mobileKeywords = [
|
|
6
|
-
'android',
|
|
7
|
-
'iphone',
|
|
8
|
-
'ipad',
|
|
9
|
-
'ipod',
|
|
10
|
-
'harmonyos', // 鸿蒙系统
|
|
11
|
-
'openharmony', // 开源鸿蒙
|
|
12
|
-
'huawei', // 华为设备
|
|
13
|
-
'honor', // 荣耀设备
|
|
14
|
-
'symbianos',
|
|
15
|
-
'windows phone',
|
|
16
|
-
'mobile',
|
|
17
|
-
'webos',
|
|
18
|
-
'blackberry',
|
|
19
|
-
'opera mini',
|
|
20
|
-
'opera mobi',
|
|
21
|
-
'iemobile',
|
|
22
|
-
'wpdesktop',
|
|
23
|
-
];
|
|
24
|
-
// 检查是否包含移动端关键词
|
|
25
|
-
const isMobileKeyword = mobileKeywords.some(keyword => userAgent.includes(keyword));
|
|
26
|
-
// // 额外检查:通过触摸点数量判断(移动设备通常支持触摸)
|
|
27
|
-
// const hasTouchScreen = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
28
|
-
// // 检查屏幕宽度(移动设备通常较窄)
|
|
29
|
-
// const isNarrowScreen = window.innerWidth <= 768;
|
|
30
|
-
|
|
31
|
-
return isMobileKeyword
|
|
32
|
-
}
|
|
33
|
-
// 判断当前环境是否为pc端 true 当前为pc端 false 当前是移动端
|
|
34
|
-
export const IsPc = () => {
|
|
35
|
-
return !IsPhone()
|
|
36
|
-
}
|
|
1
|
+
// 判断当前环境是否为手机 true 当前为移动端 false 当前是pc端
|
|
2
|
+
export const IsPhone = () => {
|
|
3
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
4
|
+
// 移动端标识(兼容鸿蒙系统)
|
|
5
|
+
const mobileKeywords = [
|
|
6
|
+
'android',
|
|
7
|
+
'iphone',
|
|
8
|
+
'ipad',
|
|
9
|
+
'ipod',
|
|
10
|
+
'harmonyos', // 鸿蒙系统
|
|
11
|
+
'openharmony', // 开源鸿蒙
|
|
12
|
+
'huawei', // 华为设备
|
|
13
|
+
'honor', // 荣耀设备
|
|
14
|
+
'symbianos',
|
|
15
|
+
'windows phone',
|
|
16
|
+
'mobile',
|
|
17
|
+
'webos',
|
|
18
|
+
'blackberry',
|
|
19
|
+
'opera mini',
|
|
20
|
+
'opera mobi',
|
|
21
|
+
'iemobile',
|
|
22
|
+
'wpdesktop',
|
|
23
|
+
];
|
|
24
|
+
// 检查是否包含移动端关键词
|
|
25
|
+
const isMobileKeyword = mobileKeywords.some(keyword => userAgent.includes(keyword));
|
|
26
|
+
// // 额外检查:通过触摸点数量判断(移动设备通常支持触摸)
|
|
27
|
+
// const hasTouchScreen = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
28
|
+
// // 检查屏幕宽度(移动设备通常较窄)
|
|
29
|
+
// const isNarrowScreen = window.innerWidth <= 768;
|
|
30
|
+
|
|
31
|
+
return isMobileKeyword
|
|
32
|
+
}
|
|
33
|
+
// 判断当前环境是否为pc端 true 当前为pc端 false 当前是移动端
|
|
34
|
+
export const IsPc = () => {
|
|
35
|
+
return !IsPhone()
|
|
36
|
+
}
|
package/src/utils/login-path.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
const subApps = [
|
|
2
|
-
"imd",
|
|
3
|
-
"agoal",
|
|
4
|
-
"scm",
|
|
5
|
-
"bms",
|
|
6
|
-
"coc",
|
|
7
|
-
"hws",
|
|
8
|
-
"fms",
|
|
9
|
-
"hrm",
|
|
10
|
-
"hrms",
|
|
11
|
-
"itrms",
|
|
12
|
-
"personalization",
|
|
13
|
-
"projectManagement",
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export const getEntryBasePath = () => {
|
|
17
|
-
const segments = window.location.pathname.replace(/\/$/, "").split("/");
|
|
18
|
-
const lastSegment = segments[segments.length - 1];
|
|
19
|
-
|
|
20
|
-
if (subApps.includes(lastSegment)) {
|
|
21
|
-
segments.pop();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const basePath = segments.join("/") || "/";
|
|
25
|
-
return window.location.origin + (basePath.endsWith("/") ? basePath : `${basePath}/`);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const getLoginUrl = (tenantHost?: string | null) => {
|
|
29
|
-
const loginUrl = `${getEntryBasePath()}login/index.html`;
|
|
30
|
-
return tenantHost ? `${loginUrl}?host=${encodeURIComponent(tenantHost)}` : loginUrl;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const getOaLoginUrl = (url: string) => {
|
|
34
|
-
return `${getEntryBasePath()}oa-login/index.html?url=${encodeURIComponent(url)}`;
|
|
35
|
-
};
|
|
1
|
+
const subApps = [
|
|
2
|
+
"imd",
|
|
3
|
+
"agoal",
|
|
4
|
+
"scm",
|
|
5
|
+
"bms",
|
|
6
|
+
"coc",
|
|
7
|
+
"hws",
|
|
8
|
+
"fms",
|
|
9
|
+
"hrm",
|
|
10
|
+
"hrms",
|
|
11
|
+
"itrms",
|
|
12
|
+
"personalization",
|
|
13
|
+
"projectManagement",
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export const getEntryBasePath = () => {
|
|
17
|
+
const segments = window.location.pathname.replace(/\/$/, "").split("/");
|
|
18
|
+
const lastSegment = segments[segments.length - 1];
|
|
19
|
+
|
|
20
|
+
if (subApps.includes(lastSegment)) {
|
|
21
|
+
segments.pop();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const basePath = segments.join("/") || "/";
|
|
25
|
+
return window.location.origin + (basePath.endsWith("/") ? basePath : `${basePath}/`);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const getLoginUrl = (tenantHost?: string | null) => {
|
|
29
|
+
const loginUrl = `${getEntryBasePath()}login/index.html`;
|
|
30
|
+
return tenantHost ? `${loginUrl}?host=${encodeURIComponent(tenantHost)}` : loginUrl;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const getOaLoginUrl = (url: string) => {
|
|
34
|
+
return `${getEntryBasePath()}oa-login/index.html?url=${encodeURIComponent(url)}`;
|
|
35
|
+
};
|
package/src/utils/path-utils.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取一级路径: 比如 /baidu/a/#dd 获取到 /baidu
|
|
3
|
-
* 主要用来切割路由让菜单自动选中
|
|
4
|
-
* @param path
|
|
5
|
-
*/
|
|
6
|
-
export function getFirstLevelPath (path:string):string{
|
|
7
|
-
if(path.indexOf("/")===0){
|
|
8
|
-
path=path.substring(1,path.length);
|
|
9
|
-
}
|
|
10
|
-
if(path.indexOf("/")>-1){
|
|
11
|
-
path=path.substring(0,path.indexOf("/"))
|
|
12
|
-
}
|
|
13
|
-
if(path.indexOf("?")>-1){
|
|
14
|
-
path=path.substring(0,path.indexOf("?"))
|
|
15
|
-
}
|
|
16
|
-
if(path.indexOf("#")>-1){
|
|
17
|
-
path=path.substring(0,path.indexOf("#"))
|
|
18
|
-
}
|
|
19
|
-
path="/"+path;
|
|
20
|
-
return path
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* 获取URl中的参数
|
|
25
|
-
* @param paramName 参数的名字
|
|
26
|
-
*/
|
|
27
|
-
export function getUrlParam(paramName: string): string | null {
|
|
28
|
-
const queryString = window.location.search;
|
|
29
|
-
const urlParams = new URLSearchParams(queryString);
|
|
30
|
-
return urlParams.get(paramName);
|
|
31
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 获取一级路径: 比如 /baidu/a/#dd 获取到 /baidu
|
|
3
|
+
* 主要用来切割路由让菜单自动选中
|
|
4
|
+
* @param path
|
|
5
|
+
*/
|
|
6
|
+
export function getFirstLevelPath (path:string):string{
|
|
7
|
+
if(path.indexOf("/")===0){
|
|
8
|
+
path=path.substring(1,path.length);
|
|
9
|
+
}
|
|
10
|
+
if(path.indexOf("/")>-1){
|
|
11
|
+
path=path.substring(0,path.indexOf("/"))
|
|
12
|
+
}
|
|
13
|
+
if(path.indexOf("?")>-1){
|
|
14
|
+
path=path.substring(0,path.indexOf("?"))
|
|
15
|
+
}
|
|
16
|
+
if(path.indexOf("#")>-1){
|
|
17
|
+
path=path.substring(0,path.indexOf("#"))
|
|
18
|
+
}
|
|
19
|
+
path="/"+path;
|
|
20
|
+
return path
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 获取URl中的参数
|
|
25
|
+
* @param paramName 参数的名字
|
|
26
|
+
*/
|
|
27
|
+
export function getUrlParam(paramName: string): string | null {
|
|
28
|
+
const queryString = window.location.search;
|
|
29
|
+
const urlParams = new URLSearchParams(queryString);
|
|
30
|
+
return urlParams.get(paramName);
|
|
31
|
+
}
|