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 131 //--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
132 132 //this.menus = this.mainRouters.find((item) => item.path === '/').children;
133 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 140 //console.log('----加载菜单逻辑----')
136 141 //console.log(this.mainRouters)
... ...
ant-design-vue-jeecg/src/views/system/modules/DeptUserInfo.vue
... ... @@ -123,6 +123,7 @@
123 123 return {
124 124 description: '用户信息',
125 125 currentDeptId: '',
  126 + currentDept: {},
126 127 // 表头
127 128 columns: [{
128 129 title: '用户账号',
... ... @@ -260,6 +261,7 @@
260 261 open(record) {
261 262 //console.log(record);
262 263 this.currentDeptId = record.id;
  264 + this.currentDept = record;
263 265 this.loadData(1);
264 266 },
265 267 clearList() {
... ... @@ -291,8 +293,12 @@
291 293 this.$message.error("请选择一个部门!")
292 294 } else {
293 295 this.$refs.modalForm.departDisabled = true;
  296 + //初始化负责部门
294 297 this.$refs.modalForm.userDepartModel.departIdList = [this.currentDeptId]; //传入一个部门id
295 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 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 16 import org.jeecg.common.system.util.JwtUtil;
17 17 import org.jeecg.common.system.vo.LoginUser;
18 18 import org.jeecg.common.util.ImportExcelUtil;
  19 +import org.jeecg.common.util.YouBianCodeUtil;
19 20 import org.jeecg.common.util.oConvertUtils;
20 21 import org.jeecg.modules.system.entity.SysDepart;
21 22 import org.jeecg.modules.system.entity.SysUser;
... ... @@ -332,7 +333,7 @@ public class SysDepartController {
332 333 params.setNeedSave(true);
333 334 try {
334 335 // orgCode编码长度
335   - int codeLength = 3;
  336 + int codeLength = YouBianCodeUtil.zhanweiLength;
336 337 listSysDeparts = ExcelImportUtil.importExcel(file.getInputStream(), SysDepart.class, params);
337 338 //按长度排序
338 339 Collections.sort(listSysDeparts, new Comparator<SysDepart>() {
... ... @@ -362,6 +363,9 @@ public class SysDepartController {
362 363 }else{
363 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 369 sysDepart.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
366 370 ImportExcelUtil.importDateSaveOne(sysDepart, ISysDepartService.class, errorMessageList, num, CommonConstant.SQL_INDEX_UNIQ_DEPART_ORG_CODE);
367 371 num++;
... ...