|
|
|
@ -46,9 +46,9 @@
|
|
|
|
|
<div class="zoom">
|
|
|
|
|
<a-slider
|
|
|
|
|
v-model:value="zoomVale"
|
|
|
|
|
:tooltip-visible="true"
|
|
|
|
|
:max="maxval"
|
|
|
|
|
:min="2"
|
|
|
|
|
:marks="marks"
|
|
|
|
|
@change="cameraZoom"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
</VueDragResize>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { onMounted, ref, watch, reactive, onUnmounted } from 'vue';
|
|
|
|
|
import { onMounted, ref, watch, createVNode, onUnmounted } from 'vue';
|
|
|
|
|
import {
|
|
|
|
|
getClient,
|
|
|
|
|
createSeizeConnection,
|
|
|
|
@ -121,14 +121,68 @@
|
|
|
|
|
});
|
|
|
|
|
const zoomVale = ref(2);
|
|
|
|
|
const maxval = ref(200);
|
|
|
|
|
const marks = ref<Record<number, any>>({
|
|
|
|
|
2: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '2'),
|
|
|
|
|
},
|
|
|
|
|
100: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '100'),
|
|
|
|
|
},
|
|
|
|
|
200: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '200'),
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
watch(
|
|
|
|
|
() => props.cameraType,
|
|
|
|
|
(val) => {
|
|
|
|
|
console.log('props.cameraType', val);
|
|
|
|
|
if (val == 'ir') {
|
|
|
|
|
maxval.value = 20;
|
|
|
|
|
marks.value = {
|
|
|
|
|
2: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '2'),
|
|
|
|
|
},
|
|
|
|
|
20: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '20'),
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
} else {
|
|
|
|
|
maxval.value = 200;
|
|
|
|
|
marks.value = {
|
|
|
|
|
2: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '2'),
|
|
|
|
|
},
|
|
|
|
|
100: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '100'),
|
|
|
|
|
},
|
|
|
|
|
200: {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#f50',
|
|
|
|
|
},
|
|
|
|
|
label: createVNode('strong', {}, '200'),
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
cameraZoom();
|
|
|
|
|
},
|
|
|
|
@ -138,6 +192,7 @@
|
|
|
|
|
const cameraZoom = () => {
|
|
|
|
|
if (!flightGrab.value) {
|
|
|
|
|
createMessage.warning('请先获取相机控制权');
|
|
|
|
|
zoomVale.value = 2;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (props.cameraType == 'wide') {
|
|
|
|
|