Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周远喜
mes-ui
Commits
55fc7221
Commit
55fc7221
authored
Sep 22, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
376b47c8
7090e166
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
274 additions
and
223 deletions
+274
-223
npm-shrinkwrap.json
npm-shrinkwrap.json
+15
-15
index.vue
pages/account/login/index.vue
+254
-205
account.js
store/admin/account.js
+5
-3
No files found.
npm-shrinkwrap.json
View file @
55fc7221
...
...
@@ -1744,7 +1744,7 @@
"dependencies"
:
{
"ajv"
:
{
"version"
:
"5.5.2"
,
"resolved"
:
"https://registry.npm
.taobao.org/ajv/download/ajv-5.5.2.tgz?cache=0&sync_timestamp=1597480760804&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2F
ajv-5.5.2.tgz"
,
"resolved"
:
"https://registry.npm
js.org/ajv/-/
ajv-5.5.2.tgz"
,
"integrity"
:
"sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU="
,
"dev"
:
true
,
"optional"
:
true
,
...
...
@@ -1776,7 +1776,7 @@
},
"cross-spawn"
:
{
"version"
:
"5.1.0"
,
"resolved"
:
"https://registry.npm
.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz?cache=0&sync_timestamp=1590421014780&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcross-spawn%2Fdownload%2F
cross-spawn-5.1.0.tgz"
,
"resolved"
:
"https://registry.npm
js.org/cross-spawn/-/
cross-spawn-5.1.0.tgz"
,
"integrity"
:
"sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk="
,
"dev"
:
true
,
"optional"
:
true
,
...
...
@@ -1856,7 +1856,7 @@
},
"fast-deep-equal"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npm
.taobao.org/fast-deep-equal/download
/fast-deep-equal-1.1.0.tgz"
,
"resolved"
:
"https://registry.npm
js.org/fast-deep-equal/-
/fast-deep-equal-1.1.0.tgz"
,
"integrity"
:
"sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
,
"dev"
:
true
,
"optional"
:
true
...
...
@@ -1894,7 +1894,7 @@
},
"json-schema-traverse"
:
{
"version"
:
"0.3.1"
,
"resolved"
:
"https://registry.npm
.taobao.org/json-schema-traverse/download
/json-schema-traverse-0.3.1.tgz"
,
"resolved"
:
"https://registry.npm
js.org/json-schema-traverse/-
/json-schema-traverse-0.3.1.tgz"
,
"integrity"
:
"sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
,
"dev"
:
true
,
"optional"
:
true
...
...
@@ -1964,7 +1964,7 @@
},
"yallist"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npm
.taobao.org/yallist/download
/yallist-2.1.2.tgz"
,
"resolved"
:
"https://registry.npm
js.org/yallist/-
/yallist-2.1.2.tgz"
,
"integrity"
:
"sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
,
"dev"
:
true
,
"optional"
:
true
...
...
@@ -4938,7 +4938,7 @@
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.14.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.14.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.14.1.tgz"
,
"integrity"
:
"sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
}
}
...
...
@@ -5467,7 +5467,7 @@
},
"crc-32"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"http
://r.cnpmjs
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"integrity"
:
"sha1-yy224puIUI4y2d0OwWk+e0Ghggg="
,
"requires"
:
{
"exit-on-epipe"
:
"~1.0.1"
,
...
...
@@ -7364,7 +7364,7 @@
},
"exit-on-epipe"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"http
://r.cnpmjs
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"integrity"
:
"sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
},
"expand-brackets"
:
{
...
...
@@ -8015,7 +8015,7 @@
},
"frac"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/frac/download/frac-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/frac/download/frac-1.1.2.tgz"
,
"integrity"
:
"sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
},
"fragment-cache"
:
{
...
...
@@ -15087,7 +15087,7 @@
},
"printj"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/printj/download/printj-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/printj/download/printj-1.1.2.tgz"
,
"integrity"
:
"sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
},
"private"
:
{
...
...
@@ -20540,7 +20540,7 @@
},
"script-loader"
:
{
"version"
:
"0.7.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"integrity"
:
"sha1-IBbbb4byX1z1baOJFdgzeLsWa6c="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -21128,7 +21128,7 @@
},
"ssf"
:
{
"version"
:
"0.10.3"
,
"resolved"
:
"http
://r.cnpmjs
.org/ssf/download/ssf-0.10.3.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/ssf/download/ssf-0.10.3.tgz"
,
"integrity"
:
"sha1-jq4fwpyQpVLnkhII+BiS1vd6yys="
,
"requires"
:
{
"frac"
:
"~1.1.2"
...
...
@@ -23778,7 +23778,7 @@
},
"wmf"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/wmf/download/wmf-1.0.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/wmf/download/wmf-1.0.2.tgz"
,
"integrity"
:
"sha1-fRnWIQcaCMK9xrfmiKnENSmMwto="
},
"word-wrap"
:
{
...
...
@@ -23933,7 +23933,7 @@
},
"xlsx"
:
{
"version"
:
"0.15.6"
,
"resolved"
:
"http
://r.cnpmjs.org/xlsx/download/
xlsx-0.15.6.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/xlsx/download/xlsx-0.15.6.tgz?cache=0&sync_timestamp=1597272342311&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxlsx%2Fdownload%2F
xlsx-0.15.6.tgz"
,
"integrity"
:
"sha1-Rh+EHW2eoag3XizSRr8jrs4IodU="
,
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
...
...
@@ -23948,7 +23948,7 @@
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.17.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.17.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.17.1.tgz"
,
"integrity"
:
"sha1-vXerfebelCBc6sxy8XFtKfIKd78="
}
}
...
...
pages/account/login/index.vue
View file @
55fc7221
<
template
>
<div
class=
"account"
>
<div
class=
"account"
>
<!--
<Carousel
v-model=
"value1"
autoplay
:autoplay-speed=
"5000"
loop
class=
"zmd"
>
<CarouselItem>
<div
class=
"bg bg1"
></div>
...
...
@@ -12,241 +12,290 @@
</CarouselItem>
</Carousel>
-->
<div
class=
"main"
>
<div
class=
"ad"
>
<div
class=
"page_log"
>
<img
class=
"img"
src=
"@/assets/images/login/jz_logo.png"
alt=
"logo"
/>
</div>
<img
src=
"@/assets/images/login/ivew01.png"
alt=
""
/>
</div>
<div
class=
"login"
>
<div
class=
"cen"
>
<div
class=
"log_code_box"
>
<div
class=
"log_code"
@
click=
"handlTrance"
>
<img
src=
"@/assets/images/login/erwei.jpg"
alt=
"logoCode"
/>
<transition
name=
"animation"
>
<div
v-if=
"imgFlag"
class=
"sanjiao"
></div>
<!--
<img
v-if=
"imgFlag"
src=
"@/assets/images/login/sanjiao.png"
alt=
""
class=
"sanjiao"
/>
-->
</transition>
<div
class=
"ad"
>
<div
class=
"page_log"
>
<img
class=
"img"
src=
"@/assets/images/login/jz_logo.png"
alt=
"logo"
/>
</div>
</div>
<h2
class=
"mb20"
>
登 录
</h2>
<Login
@
on-submit=
"handleSubmit"
class=
"form_sub"
>
<UserName
name=
"username"
class=
"user_name"
value=
""
/>
<Password
name=
"password"
class=
"pass_word"
value=
""
enter-to-submit
/>
<div
class=
"sub_btn"
>
<Submit
class=
"shadown"
>
{{
$t
(
'page.login.submit'
)
}}
</Submit>
<img
src=
"@/assets/images/login/ivew01.png"
alt=
""
/>
</div>
<div
class=
"login"
>
<div
class=
"cen"
>
<div
class=
"log_code_box"
>
<div
class=
"log_code"
@
click=
"handlTrance"
>
<img
src=
"@/assets/images/login/erwei.jpg"
alt=
"logoCode"
/>
<transition
name=
"animation"
>
<div
v-if=
"imgFlag"
class=
"sanjiao"
></div>
<!--
<img
v-if=
"imgFlag"
src=
"@/assets/images/login/sanjiao.png"
alt=
""
class=
"sanjiao"
/>
-->
</transition>
</div>
</div>
<h2
class=
"mb20"
>
登 录
</h2>
<Login
@
on-submit=
"handleSubmit"
class=
"form_sub"
>
<div
class=
"mb20"
style=
"height:40px;"
>
<Input
v-model=
"tenantCode"
size=
"large"
>
<span
slot=
"prepend"
>
租户号
</span>
</Input>
</div>
<UserName
name=
"username"
class=
"user_name"
value=
""
/>
<Password
name=
"password"
class=
"pass_word"
value=
""
enter-to-submit
/>
<div
class=
"sub_btn"
>
<Submit
class=
"shadown"
>
{{
$t
(
'page.login.submit'
)
}}
</Submit>
</div>
</Login>
</div>
</Login>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
iCopyright
from
"@/components/copyright"
;
import
{
mapActions
}
from
"vuex"
;
import
{
mapActions
}
from
"vuex"
;
import
mixins
from
"../mixins"
;
import
Oidc
from
"oidc-client"
;
import
util
from
"@/libs/util"
;
var
mgr
=
new
Oidc
.
UserManager
(
window
.
authConfig
);
export
default
{
layout
:
"empty"
,
mixins
:
[
mixins
],
components
:
{
iCopyright
},
data
()
{
return
{
value1
:
0
,
autoLogin
:
true
,
imgFlag
:
true
,
};
},
created
()
{
// this.oidc();
},
methods
:
{
...
mapActions
(
"admin/account"
,
[
"login"
]),
/**
* @description 登录
* 表单校验已有 iView Pro 自动完成,如有需要修改,请阅读 iView Pro 文档
*/
handleSubmit
(
valid
,
values
)
{
if
(
valid
)
{
const
{
username
,
password
}
=
values
;
this
.
login
({
username
,
password
}).
then
(
r
=>
{
if
(
r
>
0
)
{
this
.
$Message
.
success
(
"登录成功!"
);
this
.
initUserInfo
(
r
);
}
else
{
this
.
$Message
.
error
(
"登录失败!"
);
}
}).
catch
(
e
=>
{
console
.
log
(
e
)
// this.$Message.error(e.message)
});
}
layout
:
"empty"
,
mixins
:
[
mixins
],
components
:
{
iCopyright
},
initUserInfo
(
id
)
{
let
parma
=
{
Id
:
id
};
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
result
.
avatarUrl
&&
res
.
result
.
avatarUrl
!=
""
&&
res
.
result
.
avatarUrl
!=
null
)
{
res
.
result
.
avatarUrl
=
fileUrlDown
+
res
.
result
.
avatarUrl
;
}
let
info
=
res
.
result
;
info
.
auth
=
[
"admin"
];
info
.
avatar
=
info
.
avatarUrl
;
info
.
userId
=
info
.
id
;
info
.
name
=
info
.
userName
;
this
.
$store
.
dispatch
(
"admin/user/set"
,
info
,
{
root
:
true
});
// setUserInfo
this
.
$store
.
commit
(
"setUserInfo"
,
info
);
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
"/"
);
}
else
{
this
.
$Message
.
error
(
"用户信息22查询失败!"
);
}
});
data
()
{
return
{
value1
:
0
,
autoLogin
:
true
,
imgFlag
:
true
,
tenantCode
:
'000001'
};
},
handlTrance
(){
this
.
imgFlag
=
!
this
.
imgFlag
created
()
{
// this.oidc();
},
methods
:
{
...
mapActions
(
"admin/account"
,
[
"login"
]),
/**
* @description 登录
* 表单校验已有 iView Pro 自动完成,如有需要修改,请阅读 iView Pro 文档
*/
handleSubmit
(
valid
,
values
)
{
if
(
valid
)
{
values
.
tenantcode
=
this
.
tenantCode
const
{
username
,
password
,
tenantcode
}
=
values
;
this
.
login
({
username
,
password
,
tenantcode
}).
then
(
r
=>
{
if
(
r
>
0
)
{
this
.
$Message
.
success
(
"登录成功!"
);
this
.
initUserInfo
(
r
);
}
else
{
this
.
$Message
.
error
(
"登录失败!"
);
}
}).
catch
(
e
=>
{
console
.
log
(
e
)
// this.$Message.error(e.message)
});
}
},
initUserInfo
(
id
)
{
let
parma
=
{
Id
:
id
};
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
(
res
=>
{
if
(
res
.
result
)
{
if
(
res
.
result
.
avatarUrl
&&
res
.
result
.
avatarUrl
!=
""
&&
res
.
result
.
avatarUrl
!=
null
)
{
res
.
result
.
avatarUrl
=
fileUrlDown
+
res
.
result
.
avatarUrl
;
}
let
info
=
res
.
result
;
info
.
auth
=
[
"admin"
];
info
.
avatar
=
info
.
avatarUrl
;
info
.
userId
=
info
.
id
;
info
.
name
=
info
.
userName
;
this
.
$store
.
dispatch
(
"admin/user/set"
,
info
,
{
root
:
true
});
// setUserInfo
this
.
$store
.
commit
(
"setUserInfo"
,
info
);
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
"/"
);
}
else
{
this
.
$Message
.
error
(
"用户信息22查询失败!"
);
}
});
},
handlTrance
()
{
this
.
imgFlag
=
!
this
.
imgFlag
}
}
}
};
</
script
>
<
style
lang=
"less"
>
@jianju: 40px;
.account {
width: 100%;
height: 100vh;
position: absolute;
// top: 0;
// bottom: 0;
background-image: url("../../../assets/images/login/login01.png");
.zmd {
z-index: 1;
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
.bg {
width: 100%;
height: 100vh;
background-size: 100% auto;
}
.bg0 {
background-image: url("../../../assets/images/login/login01.png");
}
.bg1 {
background-image: url("../../../assets/images/login/login01.png");
}
.bg2 {
background-image: url("../../../assets/images/login/login01.png");
}
.bg3 {
position: absolute;
// top: 0;
// bottom: 0;
background-image: url("../../../assets/images/login/login01.png");
}
.main {
z-index: 55;
height: 603px;
width: 1210px;
min-height: 500px;
min-width: 1100px;
margin: 140px auto;
// position: absolute;
// top: 168px;
// bottom: 168px;
// left: 360px;
// right: 360px;
background: url("../../../assets/images/login/login02.jpg") no-repeat -70px 0px;
background-size: 80%;
display: flex;
h2{ padding: 4px 0 15px 0;}
.ad {
flex: 1;
text-align: center;
.page_log{
display: block;
width: 304px;
height: 72px;
}
.img { margin-top:30px; }
img { margin-top:23%; }
.zmd {
z-index: 1;
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
.login {
background-color: white;
width: 410px;
padding: 0 40px;
display: flex;
// align-items: center;
flex-direction: row;
.cen {
.bg {
width: 100%;
.log_code_box{
text-align: right;
height: 110px;
margin: 0 -40px 0 0;
.log_code{
position: relative;
cursor: pointer;
width: 90px;
height: 85PX;
float: right;
.sanjiao{
width: 90px;
height: 90px;
border-bottom: 90px solid #ffffff;
border-right: 90px solid transparent;
position: absolute;
right: 0px;
top: 0px;
}
}
height: 100vh;
background-size: 100% auto;
}
.bg0 {
background-image: url("../../../assets/images/login/login01.png");
}
.bg1 {
background-image: url("../../../assets/images/login/login01.png");
}
.bg2 {
background-image: url("../../../assets/images/login/login01.png");
}
.bg3 {
background-image: url("../../../assets/images/login/login01.png");
}
.main {
z-index: 55;
height: 603px;
width: 1210px;
min-height: 500px;
min-width: 1100px;
margin: 140px auto;
// position: absolute;
// top: 168px;
// bottom: 168px;
// left: 360px;
// right: 360px;
background: url("../../../assets/images/login/login02.jpg") no-repeat -70px 0px;
background-size: 80%;
display: flex;
h2 {
padding: 4px 0 15px 0;
}
.ivu-input-wrapper {
margin-bottom: 6px;
.ad {
flex: 1;
text-align: center;
.page_log {
display: block;
width: 304px;
height: 72px;
}
.img {
margin-top: 30px;
}
img {
margin-top: 23%;
}
}
.sub_btn{
.shadown{
padding: 30px 0 0 0;
button{
height: 50px;
border-radius: 25px;
box-shadow: 0px 9px 11px 3px #c2d6ec;
letter-spacing: 3px;
font-size: 18px;
outline: none;
// background: url("../../../assets/images/login/btn_bg.png") no-repeat center;
// span{
// margin: -14px 0 0;
// display: block;
// }
.login {
background-color: white;
width: 410px;
padding: 0 40px;
display: flex;
// align-items: center;
flex-direction: row;
.cen {
width: 100%;
.log_code_box {
text-align: right;
height: 110px;
margin: 0 -40px 0 0;
.log_code {
position: relative;
cursor: pointer;
width: 90px;
height: 85PX;
float: right;
.sanjiao {
width: 90px;
height: 90px;
border-bottom: 90px solid #ffffff;
border-right: 90px solid transparent;
position: absolute;
right: 0px;
top: 0px;
}
}
}
.ivu-input-wrapper {
margin-bottom: 6px;
}
.sub_btn {
.shadown {
padding: 30px 0 0 0;
button {
height: 50px;
border-radius: 25px;
box-shadow: 0px 9px 11px 3px #c2d6ec;
letter-spacing: 3px;
font-size: 18px;
outline: none;
// background: url("../../../assets/images/login/btn_bg.png") no-repeat center;
// span{
// margin: -14px 0 0;
// display: block;
// }
}
}
}
}
}
}
}
}
}
}
.animation-enter-to,.animation-leave-to{
animation: mymove 1s 1s linear;
.animation-enter-to,
.animation-leave-to {
animation: mymove 1s 1s linear;
}
@keyframes mymove {
0%{
transform: translateX(0px);
}
100%{
transform: translateX(-45px);
}
0% {
transform: translateX(0px);
}
100% {
transform: translateX(-45px);
}
}
</
style
>
\ No newline at end of file
</
style
>
store/admin/account.js
View file @
55fc7221
...
...
@@ -22,13 +22,15 @@ export const actions = {
dispatch
},
{
username
=
''
,
password
=
''
password
=
''
,
tenantcode
=
''
}
=
{})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// 开始请求登录接口
AccountLogin
({
username
,
password
password
,
tenantcode
})
.
then
(
async
res
=>
{
// 设置 cookie 一定要存 uuid 和 token 两个 cookie
...
...
@@ -85,7 +87,7 @@ export const actions = {
sessionStorage
.
clear
();
localStorage
.
clear
();
//util.cookies.set('tenantCode', res.result.tenantCode );
$nuxt
.
$router
.
push
(
"/account/login
?tenant="
+
util
.
cookies
.
get
(
'tenantCode'
)
);
$nuxt
.
$router
.
push
(
"/account/login
"
);
}
if
(
confirm
)
{
...
...
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