|
@@ -5,20 +5,28 @@
|
|
|
<div class="joystick-inner flex gap-4 mb-4">
|
|
|
<div
|
|
|
class="w-full h-90px text-7 line-height-45px text-center bg-#093F9D border-rd-2 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
- @click="toggle">
|
|
|
- <Icon icon="oui:full-screen" width="40" height="40"/>
|
|
|
+ @click="toggle"
|
|
|
+ >
|
|
|
+ <Icon icon="oui:full-screen" width="40" height="40" />
|
|
|
</div>
|
|
|
<div
|
|
|
class="w-full h-90px text-7 line-height-45px text-center bg-#093F9D border-rd-2 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
- @click="load">
|
|
|
- <Icon icon="solar:refresh-square-outline" width="40" height="40"/>
|
|
|
+ @click="load"
|
|
|
+ >
|
|
|
+ <Icon icon="solar:refresh-square-outline" width="40" height="40" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <div v-if="type != 'screenSet'" class="grid grid-cols-3 grid-rows-1 gap-4 w-full my-1">
|
|
|
+ <div
|
|
|
+ v-if="type != 'screenSet'"
|
|
|
+ class="grid grid-cols-3 grid-rows-1 gap-4 w-full my-1"
|
|
|
+ >
|
|
|
<div
|
|
|
class="direction-button flex justify-center items-center text-7 line-height-60px text-center w-full h-120px bg-#093F9D b-0 b-rd-2 overflow-hidden transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
- v-for="(item, i) in patrolBtn" :key="i" v-on:[useSystem.event]="toSelectedPoint(item)">
|
|
|
+ v-for="(item, i) in patrolBtn"
|
|
|
+ :key="i"
|
|
|
+ v-on:[useSystem.event]="toSelectedPoint(item)"
|
|
|
+ >
|
|
|
<!-- <span>{{ item.icon }}</span> -->
|
|
|
<Icon :icon="item.icon" width="40" height="40"></Icon>
|
|
|
</div>
|
|
@@ -26,29 +34,59 @@
|
|
|
<div class="slider-box">
|
|
|
<div class="slider-box-control flex flex-col flex-items-center gap-1">
|
|
|
<div
|
|
|
- class="w-full h-90px my-3 text-20px line-height-45px text-center bg-#093F9D border-rd-2 overflow-hidden flex">
|
|
|
+ class="w-full h-90px my-3 text-20px line-height-45px text-center bg-#093F9D border-rd-2 overflow-hidden flex"
|
|
|
+ >
|
|
|
<div
|
|
|
- class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none">
|
|
|
- <img src="@/assets/images/fd.png" class="w-38px" alt="" v-on:[downEvent]="setPZTmove('fd', 'down')"
|
|
|
- v-on:[upEvent]="setPZTmove('fd', 'up')" draggable="false" />
|
|
|
+ class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="@/assets/images/fd.png"
|
|
|
+ class="w-38px"
|
|
|
+ alt=""
|
|
|
+ v-on:[downEvent]="setPZTmove('fd', 'down')"
|
|
|
+ v-on:[upEvent]="setPZTmove('fd', 'up')"
|
|
|
+ draggable="false"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div
|
|
|
- class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none">
|
|
|
- <img src="@/assets/images/sx.png" class="w-38px" alt="" v-on:[downEvent]="setPZTmove('sx', 'down')"
|
|
|
- v-on:[upEvent]="setPZTmove('sx', 'up')" draggable="false" />
|
|
|
+ class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="@/assets/images/sx.png"
|
|
|
+ class="w-38px"
|
|
|
+ alt=""
|
|
|
+ v-on:[downEvent]="setPZTmove('sx', 'down')"
|
|
|
+ v-on:[upEvent]="setPZTmove('sx', 'up')"
|
|
|
+ draggable="false"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
|
- class="w-full h-90px mb-3 text-20px line-height-45px text-center bg-#093F9D border-rd-2 overflow-hidden flex">
|
|
|
+ class="w-full h-90px mb-3 text-20px line-height-45px text-center bg-#093F9D border-rd-2 overflow-hidden flex"
|
|
|
+ >
|
|
|
<div
|
|
|
- class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none">
|
|
|
- <img src="@/assets/images/jia.png" class="w-38px" alt="" v-on:[downEvent]="setPZTmove('jia', 'down')"
|
|
|
- v-on:[upEvent]="setPZTmove('jia', 'up')" draggable="false" />
|
|
|
+ class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="@/assets/images/jia.png"
|
|
|
+ class="w-38px"
|
|
|
+ alt=""
|
|
|
+ v-on:[downEvent]="setPZTmove('jia', 'down')"
|
|
|
+ v-on:[upEvent]="setPZTmove('jia', 'up')"
|
|
|
+ draggable="false"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div
|
|
|
- class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none">
|
|
|
- <img src="@/assets/images/jian.png" class="w-38px" alt="" v-on:[downEvent]="setPZTmove('jian', 'down')"
|
|
|
- v-on:[upEvent]="setPZTmove('jian', 'up')" draggable="false" />
|
|
|
+ class="flex-1 flex flex-justify-around flex-items-center transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ src="@/assets/images/jian.png"
|
|
|
+ class="w-38px"
|
|
|
+ alt=""
|
|
|
+ v-on:[downEvent]="setPZTmove('jian', 'down')"
|
|
|
+ v-on:[upEvent]="setPZTmove('jian', 'up')"
|
|
|
+ draggable="false"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -58,17 +96,32 @@
|
|
|
<div class="grid grid-cols-3 grid-rows-3 gap-4 w-full h-513px">
|
|
|
<div
|
|
|
class="direction-button flex justify-center items-center bg-#093F9D b-0 b-rd-2 overflow-hidden p-2 transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
- v-for="direction in directions" :style="{
|
|
|
+ v-for="direction in directions"
|
|
|
+ :style="{
|
|
|
backgroundColor:
|
|
|
direction === 'hr' && isHR ? 'rgb(59 130 246)' : '',
|
|
|
- }" :key="direction" v-on:[downEvent].stop="setPZTmove(direction, 'down')"
|
|
|
- v-on:[upEvent].stop="setPZTmove(direction, 'up')">
|
|
|
- <img class="w-full" draggable="false" :src="getStaticResource(`assets/images/${direction}.png`).href" />
|
|
|
+ }"
|
|
|
+ :key="direction"
|
|
|
+ v-on:[downEvent].stop="setPZTmove(direction, 'down')"
|
|
|
+ v-on:[upEvent].stop="setPZTmove(direction, 'up')"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ class="w-full"
|
|
|
+ draggable="false"
|
|
|
+ :src="getStaticResource(`assets/images/${direction}.png`).href"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class=" flex-1 flex flex-col justify-center items-center">
|
|
|
- <van-slider v-model="sliderValue" bar-height="10px" active-color="#093f9d" inactive-color="#093f9d"
|
|
|
- button-size="24px" :min="1" :max="7"></van-slider>
|
|
|
+ <div class="flex-1 flex flex-col justify-center items-center">
|
|
|
+ <van-slider
|
|
|
+ v-model="sliderValue"
|
|
|
+ bar-height="10px"
|
|
|
+ active-color="#093f9d"
|
|
|
+ inactive-color="#093f9d"
|
|
|
+ button-size="24px"
|
|
|
+ :min="1"
|
|
|
+ :max="7"
|
|
|
+ ></van-slider>
|
|
|
<div class="text-2xl">
|
|
|
步长 <span>{{ sliderValue }}</span>
|
|
|
</div>
|
|
@@ -109,7 +162,7 @@
|
|
|
</div>
|
|
|
<div class="buttons grid grid-cols-3 grid-rows-3 gap-1 w-58 h-58">
|
|
|
<div
|
|
|
- class="direction-button bg-#093F9D b-0 b-rd-2 flex justify-center items-center overflow-hidden p-2 transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
+ class="direction-button bg-#093F9D b-0 b-rd-2 flex justify-center items-center overflow-hidden p-2 transition duration-200 ease-in-out active:bg-blue-500 focus:outline-none"
|
|
|
v-for="direction in directions"
|
|
|
:style="{
|
|
|
backgroundColor:
|
|
@@ -209,6 +262,7 @@
|
|
|
import { useFullscreen } from "@vueuse/core";
|
|
|
import { getStaticResource, isWap } from "@/utils";
|
|
|
import { useOutsideSystemStore } from "@/stores/modules/system";
|
|
|
+import { msg } from "@/utils";
|
|
|
|
|
|
defineProps({
|
|
|
type: {
|
|
@@ -272,7 +326,7 @@ const reconnect = (err, data, api) => {
|
|
|
});
|
|
|
reconnect(res);
|
|
|
},
|
|
|
- () => { },
|
|
|
+ () => {},
|
|
|
"重连",
|
|
|
"取消"
|
|
|
);
|
|
@@ -419,7 +473,10 @@ const setPZTmove = (direction, isKey) => {
|
|
|
};
|
|
|
|
|
|
const toSelectedPoint = async (item) => {
|
|
|
- if (!item.value) return;
|
|
|
+ if (!item.value) {
|
|
|
+ msg('error', '暂未设置该预制点')
|
|
|
+ return;
|
|
|
+ }
|
|
|
API_PRESET_POINTS_EXEC_POST({
|
|
|
CameraId: useSystem.BallCameraId,
|
|
|
PresetPointId: item.value,
|