接口频率更改

This commit is contained in:
yyy 2025-04-19 16:45:53 +08:00
parent 4c72a79c9c
commit 4b11195c54
2 changed files with 92 additions and 44 deletions

View File

@ -4,9 +4,9 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
VITE_BASE_URL='http://192.168.0.74:48080'
# VITE_BASE_URL='http://192.168.0.74:48080'
# VITE_BASE_URL='http://192.168.0.153:48080'
# VITE_BASE_URL='http://192.168.0.45:48080'
VITE_BASE_URL='http://192.168.0.45:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server

View File

@ -96,7 +96,13 @@
class="new-top-box-right-input-icon"
/>
</div>
<div class="new-top-box-right-button" @click="openForm('create')" v-hasPermi="['carBoard:index:add']"> 新增车辆 </div>
<div
class="new-top-box-right-button"
@click="openForm('create')"
v-hasPermi="['carBoard:index:add']"
>
新增车辆
</div>
</div>
</div>
</div>
@ -131,13 +137,31 @@
</div>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="openForm('update', item.id)" v-hasPermi="['carBoard:index:edit']">编辑</el-dropdown-item>
<el-dropdown-item @click="clockCar(item)" v-hasPermi="['carBoard:index:lock']">{{
item.robotTaskModel == 0 ? '解锁' : '锁定'
}}</el-dropdown-item>
<el-dropdown-item @click="deleteCar(item.id)" v-hasPermi="['carBoard:index:delete']">删除</el-dropdown-item>
<el-dropdown-item @click="clearCar(item.robotNo)" v-hasPermi="['carBoard:index:clear']">清除交管</el-dropdown-item>
<el-dropdown-item @click="recoveryTask(item.robotNo)" v-hasPermi="['carBoard:index:recovery']">恢复任务</el-dropdown-item>
<el-dropdown-item
@click="openForm('update', item.id)"
v-hasPermi="['carBoard:index:edit']"
>编辑</el-dropdown-item
>
<el-dropdown-item
@click="clockCar(item)"
v-hasPermi="['carBoard:index:lock']"
>{{ item.robotTaskModel == 0 ? '解锁' : '锁定' }}</el-dropdown-item
>
<el-dropdown-item
@click="deleteCar(item.id)"
v-hasPermi="['carBoard:index:delete']"
>删除</el-dropdown-item
>
<el-dropdown-item
@click="clearCar(item.robotNo)"
v-hasPermi="['carBoard:index:clear']"
>清除交管</el-dropdown-item
>
<el-dropdown-item
@click="recoveryTask(item.robotNo)"
v-hasPermi="['carBoard:index:recovery']"
>恢复任务</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -153,11 +177,18 @@
effect="dark"
placement="bottom-start"
v-if="item.robotCodeLevel == 1"
>
<template #content>
<span style="font-size: 14px;color: #FFFFFF;">{{ item.robotCodeMsg || '' }} </span>
<span style="cursor: pointer;margin-left: 24px;color: #FF4D4F;font-size: 14px;" @click="goMoreError(item)"> 查看更多 </span>
</template>
>
<template #content>
<span style="font-size: 14px; color: #ffffff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)"
>
查看更多
</span>
</template>
<img src="@/assets/imgs/gaojing1.png" alt="" class="item-inner-left-img-box-icon" />
</el-tooltip>
<el-tooltip
@ -166,10 +197,17 @@
placement="bottom-start"
v-if="item.robotCodeLevel == 2"
>
<template #content>
<span style="font-size: 14px;color: #FFFFFF;">{{ item.robotCodeMsg || '' }} </span>
<span style="cursor: pointer;margin-left: 24px;color: #FF4D4F;font-size: 14px;" @click="goMoreError(item)"> 查看更多 </span>
</template>
<template #content>
<span style="font-size: 14px; color: #ffffff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)"
>
查看更多
</span>
</template>
<img src="@/assets/imgs/gaojing2.png" alt="" class="item-inner-left-img-box-icon" />
</el-tooltip>
<el-tooltip
@ -178,10 +216,17 @@
placement="bottom-start"
v-if="item.robotCodeLevel == 3"
>
<template #content>
<span style="font-size: 14px;color: #FFFFFF;">{{ item.robotCodeMsg || '' }} </span>
<span style="cursor: pointer;margin-left: 24px;color: #FF4D4F;font-size: 14px;" @click="goMoreError(item)"> 查看更多 </span>
</template>
<template #content>
<span style="font-size: 14px; color: #ffffff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)"
>
查看更多
</span>
</template>
<img src="@/assets/imgs/gaojing3.png" alt="" class="item-inner-left-img-box-icon" />
</el-tooltip>
<el-tooltip
@ -190,10 +235,17 @@
placement="bottom-start"
v-if="item.robotCodeLevel == 4"
>
<template #content>
<span style="font-size: 14px;color: #FFFFFF;">{{ item.robotCodeMsg || '' }} </span>
<span style="cursor: pointer;margin-left: 24px;color: #FF4D4F;font-size: 14px;" @click="goMoreError(item)"> 查看更多 </span>
</template>
<template #content>
<span style="font-size: 14px; color: #ffffff"
>{{ item.robotCodeMsg || '' }}
</span>
<span
style="cursor: pointer; margin-left: 24px; color: #ff4d4f; font-size: 14px"
@click="goMoreError(item)"
>
查看更多
</span>
</template>
<img src="@/assets/imgs/gaojing.png" alt="" class="item-inner-left-img-box-icon" />
</el-tooltip>
</div>
@ -261,32 +313,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: #cccccc; 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: #cccccc; 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: #cccccc; 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: #cccccc; 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: #cccccc; 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: #cccccc; margin-left: 10px">
</div>
</div>
</div>
@ -352,7 +404,7 @@ const getCarList = async () => {
timerRef.value = setInterval(() => {
getCarList()
getRobotInformationStatistics()
}, 5000)
}, 10000)
let res = await CarApi.getRobotInformationList(queryParams)
// console.log(res.list)
list.value = res.list
@ -409,15 +461,13 @@ const clearCar = (robotNo) => {
type: 'warning'
})
.then(() => {
CarApi.cleanTrafficManagement({robotNo}).then((res) => {
CarApi.cleanTrafficManagement({ robotNo }).then((res) => {
getCarList()
getRobotInformationStatistics()
message.success('清除成功')
})
})
.catch(() => {
})
.catch(() => {})
}
//
@ -428,16 +478,14 @@ const recoveryTask = (robotNo) => {
type: 'warning'
})
.then(() => {
CarApi.doTaskContinue({robotNo}).then((res) => {
CarApi.doTaskContinue({ robotNo }).then((res) => {
getCarList()
getRobotInformationStatistics()
message.success('恢复成功')
})
})
.catch(() => {
})
}
.catch(() => {})
}
const changeRobotStatisticsType = (type) => {
queryParams.robotStatisticsType = type
@ -502,7 +550,7 @@ const goToMap = (item) => {
})
}
onMounted(() => {
if(route.query.robotNo){
if (route.query.robotNo) {
queryParams.robotNo = route.query.robotNo
}
getCarList()