|
@@ -4,7 +4,7 @@
|
|
|
<el-header
|
|
|
style="height: 250px; background-color: rgba(255,0,0,50%); display: flex; flex-direction: column; justify-content: center; align-items: center;">
|
|
|
<div class="demo-image" style="text-align: center;"> <!-- 注意这里添加了 text-align: center; 但对于块级元素这不是必需的 -->
|
|
|
- <img src="../assets/pji-logo.jpg" alt="" style="width:506.5px;height: 146px">
|
|
|
+ <img src="../assets/pji-logo.jpg" alt="" style="width:200px;height: 200px">
|
|
|
<!-- 推荐使用 max-width 保持图片比例 -->
|
|
|
</div>
|
|
|
</el-header>
|
|
@@ -53,8 +53,8 @@
|
|
|
</el-form>
|
|
|
<el-button type="primary" @click="updateMap">地图更新</el-button>
|
|
|
<el-button type="primary" @click="goToUpdateStat">地图更新统计</el-button>
|
|
|
- <el-button type="primary" @click="getThreshold">地图续扫提醒阈值</el-button>
|
|
|
- <el-button type="primary" @click="goToMapRescan">地图续扫提醒</el-button>
|
|
|
+ <el-button type="primary" @click="getThreshold">地图重采提醒阈值</el-button>
|
|
|
+ <el-button type="primary" @click="goToMapRescan">地图重采提醒</el-button>
|
|
|
<!-- <el-button type="primary" @click="goToMapUpdate">地图更新</el-button>-->
|
|
|
|
|
|
<el-dialog
|
|
@@ -77,13 +77,13 @@
|
|
|
|
|
|
<el-dialog
|
|
|
v-model="mapDialogVisible"
|
|
|
- title="地图续扫提醒"
|
|
|
+ title="地图重采提醒"
|
|
|
width="400"
|
|
|
:before-close="handleMapClose"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
<el-form :model="mapRescanForm">
|
|
|
- <el-form-item label="请输入地图续扫提醒阈值" label-width="170">
|
|
|
+ <el-form-item label="请输入地图重采提醒阈值" label-width="170">
|
|
|
<!-- <el-input v-model="mapRescanForm.value">-->
|
|
|
<!-- <template #suffix>-->
|
|
|
<!-- <i slot="suffix" style="color: #181818">%</i>-->
|
|
@@ -209,6 +209,7 @@
|
|
|
<el-table-column prop="dataName" label="数据名称"/>
|
|
|
<el-table-column prop="dataSize" label="数据容量" :formatter="dataSizeFormatter"/>
|
|
|
<el-table-column prop="equipmentName" label="设备名称"/>
|
|
|
+ <el-table-column prop="equipmentNo" label="设备sn码" :formatter="equipmentNoFormatter"/>
|
|
|
<el-table-column prop="equipmentTypeName" label="设备类型"/>
|
|
|
<el-table-column prop="triggerName" label="触发器名称"/>
|
|
|
<el-table-column prop="triggerTypeName" label="触发器类型"/>
|
|
@@ -292,12 +293,12 @@ const setThreshold = async () =>{
|
|
|
// console.log(response.data)
|
|
|
|
|
|
if (!response.data.status) {
|
|
|
- ElMessage.error("更新地图续扫阈值失败")
|
|
|
+ ElMessage.error("更新地图重采阈值失败")
|
|
|
return
|
|
|
}
|
|
|
mapDialogVisible.value = false
|
|
|
} catch (error) {
|
|
|
- ElMessage.error("更新地图续扫阈值失败")
|
|
|
+ ElMessage.error("更新地图重采阈值失败")
|
|
|
console.log("Error updating the threshold:", error)
|
|
|
}
|
|
|
}
|
|
@@ -310,13 +311,13 @@ const getThreshold = async () => {
|
|
|
// console.log(response.data)
|
|
|
|
|
|
if (!response.data.status) {
|
|
|
- ElMessage.error("获取地图续扫阈值失败")
|
|
|
+ ElMessage.error("获取地图重采阈值失败")
|
|
|
return
|
|
|
}
|
|
|
mapRescanForm.value = +response.data.data
|
|
|
mapDialogVisible.value = true
|
|
|
} catch (error) {
|
|
|
- ElMessage.error("获取地图续扫阈值失败")
|
|
|
+ ElMessage.error("获取地图重采阈值失败")
|
|
|
console.log("Error querying the threshold:", error)
|
|
|
}
|
|
|
}
|
|
@@ -495,6 +496,10 @@ const dataSizeFormatter = (row, column, cellValue, index) => {
|
|
|
return cellValue; // 如果cellValue为null或undefined,则返回原值或你想要的默认值
|
|
|
}
|
|
|
|
|
|
+const equipmentNoFormatter = (row, column, cellValue, index) => {
|
|
|
+ return removePerfix(cellValue, "pjibot-");
|
|
|
+}
|
|
|
+
|
|
|
const isPropertySame= (array, propertyName) => {
|
|
|
if (array.length <= 1) {
|
|
|
return true; // 空数组或但个元素视为所有值相同
|
|
@@ -540,8 +545,8 @@ const getLatestTime = (reocrds) => {
|
|
|
// 地图更新
|
|
|
const updateMap = async () => {
|
|
|
// 检查选择的记录数量
|
|
|
- if (multipleSelection.value.length == 0) {
|
|
|
- ElMessage.error("请选择记录!")
|
|
|
+ if (multipleSelection.value.length < 3) {
|
|
|
+ ElMessage.error("请至少选择三条属于同一设备的记录!")
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -635,7 +640,7 @@ const updateMap = async () => {
|
|
|
loadingInstance.close()
|
|
|
// 更新步骤条状态
|
|
|
update_active.value = 1
|
|
|
- console.log("Starting update map...")
|
|
|
+ console.log("Updating map...")
|
|
|
// 执行脚本 - 生成world,启动gazebo
|
|
|
window.electronAPI.updateMap(containerName, filePath);
|
|
|
// 开启loading
|
|
@@ -743,7 +748,7 @@ const checkDeviceMapStatus = async (sceneId, deviceNo, deviceName, deviceType, r
|
|
|
|
|
|
return response.data
|
|
|
} catch (error) {
|
|
|
- console.log("Error checking the device map's onsistency:", error)
|
|
|
+ console.log("Error checking the device map's status:", error)
|
|
|
}
|
|
|
}
|
|
|
|