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
ccf41188
Commit
ccf41188
authored
Nov 19, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.mes123.com/zhouyx/mes-ui
parents
b93bcd5e
79d5c600
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
247 additions
and
237 deletions
+247
-237
detailExcel.vue
components/page/import/detailExcel.vue
+2
-2
process.vue
components/page/import/process.vue
+3
-3
index.vue
pages/account/login/index.vue
+242
-232
No files found.
components/page/import/detailExcel.vue
View file @
ccf41188
...
@@ -83,13 +83,13 @@ export default {
...
@@ -83,13 +83,13 @@ export default {
tabData
.
forEach
(
ele
=>
{
tabData
.
forEach
(
ele
=>
{
let
objData
=
{}
let
objData
=
{}
tabColum
.
forEach
(
el
=>
{
tabColum
.
forEach
(
el
=>
{
objData
[
el
.
title
]
=
ele
[
el
.
key
]
objData
[
el
.
title
]
=
ele
[
el
.
key
]
.
replace
(
/
\s
/g
,
""
)
})
})
arrData
.
push
(
objData
)
arrData
.
push
(
objData
)
})
})
//处理title和key一致
//处理title和key一致
tabColum
.
forEach
(
el
=>
{
tabColum
.
forEach
(
el
=>
{
el
.
key
=
el
.
title
el
.
key
=
el
.
title
.
replace
(
/
\s
/g
,
""
)
})
})
this
.
columnsImport
=
tabColum
;
this
.
columnsImport
=
tabColum
;
...
...
components/page/import/process.vue
View file @
ccf41188
...
@@ -374,8 +374,8 @@ export default {
...
@@ -374,8 +374,8 @@ export default {
});
});
headers
.
forEach
((
elHead
)
=>
{
headers
.
forEach
((
elHead
)
=>
{
let
headObj
=
{};
let
headObj
=
{};
headObj
.
title
=
elHead
;
headObj
.
title
=
elHead
.
replace
(
/
\s
/g
,
""
)
;
headObj
.
key
=
elHead
;
headObj
.
key
=
elHead
.
replace
(
/
\s
/g
,
""
)
;
headersNow
.
push
(
headObj
);
headersNow
.
push
(
headObj
);
});
});
this
.
columnsImport
=
headersNow
;
this
.
columnsImport
=
headersNow
;
...
@@ -384,7 +384,7 @@ export default {
...
@@ -384,7 +384,7 @@ export default {
var
obj
=
{};
var
obj
=
{};
var
currentline
=
lines
[
i
].
split
(
","
);
var
currentline
=
lines
[
i
].
split
(
","
);
for
(
var
j
=
0
;
j
<
headers
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
headers
.
length
;
j
++
)
{
obj
[
headers
[
j
]]
=
currentline
[
j
];
obj
[
headers
[
j
]]
=
currentline
[
j
]
.
replace
(
/
\s
/g
,
""
)
;
}
}
result
.
push
(
obj
);
result
.
push
(
obj
);
}
}
...
...
pages/account/login/index.vue
View file @
ccf41188
<
template
>
<
template
>
<div
class=
"account"
>
<div
class=
"account"
>
<!--
<Carousel
v-model=
"value1"
autoplay
:autoplay-speed=
"5000"
loop
class=
"zmd"
>
<!--
<Carousel
v-model=
"value1"
autoplay
:autoplay-speed=
"5000"
loop
class=
"zmd"
>
<CarouselItem>
<CarouselItem>
<div
class=
"bg bg1"
></div>
<div
class=
"bg bg1"
></div>
...
@@ -12,133 +12,143 @@
...
@@ -12,133 +12,143 @@
</CarouselItem>
</CarouselItem>
</Carousel>
-->
</Carousel>
-->
<div
class=
"main"
>
<div
class=
"main"
>
<div
class=
"ad"
>
<div
class=
"ad"
>
<div
class=
"page_log"
>
<div
class=
"page_log"
>
<img
class=
"img"
src=
"@/assets/images/login/jz_logo.png"
alt=
"logo"
/>
<img
class=
"img"
src=
"@/assets/images/login/jz_logo.png"
alt=
"logo"
/>
</div>
<img
src=
"@/assets/images/login/ivew01.png"
alt=
""
/>
</div>
</div>
<div
class=
"login"
>
<img
src=
"@/assets/images/login/ivew01.png"
alt=
""
/>
<div
class=
"cen"
>
</div>
<div
class=
"log_code_box"
>
<div
class=
"login"
>
<div
class=
"log_code"
@
click=
"handlTrance"
>
<div
class=
"cen"
>
<img
src=
"@/assets/images/login/erwei.jpg"
alt=
"logoCode"
/>
<div
class=
"log_code_box"
>
<transition
name=
"animation"
>
<div
class=
"log_code"
@
click=
"handlTrance"
>
<div
v-if=
"imgFlag"
class=
"sanjiao"
></div>
<img
src=
"@/assets/images/login/erwei.jpg"
alt=
"logoCode"
/>
<!--
<img
v-if=
"imgFlag"
src=
"@/assets/images/login/sanjiao.png"
alt=
""
class=
"sanjiao"
/>
-->
<transition
name=
"animation"
>
</transition>
<div
v-if=
"imgFlag"
class=
"sanjiao"
></div>
</div>
<!--
<img
v-if=
"imgFlag"
src=
"@/assets/images/login/sanjiao.png"
alt=
""
class=
"sanjiao"
/>
-->
</div>
</transition>
<h2
class=
"mb20"
>
登 录
</h2>
</div>
<Login
@
on-submit=
"handleSubmit"
class=
"form_sub"
>
</div>
<div
class=
"mb20"
style=
"height:40px;"
>
<h2
class=
"mb20"
>
登 录
</h2>
<Input
v-model=
"tenantCode"
size=
"large"
>
<Login
@
on-submit=
"handleSubmit"
class=
"form_sub"
>
<span
slot=
"prepend"
>
租户号
</span>
<div
class=
"mb20"
style=
"height: 40px"
>
</Input>
<Input
ref=
"iTenantCode"
v-model=
"tenantCode"
size=
"large"
>
</div>
<span
slot=
"prepend"
>
租户号
</span>
<UserName
name=
"username"
class=
"user_name"
value=
""
/>
</Input>
<Password
name=
"password"
class=
"pass_word"
value=
""
enter-to-submit
/>
</div>
<div
class=
"sub_btn"
>
<UserName
name=
"username"
class=
"user_name"
value=
""
/>
<Submit
class=
"shadown"
>
{{
$t
(
'page.login.submit'
)
}}
</Submit>
<Password
</div>
name=
"password"
</Login>
class=
"pass_word"
value=
""
enter-to-submit
/>
<div
class=
"sub_btn"
>
<Submit
class=
"shadown"
>
{{
$t
(
"page.login.submit"
)
}}
</Submit>
</div>
</div>
</Login>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
iCopyright
from
"@/components/copyright"
;
import
iCopyright
from
"@/components/copyright"
;
import
{
import
{
mapActions
}
from
"vuex"
;
mapActions
}
from
"vuex"
;
import
mixins
from
"../mixins"
;
import
mixins
from
"../mixins"
;
import
Oidc
from
"oidc-client"
;
import
Oidc
from
"oidc-client"
;
import
util
from
"@/libs/util"
;
import
util
from
"@/libs/util"
;
var
mgr
=
new
Oidc
.
UserManager
(
window
.
authConfig
);
var
mgr
=
new
Oidc
.
UserManager
(
window
.
authConfig
);
export
default
{
export
default
{
layout
:
"empty"
,
layout
:
"empty"
,
mixins
:
[
mixins
],
mixins
:
[
mixins
],
components
:
{
components
:
{
iCopyright
iCopyright
,
},
data
()
{
return
{
value1
:
0
,
autoLogin
:
true
,
imgFlag
:
true
,
//tenantCode: '000001'
tenantCode
:
"000004"
,
};
},
created
()
{
// this.oidc();
},
mounted
()
{
//正确写法
this
.
$refs
.
iTenantCode
.
focus
();
},
methods
:
{
...
mapActions
(
"admin/account"
,
[
"login"
]),
/**
* @description 登录
* 表单校验已有 iView Pro 自动完成,如有需要修改,请阅读 iView Pro 文档
*/
handleSubmit
(
valid
,
values
)
{
if
(
this
.
tenantCode
==
""
)
{
this
.
$Message
.
error
(
"租户号不能为空"
);
this
.
$refs
.
iTenantCode
.
focus
();
return
;
}
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
)
=>
{
// this.$Message.error(e.message)
});
}
},
},
data
()
{
initUserInfo
(
id
)
{
return
{
let
parma
=
{
value1
:
0
,
Id
:
id
,
autoLogin
:
true
,
};
imgFlag
:
true
,
this
.
$http
.
sysUser
.
getuserinfo
(
parma
).
then
((
res
)
=>
{
tenantCode
:
'000001'
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
(
"/welcome"
);
// this.$router.replace(this.$route.query.redirect || "/");
}
else
{
this
.
$Message
.
error
(
"用户信息22查询失败!"
);
}
});
},
},
created
()
{
handlTrance
()
{
// this.oidc()
;
this
.
imgFlag
=
!
this
.
imgFlag
;
},
},
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
(
'/welcome'
)
// this.$router.replace(this.$route.query.redirect || "/");
}
else
{
this
.
$Message
.
error
(
"用户信息22查询失败!"
);
}
});
},
handlTrance
()
{
this
.
imgFlag
=
!
this
.
imgFlag
}
}
};
};
</
script
>
</
script
>
...
@@ -146,157 +156,157 @@ export default {
...
@@ -146,157 +156,157 @@ export default {
@jianju: 40px;
@jianju: 40px;
.account {
.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%;
width: 100%;
height: 100vh;
height: 100vh;
position: absolute;
background-size: 100% auto;
// top: 0;
}
// bottom: 0;
background-image: url("../../../assets/images/login/login01.png");
.zmd {
.bg0 {
z-index: 1;
background-image: url("../../../assets/images/login/login01.png");
position: absolute;
}
top: 0;
bottom: 0;
width: 100%;
}
.bg {
.bg1 {
width: 100%;
background-image: url("../../../assets/images/login/login01.png");
height: 100vh;
}
background-size: 100% auto;
}
.bg0
{
.bg2
{
background-image: url("../../../assets/images/login/login01.png");
background-image: url("../../../assets/images/login/login01.png");
}
}
.bg1
{
.bg3
{
background-image: url("../../../assets/images/login/login01.png");
background-image: url("../../../assets/images/login/login01.png");
}
}
.bg2 {
.main {
background-image: url("../../../assets/images/login/login01.png");
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;
.bg3
{
h2
{
background-image: url("../../../assets/images/login/login01.png")
;
padding: 4px 0 15px 0
;
}
}
.main {
.ad {
z-index: 55;
flex: 1;
height: 603px;
text-align: center;
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 {
.page_log {
padding: 4px 0 15px 0;
display: block;
}
width: 304px;
height: 72px;
.ad {
}
flex: 1;
text-align: center;
.page_log {
.img {
display: block;
margin-top: 30px;
width: 304px;
}
height: 72px;
}
.img {
margin-top: 30px;
}
img {
img {
margin-top: 23%;
margin-top: 23%;
}
}
}
}
.login {
.login {
background-color: white;
background-color: white;
width: 410px;
width: 410px;
padding: 0 40px;
padding: 0 40px;
display: flex;
display: flex;
// align-items: center;
// align-items: center;
flex-direction: row;
flex-direction: row;
.cen {
.cen {
width: 100%;
width: 100%;
.log_code_box {
.log_code_box {
text-align: right;
text-align: right;
height: 110px;
height: 110px;
margin: 0 -40px 0 0;
margin: 0 -40px 0 0;
.log_code {
.log_code {
position: relative;
position: relative;
cursor: pointer;
cursor: pointer;
width: 90px;
width: 90px;
height: 85PX
;
height: 85px
;
float: right;
float: right;
.sanjiao {
.sanjiao {
width: 90px;
width: 90px;
height: 90px;
height: 90px;
border-bottom: 90px solid #ffffff;
border-bottom: 90px solid #ffffff;
border-right: 90px solid transparent;
border-right: 90px solid transparent;
position: absolute;
position: absolute;
right: 0px;
right: 0px;
top: 0px;
top: 0px;
}
}
}
}
}
}
.ivu-input-wrapper {
.ivu-input-wrapper {
margin-bottom: 6px;
margin-bottom: 6px;
}
}
.sub_btn {
.sub_btn {
.shadown {
.shadown {
padding: 30px 0 0 0;
padding: 30px 0 0 0;
button {
button {
height: 50px;
height: 50px;
border-radius: 25px;
border-radius: 25px;
box-shadow: 0px 9px 11px 3px #c2d6ec;
box-shadow: 0px 9px 11px 3px #c2d6ec;
letter-spacing: 3px;
letter-spacing: 3px;
font-size: 18px;
font-size: 18px;
outline: none;
outline: none;
// background: url("../../../assets/images/login/btn_bg.png") no-repeat center;
// background: url("../../../assets/images/login/btn_bg.png") no-repeat center;
// span{
// span{
// margin: -14px 0 0;
// margin: -14px 0 0;
// display: block;
// display: block;
// }
// }
}
}
}
}
}
}
}
}
}
}
}
}
}
}
.animation-enter-to,
.animation-enter-to,
.animation-leave-to {
.animation-leave-to {
animation: mymove 1s 1s linear;
animation: mymove 1s 1s linear;
}
}
@keyframes mymove {
@keyframes mymove {
0% {
0% {
transform: translateX(0px);
transform: translateX(0px);
}
}
100% {
100% {
transform: translateX(-45px);
transform: translateX(-45px);
}
}
}
}
</
style
>
</
style
>
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