Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
donkey
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
SQL_Mou
donkey
Commits
2d6affb6
Commit
2d6affb6
authored
Sep 06, 2021
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录功能实现
parent
ac6837b0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
133 additions
and
41 deletions
+133
-41
index.js
src/store/index.js
+4
-0
homepage.vue
src/views/homepage.vue
+1
-1
login.vue
src/views/login.vue
+42
-29
mineMonitoring.vue
src/views/mineMonitoring.vue
+13
-5
videoSetting.vue
src/views/videoSurveillance/videoSetting.vue
+60
-4
videoShow.vue
src/views/videoSurveillance/videoShow.vue
+13
-2
No files found.
src/store/index.js
View file @
2d6affb6
...
...
@@ -65,8 +65,12 @@ export default new Vuex.Store({
state
:
{
projectName
:
"
鑫海数字矿山后台管理系统
"
,
platformName
:
"
鑫海数字矿山后台管理平台
"
,
user
:
""
,
},
mutations
:
{
changeUser
(
userName
){
state
.
user
=
userName
;
}
},
actions
:
{
},
...
...
src/views/homepage.vue
View file @
2d6affb6
...
...
@@ -5,7 +5,7 @@
<span>
{{
$store
.
state
.
platformName
}}
</span>
<div
class=
"userInformationBar"
>
<div
style=
"margin-right:10px;"
>
<span>
{{
userName
}}
</span>
<span>
{{
$store
.
state
.
user
}}
</span>
<span
class=
"iconfont icon-xiajiantou xiajiantou"
style=
"font-size:18px;"
></span>
</div>
<el-button
type=
"primary"
circle
@
click=
"handleFullScreen()"
size=
"small"
style=
"margin-right:10px;"
><span
:class=
"quanping"
></span></el-button>
...
...
src/views/login.vue
View file @
2d6affb6
...
...
@@ -5,21 +5,24 @@
<div
class=
"loginTitle"
>
登录窗口
</div>
<div
class=
"loginText"
>
欢迎登录后台系统
</div>
<div
class=
"loginInoputs"
>
<div
class=
"userInpBody"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
>
<el-form-item
class=
"userInpBody"
>
<div
class=
"userIcon"
><img
src=
"../imgs/yonghuming.png"
></div>
<input
type=
"text"
id=
"userInp"
placeholder=
"输入你的用户名"
v-model=
"loginForm.username"
>
</div
>
<div
class=
"passWordInpBody"
>
<el-input
v-model=
"loginForm.username"
id=
"userInp"
placeholder=
"输入你的用户名"
></el-input
>
</el-form-item
>
<el-form-item
class=
"passWordInpBody"
>
<div
class=
"passWordIcon"
><img
src=
"../imgs/mima.png"
></div>
<input
type=
"password"
id=
"passWordInp"
placeholder=
"输入你的密码"
v-model=
"loginForm.password"
>
</div>
<el-input
type=
"password"
v-model=
"loginForm.password"
id=
"passWordInp"
placeholder=
"输入你的密码"
></el-input>
</el-form-item>
</el-form>
<button
class=
"loginBtn"
@
click=
"LoginInitiation"
>
安全登录
</button>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
httpGet
}
from
"
@/common/httpBean.js
"
import
{
httpGet
,
httpPost
,
httpPostForJson
}
from
"
@/common/httpBean.js
"
import
axios
from
"
axios
"
import
{
login
,
code
}
from
"
@/axios/api.js
"
import
{
encrypt
}
from
"
@/utils/rsaEncrypt.js
"
import
Cookies
from
'
js-cookie
'
...
...
@@ -39,13 +42,12 @@ export default {
// 获取验证码
this
.
getCode
()
// 获取用户名密码等Cookie
//
this.getCookie()
this
.
getCookie
()
},
methods
:{
getCode
()
{
httpGet
(
code
).
then
(
res
=>
{
//console.log(res.uuid);
this
.
uuid
=
res
.
uuid
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
});
},
getCookie
()
{
...
...
@@ -63,9 +65,7 @@ export default {
if
(
this
.
loginForm
.
userName
==
""
||
this
.
loginForm
.
password
==
""
){
alert
(
"
请输入正确的用户名或密码!
"
)
}
else
{
httpGet
(
login
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
const
user
=
{
username
:
this
.
loginForm
.
username
,
password
:
this
.
loginForm
.
password
,
...
...
@@ -74,7 +74,20 @@ export default {
if
(
user
.
password
!==
this
.
cookiePass
)
{
user
.
password
=
encrypt
(
user
.
password
)
}
if
(
valid
)
{
if
(
valid
){
httpPostForJson
(
login
,
user
).
then
(
res
=>
{
//console.log(res);
if
(
res
.
user
.
user
.
enabled
){
//this.$store.commit('changeUser',res.user.user.nickName);
this
.
$router
.
push
({
path
:
'
homepage/mineMonitoring
'
});
}
else
{
// console.log(res);
this
.
$message
({
message
:
"
用户名密码错误
"
,
type
:
'
error
'
});
}
})
this
.
loading
=
true
if
(
user
.
rememberMe
)
{
Cookies
.
set
(
'
username
'
,
user
.
username
,
{
expires
:
Config
.
passCookieExpires
})
...
...
@@ -88,8 +101,6 @@ export default {
return
false
}
})
})
this
.
$router
.
push
({
path
:
'
homepage/mineMonitoring
'
});
}
}
}
...
...
@@ -150,11 +161,13 @@ export default {
height
:
300px
;
}
.userInpBody
{
display
:
flex
;
padding
:
2px
;
border
:
1px
solid
rgb
(
18
,
70
,
113
);
margin-bottom
:
20px
;
}
.el-form-item__content
{
display
:
flex
;
}
.userIcon
{
padding
:
15px
;
box-sizing
:
border-box
;
...
...
@@ -163,16 +176,16 @@ export default {
background-color
:
rgb
(
18
,
70
,
113
);
}
#userInp
{
margin-left
:
10px
;
height
:
100%
;
width
:
80%
;
background
:
none
;
outline
:
none
;
border
:
none
;
font-size
:
20px
;
color
:
rgb
(
47
,
213
,
255
);
letter-spacing
:
3
px
;
letter-spacing
:
2
px
;
}
::-webkit-input-placeholder
{
/* WebKit browsers */
.el-input
input
::-webkit-input-placeholder
{
color
:
rgb
(
47
,
213
,
255
);
}
.passWordInpBody
{
...
...
@@ -189,14 +202,14 @@ export default {
background-color
:
rgb
(
18
,
70
,
113
);
}
#passWordInp
{
margin-left
:
10px
;
height
:
100%
;
width
:
80%
;
background
:
none
;
outline
:
none
;
border
:
none
;
font-size
:
20px
;
color
:
rgb
(
47
,
213
,
255
);
letter-spacing
:
3
px
;
letter-spacing
:
2
px
;
}
.loginBtn
{
width
:
100%
;
...
...
src/views/mineMonitoring.vue
View file @
2d6affb6
...
...
@@ -18,7 +18,7 @@
</div>
</div>
<div
class=
"intelligentDispatchRight"
>
<img
src=
"../imgs/zhinengpaidan.png"
style=
"margin-left:33px;"
>
<img
src=
"../imgs/zhinengpaidan.png"
style=
"margin-left:33px;"
class=
"xuanzhuanAll"
>
<div
style=
"color:#28F7FF;font-size:28px;text-align: center;"
>
{{
$store
.
state
.
a
.
intelligentDispatch
.
name
}}
</div>
<img
src=
"../imgs/juxing2.png"
style=
"margin:10px 0px 0px 80px;"
>
</div>
...
...
@@ -39,7 +39,7 @@
</div>
</div>
<div
class=
"environmentalMonitoringRight"
>
<img
src=
"../imgs/huanjingjiance.png"
style=
"margin-left:33px;"
>
<img
src=
"../imgs/huanjingjiance.png"
style=
"margin-left:33px;"
class=
"xuanzhuanAll"
>
<div
style=
"color:#28F7FF;font-size:28px;text-align: center;"
>
{{
$store
.
state
.
a
.
environmentalMonitoring
.
name
}}
</div>
<img
src=
"../imgs/juxing2.png"
style=
"margin:10px 0px 0px 80px;"
>
</div>
...
...
@@ -60,7 +60,7 @@
</div>
</div>
<div
class=
"locationSystemRight"
>
<img
src=
"../imgs/dingweixitong.png"
style=
"margin-left:33px;"
>
<img
src=
"../imgs/dingweixitong.png"
style=
"margin-left:33px;"
class=
"xuanzhuanAll"
>
<div
style=
"color:#28F7FF;font-size:28px;text-align: center;"
>
{{
$store
.
state
.
a
.
locationSystem
.
name
}}
</div>
<img
src=
"../imgs/juxing2.png"
style=
"margin:10px 0px 0px 80px;"
>
</div>
...
...
@@ -69,7 +69,7 @@
<!-- 边坡在线监测 -->
<div
class=
"slopeMonitoring"
>
<div
class=
"slopeMonitoringRight"
>
<img
src=
"../imgs/bianpojiance.png"
style=
"margin-left:33px;"
>
<img
src=
"../imgs/bianpojiance.png"
style=
"margin-left:33px;"
class=
"xuanzhuanAll"
>
<div
style=
"color:#28F7FF;font-size:28px;text-align: center;"
>
{{
$store
.
state
.
a
.
slopeMonitoring
.
name
}}
</div>
<img
src=
"../imgs/juxing2.png"
style=
"margin:10px 0px 0px 80px;"
>
</div>
...
...
@@ -90,7 +90,7 @@
<!-- 生产自动化 -->
<div
class=
"productionAutomation"
>
<div
class=
"productionAutomationRight"
>
<img
src=
"../imgs/shengchanzidonghua.png"
style=
"margin-left:33px;"
>
<img
src=
"../imgs/shengchanzidonghua.png"
style=
"margin-left:33px;"
class=
"xuanzhuanAll"
>
<div
style=
"color:#28F7FF;font-size:28px;text-align: center;"
>
{{
$store
.
state
.
a
.
productionAutomation
.
name
}}
</div>
<img
src=
"../imgs/juxing2.png"
style=
"margin:10px 0px 0px 80px;"
>
</div>
...
...
@@ -285,6 +285,14 @@ export default {
.intelligentDispatchRight
{
width
:
170px
;
}
.xuanzhuanAll
{
animation
:
xuanzhuan
6s
linear
infinite
;
}
/* @keyframes xuanzhuan{
0%{-webkit-transform:rotate(0deg);}
50%{-webkit-transform:rotate(-180deg);}
100%{-webkit-transform:rotate(-360deg);}
} */
/* 环境监测 */
.environmentalMonitoring
{
top
:
60%
;
...
...
src/views/videoSurveillance/videoSetting.vue
View file @
2d6affb6
<
template
>
<div>
<span>
监控设置
</span>
<div
class=
"iframeBody"
>
<div
class=
"leftMenuBar"
>
<div
style=
"color:#071E4C;font-weight:600;font-size:20px;margin-bottom:20px;"
>
监控设置
</div>
<div
style=
"color:#071E4C;font-weight:600;font-size:17px;"
>
<div
v-for=
"(item,index) in videoAreaArray"
:key=
"index"
style=
"margin-bottom:10px;cursor: pointer;"
:class=
"index == videoAreaIndex ? 'leftMenuSelected' : '' "
@
click=
"videoMenuIndex(index)"
>
<span
class=
"el-icon-camera-solid"
>
{{
item
}}
</span>
</div>
</div>
</div>
<div
class=
"rightVideoBox"
>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
(){
return
{
videoAreaArray
:[
"
采区监控
"
,
"
厂区监控
"
,
"
办公室监控
"
,
"
办公室监控1
"
,
"
办公室监控2
"
],
videoAreaIndex
:
0
,
}
},
methods
:{
videoMenuIndex
(
index
){
this
.
videoAreaIndex
=
index
;
}
},
}
</
script
>
<
style
>
<
style
scoped
>
*
{
margin
:
0
;
padding
:
0
;
}
.iframeBody
{
height
:
100%
;
display
:
flex
;
width
:
100%
;
}
.leftMenuBar
{
width
:
10%
;
height
:
100%
;
background-color
:
white
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.rightVideoBox
{
width
:
90%
;
height
:
100%
;
background-color
:
sandybrown
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
}
.leftMenuSelected
{
color
:
rgb
(
0
,
82
,
255
);
}
.sonVideoBox
{
width
:
49.8%
;
height
:
49.8%
;
border
:
1px
solid
red
;
}
</
style
>
\ No newline at end of file
src/views/videoSurveillance/videoShow.vue
View file @
2d6affb6
<
template
>
<div
class=
"iframeBody"
>
<div
class=
"leftMenuBar"
>
<div
style=
"color:#071E4C;font-weight:600;font-size:20px;margin-bottom:20px;"
>
视频监控区域
</div>
<div
style=
"color:#071E4C;font-weight:600;font-size:17px;"
>
...
...
@@ -10,8 +11,10 @@
</div>
<div
class=
"rightVideoBox"
>
<div
v-for=
"(item,index) in rightVideoBoxArray"
:key=
"index"
class=
"sonVideoBox"
>
</div>
</div>
</div>
</
template
>
...
...
@@ -22,6 +25,7 @@ export default {
return
{
videoAreaArray
:[
"
采区监控
"
,
"
厂区监控
"
,
"
办公室监控
"
,
"
办公室监控1
"
,
"
办公室监控2
"
],
videoAreaIndex
:
0
,
rightVideoBoxArray
:[
4
,
4
,
4
,
4
],
}
},
methods
:{
...
...
@@ -35,7 +39,6 @@ export default {
<
style
scoped
>
*
{
margin
:
0
;
padding
:
0
;
}
...
...
@@ -54,9 +57,17 @@ export default {
.rightVideoBox
{
width
:
90%
;
height
:
100%
;
background-color
:
bisque
;
background-color
:
white
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
center
;
}
.leftMenuSelected
{
color
:
rgb
(
0
,
82
,
255
);
}
.sonVideoBox
{
width
:
49.8%
;
height
:
49.8%
;
border
:
1px
solid
red
;
}
</
style
>
\ No newline at end of file
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