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
a35a2d0e
Commit
a35a2d0e
authored
Nov 15, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改this指针
parent
cea7d5df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
Login.vue
src/views/Login.vue
+14
-13
No files found.
src/views/Login.vue
View file @
a35a2d0e
...
@@ -84,47 +84,48 @@ export default {
...
@@ -84,47 +84,48 @@ export default {
},
},
methods
:
{
methods
:
{
plusReady
(){
plusReady
(){
let
that
=
this
;
plus
.
device
.
getOAID
({
plus
.
device
.
getOAID
({
success
:
function
(
e
){
success
:
function
(
e
){
console
.
log
(
e
.
oaid
);
console
.
log
(
e
.
oaid
);
th
is
.
deviceOAID
=
e
.
oaid
;
th
at
.
deviceOAID
=
e
.
oaid
;
//查询设备表是否存在该设备编号
//查询设备表是否存在该设备编号
httpGet
(
apiEquipmentQuery
,{
name
:
th
is
.
deviceOAID
}).
then
((
resSheiBei
)
=>
{
httpGet
(
apiEquipmentQuery
,{
name
:
th
at
.
deviceOAID
}).
then
((
resSheiBei
)
=>
{
if
(
resSheiBei
.
code
==
200
&&
resSheiBei
.
data
.
totalElements
!=
0
){
if
(
resSheiBei
.
code
==
200
&&
resSheiBei
.
data
.
totalElements
!=
0
){
//查询车辆表中设备是否与车辆绑定
//查询车辆表中设备是否与车辆绑定
httpGet
(
vehicleInformationQuery
,{
equipmentName
:
th
is
.
deviceOAID
}).
then
((
resCar
)
=>
{
httpGet
(
vehicleInformationQuery
,{
equipmentName
:
th
at
.
deviceOAID
}).
then
((
resCar
)
=>
{
if
(
resCar
.
code
==
200
&&
resCar
.
data
.
totalElements
!=
0
){
if
(
resCar
.
code
==
200
&&
resCar
.
data
.
totalElements
!=
0
){
th
is
.
$message
({
th
at
.
$message
({
message
:
"
设备检索完毕,可进行登录!
"
,
message
:
"
设备检索完毕,可进行登录!
"
,
type
:
'
success
'
type
:
'
success
'
});
});
th
is
.
bindingStatus
=
true
;
th
at
.
bindingStatus
=
true
;
}
else
{
}
else
{
th
is
.
$message
({
th
at
.
$message
({
message
:
"
请在后台系统中将该设备与车辆绑定后再进行登录!
"
,
message
:
"
请在后台系统中将该设备与车辆绑定后再进行登录!
"
,
type
:
'
error
'
type
:
'
error
'
});
});
th
is
.
bindingStatus
=
false
;
th
at
.
bindingStatus
=
false
;
}
}
})
})
}
else
{
}
else
{
httpPostForJson
(
apiEquipmentQuery
,{
name
:
th
is
.
deviceOAID
,
status
:
'
正常
'
}).
then
((
res
)
=>
{
httpPostForJson
(
apiEquipmentQuery
,{
name
:
th
at
.
deviceOAID
,
status
:
'
正常
'
}).
then
((
res
)
=>
{
th
is
.
$message
({
th
at
.
$message
({
message
:
"
请在后台系统中将该设备与车辆绑定后再进行登录!
"
,
message
:
"
请在后台系统中将该设备与车辆绑定后再进行登录!
"
,
type
:
'
error
'
type
:
'
error
'
});
});
th
is
.
bindingStatus
=
false
;
th
at
.
bindingStatus
=
false
;
})
})
}
}
});
});
},
},
fail
:
function
(
e
){
fail
:
function
(
e
){
console
.
log
(
'
getDeviceInfo failed:
'
+
JSON
.
stringify
(
e
));
console
.
log
(
'
getDeviceInfo failed:
'
+
JSON
.
stringify
(
e
));
th
is
.
$message
({
th
at
.
$message
({
message
:
"
获取设备信息失败,请退出系统并且开启权限后重试!
"
,
message
:
"
获取设备信息失败,请退出系统并且开启权限后重试!
"
,
type
:
'
error
'
type
:
'
error
'
});
});
th
is
.
bindingStatus
=
false
;
th
at
.
bindingStatus
=
false
;
}
}
})
})
},
},
...
@@ -210,7 +211,7 @@ export default {
...
@@ -210,7 +211,7 @@ export default {
httpGet
(
personalCenterInforQuery
,{
userName
:
user
.
username
}).
then
((
respersonal
)
=>
{
httpGet
(
personalCenterInforQuery
,{
userName
:
user
.
username
}).
then
((
respersonal
)
=>
{
if
(
respersonal
.
code
==
200
&&
respersonal
.
data
.
totalElements
!=
0
){
if
(
respersonal
.
code
==
200
&&
respersonal
.
data
.
totalElements
!=
0
){
let
lastpersonalData
=
respersonal
.
data
.
content
[
0
];
let
lastpersonalData
=
respersonal
.
data
.
content
[
0
];
lastpersonalData
.
car
=
th
is
.
bindingCar
;
lastpersonalData
.
car
=
th
at
.
bindingCar
;
putForJson
(
personalCenterInforQuery
,
lastpersonalData
).
then
((
res
)
=>
{
putForJson
(
personalCenterInforQuery
,
lastpersonalData
).
then
((
res
)
=>
{
that
.
$router
.
push
({
path
:
'
/MLargeScreen/index?
'
+
user
.
username
});
that
.
$router
.
push
({
path
:
'
/MLargeScreen/index?
'
+
user
.
username
});
})
})
...
...
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