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,800 +1,800 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @description: 附件上传组件
|
|
3
|
-
* @fileName: annex-upload-component.vue
|
|
4
|
-
* @author: huatuo
|
|
5
|
-
!-->
|
|
6
|
-
<template>
|
|
7
|
-
<div class="upload-attachments">
|
|
8
|
-
<!-- oss 上传 -->
|
|
9
|
-
<el-upload
|
|
10
|
-
class="fzile-uploader"
|
|
11
|
-
ref="upload"
|
|
12
|
-
v-model:file-list="fileList"
|
|
13
|
-
:auto-upload="true"
|
|
14
|
-
accept=".docx,.doc,.xls,.xlsx,.jpg,.pdf,.png,.bmp,.ppt,.pptx,.jpeg,.tiff,.raw,.heif,.gif,.mp3,.mp4,.rar,.zip,.7z,.wps,.DOCX,.DOC,.XLS,.XLSX,.JPG,.PDF,.PNG,.BMP,.PPT,.PPTX,.JPEG,.TIFF,.RAW,.HEIF,.GIF,.MP3,.MP4,.dcm,.DCM,.RAR,.ZIP,.7Z,.WPS"
|
|
15
|
-
:before-upload="beforeUploadOSS"
|
|
16
|
-
:action="uploadUrl"
|
|
17
|
-
:show-file-list="false"
|
|
18
|
-
:data="{ pageId: props.pageId }"
|
|
19
|
-
list-type="picture"
|
|
20
|
-
:on-exceed="handleExceed"
|
|
21
|
-
:limit="props.limited"
|
|
22
|
-
v-if="props.formType != 'detail'"
|
|
23
|
-
:headers="ossHeader"
|
|
24
|
-
size="large"
|
|
25
|
-
:disabled="props.loading"
|
|
26
|
-
:http-request="uploadFileOSS"
|
|
27
|
-
multiple
|
|
28
|
-
>
|
|
29
|
-
<el-button
|
|
30
|
-
type="primary"
|
|
31
|
-
text
|
|
32
|
-
bg
|
|
33
|
-
icon="Upload"
|
|
34
|
-
style="font-size: var(--font-size-body)"
|
|
35
|
-
size="large"
|
|
36
|
-
>上传附件</el-button
|
|
37
|
-
>
|
|
38
|
-
<template #tip>
|
|
39
|
-
<div class="el-upload__tip">
|
|
40
|
-
附件上限数量{{ props.limited }}个,单次最多选择{{
|
|
41
|
-
props.limited
|
|
42
|
-
}}个,单文件大小不超过{{ MAX_FILE_SIZE_MB }}MB
|
|
43
|
-
且附件上传格式仅限docx、doc、wps、xls、xlsx、jpg、pdf、png、bmp、ppt、pptx、jpeg、raw、heif、tiff、gif、mp3、mp4、rar、zip、7z。
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
46
|
-
</el-upload>
|
|
47
|
-
|
|
48
|
-
<div class="file-list-box flex-row-start">
|
|
49
|
-
<div
|
|
50
|
-
class="file-out-box"
|
|
51
|
-
v-for="(item, index) in sendFileList"
|
|
52
|
-
:key="index"
|
|
53
|
-
@click.stop="previewFile(item, index)"
|
|
54
|
-
>
|
|
55
|
-
<div class="file-list-item flex-row-between">
|
|
56
|
-
<div class="flex-row-start file-list-item-left">
|
|
57
|
-
<el-image
|
|
58
|
-
class="file-list-item-icon"
|
|
59
|
-
:src="item.url"
|
|
60
|
-
:zoom-rate="1.2"
|
|
61
|
-
:initial-index="0"
|
|
62
|
-
fit="cover"
|
|
63
|
-
preview-teleported="true"
|
|
64
|
-
@error="handleImageError"
|
|
65
|
-
@load="handleImageLoad"
|
|
66
|
-
v-loading="submitLoading"
|
|
67
|
-
v-if="
|
|
68
|
-
getFileType(item.url) === 'jpg' ||
|
|
69
|
-
getFileType(item.url) === 'png' ||
|
|
70
|
-
getFileType(item.url) === 'bmp' ||
|
|
71
|
-
getFileType(item.url) === 'jpeg' ||
|
|
72
|
-
getFileType(item.url) === 'raw' ||
|
|
73
|
-
getFileType(item.url) === 'heif' ||
|
|
74
|
-
getFileType(item.url) === 'tiff' ||
|
|
75
|
-
getFileType(item.url) === 'gif'
|
|
76
|
-
"
|
|
77
|
-
>
|
|
78
|
-
<template #error>
|
|
79
|
-
<img src="./assets/other.svg" class="file-icon" />
|
|
80
|
-
</template>
|
|
81
|
-
</el-image>
|
|
82
|
-
<div v-else class="file-list-item-icon">
|
|
83
|
-
<img
|
|
84
|
-
src="./assets/pdf.svg"
|
|
85
|
-
v-if="getFileType(item.url) === 'pdf'"
|
|
86
|
-
class="file-icon"
|
|
87
|
-
/>
|
|
88
|
-
<img
|
|
89
|
-
src="./assets/word.svg"
|
|
90
|
-
v-else-if="
|
|
91
|
-
getFileType(item.url) === 'docx' ||
|
|
92
|
-
getFileType(item.url) === 'doc'
|
|
93
|
-
"
|
|
94
|
-
class="file-icon"
|
|
95
|
-
/>
|
|
96
|
-
<img
|
|
97
|
-
src="./assets/mp3.svg"
|
|
98
|
-
v-else-if="getFileType(item.url) === 'mp3'"
|
|
99
|
-
class="file-icon"
|
|
100
|
-
/>
|
|
101
|
-
<img
|
|
102
|
-
src="./assets/mp4.svg"
|
|
103
|
-
v-else-if="getFileType(item.url) === 'mp4'"
|
|
104
|
-
class="file-icon"
|
|
105
|
-
/>
|
|
106
|
-
<img
|
|
107
|
-
src="./assets/xls.svg"
|
|
108
|
-
v-else-if="
|
|
109
|
-
getFileType(item.url) === 'xls' ||
|
|
110
|
-
getFileType(item.url) === 'xlsx'
|
|
111
|
-
"
|
|
112
|
-
class="file-icon"
|
|
113
|
-
/>
|
|
114
|
-
<img
|
|
115
|
-
src="./assets/ppt.svg"
|
|
116
|
-
v-else-if="
|
|
117
|
-
getFileType(item.url) === 'ppt' ||
|
|
118
|
-
getFileType(item.url) === 'pptx'
|
|
119
|
-
"
|
|
120
|
-
class="file-icon"
|
|
121
|
-
/>
|
|
122
|
-
<img src="./assets/other.svg" v-else class="file-icon" />
|
|
123
|
-
</div>
|
|
124
|
-
<div
|
|
125
|
-
class="flex-column-around file-name-box"
|
|
126
|
-
style="align-items: flex-start"
|
|
127
|
-
>
|
|
128
|
-
<el-tooltip effect="dark" :content="item.fileName">
|
|
129
|
-
<div class="file-name">{{ item.fileName }}</div>
|
|
130
|
-
</el-tooltip>
|
|
131
|
-
<div class="file-size">{{ item.fileSize || "--" }}</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
<div class="flex-column-around file-list-item-right">
|
|
135
|
-
<img
|
|
136
|
-
src="./assets/preview.svg"
|
|
137
|
-
alt=""
|
|
138
|
-
class="file-preview"
|
|
139
|
-
@click.stop="previewFile(item, index)"
|
|
140
|
-
/>
|
|
141
|
-
|
|
142
|
-
<img
|
|
143
|
-
src="./assets/download.svg"
|
|
144
|
-
alt=""
|
|
145
|
-
class="file-download"
|
|
146
|
-
@click.stop="downloadFile(item)"
|
|
147
|
-
v-if="props.allowDownload"
|
|
148
|
-
/>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
<div
|
|
152
|
-
class="delete-box"
|
|
153
|
-
@click.stop="deleteUploadItem(item, index)"
|
|
154
|
-
v-if="props.formType != 'detail'"
|
|
155
|
-
>
|
|
156
|
-
<div class="table-delete">
|
|
157
|
-
<img
|
|
158
|
-
src="../../assets/table-delete/table-delete.svg"
|
|
159
|
-
alt="删除"
|
|
160
|
-
width="25"
|
|
161
|
-
height="25"
|
|
162
|
-
/>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
166
|
-
<div
|
|
167
|
-
class="notData"
|
|
168
|
-
v-if="
|
|
169
|
-
props.formType == 'detail' &&
|
|
170
|
-
!(
|
|
171
|
-
sendFileList &&
|
|
172
|
-
Array.isArray(sendFileList) &&
|
|
173
|
-
sendFileList.length > 0
|
|
174
|
-
)
|
|
175
|
-
"
|
|
176
|
-
>
|
|
177
|
-
暂无附件
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
<!-- 专门用来预览的组件 -->
|
|
181
|
-
<el-image
|
|
182
|
-
style="display: none"
|
|
183
|
-
ref="previewImgRef"
|
|
184
|
-
:src="perviewImg.url"
|
|
185
|
-
:preview-src-list="perviewImg.srcList"
|
|
186
|
-
preview-teleported="true"
|
|
187
|
-
id="previewImgId"
|
|
188
|
-
@close="handleClosePreview"
|
|
189
|
-
>
|
|
190
|
-
</el-image>
|
|
191
|
-
<!-- 预览mp3,mp4 -->
|
|
192
|
-
<PreviewMp ref="previewMpRef"></PreviewMp>
|
|
193
|
-
</div>
|
|
194
|
-
</template>
|
|
195
|
-
|
|
196
|
-
<script setup lang="ts">
|
|
197
|
-
import { ref, reactive, watch, onMounted, PropType, nextTick } from "vue";
|
|
198
|
-
import OSS from "ali-oss";
|
|
199
|
-
import {
|
|
200
|
-
type UploadFile,
|
|
201
|
-
type UploadFiles,
|
|
202
|
-
type TabsPaneContext,
|
|
203
|
-
type UploadUserFile,
|
|
204
|
-
type UploadProps,
|
|
205
|
-
type ElMessageBox,
|
|
206
|
-
ElMessage,
|
|
207
|
-
} from "element-plus";
|
|
208
|
-
import moment from "moment";
|
|
209
|
-
import axios from "axios";
|
|
210
|
-
import { getFileType, ddWindowOpen } from "hrp-ui-base";
|
|
211
|
-
import dd from "dingtalk-jsapi";
|
|
212
|
-
import PreviewMp from "./modules/previewMp.vue";
|
|
213
|
-
// getUploadFileMsg
|
|
214
|
-
import FileUploadController from "hrp-ui-base/api/bms/file/FileUploadController";
|
|
215
|
-
import StsTokenVO from "hrp-ui-base/api/bms/file/bo/StsTokenVO";
|
|
216
|
-
import FileBaseInfo from "hrp-ui-base/api/bms/file/bo/FileBaseInfo";
|
|
217
|
-
import FileUrlVO from "hrp-ui-base/api/bms/file/bo/FileUrlVO";
|
|
218
|
-
import { downloadFile} from "hrp-ui-base";
|
|
219
|
-
|
|
220
|
-
const props = defineProps({
|
|
221
|
-
// 选择了那些审批人 具体的人名
|
|
222
|
-
type: {
|
|
223
|
-
type: String as PropType<"oss" | "minio">,
|
|
224
|
-
default: "oss",
|
|
225
|
-
require: true,
|
|
226
|
-
},
|
|
227
|
-
// 页面id
|
|
228
|
-
pageId: {
|
|
229
|
-
type: String,
|
|
230
|
-
default: "",
|
|
231
|
-
require: true,
|
|
232
|
-
},
|
|
233
|
-
// formType 页面类型
|
|
234
|
-
formType: {
|
|
235
|
-
type: String as PropType<"add" | "edit" | "detail">,
|
|
236
|
-
default: "add",
|
|
237
|
-
require: true,
|
|
238
|
-
},
|
|
239
|
-
// 默认的文件列表
|
|
240
|
-
fileDetailList: {
|
|
241
|
-
type: Array as PropType<any[]>,
|
|
242
|
-
default: false,
|
|
243
|
-
require: false,
|
|
244
|
-
},
|
|
245
|
-
// 页面的loading,由外部控制内部的loading
|
|
246
|
-
loading: {
|
|
247
|
-
type: Boolean,
|
|
248
|
-
require: true,
|
|
249
|
-
default: false,
|
|
250
|
-
},
|
|
251
|
-
keyForReturn: {
|
|
252
|
-
type: Number,
|
|
253
|
-
require: true,
|
|
254
|
-
default: "",
|
|
255
|
-
},
|
|
256
|
-
limited: {
|
|
257
|
-
type: Number,
|
|
258
|
-
require: true,
|
|
259
|
-
default: 9,
|
|
260
|
-
},
|
|
261
|
-
// 是否允许下载附件
|
|
262
|
-
allowDownload: {
|
|
263
|
-
type: Boolean,
|
|
264
|
-
require: false,
|
|
265
|
-
default: true,
|
|
266
|
-
},
|
|
267
|
-
});
|
|
268
|
-
const emits = defineEmits(["getUploadIds", "getUploadInfo", "changeLoading"]);
|
|
269
|
-
const token = localStorage.getItem("TOKEN");
|
|
270
|
-
const uploadUrl =
|
|
271
|
-
window.location.origin + window.location.pathname + "api/bms/file/upload";
|
|
272
|
-
const MAX_FILE_SIZE_MB = 50;
|
|
273
|
-
const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;
|
|
274
|
-
const minioHeader = ref({ "Authorization-Token": token });
|
|
275
|
-
const ossHeader = ref({
|
|
276
|
-
// 指定该Object被下载时的网页缓存行为。
|
|
277
|
-
"Cache-Control": "no-cache",
|
|
278
|
-
// 指定该Object被下载时的名称。
|
|
279
|
-
"Content-Disposition": "example.txt",
|
|
280
|
-
// 指定该Object被下载时的内容编码格式。
|
|
281
|
-
"Content-Encoding": "utf-8",
|
|
282
|
-
// 指定过期时间,单位为毫秒。
|
|
283
|
-
Expires: "1000",
|
|
284
|
-
// 指定Object的存储类型。
|
|
285
|
-
"x-oss-storage-class": "Standard",
|
|
286
|
-
// 指定Object标签,可同时设置多个标签。
|
|
287
|
-
"x-oss-tagging": "Tag1=1&Tag2=2",
|
|
288
|
-
// 指定初始化分片上传时是否覆盖同名Object。此处设置为true,表示禁止覆盖同名Object。
|
|
289
|
-
"x-oss-forbid-overwrite": "true",
|
|
290
|
-
});
|
|
291
|
-
const uploadFilesIds = ref<string[]>([]);
|
|
292
|
-
const fileInfoList = ref<any[]>([]);
|
|
293
|
-
|
|
294
|
-
const handleClosePreview = () => {
|
|
295
|
-
perviewImg.value.url = "";
|
|
296
|
-
perviewImg.value.srcList = [];
|
|
297
|
-
};
|
|
298
|
-
const submitLoading = ref<boolean>(false);
|
|
299
|
-
// 上传附件
|
|
300
|
-
const fileList = ref<UploadUserFile[]>([]);
|
|
301
|
-
const fileName = ref<string>("");
|
|
302
|
-
const beforeUploadOSS = async (e: any) => {
|
|
303
|
-
changeLoadingStatus(true);
|
|
304
|
-
const isFileSizeValid = e.size <= MAX_FILE_SIZE_BYTES;
|
|
305
|
-
if (!isFileSizeValid) {
|
|
306
|
-
changeLoadingStatus(false);
|
|
307
|
-
ElMessage.error(`上传文件大小不能超过 ${MAX_FILE_SIZE_MB}MB!`);
|
|
308
|
-
return false;
|
|
309
|
-
}
|
|
310
|
-
fileName.value = e.name;
|
|
311
|
-
// if (props.type === 'oss') {
|
|
312
|
-
|
|
313
|
-
// await getOSSOption(e.name)
|
|
314
|
-
// }
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
/** oss 上传方法 */
|
|
318
|
-
const uploadFileOSS = async (uploadMsg: any) => {
|
|
319
|
-
try {
|
|
320
|
-
console.log(uploadMsg);
|
|
321
|
-
const fileOBJ = uploadMsg.file;
|
|
322
|
-
FileUploadController.upload(fileOBJ, props.pageId)
|
|
323
|
-
.then((data) => {
|
|
324
|
-
if (data.code === 200 && data.res) {
|
|
325
|
-
sendFileList.value.push(data.res);
|
|
326
|
-
emits(
|
|
327
|
-
"getUploadIds",
|
|
328
|
-
sendFileList.value.map((item) => {
|
|
329
|
-
return item.fileId;
|
|
330
|
-
}),
|
|
331
|
-
props.keyForReturn
|
|
332
|
-
);
|
|
333
|
-
emits(
|
|
334
|
-
"getUploadInfo",
|
|
335
|
-
sendFileList.value.map((item) => {
|
|
336
|
-
return item;
|
|
337
|
-
}),
|
|
338
|
-
props.keyForReturn
|
|
339
|
-
);
|
|
340
|
-
} else {
|
|
341
|
-
ElMessage.error("数据发生错误,请重新上传!");
|
|
342
|
-
}
|
|
343
|
-
})
|
|
344
|
-
.catch((err) => {
|
|
345
|
-
ElMessage.error("数据发生错误,请重试!");
|
|
346
|
-
})
|
|
347
|
-
.finally(() => {
|
|
348
|
-
changeLoadingStatus(false);
|
|
349
|
-
});
|
|
350
|
-
} catch (err) {
|
|
351
|
-
console.debug(err);
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
const ossClient = ref();
|
|
355
|
-
const handleImageLoad = () => {
|
|
356
|
-
changeLoadingStatus(false);
|
|
357
|
-
};
|
|
358
|
-
const handleImageError = () => {
|
|
359
|
-
changeLoadingStatus(false);
|
|
360
|
-
};
|
|
361
|
-
const handleExceed = (e: any) => {
|
|
362
|
-
ElMessage({
|
|
363
|
-
message: `最多上传${props.limited}个文件!`,
|
|
364
|
-
type: "error",
|
|
365
|
-
});
|
|
366
|
-
};
|
|
367
|
-
const sendFileList = ref<Array<FileBaseInfo>>([]);
|
|
368
|
-
/** 删除 */
|
|
369
|
-
const deleteUploadItem = (item: any, index: any) => {
|
|
370
|
-
sendFileList.value.splice(index, 1);
|
|
371
|
-
fileList.value = JSON.parse(JSON.stringify(sendFileList.value));
|
|
372
|
-
emits(
|
|
373
|
-
"getUploadIds",
|
|
374
|
-
sendFileList.value.map((item) => {
|
|
375
|
-
return item.fileId;
|
|
376
|
-
}),
|
|
377
|
-
props.keyForReturn
|
|
378
|
-
);
|
|
379
|
-
emits(
|
|
380
|
-
"getUploadInfo",
|
|
381
|
-
sendFileList.value.map((item) => {
|
|
382
|
-
return item;
|
|
383
|
-
}),
|
|
384
|
-
props.keyForReturn
|
|
385
|
-
);
|
|
386
|
-
};
|
|
387
|
-
watch(
|
|
388
|
-
() => {
|
|
389
|
-
return props.fileDetailList;
|
|
390
|
-
},
|
|
391
|
-
() => {
|
|
392
|
-
if (props.fileDetailList && Array.isArray(props.fileDetailList)) {
|
|
393
|
-
sendFileList.value = props.fileDetailList;
|
|
394
|
-
fileList.value = JSON.parse(JSON.stringify(sendFileList.value));
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
{ deep: true, immediate: true }
|
|
398
|
-
);
|
|
399
|
-
|
|
400
|
-
/** 上传中 */
|
|
401
|
-
const handleUploadProgress = () => {
|
|
402
|
-
emits("changeLoading", true);
|
|
403
|
-
};
|
|
404
|
-
/** 上传失败 */
|
|
405
|
-
const handleUploadError = (err: any) => {
|
|
406
|
-
ElMessage({
|
|
407
|
-
message: "上传失败!",
|
|
408
|
-
type: "error",
|
|
409
|
-
});
|
|
410
|
-
changeLoadingStatus(false);
|
|
411
|
-
};
|
|
412
|
-
const changeLoadingStatus = (status: boolean) => {
|
|
413
|
-
emits("changeLoading", status);
|
|
414
|
-
submitLoading.value = status;
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
//清空图片列表
|
|
418
|
-
const clearFileList = () => {
|
|
419
|
-
sendFileList.value = [];
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
/** 上传的方式 */
|
|
423
|
-
onMounted(() => {
|
|
424
|
-
// if (!props.type) {
|
|
425
|
-
// ElMessage.error('配置错误,无法确定上传方式')
|
|
426
|
-
// }
|
|
427
|
-
});
|
|
428
|
-
const ossName = ref<string>("");
|
|
429
|
-
const stsToken = ref<StsTokenVO>(new StsTokenVO());
|
|
430
|
-
|
|
431
|
-
/** 获取minio 上传地址 */
|
|
432
|
-
const minioOption = ref<FileUrlVO>(new FileUrlVO());
|
|
433
|
-
const getMinioUploadUrl = async (fileName: string) => {
|
|
434
|
-
await FileUploadController.getUploadUrl(props.pageId, fileName).then(
|
|
435
|
-
(data) => {
|
|
436
|
-
if (data.code === 200 && data.res) {
|
|
437
|
-
minioOption.value = data.res;
|
|
438
|
-
} else {
|
|
439
|
-
ElMessage.error("获取上传路径失败!");
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
);
|
|
443
|
-
};
|
|
444
|
-
/** minio 上传方法 */
|
|
445
|
-
const uploadFileMinio = async (uploadMsg: any) => {
|
|
446
|
-
console.debug(uploadMsg);
|
|
447
|
-
if (minioOption.value) {
|
|
448
|
-
try {
|
|
449
|
-
const options = {
|
|
450
|
-
mime: "json",
|
|
451
|
-
headers: { "Content-Type": "text/plain" },
|
|
452
|
-
};
|
|
453
|
-
const data = uploadMsg.file;
|
|
454
|
-
// console.error(data)
|
|
455
|
-
let config = { "Content-Type": uploadMsg.file.type };
|
|
456
|
-
// // 分片上传。
|
|
457
|
-
axiosPost("put", minioOption.value.policyUrl, uploadMsg.file, config)
|
|
458
|
-
.then(function (res) {
|
|
459
|
-
setTimeout(() => {
|
|
460
|
-
/** 上传成功 ,去请求接口查询上传的内容*/
|
|
461
|
-
FileUploadController.checkFileUpload(
|
|
462
|
-
minioOption.value.fileId ? minioOption.value.fileId : ""
|
|
463
|
-
)
|
|
464
|
-
.then((data) => {
|
|
465
|
-
if (data.code == 200) {
|
|
466
|
-
FileUploadController.getMinioFileUrl(
|
|
467
|
-
minioOption.value.fileId ? minioOption.value.fileId : ""
|
|
468
|
-
)
|
|
469
|
-
.then((data) => {
|
|
470
|
-
if (data.code === 200 && data.res) {
|
|
471
|
-
sendFileList.value.push(data.res);
|
|
472
|
-
ElMessage.success("上传成功!");
|
|
473
|
-
emits(
|
|
474
|
-
"getUploadIds",
|
|
475
|
-
sendFileList.value.map((item) => {
|
|
476
|
-
return item.fileId;
|
|
477
|
-
}),
|
|
478
|
-
props.keyForReturn
|
|
479
|
-
);
|
|
480
|
-
emits(
|
|
481
|
-
"getUploadInfo",
|
|
482
|
-
sendFileList.value.map((item) => {
|
|
483
|
-
return item;
|
|
484
|
-
}),
|
|
485
|
-
props.keyForReturn
|
|
486
|
-
);
|
|
487
|
-
}
|
|
488
|
-
})
|
|
489
|
-
.finally(() => {
|
|
490
|
-
changeLoadingStatus(false);
|
|
491
|
-
});
|
|
492
|
-
} else {
|
|
493
|
-
ElMessage.error("上传失败,请重新上传!");
|
|
494
|
-
changeLoadingStatus(false);
|
|
495
|
-
}
|
|
496
|
-
})
|
|
497
|
-
.catch(() => {
|
|
498
|
-
ElMessage.error("上传失败,请重新上传!");
|
|
499
|
-
changeLoadingStatus(false);
|
|
500
|
-
});
|
|
501
|
-
}, 1000);
|
|
502
|
-
})
|
|
503
|
-
.catch(() => {
|
|
504
|
-
ElMessage.error("上传失败,请重新上传!");
|
|
505
|
-
changeLoadingStatus(false);
|
|
506
|
-
});
|
|
507
|
-
} catch (err) {
|
|
508
|
-
console.debug(err);
|
|
509
|
-
}
|
|
510
|
-
} else {
|
|
511
|
-
ElMessage.error("数据发生错误,请重新上传!");
|
|
512
|
-
}
|
|
513
|
-
};
|
|
514
|
-
function axiosPost(method: string, url: string, data: any, config: any) {
|
|
515
|
-
let result = axios({
|
|
516
|
-
method: method,
|
|
517
|
-
url: url,
|
|
518
|
-
data: data,
|
|
519
|
-
headers: config,
|
|
520
|
-
})
|
|
521
|
-
.then((resp) => {
|
|
522
|
-
return resp;
|
|
523
|
-
})
|
|
524
|
-
.catch((error) => {
|
|
525
|
-
return "exception=" + error;
|
|
526
|
-
});
|
|
527
|
-
return result;
|
|
528
|
-
}
|
|
529
|
-
/** 预览文件 */
|
|
530
|
-
const previewFile = async (item: FileBaseInfo, index: number) => {
|
|
531
|
-
if (
|
|
532
|
-
getFileType(item.url) === "jpg" ||
|
|
533
|
-
getFileType(item.url) === "png" ||
|
|
534
|
-
getFileType(item.url) === "bmp" ||
|
|
535
|
-
getFileType(item.url) === "jpeg" ||
|
|
536
|
-
getFileType(item.url) === "raw" ||
|
|
537
|
-
getFileType(item.url) === "heif" ||
|
|
538
|
-
getFileType(item.url) === "tiff" ||
|
|
539
|
-
getFileType(item.url) === "gif"
|
|
540
|
-
) {
|
|
541
|
-
// 图片的情况
|
|
542
|
-
perviewImg.value.url = item.url;
|
|
543
|
-
perviewImg.value.srcList = [item.url];
|
|
544
|
-
nextTick(() => {
|
|
545
|
-
previewImgRef.value?.showPreview();
|
|
546
|
-
});
|
|
547
|
-
} else if (getFileType(item.url) === "mp3") {
|
|
548
|
-
// mp3的情况
|
|
549
|
-
previewMpRef.value?.open("mp3", item);
|
|
550
|
-
} else if (getFileType(item.url) === "mp4") {
|
|
551
|
-
// mp4的情况
|
|
552
|
-
previewMpRef.value?.open("mp4", item);
|
|
553
|
-
} else if (
|
|
554
|
-
getFileType(item.url) === "zip" ||
|
|
555
|
-
getFileType(item.url) === "7z" ||
|
|
556
|
-
getFileType(item.url) === "rar"
|
|
557
|
-
) {
|
|
558
|
-
downloadFile(item);
|
|
559
|
-
} else {
|
|
560
|
-
try {
|
|
561
|
-
let currentUserConfig = sessionStorage.getItem("userConfig")
|
|
562
|
-
? JSON.parse(sessionStorage.getItem("userConfig") as string)
|
|
563
|
-
: null;
|
|
564
|
-
if (currentUserConfig && currentUserConfig.fileUploadType === "oss") {
|
|
565
|
-
// 文档的情况
|
|
566
|
-
await FileUploadController.getFilePreview(item.fileId).then((data) => {
|
|
567
|
-
if (data.code == 200 && data.res) {
|
|
568
|
-
ddWindowOpen(
|
|
569
|
-
window.location.origin +
|
|
570
|
-
window.location.pathname +
|
|
571
|
-
"ay-doc/index.html?url=" +
|
|
572
|
-
data.res.webOfficeUrl +
|
|
573
|
-
"&token=" +
|
|
574
|
-
data.res.accessToken
|
|
575
|
-
);
|
|
576
|
-
} else {
|
|
577
|
-
ElMessage.error("预览失败,请稍后再试!");
|
|
578
|
-
}
|
|
579
|
-
});
|
|
580
|
-
} else if (
|
|
581
|
-
currentUserConfig &&
|
|
582
|
-
currentUserConfig.fileUploadType === "minio"
|
|
583
|
-
) {
|
|
584
|
-
// minio 的预览 需要第三方工具,暂时没有,先定义成下载
|
|
585
|
-
FileUploadController.getMinioFilePreview(item.fileId).then((data) => {
|
|
586
|
-
if (data.code == 200 && data.res) {
|
|
587
|
-
window.open(
|
|
588
|
-
window.location.origin +
|
|
589
|
-
window.location.pathname +
|
|
590
|
-
"preview/onlinePreview?url=" +
|
|
591
|
-
data.res
|
|
592
|
-
);
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
} catch (error) {
|
|
597
|
-
alert("读取本地用户信息失败!");
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
};
|
|
601
|
-
// Base64编码(支持中文)
|
|
602
|
-
function base64Encode(str: string) {
|
|
603
|
-
return btoa(
|
|
604
|
-
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) =>
|
|
605
|
-
String.fromCharCode("0x" + p1)
|
|
606
|
-
)
|
|
607
|
-
);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
/** 专门用来预览的组件 */
|
|
612
|
-
const previewImgRef = ref();
|
|
613
|
-
const perviewImg = ref<{ url: string; srcList: string[] }>({
|
|
614
|
-
url: "",
|
|
615
|
-
srcList: [],
|
|
616
|
-
});
|
|
617
|
-
/** mp3,mp4 预览 */
|
|
618
|
-
const previewMpRef = ref();
|
|
619
|
-
defineExpose({
|
|
620
|
-
clearFileList,
|
|
621
|
-
sendFileList,
|
|
622
|
-
});
|
|
623
|
-
</script>
|
|
624
|
-
|
|
625
|
-
<style lang="scss">
|
|
626
|
-
@use "../../styles/flex-common.scss";
|
|
627
|
-
|
|
628
|
-
.file-uploader {
|
|
629
|
-
// margin-top: 30px;
|
|
630
|
-
|
|
631
|
-
.imgSize {
|
|
632
|
-
width: 99px;
|
|
633
|
-
|
|
634
|
-
> span {
|
|
635
|
-
cursor: pointer;
|
|
636
|
-
position: absolute;
|
|
637
|
-
color: black;
|
|
638
|
-
font-size: 20px;
|
|
639
|
-
right: -69px;
|
|
640
|
-
height: 30px;
|
|
641
|
-
top: -12px;
|
|
642
|
-
width: 37px;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
el-image {
|
|
646
|
-
width: 100%;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
.el-upload__tip {
|
|
651
|
-
font-size: var(--font-size-body);
|
|
652
|
-
font-weight: 400;
|
|
653
|
-
text-align: left;
|
|
654
|
-
color: var(--custom-theme-text-3);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
.upload-attachments {
|
|
659
|
-
.notData {
|
|
660
|
-
font-size: var(--font-size-body);
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
.el-upload-list {
|
|
664
|
-
position: relative;
|
|
665
|
-
text-align: center;
|
|
666
|
-
display: flex;
|
|
667
|
-
flex-wrap: wrap;
|
|
668
|
-
width: 100%;
|
|
669
|
-
|
|
670
|
-
.el-upload-list__item {
|
|
671
|
-
margin-left: 5px;
|
|
672
|
-
flex-direction: column;
|
|
673
|
-
width: 17%;
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
.file-uploader {
|
|
678
|
-
// margin-top: 30px;
|
|
679
|
-
|
|
680
|
-
.imgSize {
|
|
681
|
-
width: 99px;
|
|
682
|
-
|
|
683
|
-
> span {
|
|
684
|
-
cursor: pointer;
|
|
685
|
-
position: absolute;
|
|
686
|
-
color: black;
|
|
687
|
-
font-size: 20px;
|
|
688
|
-
right: -69px;
|
|
689
|
-
height: 30px;
|
|
690
|
-
top: -12px;
|
|
691
|
-
width: 37px;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
el-image {
|
|
695
|
-
width: 100%;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
.preview-img {
|
|
702
|
-
img {
|
|
703
|
-
width: 100%;
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
.exceed-limit {
|
|
708
|
-
border-color: red !important;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
.error-message {
|
|
712
|
-
color: red;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
.file-list-box {
|
|
716
|
-
margin-top: 10px;
|
|
717
|
-
width: 100%;
|
|
718
|
-
height: auto;
|
|
719
|
-
|
|
720
|
-
.file-out-box {
|
|
721
|
-
cursor: pointer;
|
|
722
|
-
border: 1px solid var(--custom-theme-border-4);
|
|
723
|
-
border-radius: 6px 6px 6px 6px;
|
|
724
|
-
background: var(--custom-theme-fill-7);
|
|
725
|
-
padding: 24px 8px 8px;
|
|
726
|
-
width: 272px;
|
|
727
|
-
height: 80px;
|
|
728
|
-
margin-right: 16px;
|
|
729
|
-
margin-bottom: 16px;
|
|
730
|
-
position: relative;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
.file-list-item {
|
|
734
|
-
width: 256px;
|
|
735
|
-
height: 48px;
|
|
736
|
-
|
|
737
|
-
.file-list-item-left {
|
|
738
|
-
width: calc(100% - 20px);
|
|
739
|
-
height: 100%;
|
|
740
|
-
|
|
741
|
-
.file-list-item-icon {
|
|
742
|
-
width: 41px;
|
|
743
|
-
height: 41px;
|
|
744
|
-
|
|
745
|
-
.file-icon {
|
|
746
|
-
width: 41px;
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
.file-name-box {
|
|
751
|
-
margin-left: 8px;
|
|
752
|
-
height: 100%;
|
|
753
|
-
max-width: calc(100% - 50px);
|
|
754
|
-
|
|
755
|
-
.file-name {
|
|
756
|
-
font-weight: 400;
|
|
757
|
-
font-size: 12px;
|
|
758
|
-
color: var(--custom-theme-text-1);
|
|
759
|
-
line-height: 12x;
|
|
760
|
-
display: -webkit-box;
|
|
761
|
-
-webkit-box-orient: vertical;
|
|
762
|
-
-webkit-line-clamp: 2;
|
|
763
|
-
overflow: hidden;
|
|
764
|
-
word-break: break-all;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
.file-size {
|
|
768
|
-
font-weight: 400;
|
|
769
|
-
font-size: 12px;
|
|
770
|
-
color: var(--custom-theme-text-3);
|
|
771
|
-
line-height: 11px;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
.file-list-item-right {
|
|
777
|
-
height: 100%;
|
|
778
|
-
|
|
779
|
-
.file-preview {
|
|
780
|
-
width: 16px;
|
|
781
|
-
cursor: pointer;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
.file-download {
|
|
785
|
-
width: 16px;
|
|
786
|
-
cursor: pointer;
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
.delete-box {
|
|
792
|
-
position: absolute;
|
|
793
|
-
right: -7px;
|
|
794
|
-
top: -7px;
|
|
795
|
-
overflow: hidden;
|
|
796
|
-
font-size: 16px;
|
|
797
|
-
cursor: pointer;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
</style>
|
|
1
|
+
<!--
|
|
2
|
+
* @description: 附件上传组件
|
|
3
|
+
* @fileName: annex-upload-component.vue
|
|
4
|
+
* @author: huatuo
|
|
5
|
+
!-->
|
|
6
|
+
<template>
|
|
7
|
+
<div class="upload-attachments">
|
|
8
|
+
<!-- oss 上传 -->
|
|
9
|
+
<el-upload
|
|
10
|
+
class="fzile-uploader"
|
|
11
|
+
ref="upload"
|
|
12
|
+
v-model:file-list="fileList"
|
|
13
|
+
:auto-upload="true"
|
|
14
|
+
accept=".docx,.doc,.xls,.xlsx,.jpg,.pdf,.png,.bmp,.ppt,.pptx,.jpeg,.tiff,.raw,.heif,.gif,.mp3,.mp4,.rar,.zip,.7z,.wps,.DOCX,.DOC,.XLS,.XLSX,.JPG,.PDF,.PNG,.BMP,.PPT,.PPTX,.JPEG,.TIFF,.RAW,.HEIF,.GIF,.MP3,.MP4,.dcm,.DCM,.RAR,.ZIP,.7Z,.WPS"
|
|
15
|
+
:before-upload="beforeUploadOSS"
|
|
16
|
+
:action="uploadUrl"
|
|
17
|
+
:show-file-list="false"
|
|
18
|
+
:data="{ pageId: props.pageId }"
|
|
19
|
+
list-type="picture"
|
|
20
|
+
:on-exceed="handleExceed"
|
|
21
|
+
:limit="props.limited"
|
|
22
|
+
v-if="props.formType != 'detail'"
|
|
23
|
+
:headers="ossHeader"
|
|
24
|
+
size="large"
|
|
25
|
+
:disabled="props.loading"
|
|
26
|
+
:http-request="uploadFileOSS"
|
|
27
|
+
multiple
|
|
28
|
+
>
|
|
29
|
+
<el-button
|
|
30
|
+
type="primary"
|
|
31
|
+
text
|
|
32
|
+
bg
|
|
33
|
+
icon="Upload"
|
|
34
|
+
style="font-size: var(--font-size-body)"
|
|
35
|
+
size="large"
|
|
36
|
+
>上传附件</el-button
|
|
37
|
+
>
|
|
38
|
+
<template #tip>
|
|
39
|
+
<div class="el-upload__tip">
|
|
40
|
+
附件上限数量{{ props.limited }}个,单次最多选择{{
|
|
41
|
+
props.limited
|
|
42
|
+
}}个,单文件大小不超过{{ MAX_FILE_SIZE_MB }}MB
|
|
43
|
+
且附件上传格式仅限docx、doc、wps、xls、xlsx、jpg、pdf、png、bmp、ppt、pptx、jpeg、raw、heif、tiff、gif、mp3、mp4、rar、zip、7z。
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
</el-upload>
|
|
47
|
+
|
|
48
|
+
<div class="file-list-box flex-row-start">
|
|
49
|
+
<div
|
|
50
|
+
class="file-out-box"
|
|
51
|
+
v-for="(item, index) in sendFileList"
|
|
52
|
+
:key="index"
|
|
53
|
+
@click.stop="previewFile(item, index)"
|
|
54
|
+
>
|
|
55
|
+
<div class="file-list-item flex-row-between">
|
|
56
|
+
<div class="flex-row-start file-list-item-left">
|
|
57
|
+
<el-image
|
|
58
|
+
class="file-list-item-icon"
|
|
59
|
+
:src="item.url"
|
|
60
|
+
:zoom-rate="1.2"
|
|
61
|
+
:initial-index="0"
|
|
62
|
+
fit="cover"
|
|
63
|
+
preview-teleported="true"
|
|
64
|
+
@error="handleImageError"
|
|
65
|
+
@load="handleImageLoad"
|
|
66
|
+
v-loading="submitLoading"
|
|
67
|
+
v-if="
|
|
68
|
+
getFileType(item.url) === 'jpg' ||
|
|
69
|
+
getFileType(item.url) === 'png' ||
|
|
70
|
+
getFileType(item.url) === 'bmp' ||
|
|
71
|
+
getFileType(item.url) === 'jpeg' ||
|
|
72
|
+
getFileType(item.url) === 'raw' ||
|
|
73
|
+
getFileType(item.url) === 'heif' ||
|
|
74
|
+
getFileType(item.url) === 'tiff' ||
|
|
75
|
+
getFileType(item.url) === 'gif'
|
|
76
|
+
"
|
|
77
|
+
>
|
|
78
|
+
<template #error>
|
|
79
|
+
<img src="./assets/other.svg" class="file-icon" />
|
|
80
|
+
</template>
|
|
81
|
+
</el-image>
|
|
82
|
+
<div v-else class="file-list-item-icon">
|
|
83
|
+
<img
|
|
84
|
+
src="./assets/pdf.svg"
|
|
85
|
+
v-if="getFileType(item.url) === 'pdf'"
|
|
86
|
+
class="file-icon"
|
|
87
|
+
/>
|
|
88
|
+
<img
|
|
89
|
+
src="./assets/word.svg"
|
|
90
|
+
v-else-if="
|
|
91
|
+
getFileType(item.url) === 'docx' ||
|
|
92
|
+
getFileType(item.url) === 'doc'
|
|
93
|
+
"
|
|
94
|
+
class="file-icon"
|
|
95
|
+
/>
|
|
96
|
+
<img
|
|
97
|
+
src="./assets/mp3.svg"
|
|
98
|
+
v-else-if="getFileType(item.url) === 'mp3'"
|
|
99
|
+
class="file-icon"
|
|
100
|
+
/>
|
|
101
|
+
<img
|
|
102
|
+
src="./assets/mp4.svg"
|
|
103
|
+
v-else-if="getFileType(item.url) === 'mp4'"
|
|
104
|
+
class="file-icon"
|
|
105
|
+
/>
|
|
106
|
+
<img
|
|
107
|
+
src="./assets/xls.svg"
|
|
108
|
+
v-else-if="
|
|
109
|
+
getFileType(item.url) === 'xls' ||
|
|
110
|
+
getFileType(item.url) === 'xlsx'
|
|
111
|
+
"
|
|
112
|
+
class="file-icon"
|
|
113
|
+
/>
|
|
114
|
+
<img
|
|
115
|
+
src="./assets/ppt.svg"
|
|
116
|
+
v-else-if="
|
|
117
|
+
getFileType(item.url) === 'ppt' ||
|
|
118
|
+
getFileType(item.url) === 'pptx'
|
|
119
|
+
"
|
|
120
|
+
class="file-icon"
|
|
121
|
+
/>
|
|
122
|
+
<img src="./assets/other.svg" v-else class="file-icon" />
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
class="flex-column-around file-name-box"
|
|
126
|
+
style="align-items: flex-start"
|
|
127
|
+
>
|
|
128
|
+
<el-tooltip effect="dark" :content="item.fileName">
|
|
129
|
+
<div class="file-name">{{ item.fileName }}</div>
|
|
130
|
+
</el-tooltip>
|
|
131
|
+
<div class="file-size">{{ item.fileSize || "--" }}</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
<div class="flex-column-around file-list-item-right">
|
|
135
|
+
<img
|
|
136
|
+
src="./assets/preview.svg"
|
|
137
|
+
alt=""
|
|
138
|
+
class="file-preview"
|
|
139
|
+
@click.stop="previewFile(item, index)"
|
|
140
|
+
/>
|
|
141
|
+
|
|
142
|
+
<img
|
|
143
|
+
src="./assets/download.svg"
|
|
144
|
+
alt=""
|
|
145
|
+
class="file-download"
|
|
146
|
+
@click.stop="downloadFile(item)"
|
|
147
|
+
v-if="props.allowDownload"
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div
|
|
152
|
+
class="delete-box"
|
|
153
|
+
@click.stop="deleteUploadItem(item, index)"
|
|
154
|
+
v-if="props.formType != 'detail'"
|
|
155
|
+
>
|
|
156
|
+
<div class="table-delete">
|
|
157
|
+
<img
|
|
158
|
+
src="../../assets/table-delete/table-delete.svg"
|
|
159
|
+
alt="删除"
|
|
160
|
+
width="25"
|
|
161
|
+
height="25"
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<div
|
|
167
|
+
class="notData"
|
|
168
|
+
v-if="
|
|
169
|
+
props.formType == 'detail' &&
|
|
170
|
+
!(
|
|
171
|
+
sendFileList &&
|
|
172
|
+
Array.isArray(sendFileList) &&
|
|
173
|
+
sendFileList.length > 0
|
|
174
|
+
)
|
|
175
|
+
"
|
|
176
|
+
>
|
|
177
|
+
暂无附件
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
<!-- 专门用来预览的组件 -->
|
|
181
|
+
<el-image
|
|
182
|
+
style="display: none"
|
|
183
|
+
ref="previewImgRef"
|
|
184
|
+
:src="perviewImg.url"
|
|
185
|
+
:preview-src-list="perviewImg.srcList"
|
|
186
|
+
preview-teleported="true"
|
|
187
|
+
id="previewImgId"
|
|
188
|
+
@close="handleClosePreview"
|
|
189
|
+
>
|
|
190
|
+
</el-image>
|
|
191
|
+
<!-- 预览mp3,mp4 -->
|
|
192
|
+
<PreviewMp ref="previewMpRef"></PreviewMp>
|
|
193
|
+
</div>
|
|
194
|
+
</template>
|
|
195
|
+
|
|
196
|
+
<script setup lang="ts">
|
|
197
|
+
import { ref, reactive, watch, onMounted, PropType, nextTick } from "vue";
|
|
198
|
+
import OSS from "ali-oss";
|
|
199
|
+
import {
|
|
200
|
+
type UploadFile,
|
|
201
|
+
type UploadFiles,
|
|
202
|
+
type TabsPaneContext,
|
|
203
|
+
type UploadUserFile,
|
|
204
|
+
type UploadProps,
|
|
205
|
+
type ElMessageBox,
|
|
206
|
+
ElMessage,
|
|
207
|
+
} from "element-plus";
|
|
208
|
+
import moment from "moment";
|
|
209
|
+
import axios from "axios";
|
|
210
|
+
import { getFileType, ddWindowOpen } from "hrp-ui-base";
|
|
211
|
+
import dd from "dingtalk-jsapi";
|
|
212
|
+
import PreviewMp from "./modules/previewMp.vue";
|
|
213
|
+
// getUploadFileMsg
|
|
214
|
+
import FileUploadController from "hrp-ui-base/api/bms/file/FileUploadController";
|
|
215
|
+
import StsTokenVO from "hrp-ui-base/api/bms/file/bo/StsTokenVO";
|
|
216
|
+
import FileBaseInfo from "hrp-ui-base/api/bms/file/bo/FileBaseInfo";
|
|
217
|
+
import FileUrlVO from "hrp-ui-base/api/bms/file/bo/FileUrlVO";
|
|
218
|
+
import { downloadFile} from "hrp-ui-base";
|
|
219
|
+
|
|
220
|
+
const props = defineProps({
|
|
221
|
+
// 选择了那些审批人 具体的人名
|
|
222
|
+
type: {
|
|
223
|
+
type: String as PropType<"oss" | "minio">,
|
|
224
|
+
default: "oss",
|
|
225
|
+
require: true,
|
|
226
|
+
},
|
|
227
|
+
// 页面id
|
|
228
|
+
pageId: {
|
|
229
|
+
type: String,
|
|
230
|
+
default: "",
|
|
231
|
+
require: true,
|
|
232
|
+
},
|
|
233
|
+
// formType 页面类型
|
|
234
|
+
formType: {
|
|
235
|
+
type: String as PropType<"add" | "edit" | "detail">,
|
|
236
|
+
default: "add",
|
|
237
|
+
require: true,
|
|
238
|
+
},
|
|
239
|
+
// 默认的文件列表
|
|
240
|
+
fileDetailList: {
|
|
241
|
+
type: Array as PropType<any[]>,
|
|
242
|
+
default: false,
|
|
243
|
+
require: false,
|
|
244
|
+
},
|
|
245
|
+
// 页面的loading,由外部控制内部的loading
|
|
246
|
+
loading: {
|
|
247
|
+
type: Boolean,
|
|
248
|
+
require: true,
|
|
249
|
+
default: false,
|
|
250
|
+
},
|
|
251
|
+
keyForReturn: {
|
|
252
|
+
type: Number,
|
|
253
|
+
require: true,
|
|
254
|
+
default: "",
|
|
255
|
+
},
|
|
256
|
+
limited: {
|
|
257
|
+
type: Number,
|
|
258
|
+
require: true,
|
|
259
|
+
default: 9,
|
|
260
|
+
},
|
|
261
|
+
// 是否允许下载附件
|
|
262
|
+
allowDownload: {
|
|
263
|
+
type: Boolean,
|
|
264
|
+
require: false,
|
|
265
|
+
default: true,
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
const emits = defineEmits(["getUploadIds", "getUploadInfo", "changeLoading"]);
|
|
269
|
+
const token = localStorage.getItem("TOKEN");
|
|
270
|
+
const uploadUrl =
|
|
271
|
+
window.location.origin + window.location.pathname + "api/bms/file/upload";
|
|
272
|
+
const MAX_FILE_SIZE_MB = 50;
|
|
273
|
+
const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;
|
|
274
|
+
const minioHeader = ref({ "Authorization-Token": token });
|
|
275
|
+
const ossHeader = ref({
|
|
276
|
+
// 指定该Object被下载时的网页缓存行为。
|
|
277
|
+
"Cache-Control": "no-cache",
|
|
278
|
+
// 指定该Object被下载时的名称。
|
|
279
|
+
"Content-Disposition": "example.txt",
|
|
280
|
+
// 指定该Object被下载时的内容编码格式。
|
|
281
|
+
"Content-Encoding": "utf-8",
|
|
282
|
+
// 指定过期时间,单位为毫秒。
|
|
283
|
+
Expires: "1000",
|
|
284
|
+
// 指定Object的存储类型。
|
|
285
|
+
"x-oss-storage-class": "Standard",
|
|
286
|
+
// 指定Object标签,可同时设置多个标签。
|
|
287
|
+
"x-oss-tagging": "Tag1=1&Tag2=2",
|
|
288
|
+
// 指定初始化分片上传时是否覆盖同名Object。此处设置为true,表示禁止覆盖同名Object。
|
|
289
|
+
"x-oss-forbid-overwrite": "true",
|
|
290
|
+
});
|
|
291
|
+
const uploadFilesIds = ref<string[]>([]);
|
|
292
|
+
const fileInfoList = ref<any[]>([]);
|
|
293
|
+
|
|
294
|
+
const handleClosePreview = () => {
|
|
295
|
+
perviewImg.value.url = "";
|
|
296
|
+
perviewImg.value.srcList = [];
|
|
297
|
+
};
|
|
298
|
+
const submitLoading = ref<boolean>(false);
|
|
299
|
+
// 上传附件
|
|
300
|
+
const fileList = ref<UploadUserFile[]>([]);
|
|
301
|
+
const fileName = ref<string>("");
|
|
302
|
+
const beforeUploadOSS = async (e: any) => {
|
|
303
|
+
changeLoadingStatus(true);
|
|
304
|
+
const isFileSizeValid = e.size <= MAX_FILE_SIZE_BYTES;
|
|
305
|
+
if (!isFileSizeValid) {
|
|
306
|
+
changeLoadingStatus(false);
|
|
307
|
+
ElMessage.error(`上传文件大小不能超过 ${MAX_FILE_SIZE_MB}MB!`);
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
fileName.value = e.name;
|
|
311
|
+
// if (props.type === 'oss') {
|
|
312
|
+
|
|
313
|
+
// await getOSSOption(e.name)
|
|
314
|
+
// }
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
/** oss 上传方法 */
|
|
318
|
+
const uploadFileOSS = async (uploadMsg: any) => {
|
|
319
|
+
try {
|
|
320
|
+
console.log(uploadMsg);
|
|
321
|
+
const fileOBJ = uploadMsg.file;
|
|
322
|
+
FileUploadController.upload(fileOBJ, props.pageId)
|
|
323
|
+
.then((data) => {
|
|
324
|
+
if (data.code === 200 && data.res) {
|
|
325
|
+
sendFileList.value.push(data.res);
|
|
326
|
+
emits(
|
|
327
|
+
"getUploadIds",
|
|
328
|
+
sendFileList.value.map((item) => {
|
|
329
|
+
return item.fileId;
|
|
330
|
+
}),
|
|
331
|
+
props.keyForReturn
|
|
332
|
+
);
|
|
333
|
+
emits(
|
|
334
|
+
"getUploadInfo",
|
|
335
|
+
sendFileList.value.map((item) => {
|
|
336
|
+
return item;
|
|
337
|
+
}),
|
|
338
|
+
props.keyForReturn
|
|
339
|
+
);
|
|
340
|
+
} else {
|
|
341
|
+
ElMessage.error("数据发生错误,请重新上传!");
|
|
342
|
+
}
|
|
343
|
+
})
|
|
344
|
+
.catch((err) => {
|
|
345
|
+
ElMessage.error("数据发生错误,请重试!");
|
|
346
|
+
})
|
|
347
|
+
.finally(() => {
|
|
348
|
+
changeLoadingStatus(false);
|
|
349
|
+
});
|
|
350
|
+
} catch (err) {
|
|
351
|
+
console.debug(err);
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
const ossClient = ref();
|
|
355
|
+
const handleImageLoad = () => {
|
|
356
|
+
changeLoadingStatus(false);
|
|
357
|
+
};
|
|
358
|
+
const handleImageError = () => {
|
|
359
|
+
changeLoadingStatus(false);
|
|
360
|
+
};
|
|
361
|
+
const handleExceed = (e: any) => {
|
|
362
|
+
ElMessage({
|
|
363
|
+
message: `最多上传${props.limited}个文件!`,
|
|
364
|
+
type: "error",
|
|
365
|
+
});
|
|
366
|
+
};
|
|
367
|
+
const sendFileList = ref<Array<FileBaseInfo>>([]);
|
|
368
|
+
/** 删除 */
|
|
369
|
+
const deleteUploadItem = (item: any, index: any) => {
|
|
370
|
+
sendFileList.value.splice(index, 1);
|
|
371
|
+
fileList.value = JSON.parse(JSON.stringify(sendFileList.value));
|
|
372
|
+
emits(
|
|
373
|
+
"getUploadIds",
|
|
374
|
+
sendFileList.value.map((item) => {
|
|
375
|
+
return item.fileId;
|
|
376
|
+
}),
|
|
377
|
+
props.keyForReturn
|
|
378
|
+
);
|
|
379
|
+
emits(
|
|
380
|
+
"getUploadInfo",
|
|
381
|
+
sendFileList.value.map((item) => {
|
|
382
|
+
return item;
|
|
383
|
+
}),
|
|
384
|
+
props.keyForReturn
|
|
385
|
+
);
|
|
386
|
+
};
|
|
387
|
+
watch(
|
|
388
|
+
() => {
|
|
389
|
+
return props.fileDetailList;
|
|
390
|
+
},
|
|
391
|
+
() => {
|
|
392
|
+
if (props.fileDetailList && Array.isArray(props.fileDetailList)) {
|
|
393
|
+
sendFileList.value = props.fileDetailList;
|
|
394
|
+
fileList.value = JSON.parse(JSON.stringify(sendFileList.value));
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
{ deep: true, immediate: true }
|
|
398
|
+
);
|
|
399
|
+
|
|
400
|
+
/** 上传中 */
|
|
401
|
+
const handleUploadProgress = () => {
|
|
402
|
+
emits("changeLoading", true);
|
|
403
|
+
};
|
|
404
|
+
/** 上传失败 */
|
|
405
|
+
const handleUploadError = (err: any) => {
|
|
406
|
+
ElMessage({
|
|
407
|
+
message: "上传失败!",
|
|
408
|
+
type: "error",
|
|
409
|
+
});
|
|
410
|
+
changeLoadingStatus(false);
|
|
411
|
+
};
|
|
412
|
+
const changeLoadingStatus = (status: boolean) => {
|
|
413
|
+
emits("changeLoading", status);
|
|
414
|
+
submitLoading.value = status;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
//清空图片列表
|
|
418
|
+
const clearFileList = () => {
|
|
419
|
+
sendFileList.value = [];
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
/** 上传的方式 */
|
|
423
|
+
onMounted(() => {
|
|
424
|
+
// if (!props.type) {
|
|
425
|
+
// ElMessage.error('配置错误,无法确定上传方式')
|
|
426
|
+
// }
|
|
427
|
+
});
|
|
428
|
+
const ossName = ref<string>("");
|
|
429
|
+
const stsToken = ref<StsTokenVO>(new StsTokenVO());
|
|
430
|
+
|
|
431
|
+
/** 获取minio 上传地址 */
|
|
432
|
+
const minioOption = ref<FileUrlVO>(new FileUrlVO());
|
|
433
|
+
const getMinioUploadUrl = async (fileName: string) => {
|
|
434
|
+
await FileUploadController.getUploadUrl(props.pageId, fileName).then(
|
|
435
|
+
(data) => {
|
|
436
|
+
if (data.code === 200 && data.res) {
|
|
437
|
+
minioOption.value = data.res;
|
|
438
|
+
} else {
|
|
439
|
+
ElMessage.error("获取上传路径失败!");
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
);
|
|
443
|
+
};
|
|
444
|
+
/** minio 上传方法 */
|
|
445
|
+
const uploadFileMinio = async (uploadMsg: any) => {
|
|
446
|
+
console.debug(uploadMsg);
|
|
447
|
+
if (minioOption.value) {
|
|
448
|
+
try {
|
|
449
|
+
const options = {
|
|
450
|
+
mime: "json",
|
|
451
|
+
headers: { "Content-Type": "text/plain" },
|
|
452
|
+
};
|
|
453
|
+
const data = uploadMsg.file;
|
|
454
|
+
// console.error(data)
|
|
455
|
+
let config = { "Content-Type": uploadMsg.file.type };
|
|
456
|
+
// // 分片上传。
|
|
457
|
+
axiosPost("put", minioOption.value.policyUrl, uploadMsg.file, config)
|
|
458
|
+
.then(function (res) {
|
|
459
|
+
setTimeout(() => {
|
|
460
|
+
/** 上传成功 ,去请求接口查询上传的内容*/
|
|
461
|
+
FileUploadController.checkFileUpload(
|
|
462
|
+
minioOption.value.fileId ? minioOption.value.fileId : ""
|
|
463
|
+
)
|
|
464
|
+
.then((data) => {
|
|
465
|
+
if (data.code == 200) {
|
|
466
|
+
FileUploadController.getMinioFileUrl(
|
|
467
|
+
minioOption.value.fileId ? minioOption.value.fileId : ""
|
|
468
|
+
)
|
|
469
|
+
.then((data) => {
|
|
470
|
+
if (data.code === 200 && data.res) {
|
|
471
|
+
sendFileList.value.push(data.res);
|
|
472
|
+
ElMessage.success("上传成功!");
|
|
473
|
+
emits(
|
|
474
|
+
"getUploadIds",
|
|
475
|
+
sendFileList.value.map((item) => {
|
|
476
|
+
return item.fileId;
|
|
477
|
+
}),
|
|
478
|
+
props.keyForReturn
|
|
479
|
+
);
|
|
480
|
+
emits(
|
|
481
|
+
"getUploadInfo",
|
|
482
|
+
sendFileList.value.map((item) => {
|
|
483
|
+
return item;
|
|
484
|
+
}),
|
|
485
|
+
props.keyForReturn
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
})
|
|
489
|
+
.finally(() => {
|
|
490
|
+
changeLoadingStatus(false);
|
|
491
|
+
});
|
|
492
|
+
} else {
|
|
493
|
+
ElMessage.error("上传失败,请重新上传!");
|
|
494
|
+
changeLoadingStatus(false);
|
|
495
|
+
}
|
|
496
|
+
})
|
|
497
|
+
.catch(() => {
|
|
498
|
+
ElMessage.error("上传失败,请重新上传!");
|
|
499
|
+
changeLoadingStatus(false);
|
|
500
|
+
});
|
|
501
|
+
}, 1000);
|
|
502
|
+
})
|
|
503
|
+
.catch(() => {
|
|
504
|
+
ElMessage.error("上传失败,请重新上传!");
|
|
505
|
+
changeLoadingStatus(false);
|
|
506
|
+
});
|
|
507
|
+
} catch (err) {
|
|
508
|
+
console.debug(err);
|
|
509
|
+
}
|
|
510
|
+
} else {
|
|
511
|
+
ElMessage.error("数据发生错误,请重新上传!");
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
function axiosPost(method: string, url: string, data: any, config: any) {
|
|
515
|
+
let result = axios({
|
|
516
|
+
method: method,
|
|
517
|
+
url: url,
|
|
518
|
+
data: data,
|
|
519
|
+
headers: config,
|
|
520
|
+
})
|
|
521
|
+
.then((resp) => {
|
|
522
|
+
return resp;
|
|
523
|
+
})
|
|
524
|
+
.catch((error) => {
|
|
525
|
+
return "exception=" + error;
|
|
526
|
+
});
|
|
527
|
+
return result;
|
|
528
|
+
}
|
|
529
|
+
/** 预览文件 */
|
|
530
|
+
const previewFile = async (item: FileBaseInfo, index: number) => {
|
|
531
|
+
if (
|
|
532
|
+
getFileType(item.url) === "jpg" ||
|
|
533
|
+
getFileType(item.url) === "png" ||
|
|
534
|
+
getFileType(item.url) === "bmp" ||
|
|
535
|
+
getFileType(item.url) === "jpeg" ||
|
|
536
|
+
getFileType(item.url) === "raw" ||
|
|
537
|
+
getFileType(item.url) === "heif" ||
|
|
538
|
+
getFileType(item.url) === "tiff" ||
|
|
539
|
+
getFileType(item.url) === "gif"
|
|
540
|
+
) {
|
|
541
|
+
// 图片的情况
|
|
542
|
+
perviewImg.value.url = item.url;
|
|
543
|
+
perviewImg.value.srcList = [item.url];
|
|
544
|
+
nextTick(() => {
|
|
545
|
+
previewImgRef.value?.showPreview();
|
|
546
|
+
});
|
|
547
|
+
} else if (getFileType(item.url) === "mp3") {
|
|
548
|
+
// mp3的情况
|
|
549
|
+
previewMpRef.value?.open("mp3", item);
|
|
550
|
+
} else if (getFileType(item.url) === "mp4") {
|
|
551
|
+
// mp4的情况
|
|
552
|
+
previewMpRef.value?.open("mp4", item);
|
|
553
|
+
} else if (
|
|
554
|
+
getFileType(item.url) === "zip" ||
|
|
555
|
+
getFileType(item.url) === "7z" ||
|
|
556
|
+
getFileType(item.url) === "rar"
|
|
557
|
+
) {
|
|
558
|
+
downloadFile(item);
|
|
559
|
+
} else {
|
|
560
|
+
try {
|
|
561
|
+
let currentUserConfig = sessionStorage.getItem("userConfig")
|
|
562
|
+
? JSON.parse(sessionStorage.getItem("userConfig") as string)
|
|
563
|
+
: null;
|
|
564
|
+
if (currentUserConfig && currentUserConfig.fileUploadType === "oss") {
|
|
565
|
+
// 文档的情况
|
|
566
|
+
await FileUploadController.getFilePreview(item.fileId).then((data) => {
|
|
567
|
+
if (data.code == 200 && data.res) {
|
|
568
|
+
ddWindowOpen(
|
|
569
|
+
window.location.origin +
|
|
570
|
+
window.location.pathname +
|
|
571
|
+
"ay-doc/index.html?url=" +
|
|
572
|
+
data.res.webOfficeUrl +
|
|
573
|
+
"&token=" +
|
|
574
|
+
data.res.accessToken
|
|
575
|
+
);
|
|
576
|
+
} else {
|
|
577
|
+
ElMessage.error("预览失败,请稍后再试!");
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
} else if (
|
|
581
|
+
currentUserConfig &&
|
|
582
|
+
currentUserConfig.fileUploadType === "minio"
|
|
583
|
+
) {
|
|
584
|
+
// minio 的预览 需要第三方工具,暂时没有,先定义成下载
|
|
585
|
+
FileUploadController.getMinioFilePreview(item.fileId).then((data) => {
|
|
586
|
+
if (data.code == 200 && data.res) {
|
|
587
|
+
window.open(
|
|
588
|
+
window.location.origin +
|
|
589
|
+
window.location.pathname +
|
|
590
|
+
"preview/onlinePreview?url=" +
|
|
591
|
+
data.res
|
|
592
|
+
);
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
} catch (error) {
|
|
597
|
+
alert("读取本地用户信息失败!");
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
// Base64编码(支持中文)
|
|
602
|
+
function base64Encode(str: string) {
|
|
603
|
+
return btoa(
|
|
604
|
+
encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) =>
|
|
605
|
+
String.fromCharCode("0x" + p1)
|
|
606
|
+
)
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
/** 专门用来预览的组件 */
|
|
612
|
+
const previewImgRef = ref();
|
|
613
|
+
const perviewImg = ref<{ url: string; srcList: string[] }>({
|
|
614
|
+
url: "",
|
|
615
|
+
srcList: [],
|
|
616
|
+
});
|
|
617
|
+
/** mp3,mp4 预览 */
|
|
618
|
+
const previewMpRef = ref();
|
|
619
|
+
defineExpose({
|
|
620
|
+
clearFileList,
|
|
621
|
+
sendFileList,
|
|
622
|
+
});
|
|
623
|
+
</script>
|
|
624
|
+
|
|
625
|
+
<style lang="scss">
|
|
626
|
+
@use "../../styles/flex-common.scss";
|
|
627
|
+
|
|
628
|
+
.file-uploader {
|
|
629
|
+
// margin-top: 30px;
|
|
630
|
+
|
|
631
|
+
.imgSize {
|
|
632
|
+
width: 99px;
|
|
633
|
+
|
|
634
|
+
> span {
|
|
635
|
+
cursor: pointer;
|
|
636
|
+
position: absolute;
|
|
637
|
+
color: black;
|
|
638
|
+
font-size: 20px;
|
|
639
|
+
right: -69px;
|
|
640
|
+
height: 30px;
|
|
641
|
+
top: -12px;
|
|
642
|
+
width: 37px;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
el-image {
|
|
646
|
+
width: 100%;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.el-upload__tip {
|
|
651
|
+
font-size: var(--font-size-body);
|
|
652
|
+
font-weight: 400;
|
|
653
|
+
text-align: left;
|
|
654
|
+
color: var(--custom-theme-text-3);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.upload-attachments {
|
|
659
|
+
.notData {
|
|
660
|
+
font-size: var(--font-size-body);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.el-upload-list {
|
|
664
|
+
position: relative;
|
|
665
|
+
text-align: center;
|
|
666
|
+
display: flex;
|
|
667
|
+
flex-wrap: wrap;
|
|
668
|
+
width: 100%;
|
|
669
|
+
|
|
670
|
+
.el-upload-list__item {
|
|
671
|
+
margin-left: 5px;
|
|
672
|
+
flex-direction: column;
|
|
673
|
+
width: 17%;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.file-uploader {
|
|
678
|
+
// margin-top: 30px;
|
|
679
|
+
|
|
680
|
+
.imgSize {
|
|
681
|
+
width: 99px;
|
|
682
|
+
|
|
683
|
+
> span {
|
|
684
|
+
cursor: pointer;
|
|
685
|
+
position: absolute;
|
|
686
|
+
color: black;
|
|
687
|
+
font-size: 20px;
|
|
688
|
+
right: -69px;
|
|
689
|
+
height: 30px;
|
|
690
|
+
top: -12px;
|
|
691
|
+
width: 37px;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
el-image {
|
|
695
|
+
width: 100%;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.preview-img {
|
|
702
|
+
img {
|
|
703
|
+
width: 100%;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.exceed-limit {
|
|
708
|
+
border-color: red !important;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.error-message {
|
|
712
|
+
color: red;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.file-list-box {
|
|
716
|
+
margin-top: 10px;
|
|
717
|
+
width: 100%;
|
|
718
|
+
height: auto;
|
|
719
|
+
|
|
720
|
+
.file-out-box {
|
|
721
|
+
cursor: pointer;
|
|
722
|
+
border: 1px solid var(--custom-theme-border-4);
|
|
723
|
+
border-radius: 6px 6px 6px 6px;
|
|
724
|
+
background: var(--custom-theme-fill-7);
|
|
725
|
+
padding: 24px 8px 8px;
|
|
726
|
+
width: 272px;
|
|
727
|
+
height: 80px;
|
|
728
|
+
margin-right: 16px;
|
|
729
|
+
margin-bottom: 16px;
|
|
730
|
+
position: relative;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.file-list-item {
|
|
734
|
+
width: 256px;
|
|
735
|
+
height: 48px;
|
|
736
|
+
|
|
737
|
+
.file-list-item-left {
|
|
738
|
+
width: calc(100% - 20px);
|
|
739
|
+
height: 100%;
|
|
740
|
+
|
|
741
|
+
.file-list-item-icon {
|
|
742
|
+
width: 41px;
|
|
743
|
+
height: 41px;
|
|
744
|
+
|
|
745
|
+
.file-icon {
|
|
746
|
+
width: 41px;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.file-name-box {
|
|
751
|
+
margin-left: 8px;
|
|
752
|
+
height: 100%;
|
|
753
|
+
max-width: calc(100% - 50px);
|
|
754
|
+
|
|
755
|
+
.file-name {
|
|
756
|
+
font-weight: 400;
|
|
757
|
+
font-size: 12px;
|
|
758
|
+
color: var(--custom-theme-text-1);
|
|
759
|
+
line-height: 12x;
|
|
760
|
+
display: -webkit-box;
|
|
761
|
+
-webkit-box-orient: vertical;
|
|
762
|
+
-webkit-line-clamp: 2;
|
|
763
|
+
overflow: hidden;
|
|
764
|
+
word-break: break-all;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.file-size {
|
|
768
|
+
font-weight: 400;
|
|
769
|
+
font-size: 12px;
|
|
770
|
+
color: var(--custom-theme-text-3);
|
|
771
|
+
line-height: 11px;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.file-list-item-right {
|
|
777
|
+
height: 100%;
|
|
778
|
+
|
|
779
|
+
.file-preview {
|
|
780
|
+
width: 16px;
|
|
781
|
+
cursor: pointer;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.file-download {
|
|
785
|
+
width: 16px;
|
|
786
|
+
cursor: pointer;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
.delete-box {
|
|
792
|
+
position: absolute;
|
|
793
|
+
right: -7px;
|
|
794
|
+
top: -7px;
|
|
795
|
+
overflow: hidden;
|
|
796
|
+
font-size: 16px;
|
|
797
|
+
cursor: pointer;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
</style>
|