|
@@ -7,110 +7,122 @@
|
|
|
<a-avatar :size="60" :src="cloudapi">
|
|
<a-avatar :size="60" :src="cloudapi">
|
|
|
</a-avatar>
|
|
</a-avatar>
|
|
|
</a-layout-sider>
|
|
</a-layout-sider>
|
|
|
- <a-layout-content style="margin-left: 1vw;" @click="showStatus">
|
|
|
|
|
|
|
+ <a-layout-content style="margin-left: 1vw;">
|
|
|
<div style="height: 50%;">
|
|
<div style="height: 50%;">
|
|
|
- <span style="font-size: 16px; font-weight: bolder">{{ workspaceName }}</span>
|
|
|
|
|
- <RightOutlined style="float: right; margin-top: 5px; color: #8894a0" />
|
|
|
|
|
|
|
+ <a-dropdown :trigger="['click']">
|
|
|
|
|
+ <span style="font-size: 16px; font-weight: bolder">{{ workspaceName }}</span>
|
|
|
|
|
+ <template #overlay>
|
|
|
|
|
+ <a-menu>
|
|
|
|
|
+ <a-menu-item key="1">
|
|
|
|
|
+ 项目编号0001
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ <a-menu-item key="2">
|
|
|
|
|
+ 项目编号0002
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ <a-menu-item key="3">
|
|
|
|
|
+ 项目编号0003
|
|
|
|
|
+ </a-menu-item>
|
|
|
|
|
+ </a-menu>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-dropdown>
|
|
|
|
|
+ <RightOutlined style="float: right; margin-top: 5px; color: #8894a0" @click="showStatus" />
|
|
|
</div>
|
|
</div>
|
|
|
<div style="height: 50%;">
|
|
<div style="height: 50%;">
|
|
|
<CloudSyncOutlined v-if="thingState === EStatusValue.CONNECTED" style="color: #75c5f6" />
|
|
<CloudSyncOutlined v-if="thingState === EStatusValue.CONNECTED" style="color: #75c5f6" />
|
|
|
- <SyncOutlined spin v-else/>
|
|
|
|
|
|
|
+ <SyncOutlined spin v-else />
|
|
|
<span style="color: #737373; margin-left: 3px;">{{ thingState }}</span>
|
|
<span style="color: #737373; margin-left: 3px;">{{ thingState }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <a-drawer placement="right" v-model:visible="drawerVisible" width="340px">
|
|
|
|
|
|
|
+ <a-drawer placement="right" v-model:visible="drawerVisible" width="340px">
|
|
|
<div class="mb10 flex-row flex-justify-center flex-align-center">
|
|
<div class="mb10 flex-row flex-justify-center flex-align-center">
|
|
|
- <p class="fz14" style="font-weight: 100;">Module State</p>
|
|
|
|
|
|
|
+ <p class="fz14" style="font-weight: 100;">
|
|
|
|
|
+ 模块状态
|
|
|
|
|
+ </p>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class= "width-100 mb10 flex-align-start" v-for="m in modules" :key="m.name" style="height: 30px;">
|
|
|
|
|
-
|
|
|
|
|
- <div class="ml5" style="float: left; color: #000000;">{{m.name}}:</div>
|
|
|
|
|
|
|
+ <div class="width-100 mb10 flex-align-start" v-for="m in modules" :key="m.name" style="height: 30px;">
|
|
|
|
|
+ <div class="ml5" style="float: left; color: #000000;">{{ m.name }}:</div>
|
|
|
<div class="ml10" style="float: right; margin-bottom: 8px;">
|
|
<div class="ml10" style="float: right; margin-bottom: 8px;">
|
|
|
- <span :key="m.state" :class="m.state.value === EStatusValue.CONNECTED ? 'green' : 'red'">{{ m.state.value }} </span>
|
|
|
|
|
- <a-button-group >
|
|
|
|
|
- <a-button class="ml5" type="primary" size="small" @click.stop="moduleInstall(m)">install</a-button>
|
|
|
|
|
- <a-button class="ml5 mr5" type="danger" size="small" @click.stop="moduleUninstall(m)">uninstall</a-button>
|
|
|
|
|
|
|
+ <span :key="m.state" :class="m.state.value === EStatusValue.CONNECTED ? 'green' : 'red'">{{
|
|
|
|
|
+ m.state.value }} </span>
|
|
|
|
|
+ <a-button-group>
|
|
|
|
|
+ <a-button class="ml5" type="primary" size="small" @click.stop="moduleInstall(m)">安装</a-button>
|
|
|
|
|
+ <a-button class="ml5 mr5" type="danger" size="small" @click.stop="moduleUninstall(m)">卸载</a-button>
|
|
|
</a-button-group>
|
|
</a-button-group>
|
|
|
</div>
|
|
</div>
|
|
|
<a-divider />
|
|
<a-divider />
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</a-drawer>
|
|
</a-drawer>
|
|
|
</a-layout-content>
|
|
</a-layout-content>
|
|
|
-
|
|
|
|
|
</a-layout>
|
|
</a-layout>
|
|
|
- <a-divider style="height: 2px; background-color: #f5f5f5; margin-top: 3vh;" />
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <a-divider style="height: 2px; background-color: #f5f5f5; margin-top: 3vh;" />
|
|
|
<a-button id="exitBtn" class="fz18" @click="confirmAgain"
|
|
<a-button id="exitBtn" class="fz18" @click="confirmAgain"
|
|
|
- style="width: 10vw; height: 10vh; position: fixed; bottom: 13vh; left: 15vw; background-color: #e6e6e6; color: red; border: 0;"
|
|
|
|
|
- type="primary">Exit
|
|
|
|
|
|
|
+ style="width: 10vw; height: 10vh; position: fixed; bottom: 13vh; left: 15vw; background-color: #e6e6e6; color: red; border: 0;"
|
|
|
|
|
+ type="primary">
|
|
|
|
|
+ 退出
|
|
|
</a-button>
|
|
</a-button>
|
|
|
<a-modal v-model:visible="exitVisible" width="300px" :closable="false">
|
|
<a-modal v-model:visible="exitVisible" width="300px" :closable="false">
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
- <a-button type="text" style="width: 48%; float: left;" @click="onBack">Cancel</a-button>
|
|
|
|
|
- <a-button type="text" style="width: 48%;" @click="onExit">Exit</a-button>
|
|
|
|
|
|
|
+ <a-button type="text" style="width: 48%; float: left;" @click="onBack">取消</a-button>
|
|
|
|
|
+ <a-button type="text" style="width: 48%;" @click="onExit">确定</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
- <p>Data will not be synchronized between DJI Pilot and this server after exiting.</p>
|
|
|
|
|
|
|
+ <p>退出后,大疆无人机与该服务器之间的数据将不会同步</p>
|
|
|
</a-modal>
|
|
</a-modal>
|
|
|
</div>
|
|
</div>
|
|
|
</a-layout-sider>
|
|
</a-layout-sider>
|
|
|
<a-layout-content class="right flex-column">
|
|
<a-layout-content class="right flex-column">
|
|
|
<div class="mb5">
|
|
<div class="mb5">
|
|
|
- <span class="ml5" style="color: #939393;">Serial Number</span>
|
|
|
|
|
|
|
+ <span class="ml5" style="color: #939393;">序列号</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="fz16" style="background-color: white; border-radius: 4px;">
|
|
<div class="fz16" style="background-color: white; border-radius: 4px;">
|
|
|
<a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle">
|
|
<a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle">
|
|
|
<a-col :span="1"></a-col>
|
|
<a-col :span="1"></a-col>
|
|
|
- <a-col :span="9">
|
|
|
|
|
- Remote Control Sn
|
|
|
|
|
- </a-col>
|
|
|
|
|
|
|
+ <a-col :span="9">
|
|
|
|
|
+ 遥控器SN
|
|
|
|
|
+ </a-col>
|
|
|
<a-col :span="13" class="flex-align-end flex-column">
|
|
<a-col :span="13" class="flex-align-end flex-column">
|
|
|
<span style="color: #737373">{{ device.data.gateway_sn }}</span>
|
|
<span style="color: #737373">{{ device.data.gateway_sn }}</span>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
- <a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" v-if="device.data.online_status && device.data.sn">
|
|
|
|
|
|
|
+ <a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle"
|
|
|
|
|
+ v-if="device.data.online_status && device.data.sn">
|
|
|
<a-col :span="1"></a-col>
|
|
<a-col :span="1"></a-col>
|
|
|
<a-col :span="9">Aircraft Sn</a-col>
|
|
<a-col :span="9">Aircraft Sn</a-col>
|
|
|
- <a-col :span="13" class="flex-align-end flex-column" >
|
|
|
|
|
|
|
+ <a-col :span="13" class="flex-align-end flex-column">
|
|
|
<span style="color: #737373">{{ device.data.sn }}</span>
|
|
<span style="color: #737373">{{ device.data.sn }}</span>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="mt5 mb5">
|
|
<div class="mt5 mb5">
|
|
|
- <span class="ml5" style="color: #939393;">Settings</span>
|
|
|
|
|
|
|
+ <span class="ml5" style="color: #939393;">设置</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="fz16" style="background-color: white; border-radius: 4px;">
|
|
<div class="fz16" style="background-color: white; border-radius: 4px;">
|
|
|
- <a-row v-if="device.data.online_status && device.data.sn" style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" @click="bindingDevice">
|
|
|
|
|
|
|
+ <a-row v-if="device.data.online_status && device.data.sn"
|
|
|
|
|
+ style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" @click="bindingDevice">
|
|
|
<a-col :span="1"></a-col>
|
|
<a-col :span="1"></a-col>
|
|
|
<a-col :span="11">
|
|
<a-col :span="11">
|
|
|
- Device Binding
|
|
|
|
|
|
|
+ 设备绑定
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="10" style="text-align: right">
|
|
<a-col :span="10" style="text-align: right">
|
|
|
<span v-if="device.data.bound_status" style="color: #737373">Aircraft bound</span>
|
|
<span v-if="device.data.bound_status" style="color: #737373">Aircraft bound</span>
|
|
|
<span v-else style="color: #737373">Aircraft not bound</span>
|
|
<span v-else style="color: #737373">Aircraft not bound</span>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="2" class="flex-align-center flex-column" >
|
|
|
|
|
|
|
+ <a-col :span="2" class="flex-align-center flex-column">
|
|
|
<RightOutlined style="color: #8894a0; font-size: 20px;" />
|
|
<RightOutlined style="color: #8894a0; font-size: 20px;" />
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
<a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" @click="onMediaSetting">
|
|
<a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" @click="onMediaSetting">
|
|
|
<a-col :span="1"></a-col>
|
|
<a-col :span="1"></a-col>
|
|
|
<a-col :span="21">
|
|
<a-col :span="21">
|
|
|
- Media File Upload
|
|
|
|
|
|
|
+ 上传媒体
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- <a-col :span="2" class="flex-align-center flex-column" >
|
|
|
|
|
|
|
+ <a-col :span="2" class="flex-align-center flex-column">
|
|
|
<RightOutlined style="color: #8894a0; font-size: 20px;" />
|
|
<RightOutlined style="color: #8894a0; font-size: 20px;" />
|
|
|
</a-col>
|
|
</a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
<a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" @click="onLiveshareSetting">
|
|
<a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" @click="onLiveshareSetting">
|
|
|
<a-col :span="1"></a-col>
|
|
<a-col :span="1"></a-col>
|
|
|
- <a-col :span="21">Livestream Manually</a-col>
|
|
|
|
|
- <a-col :span="2" class="flex-align-center flex-column">
|
|
|
|
|
- <RightOutlined style="color: #8894a0; font-size: 20px;" />
|
|
|
|
|
|
|
+ <a-col :span="21">
|
|
|
|
|
+ 手动直播
|
|
|
</a-col>
|
|
</a-col>
|
|
|
- </a-row>
|
|
|
|
|
- <a-row style="border-bottom: 1px solid #f4f8f9; height: 45px;" align="middle" @click="onOpen3rdApp">
|
|
|
|
|
- <a-col :span="1"></a-col>
|
|
|
|
|
- <a-col :span="21">Open 3rd Party APP</a-col>
|
|
|
|
|
<a-col :span="2" class="flex-align-center flex-column">
|
|
<a-col :span="2" class="flex-align-center flex-column">
|
|
|
<RightOutlined style="color: #8894a0; font-size: 20px;" />
|
|
<RightOutlined style="color: #8894a0; font-size: 20px;" />
|
|
|
</a-col>
|
|
</a-col>
|
|
@@ -120,15 +132,14 @@
|
|
|
</a-layout>
|
|
</a-layout>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { message, Popconfirm } from 'ant-design-vue'
|
|
|
|
|
-import { onMounted, onUnmounted, reactive, ref, watch } from 'vue'
|
|
|
|
|
-import { CURRENT_CONFIG } from '/@/api/http/config'
|
|
|
|
|
|
|
+import { message } from 'ant-design-vue'
|
|
|
|
|
+import { onMounted, reactive, ref } from 'vue'
|
|
|
import { BindBody, bindDevice, getDeviceBySn, getPlatformInfo, getUserInfo } from '/@/api/manage'
|
|
import { BindBody, bindDevice, getDeviceBySn, getPlatformInfo, getUserInfo } from '/@/api/manage'
|
|
|
import apiPilot, { ApiParam, MapParam, ThingParam, WsParam } from '/@/api/pilot-bridge'
|
|
import apiPilot, { ApiParam, MapParam, ThingParam, WsParam } from '/@/api/pilot-bridge'
|
|
|
import { getRoot } from '/@/root'
|
|
import { getRoot } from '/@/root'
|
|
|
import { EBizCode, EComponentName, EDownloadOwner, ELocalStorageKey, ERouterName, EStatusValue } from '/@/types'
|
|
import { EBizCode, EComponentName, EDownloadOwner, ELocalStorageKey, ERouterName, EStatusValue } from '/@/types'
|
|
|
import cloudapi from '/@/assets/icons/cloudapi.png'
|
|
import cloudapi from '/@/assets/icons/cloudapi.png'
|
|
|
-import { RightOutlined, CloudOutlined, CloudSyncOutlined, SyncOutlined } from '@ant-design/icons-vue'
|
|
|
|
|
|
|
+import { SwapOutlined, RightOutlined, CloudSyncOutlined, SyncOutlined } from '@ant-design/icons-vue'
|
|
|
import { useMyStore } from '/@/store'
|
|
import { useMyStore } from '/@/store'
|
|
|
import { DeviceStatus } from '/@/types/device'
|
|
import { DeviceStatus } from '/@/types/device'
|
|
|
import { useConnectWebSocket } from '/@/hooks/use-connect-websocket'
|
|
import { useConnectWebSocket } from '/@/hooks/use-connect-websocket'
|
|
@@ -400,7 +411,7 @@ const showStatus = async () => {
|
|
|
drawerVisible.value = true
|
|
drawerVisible.value = true
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function setWorkspaceInfo () {
|
|
|
|
|
|
|
+function setWorkspaceInfo() {
|
|
|
if (localStorage.getItem(ELocalStorageKey.WorkspaceName)) {
|
|
if (localStorage.getItem(ELocalStorageKey.WorkspaceName)) {
|
|
|
apiPilot.setPlatformMessage(
|
|
apiPilot.setPlatformMessage(
|
|
|
'' + localStorage.getItem(ELocalStorageKey.PlatformName),
|
|
'' + localStorage.getItem(ELocalStorageKey.PlatformName),
|
|
@@ -427,7 +438,7 @@ function setWorkspaceInfo () {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function refreshStatus () {
|
|
|
|
|
|
|
+function refreshStatus() {
|
|
|
thingState.value = apiPilot.thingGetConnectState() ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
thingState.value = apiPilot.thingGetConnectState() ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
|
apiState.value = apiPilot.isComponentLoaded(EComponentName.Api) ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
apiState.value = apiPilot.isComponentLoaded(EComponentName.Api) ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
|
liveState.value = apiPilot.isComponentLoaded(EComponentName.Liveshare) ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
liveState.value = apiPilot.isComponentLoaded(EComponentName.Liveshare) ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
@@ -440,7 +451,7 @@ function refreshStatus () {
|
|
|
waylineState.value = apiPilot.isComponentLoaded(EComponentName.Mission) ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
waylineState.value = apiPilot.isComponentLoaded(EComponentName.Mission) ? EStatusValue.CONNECTED : EStatusValue.DISCONNECT
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function moduleInstall (m: any) {
|
|
|
|
|
|
|
+function moduleInstall(m: any) {
|
|
|
let param
|
|
let param
|
|
|
switch (m.module) {
|
|
switch (m.module) {
|
|
|
case EComponentName.Thing:
|
|
case EComponentName.Thing:
|
|
@@ -476,13 +487,13 @@ function moduleInstall (m: any) {
|
|
|
refreshStatus()
|
|
refreshStatus()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function moduleUninstall (m: any) {
|
|
|
|
|
|
|
+function moduleUninstall(m: any) {
|
|
|
message.info('uninstall ' + m.module)
|
|
message.info('uninstall ' + m.module)
|
|
|
apiPilot.unloadComponent(m.module)
|
|
apiPilot.unloadComponent(m.module)
|
|
|
refreshStatus()
|
|
refreshStatus()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function getDeviceInfo () {
|
|
|
|
|
|
|
+function getDeviceInfo() {
|
|
|
if (!device.data.sn || device.data.sn === EStatusValue.DISCONNECT) {
|
|
if (!device.data.sn || device.data.sn === EStatusValue.DISCONNECT) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -501,18 +512,21 @@ function getDeviceInfo () {
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
@import '/@/styles/index.scss';
|
|
@import '/@/styles/index.scss';
|
|
|
|
|
+
|
|
|
.page {
|
|
.page {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
transition: width 0.2s ease;
|
|
transition: width 0.2s ease;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
|
+
|
|
|
.left {
|
|
.left {
|
|
|
height: 90%;
|
|
height: 90%;
|
|
|
background-color: white;
|
|
background-color: white;
|
|
|
margin-top: 6vh;
|
|
margin-top: 6vh;
|
|
|
margin-left: 2vh;
|
|
margin-left: 2vh;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.right {
|
|
.right {
|
|
|
height: 90%;
|
|
height: 90%;
|
|
|
margin-top: 6vh;
|
|
margin-top: 6vh;
|
|
@@ -520,12 +534,15 @@ function getDeviceInfo () {
|
|
|
margin-right: 5vh;
|
|
margin-right: 5vh;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.green {
|
|
.green {
|
|
|
color: green
|
|
color: green
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.red {
|
|
.red {
|
|
|
color: red;
|
|
color: red;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#exitBtn:hover :active {
|
|
#exitBtn:hover :active {
|
|
|
background-color: rgb(77, 75, 75);
|
|
background-color: rgb(77, 75, 75);
|
|
|
width: 10vw;
|
|
width: 10vw;
|
|
@@ -535,5 +552,4 @@ function getDeviceInfo () {
|
|
|
left: 15vw;
|
|
left: 15vw;
|
|
|
line-height: 10vh;
|
|
line-height: 10vh;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</style>
|
|
</style>
|