This commit is contained in:
yyy 2025-06-26 18:20:24 +08:00
commit b6bd178568
5 changed files with 136 additions and 34 deletions

View File

@ -70,3 +70,7 @@ export const cleanTrafficManagement = async (data) => {
export const doTaskContinue = async (data) => {
return await request.post({ url: `/system/robot/information/doTaskContinue?robotNo=${data.robotNo}`, data })
}
// 暂停车辆
export const stopCar = async (data) => {
return await request.post({ url: `/system/robot/information/stopRobot?robotNo=${data.robotNo}`, data })
}

View File

@ -48,8 +48,8 @@
<el-col :span="12">
<el-form-item required label="车辆状态">
<el-select v-model="formData.robotStatus" placeholder="请选择车辆状态" required>
<el-option label="暂停且无任务" :value="0" />
<el-option label="暂停(有处理中的任务)" :value="1" />
<el-option label="暂停且待命中" :value="0" />
<el-option label="暂停且任务中" :value="1" />
<el-option label="任务中" :value="2" />
<el-option label="待命" :value="3" />
<el-option label="充电中" :value="4" />
@ -463,6 +463,7 @@ const resetForm = () => {
::v-deep .el-dialog {
padding: 0 !important;
}
::v-deep .el-dialog__header {
border-bottom: 1px solid #e8e8e8 !important;
}
@ -487,6 +488,7 @@ const resetForm = () => {
width: 30px;
animation: loading-rotate 2s linear infinite;
}
.path {
animation: loading-dash 1.5s ease-in-out infinite;
stroke-dasharray: 90, 150;
@ -501,20 +503,24 @@ const resetForm = () => {
transform: rotate(360deg);
}
}
@keyframes loading-dash {
0% {
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -40px;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -120px;
}
}
@keyframes custom-spin-move {
to {
opacity: 1;
@ -522,7 +528,7 @@ const resetForm = () => {
}
.camera-item {
box-shadow: rgba(0, 0, 0, 0.03) 0px 0px 0px 1px;
box-shadow: rgb(0 0 0 / 3%) 0 0 0 1px;
padding: 16px 8px 0 0;
border-radius: 6px;
margin-bottom: 20px;

View File

@ -68,7 +68,7 @@
<div
class="new-top-box-left-item"
@click="changeRobotStatisticsType('offline')"
style="color: #cccccc"
style="color: #ccc"
:style="{ background: queryParams.robotStatisticsType == 'offline' ? '#ebf1ff' : '' }"
>
<div class="new-top-box-left-item-name">离线</div>
@ -152,10 +152,17 @@
>清除交管</el-dropdown-item
>
<el-dropdown-item
v-if="item.isStop === 1"
@click="recoveryTask(item.robotNo)"
v-hasPermi="['carBoard:index:recovery']"
>恢复任务</el-dropdown-item
>
<el-dropdown-item
v-if="item.isStop != 1"
@click="stopCar(item.robotNo)"
v-hasPermi="['carBoard:index:stop']"
>暂停车辆</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -173,7 +180,7 @@
v-if="item.robotCodeLevel == 1"
>
<template #content>
<span style="font-size: 14px; color: #ffffff"
<span style="font-size: 14px; color: #fff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
@ -192,7 +199,7 @@
v-if="item.robotCodeLevel == 2"
>
<template #content>
<span style="font-size: 14px; color: #ffffff"
<span style="font-size: 14px; color: #fff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
@ -211,7 +218,7 @@
v-if="item.robotCodeLevel == 3"
>
<template #content>
<span style="font-size: 14px; color: #ffffff"
<span style="font-size: 14px; color: #fff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
@ -230,7 +237,7 @@
v-if="item.robotCodeLevel == 4"
>
<template #content>
<span style="font-size: 14px; color: #ffffff"
<span style="font-size: 14px; color: #fff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
@ -307,32 +314,32 @@
<div class="item-inner-right-msg" v-if="item.onlineStatus == 0">
<div class="item-inner-right-msg-item m-b-10" style="align-items: center">
<div class="item-inner-right-msg-item-name">电量</div>
<div style="width: 14px; height: 2px; background-color: #cccccc; margin-left: 10px">
<div style="width: 14px; height: 2px; background-color: #ccc; margin-left: 10px">
</div>
</div>
<div class="item-inner-right-msg-item m-b-10" style="align-items: center">
<div class="item-inner-right-msg-item-name">车辆状态</div>
<div style="width: 14px; height: 2px; background-color: #cccccc; margin-left: 10px">
<div style="width: 14px; height: 2px; background-color: #ccc; margin-left: 10px">
</div>
</div>
<div class="item-inner-right-msg-item m-b-10" style="align-items: center">
<div class="item-inner-right-msg-item-name">任务状态</div>
<div style="width: 14px; height: 2px; background-color: #cccccc; margin-left: 10px">
<div style="width: 14px; height: 2px; background-color: #ccc; margin-left: 10px">
</div>
</div>
<div class="item-inner-right-msg-item m-b-10" style="align-items: center">
<div class="item-inner-right-msg-item-name">楼层</div>
<div style="width: 14px; height: 2px; background-color: #cccccc; margin-left: 10px">
<div style="width: 14px; height: 2px; background-color: #ccc; margin-left: 10px">
</div>
</div>
<div class="item-inner-right-msg-item m-b-10" style="align-items: center">
<div class="item-inner-right-msg-item-name">区域</div>
<div style="width: 14px; height: 2px; background-color: #cccccc; margin-left: 10px">
<div style="width: 14px; height: 2px; background-color: #ccc; margin-left: 10px">
</div>
</div>
<div class="item-inner-right-msg-item m-b-10" style="align-items: center">
<div class="item-inner-right-msg-item-name">信息</div>
<div style="width: 14px; height: 2px; background-color: #cccccc; margin-left: 10px">
<div style="width: 14px; height: 2px; background-color: #ccc; margin-left: 10px">
</div>
</div>
</div>
@ -465,6 +472,22 @@ const recoveryTask = (robotNo) => {
})
.catch(() => {})
}
//
const stopCar = (robotNo) => {
ElMessageBox.confirm('您确定要暂停车辆吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
CarApi.stopCar({ robotNo }).then((res) => {
getCarList()
fetchData()
message.success('暂停成功')
})
})
.catch(() => {})
}
const changeRobotStatisticsType = (type) => {
queryParams.robotStatisticsType = type
@ -542,56 +565,68 @@ onBeforeRouteLeave((to, from, next) => {
margin: 0 auto;
position: relative;
}
.swiperBox {
width: 100%;
/* background: rgba(0, 0, 0, 0.3); */
}
.swiper-item-box {
width: 100%;
padding-bottom: 30px;
border: 1px solid #f5f5f5;
}
.swiper-item-img-box {
width: 100%;
display: flex;
justify-content: center;
}
.swiper-item-img {
width: 150px;
height: 150px;
}
.swiper-item-box-top {
width: calc(100% - 20px);
display: flex;
align-items: center;
justify-content: space-between;
margin: 20px 0px;
margin: 20px 0;
padding: 0 10px;
}
.swiper-item-box-top-name {
font-size: 13px;
font-weight: bold;
}
.swiper-item-box-msg {
width: calc(100% - 20px);
padding: 0 10px;
}
.swiper-item-box-msg-item {
display: flex;
align-items: center;
margin-top: 20px;
}
.swiper-item-box-msg-item-left {
font-size: 13px;
}
.swiper-item-box-msg-item-right {
font-size: 13px;
margin-left: 40px;
}
:focus-visible {
outline: none;
}
.swiper-button-prev-custome {
position: absolute;
left: -30px;
@ -600,6 +635,7 @@ onBeforeRouteLeave((to, from, next) => {
cursor: pointer;
z-index: 999;
}
.swiper-button-next-custome {
position: absolute;
right: -30px;
@ -608,6 +644,7 @@ onBeforeRouteLeave((to, from, next) => {
cursor: pointer;
z-index: 999;
}
.letter-data-box {
width: calc(100% - 60px);
padding: 0 30px;
@ -615,16 +652,19 @@ onBeforeRouteLeave((to, from, next) => {
position: relative;
display: flex;
}
.letter-data-item {
width: calc(25% - 20px);
flex-shrink: 0;
}
.car-statistics-box {
width: 100%;
margin-top: 40px;
display: flex;
justify-content: space-between;
}
.car-statistics-item {
width: calc(15% - 20px);
padding: 0 10px;
@ -635,6 +675,7 @@ onBeforeRouteLeave((to, from, next) => {
display: flex;
align-items: center;
}
.top-box {
width: 100%;
display: flex;
@ -645,30 +686,34 @@ onBeforeRouteLeave((to, from, next) => {
.new-top-box {
width: 100%;
display: flex;
/* padding: 25px 0; */
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
.new-top-box-left {
flex-shrink: 0;
display: flex;
align-items: center;
}
.new-top-box-left-title {
font-family:
PingFangSC,
PingFang SC;
"PingFang SC";
font-weight: 500;
font-size: 18px;
color: #0d162a;
}
.new-top-box-left-statistics {
padding: 5px 7px;
margin-left: 4px;
font-family:
PingFangSC,
PingFang SC;
"PingFang SC";
font-weight: 500;
font-size: 16px;
color: #0d162a;
@ -676,37 +721,43 @@ onBeforeRouteLeave((to, from, next) => {
background: #ebf1ff;
cursor: pointer;
}
.grey-line {
width: 1px;
height: 13px;
background: #ccc;
}
.new-top-box-left-item {
display: flex;
align-items: center;
flex-shrink: 0;
font-family:
PingFangSC,
PingFang SC;
"PingFang SC";
font-weight: 500;
font-size: 16px;
padding: 5px 10px;
cursor: pointer;
}
.new-top-box-left-item-name {
flex-shrink: 0;
}
.new-top-box-left-item-value {
flex-shrink: 0;
margin-left: 10px;
}
.new-top-box-right {
display: flex;
}
.new-top-box-right-input-box {
margin-right: 16px;
}
.new-top-box-right-input {
width: 225px;
font-size: 13px;
@ -714,15 +765,17 @@ onBeforeRouteLeave((to, from, next) => {
}
/* 兼容不同浏览器的写法 */
input::-webkit-input-placeholder {
input::input-placeholder {
/* Chrome/Safari/Opera */
color: #a4afca;
}
.new-top-box-right-button {
width: 104px;
height: 36px;
font-size: 13px;
}
.new-list-box {
margin-top: 20px;
display: grid;
@ -730,97 +783,114 @@ input::-webkit-input-placeholder {
gap: 12px; /* 设置元素间间隔为12像素 */
width: 100%; /* 容器宽度根据需要调整 */
}
.item {
/* background: red; */
padding: 20px 22px 26px 22px;
padding: 20px 22px 26px;
margin-bottom: 12px;
height: 230px;
background: #ffffff;
background: #fff;
}
.item-inner {
width: 100%;
height: 100%;
display: flex;
/* background: #0d162a; */
}
.item-inner-left {
width: 124px;
flex-shrink: 0;
height: 100%;
}
.item-inner-left-name {
flex: 1;
margin-right: 5px;
font-family:
PingFangSC,
PingFang SC;
"PingFang SC";
font-weight: 600;
font-size: 14px;
width: 0;
}
.item-inner-left-name-inner {
white-space: nowrap; /* 防止文本换行 */
overflow: hidden; /* 隐藏超出容器的部分 */
text-overflow: ellipsis; /* 显示省略号来表示被截断的文本 */
}
.item-inner-left-img-box {
width: 124px;
height: 124px;
background: #eeeeee;
background: #eee;
position: relative;
}
.item-inner-left-bottom {
display: flex;
justify-content: space-between;
margin-top: 10px;
}
.item-inner-left-bottom-btn {
font-family:
PingFangSC,
PingFang SC;
"PingFang SC";
font-weight: 400;
font-size: 14px;
color: #1677ff;
cursor: pointer;
}
.new-list-box-all {
width: 100%;
margin-top: 12px;
}
.item-inner-right {
margin-left: 39px;
flex: 1;
height: 100%;
}
.item-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 3px;
}
.item-inner-right-top {
flex-shrink: 0;
display: flex;
justify-content: flex-end;
}
.item-inner-right-msg {
margin-left: 35px;
flex: 1;
}
.item-inner-right-msg-item {
width: 100%;
display: flex;
flex-shrink: 0;
}
.item-inner-right-msg-item-name {
font-family:
PingFangSC,
PingFang SC;
"PingFang SC";
font-weight: 400;
font-size: 14px;
width: 60px;
text-align: end;
}
.item-inner-right-msg-item-value {
flex: 1;
margin-left: 8px;
@ -831,9 +901,11 @@ input::-webkit-input-placeholder {
white-space: nowrap; /* 限制不允许换行 */
width: 0;
}
.m-b-10 {
margin-bottom: 10px;
}
.item-inner-left-status {
width: 12px;
height: 12px;
@ -841,6 +913,7 @@ input::-webkit-input-placeholder {
border-radius: 50%;
margin-right: 4px;
}
.item-inner-left-img-box-icon {
position: absolute;
top: 5px;

View File

@ -138,7 +138,12 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="正向限速" prop="forwardSpeedLimit" required>
<div class="flex-center">
<el-input-number style="width: 100%" :step="0.1" controls-position="right" v-model="form.forwardSpeedLimit" :min="0" :max="6">
<template #suffix>
<span>m/s</span>
</template>
</el-input-number>
<!-- <div class="flex-center">
<el-slider v-model="form.forwardSpeedLimit" :min="0.1" :max="10" :step="0.1" />
<el-input
v-model="form.forwardSpeedLimit"
@ -150,12 +155,17 @@
>
<template #append>m/s</template>
</el-input>
</div>
</div> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="反向限速" prop="reverseSpeedLimit" required>
<div class="flex-center">
<el-input-number style="width: 100%" :step="0.1" controls-position="right" v-model="form.reverseSpeedLimit" :min="0" :max="6">
<template #suffix>
<span>m/s</span>
</template>
</el-input-number>
<!-- <div class="flex-center">
<el-slider v-model="form.reverseSpeedLimit" :min="0.1" :max="10" :step="0.1" />
<el-input
v-model="form.reverseSpeedLimit"
@ -167,7 +177,7 @@
>
<template #append>m/s</template>
</el-input>
</div>
</div> -->
</el-form-item></el-col
>
</el-row>
@ -324,7 +334,15 @@ const rules = reactive({
expansionZoneFront: [{ required: true, message: '请输入膨胀区域前', trigger: 'blur' }],
expansionZoneAfter: [{ required: true, message: '请输入膨胀区域后', trigger: 'blur' }],
expansionZoneLeft: [{ required: true, message: '请输入膨胀区域左', trigger: 'blur' }],
expansionZoneRight: [{ required: true, message: '请输入膨胀区域右', trigger: 'blur' }]
expansionZoneRight: [{ required: true, message: '请输入膨胀区域右', trigger: 'blur' }],
forwardSpeedLimit: [
{ required: true, message: '请输入正向限速', trigger: 'blur' },
{ type: 'number', min: 0, max: 6, message: '必须大于0且小于6', trigger: 'blur' },
],
reverseSpeedLimit: [
{ required: true, message: '请输入反向限速', trigger: 'blur' },
{ type: 'number', min: 0, max: 6, message: '必须大于0且小于6', trigger: 'blur' } ,
]
})
//
@ -526,10 +544,10 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
<style lang="scss">
.map-edit-route-dialog {
padding: 0px;
padding: 0;
.el-dialog__footer {
padding: 0px 20px 20px 0;
padding: 0 20px 20px 0;
border-top: none !important;
}
}

View File

@ -18,7 +18,7 @@
/>
</el-form-item>
<el-form-item label="车辆编号" prop="robotNo">
<el-select v-model="queryParams.robotNo" class="!w-240px" @change="handleQuery()">
<el-select v-model="queryParams.robotNo" clearable class="!w-240px" @change="handleQuery()">
<el-option
v-for="car in robotList"
:key="car.id"
@ -442,6 +442,7 @@ onMounted(() => {
::v-deep .table-row-class {
background-color: #f9f9f9e5;
}
::v-deep .el-table__body .cell {
font-weight: 400;
font-size: 14px;