Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
50ddf91f
Commit
50ddf91f
authored
Dec 05, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部门管理
parent
c56b9d96
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
35 deletions
+80
-35
src/main/webapp/WEB-INF/common/_container.html
+1
-0
src/main/webapp/WEB-INF/system/dept/dept.html
+62
-27
src/main/webapp/assets/common/plugins/bootstrap-treetable/bootstrap-treetable-object.js
+0
-0
src/main/webapp/assets/modular/system/dept/dept.js
+17
-8
No files found.
src/main/webapp/WEB-INF/common/_container.html
View file @
50ddf91f
...
...
@@ -164,6 +164,7 @@
@}
@if(array.contain(plugins,"bootstrap-treetable")){
<script
src=
"${ctxPath}/assets/common/plugins/bootstrap-treetable/bootstrap-treetable.min.js"
></script>
<script
src=
"${ctxPath}/assets/common/plugins/bootstrap-treetable/bootstrap-treetable-object.js"
></script>
@}
@}
...
...
src/main/webapp/WEB-INF/system/dept/dept.html
View file @
50ddf91f
@layout("/common/_container.html"){
@layout("/common/_container.html"
,{plugins:["table","layer","bootstrap-treetable"],js:["/assets/modular/system/dept/dept.js"]}
){
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<h5>
部门管理
</h5>
</div>
<div
class=
"ibox-content"
>
<div
class=
"row row-lg"
>
<div
class=
"col-sm-12"
>
<div
class=
"row"
>
<div
class=
"col-sm-3"
>
<
#
NameCon
id=
"condition"
name=
"名称"
/>
</div>
<div
class=
"col-sm-3"
>
<
#
button
name=
"搜索"
icon=
"fa-search"
clickFun=
"Dept.search()"
/>
<div
class=
"col-12"
id=
"deptPage"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"card card-outline-theme m-b-10"
>
<div
class=
"card-body"
>
<div
class=
"form-horizontal"
>
<div
class=
"form-body"
>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<div
class=
"input-group"
>
<div
class=
"input-group-prepend"
>
<div
class=
"input-group-text"
>
部门名称
</div>
</div>
<input
v-model=
"name"
type=
"text"
class=
"form-control"
placeholder=
""
autocomplete=
"off"
>
</div>
</div>
<div
class=
"col-md-3"
>
<div
class=
"input-group condition-button"
>
<div
class=
"input-group-btn condition-button"
>
<button
type=
"button"
id=
"check-minutes"
class=
"btn btn-info waves-effect waves-light condition-button-width"
onclick=
"Dept.search()"
>
查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"hidden-xs"
id=
"DeptTableToolbar"
role=
"group"
>
@if(shiro.hasPermission("/dept/add")){
<
#
button
name=
"添加"
icon=
"fa-plus"
clickFun=
"Dept.openAddDept()"
/>
@}
@if(shiro.hasPermission("/dept/update")){
<
#
button
name=
"修改"
icon=
"fa-plus"
clickFun=
"Dept.openDeptDetail()"
space=
"true"
/>
@}
@if(shiro.hasPermission("/dept/delete")){
<
#
button
name=
"删除"
icon=
"fa-plus"
clickFun=
"Dept.delete()"
space=
"true"
/>
@}
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"card card-outline-theme m-b-0"
>
<div
class=
"card-body p-t-0 p-b-0"
>
<div
class=
"form-horizontal"
>
<div
class=
"form-actions"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"card m-b-0 p-b-0"
>
<div
class=
"hidden-xs"
id=
"managerTableToolbar"
role=
"group"
>
@if(shiro.hasPermission("/dept/add")){
<button
type=
"button"
class=
"btn btn-primary waves-effect m-l-5"
onclick=
"Dept.openAddDept()"
>
<i
class=
"fa fa-check-circle"
></i>
添加
</button>
@}
@if(shiro.hasPermission("/dept/update")){
<button
type=
"button"
class=
"btn btn-primary waves-effect m-l-5"
onclick=
"Dept.openDeptDetail()"
>
<i
class=
"fa fa-check-circle"
></i>
修改
</button>
@}
@if(shiro.hasPermission("/dept/delete")){
<button
type=
"button"
class=
"btn btn-primary waves-effect m-l-5"
onclick=
"Dept.delete()"
>
<i
class=
"fa fa-check-circle"
></i>
删除
</button>
@}
</div>
<
#
table
id=
"DeptTable"
/>
</div>
</div>
</div>
</div>
</div>
<
#
table
id=
"DeptTable"
/>
</div>
</div>
</div>
</div>
</div>
</div>
<script
src=
"${ctxPath}/static/modular/system/dept/dept.js"
></script>
@}
src/main/webapp/assets/common/plugins/bootstrap-t
able/tree-
table-object.js
→
src/main/webapp/assets/common/plugins/bootstrap-t
reetable/bootstrap-tree
table-object.js
View file @
50ddf91f
File moved
src/main/webapp/assets/modular/system/dept/dept.js
View file @
50ddf91f
...
...
@@ -5,7 +5,10 @@ var Dept = {
id
:
"DeptTable"
,
//表格id
seItem
:
null
,
//选中的条目
table
:
null
,
layerIndex
:
-
1
layerIndex
:
-
1
,
condition
:
{
name
:
''
}
};
/**
...
...
@@ -14,7 +17,7 @@ var Dept = {
Dept
.
initColumn
=
function
()
{
return
[
{
field
:
'selectItem'
,
radio
:
true
},
{
title
:
'id'
,
field
:
'id'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'50px'
},
{
title
:
'id'
,
field
:
'id'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'50px'
},
{
title
:
'部门简称'
,
field
:
'simplename'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'部门全称'
,
field
:
'fullname'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'排序'
,
field
:
'num'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
...
...
@@ -26,10 +29,10 @@ Dept.initColumn = function () {
*/
Dept
.
check
=
function
()
{
var
selected
=
$
(
'#'
+
this
.
id
).
bootstrapTreeTable
(
'getSelections'
);
if
(
selected
.
length
==
0
)
{
if
(
selected
.
length
==
0
)
{
Feng
.
info
(
"请先选中表格中的某一记录!"
);
return
false
;
}
else
{
}
else
{
Dept
.
seItem
=
selected
[
0
];
return
true
;
}
...
...
@@ -73,14 +76,14 @@ Dept.openDeptDetail = function () {
Dept
.
delete
=
function
()
{
if
(
this
.
check
())
{
var
operation
=
function
()
{
var
operation
=
function
()
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/dept/delete"
,
function
()
{
Feng
.
success
(
"删除成功!"
);
Dept
.
table
.
refresh
();
},
function
(
data
)
{
Feng
.
error
(
"删除失败!"
+
data
.
responseJSON
.
message
+
"!"
);
});
ajax
.
set
(
"deptId"
,
Dept
.
seItem
.
id
);
ajax
.
set
(
"deptId"
,
Dept
.
seItem
.
id
);
ajax
.
start
();
};
...
...
@@ -98,13 +101,19 @@ Dept.search = function () {
};
$
(
function
()
{
Dept
.
app
=
new
Vue
({
el
:
'#deptPage'
,
data
:
Dept
.
condition
});
var
defaultColunms
=
Dept
.
initColumn
();
var
table
=
new
BSTreeTable
(
Dept
.
id
,
"/dept/list"
,
defaultColunms
);
var
table
=
new
BSTreeTable
(
'DeptTable'
,
"/dept/list"
,
defaultColunms
);
table
.
setExpandColumn
(
2
);
table
.
setIdField
(
"id"
);
table
.
setCodeField
(
"id"
);
table
.
setParentCodeField
(
"pid"
);
table
.
setExpandAll
(
true
);
table
.
init
();
Dept
.
table
=
table
;
Dept
.
table
=
table
.
init
();
});
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