飞行作业页面部分内容对接
After Width: | Height: | Size: 663 B |
After Width: | Height: | Size: 726 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 686 B |
After Width: | Height: | Size: 1.2 KiB |
@ -1,154 +0,0 @@
|
||||
<template>
|
||||
<div class="live-preview">
|
||||
<div class="preview-title">
|
||||
<div class="title-select">
|
||||
<div class="title-select-item">
|
||||
<span>相机:</span>
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="selectVal.camera"
|
||||
style="width: 80px"
|
||||
:options="optionsArr.cameraOptions"
|
||||
/>
|
||||
</div>
|
||||
<div class="title-select-item">
|
||||
<span>分辨率:</span>
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="selectVal.resolution"
|
||||
style="width: 80px"
|
||||
:options="optionsArr.resolutionOptions"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-icon">
|
||||
<RedoOutlined />
|
||||
<a-divider type="vertical" style="border-color: #4e5778" />
|
||||
<ExpandOutlined />
|
||||
<a-divider type="vertical" style="border-color: #4e5778" />
|
||||
<PoweroffOutlined />
|
||||
</div>
|
||||
</div>
|
||||
<div class="live-type">广角</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { RedoOutlined, ExpandOutlined, PoweroffOutlined } from '@ant-design/icons-vue';
|
||||
import { reactive } from 'vue';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import { createConnection } from '@/utils/mqtt';
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
createConnection()
|
||||
.on('connect', (res) => {
|
||||
console.log('连接成功', res);
|
||||
createMessage.success('链接成功');
|
||||
})
|
||||
.on('message', (topic, message) => {
|
||||
console.log(topic, JSON.parse(message));
|
||||
//接受服务端信息
|
||||
})
|
||||
.on('reconnect', (topic, message) => {
|
||||
createMessage.warning('重连');
|
||||
})
|
||||
.on('error', () => {
|
||||
console.log('77877');
|
||||
//重新连接
|
||||
client.reconnect();
|
||||
});
|
||||
const selectVal = reactive({
|
||||
camera: null,
|
||||
resolution: null,
|
||||
});
|
||||
const optionsArr = reactive({
|
||||
cameraOptions: [
|
||||
{
|
||||
label: '项目1',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
resolutionOptions: [],
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.live-preview {
|
||||
width: 400px;
|
||||
height: 248px;
|
||||
padding: 10px;
|
||||
background: #0d0e15;
|
||||
box-shadow:
|
||||
0px 10px 30px 0px rgba(0, 0, 6, 0.15),
|
||||
inset 0px 0px 36px 0px rgba(58, 87, 232, 0.73);
|
||||
border-radius: 6px;
|
||||
opacity: 0.9;
|
||||
backdrop-filter: blur(3px);
|
||||
color: #fff;
|
||||
margin-top: 10px;
|
||||
.preview-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.title-select {
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.title-select-item {
|
||||
border: 1px solid #3a57e8;
|
||||
background: #0d0e15;
|
||||
box-shadow:
|
||||
0px 10px 30px 0px rgba(0, 0, 6, 0.15),
|
||||
inset 0px 0px 36px 0px rgba(58, 87, 232, 0.73);
|
||||
border-radius: 2px;
|
||||
padding-left: 4px;
|
||||
height: 38px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
::v-deep .ant-select-selector {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #f4ba19;
|
||||
font-size: 12px;
|
||||
padding: 0 0 0 2px;
|
||||
.ant-select-selection-placeholder {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
::v-deep .ant-select-selection-item {
|
||||
padding: 0;
|
||||
}
|
||||
::v-deep .ant-select-arrow {
|
||||
color: #fff;
|
||||
}
|
||||
&:last-child {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title-icon {
|
||||
padding: 4px 6px;
|
||||
background: #0d0e15;
|
||||
box-shadow:
|
||||
0px 10px 30px 0px rgba(0, 0, 6, 0.15),
|
||||
inset 0px 0px 36px 0px rgba(58, 87, 232, 0.73);
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3a57e8;
|
||||
}
|
||||
}
|
||||
.live-type {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: #0a99eb;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0, 0, 6, 0.15);
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 100px;
|
||||
}
|
||||
}
|
||||
</style>
|