Compare commits

..

No commits in common. '4b0d064ca85702aa3094cf9a8dcdb6c41e196b59' and '77abcbadf6d8c3c2dbdaf3fde2319bc541b1235a' have entirely different histories.

@ -109,7 +109,7 @@
import { buildGUID } from '@/utils/uuid';
import { vDrag } from '@/utils/drag';
import { EventBus } from '@/utils/eventBus';
import { drcUpTopic, setTopic, eventsTopicSubscribe } from '@/utils/debugging/remote';
import { drcUpTopic, setTopic } from '@/utils/debugging/remote';
import { airPortStore } from '@/store/modules/airport';
import { AlertOutlined, RadarChartOutlined } from '@ant-design/icons-vue';
import { endHandFlyTask } from '@/api/workmanagement/droneDock';
@ -156,7 +156,6 @@
socket.disconnect();
}
airPortStoreVal.setTaskId(null);
stopPatrolVisible.value = false;
}
});
} else {
@ -176,8 +175,8 @@
patrolVisible.value = false;
};
onMounted(() => {
socket = io('http://192.168.10.131:9025');
// socket = io('http://123.132.248.154:9309');
// socket = io('http://192.168.10.131:9025');
socket = io('http://123.132.248.154:9309');
destroyConnection();
createConnection(connectCallback);
setTimeout(() => {
@ -315,7 +314,6 @@
const topicUAVUrl = 'thing/product/' + UAVinfo.sn + '/osd';
//
clientSubscribe(topicUAVUrl, { qos: 1 });
eventsTopicSubscribe();
};
</script>
<style lang="less" scoped>

@ -558,8 +558,8 @@
}
};
onMounted(() => {
socket = io('http://192.168.10.131:9025');
// socket = io('http://123.132.248.154:9309');
// socket = io('http://192.168.10.131:9025');
socket = io('http://123.132.248.154:9309');
//
document.addEventListener('keydown', handleKeyDown);
document.addEventListener('keyup', handleKeyUp);

@ -25,10 +25,14 @@
</div>
<div class="inspection-content">
<div class="inspection-content-left">
<StatisticsComponent :statisData="socketData" />
<StatisticsComponent
:statisData="socketData && socketData.detections ? socketData.detections : []"
/>
</div>
<div class="inspection-content-right">
<VideoStreamComponent :statisData="socketData" />
<VideoStreamComponent
:statisData="socketData && socketData.detections ? socketData.detections : []"
/>
</div>
</div>
</div>
@ -50,8 +54,8 @@
function connectWebSocket() {
console.log('connectWebSocket');
// Socket
socket = io('http://192.168.10.131:9025');
// socket = io('http://123.132.248.154:9309');
// socket = io('http://192.168.10.131:9025');
socket = io('http://123.132.248.154:9309');
//
socket.on('connect', () => {

@ -20,24 +20,20 @@
const airPortStoreVal = airPortStore();
const UAVinfo = airPortStoreVal.getUAV;
const chartData = ref([]);
const dateData = ref([]);
const props = defineProps({
statisData: {
type: Object,
default: () => {},
type: Array,
default: () => [],
},
});
watch(
() => props.statisData,
(val) => {
console.log('props.statisData', val);
if (val.detections) {
if (val.length > 0) {
if (chartData.value.length >= 20) {
chartData.value.shift();
dateData.value.shift();
}
chartData.value.push(val.detections.length);
dateData.value.push(val.time_str);
chartData.value.push(val.length);
updateChart();
}
},
@ -47,6 +43,10 @@
var chartDom = document.getElementById('main');
myChart = echarts.init(chartDom);
var option;
let date = [];
for (let i = 1; i < 20; i++) {
date.push(i);
}
option = {
tooltip: {
trigger: 'axis',
@ -73,7 +73,7 @@
xAxis: {
type: 'category',
boundaryGap: false,
data: [],
data: date,
},
yAxis: {
type: 'value',
@ -109,10 +109,8 @@
};
//
function updateChart() {
console.log(chartData.value);
myChart.setOption({
xAxis: {
data: dateData.value,
},
series: [
{
data: chartData.value,

Loading…
Cancel
Save