From 33b87bec75a9a147efd944d346a4a4f05747d7b3 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Wed, 21 Dec 2022 14:41:43 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E5=9F=B9=E8=AE=AD=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=BA=93=EF=BC=9A=20=E4=BC=98=E5=8C=96=E4=B8=89=E7=BA=A7?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E7=B1=BB=E6=96=87=E4=BB=B6=E5=8F=AF=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E3=80=81=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/controllers/resourceRepository/index.js | 3 +-- .../resourceRepository/upload-modal.jsx | 16 ++++++++++++---- .../containers/resourceRepository.jsx | 6 +++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/api/app/lib/controllers/resourceRepository/index.js b/api/app/lib/controllers/resourceRepository/index.js index 0f61642..8396a18 100644 --- a/api/app/lib/controllers/resourceRepository/index.js +++ b/api/app/lib/controllers/resourceRepository/index.js @@ -152,8 +152,7 @@ async function getResourceFileList(ctx, next) { departmentName: departmentName } if (trainDate) { - //todo - where.trainDate = trainDate + where.trainDate = { $between: [moment(trainDate).startOf('month').format('YYYY-MM-DD HH:mm:ss'), moment(trainDate).endOf('month').format('YYYY-MM-DD HH:mm:ss')] }; } findObj.where = where; } diff --git a/web/client/src/sections/humanAffairs/components/resourceRepository/upload-modal.jsx b/web/client/src/sections/humanAffairs/components/resourceRepository/upload-modal.jsx index 4638049..8a2cc36 100644 --- a/web/client/src/sections/humanAffairs/components/resourceRepository/upload-modal.jsx +++ b/web/client/src/sections/humanAffairs/components/resourceRepository/upload-modal.jsx @@ -35,15 +35,23 @@ const ResourceUploadModal = (props) => { onSizeError={(file, fileList) => Toast.error(`${file.name} 超过200M`)} onExceed={(fileList) => { Toast.error(`一次最多上传5个文件`) }} rules={[{ required: true, message: '请上传文件' }]} + extraText={
+ 支持文件类型:.doc,.docx,.xls,.xlsx,.pdf,.pptx, + 支持压缩包类型:zip、rar、7z, + 文件大小一个不能超过200M,一次最多上传5个文件。 +
+ } > -

支持文件类型:.doc,.docx,.xls,.xlsx,.pdf,.pptx, - 支持压缩包类型:zip、rar、7z, - 文件大小一个不能超过200M,一次最多上传5个文件。 -

) diff --git a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx index 0550235..56c63a9 100644 --- a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx +++ b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx @@ -54,7 +54,7 @@ const ResourceRepository = (props) => { return
handleDelFile(record.id)}>删除}
} @@ -175,7 +175,7 @@ const ResourceRepository = (props) => { setDefaultExpandedKey([payload.data[0].key]); } } - setCurrentSelect([defaultKey]); + setCurrentSelect(defaultKey); setTreeData(payload.data); getFile(defaultKey); } @@ -228,7 +228,7 @@ const ResourceRepository = (props) => { - {currentSelect && currentSelect.includes("部门培训资料") ? null : } + {currentSelect && currentSelect.includes("公司培训资料") && currentSelect.split("/").length == 3 ? : null} 当前文件夹:{currentSelect}