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
6951b13b
Commit
6951b13b
authored
Nov 02, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理添加用户的界面
parent
0d929fd1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
148 deletions
+79
-148
src/main/webapp/WEB-INF/system/user/user_add.html
+75
-81
src/main/webapp/assets/modular/system/user/user.js
+2
-2
src/main/webapp/assets/modular/system/user/user_info.js
+2
-65
No files found.
src/main/webapp/WEB-INF/system/user/user_add.html
View file @
6951b13b
@layout("/common/_dialog.html",{plugins:["laydate"],js:["/assets/modular/system/user/user_info.js"]}){
<div
class=
"row"
>
<div
class=
"col-6"
>
<div
class=
"card"
>
<div
class=
"card-block"
>
<form
class=
""
novalidate
>
<div
class=
"form-group"
>
<h5>
账号
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
姓名
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
性别
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
出生日期
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
电话
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
</form>
</div>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"card"
>
<div
class=
"card-block"
>
<form
class=
""
novalidate
>
<div
class=
"form-group"
>
<h5>
邮箱
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
密码
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
确认密码
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
部门
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"form-group"
>
<h5>
邮箱
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"text"
class=
"form-control"
required
data-validation-required-message=
"This field is required"
>
</div>
<div
class=
"form-control-feedback"
><small>
Add
<code>
required
</code>
attribute to field for required validation.
</small></div>
</div>
<div
class=
"text-xs-right"
>
<button
type=
"submit"
class=
"btn btn-info"
>
Submit
</button>
<button
type=
"reset"
class=
"btn btn-inverse"
>
Cancel
</button>
</div>
</form>
</div>
</div>
</div>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
class=
"col-6"
>
<form
novalidate
>
<div
class=
"form-group"
>
<h5>
账号
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"account"
id=
"account"
class=
"form-control"
required
data-validation-required-message=
"此项是必填项"
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
密码
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"password"
name=
"password"
id=
"password"
class=
"form-control"
required
data-validation-required-message=
"此项是必填项"
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
重复密码
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"password"
name=
"password2"
data-validation-match-match=
"password"
class=
"form-control"
required
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
姓名
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"text"
name=
"name"
id=
"name"
class=
"form-control"
required
data-validation-required-message=
"此项是必填项"
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
邮箱
</h5>
<div
class=
"controls"
>
<input
type=
"email"
name=
"email"
id=
"email"
class=
"form-control"
>
</div>
</div>
<div
class=
"text-xs-right"
>
<button
type=
"submit"
class=
"btn btn-info"
>
Submit
</button>
<button
type=
"reset"
class=
"btn btn-inverse"
>
Cancel
</button>
</div>
</form>
</div>
<div
class=
"col-6"
>
<form
novalidate
>
<div
class=
"form-group"
>
<h5>
性别
</h5>
<div
class=
"controls"
>
<input
type=
"email"
name=
"sex"
id=
"sex"
class=
"form-control"
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
出生日期
</h5>
<div
class=
"controls"
>
<input
type=
"email"
name=
"birthday"
id=
"birthday"
class=
"form-control"
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
部门
<span
class=
"text-danger"
>
*
</span></h5>
<div
class=
"controls"
>
<input
type=
"email"
name=
"deptid"
id=
"deptid"
class=
"form-control"
required
data-validation-required-message=
"此项是必填项"
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
电话
</h5>
<div
class=
"controls"
>
<input
type=
"email"
name=
"phone"
id=
"phone"
class=
"form-control"
>
</div>
</div>
<div
class=
"form-group"
>
<h5>
角色
</h5>
<div
class=
"controls"
>
<input
disabled
type=
"text"
name=
"xxxxx"
class=
"form-control"
value=
"请在分配角色功能里配置"
>
</div>
</div>
</form>
</div>
</div>
</div>
@}
src/main/webapp/assets/modular/system/user/user.js
View file @
6951b13b
...
...
@@ -49,7 +49,7 @@ MgrUser.openAddMgr = function () {
var
index
=
layer
.
open
({
type
:
2
,
title
:
'添加管理员'
,
area
:
[
'800px'
,
'5
6
0px'
],
//宽高
area
:
[
'800px'
,
'5
8
0px'
],
//宽高
fix
:
false
,
//不固定
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/mgr/user_add'
...
...
@@ -66,7 +66,7 @@ MgrUser.openChangeUser = function () {
var
index
=
layer
.
open
({
type
:
2
,
title
:
'编辑管理员'
,
area
:
[
'800px'
,
'4
5
0px'
],
//宽高
area
:
[
'800px'
,
'4
9
0px'
],
//宽高
fix
:
false
,
//不固定
maxmin
:
true
,
content
:
Feng
.
ctxPath
+
'/mgr/user_edit/'
+
this
.
seItem
.
id
...
...
src/main/webapp/assets/modular/system/user/user_info.js
View file @
6951b13b
...
...
@@ -2,52 +2,7 @@
* 用户详情对话框(可用于添加和修改对话框)
*/
var
UserInfoDlg
=
{
userInfoData
:
{},
validateFields
:
{
account
:
{
validators
:
{
notEmpty
:
{
message
:
'账户不能为空'
}
}
},
name
:
{
validators
:
{
notEmpty
:
{
message
:
'姓名不能为空'
}
}
},
citySel
:
{
validators
:
{
notEmpty
:
{
message
:
'部门不能为空'
}
}
},
password
:
{
validators
:
{
notEmpty
:
{
message
:
'密码不能为空'
},
identical
:
{
field
:
'rePassword'
,
message
:
'两次密码不一致'
},
}
},
rePassword
:
{
validators
:
{
notEmpty
:
{
message
:
'密码不能为空'
},
identical
:
{
field
:
'password'
,
message
:
'两次密码不一致'
},
}
}
}
userInfoData
:
{}
};
/**
...
...
@@ -177,7 +132,7 @@ UserInfoDlg.collectData = function () {
UserInfoDlg
.
validatePwd
=
function
()
{
var
password
=
this
.
get
(
"password"
);
var
rePassword
=
this
.
get
(
"rePassword"
);
if
(
password
==
rePassword
)
{
if
(
password
==
=
rePassword
)
{
return
true
;
}
else
{
return
false
;
...
...
@@ -185,15 +140,6 @@ UserInfoDlg.validatePwd = function () {
};
/**
* 验证数据是否为空
*/
UserInfoDlg
.
validate
=
function
()
{
$
(
'#userInfoForm'
).
data
(
"bootstrapValidator"
).
resetForm
();
$
(
'#userInfoForm'
).
bootstrapValidator
(
'validate'
);
return
$
(
"#userInfoForm"
).
data
(
'bootstrapValidator'
).
isValid
();
};
/**
* 提交添加用户
*/
UserInfoDlg
.
addSubmit
=
function
()
{
...
...
@@ -201,10 +147,6 @@ UserInfoDlg.addSubmit = function () {
this
.
clearData
();
this
.
collectData
();
if
(
!
this
.
validate
())
{
return
;
}
if
(
!
this
.
validatePwd
())
{
Feng
.
error
(
"两次密码输入不一致"
);
return
;
...
...
@@ -230,10 +172,6 @@ UserInfoDlg.editSubmit = function () {
this
.
clearData
();
this
.
collectData
();
if
(
!
this
.
validate
())
{
return
;
}
//提交信息
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/mgr/edit"
,
function
(
data
)
{
Feng
.
success
(
"修改成功!"
);
...
...
@@ -272,7 +210,6 @@ function onBodyDown(event) {
}
$
(
function
()
{
Feng
.
initValidator
(
"userInfoForm"
,
UserInfoDlg
.
validateFields
);
//初始化性别选项
$
(
"#sex"
).
val
(
$
(
"#sexValue"
).
val
());
...
...
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