Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NewTruckTerminalSyetem
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
NewTruckTerminalSyetem
Commits
cea7d5df
Commit
cea7d5df
authored
Nov 15, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录退出系统时人员与车辆绑定问题
parent
ccf18a0d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
33 deletions
+53
-33
Map.vue
src/components/mars3d/Map.vue
+3
-2
Login.vue
src/views/Login.vue
+38
-27
index.vue
src/views/MLargeScreen/components/personalCenter/index.vue
+6
-1
index.vue
src/views/MLargeScreen/index.vue
+6
-3
No files found.
src/components/mars3d/Map.vue
View file @
cea7d5df
...
...
@@ -43,6 +43,7 @@ export default {
defaultwd
:
52.158
,
realjd
:
140.71212
,
realwd
:
52.158
,
carnumber
:
''
,
}
},
...
...
@@ -85,8 +86,8 @@ export default {
methods
:
{
//获取车辆设备名和车牌号
getCarInforFn
(){
getCarInforFn
(
carnumber
){
this
.
carnumber
=
carnumber
;
//获取车辆类型
httpGet
(
apiCarClassQuery
,{
size
:
9999
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
...
...
src/views/Login.vue
View file @
cea7d5df
...
...
@@ -38,7 +38,7 @@
</
template
>
<
script
>
import
{
httpGet
,
httpPostForJson
}
from
"
@/common/httpBean.js
"
;
import
{
httpGet
,
httpPostForJson
,
putForJson
}
from
"
@/common/httpBean.js
"
;
import
{
login
,
code
,
apiEquipmentQuery
,
vehicleInformationQuery
}
from
"
@/axios/api.js
"
;
import
{
encrypt
}
from
"
@/utils/rsaEncrypt.js
"
;
import
Cookies
from
"
js-cookie
"
;
...
...
@@ -62,6 +62,8 @@ export default {
deviceOAID
:
''
,
//判断设备是否与车绑定
bindingStatus
:
false
,
//绑定的车牌号
bindingCar
:
''
,
};
},
created
()
{
...
...
@@ -149,6 +151,7 @@ export default {
//查询车辆表中设备是否与车辆绑定
httpGet
(
vehicleInformationQuery
,{
equipmentName
:
this
.
deviceOAID
}).
then
((
resCar
)
=>
{
if
(
resCar
.
code
==
200
&&
resCar
.
data
.
totalElements
!=
0
){
this
.
bindingCar
=
resCar
.
data
.
content
[
0
].
number
;
this
.
bindingStatus
=
true
;
this
.
LoginInitiation
();
}
else
{
...
...
@@ -203,8 +206,16 @@ export default {
Cookies
.
remove
(
'
username
'
)
Cookies
.
remove
(
'
password
'
)
}
//that.$router.push({path: '/MLargeScreen/index'});
//修改人员表中绑定的车辆personalCenterInforQuery
httpGet
(
personalCenterInforQuery
,{
userName
:
user
.
username
}).
then
((
respersonal
)
=>
{
if
(
respersonal
.
code
==
200
&&
respersonal
.
data
.
totalElements
!=
0
){
let
lastpersonalData
=
respersonal
.
data
.
content
[
0
];
lastpersonalData
.
car
=
this
.
bindingCar
;
putForJson
(
personalCenterInforQuery
,
lastpersonalData
).
then
((
res
)
=>
{
that
.
$router
.
push
({
path
:
'
/MLargeScreen/index?
'
+
user
.
username
});
})
}
});
}
})
}
else
{
...
...
src/views/MLargeScreen/components/personalCenter/index.vue
View file @
cea7d5df
...
...
@@ -154,7 +154,10 @@ export default {
}
else
{
//修改车辆状态为离线
putForJson
(
vehicleInformationUpdate
,{
id
:
res1
.
data
.
content
[
0
].
id
,
odo
:
0
,
oddStatus
:
1
}).
then
((
res2
)
=>
{
//人员信息表中与车辆解绑
putForJson
(
personalCenterInforQuery
,{
id
:
this
.
personalInformationData
.
id
,
car
:
''
}).
then
((
res3
)
=>
{
this
.
logout
();
})
});
}
}
...
...
@@ -242,6 +245,8 @@ export default {
}
else
{
//修改车辆状态为离线
putForJson
(
vehicleInformationUpdate
,{
id
:
res1
.
data
.
content
[
0
].
id
,
odo
:
0
,
oddStatus
:
1
}).
then
((
res2
)
=>
{});
//人员信息表中与车辆解绑
putForJson
(
personalCenterInforQuery
,{
id
:
this
.
personalInformationData
.
id
,
car
:
''
}).
then
((
res3
)
=>
{})
}
}
});
...
...
src/views/MLargeScreen/index.vue
View file @
cea7d5df
...
...
@@ -234,8 +234,13 @@ export default {
if
(
res
.
code
==
200
&&
res
.
data
.
totalElements
!=
0
){
this
.
carnumber
=
res
.
data
.
content
[
0
].
car
;
this
.
personalName
=
res
.
data
.
content
[
0
].
name
;
//展示二维地图
this
.
$refs
.
mars3dViewerMapMethod
.
getCarInforFn
(
this
.
carnumber
);
//开启接受订单
this
.
$refs
.
startOrderReceivingMethod
.
loadData
(
this
.
carnumber
);
//开启语音接收
this
.
$refs
.
voiceApplicationMethod
.
loadData3
(
this
.
carnumber
);
//获取车辆信息
httpGet
(
vehicleInformationQuery
,{
number
:
this
.
carnumber
}).
then
((
res1
)
=>
{
if
(
res1
.
code
==
200
){
if
(
res1
.
data
.
totalElements
==
0
){
...
...
@@ -266,8 +271,6 @@ export default {
this
.
controlPointData
=
res
.
data
.
content
;
}
})
//展示二维地图
this
.
$refs
.
mars3dViewerMapMethod
.
getCarInforFn
();
},
//获取待装卡车列表
...
...
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