diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DeptController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DeptController.java
index f6739938..3f88016a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DeptController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DeptController.java
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
@@ -79,7 +80,12 @@ public class DeptController extends BaseController
@GetMapping("/edit/{deptId}")
public String edit(@PathVariable("deptId") Long deptId, ModelMap mmap)
{
- mmap.put("dept", deptService.selectDeptById(deptId));
+ SysDept dept = deptService.selectDeptById(deptId);
+ if (StringUtils.isNotNull(dept) && 100L == deptId)
+ {
+ dept.setParentName("无");
+ }
+ mmap.put("dept", dept);
return prefix + "/edit";
}
diff --git a/ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html b/ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html
index ab612e13..9f10e35d 100644
--- a/ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html
+++ b/ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html
@@ -31,7 +31,7 @@
搜索
- 导出
+ 重置
@@ -45,6 +45,9 @@
清空
+
+ 导出
+
diff --git a/ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html b/ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html
index c88f20de..e2da5cca 100644
--- a/ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html
+++ b/ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html
@@ -31,7 +31,7 @@
搜索
- 导出
+ 重置
@@ -45,6 +45,9 @@
清空
+
+ 导出
+
diff --git a/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html b/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
index 12594921..f358243a 100644
--- a/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
+++ b/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
@@ -31,7 +31,7 @@
搜索
- 导出
+ 重置
@@ -45,6 +45,9 @@
清空
+
+ 导出
+
diff --git a/ruoyi-admin/src/main/resources/templates/system/dept/add.html b/ruoyi-admin/src/main/resources/templates/system/dept/add.html
index c61873cf..4cefb040 100644
--- a/ruoyi-admin/src/main/resources/templates/system/dept/add.html
+++ b/ruoyi-admin/src/main/resources/templates/system/dept/add.html
@@ -107,7 +107,6 @@
var options = {
title: '部门选择',
width: "380",
- height: "380",
url: prefix + "/selectDeptTree/" + $("#treeId").val(),
callBack: doSubmit
};
diff --git a/ruoyi-admin/src/main/resources/templates/system/dept/edit.html b/ruoyi-admin/src/main/resources/templates/system/dept/edit.html
index c9ec775c..6dd926d4 100644
--- a/ruoyi-admin/src/main/resources/templates/system/dept/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/dept/edit.html
@@ -108,14 +108,18 @@
/*部门管理-修改-选择部门树*/
function selectDeptTree() {
- var options = {
- title: '部门选择',
- width: "380",
- height: "380",
- url: prefix + "/selectDeptTree/" + $("#treeId").val(),
- callBack: doSubmit
- };
- $.modal.openOptions(options);
+ var deptId = $("#treeId").val();
+ if(deptId > 0) {
+ var options = {
+ title: '部门选择',
+ width: "380",
+ url: prefix + "/selectDeptTree/" + $("#treeId").val(),
+ callBack: doSubmit
+ };
+ $.modal.openOptions(options);
+ } else {
+ $.modal.alertError("父部门不能选择");
+ }
}
function doSubmit(index, layero){
diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/add.html b/ruoyi-admin/src/main/resources/templates/system/menu/add.html
index d7e994bd..7b233f2a 100644
--- a/ruoyi-admin/src/main/resources/templates/system/menu/add.html
+++ b/ruoyi-admin/src/main/resources/templates/system/menu/add.html
@@ -151,7 +151,6 @@
var options = {
title: '菜单选择',
width: "380",
- height: "380",
url: url,
callBack: doSubmit
};
diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
index 243322ea..aec02648 100644
--- a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
@@ -164,8 +164,7 @@
if(menuId > 0) {
var url = prefix + "/selectMenuTree/" + menuId;
$.modal.open("选择菜单", url, '380', '380');
- }
- else {
+ } else {
$.modal.alertError("主菜单不能选择");
}
}
@@ -177,13 +176,11 @@
var options = {
title: '菜单选择',
width: "380",
- height: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
- }
- else {
+ } else {
$.modal.alertError("主菜单不能选择");
}
}
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/add.html b/ruoyi-admin/src/main/resources/templates/system/user/add.html
index 3205d732..9884be4f 100644
--- a/ruoyi-admin/src/main/resources/templates/system/user/add.html
+++ b/ruoyi-admin/src/main/resources/templates/system/user/add.html
@@ -216,7 +216,6 @@
var options = {
title: '选择部门',
width: "380",
- height: "380",
url: ctx + "system/dept/selectDeptTree/" + deptId,
callBack: doSubmit
};
diff --git a/ruoyi-admin/src/main/resources/templates/system/user/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/edit.html
index d62a6b47..8260e04d 100644
--- a/ruoyi-admin/src/main/resources/templates/system/user/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/user/edit.html
@@ -189,7 +189,6 @@
var options = {
title: '选择部门',
width: "380",
- height: "380",
url: url,
callBack: doSubmit
};
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
index 57e33944..62eb572b 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -173,9 +173,12 @@ public class SysDeptServiceImpl implements ISysDeptService
public int updateDept(SysDept dept)
{
SysDept info = deptMapper.selectDeptById(dept.getParentId());
- String ancestors = info.getAncestors() + "," + dept.getParentId();
- dept.setAncestors(ancestors);
- updateDeptChildren(dept.getDeptId(), ancestors);
+ if (StringUtils.isNotNull(info))
+ {
+ String ancestors = info.getAncestors() + "," + dept.getParentId();
+ dept.setAncestors(ancestors);
+ updateDeptChildren(dept.getDeptId(), ancestors);
+ }
return deptMapper.updateDept(dept);
}