Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fenghuo12
zheng
提交
fd92c9d9
Z
zheng
项目概览
fenghuo12
/
zheng
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zheng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fd92c9d9
编写于
2月 19, 2017
作者:
shuzheng5201314
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成组织管理
上级
f8cf93ae
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
252 addition
and
53 deletion
+252
-53
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/organization/create.jsp
...rc/main/webapp/WEB-INF/jsp/manage/organization/create.jsp
+92
-0
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/organization/index.jsp
...src/main/webapp/WEB-INF/jsp/manage/organization/index.jsp
+68
-53
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/organization/update.jsp
...rc/main/webapp/WEB-INF/jsp/manage/organization/update.jsp
+92
-0
未找到文件。
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/organization/create.jsp
0 → 100644
浏览文件 @
fd92c9d9
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<%@ taglib
uri=
"http://java.sun.com/jstl/core_rt"
prefix=
"c"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/fmt"
prefix=
"fmt"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/functions"
prefix=
"fn"
%>
<%@ taglib
uri=
"http://www.springframework.org/tags"
prefix=
"spring"
%>
<%@ taglib
uri=
"http://www.springframework.org/tags/form"
prefix=
"form"
%>
<%@taglib
prefix=
"shiro"
uri=
"http://shiro.apache.org/tags"
%>
<c:set
var=
"basePath"
value=
"
${
pageContext
.
request
.
contextPath
}
"
/>
<div
id=
"createDialog"
class=
"crudDialog"
>
<form
id=
"createForm"
method=
"post"
>
<div
class=
"form-group"
>
<label
for=
"name"
>
名称
</label>
<input
id=
"name"
type=
"text"
class=
"form-control"
name=
"name"
maxlength=
"20"
>
</div>
<div
class=
"form-group"
>
<label
for=
"description"
>
描述
</label>
<input
id=
"description"
type=
"text"
class=
"form-control"
name=
"description"
maxlength=
"300"
>
</div>
<div
class=
"form-group text-right"
>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"createSubmit();"
>
保存
</a>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"createDialog.close();"
>
取消
</a>
</div>
</form>
</div>
<script>
function
createSubmit
()
{
$
.
ajax
({
type
:
'
post
'
,
url
:
'
${basePath}/manage/organization/create
'
,
data
:
$
(
'
#createForm
'
).
serialize
(),
beforeSend
:
function
()
{
if
(
$
(
'
#name
'
).
val
()
==
''
)
{
$
(
'
#name
'
).
focus
();
return
false
;
}
},
success
:
function
(
result
)
{
if
(
result
.
code
!=
1
)
{
if
(
result
.
data
instanceof
Array
)
{
$
.
each
(
result
.
data
,
function
(
index
,
value
)
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
value
.
errorMsg
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
});
}
else
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
result
.
data
.
errorMsg
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
}
}
else
{
createDialog
.
close
();
$table
.
bootstrapTable
(
'
refresh
'
);
}
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
textStatus
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
}
});
}
</script>
\ No newline at end of file
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/organization/index.jsp
浏览文件 @
fd92c9d9
...
...
@@ -29,19 +29,6 @@
</div>
<table
id=
"table"
></table>
</div>
<!-- 新增 -->
<div
id=
"createDialog"
class=
"crudDialog"
hidden
>
<form>
<div
class=
"form-group"
>
<label
for=
"input1"
>
名称
</label>
<input
id=
"input1"
type=
"text"
class=
"form-control"
>
</div>
<div
class=
"form-group"
>
<label
for=
"input2"
>
描述
</label>
<input
id=
"input2"
type=
"text"
class=
"form-control"
>
</div>
</form>
</div>
<script
src=
"${basePath}/resources/zheng-ui/plugins/jquery.1.12.4.min.js"
></script>
<script
src=
"${basePath}/resources/zheng-ui/plugins/bootstrap-3.3.0/js/bootstrap.min.js"
></script>
<script
src=
"${basePath}/resources/zheng-ui/plugins/bootstrap-table-1.11.0/bootstrap-table.min.js"
></script>
...
...
@@ -82,15 +69,12 @@ $(function() {
maintainSelected
:
true
,
toolbar
:
'
#toolbar
'
,
columns
:
[
{
field
:
'
state
'
,
checkbox
:
true
},
{
field
:
'
ck
'
,
checkbox
:
true
},
{
field
:
'
organizationId
'
,
title
:
'
编号
'
,
sortable
:
true
,
align
:
'
center
'
},
{
field
:
'
name
'
,
title
:
'
组织名称
'
},
{
field
:
'
description
'
,
title
:
'
组织描述
'
},
{
field
:
'
action
'
,
title
:
'
操作
'
,
align
:
'
center
'
,
formatter
:
'
actionFormatter
'
,
events
:
'
actionEvents
'
,
clickToSelect
:
false
}
]
}).
on
(
'
all.bs.table
'
,
function
(
e
,
name
,
args
)
{
$
(
'
[data-toggle="tooltip"]
'
).
tooltip
();
$
(
'
[data-toggle="popover"]
'
).
popover
();
});
});
// 格式化操作按钮
...
...
@@ -101,34 +85,22 @@ function actionFormatter(value, row, index) {
].
join
(
''
);
}
// 新增
var
createDialog
;
function
createAction
()
{
$
.
confirm
({
type
:
'
dark
'
,
createDialog
=
$
.
dialog
({
animationSpeed
:
300
,
title
:
'
新增组织
'
,
content
:
$
(
'
#createDialog
'
).
html
(),
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button
'
,
action
:
function
()
{
$
.
alert
(
'
确认
'
);
}
},
cancel
:
{
text
:
'
取消
'
,
btnClass
:
'
waves-effect waves-button
'
}
}
content
:
'
url:${basePath}/manage/organization/create
'
});
}
// 编辑
var
updateDialog
;
function
updateAction
()
{
var
rows
=
$table
.
bootstrapTable
(
'
getSelections
'
);
if
(
rows
.
length
==
0
)
{
if
(
rows
.
length
!=
1
)
{
$
.
confirm
({
title
:
false
,
content
:
'
请
至少
选择一条记录!
'
,
content
:
'
请选择一条记录!
'
,
autoClose
:
'
cancel|3000
'
,
backgroundDismiss
:
true
,
buttons
:
{
...
...
@@ -139,28 +111,15 @@ function updateAction() {
}
});
}
else
{
$
.
confirm
({
type
:
'
blue
'
,
updateDialog
=
$
.
dialog
({
animationSpeed
:
300
,
title
:
'
编辑组织
'
,
content
:
$
(
'
#createDialog
'
).
html
(),
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button
'
,
action
:
function
()
{
$
.
alert
(
'
确认
'
);
}
},
cancel
:
{
text
:
'
取消
'
,
btnClass
:
'
waves-effect waves-button
'
}
}
content
:
'
url:${basePath}/manage/organization/update/
'
+
rows
[
0
].
organizationId
});
}
}
// 删除
var
deleteDialog
;
function
deleteAction
()
{
var
rows
=
$table
.
bootstrapTable
(
'
getSelections
'
);
if
(
rows
.
length
==
0
)
{
...
...
@@ -177,7 +136,7 @@ function deleteAction() {
}
});
}
else
{
$
.
confirm
({
deleteDialog
=
$
.
confirm
({
type
:
'
red
'
,
animationSpeed
:
300
,
title
:
false
,
...
...
@@ -191,7 +150,63 @@ function deleteAction() {
for
(
var
i
in
rows
)
{
ids
.
push
(
rows
[
i
].
organizationId
);
}
$
.
alert
(
'
删除:id=
'
+
ids
.
join
(
"
-
"
));
$
.
ajax
({
type
:
'
get
'
,
url
:
'
${basePath}/manage/organization/delete/
'
+
ids
.
join
(
"
-
"
),
success
:
function
(
result
)
{
if
(
result
.
code
!=
1
)
{
if
(
result
.
data
instanceof
Array
)
{
$
.
each
(
result
.
data
,
function
(
index
,
value
)
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
value
.
errorMsg
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
});
}
else
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
result
.
data
.
errorMsg
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
}
}
else
{
deleteDialog
.
close
();
$table
.
bootstrapTable
(
'
refresh
'
);
}
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
textStatus
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
}
});
}
},
cancel
:
{
...
...
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/organization/update.jsp
0 → 100644
浏览文件 @
fd92c9d9
<%@ page
contentType=
"text/html; charset=utf-8"
%>
<%@ taglib
uri=
"http://java.sun.com/jstl/core_rt"
prefix=
"c"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/fmt"
prefix=
"fmt"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/functions"
prefix=
"fn"
%>
<%@ taglib
uri=
"http://www.springframework.org/tags"
prefix=
"spring"
%>
<%@ taglib
uri=
"http://www.springframework.org/tags/form"
prefix=
"form"
%>
<%@taglib
prefix=
"shiro"
uri=
"http://shiro.apache.org/tags"
%>
<c:set
var=
"basePath"
value=
"
${
pageContext
.
request
.
contextPath
}
"
/>
<div
id=
"updateDialog"
class=
"crudDialog"
>
<form
id=
"updateForm"
method=
"post"
>
<div
class=
"form-group"
>
<label
for=
"name"
>
名称
</label>
<input
id=
"name"
type=
"text"
class=
"form-control"
name=
"name"
maxlength=
"20"
value=
"${organization.name}"
>
</div>
<div
class=
"form-group"
>
<label
for=
"description"
>
描述
</label>
<input
id=
"description"
type=
"text"
class=
"form-control"
name=
"description"
maxlength=
"300"
value=
"${organization.description}"
>
</div>
<div
class=
"form-group text-right"
>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"createSubmit();"
>
保存
</a>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
onclick=
"updateDialog.close();"
>
取消
</a>
</div>
</form>
</div>
<script>
function
createSubmit
()
{
$
.
ajax
({
type
:
'
post
'
,
url
:
'
${basePath}/manage/organization/update/${organization.organizationId}
'
,
data
:
$
(
'
#updateForm
'
).
serialize
(),
beforeSend
:
function
()
{
if
(
$
(
'
#name
'
).
val
()
==
''
)
{
$
(
'
#name
'
).
focus
();
return
false
;
}
},
success
:
function
(
result
)
{
if
(
result
.
code
!=
1
)
{
if
(
result
.
data
instanceof
Array
)
{
$
.
each
(
result
.
data
,
function
(
index
,
value
)
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
value
.
errorMsg
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
});
}
else
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
result
.
data
.
errorMsg
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
}
}
else
{
updateDialog
.
close
();
$table
.
bootstrapTable
(
'
refresh
'
);
}
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
$
.
confirm
({
theme
:
'
dark
'
,
animation
:
'
rotateX
'
,
closeAnimation
:
'
rotateX
'
,
title
:
false
,
content
:
textStatus
,
buttons
:
{
confirm
:
{
text
:
'
确认
'
,
btnClass
:
'
waves-effect waves-button waves-light
'
}
}
});
}
});
}
</script>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录