Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FleetTruckView
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
FleetTruck
FleetTruckView
Commits
8dd05921
Commit
8dd05921
authored
Jan 02, 2024
by
高晓帆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
adb0ed08
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1553 additions
and
11 deletions
+1553
-11
CMakeLists_20231230185155.txt
.history/CMakeLists_20231230185155.txt
+46
-0
CMakeLists_20231230190121.txt
.history/CMakeLists_20231230190121.txt
+46
-0
CMakeLists_20231230190122.txt
.history/CMakeLists_20231230190122.txt
+46
-0
CMakeLists_20231230190125.txt
.history/CMakeLists_20231230190125.txt
+46
-0
BasicMessage_20231230185155.vue
.history/src/views/BasicMessage_20231230185155.vue
+360
-0
BasicMessage_20231230185406.vue
.history/src/views/BasicMessage_20231230185406.vue
+360
-0
Logout_20231230185155.vue
.history/src/views/Logout_20231230185155.vue
+76
-0
Logout_20231230185404.vue
.history/src/views/Logout_20231230185404.vue
+76
-0
ModeSwitch_20231230185155.vue
.history/src/views/ModeSwitch_20231230185155.vue
+243
-0
ModeSwitch_20231230185434.vue
.history/src/views/ModeSwitch_20231230185434.vue
+243
-0
SideBar_20231208180004.vue
.history/src/views/SideBar_20231208180004.vue
+1
-1
CMakeLists.txt
CMakeLists.txt
+1
-1
Truckmonitorview.zip
Truckmonitorview.zip
+0
-0
BasicMessage.vue
src/views/BasicMessage.vue
+3
-3
Logout.vue
src/views/Logout.vue
+1
-1
ModeSwitch.vue
src/views/ModeSwitch.vue
+5
-5
No files found.
.history/CMakeLists_20231230185155.txt
0 → 100644
View file @
8dd05921
cmake_minimum_required(VERSION 3.5)
project (TruckMonitorView)
set (CMAKE_CXX_STANDARD 11)
# Version.
set (MAJOR_VERSION "1")
set (MINOR_VERSION "1")
set (PATCH_VERSION "4")
# Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
include (HtCMakePub)
install_system_packages (
PACKAGES "nodejs"
)
add_custom_command (
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/dist"
COMMAND "npm" "install" "--force"
COMMAND "npm" "run" "build"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
add_custom_target ("${PROJECT_NAME}" ALL
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/dist"
)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist"
DESTINATION "/var/www/${PROJECT_NAME}"
)
# Pack.
set (CPACK_PACKAGE_NAME "ht-${PROJECT_NAME}")
set (CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
set (CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
set (CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
set (CPACK_PACKAGE_CONTACT "Fan Jianping <jianping.fan@waytous.com>, Li Lingyan <lingyan.li@waytous.com>, Gao Xiaofan <xiaofan.gao@waytous.com>")
set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "webtruckview. Branch: ${GIT_BRANCH}. Commit: ${GIT_LAST_COMMIT}.")
include(HtCMakeDeb)
.history/CMakeLists_20231230190121.txt
0 → 100644
View file @
8dd05921
cmake_minimum_required(VERSION 3.5)
project (TruckMonitorView)
set (CMAKE_CXX_STANDARD 11)
# Version.
set (MAJOR_VERSION "1")
set (MINOR_VERSION "1")
set (PATCH_VERSION "4")
# Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
include (HtCMakePub)
install_system_packages (
PACKAGES "nodejs"
)
add_custom_command (
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/dist"
COMMAND "npm" "install" "--force"
COMMAND "npm" "run" "build"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
add_custom_target ("${PROJECT_NAME}" ALL
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/dist"
)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist"
DESTINATION "/var/www/${PROJECT_NAME}"
)
# Pack.
set (CPACK_PACKAGE_NAME "ht-${PROJECT_NAME}")
set (CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
set (CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
set (CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
set (CPACK_PACKAGE_CONTACT "Li Lingyan <lingyan.li@waytous.com>, Gao Xiaofan <xiaofan.gao@waytous.com>")
set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "webtruckview. Branch: ${GIT_BRANCH}. Commit: ${GIT_LAST_COMMIT}.")
include(HtCMakeDeb)
.history/CMakeLists_20231230190122.txt
0 → 100644
View file @
8dd05921
cmake_minimum_required(VERSION 3.5)
project (TruckMonitorView)
set (CMAKE_CXX_STANDARD 11)
# Version.
set (MAJOR_VERSION "1")
set (MINOR_VERSION "1")
set (PATCH_VERSION "4")
# Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
include (HtCMakePub)
install_system_packages (
PACKAGES "nodejs"
)
add_custom_command (
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/dist"
COMMAND "npm" "install" "--force"
COMMAND "npm" "run" "build"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
add_custom_target ("${PROJECT_NAME}" ALL
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/dist"
)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist"
DESTINATION "/var/www/${PROJECT_NAME}"
)
# Pack.
set (CPACK_PACKAGE_NAME "ht-${PROJECT_NAME}")
set (CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
set (CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
set (CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
set (CPACK_PACKAGE_CONTACT "Li Lingyan <lingyan.li@waytous.com>, Gao Xiaofan <xiaofan.gao@waytous.com>")
set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "webtruckview. Branch: ${GIT_BRANCH}. Commit: ${GIT_LAST_COMMIT}.")
include(HtCMakeDeb)
.history/CMakeLists_20231230190125.txt
0 → 100644
View file @
8dd05921
cmake_minimum_required(VERSION 3.5)
project (TruckMonitorView)
set (CMAKE_CXX_STANDARD 11)
# Version.
set (MAJOR_VERSION "1")
set (MINOR_VERSION "1")
set (PATCH_VERSION "4")
# Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
include (HtCMakePub)
install_system_packages (
PACKAGES "nodejs"
)
add_custom_command (
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/dist"
COMMAND "npm" "install" "--force"
COMMAND "npm" "run" "build"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
add_custom_target ("${PROJECT_NAME}" ALL
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/dist"
)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/dist"
DESTINATION "/var/www/${PROJECT_NAME}"
)
# Pack.
set (CPACK_PACKAGE_NAME "ht-${PROJECT_NAME}")
set (CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
set (CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
set (CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
set (CPACK_PACKAGE_CONTACT "Li Lingyan <lingyan.li@waytous.com>, Gao Xiaofan <xiaofan.gao@waytous.com>")
set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "webtruckview. Branch: ${GIT_BRANCH}. Commit: ${GIT_LAST_COMMIT}.")
include(HtCMakeDeb)
.history/src/views/BasicMessage_20231230185155.vue
0 → 100644
View file @
8dd05921
This diff is collapsed.
Click to expand it.
.history/src/views/BasicMessage_20231230185406.vue
0 → 100644
View file @
8dd05921
This diff is collapsed.
Click to expand it.
.history/src/views/Logout_20231230185155.vue
0 → 100644
View file @
8dd05921
<
template
>
<div
class=
"log-out"
>
<p>
{{
tipsLogout
}}
</p>
<div
class=
"footer"
>
<Button
type=
"info"
class=
"btn"
@
click=
"doSureLogout"
>
确定
</Button>
<Button
type=
"error"
@
click=
"doCancelLogout"
>
取消
</Button>
</div>
</div>
</
template
>
<
script
setup
>
import
{
ref
,
watch
}
from
'vue'
import
{
useVehicleStore
}
from
'../store/VehicleStore'
;
import
{
useStateStore
}
from
'../store/StateStore'
;
import
{
storeToRefs
}
from
'pinia'
;
import
writeLog
from
'../js/writeLog.js'
const
props
=
defineProps
({
isShow
:
Boolean
})
const
tipsLogout
=
ref
(
'退出当前系统'
)
const
logoutStep
=
ref
(
0
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
pattern
,
softDrivingPattern
}
=
vehicleStoreToRefs
const
stateStore
=
useStateStore
()
const
emits
=
defineEmits
([
'handleSend'
,
'closeModal'
])
function
doCancelLogout
()
{
logoutStep
.
value
=
0
emits
(
'closeModal'
)
}
function
closeSystem
()
{
logoutStep
.
value
=
0
window
.
state
=
'logout'
emits
(
'handleSend'
,
{
type
:
'/btn/quitApp'
,
msg
:
{}
})
stateStore
.
setData
(
'loginAck'
,
null
)
}
function
doSureLogout
()
{
if
(
softDrivingPattern
.
value
===
1
&&
logoutStep
.
value
===
0
)
{
tipsLogout
.
value
=
'当前是无人模式,确定退出程序'
logoutStep
.
value
=
1
}
else
{
closeSystem
()
}
}
watch
(()
=>
props
.
isShow
,
(
value
)
=>
{
if
(
value
)
{
writeLog
(
'INFO'
,
"退出系统"
)
tipsLogout
.
value
=
'退出当前系统'
}
},
{
immediate
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.log-out {
&>p {
margin-bottom: 20px;
}
.footer {
text-align: end;
.btn {
margin-right: 10px;
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/Logout_20231230185404.vue
0 → 100644
View file @
8dd05921
<
template
>
<div
class=
"log-out"
>
<p>
{{
tipsLogout
}}
</p>
<div
class=
"footer"
>
<Button
type=
"info"
class=
"btn"
@
click=
"doSureLogout"
>
确定
</Button>
<Button
type=
"error"
@
click=
"doCancelLogout"
>
取消
</Button>
</div>
</div>
</
template
>
<
script
setup
>
import
{
ref
,
watch
}
from
'vue'
import
{
useVehicleStore
}
from
'../store/VehicleStore'
;
import
{
useStateStore
}
from
'../store/StateStore'
;
import
{
storeToRefs
}
from
'pinia'
;
import
writeLog
from
'../js/writeLog.js'
const
props
=
defineProps
({
isShow
:
Boolean
})
const
tipsLogout
=
ref
(
'退出当前系统'
)
const
logoutStep
=
ref
(
0
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
pattern
,
softDrivingPattern
}
=
vehicleStoreToRefs
const
stateStore
=
useStateStore
()
const
emits
=
defineEmits
([
'handleSend'
,
'closeModal'
])
function
doCancelLogout
()
{
logoutStep
.
value
=
0
emits
(
'closeModal'
)
}
function
closeSystem
()
{
logoutStep
.
value
=
0
window
.
state
=
'logout'
emits
(
'handleSend'
,
{
type
:
'/btn/quitApp'
,
msg
:
{}
})
stateStore
.
setData
(
'loginAck'
,
null
)
}
function
doSureLogout
()
{
if
(
pattern
.
value
===
1
&&
logoutStep
.
value
===
0
)
{
tipsLogout
.
value
=
'当前是无人模式,确定退出程序'
logoutStep
.
value
=
1
}
else
{
closeSystem
()
}
}
watch
(()
=>
props
.
isShow
,
(
value
)
=>
{
if
(
value
)
{
writeLog
(
'INFO'
,
"退出系统"
)
tipsLogout
.
value
=
'退出当前系统'
}
},
{
immediate
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.log-out {
&>p {
margin-bottom: 20px;
}
.footer {
text-align: end;
.btn {
margin-right: 10px;
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/ModeSwitch_20231230185155.vue
0 → 100644
View file @
8dd05921
<
template
>
<div
class=
"mode-switch"
>
<div
class=
"content"
>
<p>
{{
content
}}
</p>
<p>
{{
contentTip
}}
</p>
</div>
<div
class=
"footer"
>
<Button
class=
"btn"
type=
"info"
@
click=
"doSure"
v-show=
"isShowSure"
>
{{
sureText
}}
</Button>
<Button
type=
"error"
@
click=
"doCancel"
>
{{
cancelText
}}
</Button>
</div>
</div>
</
template
>
<
script
setup
>
import
{
watch
,
ref
}
from
'vue'
import
{
useVehicleStore
}
from
'../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
let
modeTimer
=
null
const
CLOSE_MODE_TIME
=
5
*
1000
const
props
=
defineProps
({
isShow
:
Boolean
})
const
content
=
ref
(
''
)
const
contentTip
=
ref
(
''
)
const
isShowSure
=
ref
(
true
)
const
sureText
=
ref
(
'确定'
)
const
cancelText
=
ref
(
'取消'
)
const
step
=
ref
(
0
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
pattern
,
softDrivingPattern
,
patternAck
,
singleTrackAck
}
=
vehicleStoreToRefs
const
emits
=
defineEmits
([
'handleSend'
,
'closeModal'
])
function
doSure
()
{
let
type
=
null
,
iscontinue
=
null
// 有人——无人
if
(
softDrivingPattern
.
value
===
0
)
{
if
(
step
.
value
===
1
)
{
type
=
0
content
.
value
=
'正在等待机群批准模式切换请求'
step
.
value
=
2
}
else
if
(
step
.
value
===
3
)
{
type
=
2
iscontinue
=
1
content
.
value
=
'模式切换审批成功,正在接管无人驾驶'
step
.
value
=
4
}
}
else
{
// 有人——无人
if
(
step
.
value
===
1
)
{
type
=
2
content
.
value
=
'正在取消无人驾驶接管'
step
.
value
=
4
}
}
isShowSure
.
value
=
false
cancelText
.
value
=
'取消'
const
changePattern
=
softDrivingPattern
.
value
===
0
?
1
:
0
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
type
,
pattern
:
changePattern
,
iscontinue
}
})
}
function
doCancel
()
{
if
([
2
,
3
,
4
].
includes
(
step
.
value
))
{
// type === 1:取消云端请求;type === 3:取消车端请求
let
type
=
step
.
value
===
2
?
1
:
3
let
iscontinue
=
null
// 切换为无人驾驶,并且不继续上一次任务
if
(
softDrivingPattern
.
value
===
0
&&
step
.
value
===
3
)
{
iscontinue
=
0
type
=
2
content
.
value
=
'模式切换审批成功,正在接管无人驾驶'
step
.
value
=
4
isShowSure
.
value
=
false
cancelText
.
value
=
'取消'
}
const
changePattern
=
softDrivingPattern
.
value
===
0
?
1
:
0
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
type
,
pattern
:
changePattern
,
iscontinue
}
})
}
else
{
emits
(
'closeModal'
)
}
}
function
doCloseMode
()
{
emits
(
'closeModal'
)
if
(
modeTimer
)
{
clearTimeout
(
modeTimer
)
modeTimer
=
null
}
}
watch
(()
=>
props
.
isShow
,
(
value
)
=>
{
if
(
value
)
{
step
.
value
=
1
isShowSure
.
value
=
true
sureText
.
value
=
'确定'
cancelText
.
value
=
'取消'
// 有人——无人
if
(
softDrivingPattern
.
value
===
0
)
{
const
{
singleTrackEnable
}
=
singleTrackAck
.
value
||
{}
if
(
singleTrackEnable
)
{
content
.
value
=
'当前处于单机循迹模式,是否切换无人模式'
contentTip
.
value
=
'(确保当前位置处于路线中)'
}
else
{
content
.
value
=
'切换为无人驾驶模式需要发送机群确认'
contentTip
.
value
=
''
}
}
else
{
content
.
value
=
'是否切换为有人驾驶模式'
contentTip
.
value
=
''
}
}
},
{
immediate
:
true
})
watch
(
patternAck
,
(
result
)
=>
{
console
.
log
(
result
)
if
(
!
result
)
return
contentTip
.
value
=
''
const
{
singleTrackEnable
}
=
singleTrackAck
.
value
||
{}
if
(
modeTimer
)
{
clearTimeout
(
modeTimer
)
modeTimer
=
null
}
const
{
type
,
pattern
:
resultPattern
,
status
}
=
result
if
(
step
.
value
===
2
)
{
isShowSure
.
value
=
false
cancelText
.
value
=
'确定'
if
(
type
===
0
)
{
switch
(
status
)
{
case
0
:
if
(
singleTrackEnable
)
{
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
type
:
2
,
pattern
:
1
,
iscontinue
:
0
}
})
}
else
{
content
.
value
=
'是否继续上一次任务(确保车辆位置未变动)'
step
.
value
=
3
isShowSure
.
value
=
true
sureText
.
value
=
'是'
cancelText
.
value
=
'否'
}
break
case
1
:
content
.
value
=
'模式切换请求未获得批准'
break
case
2
:
content
.
value
=
'请先完成此设备的点检工作'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
}
else
{
switch
(
status
)
{
case
0
:
content
.
value
=
'成功'
break
case
1
:
content
.
value
=
'失败'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
step
.
value
=
0
modeTimer
=
setTimeout
(
doCloseMode
,
CLOSE_MODE_TIME
)
}
}
else
if
(
step
.
value
===
4
)
{
isShowSure
.
value
=
false
cancelText
.
value
=
'确定'
if
(
type
===
2
)
{
switch
(
status
)
{
case
0
:
content
.
value
=
resultPattern
===
1
?
'接管成功'
:
'取消接管成功'
break
case
1
:
content
.
value
=
resultPattern
===
1
?
'接管失败'
:
'取消接管失败'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
}
else
{
switch
(
status
)
{
case
0
:
content
.
value
=
'成功'
break
case
1
:
content
.
value
=
'失败'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
}
step
.
value
=
0
modeTimer
=
setTimeout
(
doCloseMode
,
CLOSE_MODE_TIME
)
}
},
{
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.mode-switch {
.content {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 30px;
}
.footer {
text-align: end;
.btn {
margin-right: 10px;
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/ModeSwitch_20231230185434.vue
0 → 100644
View file @
8dd05921
<
template
>
<div
class=
"mode-switch"
>
<div
class=
"content"
>
<p>
{{
content
}}
</p>
<p>
{{
contentTip
}}
</p>
</div>
<div
class=
"footer"
>
<Button
class=
"btn"
type=
"info"
@
click=
"doSure"
v-show=
"isShowSure"
>
{{
sureText
}}
</Button>
<Button
type=
"error"
@
click=
"doCancel"
>
{{
cancelText
}}
</Button>
</div>
</div>
</
template
>
<
script
setup
>
import
{
watch
,
ref
}
from
'vue'
import
{
useVehicleStore
}
from
'../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
let
modeTimer
=
null
const
CLOSE_MODE_TIME
=
5
*
1000
const
props
=
defineProps
({
isShow
:
Boolean
})
const
content
=
ref
(
''
)
const
contentTip
=
ref
(
''
)
const
isShowSure
=
ref
(
true
)
const
sureText
=
ref
(
'确定'
)
const
cancelText
=
ref
(
'取消'
)
const
step
=
ref
(
0
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
pattern
,
softDrivingPattern
,
patternAck
,
singleTrackAck
}
=
vehicleStoreToRefs
const
emits
=
defineEmits
([
'handleSend'
,
'closeModal'
])
function
doSure
()
{
let
type
=
null
,
iscontinue
=
null
// 有人——无人
if
(
pattern
.
value
===
0
)
{
if
(
step
.
value
===
1
)
{
type
=
0
content
.
value
=
'正在等待机群批准模式切换请求'
step
.
value
=
2
}
else
if
(
step
.
value
===
3
)
{
type
=
2
iscontinue
=
1
content
.
value
=
'模式切换审批成功,正在接管无人驾驶'
step
.
value
=
4
}
}
else
{
// 有人——无人
if
(
step
.
value
===
1
)
{
type
=
2
content
.
value
=
'正在取消无人驾驶接管'
step
.
value
=
4
}
}
isShowSure
.
value
=
false
cancelText
.
value
=
'取消'
const
changePattern
=
pattern
.
value
===
0
?
1
:
0
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
type
,
pattern
:
changePattern
,
iscontinue
}
})
}
function
doCancel
()
{
if
([
2
,
3
,
4
].
includes
(
step
.
value
))
{
// type === 1:取消云端请求;type === 3:取消车端请求
let
type
=
step
.
value
===
2
?
1
:
3
let
iscontinue
=
null
// 切换为无人驾驶,并且不继续上一次任务
if
(
pattern
.
value
===
0
&&
step
.
value
===
3
)
{
iscontinue
=
0
type
=
2
content
.
value
=
'模式切换审批成功,正在接管无人驾驶'
step
.
value
=
4
isShowSure
.
value
=
false
cancelText
.
value
=
'取消'
}
const
changePattern
=
pattern
.
value
===
0
?
1
:
0
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
type
,
pattern
:
changePattern
,
iscontinue
}
})
}
else
{
emits
(
'closeModal'
)
}
}
function
doCloseMode
()
{
emits
(
'closeModal'
)
if
(
modeTimer
)
{
clearTimeout
(
modeTimer
)
modeTimer
=
null
}
}
watch
(()
=>
props
.
isShow
,
(
value
)
=>
{
if
(
value
)
{
step
.
value
=
1
isShowSure
.
value
=
true
sureText
.
value
=
'确定'
cancelText
.
value
=
'取消'
// 有人——无人
if
(
pattern
.
value
===
0
)
{
const
{
singleTrackEnable
}
=
singleTrackAck
.
value
||
{}
if
(
singleTrackEnable
)
{
content
.
value
=
'当前处于单机循迹模式,是否切换无人模式'
contentTip
.
value
=
'(确保当前位置处于路线中)'
}
else
{
content
.
value
=
'切换为无人驾驶模式需要发送机群确认'
contentTip
.
value
=
''
}
}
else
{
content
.
value
=
'是否切换为有人驾驶模式'
contentTip
.
value
=
''
}
}
},
{
immediate
:
true
})
watch
(
patternAck
,
(
result
)
=>
{
console
.
log
(
result
)
if
(
!
result
)
return
contentTip
.
value
=
''
const
{
singleTrackEnable
}
=
singleTrackAck
.
value
||
{}
if
(
modeTimer
)
{
clearTimeout
(
modeTimer
)
modeTimer
=
null
}
const
{
type
,
pattern
:
resultPattern
,
status
}
=
result
if
(
step
.
value
===
2
)
{
isShowSure
.
value
=
false
cancelText
.
value
=
'确定'
if
(
type
===
0
)
{
switch
(
status
)
{
case
0
:
if
(
singleTrackEnable
)
{
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
type
:
2
,
pattern
:
1
,
iscontinue
:
0
}
})
}
else
{
content
.
value
=
'是否继续上一次任务(确保车辆位置未变动)'
step
.
value
=
3
isShowSure
.
value
=
true
sureText
.
value
=
'是'
cancelText
.
value
=
'否'
}
break
case
1
:
content
.
value
=
'模式切换请求未获得批准'
break
case
2
:
content
.
value
=
'请先完成此设备的点检工作'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
}
else
{
switch
(
status
)
{
case
0
:
content
.
value
=
'成功'
break
case
1
:
content
.
value
=
'失败'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
step
.
value
=
0
modeTimer
=
setTimeout
(
doCloseMode
,
CLOSE_MODE_TIME
)
}
}
else
if
(
step
.
value
===
4
)
{
isShowSure
.
value
=
false
cancelText
.
value
=
'确定'
if
(
type
===
2
)
{
switch
(
status
)
{
case
0
:
content
.
value
=
resultPattern
===
1
?
'接管成功'
:
'取消接管成功'
break
case
1
:
content
.
value
=
resultPattern
===
1
?
'接管失败'
:
'取消接管失败'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
}
else
{
switch
(
status
)
{
case
0
:
content
.
value
=
'成功'
break
case
1
:
content
.
value
=
'失败'
break
case
200
:
content
.
value
=
'参数校验失败'
break
}
}
step
.
value
=
0
modeTimer
=
setTimeout
(
doCloseMode
,
CLOSE_MODE_TIME
)
}
},
{
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.mode-switch {
.content {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 30px;
}
.footer {
text-align: end;
.btn {
margin-right: 10px;
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/SideBar_20231208180004.vue
View file @
8dd05921
...
...
@@ -72,7 +72,7 @@
const
isDisable
=
computed
(()
=>
{
const
{
isError
,
pattern
,
softDrivingPattern
}
=
vehicleStoreToRefs
if
(
isError
.
value
===
'fault'
&&
softDrivingP
attern
.
value
===
0
)
{
if
(
isError
.
value
===
'fault'
&&
p
attern
.
value
===
0
)
{
return
'disabled'
}
return
''
...
...
CMakeLists.txt
View file @
8dd05921
...
...
@@ -40,7 +40,7 @@ set (CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
set
(
CPACK_PACKAGE_VERSION_MINOR
"
${
MINOR_VERSION
}
"
)
set
(
CPACK_PACKAGE_VERSION_PATCH
"
${
PATCH_VERSION
}
"
)
set
(
CPACK_PACKAGE_CONTACT
"
Fan Jianping <jianping.fan@waytous.com>,
Li Lingyan <lingyan.li@waytous.com>, Gao Xiaofan <xiaofan.gao@waytous.com>"
)
set
(
CPACK_PACKAGE_CONTACT
"Li Lingyan <lingyan.li@waytous.com>, Gao Xiaofan <xiaofan.gao@waytous.com>"
)
set
(
CPACK_DEBIAN_PACKAGE_DESCRIPTION
"webtruckview. Branch:
${
GIT_BRANCH
}
. Commit:
${
GIT_LAST_COMMIT
}
."
)
include
(
HtCMakeDeb
)
Truckmonitorview.zip
View file @
8dd05921
No preview for this file type
src/views/BasicMessage.vue
View file @
8dd05921
...
...
@@ -11,7 +11,7 @@
<div
class=
"basic-top"
>
<i
:class=
"['vehicle-state', vehicleState]"
@
click=
"showStates"
></i>
<span
class=
"vehicle-msg"
>
<span>
{{
softDrivingP
attern
==
0
?
'司机'
:
'安全员'
}}
:
{{
name
}}
</span>
<span>
{{
p
attern
==
0
?
'司机'
:
'安全员'
}}
:
{{
name
}}
</span>
<span>
工号:
{{
number
}}
</span>
</span>
</div>
...
...
@@ -190,8 +190,8 @@
})
const
pattern
=
computed
(()
=>
{
const
{
softDrivingP
attern
}
=
vehicleStoreToRefs
return
softDrivingP
attern
.
value
const
{
p
attern
}
=
vehicleStoreToRefs
return
p
attern
.
value
})
function
handleClose
()
{
...
...
src/views/Logout.vue
View file @
8dd05921
...
...
@@ -42,7 +42,7 @@
}
function
doSureLogout
()
{
if
(
softDrivingP
attern
.
value
===
1
&&
logoutStep
.
value
===
0
)
{
if
(
p
attern
.
value
===
1
&&
logoutStep
.
value
===
0
)
{
tipsLogout
.
value
=
'当前是无人模式,确定退出程序'
logoutStep
.
value
=
1
}
else
{
...
...
src/views/ModeSwitch.vue
View file @
8dd05921
...
...
@@ -37,7 +37,7 @@
function
doSure
()
{
let
type
=
null
,
iscontinue
=
null
// 有人——无人
if
(
softDrivingP
attern
.
value
===
0
)
{
if
(
p
attern
.
value
===
0
)
{
if
(
step
.
value
===
1
)
{
type
=
0
content
.
value
=
'正在等待机群批准模式切换请求'
...
...
@@ -58,7 +58,7 @@
}
isShowSure
.
value
=
false
cancelText
.
value
=
'取消'
const
changePattern
=
softDrivingP
attern
.
value
===
0
?
1
:
0
const
changePattern
=
p
attern
.
value
===
0
?
1
:
0
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
...
...
@@ -75,7 +75,7 @@
let
type
=
step
.
value
===
2
?
1
:
3
let
iscontinue
=
null
// 切换为无人驾驶,并且不继续上一次任务
if
(
softDrivingP
attern
.
value
===
0
&&
step
.
value
===
3
)
{
if
(
p
attern
.
value
===
0
&&
step
.
value
===
3
)
{
iscontinue
=
0
type
=
2
content
.
value
=
'模式切换审批成功,正在接管无人驾驶'
...
...
@@ -83,7 +83,7 @@
isShowSure
.
value
=
false
cancelText
.
value
=
'取消'
}
const
changePattern
=
softDrivingP
attern
.
value
===
0
?
1
:
0
const
changePattern
=
p
attern
.
value
===
0
?
1
:
0
emits
(
'handleSend'
,
{
type
:
'/pattern/req'
,
msg
:
{
...
...
@@ -112,7 +112,7 @@
sureText
.
value
=
'确定'
cancelText
.
value
=
'取消'
// 有人——无人
if
(
softDrivingP
attern
.
value
===
0
)
{
if
(
p
attern
.
value
===
0
)
{
const
{
singleTrackEnable
}
=
singleTrackAck
.
value
||
{}
if
(
singleTrackEnable
)
{
content
.
value
=
'当前处于单机循迹模式,是否切换无人模式'
...
...
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