From 36e554d8edecc76cb68cccb6b5e4d1d81266639f Mon Sep 17 00:00:00 2001 From: zhoumingfa Date: Wed, 24 Jul 2024 20:42:33 +0800 Subject: [PATCH 01/22] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8B=E8=BD=BD=E6=8A=A5=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/support/file/file-list.vue | 2 +- .../src/api/support/file/file-api.js | 4 ++-- .../src/views/support/file/file-list.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/smart-admin-web/javascript-ant-design-vue3/src/views/support/file/file-list.vue b/smart-admin-web/javascript-ant-design-vue3/src/views/support/file/file-list.vue index 3758eeaa..5adeafd4 100644 --- a/smart-admin-web/javascript-ant-design-vue3/src/views/support/file/file-list.vue +++ b/smart-admin-web/javascript-ant-design-vue3/src/views/support/file/file-list.vue @@ -270,7 +270,7 @@ // 下载文件 async function download(file) { try { - await fileApi.downLoadFile(file.fileName, file.fileKey); + await fileApi.downLoadFile(file.fileKey); } catch (e) { smartSentry.captureError(e); } diff --git a/smart-admin-web/typescript-ant-design-vue3/src/api/support/file/file-api.js b/smart-admin-web/typescript-ant-design-vue3/src/api/support/file/file-api.js index ec001f2a..2e470933 100644 --- a/smart-admin-web/typescript-ant-design-vue3/src/api/support/file/file-api.js +++ b/smart-admin-web/typescript-ant-design-vue3/src/api/support/file/file-api.js @@ -32,7 +32,7 @@ export const fileApi = { /** * 下载文件流(根据fileKey) @author 胡克 */ - downLoadFile: (fileName, fileKey) => { - return getDownload(fileName, '/support/file/downLoad', { fileKey }); + downLoadFile: (fileKey) => { + return getDownload('/support/file/downLoad', { fileKey }); }, }; diff --git a/smart-admin-web/typescript-ant-design-vue3/src/views/support/file/file-list.vue b/smart-admin-web/typescript-ant-design-vue3/src/views/support/file/file-list.vue index 15c6cd7a..bf989daa 100644 --- a/smart-admin-web/typescript-ant-design-vue3/src/views/support/file/file-list.vue +++ b/smart-admin-web/typescript-ant-design-vue3/src/views/support/file/file-list.vue @@ -270,7 +270,7 @@ function view(file) { // 下载文件 async function download(file) { try { - await fileApi.downLoadFile(file.fileName, file.fileKey); + await fileApi.downLoadFile(file.fileKey); } catch (e) { smartSentry.captureError(e); } From 6f3d7dc3a2157e46924e3b12a4f665de10af4bb4 Mon Sep 17 00:00:00 2001 From: C-ccc <2170639886@qq.com> Date: Thu, 25 Jul 2024 08:36:58 +0000 Subject: [PATCH 02/22] =?UTF-8?q?update=20system/department/manager/Depart?= =?UTF-8?q?mentCacheManager.java.=20=E4=BF=AE=E6=94=B9=20recursiveBuildTre?= =?UTF-8?q?e=E6=96=B9=E6=B3=95=EF=BC=8C=E4=BD=BF=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E4=B8=AD=E7=9A=84setSelfAndAllChildrenIdList=E6=98=AF?= =?UTF-8?q?=E4=BB=A5=E5=BD=93=E5=89=8D=E8=8A=82=E7=82=B9=E4=B8=BA=E6=A0=B9?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E7=9A=84=E5=B1=82=E5=BA=8F=E9=81=8D=E5=8E=86?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: C-ccc <2170639886@qq.com> --- .../manager/DepartmentCacheManager.java | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/manager/DepartmentCacheManager.java b/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/manager/DepartmentCacheManager.java index 3ed6f350..5a4ecc4d 100644 --- a/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/manager/DepartmentCacheManager.java +++ b/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/manager/DepartmentCacheManager.java @@ -141,13 +141,15 @@ public class DepartmentCacheManager { return treeVOList; } - /** + /** * 构建所有根节点的下级树形结构 - * + * 返回值为层序遍历结果 + * [由于departmentDao中listAll给出数据根据Sort降序 所以同一层中Sort值较大的优先遍历] */ - private void recursiveBuildTree(List nodeList, List allDepartmentList) { + private List recursiveBuildTree(List nodeList, List allDepartmentList) { int nodeSize = nodeList.size(); - for (int i = 0; i < nodeSize; i++) { + List childIdList = new ArrayList<>(); + for(int i = 0; i < nodeSize; i++) { int preIndex = i - 1; int nextIndex = i + 1; DepartmentTreeVO node = nodeList.get(i); @@ -158,16 +160,34 @@ public class DepartmentCacheManager { node.setNextId(nodeList.get(nextIndex).getDepartmentId()); } - ArrayList selfAndAllChildrenIdList = Lists.newArrayList(); - selfAndAllChildrenIdList.add(node.getDepartmentId()); - node.setSelfAndAllChildrenIdList(selfAndAllChildrenIdList); - List children = getChildren(node.getDepartmentId(), allDepartmentList); + + List tempChildIdList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(children)) { node.setChildren(children); - this.recursiveBuildTree(children, allDepartmentList); + tempChildIdList = this.recursiveBuildTree(children, allDepartmentList); } + + if(CollectionUtils.isEmpty(node.getSelfAndAllChildrenIdList())) { + node.setSelfAndAllChildrenIdList( + new ArrayList<>() + ); + } + node.getSelfAndAllChildrenIdList().add(node.getDepartmentId()); + + if(CollectionUtils.isNotEmpty(tempChildIdList)) { + node.getSelfAndAllChildrenIdList().addAll(tempChildIdList); + childIdList.addAll(tempChildIdList); + } + } + + // 保证本层遍历顺序 + for(int i = nodeSize - 1; i >= 0; i--) { + childIdList.add(0, nodeList.get(i).getDepartmentId()); + } + + return childIdList; } From 2f5683ac9df904365fea388d7b8d84571ff6123e Mon Sep 17 00:00:00 2001 From: LiZongLiang Date: Sat, 3 Aug 2024 16:13:21 +0800 Subject: [PATCH 03/22] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/department/service/DepartmentService.java | 2 +- .../sa/admin/module/system/employee/dao/EmployeeDao.java | 2 +- .../main/resources/mapper/system/employee/EmployeeMapper.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/service/DepartmentService.java b/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/service/DepartmentService.java index 7b58bca2..dade9aaa 100644 --- a/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/service/DepartmentService.java +++ b/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/service/DepartmentService.java @@ -92,7 +92,7 @@ public class DepartmentService { } // 是否有未删除员工 - int employeeNum = employeeDao.countByDepartmentId(departmentId); + int employeeNum = employeeDao.countByDepartmentId(departmentId, Boolean.FALSE); if (employeeNum > 0) { return ResponseDTO.userErrorParam("请先删除部门员工"); } diff --git a/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/employee/dao/EmployeeDao.java b/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/employee/dao/EmployeeDao.java index c9126970..c1297a84 100644 --- a/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/employee/dao/EmployeeDao.java +++ b/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/employee/dao/EmployeeDao.java @@ -69,7 +69,7 @@ public interface EmployeeDao extends BaseMapper { * 获取某个部门员工数 * */ - Integer countByDepartmentId(@Param("departmentId") Long departmentId); + Integer countByDepartmentId(@Param("departmentId") Long departmentId, @Param("deletedFlag") Boolean deletedFlag); /** * 获取一批员工 diff --git a/smart-admin-api/sa-admin/src/main/resources/mapper/system/employee/EmployeeMapper.xml b/smart-admin-api/sa-admin/src/main/resources/mapper/system/employee/EmployeeMapper.xml index 24f5eebb..506c6832 100644 --- a/smart-admin-api/sa-admin/src/main/resources/mapper/system/employee/EmployeeMapper.xml +++ b/smart-admin-api/sa-admin/src/main/resources/mapper/system/employee/EmployeeMapper.xml @@ -85,7 +85,7 @@ From 7d8879abcb872d8f1c5328043a2d9bc7c71c30c1 Mon Sep 17 00:00:00 2001 From: zhoumingfa Date: Sat, 3 Aug 2024 22:40:53 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E4=B8=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8F=82=E6=95=B0=E4=B8=AD=E6=B7=BB=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=9F=A5=E8=AF=A2=E6=80=BB=E6=9D=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/net/lab1024/sa/base/common/util/SmartPageUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/common/util/SmartPageUtil.java b/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/common/util/SmartPageUtil.java index 4e2f24c0..9dca8487 100644 --- a/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/common/util/SmartPageUtil.java +++ b/smart-admin-api/sa-base/src/main/java/net/lab1024/sa/base/common/util/SmartPageUtil.java @@ -12,7 +12,6 @@ import org.apache.commons.collections4.CollectionUtils; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; /** * 分页工具类 @@ -32,6 +31,10 @@ public class SmartPageUtil { public static Page convert2PageQuery(PageParam pageParam) { Page page = new Page<>(pageParam.getPageNum(), pageParam.getPageSize()); + if (pageParam.getSearchCount() != null) { + page.setSearchCount(pageParam.getSearchCount()); + } + List sortItemList = pageParam.getSortItemList(); if (CollectionUtils.isEmpty(sortItemList)) { return page; From 694aa184527940f8abf3019857619acfeeb2d7f5 Mon Sep 17 00:00:00 2001 From: zhoumingfa Date: Sat, 3 Aug 2024 23:38:05 +0800 Subject: [PATCH 05/22] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E5=BE=85=E5=8A=9E=E5=8D=A1=E7=89=87=E4=B8=AD=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=9F=BA=E4=BA=8ElocalStorage=E7=9A=84=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E6=B7=BB=E5=8A=A0=E4=B8=8E=E5=88=A0=E9=99=A4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E5=B9=B6=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E7=9A=84=E6=B6=88=E6=81=AF=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/constants/local-storage-key-const.js | 2 + .../header-user-space/header-avatar.vue | 2 - .../header-user-space/header-message.vue | 76 +++++++- .../components/header-user-space/index.vue | 4 +- .../src/lib/axios.js | 5 +- .../src/router/index.js | 4 +- .../src/store/modules/system/user.js | 24 ++- .../src/utils/local-util.js | 4 + .../account/components/message/index.vue | 2 +- .../home/components/to-be-done-card.vue | 158 ---------------- .../to-be-done-card/home-to-be-done.vue | 172 ++++++++++++++++++ .../to-be-done-card/to-be-done-modal.vue | 63 +++++++ .../src/views/system/home/index.vue | 2 +- 13 files changed, 337 insertions(+), 181 deletions(-) delete mode 100644 smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card.vue create mode 100644 smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/home-to-be-done.vue create mode 100644 smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/to-be-done-modal.vue diff --git a/smart-admin-web/javascript-ant-design-vue3/src/constants/local-storage-key-const.js b/smart-admin-web/javascript-ant-design-vue3/src/constants/local-storage-key-const.js index 384c6e74..98ece9a1 100644 --- a/smart-admin-web/javascript-ant-design-vue3/src/constants/local-storage-key-const.js +++ b/smart-admin-web/javascript-ant-design-vue3/src/constants/local-storage-key-const.js @@ -30,4 +30,6 @@ export default { HOME_QUICK_ENTRY: `${KEY_PREFIX}home_quick_entry`, // 通知信息已读 NOTICE_READ: `${KEY_PREFIX}notice_read`, + // 待办 + TO_BE_DONE: `${KEY_PREFIX}to_be_done`, }; diff --git a/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-avatar.vue b/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-avatar.vue index 5af75daa..7540c1b0 100644 --- a/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-avatar.vue +++ b/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-avatar.vue @@ -37,7 +37,6 @@ import { computed, ref, onMounted } from 'vue'; import { loginApi } from '/src/api/system/login-api'; import { useUserStore } from '/@/store/modules/system/user'; - import { localClear } from '/@/utils/local-util'; import { smartSentry } from '/@/lib/smart-sentry'; import HeaderResetPassword from './header-reset-password-modal/index.vue'; import { useRouter } from 'vue-router'; @@ -53,7 +52,6 @@ } catch (e) { smartSentry.captureError(e); } finally { - localClear(); useUserStore().logout(); location.reload(); } diff --git a/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-message.vue b/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-message.vue index d50337b5..e457cc8a 100644 --- a/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-message.vue +++ b/smart-admin-web/javascript-ant-design-vue3/src/layout/components/header-user-space/header-message.vue @@ -10,19 +10,21 @@ + - diff --git a/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/home-to-be-done.vue b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/home-to-be-done.vue new file mode 100644 index 00000000..c6f1a5a5 --- /dev/null +++ b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/home-to-be-done.vue @@ -0,0 +1,172 @@ + + + + diff --git a/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/to-be-done-modal.vue b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/to-be-done-modal.vue new file mode 100644 index 00000000..a8054944 --- /dev/null +++ b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/to-be-done-card/to-be-done-modal.vue @@ -0,0 +1,63 @@ + + + diff --git a/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/index.vue b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/index.vue index 78c997c0..72e92434 100644 --- a/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/index.vue +++ b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/index.vue @@ -70,7 +70,7 @@ import HomeNotice from './home-notice.vue'; import HomeQuickEntry from './components/quick-entry/home-quick-entry.vue'; import OfficialAccountCard from './components/official-account-card.vue'; - import ToBeDoneCard from './components/to-be-done-card.vue'; + import ToBeDoneCard from './components/to-be-done-card/home-to-be-done.vue'; import ChangelogCard from './components/changelog-card.vue'; import Gauge from './components/echarts/gauge.vue'; import Category from './components/echarts/category.vue'; From bf64f525fbb6c9206dcaf63c1ad4db2517d86647 Mon Sep 17 00:00:00 2001 From: zhoumingfa Date: Sat, 3 Aug 2024 23:38:54 +0800 Subject: [PATCH 06/22] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E7=9A=84=E7=9B=B4=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/components/default-home-card.vue | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/default-home-card.vue b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/default-home-card.vue index 0b74a5a5..c6bff498 100644 --- a/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/default-home-card.vue +++ b/smart-admin-web/javascript-ant-design-vue3/src/views/system/home/components/default-home-card.vue @@ -9,7 +9,7 @@ * -->