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
04f292f4
Commit
04f292f4
authored
Dec 11, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部门列表展示
parent
b9ff2e18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
23 deletions
+102
-23
src/main/webapp/WEB-INF/common/_container.html
+6
-0
src/main/webapp/WEB-INF/system/dept/dept.html
+13
-3
src/main/webapp/assets/common/plugins/bootstrap-treeview/bootstrap-treeview.min.css
+20
-0
src/main/webapp/assets/common/plugins/bootstrap-treeview/bootstrap-treeview.min.js
+0
-0
src/main/webapp/assets/modular/system/dept/dept.js
+63
-20
No files found.
src/main/webapp/WEB-INF/common/_container.html
View file @
04f292f4
...
@@ -65,6 +65,9 @@
...
@@ -65,6 +65,9 @@
@if(array.contain(plugins,"bootstrap-treetable")){
@if(array.contain(plugins,"bootstrap-treetable")){
<link
href=
"${ctxPath}/assets/common/plugins/bootstrap-treetable/bootstrap-treetable.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
href=
"${ctxPath}/assets/common/plugins/bootstrap-treetable/bootstrap-treetable.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
@}
@}
@if(array.contain(plugins,"treeview")){
<link
href=
"${ctxPath}/assets/common/plugins/bootstrap-treeview/bootstrap-treeview.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
@}
@}
@}
<!--其他业务用的css-->
<!--其他业务用的css-->
...
@@ -166,6 +169,9 @@
...
@@ -166,6 +169,9 @@
<script
src=
"${ctxPath}/assets/common/plugins/bootstrap-treetable/bootstrap-treetable.min.js"
></script>
<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>
<script
src=
"${ctxPath}/assets/common/plugins/bootstrap-treetable/bootstrap-treetable-object.js"
></script>
@}
@}
@if(array.contain(plugins,"treeview")){
<script
src=
"${ctxPath}/assets/common/plugins/bootstrap-treeview/bootstrap-treeview.min.js"
></script>
@}
@}
@}
<!--其他业务用的js-->
<!--其他业务用的js-->
...
...
src/main/webapp/WEB-INF/system/dept/dept.html
View file @
04f292f4
@layout("/common/_container.html",{plugins:["table","layer","
bootstrap-treetable
"],js:["/assets/modular/system/dept/dept.js"]}){
@layout("/common/_container.html",{plugins:["table","layer","
sweet-alert","treeview
"],js:["/assets/modular/system/dept/dept.js"]}){
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-12"
id=
"deptPage"
>
<div
class=
"col-lg-2 col-sm-3 p-r-0"
>
<div
class=
"card card-outline-theme"
>
<div
class=
"card-header"
>
<h5
class=
"m-b-0 text-white"
>
部门树列表
</h5>
</div>
<div
class=
"card-body"
>
<ul
id=
"deptTree"
class=
"p-l-0"
></ul>
</div>
</div>
</div>
<div
class=
"col-lg-10 col-sm-9"
id=
"deptPage"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"col-lg-12"
>
<div
class=
"card card-outline-theme m-b-10"
>
<div
class=
"card card-outline-theme m-b-10"
>
...
@@ -41,7 +51,7 @@
...
@@ -41,7 +51,7 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"col-lg-12"
>
<div
class=
"card m-b-0 p-b-0"
>
<div
class=
"card m-b-0 p-b-0"
>
<div
class=
"hidden-xs"
id=
"
manager
TableToolbar"
role=
"group"
>
<div
class=
"hidden-xs"
id=
"
Dept
TableToolbar"
role=
"group"
>
@if(shiro.hasPermission("/dept/add")){
@if(shiro.hasPermission("/dept/add")){
<button
type=
"button"
class=
"btn btn-primary waves-effect m-l-5"
onclick=
"Dept.openAddDept()"
>
<button
type=
"button"
class=
"btn btn-primary waves-effect m-l-5"
onclick=
"Dept.openAddDept()"
>
<i
class=
"fa fa-check-circle"
></i>
添加
<i
class=
"fa fa-check-circle"
></i>
添加
...
...
src/main/webapp/assets/common/plugins/bootstrap-treeview/bootstrap-treeview.min.css
0 → 100644
View file @
04f292f4
.treeview
.list-group-item
{
cursor
:
pointer
;
padding
:
.5rem
1.25rem
;
}
.treeview
span
.indent
{
margin-left
:
10px
;
margin-right
:
10px
}
.treeview
span
.icon
{
width
:
12px
;
margin-right
:
5px
}
.treeview
.node-disabled
{
color
:
silver
;
cursor
:
not-allowed
}
\ No newline at end of file
src/main/webapp/assets/common/plugins/bootstrap-treeview/bootstrap-treeview.min.js
0 → 100644
View file @
04f292f4
This diff is collapsed.
Click to expand it.
src/main/webapp/assets/modular/system/dept/dept.js
View file @
04f292f4
...
@@ -17,10 +17,10 @@ var Dept = {
...
@@ -17,10 +17,10 @@ var Dept = {
Dept
.
initColumn
=
function
()
{
Dept
.
initColumn
=
function
()
{
return
[
return
[
{
field
:
'selectItem'
,
radio
:
true
},
{
field
:
'selectItem'
,
radio
:
true
},
{
title
:
'id'
,
field
:
'
i
d'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'50px'
},
{
title
:
'id'
,
field
:
'
deptI
d'
,
align
:
'center'
,
valign
:
'middle'
,
width
:
'50px'
},
{
title
:
'部门简称'
,
field
:
'simple
n
ame'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'部门简称'
,
field
:
'simple
N
ame'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'部门全称'
,
field
:
'full
n
ame'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'部门全称'
,
field
:
'full
N
ame'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'排序'
,
field
:
'
num
'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'排序'
,
field
:
'
sort
'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'备注'
,
field
:
'description'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}];
{
title
:
'备注'
,
field
:
'description'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}];
};
};
...
@@ -28,8 +28,8 @@ Dept.initColumn = function () {
...
@@ -28,8 +28,8 @@ Dept.initColumn = function () {
* 检查是否选中
* 检查是否选中
*/
*/
Dept
.
check
=
function
()
{
Dept
.
check
=
function
()
{
var
selected
=
$
(
'#'
+
this
.
id
).
bootstrapT
reeT
able
(
'getSelections'
);
var
selected
=
$
(
'#'
+
this
.
id
).
bootstrapTable
(
'getSelections'
);
if
(
selected
.
length
==
0
)
{
if
(
selected
.
length
==
=
0
)
{
Feng
.
info
(
"请先选中表格中的某一记录!"
);
Feng
.
info
(
"请先选中表格中的某一记录!"
);
return
false
;
return
false
;
}
else
{
}
else
{
...
@@ -42,7 +42,7 @@ Dept.check = function () {
...
@@ -42,7 +42,7 @@ Dept.check = function () {
* 点击添加部门
* 点击添加部门
*/
*/
Dept
.
openAddDept
=
function
()
{
Dept
.
openAddDept
=
function
()
{
var
i
ndex
=
layer
.
open
({
this
.
layerI
ndex
=
layer
.
open
({
type
:
2
,
type
:
2
,
title
:
'添加部门'
,
title
:
'添加部门'
,
area
:
[
'800px'
,
'420px'
],
//宽高
area
:
[
'800px'
,
'420px'
],
//宽高
...
@@ -50,7 +50,6 @@ Dept.openAddDept = function () {
...
@@ -50,7 +50,6 @@ Dept.openAddDept = function () {
maxmin
:
true
,
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/dept/dept_add'
content
:
Feng
.
ctxPath
+
'/dept/dept_add'
});
});
this
.
layerIndex
=
index
;
};
};
/**
/**
...
@@ -58,15 +57,14 @@ Dept.openAddDept = function () {
...
@@ -58,15 +57,14 @@ Dept.openAddDept = function () {
*/
*/
Dept
.
openDeptDetail
=
function
()
{
Dept
.
openDeptDetail
=
function
()
{
if
(
this
.
check
())
{
if
(
this
.
check
())
{
var
i
ndex
=
layer
.
open
({
this
.
layerI
ndex
=
layer
.
open
({
type
:
2
,
type
:
2
,
title
:
'部门详情'
,
title
:
'部门详情'
,
area
:
[
'800px'
,
'420px'
],
//宽高
area
:
[
'800px'
,
'420px'
],
//宽高
fix
:
false
,
//不固定
fix
:
false
,
//不固定
maxmin
:
true
,
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/dept/dept_update/'
+
Dept
.
seItem
.
i
d
content
:
Feng
.
ctxPath
+
'/dept/dept_update/'
+
Dept
.
seItem
.
deptI
d
});
});
this
.
layerIndex
=
index
;
}
}
};
};
...
@@ -83,7 +81,7 @@ Dept.delete = function () {
...
@@ -83,7 +81,7 @@ Dept.delete = function () {
},
function
(
data
)
{
},
function
(
data
)
{
Feng
.
error
(
"删除失败!"
+
data
.
responseJSON
.
message
+
"!"
);
Feng
.
error
(
"删除失败!"
+
data
.
responseJSON
.
message
+
"!"
);
});
});
ajax
.
set
(
"deptId"
,
Dept
.
seItem
.
i
d
);
ajax
.
set
(
"deptId"
,
Dept
.
seItem
.
deptI
d
);
ajax
.
start
();
ajax
.
start
();
};
};
...
@@ -101,19 +99,64 @@ Dept.search = function () {
...
@@ -101,19 +99,64 @@ Dept.search = function () {
};
};
$
(
function
()
{
$
(
function
()
{
var
defaultData
=
[
{
text
:
'Parent 1'
,
href
:
'#parent1'
,
tags
:
[
'4'
],
nodes
:
[
{
text
:
'Child 1'
,
href
:
'#child1'
,
tags
:
[
'2'
],
nodes
:
[
{
text
:
'Grandchild 1'
,
href
:
'#grandchild1'
,
tags
:
[
'0'
]
},
{
text
:
'Grandchild 2'
,
href
:
'#grandchild2'
,
tags
:
[
'0'
]
}
]
},
{
text
:
'Child 2'
,
href
:
'#child2'
,
tags
:
[
'0'
]
}
]
},
{
text
:
'Parent 2'
},
{
text
:
'Parent 3'
},
{
text
:
'Parent 4'
}
];
$
(
'#deptTree'
).
treeview
({
selectedBackColor
:
"#03a9f3"
,
onhoverColor
:
"rgba(0, 0, 0, 0.05)"
,
expandIcon
:
'ti-plus'
,
collapseIcon
:
'ti-minus'
,
nodeIcon
:
'fa fa-home'
,
data
:
defaultData
});
Dept
.
app
=
new
Vue
({
Dept
.
app
=
new
Vue
({
el
:
'#deptPage'
,
el
:
'#deptPage'
,
data
:
Dept
.
condition
data
:
Dept
.
condition
});
});
var
defaultColunms
=
Dept
.
initColumn
();
var
defaultColunms
=
Dept
.
initColumn
();
var
table
=
new
BSTreeTable
(
'DeptTable'
,
"/dept/list"
,
defaultColunms
);
var
table
=
new
BSTable
(
"DeptTable"
,
"/dept/list"
,
defaultColunms
);
table
.
setExpandColumn
(
2
);
table
.
setPaginationType
(
"client"
);
table
.
setIdField
(
"id"
);
table
.
setCodeField
(
"id"
);
table
.
setParentCodeField
(
"pid"
);
table
.
setExpandAll
(
true
);
table
.
init
();
Dept
.
table
=
table
.
init
();
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