Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
1ed7159b
Commit
1ed7159b
authored
Aug 24, 2023
by
huangjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择、切换企业
parent
8f654787
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
204 additions
and
9 deletions
+204
-9
direction.png
dsk-operate-ui/src/assets/images/direction.png
+0
-0
enter.png
dsk-operate-ui/src/assets/images/enter.png
+0
-0
title_choose.png
dsk-operate-ui/src/assets/images/login/title_choose.png
+0
-0
tips.png
dsk-operate-ui/src/assets/images/tips.png
+0
-0
Navbar.vue
dsk-operate-ui/src/layout/components/Navbar.vue
+91
-7
request.js
dsk-operate-ui/src/utils/request.js
+2
-0
login.vue
dsk-operate-ui/src/views/login.vue
+111
-2
No files found.
dsk-operate-ui/src/assets/images/direction.png
0 → 100644
View file @
1ed7159b
284 Bytes
dsk-operate-ui/src/assets/images/enter.png
0 → 100644
View file @
1ed7159b
471 Bytes
dsk-operate-ui/src/assets/images/login/title_choose.png
0 → 100644
View file @
1ed7159b
10.1 KB
dsk-operate-ui/src/assets/images/tips.png
0 → 100644
View file @
1ed7159b
331 Bytes
dsk-operate-ui/src/layout/components/Navbar.vue
View file @
1ed7159b
...
@@ -7,18 +7,29 @@
...
@@ -7,18 +7,29 @@
<div
ref=
"rightMenu"
class=
"flex-box right-menu"
>
<div
ref=
"rightMenu"
class=
"flex-box right-menu"
>
<!--
<div
class=
"menu-bells"
><img
src=
"@/assets/images/message.png"
><i
/></div>
-->
<!--
<div
class=
"menu-bells"
><img
src=
"@/assets/images/message.png"
><i
/></div>
-->
<!--
<i
class=
"menu-line"
/>
-->
<!--
<i
class=
"menu-line"
/>
-->
<el-dropdown
class=
"avatar-container"
trigger=
"hover"
>
<el-dropdown
class=
"avatar-container"
trigger=
"hover"
ref=
"mydrodown"
:hide-on-click=
"false"
placement=
"bottom-start"
>
<div
class=
"flex-box avatar-wrapper"
>
<div
class=
"flex-box avatar-wrapper"
>
<img
v-if=
"avatar"
class=
"pic-avatar"
:src=
"avatar"
>
<img
v-if=
"avatar"
class=
"pic-avatar"
:src=
"avatar"
>
<span
v-else
class=
"user-avatar"
>
{{
name
&&
name
.
slice
(
0
,
1
).
toUpperCase
()
}}
</span>
<span
v-else
class=
"user-avatar"
>
{{
name
&&
name
.
slice
(
0
,
1
).
toUpperCase
()
}}
</span>
{{
name
.
length
>
10
?
name
.
slice
(
0
,
10
)
+
'...'
:
name
}}
{{
name
.
length
>
10
?
name
.
slice
(
0
,
10
)
+
'...'
:
name
}}
</div>
</div>
<el-dropdown-menu
slot=
"dropdown"
class=
"user-dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
class=
"user-dropdown"
>
<el-dropdown-item>
<span>
我的企业
<img
class=
"dir"
src=
"@/assets/images/direction.png"
>
</span>
<div
class=
"mycom"
>
<div
class=
"bg"
>
<div
@
click=
"getorther"
class=
"choose"
><img
src=
"@/assets/images/enter.png"
class=
"logos"
><span>
重庆大司空科技
</span><img
class=
"on"
src=
"@/assets/images/tips.png"
></div>
<div
@
click=
"getorther"
><img
src=
"@/assets/images/enter.png"
class=
"logos"
><span>
重庆大司空科技重庆大司空科技重庆大司空科技重庆大司空科技
</span><img
class=
"on"
src=
"@/assets/images/tips.png"
></div>
<div
@
click=
"getorther"
><img
src=
"@/assets/images/enter.png"
class=
"logos"
><span>
重庆大司空科技
</span><img
class=
"on"
src=
"@/assets/images/tips.png"
></div>
<div
@
click=
"getorther"
><img
src=
"@/assets/images/enter.png"
class=
"logos"
><span>
重庆大司空科技
</span><img
class=
"on"
src=
"@/assets/images/tips.png"
></div>
</div>
</div>
</el-dropdown-item>
<router-link
to=
"/user/profile"
>
<router-link
to=
"/user/profile"
>
<el-dropdown-item>
用户中心
</el-dropdown-item>
<el-dropdown-item>
用户中心
</el-dropdown-item>
</router-link>
</router-link>
<el-dropdown-item
divided
@
click
.
native=
"logout"
>
<el-dropdown-item
divided
@
click
.
native=
"logout"
>
<span>
退出
</span>
<span>
<font
color=
"#FF3C3C"
>
退出登录
</font>
</span>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
...
@@ -65,6 +76,7 @@ export default {
...
@@ -65,6 +76,7 @@ export default {
})
})
})
})
this
.
navbarWidth
=
`calc(100% -
${
this
.
offsetWidth
}
px)`
this
.
navbarWidth
=
`calc(100% -
${
this
.
offsetWidth
}
px)`
// this.$refs.mydrodown.show()
},
},
methods
:
{
methods
:
{
async
logout
()
{
async
logout
()
{
...
@@ -78,6 +90,10 @@ export default {
...
@@ -78,6 +90,10 @@ export default {
})
})
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
getorther
(){
location
.
reload
();
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
}
}
}
}
}
</
script
>
</
script
>
...
@@ -161,20 +177,88 @@ export default {
...
@@ -161,20 +177,88 @@ export default {
}
}
}
}
.user-dropdown
{
.user-dropdown
{
padding
:
12px
0
;
width
:
147px
;
height
:
138px
;
box-shadow
:
0px
4px
10px
0px
rgba
(
0
,
0
,
0
,
0
.1
);
border-radius
:
4px
;
.el-dropdown-menu__item
{
.el-dropdown-menu__item
{
font-size
:
1
2
px
;
font-size
:
1
4
px
;
color
:
#232323
;
color
:
#232323
;
line-height
:
24px
;
width
:
147px
;
height
:
38px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
line-height
:
38px
;
padding
:
0
12px
0
24px
;
border-top
:
0
;
border-top
:
0
;
margin-top
:
0
;
text-align
:
left
;
padding
:
0
12px
;
margin
:
0
;
&
:focus
,
&
:not
(
.is-disabled
)
:hover
{
&
:focus
,
&
:not
(
.is-disabled
)
:hover
{
background
:
#E3EEF9
;
background
:
rgba
(
0
,
0
,
0
,
0
.04
);
.mycom
{
display
:
block
;
}
}
}
&
:before
{
&
:before
{
height
:
0
;
height
:
0
;
margin
:
0
;
margin
:
0
;
}
}
}
}
.dir
{
width
:
16px
;
float
:
right
;
margin-top
:
11px
;
}
}
}
.mycom
{
width
:
258px
;
position
:
absolute
;
left
:
-258px
;
height
:
auto
;
top
:
0
;
display
:
none
;
.bg
{
width
:
244px
;
height
:
176px
;
background
:
#FFFFFF
;
box-shadow
:
0px
4px
10px
0px
rgba
(
0
,
0
,
0
,
0
.1
);
border-radius
:
4px
;
padding
:
12px
0
;
>
div
{
width
:
244px
;
height
:
38px
;
padding
:
0
20px
;
cursor
:
pointer
;
.on
{
width
:
16px
;
display
:
none
;
margin
:
11px
-4px
0
0
;
float
:
right
;
}
&
:hover
{
background
:
rgba
(
0
,
0
,
0
,
0
.04
);
}
&
.choose
{
background
:
rgba
(
0
,
129
,
255
,
0
.04
);
.on
{
display
:
inline-block
;
}
}
>
span
{
width
:
160px
;
display
:
inline-block
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.logos
{
width
:
16px
;
float
:
left
;
margin
:
11px
8px
0
0
;
}
}
}
}
</
style
>
</
style
>
dsk-operate-ui/src/utils/request.js
View file @
1ed7159b
...
@@ -62,7 +62,9 @@ service.interceptors.request.use(config => {
...
@@ -62,7 +62,9 @@ service.interceptors.request.use(config => {
return
config
return
config
},
error
=>
{
},
error
=>
{
console
.
log
(
error
)
console
.
log
(
error
)
if
(
error
.
message
.
indexOf
(
'timeout'
)
<
0
){
//超时报错不提示
Promise
.
reject
(
error
)
Promise
.
reject
(
error
)
}
})
})
// 响应拦截器
// 响应拦截器
...
...
dsk-operate-ui/src/views/login.vue
View file @
1ed7159b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<img
class=
"logo"
src=
"../assets/images/logo1.png"
/>
<img
class=
"logo"
src=
"../assets/images/logo1.png"
/>
<img
class=
"img"
src=
"../assets/images/login/img.png"
/>
<img
class=
"img"
src=
"../assets/images/login/img.png"
/>
</div>
</div>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<el-form
v-if=
"!islog"
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
><img
src=
"../assets/images/title_icon.png"
/>
欢迎登录系统
</h3>
<h3
class=
"title"
><img
src=
"../assets/images/title_icon.png"
/>
欢迎登录系统
</h3>
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"username"
>
<el-input
<el-input
...
@@ -59,6 +59,19 @@
...
@@ -59,6 +59,19 @@
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
v-if=
"islog"
class=
"login-form choose-form"
>
<h3
class=
"title i"
><img
src=
"../assets/images/login/title_choose.png"
/>
请选择你想要登录的企业
</h3>
<div
class=
"enterpriselist"
>
<div
class=
"entername"
>
<el-radio
v-model=
"radio"
label=
"1"
>
中国华西工程设计建设有限公司中国华西工程设计建设有限公司中国华西工程设计建设有限公司
</el-radio></div>
<div
class=
"entername"
>
<el-radio
v-model=
"radio"
label=
"2"
>
中国华西工程设计建设有限公司中国华西工程设计建设有限公司中国华西工程设计建设有限公司
</el-radio></div>
<div
class=
"entername"
>
<el-radio
v-model=
"radio"
label=
"3"
>
中国华西工程设计建设有限公司中国华西工程设计建设有限公司中国华西工程设计建设有限公司
</el-radio></div>
<div
class=
"entername"
>
<el-radio
v-model=
"radio"
label=
"4"
>
中国华西工程设计建设有限公司中国华西工程设计建设有限公司中国华西工程设计建设有限公司
</el-radio></div>
<div
class=
"entername"
>
<el-radio
v-model=
"radio"
label=
"5"
>
中国华西工程设计建设有限公司中国华西工程设计建设有限公司中国华西工程设计建设有限公司
</el-radio></div>
<div
class=
"entername"
>
<el-radio
v-model=
"radio"
label=
"6"
>
中国华西工程设计建设有限公司中国华西工程设计建设有限公司中国华西工程设计建设有限公司
</el-radio></div>
<div
class=
"entername"
>
<el-radio
v-model=
"radio"
label=
"7"
>
中国华西工程设计建设有限公司中国华西工程设计建设有限公司中国华西工程设计建设有限公司
</el-radio></div>
</div>
<el-button
class=
"goin"
type=
"primary"
:disabled=
"radio == -1"
@
click=
"goin"
>
立即进入
</el-button>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -72,6 +85,8 @@ export default {
...
@@ -72,6 +85,8 @@ export default {
name
:
"Login"
,
name
:
"Login"
,
data
()
{
data
()
{
return
{
return
{
radio
:
-
1
,
islog
:
false
,
codeUrl
:
""
,
codeUrl
:
""
,
loginForm
:
{
loginForm
:
{
username
:
""
,
username
:
""
,
...
@@ -143,7 +158,9 @@ export default {
...
@@ -143,7 +158,9 @@ 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
.
islog
=
true
this
.
goin
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
this
.
captchaEnabled
)
{
if
(
this
.
captchaEnabled
)
{
...
@@ -152,6 +169,9 @@ export default {
...
@@ -152,6 +169,9 @@ export default {
});
});
}
}
});
});
},
goin
(){
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
}
}
}
}
};
};
...
@@ -198,6 +218,20 @@ export default {
...
@@ -198,6 +218,20 @@ export default {
height
:
17px
;
height
:
17px
;
margin-bottom
:
3px
;
margin-bottom
:
3px
;
}
}
&
.i
{
padding
:
40px
0
40px
20px
;
font-size
:
20px
;
font-weight
:
700
;
margin-bottom
:
20px
;
line-height
:
28px
;
img
{
float
:
left
;
width
:
50px
;
height
:
51px
;
margin-right
:
16px
;
margin-top
:
-10px
;
}
}
}
}
.login-form
{
.login-form
{
...
@@ -266,4 +300,79 @@ export default {
...
@@ -266,4 +300,79 @@ export default {
.login-code-img
{
.login-code-img
{
height
:
48px
;
height
:
48px
;
}
}
.enterpriselist
{
height
:
296px
;
padding
:
0
20px
;
border-bottom
:
1px
solid
#EFEFEF
;
overflow
:
auto
;
.entername
{
height
:
72px
;
border-radius
:
8px
;
font-size
:
16px
;
font-family
:
Microsoft
YaHei-Regular
,
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#3D3D3D
;
line-height
:
24px
;
padding
:
24px
;
&
:hover
{
background
:
rgba
(
0
,
0
,
0
,
0
.04
);
}
.el-radio
{
width
:
100%
;
.el-radio__input
{
float
:
right
;
.el-radio__inner
{
width
:
18px
;
height
:
18px
;
&
:
:
after
{
width
:
10px
;
height
:
10px
;
}
}
}
.el-radio__label
{
display
:
block
;
width
:
302px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
font-size
:
16px
;
}
}
}
}
.goin
{
margin
:
24px
40px
;
width
:
340px
;
height
:
48px
;
background
:
#0081FF
;
border-radius
:
4px
;
font-size
:
16px
;
font-weight
:
700
;
font-family
:
Microsoft
YaHei-Bold
;
}
.
enterpriselist
:
:-
webkit-scrollbar-track-piece
{
//滚动条凹槽的颜色,还可以设置边框属性
background-color
:
#fff
;
height
:
16px
;
padding
:
0
4px
;
}
//滚动条的宽度
.
enterpriselist
:
:-
webkit-scrollbar
{
width
:
8px
;
height
:
16px
;
background-color
:
#fff
;
border-radius
:
6px
;
}
//滚动条的滑块
.
enterpriselist
:
:-
webkit-scrollbar-thumb
{
border-radius
:
8px
;
height
:
8px
;
margin
:
0
4px
;
background
:
rgba
(
0
,
0
,
0
,
0
.08
);
border
:
4px
solid
#F3F4F5
;
&
:hover
{
background
:
#566380
;
}
}
</
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