240 lines
4.7 KiB
Vue
240 lines
4.7 KiB
Vue
|
<template>
|
||
|
<div class="control-panel">
|
||
|
<!-- 顶部状态栏 -->
|
||
|
<div class="status-bar">
|
||
|
<div class="placeholder-div"></div>
|
||
|
<div class="title-container">
|
||
|
<div class="title-box">
|
||
|
遥控车当前状态
|
||
|
<img src="../assets/img/shout.png" alt="voice" class="voice-icon-img" style="width: 20px; height: 20px;margin-left: 20px;">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="top-right-icons">
|
||
|
<img src="../assets/img/connect.png" alt="link" class="top-icon">
|
||
|
<img src="../assets/img/bat_empty.png" alt="mp3" class="top-icon">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- 主要内容区域 -->
|
||
|
<div class="main-content">
|
||
|
<!-- 左侧控制开关 -->
|
||
|
<div class="left-controls">
|
||
|
<div class="switch-item">
|
||
|
<span>屏幕</span>
|
||
|
<el-switch v-model="screenStatus" />
|
||
|
</div>
|
||
|
<div class="switch-item">
|
||
|
<span>警灯</span>
|
||
|
<el-switch v-model="warningLightStatus" />
|
||
|
</div>
|
||
|
<div class="switch-item">
|
||
|
<span>跟随</span>
|
||
|
<el-switch v-model="followStatus" />
|
||
|
</div>
|
||
|
<div class="switch-item">
|
||
|
<span>避障</span>
|
||
|
<el-switch v-model="obstacleStatus" />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- 中间车辆状态显示区域 -->
|
||
|
<div class="center-display">
|
||
|
<div class="status-text">云台状态</div>
|
||
|
<div class="car-display">
|
||
|
<img src="../assets/img/car.png" alt="car" class="car-image" />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- 右侧状态图标 -->
|
||
|
<div class="right-status">
|
||
|
<div class="status-icons">
|
||
|
<div class="icons-row">
|
||
|
<div class="icon-item">
|
||
|
<img src="../assets/img/refresh.png" alt="refresh" style="width: 40px; height: 40px;">
|
||
|
</div>
|
||
|
<div class="icon-item">
|
||
|
<img src="../assets/img/mp3.png" alt="play" style="width: 40px; height: 40px;">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="control-button">
|
||
|
<img src="../assets/img/stop.png" alt="control" class="control-button-img" style="width: 80px; height: 80px;">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: 'CarControl',
|
||
|
data() {
|
||
|
return {
|
||
|
screenStatus: false,
|
||
|
warningLightStatus: false,
|
||
|
followStatus: false,
|
||
|
obstacleStatus: false
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
.control-panel {
|
||
|
position: fixed;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
width: 100vw;
|
||
|
height: 100vh;
|
||
|
background-color: #000033;
|
||
|
color: #fff;
|
||
|
overflow: hidden;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
}
|
||
|
|
||
|
.status-bar {
|
||
|
height: 60px;
|
||
|
background-color: #000033;
|
||
|
display: flex;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
padding: 0 20px;
|
||
|
position: relative;
|
||
|
}
|
||
|
|
||
|
.placeholder-div {
|
||
|
width: 63px;
|
||
|
}
|
||
|
|
||
|
.title-container {
|
||
|
position: absolute;
|
||
|
left: 50%;
|
||
|
transform: translateX(-50%);
|
||
|
font-size: 24px;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
gap: 10px;
|
||
|
}
|
||
|
|
||
|
.title-box {
|
||
|
border: 2px solid #00ffff;
|
||
|
padding: 5px 15px;
|
||
|
border-radius: 8px;
|
||
|
}
|
||
|
|
||
|
.main-content {
|
||
|
flex: 1;
|
||
|
display: flex;
|
||
|
padding: 20px;
|
||
|
gap: 20px;
|
||
|
}
|
||
|
|
||
|
.left-controls {
|
||
|
width: 120px;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
gap: 15px;
|
||
|
}
|
||
|
|
||
|
.switch-item {
|
||
|
display: flex;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
padding: 10px;
|
||
|
border: 1px solid #00ffff;
|
||
|
border-radius: 8px;
|
||
|
font-size: 20px;
|
||
|
}
|
||
|
|
||
|
.center-display {
|
||
|
flex: 1;
|
||
|
border: 1px solid #00ffff;
|
||
|
border-radius: 8px;
|
||
|
padding: 20px;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: flex-start;
|
||
|
}
|
||
|
|
||
|
.status-text {
|
||
|
font-size: 20px;
|
||
|
color: #00ffff;
|
||
|
align-self: flex-start;
|
||
|
margin-bottom: 10px;
|
||
|
}
|
||
|
|
||
|
.car-display {
|
||
|
flex: 1;
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
width: 100%;
|
||
|
}
|
||
|
|
||
|
.car-image {
|
||
|
width: 160px;
|
||
|
height: auto;
|
||
|
}
|
||
|
|
||
|
.right-status {
|
||
|
width: 150px;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.status-icons {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
width: 100%;
|
||
|
margin-top: 50px;
|
||
|
}
|
||
|
|
||
|
.icons-row {
|
||
|
display: flex;
|
||
|
flex-direction: row;
|
||
|
gap: 15px;
|
||
|
justify-content: center;
|
||
|
}
|
||
|
|
||
|
.icon-item {
|
||
|
width: 40px;
|
||
|
height: 40px;
|
||
|
/* border: 1px solid #00ffff; */
|
||
|
border-radius: 50%;
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
color: #00ffff;
|
||
|
}
|
||
|
|
||
|
.battery {
|
||
|
background-color: #00ffff;
|
||
|
color: #000033;
|
||
|
}
|
||
|
|
||
|
:deep(.el-switch__core) {
|
||
|
border-color: #00ffff;
|
||
|
background-color: transparent;
|
||
|
}
|
||
|
|
||
|
:deep(.el-switch.is-checked .el-switch__core) {
|
||
|
background-color: #00ffff;
|
||
|
}
|
||
|
|
||
|
.top-right-icons {
|
||
|
display: flex;
|
||
|
gap: 15px;
|
||
|
align-items: center;
|
||
|
width: 63px;
|
||
|
}
|
||
|
|
||
|
.top-icon {
|
||
|
width: 24px;
|
||
|
height: 24px;
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
</style>
|