Merge branch 'master' of http://139.196.74.78:10010/r/drone/command-center-dashboard
| | |
| | | } |
| | | |
| | | // 获得有效载荷控制 |
| | | export async function getPayloadControlApi(params) { |
| | | return await request({ |
| | | url:`${API_PREFIX}/devices/payload-control/requests`, |
| | | method:'get', |
| | | export function getPayloadControlApi(params) { |
| | | return request({ |
| | | url: `${API_PREFIX}/devices/payload-control/requests`, |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // 云台控制api |
| | | export async function ptzControlApi(key,params) { |
| | | return await request({ |
| | | export function ptzControlApi(key,params) { |
| | | return request({ |
| | | url:`${API_PREFIX}/devices/payload-control/payload/${key}`, |
| | | method:'get', |
| | | params |
| | |
| | | } |
| | | |
| | | // 拍照和录像 |
| | | export async function callPhotoAndVideoCmd(sn, type) { |
| | | return await request({ |
| | | export function callPhotoAndVideoCmd(sn, type) { |
| | | return request({ |
| | | url:`${API_PREFIX}/devices/${sn}/payload/photoAndVideoCmd/${type}`, |
| | | method:'get', |
| | | }) |
| | |
| | | |
| | | |
| | | // 相机参数调整 |
| | | export async function cameraParamsChangeApi(data) { |
| | | return await request({ |
| | | export function cameraParamsChangeApi(data) { |
| | | return request({ |
| | | url:`${API_PREFIX}/devices/payload-control/payload/zoom/level`, |
| | | method:'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export function getLiveCapacityApi(workspace_id,params) { |
| | | return request({ |
| | | url:`/drone-device-core/manage/api/v1/live/capacity${workspace_id}`, |
| | | method:'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // 云台重置 |
| | | export async function ptzResetModeApi(params) { |
| | | return await request({ |
| | | export function ptzResetModeApi(params) { |
| | | return request({ |
| | | url:`${API_PREFIX}/devices/payload-control/payload/reset`, |
| | | method:'get', |
| | | params |
| | |
| | | let timer = null |
| | | let totalSeconds = 0 |
| | | |
| | | const workspace_id = computed(() => taskDetails?.value?.workspace_id) |
| | | const workspace_id = inject('workspace_id') |
| | | const list1 = [ |
| | | { key: KeyCode.KEY_Q, text: 'Q', icon: RefreshLeft }, |
| | | { key: KeyCode.KEY_W, text: 'W', icon: ArrowUp }, |
| | |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2025-04-19 15:07:04 |
| | | * @FilePath: \command-center-dashboard\src\components\CurrentTaskDetails\CurrentTaskDetails.vue |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2025 by shuishen, All Rights Reserved. |
| | | * @Description: |
| | | * |
| | | * Copyright (c) 2025 by shuishen, All Rights Reserved. |
| | | --> |
| | | <!--当前任务详情--> |
| | | <template> |
| | |
| | | > |
| | | <div class="content-container" v-if="isShow"> |
| | | <!-- 视频直播 --> |
| | | <div :class="`${isMaxMap ? 'minBox' : 'maxBox'}`"> |
| | | <div :class="`${isMaxMap ? 'minBox' : 'maxBox'} centerPoint`"> |
| | | <LiveVideo :videoUrl="currentLiveUrl" :controls="false" /> |
| | | </div> |
| | | <!-- 展示地图 --> |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | import EventBus from '@/event-bus' |
| | | import { updateDroneQualityApi } from '@/api/drc' |
| | | import { getLiveAiLinkApi } from '@/api/payload' |
| | | import { getLiveAiLinkApi, getLiveCapacityApi } from '@/api/payload' |
| | | import { CURRENT_CONFIG } from '@/utils/http/config' |
| | | import { useDroneWS } from '@/hooks/useDroneWS' |
| | | import { useTaskDetails } from '@/hooks/useTaskDetails/useTaskDetails' |
| | |
| | | currentLiveUrl.value = res.data.data.rtcs_url |
| | | } |
| | | |
| | | let { taskDetails, workspace_id, getTaskDetails } = useTaskDetails(getDeviceLiveUrl) |
| | | //获取相机能力 |
| | | async function getLiveCapacity() { |
| | | const res = await getLiveCapacityApi(workspace_id.value,{ sn: dockSn.value}) |
| | | } |
| | | const useTaskDetailsCallBack = () => { |
| | | console.log(workspace_id.value,66666666) |
| | | getDeviceLiveUrl() |
| | | } |
| | | |
| | | let { taskDetails, workspace_id, getTaskDetails } = useTaskDetails(useTaskDetailsCallBack) |
| | | let { wsInfo, removeWS } = useDroneWS(workspace_id) //ws信息,是一个ref对象 |
| | | |
| | | provide('wsInfo', wsInfo) |
| | | provide('workspace_id', workspace_id) |
| | | provide('deviceOsdInfo', deviceOsdInfo) |
| | | provide('dockOsdInfo', wsInfo?.value?.dock_osd) |
| | | provide('dockSn', dockSn) |
| | |
| | | provide('isAiLive', isAiLive) |
| | | provide('video_id', video_id) |
| | | provide('client_id', client_id) |
| | | |
| | | let once = true |
| | | watch(deviceOsdInfo,()=>{ |
| | | if (once){ |
| | | // getLiveCapacity() |
| | | once =false |
| | | } |
| | | }) |
| | | |
| | | watch( |
| | | wsInfo, |
| | |
| | | border-radius: 4rem; |
| | | overflow: hidden; |
| | | |
| | | .centerPoint { |
| | | &:before { |
| | | content: '+'; |
| | | font-size: 30px; |
| | | color: white; |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 50%; |
| | | transform: translate(-50%, -50%); |
| | | pointer-events: none; |
| | | font-weight: bold; |
| | | text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black; /* 四方向描边 */ |
| | | } |
| | | } |
| | | |
| | | .maxBox { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | <div @click="takePictures">拍照</div> |
| | | <div @click="recordFun">{{ isRecording ? '录像中...' : '录像' }}</div> |
| | | </div> |
| | | <div class="multiCol"> |
| | | <div class="multiCol" v-if="wsInfo?.psdk_widget_values"> |
| | | <div @click="shoutFun">{{ isRecordShouting ? '喊话' : '停止喊话' }}</div> |
| | | <div @click="broadcastFun">广播</div> |
| | | </div> |
| | |
| | | import Recorder from 'js-audio-recorder'; |
| | | import dayjs from 'dayjs' |
| | | |
| | | const wsInfo = inject('wsInfo') |
| | | // 初始化喊话 |
| | | let globalShout = null |
| | | |
| | | const isRecording = ref(false) |
| | | |
| | | const list1 = ref([ |
| | |
| | | top: 50%; |
| | | transform: translateY(-60%); |
| | | width: 178px; |
| | | height: 416px; |
| | | padding: 20px 0; |
| | | background: rgba(0, 0, 0, 0.5); |
| | | backdrop-filter: blur(5px); |
| | | border-radius: 20px 20px 20px 20px; |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <BaseControl v-if="taskDetails.workspace_id" /> |
| | | <BaseControl v-if="workspace_id" /> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | |
| | | import BaseControl from '@/components/CurrentTaskDetails/ControlPanel/BaseControl.vue' |
| | | |
| | | const taskDetails = inject('taskDetails') |
| | | const workspace_id = inject('workspace_id') |
| | | |
| | | const list = ref([ |
| | | { name: '任务编号', value: '', field: 'job_info_num' }, |
| | |
| | | top: 0; |
| | | width: 297px; |
| | | height: 1002px; |
| | | background: rgba(31, 31, 31, 0.15); |
| | | background: rgba(31, 31, 31, 0.5); |
| | | backdrop-filter: blur(0.5rem); |
| | | border-radius: 0px 40px 40px 0px; |
| | | display: flex; |
| | |
| | | const today = dayjs().format('YYYY-MM-DD') |
| | | const timeArr = ref([today, today]) |
| | | const completionRateSeries = { |
| | | name: '完成率', |
| | | name: '完结率', |
| | | type: 'line', |
| | | itemStyle: { |
| | | color: '#0CEBF7', // 设置颜色 |
| | |
| | | color: '#fff', |
| | | }, |
| | | data: [ |
| | | { value: 0, name: '待审核', itemStyle: { color: '#1860EC' } }, |
| | | { value: 0, name: '待处理', itemStyle: { color: '#47D107' } }, |
| | | { value: 0, name: '已完成', itemStyle: { color: '#F29509' } }, |
| | | { value: 0, name: '待审核', itemStyle: { color: '#8CFEA7' } }, |
| | | { value: 0, name: '待处理', itemStyle: { color: '#FF7411' } }, |
| | | { value: 0, name: '处理中', itemStyle: { color: '#FFC398' } }, |
| | | { value: 0, name: '已完成', itemStyle: { color: '#AFD9FB' } }, |
| | | // { value: 0, name: '待分拨', itemStyle: { color: '#E9C81A' } }, |
| | | { value: 0, name: '处理中', itemStyle: { color: '#0FC1E8' } }, |
| | | { value: 0, name: '已完结', itemStyle: { color: '#FE577F' } }, |
| | | |
| | | { value: 0, name: '已完结', itemStyle: { color: '#11C4FF' } }, |
| | | ], |
| | | }, |
| | | ], |