Commit a6fc09999a8b421c3291c2658e251d8ded7eae9f

Authored by zhangdaiscott
1 parent 4bf7eb73

关于测边菜单遮挡内容问题详细说明 #2255

部门管理员添加上级用户时缺失负责部门列issues/I2SDU1
批量导入部门以后,不能追加下一级部门 #2245
ant-design-vue-jeecg/src/components/page/GlobalLayout.vue
@@ -131,6 +131,11 @@ @@ -131,6 +131,11 @@
131 //--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------ 131 //--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
132 //this.menus = this.mainRouters.find((item) => item.path === '/').children; 132 //this.menus = this.mainRouters.find((item) => item.path === '/').children;
133 this.menus = this.permissionMenuList 133 this.menus = this.permissionMenuList
  134 +
  135 + //--update-begin----author:liusq---date:20210223------for:关于测边菜单遮挡内容问题详细说明 #2255
  136 + this.collapsed=!this.sidebarOpened;
  137 + //--update-begin----author:liusq---date:20210223------for:关于测边菜单遮挡内容问题详细说明 #2255
  138 +
134 // 根据后台配置菜单,重新排序加载路由信息 139 // 根据后台配置菜单,重新排序加载路由信息
135 //console.log('----加载菜单逻辑----') 140 //console.log('----加载菜单逻辑----')
136 //console.log(this.mainRouters) 141 //console.log(this.mainRouters)
ant-design-vue-jeecg/src/views/system/modules/DeptUserInfo.vue
@@ -123,6 +123,7 @@ @@ -123,6 +123,7 @@
123 return { 123 return {
124 description: '用户信息', 124 description: '用户信息',
125 currentDeptId: '', 125 currentDeptId: '',
  126 + currentDept: {},
126 // 表头 127 // 表头
127 columns: [{ 128 columns: [{
128 title: '用户账号', 129 title: '用户账号',
@@ -260,6 +261,7 @@ @@ -260,6 +261,7 @@
260 open(record) { 261 open(record) {
261 //console.log(record); 262 //console.log(record);
262 this.currentDeptId = record.id; 263 this.currentDeptId = record.id;
  264 + this.currentDept = record;
263 this.loadData(1); 265 this.loadData(1);
264 }, 266 },
265 clearList() { 267 clearList() {
@@ -291,8 +293,12 @@ @@ -291,8 +293,12 @@
291 this.$message.error("请选择一个部门!") 293 this.$message.error("请选择一个部门!")
292 } else { 294 } else {
293 this.$refs.modalForm.departDisabled = true; 295 this.$refs.modalForm.departDisabled = true;
  296 + //初始化负责部门
294 this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId]; //传入一个部门id 297 this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId]; //传入一个部门id
295 this.$refs.modalForm.add(); 298 this.$refs.modalForm.add();
  299 + //update-begin---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
  300 + this.$refs.modalForm.resultDepartOptions=[{key:this.currentDept.key,title:this.currentDept.title}]
  301 + //update-end---author:liusq Date:20210223 for:https://gitee.com/jeecg/jeecg-boot/issues/I2SDU1------------
296 this.$refs.modalForm.title = "新增"; 302 this.$refs.modalForm.title = "新增";
297 } 303 }
298 }, 304 },
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; @@ -16,6 +16,7 @@ import org.jeecg.common.system.query.QueryGenerator;
16 import org.jeecg.common.system.util.JwtUtil; 16 import org.jeecg.common.system.util.JwtUtil;
17 import org.jeecg.common.system.vo.LoginUser; 17 import org.jeecg.common.system.vo.LoginUser;
18 import org.jeecg.common.util.ImportExcelUtil; 18 import org.jeecg.common.util.ImportExcelUtil;
  19 +import org.jeecg.common.util.YouBianCodeUtil;
19 import org.jeecg.common.util.oConvertUtils; 20 import org.jeecg.common.util.oConvertUtils;
20 import org.jeecg.modules.system.entity.SysDepart; 21 import org.jeecg.modules.system.entity.SysDepart;
21 import org.jeecg.modules.system.entity.SysUser; 22 import org.jeecg.modules.system.entity.SysUser;
@@ -332,7 +333,7 @@ public class SysDepartController { @@ -332,7 +333,7 @@ public class SysDepartController {
332 params.setNeedSave(true); 333 params.setNeedSave(true);
333 try { 334 try {
334 // orgCode编码长度 335 // orgCode编码长度
335 - int codeLength = 3; 336 + int codeLength = YouBianCodeUtil.zhanweiLength;
336 listSysDeparts = ExcelImportUtil.importExcel(file.getInputStream(), SysDepart.class, params); 337 listSysDeparts = ExcelImportUtil.importExcel(file.getInputStream(), SysDepart.class, params);
337 //按长度排序 338 //按长度排序
338 Collections.sort(listSysDeparts, new Comparator<SysDepart>() { 339 Collections.sort(listSysDeparts, new Comparator<SysDepart>() {
@@ -362,6 +363,9 @@ public class SysDepartController { @@ -362,6 +363,9 @@ public class SysDepartController {
362 }else{ 363 }else{
363 sysDepart.setParentId(""); 364 sysDepart.setParentId("");
364 } 365 }
  366 + //update-begin---author:liusq Date:20210223 for:批量导入部门以后,不能追加下一级部门 #2245------------
  367 + sysDepart.setOrgType(sysDepart.getOrgCode().length()/codeLength+"");
  368 + //update-end---author:liusq Date:20210223 for:批量导入部门以后,不能追加下一级部门 #2245------------
365 sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); 369 sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
366 ImportExcelUtil.importDateSaveOne(sysDepart, ISysDepartService.class, errorMessageList, num, CommonConstant.SQL_INDEX_UNIQ_DEPART_ORG_CODE); 370 ImportExcelUtil.importDateSaveOne(sysDepart, ISysDepartService.class, errorMessageList, num, CommonConstant.SQL_INDEX_UNIQ_DEPART_ORG_CODE);
367 num++; 371 num++;