From a6fc09999a8b421c3291c2658e251d8ded7eae9f Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Wed, 24 Feb 2021 15:34:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E4=BA=8E=E6=B5=8B=E8=BE=B9=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E9=81=AE=E6=8C=A1=E5=86=85=E5=AE=B9=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E8=AF=B4=E6=98=8E=20#2255=20=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E7=AE=A1=E7=90=86=E5=91=98=E6=B7=BB=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E7=BA=A7=E7=94=A8=E6=88=B7=E6=97=B6=E7=BC=BA=E5=A4=B1=E8=B4=9F?= =?UTF-8?q?=E8=B4=A3=E9=83=A8=E9=97=A8=E5=88=97issues/I2SDU1=20=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E5=AF=BC=E5=85=A5=E9=83=A8=E9=97=A8=E4=BB=A5=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=83=BD=E8=BF=BD=E5=8A=A0=E4=B8=8B=E4=B8=80?= =?UTF-8?q?=E7=BA=A7=E9=83=A8=E9=97=A8=20#2245?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ant-design-vue-jeecg/src/components/page/GlobalLayout.vue | 5 +++++ .../src/views/system/modules/DeptUserInfo.vue | 6 ++++++ .../modules/system/controller/SysDepartController.java | 6 +++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue b/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue index b44304f7..0eedf3e9 100644 --- a/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue +++ b/ant-design-vue-jeecg/src/components/page/GlobalLayout.vue @@ -131,6 +131,11 @@ //--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------ //this.menus = this.mainRouters.find((item) => item.path === '/').children; this.menus = this.permissionMenuList + + //--update-begin----author:liusq---date:20210223------for:关于测边菜单遮挡内容问题详细说明 #2255 + this.collapsed=!this.sidebarOpened; + //--update-begin----author:liusq---date:20210223------for:关于测边菜单遮挡内容问题详细说明 #2255 + // 根据后台配置菜单,重新排序加载路由信息 //console.log('----加载菜单逻辑----') //console.log(this.mainRouters) diff --git a/ant-design-vue-jeecg/src/views/system/modules/DeptUserInfo.vue b/ant-design-vue-jeecg/src/views/system/modules/DeptUserInfo.vue index 6868b507..3ceb1e0d 100644 --- a/ant-design-vue-jeecg/src/views/system/modules/DeptUserInfo.vue +++ b/ant-design-vue-jeecg/src/views/system/modules/DeptUserInfo.vue @@ -123,6 +123,7 @@ return { description: '用户信息', currentDeptId: '', + currentDept: {}, // 表头 columns: [{ title: '用户账号', @@ -260,6 +261,7 @@ open(record) { //console.log(record); this.currentDeptId = record.id; + this.currentDept = record; this.loadData(1); }, clearList() { @@ -291,8 +293,12 @@ this.$message.error("请选择一个部门!") } else { this.$refs.modalForm.departDisabled = true; + //初始化负责部门 this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId]; //传入一个部门id this.$refs.modalForm.add(); + //update-begin---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------ + this.$refs.modalForm.resultDepartOptions=[{key:this.currentDept.key,title:this.currentDept.title}] + //update-end---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------ this.$refs.modalForm.title = "新增"; } }, diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java index 30484939..0d27e2d8 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java @@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.ImportExcelUtil; +import org.jeecg.common.util.YouBianCodeUtil; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysUser; @@ -332,7 +333,7 @@ public class SysDepartController { params.setNeedSave(true); try { // orgCode编码长度 - int codeLength = 3; + int codeLength = YouBianCodeUtil.zhanweiLength; listSysDeparts = ExcelImportUtil.importExcel(file.getInputStream(), SysDepart.class, params); //按长度排序 Collections.sort(listSysDeparts, new Comparator() { @@ -362,6 +363,9 @@ public class SysDepartController { }else{ sysDepart.setParentId(""); } + //update-begin---author:liusq Date:20210223 for:批量导入部门以后,不能追加下一级部门 #2245------------ + sysDepart.setOrgType(sysDepart.getOrgCode().length()/codeLength+""); + //update-end---author:liusq Date:20210223 for:批量导入部门以后,不能追加下一级部门 #2245------------ sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); ImportExcelUtil.importDateSaveOne(sysDepart, ISysDepartService.class, errorMessageList, num, CommonConstant.SQL_INDEX_UNIQ_DEPART_ORG_CODE); num++;