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
ce5dc8a1
Commit
ce5dc8a1
authored
Nov 06, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改密码页面重构
parent
da03709b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
81 deletions
+70
-81
src/main/webapp/WEB-INF/common/_sidebar.html
+2
-2
src/main/webapp/WEB-INF/common/_top_header.html
+3
-3
src/main/webapp/WEB-INF/system/user/user_chpwd.html
+36
-19
src/main/webapp/assets/modular/system/user/user.js
+1
-2
src/main/webapp/assets/modular/system/user/user_chpwd.js
+28
-55
No files found.
src/main/webapp/WEB-INF/common/_sidebar.html
View file @
ce5dc8a1
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
</nav>
</nav>
</div>
</div>
<div
class=
"sidebar-footer"
>
<div
class=
"sidebar-footer"
>
<a
href=
""
class=
"link"
data-toggle=
"tooltip"
title=
"编辑资料"
><i
class=
"mdi mdi-account"
></i></a>
<a
href=
"
${ctxPath}/mgr/user_info
"
class=
"link"
data-toggle=
"tooltip"
title=
"编辑资料"
><i
class=
"mdi mdi-account"
></i></a>
<a
href=
""
class=
"link"
data-toggle=
"tooltip"
title=
"修改密码"
><i
class=
"ti-settings"
></i></a>
<a
href=
"
${ctxPath}/mgr/user_chpwd
"
class=
"link"
data-toggle=
"tooltip"
title=
"修改密码"
><i
class=
"ti-settings"
></i></a>
<a
href=
"${ctxPath}/logout"
class=
"link"
data-toggle=
"tooltip"
title=
"退出登录"
><i
class=
"mdi mdi-power"
></i></a>
<a
href=
"${ctxPath}/logout"
class=
"link"
data-toggle=
"tooltip"
title=
"退出登录"
><i
class=
"mdi mdi-power"
></i></a>
</div>
</div>
</aside>
</aside>
src/main/webapp/WEB-INF/common/_top_header.html
View file @
ce5dc8a1
...
@@ -54,13 +54,13 @@
...
@@ -54,13 +54,13 @@
<div
class=
"u-img"
><img
src=
"${avatar}"
alt=
"user"
></div>
<div
class=
"u-img"
><img
src=
"${avatar}"
alt=
"user"
></div>
<div
class=
"u-text"
>
<div
class=
"u-text"
>
<h4>
${name!}
</h4>
<h4>
${name!}
</h4>
<p
class=
"text-muted"
>
${email!}
</p><a
href=
"
profile.html
"
class=
"btn btn-rounded btn-danger btn-sm"
>
个人信息
</a></div>
<p
class=
"text-muted"
>
${email!}
</p><a
href=
"
${ctxPath}/mgr/user_info
"
class=
"btn btn-rounded btn-danger btn-sm"
>
个人信息
</a></div>
</div>
</div>
</li>
</li>
<li
role=
"separator"
class=
"divider"
></li>
<li
role=
"separator"
class=
"divider"
></li>
<li><a
href=
"
#
"
><i
class=
"ti-user"
></i>
编辑资料
</a></li>
<li><a
href=
"
${ctxPath}/mgr/user_info
"
><i
class=
"ti-user"
></i>
编辑资料
</a></li>
<li
role=
"separator"
class=
"divider"
></li>
<li
role=
"separator"
class=
"divider"
></li>
<li><a
href=
"
#
"
><i
class=
"ti-settings"
></i>
修改密码
</a></li>
<li><a
href=
"
${ctxPath}/mgr/user_chpwd
"
><i
class=
"ti-settings"
></i>
修改密码
</a></li>
<li
role=
"separator"
class=
"divider"
></li>
<li
role=
"separator"
class=
"divider"
></li>
<li><a
href=
"#"
><i
class=
"fa fa-power-off"
></i>
退出
</a></li>
<li><a
href=
"#"
><i
class=
"fa fa-power-off"
></i>
退出
</a></li>
</ul>
</ul>
...
...
src/main/webapp/WEB-INF/system/user/user_chpwd.html
View file @
ce5dc8a1
@layout("/common/_container.html",{plugins:["sweet-alert"],js:["/assets/modular/system/user/user_chpwd.js"]}){
@layout("/common/_container.html",{plugins:["sweet-alert"],js:["/assets/modular/system/user/user_chpwd.js"]}){
<div
class=
"col-sm-4 col-sm-offset-4"
>
<div
class=
"row"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"col-lg-12"
>
<div
class=
"ibox-title"
>
<div
class=
"card card-outline-info"
>
<h5>
修改密码
</h5>
<div
class=
"card-header"
>
</div>
<h4
class=
"m-b-0 text-white"
>
修改密码
</h4>
<div
class=
"ibox-content"
>
</div>
<div
class=
"row row-lg"
>
<div
class=
"card-block"
style=
"padding: 100px;"
>
<div
class=
"col-sm-12"
>
<div
class=
"form-horizontal"
id=
"passwordForm"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"form-body"
>
<div
class=
"ibox-content"
style=
"border:none !important; "
>
<div
class=
"row"
>
<div
class=
"form-horizontal"
>
<div
class=
"col-md-12"
>
<div
class=
"row"
>
<div
class=
"form-group row m-b-15"
>
<div
class=
"col-sm-12"
>
<label
class=
"control-label text-left col-md-2 col-sm-5"
>
旧密码
</label>
<
#
input
id=
"oldPwd"
name=
"原密码"
underline=
"true"
type=
"password"
/>
<div
class=
"col-md-10 col-sm-7"
>
<
#
input
id=
"newPwd"
name=
"新密码"
underline=
"true"
type=
"password"
/>
<input
type=
"password"
v-model=
"oldPassword"
class=
"form-control"
autocomplete=
"false"
>
<
#
input
id=
"rePwd"
name=
"新密码验证"
type=
"password"
/>
</div>
</div>
<div
class=
"form-group row m-b-15"
>
<label
class=
"control-label text-left col-md-2 col-sm-5"
>
新密码
</label>
<div
class=
"col-md-10 col-sm-7"
>
<input
type=
"password"
v-model=
"newPassword"
class=
"form-control"
autocomplete=
"false"
>
</div>
</div>
</div>
</div>
<div
class=
"row btn-group-m-t"
>
<div
class=
"form-group row m-b-5"
>
<div
class=
"col-sm-10"
>
<label
class=
"control-label text-left col-md-2 col-sm-5"
>
确认新密码
</label>
<
#
button
btnCss=
"info"
name=
"提交"
id=
"ensure"
icon=
"fa-check"
clickFun=
"UserInfoDlg.chPwd()"
/>
<div
class=
"col-md-10 col-sm-7"
>
<input
type=
"password"
v-model=
"repeatPassword"
class=
"form-control"
autocomplete=
"false"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr/>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<button
class=
"btn btn-info"
type=
"button"
id=
"saveButton"
\@
click=
"ensure"
>
<i
class=
"ace-icon fa fa-check"
></i>
保存
</button>
<button
class=
"btn btn-danger m-l-10"
type=
"button"
id=
"closeButton"
\@
clic=
"reset"
>
<i
class=
"ace-icon fa fa-close"
></i>
关闭
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/assets/modular/system/user/user.js
View file @
ce5dc8a1
...
@@ -13,7 +13,7 @@ var MgrUser = {
...
@@ -13,7 +13,7 @@ var MgrUser = {
* 初始化表格的列
* 初始化表格的列
*/
*/
MgrUser
.
initColumn
=
function
()
{
MgrUser
.
initColumn
=
function
()
{
var
columns
=
[
return
[
{
field
:
'selectItem'
,
radio
:
true
},
{
field
:
'selectItem'
,
radio
:
true
},
{
title
:
'id'
,
field
:
'id'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'id'
,
field
:
'id'
,
visible
:
false
,
align
:
'center'
,
valign
:
'middle'
},
{
title
:
'账号'
,
field
:
'account'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'账号'
,
field
:
'account'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
...
@@ -25,7 +25,6 @@ MgrUser.initColumn = function () {
...
@@ -25,7 +25,6 @@ MgrUser.initColumn = function () {
{
title
:
'电话'
,
field
:
'phone'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'电话'
,
field
:
'phone'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'创建时间'
,
field
:
'createtime'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'创建时间'
,
field
:
'createtime'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
},
{
title
:
'状态'
,
field
:
'statusName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}];
{
title
:
'状态'
,
field
:
'statusName'
,
align
:
'center'
,
valign
:
'middle'
,
sortable
:
true
}];
return
columns
;
};
};
/**
/**
...
...
src/main/webapp/assets/modular/system/user/user_chpwd.js
View file @
ce5dc8a1
/**
/**
* 用户详情对话框(可用于添加和修改对话框)
* 用户详情对话框(可用于添加和修改对话框)
*/
*/
var
User
InfoDlg
=
{
var
User
PwdPage
=
{
data
:
{
data
:
{
id
:
""
,
oldPassword
:
""
,
account
:
""
,
newPassword
:
""
,
sex
:
""
,
repeatPassword
:
""
password
:
""
,
rePassword
:
""
,
avatar
:
""
,
email
:
""
,
name
:
""
,
birthday
:
""
,
deptid
:
""
,
deptName
:
""
,
phone
:
""
}
}
};
};
/**
/**
*
关闭此对话
框
*
重置输入
框
*/
*/
UserInfoDlg
.
close
=
function
()
{
UserPwdPage
.
reset
=
function
()
{
parent
.
layer
.
close
(
window
.
parent
.
MgrUser
.
layerIndex
);
UserPwdPage
.
data
.
oldPassword
=
""
;
UserPwdPage
.
data
.
newPassword
=
""
;
UserPwdPage
.
data
.
repeatPassword
=
""
;
};
};
/**
/**
* 验证表单
* 验证表单
*/
*/
User
InfoDlg
.
validateForm
=
function
()
{
User
PwdPage
.
validateForm
=
function
()
{
var
data
=
User
InfoDlg
.
data
;
var
data
=
User
PwdPage
.
data
;
if
(
data
.
account
&&
data
.
password
&&
data
.
name
&&
data
.
depti
d
)
{
if
(
data
.
oldPassword
&&
data
.
newPassword
&&
data
.
repeatPasswor
d
)
{
return
true
;
return
true
;
}
}
if
(
!
data
.
account
)
{
if
(
!
data
.
oldPassword
)
{
return
"请输入
账号
"
;
return
"请输入
旧密码
"
;
}
}
if
(
!
(
data
.
password
===
data
.
rePassword
))
{
if
(
!
data
.
newPassword
)
{
return
"两次密码输入不一致"
;
return
"请输入新密码"
;
}
if
(
!
data
.
name
)
{
return
"请输入姓名"
;
}
}
if
(
!
data
.
deptid
)
{
if
(
!
(
data
.
newPassword
===
data
.
repeatPassword
)
)
{
return
"
请选择部门
"
;
return
"
两次密码输入不一致
"
;
}
}
};
};
/**
/**
* 修改密码
* 修改密码
*/
*/
User
InfoDlg
.
chPwd
=
function
()
{
User
PwdPage
.
chPwd
=
function
()
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/mgr/changePwd"
,
function
(
data
)
{
var
ajax
=
new
$ax
(
Feng
.
ctxPath
+
"/mgr/changePwd"
,
function
(
data
)
{
Feng
.
success
(
"修改成功!"
);
Feng
.
success
(
"修改成功!"
);
},
function
(
data
)
{
},
function
(
data
)
{
Feng
.
error
(
"修改失败!"
+
data
.
responseJSON
.
message
+
"!"
);
Feng
.
error
(
"修改失败!"
+
data
.
responseJSON
.
message
+
"!"
);
});
});
ajax
.
set
(
"oldPwd"
);
ajax
.
setData
(
UserPwdPage
.
data
);
ajax
.
set
(
"newPwd"
);
ajax
.
set
(
"rePwd"
);
ajax
.
start
();
ajax
.
start
();
};
};
$
(
function
()
{
$
(
function
()
{
User
InfoDlg
.
app
=
new
Vue
({
User
PwdPage
.
app
=
new
Vue
({
el
:
'#
user
Form'
,
el
:
'#
password
Form'
,
data
:
User
InfoDlg
.
data
,
data
:
User
PwdPage
.
data
,
methods
:
{
methods
:
{
submitForm
:
function
(
e
)
{
ensure
:
function
()
{
var
result
=
UserInfoDlg
.
validateForm
();
UserPwdPage
.
chPwd
();
if
(
result
===
true
)
{
UserInfoDlg
.
addSubmit
();
}
else
{
Feng
.
alert
(
result
);
e
.
preventDefault
();
}
},
},
showDeptSelectTree
:
function
()
{
reset
:
function
()
{
UserPwdPage
.
reset
();
var
formName
=
encodeURIComponent
(
"parent.UserInfoDlg.app.deptName"
);
var
formId
=
encodeURIComponent
(
"parent.UserInfoDlg.app.deptid"
);
var
treeUrl
=
encodeURIComponent
(
Feng
.
ctxPath
+
"/dept/tree"
);
layer
.
open
({
type
:
2
,
title
:
'部门选择'
,
area
:
[
'300px'
,
'400px'
],
content
:
Feng
.
ctxPath
+
'/system/commonTree?formName='
+
formName
+
"&formId="
+
formId
+
"&treeUrl="
+
treeUrl
});
}
}
}
}
});
});
...
...
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