This commit is contained in:
parent
171d7d331e
commit
b088a7106a
|
|
@ -41,18 +41,27 @@
|
||||||
<!-- 第二行 -->
|
<!-- 第二行 -->
|
||||||
<n-grid :cols="24">
|
<n-grid :cols="24">
|
||||||
<n-grid-item :span="9">
|
<n-grid-item :span="9">
|
||||||
<div class="row-2-item" v-show="false">
|
<div class="row-2-item">
|
||||||
<div>速度</div>
|
<!-- <div>速度</div>
|
||||||
<div>30</div>
|
<div>30</div> -->
|
||||||
|
|
||||||
|
<!-- <n-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleStopAndOverRouter('15')"
|
||||||
|
v-if="robotBaseInfo.type.includes('巡航')"
|
||||||
|
>
|
||||||
|
暂停巡航
|
||||||
|
</n-button> -->
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
<n-grid-item :span="6">
|
<n-grid-item :span="6">
|
||||||
<!-- <div class="row-2-item">
|
<div class="row-2-item">
|
||||||
<div>高度</div>
|
<!-- <div>高度</div>
|
||||||
<div>
|
<div>
|
||||||
{{ currentHeight }}
|
{{ currentHeight }}
|
||||||
</div>
|
</div> -->
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
<div class="row-2-item">
|
<div class="row-2-item">
|
||||||
<div></div>
|
<div></div>
|
||||||
|
|
@ -62,9 +71,17 @@
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
<n-grid-item :span="9">
|
<n-grid-item :span="9">
|
||||||
<div class="row-2-item" v-show="false">
|
<div class="row-2-item">
|
||||||
<div>速度</div>
|
<!-- <div>速度</div>
|
||||||
<div>30</div>
|
<div>30</div> -->
|
||||||
|
<!-- <n-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleStopAndOverRouter('14')"
|
||||||
|
v-if="robotBaseInfo.value.type.includes('巡航')"
|
||||||
|
>
|
||||||
|
结束巡航
|
||||||
|
</n-button> -->
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
</n-grid>
|
</n-grid>
|
||||||
|
|
@ -75,28 +92,24 @@
|
||||||
<!-- 上下左右控制按钮 -->
|
<!-- 上下左右控制按钮 -->
|
||||||
<img
|
<img
|
||||||
class="arrow-top hand-direction"
|
class="arrow-top hand-direction"
|
||||||
@click="handleChangeCamera('up')"
|
|
||||||
@mousedown="handleChangeCamera('up')"
|
@mousedown="handleChangeCamera('up')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-right hand-direction"
|
class="arrow-right hand-direction"
|
||||||
@click="handleChangeCamera('right')"
|
|
||||||
@mousedown="handleChangeCamera('right')"
|
@mousedown="handleChangeCamera('right')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-bottom hand-direction"
|
class="arrow-bottom hand-direction"
|
||||||
@click="handleChangeCamera('down')"
|
|
||||||
@mousedown="handleChangeCamera('down')"
|
@mousedown="handleChangeCamera('down')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-left hand-direction"
|
class="arrow-left hand-direction"
|
||||||
@click="handleChangeCamera('left')"
|
|
||||||
@mousedown="handleChangeCamera('left')"
|
@mousedown="handleChangeCamera('left')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
|
|
@ -122,13 +135,11 @@
|
||||||
<span>缩放</span>
|
<span>缩放</span>
|
||||||
<img
|
<img
|
||||||
style="margin-bottom: 2px"
|
style="margin-bottom: 2px"
|
||||||
@click="handleChangeZoomCamera('ZoomIn')"
|
|
||||||
@mousedown="handleChangeZoomCamera('ZoomIn')"
|
@mousedown="handleChangeZoomCamera('ZoomIn')"
|
||||||
@mouseup="handleStopDeviceCameraZoom()"
|
@mouseup="handleStopDeviceCameraZoom()"
|
||||||
src="@/assets/home-imgs/control-2-add.png"
|
src="@/assets/home-imgs/control-2-add.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeZoomCamera('ZoomOut')"
|
|
||||||
@mousedown="handleChangeZoomCamera('ZoomOut')"
|
@mousedown="handleChangeZoomCamera('ZoomOut')"
|
||||||
@mouseup="handleStopDeviceCameraZoom()"
|
@mouseup="handleStopDeviceCameraZoom()"
|
||||||
src="@/assets/home-imgs/control-2-reduce.png"
|
src="@/assets/home-imgs/control-2-reduce.png"
|
||||||
|
|
@ -152,28 +163,24 @@
|
||||||
<!-- 上下左右控制按钮 -->
|
<!-- 上下左右控制按钮 -->
|
||||||
<img
|
<img
|
||||||
class="arrow-top"
|
class="arrow-top"
|
||||||
@click="handleChangeRobot('5')"
|
|
||||||
@mousedown="handleChangeRobot('5')"
|
@mousedown="handleChangeRobot('5')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-right"
|
class="arrow-right"
|
||||||
@click="handleChangeRobot('8')"
|
|
||||||
@mousedown="handleChangeRobot('8')"
|
@mousedown="handleChangeRobot('8')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-bottom"
|
class="arrow-bottom"
|
||||||
@click="handleChangeRobot('6')"
|
|
||||||
@mousedown="handleChangeRobot('6')"
|
@mousedown="handleChangeRobot('6')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-left"
|
class="arrow-left"
|
||||||
@click="handleChangeRobot('7')"
|
|
||||||
@mousedown="handleChangeRobot('7')"
|
@mousedown="handleChangeRobot('7')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
|
|
@ -186,7 +193,11 @@
|
||||||
<div class="text-right description-text">右转</div>
|
<div class="text-right description-text">右转</div>
|
||||||
|
|
||||||
<div class="row-3-item-1-center">
|
<div class="row-3-item-1-center">
|
||||||
<img class="center-icon" :src="isStopRight ? startImg : stopImg" />
|
<img
|
||||||
|
class="center-icon"
|
||||||
|
@click="handleChangeRobot(9)"
|
||||||
|
:src="isStopRight ? startImg : stopImg"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
|
|
@ -478,31 +489,65 @@ const beforeUpload = ({ file }) => {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 暂停和停止巡航
|
||||||
|
const handleStopAndOverRouter = async (type) => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
dialog.warning({
|
||||||
|
title: '提示',
|
||||||
|
content: `当前机器人正在巡检中,确定${type == 15 ? '暂停' : '结束'}巡检吗?`,
|
||||||
|
positiveText: '确定',
|
||||||
|
negativeText: '取消',
|
||||||
|
onPositiveClick: async () => {
|
||||||
|
try {
|
||||||
|
const { data: res } = await handleRobotActionApi({
|
||||||
|
puId: robotData.robotInfo?.puId,
|
||||||
|
type: type,
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
message.success(`已${type == 15 ? '暂停' : '结束'}巡检`)
|
||||||
|
getRobotBaseInfo()
|
||||||
|
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
||||||
|
} else {
|
||||||
|
message.error(`${type == 15 ? '暂停' : '结束'}巡检失败` + res.message)
|
||||||
|
resolve(true) // 暂停失败,仍然处于巡检状态
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
message.error(`${type == 15 ? '暂停' : '结束'}巡检出错`)
|
||||||
|
resolve(true) // 出错时,假设仍然处于巡检状态
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onNegativeClick: () => {
|
||||||
|
resolve(true) // 用户取消,仍然处于巡检状态
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 判断当前机器人是否在 巡检中 如果在巡检中 则不可进行任何操作 可弹框提示客户暂停巡检 然后重新获取机器人状态再进行操作
|
// 判断当前机器人是否在 巡检中 如果在巡检中 则不可进行任何操作 可弹框提示客户暂停巡检 然后重新获取机器人状态再进行操作
|
||||||
const handleInspection = async () => {
|
const handleInspection = async () => {
|
||||||
if (robotBaseInfo.value.type.includes('巡航')) {
|
if (robotBaseInfo.value.type.includes('巡航')) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
dialog.warning({
|
dialog.warning({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '当前机器人正在巡检中,可暂停巡检后再进行操作',
|
content: '当前机器人正在巡检中,可停止巡检后再进行操作',
|
||||||
positiveText: '暂停巡检',
|
positiveText: '停止巡检',
|
||||||
negativeText: '取消',
|
negativeText: '取消',
|
||||||
onPositiveClick: async () => {
|
onPositiveClick: async () => {
|
||||||
try {
|
try {
|
||||||
const { data: res } = await handleRobotActionApi({
|
const { data: res } = await handleRobotActionApi({
|
||||||
puId: robotData.robotInfo?.puId,
|
puId: robotData.robotInfo?.puId,
|
||||||
type: '15',
|
type: '14',
|
||||||
})
|
})
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
message.success('已暂停巡检')
|
message.success('已停止巡检')
|
||||||
getRobotBaseInfo()
|
getRobotBaseInfo()
|
||||||
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
||||||
} else {
|
} else {
|
||||||
message.error('暂停巡检失败' + res.message)
|
message.error('停止巡检失败' + res.message)
|
||||||
resolve(true) // 暂停失败,仍然处于巡检状态
|
resolve(true) // 暂停失败,仍然处于巡检状态
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('暂停巡检出错')
|
message.error('停止巡检出错')
|
||||||
resolve(true) // 出错时,假设仍然处于巡检状态
|
resolve(true) // 出错时,假设仍然处于巡检状态
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -713,7 +758,7 @@ const handleChangeCamera = debounce(async (motion) => {
|
||||||
idx: 0,
|
idx: 0,
|
||||||
motion,
|
motion,
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 0)
|
||||||
|
|
||||||
// 球机缩放
|
// 球机缩放
|
||||||
const handleChangeZoomCamera = async (motion) => {
|
const handleChangeZoomCamera = async (motion) => {
|
||||||
|
|
@ -774,7 +819,7 @@ const handleChangeRobot = debounce(async (type) => {
|
||||||
if (res.code == 200 && type == 9) {
|
if (res.code == 200 && type == 9) {
|
||||||
isStopRight.value = false
|
isStopRight.value = false
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 0)
|
||||||
|
|
||||||
// 停止机器人
|
// 停止机器人
|
||||||
const handleStopRobot = async () => {
|
const handleStopRobot = async () => {
|
||||||
|
|
@ -824,7 +869,7 @@ const handleChangeVolume = debounce(async (value) => {
|
||||||
} else {
|
} else {
|
||||||
message.error('音量调整失败')
|
message.error('音量调整失败')
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 0)
|
||||||
|
|
||||||
const isOpenMK = ref(false)
|
const isOpenMK = ref(false)
|
||||||
const onHandleOpenOrCloseMK = async (type) => {
|
const onHandleOpenOrCloseMK = async (type) => {
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,17 @@
|
||||||
<n-grid :cols="24">
|
<n-grid :cols="24">
|
||||||
<n-grid-item :span="9">
|
<n-grid-item :span="9">
|
||||||
<div class="row-2-item" v-show="false">
|
<div class="row-2-item" v-show="false">
|
||||||
<div>速度</div>
|
<!-- <div>速度</div>
|
||||||
<div>30</div>
|
<div>30</div> -->
|
||||||
|
|
||||||
|
<n-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleStopAndOverRouter('15')"
|
||||||
|
v-if="robotBaseInfo.value.type.includes('巡航')"
|
||||||
|
>
|
||||||
|
暂停巡航
|
||||||
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
<n-grid-item :span="6">
|
<n-grid-item :span="6">
|
||||||
|
|
@ -63,8 +72,16 @@
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
<n-grid-item :span="9">
|
<n-grid-item :span="9">
|
||||||
<div class="row-2-item" v-show="false">
|
<div class="row-2-item" v-show="false">
|
||||||
<div>速度</div>
|
<!-- <div>速度</div>
|
||||||
<div>30</div>
|
<div>30</div> -->
|
||||||
|
<n-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleStopAndOverRouter('14')"
|
||||||
|
v-if="robotBaseInfo.value.type.includes('巡航')"
|
||||||
|
>
|
||||||
|
结束巡航
|
||||||
|
</n-button>
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
</n-grid>
|
</n-grid>
|
||||||
|
|
@ -74,28 +91,24 @@
|
||||||
<div class="row-3-item-1">
|
<div class="row-3-item-1">
|
||||||
<!-- 上下左右控制按钮 -->
|
<!-- 上下左右控制按钮 -->
|
||||||
<img
|
<img
|
||||||
@click="handleChangeCamera('up')"
|
|
||||||
class="arrow-top hand-direction"
|
class="arrow-top hand-direction"
|
||||||
@mousedown="handleChangeCamera('up')"
|
@mousedown="handleChangeCamera('up')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeCamera('right')"
|
|
||||||
class="arrow-right hand-direction"
|
class="arrow-right hand-direction"
|
||||||
@mousedown="handleChangeCamera('right')"
|
@mousedown="handleChangeCamera('right')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeCamera('down')"
|
|
||||||
class="arrow-bottom hand-direction"
|
class="arrow-bottom hand-direction"
|
||||||
@mousedown="handleChangeCamera('down')"
|
@mousedown="handleChangeCamera('down')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeCamera('left')"
|
|
||||||
class="arrow-left hand-direction"
|
class="arrow-left hand-direction"
|
||||||
@mousedown="handleChangeCamera('left')"
|
@mousedown="handleChangeCamera('left')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
|
|
@ -104,7 +117,11 @@
|
||||||
|
|
||||||
<!-- 中间的按钮 -->
|
<!-- 中间的按钮 -->
|
||||||
<div class="row-3-item-1-center">
|
<div class="row-3-item-1-center">
|
||||||
<img class="center-icon" :src="isStopLeft ? stopImg : startImg" />
|
<img
|
||||||
|
class="center-icon"
|
||||||
|
@click="handleChangeCamera('stop')"
|
||||||
|
:src="isStopLeft ? stopImg : startImg"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 描述文字 -->
|
<!-- 描述文字 -->
|
||||||
|
|
@ -118,13 +135,11 @@
|
||||||
<span>缩放</span>
|
<span>缩放</span>
|
||||||
<img
|
<img
|
||||||
style="margin-bottom: 2px"
|
style="margin-bottom: 2px"
|
||||||
@click="handleChangeZoomCamera('ZoomIn')"
|
|
||||||
@mousedown="handleChangeZoomCamera('ZoomIn')"
|
@mousedown="handleChangeZoomCamera('ZoomIn')"
|
||||||
@mouseup="handleStopDeviceCameraZoom()"
|
@mouseup="handleStopDeviceCameraZoom()"
|
||||||
src="@/assets/home-imgs/control-2-add.png"
|
src="@/assets/home-imgs/control-2-add.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeZoomCamera('ZoomOut')"
|
|
||||||
@mousedown="handleChangeZoomCamera('ZoomOut')"
|
@mousedown="handleChangeZoomCamera('ZoomOut')"
|
||||||
@mouseup="handleStopDeviceCameraZoom()"
|
@mouseup="handleStopDeviceCameraZoom()"
|
||||||
src="@/assets/home-imgs/control-2-reduce.png"
|
src="@/assets/home-imgs/control-2-reduce.png"
|
||||||
|
|
@ -148,28 +163,24 @@
|
||||||
<!-- 上下左右控制按钮 -->
|
<!-- 上下左右控制按钮 -->
|
||||||
<img
|
<img
|
||||||
class="arrow-top"
|
class="arrow-top"
|
||||||
@click="handleChangeRobot('5')"
|
|
||||||
@mousedown="handleChangeRobot('5')"
|
@mousedown="handleChangeRobot('5')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-right"
|
class="arrow-right"
|
||||||
@click="handleChangeRobot('8')"
|
|
||||||
@mousedown="handleChangeRobot('8')"
|
@mousedown="handleChangeRobot('8')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-bottom"
|
class="arrow-bottom"
|
||||||
@click="handleChangeRobot('6')"
|
|
||||||
@mousedown="handleChangeRobot('6')"
|
@mousedown="handleChangeRobot('6')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-left"
|
class="arrow-left"
|
||||||
@click="handleChangeRobot('7')"
|
|
||||||
@mousedown="handleChangeRobot('7')"
|
@mousedown="handleChangeRobot('7')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
|
|
@ -182,7 +193,11 @@
|
||||||
<div class="text-right description-text">右转</div>
|
<div class="text-right description-text">右转</div>
|
||||||
|
|
||||||
<div class="row-3-item-1-center">
|
<div class="row-3-item-1-center">
|
||||||
<img class="center-icon" :src="isStopRight ? startImg : stopImg" />
|
<img
|
||||||
|
class="center-icon"
|
||||||
|
@click="handleChangeRobot(9)"
|
||||||
|
:src="isStopRight ? startImg : stopImg"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
|
|
@ -470,6 +485,40 @@ const beforeUpload = ({ file }) => {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 暂停和停止巡航
|
||||||
|
const handleStopAndOverRouter = async (type) => {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
dialog.warning({
|
||||||
|
title: '提示',
|
||||||
|
content: `当前机器人正在巡检中,确定${type == 15 ? '暂停' : '结束'}巡检吗?`,
|
||||||
|
positiveText: '确定',
|
||||||
|
negativeText: '取消',
|
||||||
|
onPositiveClick: async () => {
|
||||||
|
try {
|
||||||
|
const { data: res } = await handleRobotActionApi({
|
||||||
|
puId: robotData.robotInfo?.puId,
|
||||||
|
type: type,
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
message.success(`已${type == 15 ? '暂停' : '结束'}巡检`)
|
||||||
|
getRobotBaseInfo()
|
||||||
|
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
||||||
|
} else {
|
||||||
|
message.error(`${type == 15 ? '暂停' : '结束'}巡检失败` + res.message)
|
||||||
|
resolve(true) // 暂停失败,仍然处于巡检状态
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
message.error(`${type == 15 ? '暂停' : '结束'}巡检出错`)
|
||||||
|
resolve(true) // 出错时,假设仍然处于巡检状态
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onNegativeClick: () => {
|
||||||
|
resolve(true) // 用户取消,仍然处于巡检状态
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 判断当前机器人是否在 巡检中 如果在巡检中 则不可进行任何操作 可弹框提示客户暂停巡检 然后重新获取机器人状态再进行操作
|
// 判断当前机器人是否在 巡检中 如果在巡检中 则不可进行任何操作 可弹框提示客户暂停巡检 然后重新获取机器人状态再进行操作
|
||||||
const handleInspection = async () => {
|
const handleInspection = async () => {
|
||||||
// if (robotBaseInfo.value.type.includes('巡检')) {
|
// if (robotBaseInfo.value.type.includes('巡检')) {
|
||||||
|
|
@ -501,25 +550,25 @@ const handleInspection = async () => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
dialog.warning({
|
dialog.warning({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '当前机器人正在巡检中,可暂停巡检后再进行操作',
|
content: '当前机器人正在巡检中,可停止巡检后再进行操作',
|
||||||
positiveText: '暂停巡检',
|
positiveText: '停止巡检',
|
||||||
negativeText: '取消',
|
negativeText: '取消',
|
||||||
onPositiveClick: async () => {
|
onPositiveClick: async () => {
|
||||||
try {
|
try {
|
||||||
const { data: res } = await handleRobotActionApi({
|
const { data: res } = await handleRobotActionApi({
|
||||||
puId: robotData.robotInfo?.puId,
|
puId: robotData.robotInfo?.puId,
|
||||||
type: '15',
|
type: '14',
|
||||||
})
|
})
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
message.success('已暂停巡检')
|
message.success('已停止巡检')
|
||||||
getRobotBaseInfo()
|
getRobotBaseInfo()
|
||||||
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
||||||
} else {
|
} else {
|
||||||
message.error('暂停巡检失败' + res.message)
|
message.error('停止巡检失败' + res.message)
|
||||||
resolve(true) // 暂停失败,仍然处于巡检状态
|
resolve(true) // 暂停失败,仍然处于巡检状态
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('暂停巡检出错')
|
message.error('停止巡检出错')
|
||||||
resolve(true) // 出错时,假设仍然处于巡检状态
|
resolve(true) // 出错时,假设仍然处于巡检状态
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -729,7 +778,7 @@ const handleChangeCamera = debounce(async (motion) => {
|
||||||
idx: 0,
|
idx: 0,
|
||||||
motion,
|
motion,
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 0)
|
||||||
|
|
||||||
// 球机缩放
|
// 球机缩放
|
||||||
const handleChangeZoomCamera = async (motion) => {
|
const handleChangeZoomCamera = async (motion) => {
|
||||||
|
|
@ -843,7 +892,7 @@ const handleChangeRobot = debounce(async (type) => {
|
||||||
if (res.code == 200 && type == 9) {
|
if (res.code == 200 && type == 9) {
|
||||||
isStopRight.value = false
|
isStopRight.value = false
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 0)
|
||||||
|
|
||||||
// 停止机器人
|
// 停止机器人
|
||||||
const handleStopRobot = async () => {
|
const handleStopRobot = async () => {
|
||||||
|
|
|
||||||
|
|
@ -584,6 +584,7 @@ const onHandleAddRoute = () => {
|
||||||
ptzy: '',
|
ptzy: '',
|
||||||
ptzz: '',
|
ptzz: '',
|
||||||
actions: [],
|
actions: [],
|
||||||
|
preset: '',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -637,7 +638,7 @@ const handleChangePointName = (event, index) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointInfo = markerPointList.value.find((item) => item.value == event)
|
const pointInfo = markerPointList.value.find((item) => item.value == event)
|
||||||
const { positionX, positionY, theta, ptzx, ptzy, ptzz } = pointInfo
|
const { positionX, positionY, theta, ptzx, ptzy, ptzz, preset } = pointInfo
|
||||||
routeList.value[index].pointName = pointInfo?.label
|
routeList.value[index].pointName = pointInfo?.label
|
||||||
routeList.value[index].pointId = pointInfo?.value
|
routeList.value[index].pointId = pointInfo?.value
|
||||||
routeList.value[index].x = positionX
|
routeList.value[index].x = positionX
|
||||||
|
|
@ -646,6 +647,7 @@ const handleChangePointName = (event, index) => {
|
||||||
routeList.value[index].ptzx = ptzx
|
routeList.value[index].ptzx = ptzx
|
||||||
routeList.value[index].ptzy = ptzy
|
routeList.value[index].ptzy = ptzy
|
||||||
routeList.value[index].ptzz = ptzz
|
routeList.value[index].ptzz = ptzz
|
||||||
|
routeList.value[index].preset = preset
|
||||||
|
|
||||||
markPoints(positionX, positionY, pointInfo?.value, index)
|
markPoints(positionX, positionY, pointInfo?.value, index)
|
||||||
}
|
}
|
||||||
|
|
@ -731,10 +733,12 @@ const onHandleSave = async () => {
|
||||||
ptzx: item.ptzx,
|
ptzx: item.ptzx,
|
||||||
ptzy: item.ptzy,
|
ptzy: item.ptzy,
|
||||||
ptzz: item.ptzz,
|
ptzz: item.ptzz,
|
||||||
|
preset: item.preset,
|
||||||
x: item.x,
|
x: item.x,
|
||||||
y: item.y,
|
y: item.y,
|
||||||
actions: item.actions,
|
actions: item.actions,
|
||||||
num: index + 1,
|
num: index + 1,
|
||||||
|
imgNum: item.num,
|
||||||
interval: item.interval,
|
interval: item.interval,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -742,7 +746,7 @@ const onHandleSave = async () => {
|
||||||
positions.forEach((item) => {
|
positions.forEach((item) => {
|
||||||
if (item.actions && item.actions.length > 0) {
|
if (item.actions && item.actions.length > 0) {
|
||||||
item.actions.forEach((action) => {
|
item.actions.forEach((action) => {
|
||||||
action.num = item.num
|
action.num = item.imgNum
|
||||||
action.interval = item.interval
|
action.interval = item.interval
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -991,7 +995,7 @@ watch(
|
||||||
pointName: item.positionId,
|
pointName: item.positionId,
|
||||||
theta: item.theta,
|
theta: item.theta,
|
||||||
actionType: null,
|
actionType: null,
|
||||||
num: '',
|
num: item.num,
|
||||||
interval: '',
|
interval: '',
|
||||||
x: item.x,
|
x: item.x,
|
||||||
y: item.y,
|
y: item.y,
|
||||||
|
|
@ -999,6 +1003,7 @@ watch(
|
||||||
ptzx: item.ptzx,
|
ptzx: item.ptzx,
|
||||||
ptzy: item.ptzy,
|
ptzy: item.ptzy,
|
||||||
ptzz: item.ptzz,
|
ptzz: item.ptzz,
|
||||||
|
preset: item.preset,
|
||||||
actions: item.actions || [],
|
actions: item.actions || [],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,18 +79,18 @@
|
||||||
|
|
||||||
<n-grid x-gap="24" :cols="24">
|
<n-grid x-gap="24" :cols="24">
|
||||||
<n-gi :span="24">
|
<n-gi :span="24">
|
||||||
<n-form-item label="摄像头预置位:" prop="markerPreset">
|
<n-form-item label="摄像头预置位:" prop="preset">
|
||||||
<!-- <n-input
|
<n-input
|
||||||
v-model:value="markerParams.markerPreset"
|
v-model:value="markerParams.preset"
|
||||||
placeholder="摄像头预置位"
|
placeholder="摄像头预置位"
|
||||||
clearable
|
clearable
|
||||||
/> -->
|
/>
|
||||||
|
|
||||||
<n-select
|
<!-- <n-select
|
||||||
:options="presetOptions"
|
:options="presetOptions"
|
||||||
placeholder="请选择摄像头预置位"
|
placeholder="请选择摄像头预置位"
|
||||||
v-model:value="markerParams.markerPreset"
|
v-model:value="markerParams.markerPreset"
|
||||||
/>
|
/> -->
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-gi>
|
</n-gi>
|
||||||
</n-grid>
|
</n-grid>
|
||||||
|
|
@ -198,6 +198,7 @@ const markerParams = ref({
|
||||||
PTZ_x: '',
|
PTZ_x: '',
|
||||||
PTZ_y: '',
|
PTZ_y: '',
|
||||||
id: '',
|
id: '',
|
||||||
|
preset: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
const addOrEditMarkerFormRules = ref({
|
const addOrEditMarkerFormRules = ref({
|
||||||
|
|
@ -273,14 +274,16 @@ const getRobotCurrentPosition = async (puId) => {
|
||||||
|
|
||||||
// 新增或者修改点位
|
// 新增或者修改点位
|
||||||
|
|
||||||
const addOrEditMarker = async (isCurrentPosition) => {
|
const addOrEditMarker = async (isCurrentPosition, isSuccess) => {
|
||||||
const { Robot_x, Robot_y, PTZ_x, PTZ_y, PTZ_zoom, Robot_theta } = isCurrentPosition
|
if (isSuccess) {
|
||||||
markerParams.value.xCount = Robot_x
|
const { Robot_x, Robot_y, PTZ_x, PTZ_y, PTZ_zoom, Robot_theta } = isCurrentPosition
|
||||||
markerParams.value.yCount = Robot_y
|
markerParams.value.xCount = Robot_x
|
||||||
markerParams.value.PTZ_x = PTZ_x
|
markerParams.value.yCount = Robot_y
|
||||||
markerParams.value.PTZ_y = PTZ_y
|
markerParams.value.PTZ_x = PTZ_x
|
||||||
// markerParams.value.markerAngle = Robot_theta
|
markerParams.value.PTZ_y = PTZ_y
|
||||||
markerParams.value.PTZ_zoom = PTZ_zoom
|
markerParams.value.markerAngle = Robot_theta
|
||||||
|
markerParams.value.PTZ_zoom = PTZ_zoom
|
||||||
|
}
|
||||||
|
|
||||||
const addMarkerParams = {
|
const addMarkerParams = {
|
||||||
ptzz: markerParams.value.PTZ_zoom,
|
ptzz: markerParams.value.PTZ_zoom,
|
||||||
|
|
@ -291,6 +294,7 @@ const addOrEditMarker = async (isCurrentPosition) => {
|
||||||
positionY: Math.ceil(markerParams.value.yCount),
|
positionY: Math.ceil(markerParams.value.yCount),
|
||||||
mapId: markerParams.value.mapId,
|
mapId: markerParams.value.mapId,
|
||||||
pointName: markerParams.value.markerName,
|
pointName: markerParams.value.markerName,
|
||||||
|
preset: markerParams.value.preset,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (markerParams.value.type === '修改') {
|
if (markerParams.value.type === '修改') {
|
||||||
|
|
@ -316,6 +320,8 @@ const onHandleConfirm = () => {
|
||||||
}).then(async (res) => {
|
}).then(async (res) => {
|
||||||
const { Robot_x, Robot_y, PTZ_x, PTZ_y, PTZ_zoom, Robot_theta } = res?.data.data
|
const { Robot_x, Robot_y, PTZ_x, PTZ_y, PTZ_zoom, Robot_theta } = res?.data.data
|
||||||
|
|
||||||
|
const isSuccess = res?.data?.data ? true : false
|
||||||
|
|
||||||
// 判断当前点位和机器人位置是否一致
|
// 判断当前点位和机器人位置是否一致
|
||||||
if (
|
if (
|
||||||
Math.abs(Robot_x - markerParams.value.xCount) > 50 ||
|
Math.abs(Robot_x - markerParams.value.xCount) > 50 ||
|
||||||
|
|
@ -340,7 +346,7 @@ const onHandleConfirm = () => {
|
||||||
onHandleGoToPoint()
|
onHandleGoToPoint()
|
||||||
},
|
},
|
||||||
onNegativeClick: async () => {
|
onNegativeClick: async () => {
|
||||||
addOrEditMarker(Position)
|
addOrEditMarker(Position, isSuccess)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -350,7 +356,7 @@ const onHandleConfirm = () => {
|
||||||
positiveText: '确定新增',
|
positiveText: '确定新增',
|
||||||
negativeText: '取消',
|
negativeText: '取消',
|
||||||
onPositiveClick: async () => {
|
onPositiveClick: async () => {
|
||||||
addOrEditMarker(Position)
|
addOrEditMarker(Position, isSuccess)
|
||||||
},
|
},
|
||||||
onNegativeClick: () => {},
|
onNegativeClick: () => {},
|
||||||
})
|
})
|
||||||
|
|
@ -364,7 +370,8 @@ const onHandleConfirm = () => {
|
||||||
PTZ_zoom,
|
PTZ_zoom,
|
||||||
Robot_theta,
|
Robot_theta,
|
||||||
}
|
}
|
||||||
addOrEditMarker(isCurrentPosition)
|
|
||||||
|
addOrEditMarker(isCurrentPosition, isSuccess)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,11 @@
|
||||||
alt=""
|
alt=""
|
||||||
@mousedown="handleChangeCamera('up')"
|
@mousedown="handleChangeCamera('up')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
@click="handleChangeCamera('up')"
|
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
class="arrow-right hand-direction"
|
class="arrow-right hand-direction"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
alt=""
|
alt=""
|
||||||
@click="handleChangeCamera('right')"
|
|
||||||
@mousedown="handleChangeCamera('right')"
|
@mousedown="handleChangeCamera('right')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
/>
|
/>
|
||||||
|
|
@ -26,7 +24,6 @@
|
||||||
class="arrow-bottom hand-direction"
|
class="arrow-bottom hand-direction"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
alt=""
|
alt=""
|
||||||
@click="handleChangeCamera('down')"
|
|
||||||
@mousedown="handleChangeCamera('down')"
|
@mousedown="handleChangeCamera('down')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
/>
|
/>
|
||||||
|
|
@ -34,14 +31,18 @@
|
||||||
class="arrow-left hand-direction"
|
class="arrow-left hand-direction"
|
||||||
src="@/assets/home-imgs/control-2-arrow.png"
|
src="@/assets/home-imgs/control-2-arrow.png"
|
||||||
alt=""
|
alt=""
|
||||||
@click="handleChangeCamera('left')"
|
|
||||||
@mousedown="handleChangeCamera('left')"
|
@mousedown="handleChangeCamera('left')"
|
||||||
@mouseup="handleChangeCamera('stop')"
|
@mouseup="handleChangeCamera('stop')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 中间的按钮 -->
|
<!-- 中间的按钮 -->
|
||||||
<div class="row-3-item-1-center" @click="handleStopCamera">
|
<div class="row-3-item-1-center">
|
||||||
<img alt="" class="center-icon" :src="isStopLeft ? startImg : stopImg" />
|
<img
|
||||||
|
alt=""
|
||||||
|
class="center-icon"
|
||||||
|
:src="isStopLeft ? startImg : stopImg"
|
||||||
|
@click="handleChangeCamera('stop')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 描述文字 -->
|
<!-- 描述文字 -->
|
||||||
|
|
@ -54,14 +55,12 @@
|
||||||
<div class="add-reduce-btn">
|
<div class="add-reduce-btn">
|
||||||
<span>缩放</span>
|
<span>缩放</span>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeZoomCamera('ZoomIn')"
|
|
||||||
style="margin-left: 20px; transform: rotate(-90deg)"
|
style="margin-left: 20px; transform: rotate(-90deg)"
|
||||||
src="@/assets/home-imgs/control-2-add.png"
|
src="@/assets/home-imgs/control-2-add.png"
|
||||||
@mousedown="handleChangeZoomCamera('ZoomIn')"
|
@mousedown="handleChangeZoomCamera('ZoomIn')"
|
||||||
@mouseup="handleStopDeviceCameraZoom()"
|
@mouseup="handleStopDeviceCameraZoom()"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeZoomCamera('ZoomOut')"
|
|
||||||
style="margin-left: 50px; transform: rotate(-90deg)"
|
style="margin-left: 50px; transform: rotate(-90deg)"
|
||||||
src="@/assets/home-imgs/control-2-reduce.png"
|
src="@/assets/home-imgs/control-2-reduce.png"
|
||||||
@mousedown="handleChangeZoomCamera('ZoomOut')"
|
@mousedown="handleChangeZoomCamera('ZoomOut')"
|
||||||
|
|
@ -75,7 +74,6 @@
|
||||||
<div class="row-3-item-3">
|
<div class="row-3-item-3">
|
||||||
<!-- 上下左右控制按钮 -->
|
<!-- 上下左右控制按钮 -->
|
||||||
<img
|
<img
|
||||||
@click="handleChangeRobot('5')"
|
|
||||||
@mousedown="handleChangeRobot('5')"
|
@mousedown="handleChangeRobot('5')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
class="arrow-top"
|
class="arrow-top"
|
||||||
|
|
@ -83,7 +81,6 @@
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeRobot('8')"
|
|
||||||
@mousedown="handleChangeRobot('8')"
|
@mousedown="handleChangeRobot('8')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
class="arrow-right"
|
class="arrow-right"
|
||||||
|
|
@ -91,7 +88,6 @@
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeRobot('6')"
|
|
||||||
@mousedown="handleChangeRobot('6')"
|
@mousedown="handleChangeRobot('6')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
class="arrow-bottom"
|
class="arrow-bottom"
|
||||||
|
|
@ -99,7 +95,6 @@
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
@click="handleChangeRobot('7')"
|
|
||||||
@mousedown="handleChangeRobot('7')"
|
@mousedown="handleChangeRobot('7')"
|
||||||
@mouseup="handleChangeRobot(9)"
|
@mouseup="handleChangeRobot(9)"
|
||||||
class="arrow-left"
|
class="arrow-left"
|
||||||
|
|
@ -114,7 +109,11 @@
|
||||||
<div class="text-right description-text">右转</div>
|
<div class="text-right description-text">右转</div>
|
||||||
|
|
||||||
<div class="row-3-item-1-center">
|
<div class="row-3-item-1-center">
|
||||||
<img class="center-icon" :src="isStopRight ? startImg : stopImg" />
|
<img
|
||||||
|
class="center-icon"
|
||||||
|
:src="isStopRight ? startImg : stopImg"
|
||||||
|
@click="handleChangeRobot(9)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</n-grid-item>
|
</n-grid-item>
|
||||||
|
|
@ -171,25 +170,25 @@ const handleInspection = async () => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
dialog.warning({
|
dialog.warning({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '当前机器人正在巡检中,可暂停巡检后再进行操作',
|
content: '当前机器人正在巡检中,可停止巡检后再进行操作',
|
||||||
positiveText: '暂停巡检',
|
positiveText: '停止巡检',
|
||||||
negativeText: '取消',
|
negativeText: '取消',
|
||||||
onPositiveClick: async () => {
|
onPositiveClick: async () => {
|
||||||
try {
|
try {
|
||||||
const { data: res } = await handleRobotActionApi({
|
const { data: res } = await handleRobotActionApi({
|
||||||
puId: robotData.robotInfo?.puId,
|
puId: robotData.robotInfo?.puId,
|
||||||
type: '15',
|
type: '14',
|
||||||
})
|
})
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
message.success('已暂停巡检')
|
message.success('已停止巡检')
|
||||||
getRobotBaseInfo()
|
getRobotBaseInfo()
|
||||||
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
resolve(false) // 已暂停巡检,返回false表示不处于巡检状态
|
||||||
} else {
|
} else {
|
||||||
message.error('暂停巡检失败' + res.message)
|
message.error('停止巡检失败' + res.message)
|
||||||
resolve(true) // 暂停失败,仍然处于巡检状态
|
resolve(true) // 暂停失败,仍然处于巡检状态
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('暂停巡检出错')
|
message.error('停止巡检出错')
|
||||||
resolve(true) // 出错时,假设仍然处于巡检状态
|
resolve(true) // 出错时,假设仍然处于巡检状态
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -246,7 +245,7 @@ const handleChangeCamera = debounce(async (motion) => {
|
||||||
idx: 0,
|
idx: 0,
|
||||||
motion,
|
motion,
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 0)
|
||||||
|
|
||||||
// 球机缩放
|
// 球机缩放
|
||||||
const handleChangeZoomCamera = async (motion) => {
|
const handleChangeZoomCamera = async (motion) => {
|
||||||
|
|
@ -297,7 +296,7 @@ const handleChangeRobot = debounce(async (type) => {
|
||||||
isStopRight.value = true
|
isStopRight.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 600)
|
}, 0)
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getRobotBaseInfo()
|
getRobotBaseInfo()
|
||||||
|
|
|
||||||
|
|
@ -56,21 +56,22 @@
|
||||||
modalTitle="比对图片"
|
modalTitle="比对图片"
|
||||||
@onHandleCloseModal="imageModalVisible = false"
|
@onHandleCloseModal="imageModalVisible = false"
|
||||||
>
|
>
|
||||||
<div style="display: flex; justify-content: space-around">
|
<!-- 巡检比对图片 -->
|
||||||
<div>
|
<div class="image-container">
|
||||||
|
<div class="image-item">
|
||||||
<div style="margin-bottom: 10px; color: #fff">第一张巡检照片</div>
|
<div style="margin-bottom: 10px; color: #fff">第一张巡检照片</div>
|
||||||
<n-image
|
<n-image
|
||||||
width="100%"
|
width="420"
|
||||||
height="100%"
|
height="420"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
:src="imgPreviewUrl + startImage"
|
:src="imgPreviewUrl + startImage"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="image-item">
|
||||||
<div style="color: #fff">上一次巡检照片</div>
|
<div style="color: #fff">上一次巡检照片</div>
|
||||||
<n-image
|
<n-image
|
||||||
width="100%"
|
width="420"
|
||||||
height="100%"
|
height="420"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
:src="imgPreviewUrl + endImage"
|
:src="imgPreviewUrl + endImage"
|
||||||
/>
|
/>
|
||||||
|
|
@ -240,4 +241,18 @@ getImagePageList()
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.image-item {
|
||||||
|
margin: 0 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue