Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

S0025136190 1 éve
szülő
commit
426c0611fa

+ 98 - 20
Web/src/components/airport/components/InfoModal.vue

@@ -197,25 +197,83 @@
           </div>
           <div class="content-aircraft-head-right-select">
             <div v-if="state.deviceLiveVisible">
-              <a-select style="width: 125px;margin-right: 5px;" placeholder="摄像头"
-                v-model:value="deviceLive.cameraValue">
-                <a-select-option v-for="item in deviceLive.cameraList" :key="item.value" :value="item.value"
-                  @click="onDeviceCameraSelect(item)">
-                  {{ item.label }}
-                </a-select-option>
-              </a-select>
-              <a-select style="width: 125px;margin-right: 5px;" placeholder="清晰度"
-                v-model:value="deviceLive.clarityValue">
-                <a-select-option v-for="item in clarityList" :key="item.value" :value="item.value">
-                  {{ item.label }}
-                </a-select-option>
-              </a-select>
-              <a-tooltip title="播放">
-                <a-button style="margin-right: 5px;" :icon="h(PlaySquareOutlined)" @click="onDeviceStartLive" />
-              </a-tooltip>
-              <a-tooltip title="停止">
-                <a-button :icon="h(PoweroffOutlined)" @click="onDeviceStopLive" />
-              </a-tooltip>
+              <div style="display: flex;">
+                <a-select style="width: 125px;margin-right: 5px;" placeholder="摄像头"
+                  v-model:value="deviceLive.cameraValue">
+                  <a-select-option v-for="item in deviceLive.cameraList" :key="item.value" :value="item.value"
+                    @click="onDeviceCameraSelect(item)">
+                    {{ item.label }}
+                  </a-select-option>
+                </a-select>
+                <a-select style="width: 125px;margin-right: 5px;" placeholder="清晰度"
+                  v-model:value="deviceLive.clarityValue">
+                  <a-select-option v-for="item in clarityList" :key="item.value" :value="item.value">
+                    {{ item.label }}
+                  </a-select-option>
+                </a-select>
+                <a-tooltip title="播放">
+                  <a-button style="margin-right: 5px;" :icon="h(PlaySquareOutlined)" @click="onDeviceStartLive" />
+                </a-tooltip>
+                <a-tooltip title="停止">
+                  <a-button :icon="h(PoweroffOutlined)" @click="onDeviceStopLive" />
+                </a-tooltip>
+              </div>
+              <div v-if="false">
+                <div style="display: flex;margin-top: 10px;">
+                  <a-select style="width: 120px;margin-right: 5px;" placeholder="相机类型"
+                    v-model:value="payload.camera_type">
+                    <a-select-option value="wide">
+                      广角
+                    </a-select-option>
+                    <a-select-option value="zoom">
+                      变焦
+                    </a-select-option>
+                  </a-select>
+                  <a-select style="width: 120px;margin-right: 5px;" placeholder="重置云台"
+                    v-model:value="payload.reset_mode">
+                    <a-select-option :value="0">
+                      回中
+                    </a-select-option>
+                    <a-select-option :value="1">
+                      向下
+                    </a-select-option>
+                    <a-select-option :value="2">
+                      偏航回中
+                    </a-select-option>
+                    <a-select-option :value="3">
+                      俯仰向下
+                    </a-select-option>
+                  </a-select>
+                  <a-select style="width: 120px;" placeholder="相机模式" v-model:value="payload.camera_mode">
+                    <a-select-option :value="0">
+                      拍照
+                    </a-select-option>
+                    <a-select-option :value="1">
+                      录像
+                    </a-select-option>
+                    <a-select-option :value="3">
+                      全景拍照
+                    </a-select-option>
+                  </a-select>
+                </div>
+                <div style="display: flex;align-items: center;padding-left: 10px;margin-top: 10px;">
+                  <a-slider style="width: 200px;" :marks="payload.marks" :included="false" :min="2" :max="56"
+                    v-model:value="payload.zoom_factor" />
+                  <div style="margin-left: 40px;">
+                    <a-tooltip title="拍摄" v-if="payload.camera_mode === 1">
+                      <div style="text-align: center;">
+                        <img style="width:40px;height:40px;cursor: pointer;" :src="videoSrc">
+                        <div style="margin-top: 5px;">
+                          00:00
+                        </div>
+                      </div>
+                    </a-tooltip>
+                    <a-tooltip title="拍摄" v-else>
+                      <img style="width: 40px;height:40px;cursor: pointer;" :src="pictureSrc">
+                    </a-tooltip>
+                  </div>
+                </div>
+              </div>
             </div>
           </div>
         </div>
@@ -364,7 +422,7 @@
 </template>
 
 <script lang="ts" setup>
-import { h, computed, reactive, onMounted } from 'vue';
+import { h, computed, reactive, ref, onMounted } from 'vue';
 import { message } from 'ant-design-vue';
 import { CloseOutlined, PlaySquareOutlined, PoweroffOutlined } from '@ant-design/icons-vue'
 import LivePlayer from '/@/components/livePlayer/index.vue';
@@ -382,6 +440,8 @@ import actionSrc from '../icons/info/action.svg';
 import actionSelectedSrc from '../icons/info/action_selected.svg';
 import aircraftSrc from '../icons/aircraft.svg';
 import aircraftSelectedSrc from '../icons/aircraft_selected.svg';
+import pictureSrc from '../icons/info/picture.png';
+import videoSrc from '../icons/info/video.png';
 import controllerSrc from '../icons/info/controller.svg';
 import controllerErrorSrc from '../icons/info/controllerError.svg';
 import fourGSrc from '../icons/info/fourG.svg';
@@ -674,6 +734,20 @@ const deviceLive: DeviceLive = reactive({
   playerUrl: '',
 })
 
+const payload = reactive({
+  camera_type: 'wide',// 相机类型
+  reset_mode: 0,// 重置云台
+  camera_mode: 0,// 相机模式
+  marks: {
+    2: '2倍',
+    14: '14倍',
+    28: '28倍',
+    42: '42倍',
+    56: '56倍',
+  },
+  zoom_factor: 2,// 变焦倍数
+});
+
 const fetchLiveCapacity = async () => {
   try {
     const res = await getLiveCapacity({});
@@ -1210,5 +1284,9 @@ const onClickReturnHome = async () => {
       background-color: #3a3a3a;
     }
   }
+
+  .ant-slider-mark-text {
+    color: #FFFFFF;
+  }
 }
 </style>

BIN
Web/src/components/airport/icons/info/picture.png


BIN
Web/src/components/airport/icons/info/video.png


+ 1 - 1
Web/src/components/flight-area/FlightAreaDevicePanel.vue

@@ -167,7 +167,7 @@ const syncDeviceFlightArea = () => {
   })
   syncFlightArea(keys).then(res => {
     if (res.code === 0) {
-      message.success('The devices are synchronizing...')
+      message.success('设备正在同步中...')
       selectedDocksMap.value = {}
     }
   }).finally(() => setTimeout(() => {

+ 4 - 3
Web/src/components/g-map/DroneControlPanel.vue

@@ -311,8 +311,9 @@ const props = defineProps<{
 }>()
 
 const store = useMyStore()
+
 const clientId = computed(() => {
-  return store.state.clientId
+  return store.state.clientId;
 })
 
 const initCmdList = baseCmdList.map(cmdItem => Object.assign({}, cmdItem))
@@ -503,7 +504,7 @@ async function enterFlightControl() {
       if (droneControlSource.value !== ControlSource.A) {
         await postFlightAuth(props.sn)
       }
-      message.success('Get flight control successfully')
+      message.success('成功进入远程控制')
     }
   } catch (error: any) {
   }
@@ -520,7 +521,7 @@ async function exitFlightCOntrol() {
       flightController.value = false
       deviceTopicInfo.subTopic = ''
       deviceTopicInfo.pubTopic = ''
-      message.success('退出飞行控制')
+      message.success('成功退出远程控制')
     }
   } catch (error: any) {
   }

+ 2 - 3
Web/src/components/g-map/use-connect-mqtt.ts

@@ -29,7 +29,7 @@ export function useConnectMqtt() {
       if (mqttState.value) return
       const result = await postDrc({})
       if (result?.code === 0) {
-        const { address, client_id, username, password, expire_time } = result.data
+        const { address, client_id, username, password, expire_time } = result.data;
         // @TODO: 校验 expire_time
         mqttState.value = new UranusMqtt(address, {
           clientId: client_id,
@@ -40,9 +40,8 @@ export function useConnectMqtt() {
         mqttState.value?.on('onStatus', (statusOptions: StatusOptions) => {
           // @TODO: 异常case
         })
-
         store.commit('SET_MQTT_STATE', mqttState.value)
-        store.commit('SET_CLIENT_ID', client_id)
+        store.commit('SET_CLIENT_ID', client_id);
       }
       // @TODO: 认证失败case
       return

+ 2 - 2
Web/src/components/g-map/use-drone-control.ts

@@ -19,14 +19,14 @@ export function useDroneControl () {
   async function stopFlyToPoint (sn: string) {
     const { code } = await deleteFlyToPoint(sn)
     if (code === 0) {
-      message.success('Stop fly to')
+      message.success('中止 Fly to')
     }
   }
 
   async function takeoffToPoint (sn: string, body: PostTakeoffToPointBody) {
     const { code } = await postTakeoffToPoint(sn, body)
     if (code === 0) {
-      message.success('Take off successfully')
+      message.success('一键起飞成功')
     }
   }
 

+ 1 - 8
Web/src/components/g-map/use-manual-control.ts

@@ -1,9 +1,4 @@
-import {
-  ref,
-  onUnmounted,
-  watch,
-  Ref,
-} from 'vue'
+import { ref, onUnmounted, watch, Ref } from 'vue'
 import { message } from 'ant-design-vue'
 import {
   DRC_METHOD,
@@ -48,8 +43,6 @@ export function useManualControl(deviceTopicInfo: DeviceTopicInfo, isCurrentFlig
   }
 
   function handleKeyup(keyCode: KeyCode) {
-    console.log(213);
-
     if (!deviceTopicInfo.pubTopic) {
       message.error('请确保已经建立DRC链路')
       return

+ 7 - 7
Web/src/components/g-map/use-payload-control.ts

@@ -24,7 +24,7 @@ export function usePayloadControl () {
       payload_index: payloadIndx
     })
     if (code === 0) {
-      message.success('Get Payload Control successfully')
+      message.success('获取负载控制成功')
       return true
     }
     return false
@@ -36,7 +36,7 @@ export function usePayloadControl () {
       data: data
     })
     if (code === 0) {
-      message.success('Gimbal Reset successfully')
+      message.success('重置云台成功')
     }
   }
 
@@ -46,7 +46,7 @@ export function usePayloadControl () {
       data: data
     })
     if (code === 0) {
-      message.success('Camera Mode Switch successfully')
+      message.success('切换相机模式成功')
     }
   }
 
@@ -58,7 +58,7 @@ export function usePayloadControl () {
       }
     })
     if (code === 0) {
-      message.success('Take Photo successfully')
+      message.success('拍照成功')
     }
   }
 
@@ -70,7 +70,7 @@ export function usePayloadControl () {
       }
     })
     if (code === 0) {
-      message.success('Start Recording successfully')
+      message.success('开始录像')
     }
   }
 
@@ -82,7 +82,7 @@ export function usePayloadControl () {
       }
     })
     if (code === 0) {
-      message.success('Stop Recording successfully')
+      message.success('结束录像')
     }
   }
 
@@ -92,7 +92,7 @@ export function usePayloadControl () {
       data: data,
     })
     if (code === 0) {
-      message.success('Zoom successfully')
+      message.success('变焦相机切换成功')
     }
   }
 

+ 4 - 4
Web/src/components/task/TaskPanel.vue

@@ -267,7 +267,7 @@ async function onDeleteTask(jobId: string) {
     job_id: jobId
   })
   if (code === 0) {
-    message.success('Deleted successfully')
+    message.success('删除任务成功')
     getPlans()
   }
 }
@@ -279,7 +279,7 @@ async function onSuspendTask(jobId: string) {
     status: UpdateTaskStatus.Suspend
   })
   if (code === 0) {
-    message.success('Suspended successfully')
+    message.success('挂起任务成功')
     getPlans()
   }
 }
@@ -291,7 +291,7 @@ async function onResumeTask(jobId: string) {
     status: UpdateTaskStatus.Resume
   })
   if (code === 0) {
-    message.success('Resumed successfully')
+    message.success('恢复挂起任务')
     getPlans()
   }
 }
@@ -300,7 +300,7 @@ async function onResumeTask(jobId: string) {
 async function onUploadMediaFileNow(jobId: string) {
   const { code } = await uploadMediaFileNow(getWorkspaceId(), jobId)
   if (code === 0) {
-    message.success('Upload Media File successfully')
+    message.success('上传媒体文件成功')
     getPlans()
   }
 }

+ 2 - 2
Web/src/pages/page-web/projects/wayline.vue

@@ -165,7 +165,7 @@ function showWaylineTip(waylineId: string) {
 function deleteWayline() {
   deleteWaylineFile(getWorkspaceId(), deleteWaylineId.value).then(res => {
     if (res.code === 0) {
-      message.success('Wayline file deleted')
+      message.success('删除航线文件成功')
     }
     deleteWaylineId.value = ''
     deleteTip.value = false
@@ -226,7 +226,7 @@ const uploadFile = async () => {
     fileData.append('file', file, file.name)
     await importKmzFile(getWorkspaceId(), fileData).then((res) => {
       if (res.code === 0) {
-        message.success(`${file.name} file uploaded successfully`)
+        message.success(`${file.name} 文件已上传成功`)
         canRefresh.value = true
         pagination.total = 0
         pagination.page = 1