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
7766f2ac
Commit
7766f2ac
authored
Apr 24, 2022
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
8780570f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
13 deletions
+43
-13
index.vue
...ews/MLargeScreen/components/startOrderReceiving/index.vue
+9
-3
index.vue
src/views/MLargeScreen/components/voiceApplication/index.vue
+31
-10
index.vue
src/views/MLargeScreen/index.vue
+3
-0
No files found.
src/views/MLargeScreen/components/startOrderReceiving/index.vue
View file @
7766f2ac
...
...
@@ -70,6 +70,12 @@ export default {
})
},
//关闭清除定时器
dingshiqiCloseFn
(){
if
(
this
.
sonTimer1
)
{
//如果定时器还在运行 或者直接关闭,不用判断
clearInterval
(
this
.
sonTimer1
);
//关闭
}
},
//查询是否有卸车
loadData2
(){
httpGet
(
vehicleInformationQuery
,{
number
:
this
.
carnumber
}).
then
((
res
)
=>
{
...
...
@@ -171,9 +177,9 @@ export default {
},
beforeDestroy
()
{
if
(
this
.
sonTimer1
)
{
//如果定时器还在运行 或者直接关闭,不用判断
clearInterval
(
this
.
sonTimer1
);
//关闭
}
//
if(this.sonTimer1) { //如果定时器还在运行 或者直接关闭,不用判断
//
clearInterval(this.sonTimer1); //关闭
//
}
}
}
</
script
>
...
...
src/views/MLargeScreen/components/voiceApplication/index.vue
View file @
7766f2ac
...
...
@@ -19,7 +19,7 @@
<div
class=
"voiceAppContent_2_content"
>
<el-checkbox-group
v-model=
"selectCarRadioArray"
>
<el-checkbox
v-for=
"(item,index) in carsInforData"
:label=
"item"
:key=
"index"
style=
"margin-top:10px;"
>
<div
style=
"width:20vw;text-align: center;"
>
{{
item
.
number
}}
</div>
<div
style=
"width:20vw;text-align: center;"
>
{{
item
.
number
==
'
pcBigScreen
'
?
'
调度中心
'
:
item
.
number
}}
</div>
</el-checkbox>
</el-checkbox-group>
</div>
...
...
@@ -30,7 +30,7 @@
</div>
<div
class=
"voiceAppContent_2_3_content"
>
<div
v-for=
"(item,index) in selectCarRadioArray"
:key=
"index"
class=
"voiceAppContent_2_content_selectCar"
>
<div>
车牌号:
{{
item
.
number
}}
</div>
<div>
车牌号:
{{
item
.
number
==
'
pcBigScreen
'
?
'
调度中心
'
:
item
.
number
}}
</div>
<div
style=
"width:27px;height:27px;background-color: rgb(4,112,171);text-align: center;font-size:40px;"
@
click=
"cancelSelect(index)"
>
<span>
×
</span>
</div>
...
...
@@ -192,11 +192,12 @@ export default {
});
this
.
loadData2
();
//页面刚进入时开启长连接
this
.
initWebSocket
();
this
.
heartbeatTimer
=
setInterval
(()
=>
{
this
.
reconnect
();
},
10000
)
//
this.initWebSocket();
//
this.heartbeatTimer = setInterval(() => {
//
this.reconnect();
//
}, 10000)
},
//获取车辆数据
loadData2
()
{
let
query
=
{};
query
.
size
=
9999
;
...
...
@@ -206,10 +207,21 @@ export default {
//车辆
httpGet
(
vehicleInformationQuery
,
query
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
let
obj1
=
res
.
data
.
content
;
obj1
.
unshift
({
number
:
'
pcBigScreen
'
});
this
.
carsInforData
=
res
.
data
.
content
;
}
});
},
//页面刚进入时开启长连接
loadData3
(
value
){
this
.
userName1
=
value
;
//车牌号
this
.
initWebSocket
();
this
.
heartbeatTimer
=
setInterval
(()
=>
{
this
.
reconnect
();
},
10000
)
},
//关闭语音申请组件
voiceAppCloseFn
(){
this
.
showDecide
=
false
;
this
.
selectCarFleet
=
''
;
...
...
@@ -218,6 +230,15 @@ export default {
this
.
situationWhich
=
10000
;
this
.
recClose
();
//页面销毁时关闭长连接
// this.websocketclose();
//关闭心跳
// if(this.heartbeatTimer) {
// clearInterval(this.heartbeatTimer);
// }
},
//关闭心跳以及关闭长连接
xintiaoCloseFn
(){
//页面销毁时关闭长连接
this
.
websocketclose
();
//关闭心跳
if
(
this
.
heartbeatTimer
)
{
...
...
@@ -697,11 +718,11 @@ export default {
},
beforeDestroy
(){
//页面销毁时关闭长连接
this
.
websocketclose
();
//
this.websocketclose();
//关闭心跳
if
(
this
.
heartbeatTimer
)
{
clearInterval
(
this
.
heartbeatTimer
);
}
//
if(this.heartbeatTimer) {
//
clearInterval(this.heartbeatTimer);
//
}
}
}
</
script
>
...
...
src/views/MLargeScreen/index.vue
View file @
7766f2ac
...
...
@@ -144,6 +144,7 @@ export default {
this
.
carnumber
=
res
.
data
.
content
[
0
].
car
;
this
.
personalName
=
res
.
data
.
content
[
0
].
name
;
this
.
$refs
.
startOrderReceivingMethod
.
loadData
(
this
.
carnumber
);
this
.
$refs
.
voiceApplicationMethod
.
loadData3
(
this
.
carnumber
);
httpGet
(
vehicleInformationQuery
,{
number
:
this
.
carnumber
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
...
...
@@ -385,6 +386,8 @@ export default {
},
},
beforeDestroy
(){
this
.
$refs
.
voiceApplicationMethod
.
xintiaoCloseFn
();
this
.
$refs
.
startOrderReceivingMethod
.
dingshiqiCloseFn
();
if
(
this
.
zongTimer1
)
{
clearInterval
(
this
.
zongTimer1
);
}
...
...
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