Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
16dc6ab5
Commit
16dc6ab5
authored
Oct 08, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
父部门不能选择&选择树自适应
parent
5b2664a8
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
39 additions
and
24 deletions
+39
-24
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DeptController.java
+7
-1
ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html
+4
-1
ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html
+4
-1
ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
+4
-1
ruoyi-admin/src/main/resources/templates/system/dept/add.html
+0
-1
ruoyi-admin/src/main/resources/templates/system/dept/edit.html
+12
-8
ruoyi-admin/src/main/resources/templates/system/menu/add.html
+0
-1
ruoyi-admin/src/main/resources/templates/system/menu/edit.html
+2
-5
ruoyi-admin/src/main/resources/templates/system/user/add.html
+0
-1
ruoyi-admin/src/main/resources/templates/system/user/edit.html
+0
-1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
+6
-3
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DeptController.java
View file @
16dc6ab5
...
...
@@ -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"
;
}
...
...
ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html
View file @
16dc6ab5
...
...
@@ -31,7 +31,7 @@
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-
success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:job:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
<a
class=
"btn btn-
warning btn-rounded btn-sm"
onclick=
"$.form.reset()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
...
...
@@ -45,6 +45,9 @@
<a
class=
"btn btn-danger"
onclick=
"$.operate.clean()"
shiro:hasPermission=
"monitor:job:remove"
>
<i
class=
"fa fa-trash"
></i>
清空
</a>
<a
class=
"btn btn-warning"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:job:export"
>
<i
class=
"fa fa-download"
></i>
导出
</a>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
...
...
ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html
View file @
16dc6ab5
...
...
@@ -31,7 +31,7 @@
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-
success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:logininfor:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
<a
class=
"btn btn-
warning btn-rounded btn-sm"
onclick=
"$.form.reset()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
...
...
@@ -45,6 +45,9 @@
<a
class=
"btn btn-danger"
onclick=
"$.operate.clean()"
shiro:hasPermission=
"monitor:logininfor:remove"
>
<i
class=
"fa fa-trash"
></i>
清空
</a>
<a
class=
"btn btn-warning"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:logininfor:export"
>
<i
class=
"fa fa-download"
></i>
导出
</a>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
...
...
ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
View file @
16dc6ab5
...
...
@@ -31,7 +31,7 @@
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-
success btn-rounded btn-sm"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:logininfor:export"
><i
class=
"fa fa-download"
></i>
导出
</a>
<a
class=
"btn btn-
warning btn-rounded btn-sm"
onclick=
"$.form.reset()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
...
...
@@ -45,6 +45,9 @@
<a
class=
"btn btn-danger"
onclick=
"$.operate.clean()"
shiro:hasPermission=
"monitor:logininfor:remove"
>
<i
class=
"fa fa-trash"
></i>
清空
</a>
<a
class=
"btn btn-warning"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"monitor:logininfor:export"
>
<i
class=
"fa fa-download"
></i>
导出
</a>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
...
...
ruoyi-admin/src/main/resources/templates/system/dept/add.html
View file @
16dc6ab5
...
...
@@ -107,7 +107,6 @@
var
options
=
{
title
:
'部门选择'
,
width
:
"380"
,
height
:
"380"
,
url
:
prefix
+
"/selectDeptTree/"
+
$
(
"#treeId"
).
val
(),
callBack
:
doSubmit
};
...
...
ruoyi-admin/src/main/resources/templates/system/dept/edit.html
View file @
16dc6ab5
...
...
@@ -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
){
...
...
ruoyi-admin/src/main/resources/templates/system/menu/add.html
View file @
16dc6ab5
...
...
@@ -151,7 +151,6 @@
var
options
=
{
title
:
'菜单选择'
,
width
:
"380"
,
height
:
"380"
,
url
:
url
,
callBack
:
doSubmit
};
...
...
ruoyi-admin/src/main/resources/templates/system/menu/edit.html
View file @
16dc6ab5
...
...
@@ -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
(
"主菜单不能选择"
);
}
}
...
...
ruoyi-admin/src/main/resources/templates/system/user/add.html
View file @
16dc6ab5
...
...
@@ -216,7 +216,6 @@
var
options
=
{
title
:
'选择部门'
,
width
:
"380"
,
height
:
"380"
,
url
:
ctx
+
"system/dept/selectDeptTree/"
+
deptId
,
callBack
:
doSubmit
};
...
...
ruoyi-admin/src/main/resources/templates/system/user/edit.html
View file @
16dc6ab5
...
...
@@ -189,7 +189,6 @@
var
options
=
{
title
:
'选择部门'
,
width
:
"380"
,
height
:
"380"
,
url
:
url
,
callBack
:
doSubmit
};
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
View file @
16dc6ab5
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment