Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tp-ui
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
zhaopanyu
tp-ui
Commits
c3f239e5
Commit
c3f239e5
authored
Oct 12, 2024
by
zhaopanyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zpy
parent
02d06a7d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
248 additions
and
332 deletions
+248
-332
src/views/benchmarkVoting/index.vue
+122
-70
src/views/login.vue
+23
-33
src/views/register.vue
+21
-32
src/views/system/user/index.vue
+75
-190
src/views/system/user/profile/resetPwd.vue
+7
-7
No files found.
src/views/benchmarkVoting/index.vue
View file @
c3f239e5
...
@@ -28,80 +28,89 @@
...
@@ -28,80 +28,89 @@
<div
class=
"tpxx"
>
<div
class=
"tpxx"
>
<h2
style=
"margin-left: 20px;"
>
三基标杆备选单位
</h2>
<h2
style=
"margin-left: 20px;"
>
三基标杆备选单位
</h2>
<el-row
class=
"row"
>
<el-row
class=
"row"
>
<el-col
:span=
"3"
class=
"text"
>
油气生产单位
</el-col>
<el-col
:md=
"4"
:lg=
"4"
:xl=
"3"
class=
"text-align"
>
<el-col
:span=
"21"
>
<span
class=
"text"
>
油气生产单位
</span>
</el-col>
<el-col
:md=
"20"
:lg=
"20"
:xl=
"21"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"98px"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"98px"
>
<el-col
:span=
"5"
v-for=
"(unit, index) in oilGasProduction"
:key=
"index"
>
<el-col
:md=
"10"
:lg=
"7"
:xl=
"5"
v-for=
"(unit, index) in oilGasProduction"
:key=
"index"
>
<el-form-item
label-position=
"top"
>
<!--
<el-form-item
label-position=
"top"
>
-->
<el-checkbox-group
v-model=
"form.yqsc"
class=
"checkbox-group-inline"
>
<el-checkbox-group
style=
"margin: 10px 0;"
v-model=
"form.yqsc"
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChange()"
>
class=
"checkbox-group-inline"
>
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChange()"
>
unit
.
name
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
}}
</span>
♦
unit
.
name
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
}}
</span>
♦
unit
.
management
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
}}
</span>
unit
.
management
</el-checkbox>
}}
</span>
</el-checkbox-group>
</el-checkbox>
</el-form-item>
</el-checkbox-group>
<!--
</el-form-item>
-->
</el-col>
</el-col>
</el-form>
</el-form>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
class=
"row"
>
<el-row
class=
"row"
>
<el-col
:span=
"3"
class=
"text"
>
科研
</el-col>
<el-col
:md=
"4"
:lg=
"4"
:xl=
"3"
class=
"text-align"
>
<el-col
:span=
"21"
>
<span
class=
"text"
>
科研
</span>
</el-col>
<el-col
:md=
"20"
:lg=
"20"
:xl=
"21"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"98px"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"98px"
>
<el-col
:
span
=
"5"
v-for=
"(unit, index) in research"
:key=
"index"
>
<el-col
:
md=
"10"
:lg=
"7"
:xl
=
"5"
v-for=
"(unit, index) in research"
:key=
"index"
>
<
el-form-item
>
<
!--
<el-form-item>
--
>
<el-checkbox-group
v-model=
"form.ky"
>
<el-checkbox-group
style=
"margin: 10px 0;"
v-model=
"form.ky"
>
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChangeky()"
>
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChangeky()"
>
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
unit
.
name
unit
.
name
}}
</span>
♦
}}
</span>
♦
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
unit
.
management
unit
.
management
}}
</span>
}}
</span>
</el-checkbox>
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
<
/el-form-item
>
<
!--
</el-form-item>
--
>
</el-col>
</el-col>
</el-form>
</el-form>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
class=
"row"
>
<el-row
class=
"row"
>
<el-col
:span=
"3"
class=
"text"
>
专业化
</el-col>
<el-col
:md=
"4"
:lg=
"4"
:xl=
"3"
class=
"text-align"
>
<el-col
:span=
"21"
>
<span
class=
"text"
>
专业化
</span></el-col>
<el-col
:md=
"20"
:lg=
"20"
:xl=
"21"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"108px"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"108px"
>
<
el-form-item
>
<
!--
<el-form-item>
--
>
<el-col
:span
=
"5"
v-for=
"(unit, index) in specialization"
:key=
"index"
>
<el-col
:md=
"10"
:lg=
"7"
:xl
=
"5"
v-for=
"(unit, index) in specialization"
:key=
"index"
>
<el-checkbox-group
v-model=
"form.zyh"
>
<el-checkbox-group
style=
"margin: 10px 0;"
v-model=
"form.zyh"
>
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChangezyh()"
>
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChangezyh()"
>
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
unit
.
name
unit
.
name
}}
</span>
♦
}}
</span>
♦
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
unit
.
management
unit
.
management
}}
</span>
}}
</span>
</el-checkbox>
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
</el-col>
</el-col>
<
/el-form-item
>
<
!--
</el-form-item>
--
>
</el-form>
</el-form>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
class=
"row"
>
<el-row
class=
"row"
>
<el-col
:span=
"3"
class=
"text"
>
服务
</el-col>
<el-col
:md=
"4"
:lg=
"4"
:xl=
"3"
class=
"text-align"
>
<el-col
:span=
"21"
>
<span
class=
"text"
>
服务
</span>
</el-col>
<el-col
:md=
"20"
:lg=
"20"
:xl=
"21"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"98px"
>
<el-form
:model=
"form"
ref=
"checkList"
size=
"small"
:inline=
"true"
label-width=
"98px"
>
<el-col
:span=
"5"
v-for=
"(unit, index) in serviceCoordination"
:key=
"index"
>
<el-col
:md=
"10"
:lg=
"7"
:xl=
"5"
v-for=
"(unit, index) in serviceCoordination"
:key=
"index"
>
<el-form-item>
<el-form-item>
<el-checkbox-group
v-model=
"form.fw"
>
<el-checkbox-group
style=
"margin: 10px 0;"
v-model=
"form.fw"
>
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChangefw()"
>
<el-checkbox
:label=
"unit.name"
@
change=
"handleCheckboxChangefw()"
>
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
unit
.
name
unit
.
name
}}
</span>
♦
}}
</span>
♦
<span
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
<span
class=
"xzText"
@
click
.
stop
.
prevent=
"handleTextClick(unit)"
>
{{
unit
.
management
unit
.
management
}}
</span>
}}
</span>
</el-checkbox>
</el-checkbox>
...
@@ -987,14 +996,25 @@ export default {
...
@@ -987,14 +996,25 @@ export default {
},
},
methods
:
{
methods
:
{
submitTp
()
{
submitTp
()
{
// const tpInfoCbListA = this.fwXz.map
const
isValid
=
this
.
fwXz
.
length
>
0
&&
this
.
zyhXz
.
length
>
0
&&
this
.
kyXz
.
length
>
0
&&
this
.
yzXz
.
length
>
0
;
const
params
=
{
if
(
!
isValid
)
{
this
.
$modal
.
msgError
(
"每个板块至少选 1 家单位。"
);
return
;
// 终止提交
}
}
console
.
log
(
params
,
'params'
);
const
params
=
{
name
:
store
.
getters
.
name
,
ipdz
:
store
.
getters
.
adAccount
,
tpInfoCbListA
:
this
.
fwXz
,
tpInfoCbListB
:
this
.
zyhXz
,
tpInfoCbListC
:
this
.
kyXz
,
tpInfoCbListD
:
this
.
yzXz
,
};
addTp
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"提交成功"
);
});
},
},
handleTextClick
(
unit
)
{
handleTextClick
(
unit
)
{
console
.
log
(
unit
,
"11111111"
);
console
.
log
(
unit
,
"11111111"
);
this
.
selectedUnit
=
unit
;
// 存储选中的单位
this
.
selectedUnit
=
unit
;
// 存储选中的单位
...
@@ -1047,7 +1067,8 @@ export default {
...
@@ -1047,7 +1067,8 @@ export default {
.
filter
(
unit
=>
this
.
form
.
yqsc
.
includes
(
unit
.
name
))
.
filter
(
unit
=>
this
.
form
.
yqsc
.
includes
(
unit
.
name
))
.
map
(
unit
=>
unit
.
value
);
.
map
(
unit
=>
unit
.
value
);
console
.
log
(
selectedValues
,
'油气'
);
console
.
log
(
selectedValues
,
'油气'
);
this
.
yzXz
=
selectedValues
;
this
.
yzXz
=
selectedValues
.
map
(
value
=>
({
dwid
:
value
}));
// 输出转换后的结果
console
.
log
(
this
.
yzXz
,
'this.yzXz'
);
console
.
log
(
this
.
yzXz
,
'this.yzXz'
);
...
@@ -1059,8 +1080,10 @@ export default {
...
@@ -1059,8 +1080,10 @@ export default {
.
filter
(
unit
=>
this
.
form
.
ky
.
includes
(
unit
.
name
))
.
filter
(
unit
=>
this
.
form
.
ky
.
includes
(
unit
.
name
))
.
map
(
unit
=>
unit
.
value
);
.
map
(
unit
=>
unit
.
value
);
console
.
log
(
selectedValueky
,
'科研'
);
console
.
log
(
selectedValueky
,
'科研'
);
this
.
kyXz
=
selectedValueky
;
this
.
kyXz
=
selectedValueky
.
map
(
value
=>
({
dwid
:
value
}));
console
.
log
(
this
.
kyXz
,
' this.kyXz'
);
// 输出转换后的结果
console
.
log
(
this
.
kyXz
,
' this.kyXz'
);
},
},
...
@@ -1071,9 +1094,9 @@ export default {
...
@@ -1071,9 +1094,9 @@ export default {
.
filter
(
unit
=>
this
.
form
.
zyh
.
includes
(
unit
.
name
))
.
filter
(
unit
=>
this
.
form
.
zyh
.
includes
(
unit
.
name
))
.
map
(
unit
=>
unit
.
value
);
.
map
(
unit
=>
unit
.
value
);
console
.
log
(
selectedValues
,
'专业化'
);
console
.
log
(
selectedValues
,
'专业化'
);
this
.
zyhXz
=
selectedValues
;
this
.
zyhXz
=
selectedValues
.
map
(
value
=>
({
dwid
:
value
}))
;
console
.
log
(
this
.
zyhXz
,
'this.zyhXz'
);
// 输出转换后的结果
console
.
log
(
this
.
zyhXz
,
'this.zyhXz '
);
},
},
handleCheckboxChangefw
()
{
handleCheckboxChangefw
()
{
...
@@ -1083,8 +1106,11 @@ export default {
...
@@ -1083,8 +1106,11 @@ export default {
.
filter
(
unit
=>
this
.
form
.
fw
.
includes
(
unit
.
name
))
.
filter
(
unit
=>
this
.
form
.
fw
.
includes
(
unit
.
name
))
.
map
(
unit
=>
unit
.
value
);
.
map
(
unit
=>
unit
.
value
);
console
.
log
(
selectedValues
,
'服务'
);
console
.
log
(
selectedValues
,
'服务'
);
this
.
fwXz
=
selectedValues
;
// this.fwXz = selectedValues;
console
.
log
(
this
.
fwXz
,
'this.fwXz'
);
// console.log(this.fwXz, 'this.fwXz');
this
.
fwXz
=
selectedValues
.
map
(
value
=>
({
dwid
:
value
}));
// 输出转换后的结果
console
.
log
(
this
.
fwXz
,
'this.fwXz '
);
...
@@ -1100,8 +1126,15 @@ export default {
...
@@ -1100,8 +1126,15 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.xzText
{
font-family
:
"黑体"
,
sans-serif
;
/* 或者使用 "Heiti" */
font-size
:
15.5px
;
/* 黑色字体 */
}
.btdlg
{
.btdlg
{
font-size
:
2
2
px
;
font-size
:
2
0
px
;
font-weight
:
bold
;
font-weight
:
bold
;
font-family
:
"黑体"
;
font-family
:
"黑体"
;
}
}
...
@@ -1110,10 +1143,11 @@ export default {
...
@@ -1110,10 +1143,11 @@ export default {
font-size
:
20px
;
font-size
:
20px
;
font-weight
:
400
;
font-weight
:
400
;
font-family
:
"FangSong_GB2312"
;
font-family
:
"FangSong_GB2312"
;
line-height
:
1.5
;
}
}
.nrdlgnr
{
.nrdlgnr
{
font-size
:
20
px
;
font-size
:
18
px
;
font-weight
:
400
;
font-weight
:
400
;
font-family
:
"FangSong_GB2312"
;
font-family
:
"FangSong_GB2312"
;
}
}
...
@@ -1132,6 +1166,8 @@ export default {
...
@@ -1132,6 +1166,8 @@ export default {
.btdlg
,
.btdlg
,
.nrdlg
{
.nrdlg
{
display
:
inline-block
;
display
:
inline-block
;
font-size
:
18px
;
line-height
:
1.8
;
}
}
.sj
{
.sj
{
...
@@ -1140,12 +1176,25 @@ export default {
...
@@ -1140,12 +1176,25 @@ export default {
}
}
.text-align
{
display
:
flex
;
justify-content
:
flex-end
;
margin
:
0px
10px
;
/* 右对齐 */
}
.text
{
.text
{
text-align
:
right
;
margin-left
:
auto
;
margin
:
10px
15px
;
/* 确保最后一个字对齐 */
}
}
.row
{
.row
{
margin-left
:
-60px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
inherit
;
justify-content
:
center
;
margin
:
20px
0
20px
-30px
;
}
}
.checkbox-group-inline
{
.checkbox-group-inline
{
...
@@ -1239,6 +1288,8 @@ h2 {
...
@@ -1239,6 +1288,8 @@ h2 {
font-size
:
24px
;
font-size
:
24px
;
color
:
#333
;
color
:
#333
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
font-family
:
"方正小标宋"
,
"Fangzheng Xiaobiao Song"
,
serif
;
/* 添加替代字体 */
/* 增加标题与段落的间距 */
/* 增加标题与段落的间距 */
}
}
...
@@ -1248,5 +1299,6 @@ p {
...
@@ -1248,5 +1299,6 @@ p {
/* 设置段落文字颜色 */
/* 设置段落文字颜色 */
line-height
:
1.6
;
line-height
:
1.6
;
/* 增加段落行间距 */
/* 增加段落行间距 */
font-family
:
"FangSong_GB2312"
;
}
}
</
style
>
</
style
>
src/views/login.vue
View file @
c3f239e5
...
@@ -3,49 +3,29 @@
...
@@ -3,49 +3,29 @@
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
若依后台管理系统
</h3>
<h3
class=
"title"
>
若依后台管理系统
</h3>
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"username"
>
<el-input
<el-input
v-model=
"loginForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
v-model=
"loginForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<el-input
<el-input
v-model=
"loginForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
v-model=
"loginForm.password"
@
keyup
.
enter
.
native=
"handleLogin"
>
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
@
keyup
.
enter
.
native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-input
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
v-model=
"loginForm.code"
@
keyup
.
enter
.
native=
"handleLogin"
>
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
@
keyup
.
enter
.
native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
<div
class=
"login-code"
>
<div
class=
"login-code"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"login-code-img"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-form-item
style=
"width:100%;"
>
<el-form-item
style=
"width:100%;"
>
<el-button
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
:loading=
"loading"
@
click
.
native
.
prevent=
"handleLogin"
>
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click
.
native
.
prevent=
"handleLogin"
>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-else
>
登 录 中...
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
</el-button>
...
@@ -72,8 +52,8 @@ export default {
...
@@ -72,8 +52,8 @@ export default {
return
{
return
{
codeUrl
:
""
,
codeUrl
:
""
,
loginForm
:
{
loginForm
:
{
username
:
"admin"
,
//
username: "admin",
password
:
"admin123"
,
//
password: "admin123",
rememberMe
:
false
,
rememberMe
:
false
,
code
:
""
,
code
:
""
,
uuid
:
""
uuid
:
""
...
@@ -83,7 +63,8 @@ export default {
...
@@ -83,7 +63,8 @@ export default {
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的账号"
}
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的账号"
}
],
],
password
:
[
password
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
}
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
},
{
pattern
:
/^
(?=
.*
[
A-Za-z
])(?=
.*
\d)(?=
.*
[
@$!%*?&
])\S{6,20}
$/
,
message
:
'用户密码长度为 6 到 20 个字符,且必须包含字母、数字以及特殊符号'
,
trigger
:
'blur'
}
],
],
code
:
[{
required
:
true
,
trigger
:
"change"
,
message
:
"请输入验证码"
}]
code
:
[{
required
:
true
,
trigger
:
"change"
,
message
:
"请输入验证码"
}]
},
},
...
@@ -97,7 +78,7 @@ export default {
...
@@ -97,7 +78,7 @@ export default {
},
},
watch
:
{
watch
:
{
$route
:
{
$route
:
{
handler
:
function
(
route
)
{
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
},
},
immediate
:
true
immediate
:
true
...
@@ -141,7 +122,7 @@ export default {
...
@@ -141,7 +122,7 @@ export default {
Cookies
.
remove
(
'rememberMe'
);
Cookies
.
remove
(
'rememberMe'
);
}
}
this
.
$store
.
dispatch
(
"Login"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$store
.
dispatch
(
"Login"
,
this
.
loginForm
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{
});
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
...
@@ -164,6 +145,7 @@ export default {
...
@@ -164,6 +145,7 @@ export default {
background-image
:
url("../assets/images/login-background.jpg")
;
background-image
:
url("../assets/images/login-background.jpg")
;
background-size
:
cover
;
background-size
:
cover
;
}
}
.title
{
.title
{
margin
:
0px
auto
30px
auto
;
margin
:
0px
auto
30px
auto
;
text-align
:
center
;
text-align
:
center
;
...
@@ -175,32 +157,39 @@ export default {
...
@@ -175,32 +157,39 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
width
:
400px
;
width
:
400px
;
padding
:
25px
25px
5px
25px
;
padding
:
25px
25px
5px
25px
;
.el-input
{
.el-input
{
height
:
38px
;
height
:
38px
;
input
{
input
{
height
:
38px
;
height
:
38px
;
}
}
}
}
.input-icon
{
.input-icon
{
height
:
39px
;
height
:
39px
;
width
:
14px
;
width
:
14px
;
margin-left
:
2px
;
margin-left
:
2px
;
}
}
}
}
.login-tip
{
.login-tip
{
font-size
:
13px
;
font-size
:
13px
;
text-align
:
center
;
text-align
:
center
;
color
:
#bfbfbf
;
color
:
#bfbfbf
;
}
}
.login-code
{
.login-code
{
width
:
33%
;
width
:
33%
;
height
:
38px
;
height
:
38px
;
float
:
right
;
float
:
right
;
img
{
img
{
cursor
:
pointer
;
cursor
:
pointer
;
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
}
}
.el-login-footer
{
.el-login-footer
{
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
...
@@ -213,6 +202,7 @@ export default {
...
@@ -213,6 +202,7 @@ export default {
font-size
:
12px
;
font-size
:
12px
;
letter-spacing
:
1px
;
letter-spacing
:
1px
;
}
}
.login-code-img
{
.login-code-img
{
height
:
38px
;
height
:
38px
;
}
}
...
...
src/views/register.vue
View file @
c3f239e5
...
@@ -8,49 +8,29 @@
...
@@ -8,49 +8,29 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<el-input
<el-input
v-model=
"registerForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
v-model=
"registerForm.password"
@
keyup
.
enter
.
native=
"handleRegister"
>
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
@
keyup
.
enter
.
native=
"handleRegister"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"confirmPassword"
>
<el-form-item
prop=
"confirmPassword"
>
<el-input
<el-input
v-model=
"registerForm.confirmPassword"
type=
"password"
auto-complete=
"off"
placeholder=
"确认密码"
v-model=
"registerForm.confirmPassword"
@
keyup
.
enter
.
native=
"handleRegister"
>
type=
"password"
auto-complete=
"off"
placeholder=
"确认密码"
@
keyup
.
enter
.
native=
"handleRegister"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-input
<el-input
v-model=
"registerForm.code"
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
v-model=
"registerForm.code"
@
keyup
.
enter
.
native=
"handleRegister"
>
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
@
keyup
.
enter
.
native=
"handleRegister"
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
<div
class=
"register-code"
>
<div
class=
"register-code"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"register-code-img"
/>
<img
:src=
"codeUrl"
@
click=
"getCode"
class=
"register-code-img"
/>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
style=
"width:100%;"
>
<el-form-item
style=
"width:100%;"
>
<el-button
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
:loading=
"loading"
@
click
.
native
.
prevent=
"handleRegister"
>
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click
.
native
.
prevent=
"handleRegister"
>
<span
v-if=
"!loading"
>
注 册
</span>
<span
v-if=
"!loading"
>
注 册
</span>
<span
v-else
>
注 册 中...
</span>
<span
v-else
>
注 册 中...
</span>
</el-button>
</el-button>
...
@@ -95,8 +75,8 @@ export default {
...
@@ -95,8 +75,8 @@ export default {
],
],
password
:
[
password
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
},
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请输入您的密码"
},
{
min
:
5
,
max
:
20
,
message
:
"用户密码长度必须介于 5 和 20 之间"
,
trigger
:
"blur"
},
{
pattern
:
/^
(?=
.*
[
A-Za-z
])(?=
.*
\d)(?=
.*
[
@$!%*?&
])\S{6,20}
$/
,
message
:
'用户密码长度为 6 到 20 个字符,且必须包含字母、数字以及特殊符号'
,
trigger
:
'blur'
}
{
pattern
:
/^
[^
<>"'|
\\]
+$/
,
message
:
"不能包含非法字符:< >
\"
'
\\\
|"
,
trigger
:
"blur"
}
//
{ pattern: /^[^
<>
"'|
\\
]+$/, message: "
不能包含非法字符:
<
>
\
" '
\\\
|"
,
trigger
:
"blur"
}
],
],
confirmPassword
:
[
confirmPassword
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请再次输入您的密码"
},
{
required
:
true
,
trigger
:
"blur"
,
message
:
"请再次输入您的密码"
},
...
@@ -132,7 +112,7 @@ export default {
...
@@ -132,7 +112,7 @@ export default {
type
:
'success'
type
:
'success'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$router
.
push
(
"/login"
);
this
.
$router
.
push
(
"/login"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
...
@@ -155,6 +135,7 @@ export default {
...
@@ -155,6 +135,7 @@ export default {
background-image
:
url("../assets/images/login-background.jpg")
;
background-image
:
url("../assets/images/login-background.jpg")
;
background-size
:
cover
;
background-size
:
cover
;
}
}
.title
{
.title
{
margin
:
0px
auto
30px
auto
;
margin
:
0px
auto
30px
auto
;
text-align
:
center
;
text-align
:
center
;
...
@@ -166,32 +147,39 @@ export default {
...
@@ -166,32 +147,39 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
width
:
400px
;
width
:
400px
;
padding
:
25px
25px
5px
25px
;
padding
:
25px
25px
5px
25px
;
.el-input
{
.el-input
{
height
:
38px
;
height
:
38px
;
input
{
input
{
height
:
38px
;
height
:
38px
;
}
}
}
}
.input-icon
{
.input-icon
{
height
:
39px
;
height
:
39px
;
width
:
14px
;
width
:
14px
;
margin-left
:
2px
;
margin-left
:
2px
;
}
}
}
}
.register-tip
{
.register-tip
{
font-size
:
13px
;
font-size
:
13px
;
text-align
:
center
;
text-align
:
center
;
color
:
#bfbfbf
;
color
:
#bfbfbf
;
}
}
.register-code
{
.register-code
{
width
:
33%
;
width
:
33%
;
height
:
38px
;
height
:
38px
;
float
:
right
;
float
:
right
;
img
{
img
{
cursor
:
pointer
;
cursor
:
pointer
;
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
}
}
.el-register-footer
{
.el-register-footer
{
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
...
@@ -204,6 +192,7 @@ export default {
...
@@ -204,6 +192,7 @@ export default {
font-size
:
12px
;
font-size
:
12px
;
letter-spacing
:
1px
;
letter-spacing
:
1px
;
}
}
.register-code-img
{
.register-code-img
{
height
:
38px
;
height
:
38px
;
}
}
...
...
src/views/system/user/index.vue
View file @
c3f239e5
...
@@ -4,75 +4,36 @@
...
@@ -4,75 +4,36 @@
<!--部门数据-->
<!--部门数据-->
<el-col
:span=
"4"
:xs=
"24"
>
<el-col
:span=
"4"
:xs=
"24"
>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<el-input
<el-input
v-model=
"deptName"
placeholder=
"请输入部门名称"
clearable
size=
"small"
prefix-icon=
"el-icon-search"
v-model=
"deptName"
style=
"margin-bottom: 20px"
/>
placeholder=
"请输入部门名称"
clearable
size=
"small"
prefix-icon=
"el-icon-search"
style=
"margin-bottom: 20px"
/>
</div>
</div>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<el-tree
<el-tree
:data=
"deptOptions"
:props=
"defaultProps"
:expand-on-click-node=
"false"
:data=
"deptOptions"
:filter-node-method=
"filterNode"
ref=
"tree"
node-key=
"id"
default-expand-all
highlight-current
:props=
"defaultProps"
@
node-click=
"handleNodeClick"
/>
:expand-on-click-node=
"false"
:filter-node-method=
"filterNode"
ref=
"tree"
node-key=
"id"
default-expand-all
highlight-current
@
node-click=
"handleNodeClick"
/>
</div>
</div>
</el-col>
</el-col>
<!--用户数据-->
<!--用户数据-->
<el-col
:span=
"20"
:xs=
"24"
>
<el-col
:span=
"20"
:xs=
"24"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"用户名称"
prop=
"userName"
>
<el-form-item
label=
"用户名称"
prop=
"userName"
>
<el-input
<el-input
v-model=
"queryParams.userName"
placeholder=
"请输入用户名称"
clearable
style=
"width: 240px"
v-model=
"queryParams.userName"
@
keyup
.
enter
.
native=
"handleQuery"
/>
placeholder=
"请输入用户名称"
clearable
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"手机号码"
prop=
"phonenumber"
>
<el-form-item
label=
"手机号码"
prop=
"phonenumber"
>
<el-input
<el-input
v-model=
"queryParams.phonenumber"
placeholder=
"请输入手机号码"
clearable
style=
"width: 240px"
v-model=
"queryParams.phonenumber"
@
keyup
.
enter
.
native=
"handleQuery"
/>
placeholder=
"请输入手机号码"
clearable
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
<el-select
v-model=
"queryParams.status"
placeholder=
"用户状态"
clearable
style=
"width: 240px"
>
v-model=
"queryParams.status"
<el-option
v-for=
"dict in dict.type.sys_normal_disable"
:key=
"dict.value"
:label=
"dict.label"
placeholder=
"用户状态"
:value=
"dict.value"
/>
clearable
style=
"width: 240px"
>
<el-option
v-for=
"dict in dict.type.sys_normal_disable"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-form-item
label=
"创建时间"
>
<el-date-picker
<el-date-picker
v-model=
"dateRange"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
v-model=
"dateRange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
...
@@ -82,56 +43,24 @@
...
@@ -82,56 +43,24 @@
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
type=
"primary"
v-hasPermi=
"['system:user:add']"
>
新增
</el-button>
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:user:add']"
>
新增
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
type=
"success"
v-hasPermi=
"['system:user:edit']"
>
修改
</el-button>
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:user:edit']"
>
修改
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
type=
"danger"
v-hasPermi=
"['system:user:remove']"
>
删除
</el-button>
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:user:remove']"
>
删除
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
type=
"info"
v-hasPermi=
"['system:user:import']"
>
导入
</el-button>
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
v-hasPermi=
"['system:user:import']"
>
导入
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
type=
"warning"
v-hasPermi=
"['system:user:export']"
>
导出
</el-button>
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:user:export']"
>
导出
</el-button>
</el-col>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
:columns=
"columns"
></right-toolbar>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
:columns=
"columns"
></right-toolbar>
</el-row>
</el-row>
...
@@ -139,18 +68,18 @@
...
@@ -139,18 +68,18 @@
<el-table
v-loading=
"loading"
:data=
"userList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"userList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"用户编号"
align=
"center"
key=
"userId"
prop=
"userId"
v-if=
"columns[0].visible"
/>
<el-table-column
label=
"用户编号"
align=
"center"
key=
"userId"
prop=
"userId"
v-if=
"columns[0].visible"
/>
<el-table-column
label=
"用户名称"
align=
"center"
key=
"userName"
prop=
"userName"
v-if=
"columns[1].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"用户名称"
align=
"center"
key=
"userName"
prop=
"userName"
v-if=
"columns[1].visible"
<el-table-column
label=
"用户昵称"
align=
"center"
key=
"nickName"
prop=
"nickName"
v-if=
"columns[2].visible"
:show-overflow-tooltip=
"true"
/>
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"部门"
align=
"center"
key=
"deptName"
prop=
"dept.deptName"
v-if=
"columns[3].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
key=
"nickName"
prop=
"nickName"
v-if=
"columns[2].visible"
<el-table-column
label=
"手机号码"
align=
"center"
key=
"phonenumber"
prop=
"phonenumber"
v-if=
"columns[4].visible"
width=
"120"
/>
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"部门"
align=
"center"
key=
"deptName"
prop=
"dept.deptName"
v-if=
"columns[3].visible"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"手机号码"
align=
"center"
key=
"phonenumber"
prop=
"phonenumber"
v-if=
"columns[4].visible"
width=
"120"
/>
<el-table-column
label=
"状态"
align=
"center"
key=
"status"
v-if=
"columns[5].visible"
>
<el-table-column
label=
"状态"
align=
"center"
key=
"status"
v-if=
"columns[5].visible"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-switch
<el-switch
v-model=
"scope.row.status"
active-value=
"0"
inactive-value=
"1"
v-model=
"scope.row.status"
@
change=
"handleStatusChange(scope.row)"
></el-switch>
active-value=
"0"
inactive-value=
"1"
@
change=
"handleStatusChange(scope.row)"
></el-switch>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
v-if=
"columns[6].visible"
width=
"160"
>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
v-if=
"columns[6].visible"
width=
"160"
>
...
@@ -158,28 +87,14 @@
...
@@ -158,28 +87,14 @@
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"操作"
align=
"center"
width=
"160"
class-name=
"small-padding fixed-width"
>
label=
"操作"
align=
"center"
width=
"160"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.userId !== 1"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.userId !== 1"
>
<el-button
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
size=
"mini"
v-hasPermi=
"['system:user:edit']"
>
修改
</el-button>
type=
"text"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
icon=
"el-icon-edit"
v-hasPermi=
"['system:user:remove']"
>
删除
</el-button>
@
click=
"handleUpdate(scope.row)"
<el-dropdown
size=
"mini"
@
command=
"(command) => handleCommand(command, scope.row)"
v-hasPermi=
"['system:user:edit']"
v-hasPermi=
"['system:user:resetPwd', 'system:user:edit']"
>
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:user:remove']"
>
删除
</el-button>
<el-dropdown
size=
"mini"
@
command=
"(command) => handleCommand(command, scope.row)"
v-hasPermi=
"['system:user:resetPwd', 'system:user:edit']"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-d-arrow-right"
>
更多
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-d-arrow-right"
>
更多
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"handleResetPwd"
icon=
"el-icon-key"
<el-dropdown-item
command=
"handleResetPwd"
icon=
"el-icon-key"
...
@@ -192,13 +107,8 @@
...
@@ -192,13 +107,8 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<pagination
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
v-show=
"total>0"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -237,7 +147,7 @@
...
@@ -237,7 +147,7 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
v-if=
"form.userId == undefined"
label=
"用户密码"
prop=
"password"
>
<el-form-item
v-if=
"form.userId == undefined"
label=
"用户密码"
prop=
"password"
>
<el-input
v-model=
"form.password"
placeholder=
"请输入用户密码"
type=
"password"
maxlength=
"20"
show-password
/>
<el-input
v-model=
"form.password"
placeholder=
"请输入用户密码"
type=
"password"
maxlength=
"20"
show-password
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -245,23 +155,17 @@
...
@@ -245,23 +155,17 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"用户性别"
>
<el-form-item
label=
"用户性别"
>
<el-select
v-model=
"form.sex"
placeholder=
"请选择性别"
>
<el-select
v-model=
"form.sex"
placeholder=
"请选择性别"
>
<el-option
<el-option
v-for=
"dict in dict.type.sys_user_sex"
:key=
"dict.value"
:label=
"dict.label"
v-for=
"dict in dict.type.sys_user_sex"
:value=
"dict.value"
></el-option>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"状态"
>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
<el-radio
v-for=
"dict in dict.type.sys_normal_disable"
:key=
"dict.value"
:label=
"dict.value"
>
{{
v-for=
"dict in dict.type.sys_normal_disable"
dict.label
:key=
"dict.value"
}}
</el-radio>
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -270,26 +174,16 @@
...
@@ -270,26 +174,16 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"岗位"
>
<el-form-item
label=
"岗位"
>
<el-select
v-model=
"form.postIds"
multiple
placeholder=
"请选择岗位"
>
<el-select
v-model=
"form.postIds"
multiple
placeholder=
"请选择岗位"
>
<el-option
<el-option
v-for=
"item in postOptions"
:key=
"item.postId"
:label=
"item.postName"
:value=
"item.postId"
v-for=
"item in postOptions"
:disabled=
"item.status == 1"
></el-option>
:key=
"item.postId"
:label=
"item.postName"
:value=
"item.postId"
:disabled=
"item.status == 1"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"角色"
>
<el-form-item
label=
"角色"
>
<el-select
v-model=
"form.roleIds"
multiple
placeholder=
"请选择角色"
>
<el-select
v-model=
"form.roleIds"
multiple
placeholder=
"请选择角色"
>
<el-option
<el-option
v-for=
"item in roleOptions"
:key=
"item.roleId"
:label=
"item.roleName"
:value=
"item.roleId"
v-for=
"item in roleOptions"
:disabled=
"item.status == 1"
></el-option>
:key=
"item.roleId"
:label=
"item.roleName"
:value=
"item.roleId"
:disabled=
"item.status == 1"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -310,18 +204,9 @@
...
@@ -310,18 +204,9 @@
<!-- 用户导入对话框 -->
<!-- 用户导入对话框 -->
<el-dialog
:title=
"upload.title"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-dialog
:title=
"upload.title"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
ref=
"upload"
:action=
"upload.url + '?updateSupport=' + upload.updateSupport"
:disabled=
"upload.isUploading"
:limit=
"1"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url + '?updateSupport=' + upload.updateSupport"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
...
@@ -329,7 +214,8 @@
...
@@ -329,7 +214,8 @@
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的用户数据
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的用户数据
</div>
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size:12px;vertical-align: baseline;"
@
click=
"importTemplate"
>
下载模板
</el-link>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size:12px;vertical-align: baseline;"
@
click=
"importTemplate"
>
下载模板
</el-link>
</div>
</div>
</el-upload>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -433,8 +319,7 @@ export default {
...
@@ -433,8 +319,7 @@ export default {
],
],
password
:
[
password
:
[
{
required
:
true
,
message
:
"用户密码不能为空"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"用户密码不能为空"
,
trigger
:
"blur"
},
{
min
:
5
,
max
:
20
,
message
:
'用户密码长度必须介于 5 和 20 之间'
,
trigger
:
'blur'
},
{
pattern
:
/^
(?=
.*
[
A-Za-z
])(?=
.*
\d)(?=
.*
[
@$!%*?&
])\S{6,20}
$/
,
message
:
'用户密码长度为 6 到 20 个字符,且必须包含字母、数字以及特殊符号'
,
trigger
:
'blur'
}
{
pattern
:
/^
[^
<>"'|
\\]
+$/
,
message
:
"不能包含非法字符:< >
\"
'
\\\
|"
,
trigger
:
"blur"
}
],
],
email
:
[
email
:
[
{
{
...
@@ -471,10 +356,10 @@ export default {
...
@@ -471,10 +356,10 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listUser
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
listUser
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
this
.
userList
=
response
.
rows
;
this
.
userList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
}
}
);
);
},
},
/** 查询部门下拉树结构 */
/** 查询部门下拉树结构 */
...
@@ -496,11 +381,11 @@ export default {
...
@@ -496,11 +381,11 @@ export default {
// 用户状态修改
// 用户状态修改
handleStatusChange
(
row
)
{
handleStatusChange
(
row
)
{
let
text
=
row
.
status
===
"0"
?
"启用"
:
"停用"
;
let
text
=
row
.
status
===
"0"
?
"启用"
:
"停用"
;
this
.
$modal
.
confirm
(
'确认要"'
+
text
+
'""'
+
row
.
userName
+
'"用户吗?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'确认要"'
+
text
+
'""'
+
row
.
userName
+
'"用户吗?'
).
then
(
function
()
{
return
changeUserStatus
(
row
.
userId
,
row
.
status
);
return
changeUserStatus
(
row
.
userId
,
row
.
status
);
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
text
+
"成功"
);
this
.
$modal
.
msgSuccess
(
text
+
"成功"
);
}).
catch
(
function
()
{
}).
catch
(
function
()
{
row
.
status
=
row
.
status
===
"0"
?
"1"
:
"0"
;
row
.
status
=
row
.
status
===
"0"
?
"1"
:
"0"
;
});
});
},
},
...
@@ -599,18 +484,18 @@ export default {
...
@@ -599,18 +484,18 @@ export default {
}
}
},
},
}).
then
(({
value
})
=>
{
}).
then
(({
value
})
=>
{
resetUserPwd
(
row
.
userId
,
value
).
then
(
response
=>
{
resetUserPwd
(
row
.
userId
,
value
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功,新密码是:"
+
value
);
this
.
$modal
.
msgSuccess
(
"修改成功,新密码是:"
+
value
);
});
});
}).
catch
(()
=>
{
});
}).
catch
(()
=>
{
});
},
},
/** 分配角色操作 */
/** 分配角色操作 */
handleAuthRole
:
function
(
row
)
{
handleAuthRole
:
function
(
row
)
{
const
userId
=
row
.
userId
;
const
userId
=
row
.
userId
;
this
.
$router
.
push
(
"/system/user-auth/role/"
+
userId
);
this
.
$router
.
push
(
"/system/user-auth/role/"
+
userId
);
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
:
function
()
{
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
userId
!=
undefined
)
{
if
(
this
.
form
.
userId
!=
undefined
)
{
...
@@ -632,12 +517,12 @@ export default {
...
@@ -632,12 +517,12 @@ export default {
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
userIds
=
row
.
userId
||
this
.
ids
;
const
userIds
=
row
.
userId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除用户编号为"'
+
userIds
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'是否确认删除用户编号为"'
+
userIds
+
'"的数据项?'
).
then
(
function
()
{
return
delUser
(
userIds
);
return
delUser
(
userIds
);
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
();
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
},
},
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
...
...
src/views/system/user/profile/resetPwd.vue
View file @
c3f239e5
<
template
>
<
template
>
<el-form
ref=
"form"
:model=
"user"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"user"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"旧密码"
prop=
"oldPassword"
>
<el-form-item
label=
"旧密码"
prop=
"oldPassword"
>
<el-input
v-model=
"user.oldPassword"
placeholder=
"请输入旧密码"
type=
"password"
show-password
/>
<el-input
v-model=
"user.oldPassword"
placeholder=
"请输入旧密码"
type=
"password"
show-password
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"新密码"
prop=
"newPassword"
>
<el-form-item
label=
"新密码"
prop=
"newPassword"
>
<el-input
v-model=
"user.newPassword"
placeholder=
"请输入新密码"
type=
"password"
show-password
/>
<el-input
v-model=
"user.newPassword"
placeholder=
"请输入新密码"
type=
"password"
show-password
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"确认密码"
prop=
"confirmPassword"
>
<el-form-item
label=
"确认密码"
prop=
"confirmPassword"
>
<el-input
v-model=
"user.confirmPassword"
placeholder=
"请确认新密码"
type=
"password"
show-password
/>
<el-input
v-model=
"user.confirmPassword"
placeholder=
"请确认新密码"
type=
"password"
show-password
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submit"
>
保存
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submit"
>
保存
</el-button>
...
@@ -37,16 +37,16 @@ export default {
...
@@ -37,16 +37,16 @@ export default {
// 表单校验
// 表单校验
rules
:
{
rules
:
{
oldPassword
:
[
oldPassword
:
[
{
required
:
true
,
message
:
"旧密码不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"旧密码不能为空"
,
trigger
:
"blur"
},
{
pattern
:
/^
(?=
.*
[
A-Za-z
])(?=
.*
\d)(?=
.*
[
@$!%*?&
])\S{6,20}
$/
,
message
:
'用户密码长度为 6 到 20 个字符,且必须包含字母、数字以及特殊符号'
,
trigger
:
'blur'
}
],
],
newPassword
:
[
newPassword
:
[
{
required
:
true
,
message
:
"新密码不能为空"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"新密码不能为空"
,
trigger
:
"blur"
},
{
min
:
6
,
max
:
20
,
message
:
"长度在 6 到 20 个字符"
,
trigger
:
"blur"
},
{
pattern
:
/^
(?=
.*
[
A-Za-z
])(?=
.*
\d)(?=
.*
[
@$!%*?&
])\S{6,20}
$/
,
message
:
'用户密码长度为 6 到 20 个字符,且必须包含字母、数字以及特殊符号'
,
trigger
:
'blur'
}
{
pattern
:
/^
[^
<>"'|
\\]
+$/
,
message
:
"不能包含非法字符:< >
\"
'
\\\
|"
,
trigger
:
"blur"
}
],
],
confirmPassword
:
[
confirmPassword
:
[
{
required
:
true
,
message
:
"确认密码不能为空"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"确认密码不能为空"
,
trigger
:
"blur"
},
{
required
:
true
,
validator
:
equalToPassword
,
trigger
:
"blur"
}
{
pattern
:
/^
(?=
.*
[
A-Za-z
])(?=
.*
\d)(?=
.*
[
@$!%*?&
])\S{6,20}
$/
,
message
:
'用户密码长度为 6 到 20 个字符,且必须包含字母、数字以及特殊符号'
,
trigger
:
'blur'
}
]
]
}
}
};
};
...
...
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