diff --git a/.env.development b/.env.development index 130d28f..3c4befe 100644 --- a/.env.development +++ b/.env.development @@ -7,6 +7,10 @@ VITE_APP_ENV = 'development' # 开发环境 VITE_APP_BASE_API = 'http://192.168.110.8:8899' +# 无人机接口地址 + +VITE_APP_BASE_DRONE_API = 'http://192.168.110.8:9136' + # 应用访问路径 例如使用前缀 /admin/ VITE_APP_CONTEXT_PATH = '/' diff --git a/index.html b/index.html index 62132b4..d1d62af 100644 --- a/index.html +++ b/index.html @@ -210,6 +210,7 @@ + diff --git a/package.json b/package.json index e71cc07..c8c9d9e 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,9 @@ "js-cookie": "3.0.5", "js-md5": "^0.8.3", "jsencrypt": "3.3.2", + "jszip": "^3.10.1", + "lodash": "^4.17.21", + "md5": "^2.3.0", "mitt": "^3.0.1", "nprogress": "0.2.0", "ol": "^10.5.0", diff --git a/src/api/air/index.ts b/src/api/air/index.ts new file mode 100644 index 0000000..0804f13 --- /dev/null +++ b/src/api/air/index.ts @@ -0,0 +1,430 @@ +import { request } from '../../utils/requset2.js'; + +// 开关空调 +export function airConditionerModeSwitch(data) { + return request({ + url: '/dj/remote/debug/airConditionerModeSwitch', + method: 'post', + data + }); +} +// 生成航线文件 +export function waypoint(data) { + return request({ + url: '/dj/router/waypoint', + method: 'post', + data + }); +} +// 创建任务 /dj/task/create +export function taskCreate(data) { + return request({ + url: '/dj/missions/create', + method: 'post', + data + }); +} +// 下发任务 /dj/flightTaskPrepare +export function flightTaskPrepare(data) { + return request({ + url: '/dj/flightTaskPrepare', + method: 'post', + data + }); +} +// 执行任务 +export function flightTaskExecute(data) { + return request({ + url: '/dj/flightTaskExecute', + method: 'post', + data + }); +} + +// 取消任务 +export function flightTaskUndo(data) { + return request({ + url: '/dj/flightTaskUndo', + method: 'post', + data + }); +} + +// 恢复航线 +export function flightTaskRecovery(data) { + return request({ + url: '/dj/flightTaskRecovery', + method: 'post', + data + }); +} + +// 恢复航线 +export function flightTaskPause(data) { + return request({ + url: '/dj/flightTaskPause', + method: 'post', + data + }); +} + +// 一键返航 +export function returnHome(data) { + return request({ + url: '/dj/returnHome', + method: 'post', + data + }); +} + +// 无参飞行指令 +export function noDataFlight(data) { + return request({ + url: '/dj/cmdFly/noDataFlight', + method: 'post', + data + }); +} + +// 有参飞行指令 +export function hasDataFlight(data) { + return request({ + url: '/dj/cmdFly/hasDataFlight', + method: 'post', + data + }); +} +// 开启指令 +export function drcModeEnte(data) { + return request({ + url: '/dj/cmdFly/drcModeEnter', + method: 'post', + data + }); +} + +// 查询航线文件信息列表 +export function listPaths(query) { + return request({ + url: '/system/paths/list', + method: 'get', + params: query + }); +} + +// 删除航线文件信息 +export function delPaths(id) { + return request({ + url: '/system/paths/' + id, + method: 'delete' + }); +} + +// 查询任务列表 +export function listTasks(query) { + return request({ + url: '/system/tasks/list', + method: 'get', + params: query + }); +} + +// 查询无人机任务列表 +export function listMissions(query) { + return request({ + url: '/system/missions/list', + method: 'get', + params: query + }); +} + +// 删除无人机任务 +export function delMissions(id) { + return request({ + url: '/system/missions/' + id, + method: 'delete' + }); +} + +// 远程调试 +export function remoteDebug(data) { + return request({ + url: '/dj/remote/debug/service', + method: 'post', + data + }); +} +// 增强图传 +export function sdrWorkmodeSwitch(data) { + return request({ + url: '/dj/remote/debug/sdrWorkmodeSwitch', + method: 'post', + data + }); +} + +// 查询视频设备列表 +export function listInfo(query) { + return request({ + url: '/system/info/list', + method: 'get', + params: query + }); +} +// 登录 +export function login(data) { + return request({ + url: '/login', + headers: { + isToken: false, + repeatSubmit: false + }, + method: 'post', + data: data + }); +} + +// 获取文件 +export function getFileByflightId(data) { + return request({ + url: '/dj/getFileByflightId', + method: 'post', + data + }); +} + +// 机场列表 +export function droneList(data) { + return request({ + url: '/system/drone/list', + method: 'get', + data + }); +} + +// 监听网关 +export function gatewaysAdd(data) { + return request({ + url: '/dj/gateways/add', + method: 'post', + data + }); +} + +// 关闭网关 +export function gatewaysRemove(data) { + return request({ + url: '/dj/gateways/remove', + method: 'delete', + data + }); +} + +// 添加航线 +export function routerAdd(data) { + return request({ + url: '/dj/router/add', + method: 'post', + data + }); +} + +// 复制航线 /dj/router/copy/{id} +export function routerCopy(id) { + return request({ + url: '/dj/router/copy/' + id, + method: 'post' + }); +} +// 重命名文件 + +export function routerRename(data) { + return request({ + url: '/dj/router/rename', + method: 'post', + data + }); +} +// 获取文件 +export function takeoffList(data) { + return request({ + url: '/system/takeoff/list', + method: 'get', + data + }); +} + +// 切换直播流 +export function liveChange(data) { + return request({ + url: '/dj/live/change', + method: 'post', + data + }); +} + +// 设置清晰度 /dj/live/quality +export function liveChangeQuality(data) { + return request({ + url: '/dj/live/quality', + method: 'post', + data + }); +} + +// 开启直播 +export function liveStart(data) { + return request({ + url: '/dj/live/start', + method: 'post', + data + }); +} +// 关闭直播 +export function liveStop(data) { + return request({ + url: '/dj/live/stop', + method: 'post', + data + }); +} +// 静音模式开关 +export function propertySet(data) { + return request({ + url: '/property/set', + method: 'post', + data + }); +} + +// 直播相机切换 +export function cameraChange(data) { + return request({ + url: '/dj/live/camera/change', + method: 'post', + data + }); +} + +// 新建计划 +export function taskAdd(data) { + return request({ + url: '/dj/task/add', + method: 'post', + data + }); +} + +// 计划列表 +export function taskList(data) { + return request({ + url: '/dj/task/list', + method: 'get', + params: data + }); +} +// 新暂停 +export function flightTaskPauseNew(data) { + return request({ + url: '/dj/task/flightTaskPause', + method: 'post', + data + }); +} +// 新恢复 +export function flightTaskRecoveryNew(data) { + return request({ + url: '/dj/task/flightTaskRecovery', + method: 'post', + data + }); +} +// 取消任务 +export function flightTaskUndoNew(data) { + return request({ + url: '/dj/task/flightTaskUndo', + method: 'post', + data + }); +} +// 一键返航 post +export function returnHomeNew(data) { + return request({ + url: '/dj/task/returnHome', + method: 'post', + data + }); +} +// 删除 +export function delMissionsNew(id) { + return request({ + url: '/system/new/missions/' + id, + method: 'delete' + }); +} + +// drc飞行控制 /dj/cmdFly/droneControl +export function droneControl(data) { + return request({ + url: '/dj/cmdFly/droneControl', + method: 'post', + data + }); +} + +// drc急停 /dj/cmdFly/droneEmergencyStop +export function droneEmergencyStop(data) { + return request({ + url: '/dj/cmdFly/droneEmergencyStop', + method: 'post', + data + }); +} + +// 取消返航 /dj/returnHomeCancel +export function returnHomeCancel(data) { + return request({ + url: '/dj/returnHomeCancel', + method: 'post', + data + }); +} + +// 导入航线 +export function returnImport(data) { + return request({ + url: '/dj/router/import', + method: 'post', + data, + headers: { + 'Content-Type': 'multipart/form-data' + } + }); +} + +// DRC心跳 +export function heartBeat(data) { + return request({ + url: '/dj/cmdFly/heartBeat', + method: 'post', + data + }); +} + +// AI识别 +export function aiInfo(data) { + return request({ + url: '/minio/ai/info', + method: 'get', + params: data + }); +} + +// 当前最新任务 +export function getLatest(data) { + return request({ + url: '/dj/task/getLatest', + method: 'get', + params: data + }); +} diff --git a/src/api/fileMangement/index.ts b/src/api/fileMangement/index.ts new file mode 100644 index 0000000..4c7b9df --- /dev/null +++ b/src/api/fileMangement/index.ts @@ -0,0 +1,118 @@ +import { request } from '../../utils/requset2'; +// 获取文件列表 +export function getFiles(data) { + return request({ + url: '/minio/file', + method: 'get', + data, + params: data + }); +} +// 获取ai文件列表 +export function getAiFiles(data) { + return request({ + url: '/minio/ai/file', + method: 'get', + data, + params: data + }); +} +// 获取文件信息 +export function getInfo(data) { + return request({ + url: '/minio/info', + method: 'get', + data, + params: data, + timeout: 30000 + }); +} +// 获取ai文件信息 +export function getAiInfo(data) { + return request({ + url: '/minio/ai/info', + method: 'get', + data, + params: data, + timeout: 30000 + }); +} +// 下载文件 +export function fileDownload(params, onProgress) { + return request({ + url: '/minio/download', + method: 'post', + params, + responseType: 'blob', + timeout: 0, + // header: { + // "Content-Length": Buffer.byteLength(JSON.stringify(params)), + // }, + onDownloadProgress: (progressEvent) => { + if (onProgress && typeof onProgress === 'function') { + const { loaded, total } = progressEvent; + console.log('progressEvent', progressEvent); + const percentage = Math.round((loaded / total) * 100); // 计算百分比 + onProgress(percentage); // 调用传入的 onProgress 回调函数 + } + } + }); +} +// 删除文件 +export function deleteFile(data) { + return request({ + url: '/minio/deleteBatch', + method: 'delete', + data, + timeout: 0 + }); +} +// 删除ai文件 +export function deleteAiFile(data) { + return request({ + url: '/minio/ai/deleteBatch', + method: 'delete', + data, + timeout: 0 + }); +} +// 批量下载文件或目录 +export function downloadBatch(data, onProgress) { + return request({ + url: '/minio/downloadBatch', + method: 'post', + responseType: 'blob', + data, + timeout: 0, + onDownloadProgress: (progressEvent) => { + if (onProgress && typeof onProgress === 'function') { + const { loaded, total } = progressEvent; + console.log('progressEvent', progressEvent); + const percentage = Math.round((loaded / total) * 100); // 计算百分比 + onProgress(percentage); // 调用传入的 onProgress 回调函数 + } + } + }); +} + +// 获取某个目录下面的所有文件的URL列表 +export function getUrlList(data) { + return request({ + url: '/minio/urlList', + method: 'post', + data, + params: data, + timeout: 0 + }); +} +// 获取某个目录下面的所有文件的URL列表 + +export function getAiUrlList(data) { + return request({ + url: '/minio/ai/urlList', + method: 'post', + data, + params: data, + timeout: 0 + }); +} diff --git a/src/api/gis/index.ts b/src/api/gis/index.ts index 5413341..e6c9de9 100644 --- a/src/api/gis/index.ts +++ b/src/api/gis/index.ts @@ -9,7 +9,8 @@ import { projectNewsVO, safetyInspectionVO, projectNewsDetailVO, - weatherVO + weatherVO, + safetyDayVO } from './type'; /** * 查询大屏质量信息 @@ -120,3 +121,16 @@ export const getweatherList = (id?: string): AxiosPromise => { method: 'get' }); }; + +/** + * 查询项目安全天数 + * @param query + * @returns {*} + */ + +export const getSafetyDay = (id?: string): AxiosPromise => { + return request({ + url: '/project/project/safetyDay/' + id, + method: 'get' + }); +}; diff --git a/src/api/gis/type.ts b/src/api/gis/type.ts index badb6ac..adfaf92 100644 --- a/src/api/gis/type.ts +++ b/src/api/gis/type.ts @@ -86,3 +86,7 @@ export interface weatherVO { sunRise: string; sunSet: string; } + +export interface safetyDayVO { + safetyDay: string; +} diff --git a/src/components/webrtc/index.vue b/src/components/webrtc/index.vue new file mode 100644 index 0000000..7f240ed --- /dev/null +++ b/src/components/webrtc/index.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/main.ts b/src/main.ts index 463e8f5..7bd461b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -46,11 +46,21 @@ VXETable.config({ zIndex: 999999 }); +//本地保存飞机配置 +import { setLocal } from './utils'; +setLocal('dockair', 'http://192.168.110.24:9136'); +setLocal('aiurl', 'http://192.168.110.23:8000'); +setLocal('host', '192.168.110.199'); +setLocal('rtmpport', '1935'); +setLocal('rtcport', '1985'); +setLocal('dockSocketUrl', 'ws://192.168.110.8:9136/websocket'); + // 修改 el-dialog 默认点击遮照为不关闭 /*import { ElDialog } from 'element-plus'; ElDialog.props.closeOnClickModal.default = false;*/ // **main.js** import { vue3ScrollSeamless } from 'vue3-scroll-seamless'; +import bus from './utils/bus'; const app = createApp(App); @@ -62,6 +72,7 @@ app.use(print); app.use(i18n); app.use(VXETable); app.use(plugins); +app.use(bus); app.component('vue3ScrollSeamless', vue3ScrollSeamless); // 自定义指令 directive(app); diff --git a/src/router/index.ts b/src/router/index.ts index e5174d3..0c7f264 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -98,6 +98,11 @@ export const constantRoutes: RouteRecordRaw[] = [ path: '/gisHome', component: () => import('@/views/gisHome/index.vue'), hidden: true + }, + { + path: '/drone', + component: () => import('@/views/drone/index.vue'), + hidden: true } ]; diff --git a/src/store/modules/drone.ts b/src/store/modules/drone.ts new file mode 100644 index 0000000..4b6feeb --- /dev/null +++ b/src/store/modules/drone.ts @@ -0,0 +1,42 @@ +// stores/useAirStore.js +import { getLocal } from '@/utils'; +import { defineStore } from 'pinia'; + +export const useAirStore = defineStore('air', { + state: () => ({ + debugValue: false, // 远程调试模式 + HatchCoverValue: false, // 舱盖 + AerocraftValue: false, // 飞行器 + gateWay: JSON.parse(getLocal('airGateway')) || null, // + queryParams: { + target_height: 100, //目标点高度 + rth_altitude: 100, //返航高度 + commander_flight_height: 100, //指点飞行高度 + rc_lost_action: 2, //遥控器失控动作 + rth_mode: 1, //返航模式设置值 + commander_mode_lost_action: 1, //指点飞行失控动作 + commander_flight_mode: 1, //指点飞行模式设置值 + max_speed: 12, //一键起飞的飞行过程中能达到的最大速度 + security_takeoff_height: 100, //安全起飞高度 + target_latitude: 0, //目标点纬度 + target_longitude: 0, //目标点经度 + height: 100 + } + }), + + actions: { + UP_debugValue(payload) { + localStorage.setItem('debugValue', JSON.stringify(payload)); + }, + UP_HatchCoverValue(payload) { + localStorage.setItem('HatchCoverValue', JSON.stringify(payload)); + }, + UP_AerocraftValue(payload) { + localStorage.setItem('AerocraftValue', JSON.stringify(payload)); + }, + SET_GATEWAY(gateWay) { + this.gateWay = gateWay; + localStorage.setItem('airGateway', JSON.stringify(gateWay)); + } + } +}); diff --git a/src/utils/auth.ts b/src/utils/auth.ts index db50ac9..0b21b0b 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -1,3 +1,5 @@ +import { getLocal } from '.'; + const TokenKey = 'Admin-Token'; const tokenStorage = useStorage(TokenKey, null); @@ -7,3 +9,27 @@ export const getToken = () => tokenStorage.value; export const setToken = (access_token: string) => (tokenStorage.value = access_token); export const removeToken = () => (tokenStorage.value = null); + +export const getDockSocketUrl = () => { + return getLocal('dockSocketUrl'); +}; + +export const getHost = () => { + return getLocal('host'); +}; + +export const getRtmpPort = () => { + return getLocal('rtmpPort'); +}; + +export const getRtcPort = () => { + return getLocal('rtcPort'); +}; + +export const getDockAir = () => { + return getLocal('dockAir'); +}; + +export const getAiUrl = () => { + return getLocal('aiUrl'); +}; diff --git a/src/utils/bus.ts b/src/utils/bus.ts new file mode 100644 index 0000000..10905eb --- /dev/null +++ b/src/utils/bus.ts @@ -0,0 +1,22 @@ +import mitt from 'mitt'; + +const emitter = mitt(); + +export default { + install(app) { + // 发送事件 + app.config.globalProperties.$sendChanel = (event, payload) => { + emitter.emit(event, payload); + }; + + // 监听事件(返回取消函数) + app.config.globalProperties.$recvChanel = (event, handler) => { + emitter.on(event, handler); + + // 可选:返回解绑函数,方便使用 + return () => { + emitter.off(event, handler); + }; + }; + } +}; diff --git a/src/utils/index.ts b/src/utils/index.ts index 2b0aad5..1f12e5e 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,5 +1,5 @@ import { parseTime } from '@/utils/ruoyi'; - +import $cache from '@/plugins/cache'; /** * 表格时间格式化 */ @@ -15,6 +15,14 @@ export const formatDate = (cellValue: string) => { return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; }; +export const setLocal = (key, value) => { + return $cache.local.set(key, value); +}; + +export const getLocal = (key) => { + return $cache.local.get(key); +}; + /** * @param {number} time * @param {string} option @@ -316,3 +324,5 @@ export const removeClass = (ele: HTMLElement, cls: string) => { export const isExternal = (path: string) => { return /^(https?:|http?:|mailto:|tel:)/.test(path); }; + +export { parseTime }; diff --git a/src/utils/moveDiv.ts b/src/utils/moveDiv.ts new file mode 100644 index 0000000..1895e22 --- /dev/null +++ b/src/utils/moveDiv.ts @@ -0,0 +1,40 @@ +export function setMove(downId, moveID) { + let moveDiv = document.getElementById(downId) + moveDiv.style.cssText += ';cursor:move;' + let informationBox = document.getElementById(moveID) + const sty = (() => { + if (window.document.currentStyle) { + return (dom, attr) => dom.currentStyle[attr]; + } else { + return (dom, attr) => getComputedStyle(dom, false)[attr]; + } + })() + moveDiv.onmousedown = (e) => { + // 鼠标按下,计算当前元素距离可视区的距离 + const disX = e.clientX - moveDiv.offsetLeft; + const disY = e.clientY - moveDiv.offsetTop; + // 获取到的值带px 正则匹配替换 + let styL = sty(informationBox, 'left'); + let styT = sty(informationBox, 'top'); + // 第一次获取到的值为组件自带50% 移动之后赋值为px + if (styL.includes('%')) { + styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100); + styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100); + } else { + styL = +styL.replace(/\px/g, ''); + styT = +styT.replace(/\px/g, ''); + } + document.onmousemove = function (e) { + // 通过事件委托,计算移动的距离 + let left = e.clientX - disX; + let top = e.clientY - disY; + // 移动当前元素 + informationBox.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`; + }; + document.onmouseup = function (e) { + document.onmousemove = null; + document.onmouseup = null; + }; + } +} + diff --git a/src/utils/reconnecting-websocket.js b/src/utils/reconnecting-websocket.js new file mode 100644 index 0000000..40218d3 --- /dev/null +++ b/src/utils/reconnecting-websocket.js @@ -0,0 +1,382 @@ +// MIT License: +// +// Copyright (c) 2010-2012, Joe Walnes +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +/** + * This behaves like a WebSocket in every way, except if it fails to connect, + * or it gets disconnected, it will repeatedly poll until it successfully connects + * again. + * + * It is API compatible, so when you have: + * ws = new WebSocket('ws://....'); + * you can replace with: + * ws = new ReconnectingWebSocket('ws://....'); + * + * The event stream will typically look like: + * onconnecting + * onopen + * onmessage + * onmessage + * onclose // lost connection + * onconnecting + * onopen // sometime later... + * onmessage + * onmessage + * etc... + * + * It is API compatible with the standard WebSocket API, apart from the following members: + * + * - `bufferedAmount` + * - `extensions` + * - `binaryType` + * + * Latest version: https://github.com/joewalnes/reconnecting-websocket/ + * - Joe Walnes + * + * Syntax + * ====== + * var socket = new ReconnectingWebSocket(url, protocols, options); + * + * Parameters + * ========== + * url - The url you are connecting to. + * protocols - Optional string or array of protocols. + * options - See below + * + * Options + * ======= + * Options can either be passed upon instantiation or set after instantiation: + * + * var socket = new ReconnectingWebSocket(url, null, { debug: true, reconnectInterval: 4000 }); + * + * or + * + * var socket = new ReconnectingWebSocket(url); + * socket.debug = true; + * socket.reconnectInterval = 4000; + * + * debug + * - Whether this instance should log debug messages. Accepts true or false. Default: false. + * + * automaticOpen + * - Whether or not the websocket should attempt to connect immediately upon instantiation. The socket can be manually opened or closed at any time using ws.open() and ws.close(). + * + * reconnectInterval + * - The number of milliseconds to delay before attempting to reconnect. Accepts integer. Default: 1000. + * + * maxReconnectInterval + * - The maximum number of milliseconds to delay a reconnection attempt. Accepts integer. Default: 30000. + * + * reconnectDecay + * - The rate of increase of the reconnect delay. Allows reconnect attempts to back off when problems persist. Accepts integer or float. Default: 1.5. + * + * timeoutInterval + * - The maximum time in milliseconds to wait for a connection to succeed before closing and retrying. Accepts integer. Default: 2000. + * + */ +// (function (global, factory) { +// if (typeof define === 'function' && define.amd) { +// define([], factory); +// } else if (typeof module !== 'undefined' && module.exports){ +// module.exports = factory(); +// } else { +// global.ReconnectingWebSocket = factory(); +// } +// })(this, function () { +// +// if (!('WebSocket' in window)) { +// return; +// } + +function ReconnectingWebSocket(url, protocols, options) { + + // Default settings + var settings = { + + /** Whether this instance should log debug messages. */ + debug: false, + + /** Whether or not the websocket should attempt to connect immediately upon instantiation. */ + automaticOpen: true, + + /** The number of milliseconds to delay before attempting to reconnect. */ + reconnectInterval: 1000, + /** The maximum number of milliseconds to delay a reconnection attempt. */ + maxReconnectInterval: 30000, + /** The rate of increase of the reconnect delay. Allows reconnect attempts to back off when problems persist. */ + reconnectDecay: 1.5, + + /** The maximum time in milliseconds to wait for a connection to succeed before closing and retrying. */ + timeoutInterval: 2000, + + /** The maximum number of reconnection attempts to make. Unlimited if null. */ + maxReconnectAttempts: null, + + /** The binary type, possible values 'blob' or 'arraybuffer', default 'blob'. */ + binaryType: 'blob' + } + if (!options) { + options = {}; + } + + // Overwrite and define settings with options if they exist. + for (var key in settings) { + if (typeof options[key] !== 'undefined') { + this[key] = options[key]; + } else { + this[key] = settings[key]; + } + } + + // These should be treated as read-only properties + + /** The URL as resolved by the constructor. This is always an absolute URL. Read only. */ + this.url = url; + + /** The number of attempted reconnects since starting, or the last successful connection. Read only. */ + this.reconnectAttempts = 0; + + /** + * The current state of the connection. + * Can be one of: WebSocket.CONNECTING, WebSocket.OPEN, WebSocket.CLOSING, WebSocket.CLOSED + * Read only. + */ + this.readyState = WebSocket.CONNECTING; + + /** + * A string indicating the name of the sub-protocol the server selected; this will be one of + * the strings specified in the protocols parameter when creating the WebSocket object. + * Read only. + */ + this.protocol = null; + + // Private state variables + + var self = this; + var ws; + var forcedClose = false; + var timedOut = false; + var eventTarget = document.createElement('div'); + + // Wire up "on*" properties as event handlers + + eventTarget.addEventListener('open', function (event) { + self.onopen(event); + }); + eventTarget.addEventListener('close', function (event) { + self.onclose(event); + }); + eventTarget.addEventListener('connecting', function (event) { + self.onconnecting(event); + }); + eventTarget.addEventListener('message', function (event) { + self.onmessage(event); + }); + eventTarget.addEventListener('error', function (event) { + self.onerror(event); + }); + + // Expose the API required by EventTarget + + this.addEventListener = eventTarget.addEventListener.bind(eventTarget); + this.removeEventListener = eventTarget.removeEventListener.bind(eventTarget); + this.dispatchEvent = eventTarget.dispatchEvent.bind(eventTarget); + + /** + * This function generates an event that is compatible with standard + * compliant browsers and IE9 - IE11 + * + * This will prevent the error: + * Object doesn't support this action + * + * http://stackoverflow.com/questions/19345392/why-arent-my-parameters-getting-passed-through-to-a-dispatched-event/19345563#19345563 + * @param s String The name that the event should use + * @param args Object an optional object that the event will use + */ + function generateEvent(s, args) { + var evt = document.createEvent("CustomEvent"); + evt.initCustomEvent(s, false, false, args); + return evt; + }; + + this.open = function (reconnectAttempt) { + ws = new WebSocket(self.url, protocols || []); + ws.binaryType = this.binaryType; + + if (reconnectAttempt) { + if (this.maxReconnectAttempts && this.reconnectAttempts > this.maxReconnectAttempts) { + return; + } + } else { + eventTarget.dispatchEvent(generateEvent('connecting')); + this.reconnectAttempts = 0; + } + + if (self.debug || ReconnectingWebSocket.debugAll) { + console.debug('ReconnectingWebSocket', 'attempt-connect', self.url); + } + + var localWs = ws; + var timeout = setTimeout(function () { + if (self.debug || ReconnectingWebSocket.debugAll) { + console.debug('ReconnectingWebSocket', 'connection-timeout', self.url); + } + timedOut = true; + localWs.close(); + timedOut = false; + }, self.timeoutInterval); + + ws.onopen = function (event) { + clearTimeout(timeout); + if (self.debug || ReconnectingWebSocket.debugAll) { + console.debug('ReconnectingWebSocket', 'onopen', self.url); + } + self.protocol = ws.protocol; + self.readyState = WebSocket.OPEN; + self.reconnectAttempts = 0; + var e = generateEvent('open'); + e.isReconnect = reconnectAttempt; + reconnectAttempt = false; + eventTarget.dispatchEvent(e); + }; + + ws.onclose = function (event) { + clearTimeout(timeout); + ws = null; + if (forcedClose) { + self.readyState = WebSocket.CLOSED; + eventTarget.dispatchEvent(generateEvent('close')); + } else { + self.readyState = WebSocket.CONNECTING; + var e = generateEvent('connecting'); + e.code = event.code; + e.reason = event.reason; + e.wasClean = event.wasClean; + eventTarget.dispatchEvent(e); + if (!reconnectAttempt && !timedOut) { + if (self.debug || ReconnectingWebSocket.debugAll) { + console.debug('ReconnectingWebSocket', 'onclose', self.url); + } + eventTarget.dispatchEvent(generateEvent('close')); + } + + var timeout = self.reconnectInterval * Math.pow(self.reconnectDecay, self.reconnectAttempts); + setTimeout(function () { + self.reconnectAttempts++; + self.open(true); + }, timeout > self.maxReconnectInterval ? self.maxReconnectInterval : timeout); + } + }; + ws.onmessage = function (event) { + if (self.debug || ReconnectingWebSocket.debugAll) { + console.debug('ReconnectingWebSocket', 'onmessage', self.url, event.data); + } + var e = generateEvent('message'); + e.data = event.data; + eventTarget.dispatchEvent(e); + }; + ws.onerror = function (event) { + if (self.debug || ReconnectingWebSocket.debugAll) { + console.debug('ReconnectingWebSocket', 'onerror', self.url, event); + } + eventTarget.dispatchEvent(generateEvent('error')); + }; + } + + // Whether or not to create a websocket upon instantiation + if (this.automaticOpen == true) { + this.open(false); + } + + /** + * Transmits data to the server over the WebSocket connection. + * + * @param data a text string, ArrayBuffer or Blob to send to the server. + */ + this.send = function (data) { + if (ws) { + if (self.debug || ReconnectingWebSocket.debugAll) { + console.debug('ReconnectingWebSocket', 'send', self.url, data); + } + return ws.send(data); + } else { + throw 'INVALID_STATE_ERR : Pausing to reconnect websocket'; + } + }; + + /** + * Closes the WebSocket connection or connection attempt, if any. + * If the connection is already CLOSED, this method does nothing. + */ + this.close = function (code, reason) { + // Default CLOSE_NORMAL code + if (typeof code == 'undefined') { + code = 1000; + } + forcedClose = true; + if (ws) { + ws.close(code, reason); + } + }; + + /** + * Additional public API method to refresh the connection if still open (close, re-open). + * For example, if the app suspects bad data / missed heart beats, it can try to refresh. + */ + this.refresh = function () { + if (ws) { + ws.close(); + } + }; +} + +/** + * An event listener to be called when the WebSocket connection's readyState changes to OPEN; + * this indicates that the connection is ready to send and receive data. + */ +ReconnectingWebSocket.prototype.onopen = function (event) { +}; +/** An event listener to be called when the WebSocket connection's readyState changes to CLOSED. */ +ReconnectingWebSocket.prototype.onclose = function (event) { +}; +/** An event listener to be called when a connection begins being attempted. */ +ReconnectingWebSocket.prototype.onconnecting = function (event) { +}; +/** An event listener to be called when a message is received from the server. */ +ReconnectingWebSocket.prototype.onmessage = function (event) { +}; +/** An event listener to be called when an error occurs. */ +ReconnectingWebSocket.prototype.onerror = function (event) { +}; + +/** + * Whether all instances of ReconnectingWebSocket should log debug messages. + * Setting this to true is the equivalent of setting all instances of ReconnectingWebSocket.debug to true. + */ +ReconnectingWebSocket.debugAll = false; + +ReconnectingWebSocket.CONNECTING = WebSocket.CONNECTING; +ReconnectingWebSocket.OPEN = WebSocket.OPEN; +ReconnectingWebSocket.CLOSING = WebSocket.CLOSING; +ReconnectingWebSocket.CLOSED = WebSocket.CLOSED; + +// return ReconnectingWebSocket; +// }); diff --git a/src/utils/requset2.ts b/src/utils/requset2.ts new file mode 100644 index 0000000..03ff7b9 --- /dev/null +++ b/src/utils/requset2.ts @@ -0,0 +1,55 @@ +import $modal from '@/plugins/modal'; +import axios from 'axios'; + +// 创建一个 Axios 实例并设置默认配置 +const axiosInstance = axios.create({ + baseURL: import.meta.env.VITE_APP_BASE_DRONE_API, + timeout: 5000 +}); + +// 请求拦截器,添加 token 到每个请求头 +axiosInstance.interceptors.request.use( + (config) => { + let air = localStorage.getItem('airToken'); + let token = ''; + if (air) { + token = JSON.parse(air).access_token; // 假设 token 存储在 localStorage 中 + } + if (token) { + config.headers['Authorization'] = `Bearer ${token}`; + } + return config; + }, + (error) => { + return Promise.reject(error); + } +); +// 处理消息显示 +function showMessage(message, type = 'error') { + $modal.msg({ + message: message, + type: type, + duration: 5 * 1000 + }); +} + +export function request(params) { + // 如果有取消请求的需求,可以在此处添加 CancelToken + // const source = axios.CancelToken.source(); + // params.cancelToken = source.token; + + // 确保 URL 是完整的 + // if (!params.url.startsWith(process.env.AIR)) { + // params.url = process.env.AIR; + // } + + return axiosInstance(params).then((res) => { + if (res.data.code === 200) { + return res.data; + } else { + if (!res.data.code) return res.data; + showMessage(res.data.message || res.data.msg); + return Promise.reject(res.data); + } + }); +} diff --git a/src/views/drone/components/airRoute/advancedSet.vue b/src/views/drone/components/airRoute/advancedSet.vue new file mode 100644 index 0000000..396b7cb --- /dev/null +++ b/src/views/drone/components/airRoute/advancedSet.vue @@ -0,0 +1,370 @@ + + + + diff --git a/src/views/drone/components/airRoute/js/pointSetup.js b/src/views/drone/components/airRoute/js/pointSetup.js new file mode 100644 index 0000000..2f2ac36 --- /dev/null +++ b/src/views/drone/components/airRoute/js/pointSetup.js @@ -0,0 +1,750 @@ +import { waypoint } from "@/api/air"; +export default { + data() { + return { + leftShow: false, + pzDisabled: false, + keywordShow: false, + setupShow: false, + selectId: null, + inputShow: false, + selectObj: { + label: "", + params: {}, + type: "", + }, // 选中的动作 + selectIndexF: null, + selectIndexS: null, + checkboxGroup1: ["visable", "ir"], + checkboxGroup2: ["wide", "ir", "zoom"], + startPoint: null, + pohoto: [ + { + label: "可见光", + value: "visable", + }, + { + label: "红外照片", + value: "ir", + }, + ], + pohoto1: [ + { + label: "广角照片", + value: "wide", + }, + { + label: "红外照片", + value: "ir", + }, + { + label: "变焦照片", + value: "zoom", + }, + ], + dropdownList: [ + { + label: "新增航点(前)", + value: 1, + type: "before", + }, + { + label: "新增航点(后)", + value: 2, + type: "after", + }, + { + label: "删除", + value: 3, + }, + ], + controls: [ + { + url: require("../../../images/control_start.png"), + label: "开始录像", + value: "startRecord", + svg: "start_record", + params: { + fileSuffix: "123456", + payloadPositionIndex: 0, + useGlobalPayloadLensIndex: 1, //是否使用全局 1为使用全局 0不使用全局 + payloadLensIndex: "visable,ir", + }, + }, + { + url: require("../../../images/control_suspend.png"), + label: "停止录像", + value: "stopRecord", + svg: "stop_record", + params: { + payloadPositionIndex: 0, + }, + }, + // { + // url: require("../../../images/control_Isochronous.png"), + // label: "开始等时间隔拍照", + // value: "takePhoto", + // svg: "interval_time", + // params: { + // payloadPositionIndex: 0, + // useGlobalPayloadLensIndex: 1, + // payloadLensIndex: "visable,ir", + // }, + // actionTrigger: { + // actionTriggerType: "multipleTiming", + // actionTriggerParam: 10, + // }, + // }, + // { + // url: require("../../../images/control_equidistant.png"), + // label: "开始等距间隔拍照", + // value: "takePhoto", + // svg: "interval_distance", + // params: { + // payloadPositionIndex: 0, + // useGlobalPayloadLensIndex: 1, + // payloadLensIndex: "visable,ir", + // }, + // actionTrigger: { + // actionTriggerType: "multipleDistance", + // actionTriggerParam: 10, + // }, + // }, + // { + // url: require("../../../images/control_interval.png"), + // label: "结束间隔拍照", + // value: "", + // svg: "interval_stop", + // }, + { + url: require("../../../images/control_hover.png"), + label: "悬停", + value: "hover", + svg: "hover", + params: { + hoverTime: 10, + }, + }, + { + url: require("../../../images/control_aircraft.png"), + label: "飞行器偏航角", + value: "rotateYaw", + svg: "drone_yaw", + params: { + aircraftHeading: 0, + aircraftPathMode: "counterClockwise", + }, + }, + // { + // url: require("../../../images/control_yaw.png"), + // label: "云台偏航角", + // value: "gimbalRotate", + // svg: "action_gimbal_pitch", + // params: { + // gimbalHeadingYawBase: "north", + // gimbalRotateMode: "absoluteAngle", + // gimbalPitchRotateEnable: 1, + // gimbalPitchRotateAngle: 0, + // gimbalRollRotateEnable: 0, + // gimbalRollRotateAngle: 0, + // gimbalYawRotateEnable: 0, + // gimbalYawRotateAngle: 0, + // gimbalRotateTimeEnable: 0, + // gimbalRotateTime: 0, + // payloadPositionIndex: 0, + // }, + // }, + { + url: require("../../../images/control_pitch.png"), + label: "云台俯仰角", + value: "gimbalRotate", + svg: "action_gimbal_pitch", + params: { + gimbalHeadingYawBase: "north", + gimbalRotateMode: "absoluteAngle", + gimbalPitchRotateEnable: 1, + gimbalPitchRotateAngle: 0, // 变化的值 + gimbalRollRotateEnable: 0, + gimbalRollRotateAngle: 0, + gimbalYawRotateEnable: 0, + gimbalYawRotateAngle: 0, + gimbalRotateTimeEnable: 0, + gimbalRotateTime: 0, + payloadPositionIndex: 0, + }, + }, + { + url: require("../../../images/control_photograph.png"), + label: "拍照", + value: "takePhoto", + svg: "take_photo", + params: { + payloadPositionIndex: 0, + useGlobalPayloadLensIndex: 1, + payloadLensIndex: "wide,zoom,ir", + }, + }, + { + url: require("../../../images/control_zoom.png"), + label: "相机变焦", + value: "zoom", + svg: "camera_zoom", + params: { + focalLength: 24, + isUseFocalFactor: 0, + payloadPositionIndex: 0, + }, + }, + { + url: require("../../../images/control_panorama.png"), + label: "全景拍照", + value: "panoShot", + svg: "pano_shot", + params: { + payloadPositionIndex: 0, + useGlobalPayloadLensIndex: 0, + payloadLensIndex: "visable,ir", + panoShotSubMode: "panoShot_360", + }, + }, + ], + points: [], + obj: { + type: 0, // 航线类型 + imageFormat: "wide,zoom,ir,narrow_band,visable", // 拍照配置 + estimateTime: "", // 预计执行时间 sdk + photoNum: 0, // 航点拍照数量 sdk + waylineLen: "", // 航线长度 sdk + flag: "", + // 0-91-1 + droneInfo: { + // 无人机的型号及其子类型 + droneEnumValue: "91", + droneSubEnumValue: "1", + }, + // 3-2-0 + payloadInfo: { + // 负载类型和子类型以及负载的位置 + payloadEnumValue: "81", + payloadPositionIndex: "0", + payloadSubEnumValue: "0", + }, + placemarkList: [], // 经纬度 + globalHeight: 120, // 相对起飞点高度 + autoFlightSpeed: 10, // 全局航线速度 + globalShootHeight: 60, + // remark: undefined, + // imageFormat: '', + takeOffSecurityHeight: 100, //安全起飞高度 + globalTransitionalSpeed: 10, //飞向首航点速度 + takeOffRefPoint: { + lng: undefined, + lat: undefined, + alt: undefined, + }, + }, + networkState: {}, + length: 0, + time: 0, + gensui: true, + inputDiv: false, + }; + }, + mounted() { + this.createTongBu(); + // let points = JSON.parse(localStorage.getItem("routePoints")); + let pointsAndTakeOff = JSON.parse(this.routeLine.points); + console.log( + "pointsAndTakeOff", + this.routeLine, + this.routeLine.normalHeight + ); + + // console.log("points", points); + if (pointsAndTakeOff) { + this.points = pointsAndTakeOff.points; + + console.log(".takeOffRefPoint", pointsAndTakeOff); + // return; + let takeOff = pointsAndTakeOff.takeOffRefPoint.split(","); + this.obj.takeOffRefPoint = { + lng: takeOff[1] - 0, + lat: takeOff[0] - 0, + alt: takeOff[2] - 0, + }; + console.log("this.obj.takeOffRefPoint", this.obj.takeOffRefPoint); + + if (!window.airLine) { + console.log("this.points", this.routeLine.normalHeight); + this.renderRouter(this.points); + } + if (!window.PointEntity) { + this.renderStart(this.obj.takeOffRefPoint); + } + } else { + this.drawStart(); + } + }, + computed: { + getPhotoNum() { + let photoNum = 0; + this.points.forEach((item) => { + if (item.actions.length > 0) { + item.actions.forEach((item1) => { + if (item1.type == "takePhoto" || item1.type == "panoShot") { + photoNum++; + } + }); + } + }); + return photoNum; + }, + }, + methods: { + // 创建地球 + createTongBu() { + window.EarthTongbu = new YJ.YJEarth("tongbuEarth"); + YJ.Global.setKeyboardEventActive(window.EarthTongbu, false); + const obj = { + compass: false, //罗盘 + legend: false, //比例尺 + info: false, //信息栏 + frame: false, //刷新率 + }; + let viewer = window.EarthTongbu.viewer; + YJ.Global.CesiumContainer(window.EarthTongbu, obj); + viewer.terrainProvider = new Cesium.createWorldTerrain(); + let imageryProvider = new Cesium.ArcGisMapServerImageryProvider({ + url: + "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer", + }); + viewer.imageryLayers.addImageryProvider(imageryProvider); + viewer.scene.screenSpaceCameraController.enableRotate = false; + viewer.scene.screenSpaceCameraController.enableZoom = false; + viewer.scene.screenSpaceCameraController.enableTilt = false; + }, + // 跟随航线 + genliuhangxian() { + this.gensui = !this.gensui; + if (this.gensui) { + this.selectObj.params.useGlobalPayloadLensIndex = 1; + } else { + this.selectObj.params.useGlobalPayloadLensIndex = 0; + } + }, + // genliuhangxian + genliuhangxian2() { + this.selectObj.params.useGlobalPayloadLensIndex = 1; + }, + // 保存成功 + saveSuucess() { + this.inputDiv = false; + this.$message.success("保存成功"); + }, + // 删除成功 + deleteSuucess() { + this.$message.success("删除成功"); + this.inputShow = false; + this.selectObj.params.fileSuffix = ""; + }, + changeGroup() { + this.selectObj.params.payloadLensIndex = this.checkboxGroup1.join(); + }, + changeGroup1() { + this.selectObj.params.payloadLensIndex = this.checkboxGroup2.join(); + }, + interval_distance(value) { + let svg = this.selectObj.svg; + if (svg == "interval_time" || svg == "interval_distance") { + this.selectObj.actionTrigger.actionTriggerParam = value; + } + if (svg == "hover") { + console.log("hoverTime", this.selectObj.params.hoverTime); + this.selectObj.params.hoverTime = value; + } + }, + // + hpr(value) { + let svg = this.selectObj.svg; + if (svg == "drone_yaw") { + this.selectObj.params.aircraftHeading = value; + let h = value == 0 ? 0 : value; + window.airLine.frustum.updateFrustumHPR( + h, + window.airLine.frustum.pitch, + window.airLine.frustum.roll, + true, + "alone" + ); + } + if (svg == "action_gimbal_pitch") { + function mapValue(x, a1, b1, a2, b2) { + // 线性映射公式 + return a2 + ((x - a1) / (b1 - a1)) * (b2 - a2); + } + + // 原始区间和目标区间 + const range1 = [35, -90]; // 原始区间 + const range2 = [60, 180]; // 目标区间 + let mappedValue = mapValue( + value, + range1[0], + range1[1], + range2[0], + range2[1] + ); + this.selectObj.params.gimbalPitchRotateAngle = value; + let p = mappedValue == 0 ? 90 : mappedValue; + // return; + let hh = Cesium.Math.toDegrees(window.airLine.frustum.hpr.heading); + window.airLine.frustum.updateFrustumHPR(hh, p, 0, true, "alone"); + } + if (svg == "camera_zoom") { + this.selectObj.params.focalLength = value * 24; + } + }, + closeSetup() { + this.setupShow = false; + this.selectIndexS = null; + }, + beforeHandleDropMenu(dropId, airLine) { + return { + dropId: dropId, + airLine: airLine, + }; + }, + handleDropMenu(command) { + const { dropId, airLine } = command; + if (dropId == 1 || dropId == 2) { + let draw = new YJ.Draw.DrawPoint(window.Earth1); + draw.start((err, params) => { + if (params != undefined) { + let position = { + ...params, + actions: [], + }; + if (dropId == 1) { + if (window.airLine) { + this.points.splice(this.selectId, 0, position); + window.airLine.addPoint(this.points); + } + } + if (dropId == 2) { + if (window.airLine) { + if (this.selectId == this.points.length - 1) { + this.points.push(position); + } else { + this.points.splice(this.selectId + 1, 0, position); + } + window.airLine.addPoint(this.points); + } + } + } + }); + } + if (dropId == 3) { + const index = this.points.findIndex((obj) => obj.lng == airLine.lng); + this.points = this.points.filter((obj) => obj.lng !== airLine.lng); + if (window.airLine) { + window.airLine.delPosition(index, this); + } + } + }, + // 新增航点 + addPoint() { + let draw = new YJ.Draw.DrawPoint(window.Earth1); + draw.start((err, params) => { + if (params != undefined) { + let position = { + ...params, + actions: [], + }; + this.points.push(position); + window.airLine.addPoint(this.points); + this.save(() => {}, false); + } + }); + }, + // 选中 + select(index) { + this.selectId = index; + let item = this.points[index]; + let obj = item.actions[0]; + + if (obj) { + this.openSet(index, 0, obj); + } else { + this.setupShow = false; + this.selectIndexS = null; + } + if (window.airLine) { + //判断动作组中有value为rotateYaw、gimbalRotate时就不执行window.airLine.updateFrustumPosition(index); + let flag = item.actions.some( + (obj) => obj.value == "rotateYaw" || obj.value == "gimbalRotate" + ); + if (!flag) { + window.airLine.updateFrustumPosition(index); + } + } + }, + add() {}, + more() { + this.leftShow = !this.leftShow; + }, + // 打开高级设置 + senior() { + this.save(() => { + this.$emit("seniorSet"); + }); + }, + // 返回 + back() { + if (this.points.length > 0) { + this.save(() => { + if (airLine) { + window.airLine.remove(); + window.airLine = null; + } + if (window.PointEntity) { + window.PointEntity.remove(); + window.PointEntity = null; + } + this.$emit("back"); + }, false); + } else { + this.$emit("back"); + } + this.$changeComponentShow(".bottomTabs", true); + }, + // 绘制航线 + draw() { + let draw = new YJ.Draw.DrawPolyline(window.Earth1, { + tipText: "请选择航点(左键确定,右键结束)", + }); + draw.start((err, positions) => { + if (positions.length == 0) { + return; + } + positions.forEach((el) => { + el.actions = []; + return el; + }); + this.points = [...positions]; + this.renderRouter(positions); + }); + }, + // 绘制起飞点 + drawStart() { + let draw = new YJ.Draw.DrawTakeOff(window.Earth1, { + tipText: "选择参考起飞点(左键确定)", + }); + draw.start((err, params, flag) => { + if (params != undefined) { + if (!flag) { + this.renderStart(params); + this.obj.takeOffRefPoint = window.PointEntity.options.positions; + } else { + this.obj.takeOffRefPoint = window.airportEntity.options.positions; + } + this.draw(); + } + }); + }, + // 渲染参考起飞点 + renderStart(positions) { + let option = { + positions, + label: { + text: "参考起飞点", + fontSize: 20, + }, + billboard: { + image: "/static/sdk/img/start.png", + }, + }; + window.PointEntity = new YJ.Obj.BillboardObject(window.Earth1, option); + window.PointEntity.picking = false; + window.PointEntity.onClick = () => { + setTimeout(() => { + window.PointEntity.positionEditing = true; + }, 100); + }; + }, + // 渲染航线 + renderRouter(positions) { + console.log("globalPointHeight", this.routeLine.globalPointHeight); + + let airLine = new YJ.Obj.newAirLine( + { + positions, + image: "/static/img/定位.png", + saveFun: this.save, + selectFun: this.select, + normalHeight: this.routeLine.globalPointHeight, + airHeight: this.routeLine.height, + }, + window.Earth1.viewer, + window.EarthTongbu.viewer + ); + window.airLine = airLine; + window.airLine.flyTo(); + this.length = airLine.countLength(); + this.time = airLine.countTime(); + // console.log("airLine", airLine); + }, + // 添加动作到航点 + onClick(item) { + console.log("item", item); + // 添加动作时, + // console.log("this.selectId, item", this.selectId, item); + if (this.selectId === null) { + this.$message.warning("请选择航点,再进行动作添加"); + return; + } + let selectItem = this.points[this.selectId]; + selectItem.actions.push({ + label: item.label, + type: item.value, + params: item.params, + svg: item.svg, + actionTrigger: item.actionTrigger, + }); + // 打开当前动作设置 + // this.openSet(this.selectId, selectItem.actions.length - 1, item); + // console.log("this.points", this.points); + }, + // 点击动作图标 + openSet(indexF, indexS, item) { + this.selectIndexF = indexF; + this.selectIndexS = indexS; + this.selectObj = item; + console.log("this.selectObj", this.selectObj); + if ( + this.selectObj.type == "takePhoto" || + this.selectObj.type == "startRecord" + ) { + this.checkboxGroup2 = this.selectObj.params.payloadLensIndex.split(","); + if (this.selectObj.params.fileSuffix) { + this.inputDiv = false; + this.inputShow = true; + } else { + this.inputShow = false; + this.inputDiv = true; + } + } + this.setupShow = true; + }, + // 删除动作 + delAction() { + let curAction = this.points[this.selectIndexF]; + curAction.actions.splice(this.selectIndexS, 1); + this.setupShow = false; + // console.log( + // "curActioncurActioncurActioncurAction", + // curAction, + // this.selectIndexS + // ); + }, + + // 在保存之前判断每个点中得动作组,如果前一个动作组中有开始录像,后面的动作组中有全景拍照的动作,就提示用户该航线因为全景拍照的动作处于录像过程中,无法执行,并返回当前有问题的航点的索引 + saveBefore() { + let flag = true; + let indexf = null; + this.points.forEach((item, index) => { + if (item.actions.length > 0) { + let startRecord = item.actions.find( + (obj) => obj.type == "startRecord" + ); + if (startRecord) { + let nextAction = this.points[index + 1]; + if (nextAction) { + let panoShot = nextAction.actions.find( + (obj) => obj.type == "panoShot" + ); + if (panoShot) { + flag = false; + indexf = index + 1; + } + } + } + } + }); + return { + flag: !flag, + index: indexf, + }; + }, + // 保存操作 + save(cb = null, flag = true) { + let before = this.saveBefore(); + if (before.flag) { + this.$message.warning( + `${before.index + + 1}#航点的全景拍照动作处于录像过程中,无法执行。请删除该动作后再保存` + ); + return; + } + let positions = window.airLine.getNewPositions(); + let newPoints = []; + this.points.forEach((item1, index1) => { + let obj = { + actions: item1.actions, + }; + positions.forEach((item, index) => { + if (index == index1) { + obj.lng = item.lng; + obj.lat = item.lat; + obj.alt = item.alt - this.routeLine.globalPointHeight; + obj.longitude = item.lng; + obj.latitude = item.lat; + obj.altitude = + item.alt - + this.routeLine.height + + this.routeLine.globalPointHeight; + } + }); + newPoints.push(obj); + }); + this.points = newPoints; + this.obj.placemarkList = newPoints; + this.obj.id = this.routeLine.id; + if (typeof this.obj.takeOffRefPoint == "object") { + this.obj.takeOffRefPoint = + this.obj.takeOffRefPoint.lat + + "," + + this.obj.takeOffRefPoint.lng + + "," + + this.obj.takeOffRefPoint.alt; + } else { + this.obj.takeOffRefPoint = this.obj.takeOffRefPoint; + } + + let obj = { + points: newPoints, + takeOffRefPoint: this.obj.takeOffRefPoint, + }; + if (!obj.points[0].lng) { + this.obj.points = []; + this.takeOffRefPoint = ""; + window.PointEntity.remove(); + window.PointEntity = null; + } + this.obj.points = JSON.stringify(obj); + waypoint(this.obj).then((res) => { + if (flag) { + this.$message.success("操作成功"); + } + if (typeof cb == "function") { + cb(); + } + }); + }, + // 航线航点移动 + towardsLeft() {}, + up() {}, + towardsRight() {}, + left() {}, + after() {}, + right() {}, + }, +}; diff --git a/src/views/drone/components/airRoute/list.vue b/src/views/drone/components/airRoute/list.vue new file mode 100644 index 0000000..e4ab6e7 --- /dev/null +++ b/src/views/drone/components/airRoute/list.vue @@ -0,0 +1,627 @@ + + + + diff --git a/src/views/drone/components/airRoute/pointSetup.vue b/src/views/drone/components/airRoute/pointSetup.vue new file mode 100644 index 0000000..7acb896 --- /dev/null +++ b/src/views/drone/components/airRoute/pointSetup.vue @@ -0,0 +1,881 @@ + + + + diff --git a/src/views/drone/components/bottomTabs/index.vue b/src/views/drone/components/bottomTabs/index.vue new file mode 100644 index 0000000..051e93a --- /dev/null +++ b/src/views/drone/components/bottomTabs/index.vue @@ -0,0 +1,143 @@ + + + + diff --git a/src/views/drone/components/component/dialog/index.vue b/src/views/drone/components/component/dialog/index.vue new file mode 100644 index 0000000..d4d80fc --- /dev/null +++ b/src/views/drone/components/component/dialog/index.vue @@ -0,0 +1,114 @@ + + + + diff --git a/src/views/drone/components/component/plusReduce/index.vue b/src/views/drone/components/component/plusReduce/index.vue new file mode 100644 index 0000000..2214dd6 --- /dev/null +++ b/src/views/drone/components/component/plusReduce/index.vue @@ -0,0 +1,121 @@ + + + + diff --git a/src/views/drone/components/component/progress/index.vue b/src/views/drone/components/component/progress/index.vue new file mode 100644 index 0000000..d783813 --- /dev/null +++ b/src/views/drone/components/component/progress/index.vue @@ -0,0 +1,143 @@ + + + + diff --git a/src/views/drone/components/flyer/1.jpg b/src/views/drone/components/flyer/1.jpg new file mode 100644 index 0000000..503815c Binary files /dev/null and b/src/views/drone/components/flyer/1.jpg differ diff --git a/src/views/drone/components/flyer/index.vue b/src/views/drone/components/flyer/index.vue new file mode 100644 index 0000000..10e32dc --- /dev/null +++ b/src/views/drone/components/flyer/index.vue @@ -0,0 +1,37 @@ + + + + \ No newline at end of file diff --git a/src/views/drone/components/home/components/AircraftInformationDetails/index.vue b/src/views/drone/components/home/components/AircraftInformationDetails/index.vue new file mode 100644 index 0000000..d2c4556 --- /dev/null +++ b/src/views/drone/components/home/components/AircraftInformationDetails/index.vue @@ -0,0 +1,447 @@ + + + + diff --git a/src/views/drone/components/home/components/AircraftMonitoringLiveBroadcast/index.vue b/src/views/drone/components/home/components/AircraftMonitoringLiveBroadcast/index.vue new file mode 100644 index 0000000..ecbb9ff --- /dev/null +++ b/src/views/drone/components/home/components/AircraftMonitoringLiveBroadcast/index.vue @@ -0,0 +1,1068 @@ + + + + diff --git a/src/views/drone/components/home/components/AirportInformationDetails/index.vue b/src/views/drone/components/home/components/AirportInformationDetails/index.vue new file mode 100644 index 0000000..d521e7b --- /dev/null +++ b/src/views/drone/components/home/components/AirportInformationDetails/index.vue @@ -0,0 +1,485 @@ + + + + diff --git a/src/views/drone/components/home/components/AirportRemoteDebugging/DebugItem.vue b/src/views/drone/components/home/components/AirportRemoteDebugging/DebugItem.vue new file mode 100644 index 0000000..3c33559 --- /dev/null +++ b/src/views/drone/components/home/components/AirportRemoteDebugging/DebugItem.vue @@ -0,0 +1,121 @@ + + + + diff --git a/src/views/drone/components/home/components/AirportRemoteDebugging/index.vue b/src/views/drone/components/home/components/AirportRemoteDebugging/index.vue new file mode 100644 index 0000000..4f86bac --- /dev/null +++ b/src/views/drone/components/home/components/AirportRemoteDebugging/index.vue @@ -0,0 +1,811 @@ + + + + diff --git a/src/views/drone/components/home/components/ModuleItem/index.vue b/src/views/drone/components/home/components/ModuleItem/index.vue new file mode 100644 index 0000000..c4513c6 --- /dev/null +++ b/src/views/drone/components/home/components/ModuleItem/index.vue @@ -0,0 +1,80 @@ + + + + diff --git a/src/views/drone/components/home/components/MonitorLiveStreaming/index.vue b/src/views/drone/components/home/components/MonitorLiveStreaming/index.vue new file mode 100644 index 0000000..2b3ff6a --- /dev/null +++ b/src/views/drone/components/home/components/MonitorLiveStreaming/index.vue @@ -0,0 +1,755 @@ + + + + diff --git a/src/views/drone/components/home/components/MonitorLiveStreaming/index1.vue b/src/views/drone/components/home/components/MonitorLiveStreaming/index1.vue new file mode 100644 index 0000000..fa59d2c --- /dev/null +++ b/src/views/drone/components/home/components/MonitorLiveStreaming/index1.vue @@ -0,0 +1,784 @@ + + + + diff --git a/src/views/drone/components/home/homeLeft.vue b/src/views/drone/components/home/homeLeft.vue new file mode 100644 index 0000000..0d86d7b --- /dev/null +++ b/src/views/drone/components/home/homeLeft.vue @@ -0,0 +1,53 @@ + + + + diff --git a/src/views/drone/components/home/homeRight.vue b/src/views/drone/components/home/homeRight.vue new file mode 100644 index 0000000..97dbe55 --- /dev/null +++ b/src/views/drone/components/home/homeRight.vue @@ -0,0 +1,67 @@ + + + + diff --git a/src/views/drone/components/home/index.vue b/src/views/drone/components/home/index.vue new file mode 100644 index 0000000..f29951b --- /dev/null +++ b/src/views/drone/components/home/index.vue @@ -0,0 +1,27 @@ + + + + diff --git a/src/views/drone/components/medium/index.vue b/src/views/drone/components/medium/index.vue new file mode 100644 index 0000000..65d0b81 --- /dev/null +++ b/src/views/drone/components/medium/index.vue @@ -0,0 +1,264 @@ + + + + diff --git a/src/views/drone/components/medium/mediumHome.vue b/src/views/drone/components/medium/mediumHome.vue new file mode 100644 index 0000000..05347d9 --- /dev/null +++ b/src/views/drone/components/medium/mediumHome.vue @@ -0,0 +1,620 @@ + + + + diff --git a/src/views/drone/components/medium/mediumHomeAi.vue b/src/views/drone/components/medium/mediumHomeAi.vue new file mode 100644 index 0000000..27b4b27 --- /dev/null +++ b/src/views/drone/components/medium/mediumHomeAi.vue @@ -0,0 +1,609 @@ + + + + diff --git a/src/views/drone/components/medium/preview.vue b/src/views/drone/components/medium/preview.vue new file mode 100644 index 0000000..ae4791a --- /dev/null +++ b/src/views/drone/components/medium/preview.vue @@ -0,0 +1,272 @@ + + + + diff --git a/src/views/drone/components/planLank/histroy.vue b/src/views/drone/components/planLank/histroy.vue new file mode 100644 index 0000000..b175071 --- /dev/null +++ b/src/views/drone/components/planLank/histroy.vue @@ -0,0 +1,130 @@ + + + + diff --git a/src/views/drone/components/planLank/index.vue b/src/views/drone/components/planLank/index.vue new file mode 100644 index 0000000..79fb5da --- /dev/null +++ b/src/views/drone/components/planLank/index.vue @@ -0,0 +1,837 @@ + + + + diff --git a/src/views/drone/components/selcet/index.vue b/src/views/drone/components/selcet/index.vue new file mode 100644 index 0000000..dc4b6fd --- /dev/null +++ b/src/views/drone/components/selcet/index.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/views/drone/components/virtualWarehouse/api/index.js b/src/views/drone/components/virtualWarehouse/api/index.js new file mode 100644 index 0000000..c732baa --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/api/index.js @@ -0,0 +1,26 @@ +import { request } from "@/utils/requset2"; + +//进入指令飞行控制模式 +export function drcModeEnter(data) { + return request({ + url: "/dj/cmdFly/drcModeEnter", + method: "post", + data, + }); +} +//有参数的指令飞行 +export function hasDataFlight(data) { + return request({ + url: "/dj/cmdFly/hasDataFlight", + method: "post", + data, + }); +} +//无参数的指令飞行 +export function noDataFlight(data) { + return request({ + url: "/dj/cmdFly/noDataFlight", + method: "post", + data, + }); +} diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/FlightTime.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/FlightTime.svg new file mode 100644 index 0000000..8efb632 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/FlightTime.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/Remaining.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/Remaining.svg new file mode 100644 index 0000000..5a54e59 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/Remaining.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/battery.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/battery.svg new file mode 100644 index 0000000..55770e1 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/battery.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/big.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/big.svg new file mode 100644 index 0000000..1d558e2 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/big.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/memory.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/memory.svg new file mode 100644 index 0000000..8ba233b --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/memory.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/picture.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/picture.svg new file mode 100644 index 0000000..f173d29 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/picture.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/plane.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/plane.svg new file mode 100644 index 0000000..9ec2886 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/plane.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/quantity.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/quantity.svg new file mode 100644 index 0000000..2a8f088 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/quantity.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/satellite.svg b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/satellite.svg new file mode 100644 index 0000000..9238fc3 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/icons/satellite.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DataPresentation/index.vue b/src/views/drone/components/virtualWarehouse/components/DataPresentation/index.vue new file mode 100644 index 0000000..53493f7 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DataPresentation/index.vue @@ -0,0 +1,199 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/DroneVideo/index.vue b/src/views/drone/components/virtualWarehouse/components/DroneVideo/index.vue new file mode 100644 index 0000000..3d5ca4a --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/DroneVideo/index.vue @@ -0,0 +1,282 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon1.svg b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon1.svg new file mode 100644 index 0000000..00024d3 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon1.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon2.svg b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon2.svg new file mode 100644 index 0000000..21257f3 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon3.svg b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon3.svg new file mode 100644 index 0000000..0536e53 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/icon3.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/line.png b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/line.png new file mode 100644 index 0000000..95e54ab Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/components/FlightSetup/icons/line.png differ diff --git a/src/views/drone/components/virtualWarehouse/components/FlightSetup/index.vue b/src/views/drone/components/virtualWarehouse/components/FlightSetup/index.vue new file mode 100644 index 0000000..dca4696 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/FlightSetup/index.vue @@ -0,0 +1,187 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/GraduatedScale/index.vue b/src/views/drone/components/virtualWarehouse/components/GraduatedScale/index.vue new file mode 100644 index 0000000..49d7b4c --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/GraduatedScale/index.vue @@ -0,0 +1,203 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/Tips/icons/close.png b/src/views/drone/components/virtualWarehouse/components/Tips/icons/close.png new file mode 100644 index 0000000..43dbd3c Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/components/Tips/icons/close.png differ diff --git a/src/views/drone/components/virtualWarehouse/components/Tips/icons/warn.svg b/src/views/drone/components/virtualWarehouse/components/Tips/icons/warn.svg new file mode 100644 index 0000000..2beded4 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/Tips/icons/warn.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/Tips/index.vue b/src/views/drone/components/virtualWarehouse/components/Tips/index.vue new file mode 100644 index 0000000..462cf40 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/Tips/index.vue @@ -0,0 +1,126 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/ToolPresentation/icons/fight.svg b/src/views/drone/components/virtualWarehouse/components/ToolPresentation/icons/fight.svg new file mode 100644 index 0000000..3d7cea0 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/ToolPresentation/icons/fight.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/ToolPresentation/index.vue b/src/views/drone/components/virtualWarehouse/components/ToolPresentation/index.vue new file mode 100644 index 0000000..58b1b3e --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/ToolPresentation/index.vue @@ -0,0 +1,98 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/Typecontrols/index.vue b/src/views/drone/components/virtualWarehouse/components/Typecontrols/index.vue new file mode 100644 index 0000000..3b1c97f --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/Typecontrols/index.vue @@ -0,0 +1,68 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/Typecontrols/typeValue.vue b/src/views/drone/components/virtualWarehouse/components/Typecontrols/typeValue.vue new file mode 100644 index 0000000..f432c2a --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/Typecontrols/typeValue.vue @@ -0,0 +1,38 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/articulation/index.vue b/src/views/drone/components/virtualWarehouse/components/articulation/index.vue new file mode 100644 index 0000000..ec66c82 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/articulation/index.vue @@ -0,0 +1,69 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/controlFightTool/icons/close.png b/src/views/drone/components/virtualWarehouse/components/controlFightTool/icons/close.png new file mode 100644 index 0000000..9f34cca Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/components/controlFightTool/icons/close.png differ diff --git a/src/views/drone/components/virtualWarehouse/components/controlFightTool/index.vue b/src/views/drone/components/virtualWarehouse/components/controlFightTool/index.vue new file mode 100644 index 0000000..f3f06ff --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/controlFightTool/index.vue @@ -0,0 +1,285 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/inputNumber/index.vue b/src/views/drone/components/virtualWarehouse/components/inputNumber/index.vue new file mode 100644 index 0000000..66ba987 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/inputNumber/index.vue @@ -0,0 +1,116 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon1.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon1.svg new file mode 100644 index 0000000..f3a2dab --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon1.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon2.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon2.svg new file mode 100644 index 0000000..e816aa4 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon2_en.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon2_en.svg new file mode 100644 index 0000000..095af9b --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon2_en.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon3.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon3.svg new file mode 100644 index 0000000..1d64ecf --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon3.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon3_en.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon3_en.svg new file mode 100644 index 0000000..a250eed --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon3_en.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon4.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon4.svg new file mode 100644 index 0000000..d21ec5b --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon4.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon4_en.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon4_en.svg new file mode 100644 index 0000000..1836da1 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon4_en.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon5.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon5.svg new file mode 100644 index 0000000..8b1a767 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon5.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon5_en.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon5_en.svg new file mode 100644 index 0000000..fab90ab --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/icon5_en.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/power.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/power.svg new file mode 100644 index 0000000..7ec284c --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/power.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/record.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/record.svg new file mode 100644 index 0000000..38aee9a --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/record.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/icons/start_record.svg b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/start_record.svg new file mode 100644 index 0000000..cdb3ccd --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/icons/start_record.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/modeControl/index.vue b/src/views/drone/components/virtualWarehouse/components/modeControl/index.vue new file mode 100644 index 0000000..bb9ca81 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/modeControl/index.vue @@ -0,0 +1,305 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/myLoading/icons/loading2.png b/src/views/drone/components/virtualWarehouse/components/myLoading/icons/loading2.png new file mode 100644 index 0000000..219f578 Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/components/myLoading/icons/loading2.png differ diff --git a/src/views/drone/components/virtualWarehouse/components/myLoading/index.vue b/src/views/drone/components/virtualWarehouse/components/myLoading/index.vue new file mode 100644 index 0000000..3ac8f8a --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/myLoading/index.vue @@ -0,0 +1,46 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/btn.svg b/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/btn.svg new file mode 100644 index 0000000..cd2c61f --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/btn.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/ptz.svg b/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/ptz.svg new file mode 100644 index 0000000..b4e98d7 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/ptz.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/ptz1.svg b/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/ptz1.svg new file mode 100644 index 0000000..501adf6 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/ptzControl/icons/ptz1.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/components/ptzControl/index.vue b/src/views/drone/components/virtualWarehouse/components/ptzControl/index.vue new file mode 100644 index 0000000..ffe33a3 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/components/ptzControl/index.vue @@ -0,0 +1,369 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/Refresh.svg b/src/views/drone/components/virtualWarehouse/icons/Refresh.svg new file mode 100644 index 0000000..ec42ee9 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/Refresh.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/aircraft-camera-active.png b/src/views/drone/components/virtualWarehouse/icons/aircraft-camera-active.png new file mode 100644 index 0000000..80dbe17 Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/icons/aircraft-camera-active.png differ diff --git a/src/views/drone/components/virtualWarehouse/icons/bj.png b/src/views/drone/components/virtualWarehouse/icons/bj.png new file mode 100644 index 0000000..63c4708 Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/icons/bj.png differ diff --git a/src/views/drone/components/virtualWarehouse/icons/cerams.svg b/src/views/drone/components/virtualWarehouse/icons/cerams.svg new file mode 100644 index 0000000..34e475d --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/cerams.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/close.png b/src/views/drone/components/virtualWarehouse/icons/close.png new file mode 100644 index 0000000..43dbd3c Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/icons/close.png differ diff --git a/src/views/drone/components/virtualWarehouse/icons/close1.png b/src/views/drone/components/virtualWarehouse/icons/close1.png new file mode 100644 index 0000000..befc8f7 Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/icons/close1.png differ diff --git a/src/views/drone/components/virtualWarehouse/icons/lamp.svg b/src/views/drone/components/virtualWarehouse/icons/lamp.svg new file mode 100644 index 0000000..4ede39f --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/lamp.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/line.png b/src/views/drone/components/virtualWarehouse/icons/line.png new file mode 100644 index 0000000..95e54ab Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/icons/line.png differ diff --git a/src/views/drone/components/virtualWarehouse/icons/photo.svg b/src/views/drone/components/virtualWarehouse/icons/photo.svg new file mode 100644 index 0000000..6503e03 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/photo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/reset.svg b/src/views/drone/components/virtualWarehouse/icons/reset.svg new file mode 100644 index 0000000..7c09c3a --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/reset.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/shouTip.svg b/src/views/drone/components/virtualWarehouse/icons/shouTip.svg new file mode 100644 index 0000000..f104cb2 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/shouTip.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/shrink.svg b/src/views/drone/components/virtualWarehouse/icons/shrink.svg new file mode 100644 index 0000000..73c9101 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/shrink.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/start.svg b/src/views/drone/components/virtualWarehouse/icons/start.svg new file mode 100644 index 0000000..63e1079 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/start.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/tool.svg b/src/views/drone/components/virtualWarehouse/icons/tool.svg new file mode 100644 index 0000000..2ba1e3e --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/tool.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/tool1.svg b/src/views/drone/components/virtualWarehouse/icons/tool1.svg new file mode 100644 index 0000000..c7f114e --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/icons/tool1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/icons/uav-bgd-open.png b/src/views/drone/components/virtualWarehouse/icons/uav-bgd-open.png new file mode 100644 index 0000000..cb3281a Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/icons/uav-bgd-open.png differ diff --git a/src/views/drone/components/virtualWarehouse/icons/uav-bgd.png b/src/views/drone/components/virtualWarehouse/icons/uav-bgd.png new file mode 100644 index 0000000..ffd54b8 Binary files /dev/null and b/src/views/drone/components/virtualWarehouse/icons/uav-bgd.png differ diff --git a/src/views/drone/components/virtualWarehouse/index.js b/src/views/drone/components/virtualWarehouse/index.js new file mode 100644 index 0000000..e72ec1e --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/index.js @@ -0,0 +1,5 @@ +export const lostAction = [ + { id: 1, label: "悬停" }, + { id: 2, label: "返航" }, + { id: 3, label: "继续执行" }, +]; diff --git a/src/views/drone/components/virtualWarehouse/index.vue b/src/views/drone/components/virtualWarehouse/index.vue new file mode 100644 index 0000000..220058f --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/index.vue @@ -0,0 +1,1088 @@ + + + + diff --git a/src/views/drone/components/virtualWarehouse/style/comm.scss b/src/views/drone/components/virtualWarehouse/style/comm.scss new file mode 100644 index 0000000..3f81a22 --- /dev/null +++ b/src/views/drone/components/virtualWarehouse/style/comm.scss @@ -0,0 +1,122 @@ +.el-icon-arrow-up:before { + content: "▲"; + } + .el-select-dropdown { + background-color: rgba(0, 0, 0, 0.8); + border-color: rgba(0, 255, 255, 0.5); + } + .el-select-dropdown__item.hover, + .el-select-dropdown__item:hover { + background-color: rgba(0, 255, 255, 0.5); + } + .el-select-dropdown__item { + color: #fff; + } + .el-select-dropdown__item.selected { + color: rgba(0, 255, 255, 1); + } +.right_detail { + display: flex; + align-items: center; + padding: 20px 20px 10px 30px; + height: 100%; + .left_box { + > div { + margin: 10px; + > div { + margin-left: 20px; + .el-input__inner, + .el-input { + width: 120px !important; + } + } + } + } + .left_info { + display: flex; + align-items: center; + flex-direction: column; + justify-content: space-between; + > div { + display: flex; + justify-content: space-between; + align-items: center; + height: 32px; + > span { + font-size: 14px; + color: #fff; + width: 140px; + display: inline-block; + } + > div { + width: 120px; + height: 30px; + color: #fff; + display: grid; + place-items: center; + .lost_action { + .el-select { + width: 100%; + margin: 10px 0; + } + .el-input__inner { + background-color: rgba(0, 0, 0, 0.5); + border-color: rgba(0, 255, 255, 0.5); + color: #fff; + } + .el-select .el-input__inner:focus { + border-color: rgba(0, 255, 255, 0.5); + } + } + .custom-number-input input::-webkit-inner-spin-button, + .custom-number-input input::-webkit-outer-spin-button { + appearance: none; + margin: 0; + } + .el-input__inner { + height: 30px; + background: #f0f8ff00; + color: white; + border: 1px solid rgba(0, 255, 255, 0.5); + width: 90px; + } + .el-input { + width: 90px; + } + .button_right { + display: flex; + color: #fff; + font-size: 14px; + align-items: center; + height: 30px; + padding-right: 3px; + > div { + font-size: 9px; + color: #fff; + display: flex; + flex-direction: column; + align-items: center; + margin-right: 6px; + > span { + cursor: pointer; + } + & > span:hover { + color: #c7c7c7; + } + } + } + } + } + } + .take_off { + cursor: pointer; + width: 120px; + height: 100%; + margin-left: 20px; + display: grid; + place-items: center; + > img { + width: 100%; + } + } + } \ No newline at end of file diff --git a/src/views/drone/images/add.png b/src/views/drone/images/add.png new file mode 100644 index 0000000..ebc017a Binary files /dev/null and b/src/views/drone/images/add.png differ diff --git a/src/views/drone/images/add_plan.png b/src/views/drone/images/add_plan.png new file mode 100644 index 0000000..9c24c3c Binary files /dev/null and b/src/views/drone/images/add_plan.png differ diff --git a/src/views/drone/images/addh.png b/src/views/drone/images/addh.png new file mode 100644 index 0000000..0615269 Binary files /dev/null and b/src/views/drone/images/addh.png differ diff --git a/src/views/drone/images/after_f.png b/src/views/drone/images/after_f.png new file mode 100644 index 0000000..81e2024 Binary files /dev/null and b/src/views/drone/images/after_f.png differ diff --git a/src/views/drone/images/air.png b/src/views/drone/images/air.png new file mode 100644 index 0000000..e6b0ec8 Binary files /dev/null and b/src/views/drone/images/air.png differ diff --git a/src/views/drone/images/airlist.png b/src/views/drone/images/airlist.png new file mode 100644 index 0000000..1b7065b Binary files /dev/null and b/src/views/drone/images/airlist.png differ diff --git a/src/views/drone/images/airsetup.png b/src/views/drone/images/airsetup.png new file mode 100644 index 0000000..89e2b47 Binary files /dev/null and b/src/views/drone/images/airsetup.png differ diff --git a/src/views/drone/images/back.png b/src/views/drone/images/back.png new file mode 100644 index 0000000..6132cf3 Binary files /dev/null and b/src/views/drone/images/back.png differ diff --git a/src/views/drone/images/back_h.png b/src/views/drone/images/back_h.png new file mode 100644 index 0000000..beb4f26 Binary files /dev/null and b/src/views/drone/images/back_h.png differ diff --git a/src/views/drone/images/bottom_r.png b/src/views/drone/images/bottom_r.png new file mode 100644 index 0000000..31c2cab Binary files /dev/null and b/src/views/drone/images/bottom_r.png differ diff --git a/src/views/drone/images/climb.png b/src/views/drone/images/climb.png new file mode 100644 index 0000000..6224f46 Binary files /dev/null and b/src/views/drone/images/climb.png differ diff --git a/src/views/drone/images/close.png b/src/views/drone/images/close.png new file mode 100644 index 0000000..9f34cca Binary files /dev/null and b/src/views/drone/images/close.png differ diff --git a/src/views/drone/images/close1.png b/src/views/drone/images/close1.png new file mode 100644 index 0000000..fd712ca Binary files /dev/null and b/src/views/drone/images/close1.png differ diff --git a/src/views/drone/images/control_Isochronous.png b/src/views/drone/images/control_Isochronous.png new file mode 100644 index 0000000..9e9ae6a Binary files /dev/null and b/src/views/drone/images/control_Isochronous.png differ diff --git a/src/views/drone/images/control_add.png b/src/views/drone/images/control_add.png new file mode 100644 index 0000000..43e0f31 Binary files /dev/null and b/src/views/drone/images/control_add.png differ diff --git a/src/views/drone/images/control_aircraft.png b/src/views/drone/images/control_aircraft.png new file mode 100644 index 0000000..f99a667 Binary files /dev/null and b/src/views/drone/images/control_aircraft.png differ diff --git a/src/views/drone/images/control_equidistant.png b/src/views/drone/images/control_equidistant.png new file mode 100644 index 0000000..7d3d382 Binary files /dev/null and b/src/views/drone/images/control_equidistant.png differ diff --git a/src/views/drone/images/control_hover.png b/src/views/drone/images/control_hover.png new file mode 100644 index 0000000..d3c5528 Binary files /dev/null and b/src/views/drone/images/control_hover.png differ diff --git a/src/views/drone/images/control_interval.png b/src/views/drone/images/control_interval.png new file mode 100644 index 0000000..8096a8c Binary files /dev/null and b/src/views/drone/images/control_interval.png differ diff --git a/src/views/drone/images/control_more.png b/src/views/drone/images/control_more.png new file mode 100644 index 0000000..eede88c Binary files /dev/null and b/src/views/drone/images/control_more.png differ diff --git a/src/views/drone/images/control_panorama.png b/src/views/drone/images/control_panorama.png new file mode 100644 index 0000000..16fe20f Binary files /dev/null and b/src/views/drone/images/control_panorama.png differ diff --git a/src/views/drone/images/control_photograph.png b/src/views/drone/images/control_photograph.png new file mode 100644 index 0000000..9b6c940 Binary files /dev/null and b/src/views/drone/images/control_photograph.png differ diff --git a/src/views/drone/images/control_pitch.png b/src/views/drone/images/control_pitch.png new file mode 100644 index 0000000..9f411f2 Binary files /dev/null and b/src/views/drone/images/control_pitch.png differ diff --git a/src/views/drone/images/control_start.png b/src/views/drone/images/control_start.png new file mode 100644 index 0000000..b50f7ef Binary files /dev/null and b/src/views/drone/images/control_start.png differ diff --git a/src/views/drone/images/control_suspend.png b/src/views/drone/images/control_suspend.png new file mode 100644 index 0000000..5292f2a Binary files /dev/null and b/src/views/drone/images/control_suspend.png differ diff --git a/src/views/drone/images/control_yaw.png b/src/views/drone/images/control_yaw.png new file mode 100644 index 0000000..294df3a Binary files /dev/null and b/src/views/drone/images/control_yaw.png differ diff --git a/src/views/drone/images/control_zoom.png b/src/views/drone/images/control_zoom.png new file mode 100644 index 0000000..6d66a09 Binary files /dev/null and b/src/views/drone/images/control_zoom.png differ diff --git a/src/views/drone/images/del.png b/src/views/drone/images/del.png new file mode 100644 index 0000000..3301af7 Binary files /dev/null and b/src/views/drone/images/del.png differ diff --git a/src/views/drone/images/delh.png b/src/views/drone/images/delh.png new file mode 100644 index 0000000..066a918 Binary files /dev/null and b/src/views/drone/images/delh.png differ diff --git a/src/views/drone/images/edit.png b/src/views/drone/images/edit.png new file mode 100644 index 0000000..ff046f9 Binary files /dev/null and b/src/views/drone/images/edit.png differ diff --git a/src/views/drone/images/edith.png b/src/views/drone/images/edith.png new file mode 100644 index 0000000..beea58d Binary files /dev/null and b/src/views/drone/images/edith.png differ diff --git a/src/views/drone/images/eq.png b/src/views/drone/images/eq.png new file mode 100644 index 0000000..09a31b8 Binary files /dev/null and b/src/views/drone/images/eq.png differ diff --git a/src/views/drone/images/fanhang.png b/src/views/drone/images/fanhang.png new file mode 100644 index 0000000..f16cda1 Binary files /dev/null and b/src/views/drone/images/fanhang.png differ diff --git a/src/views/drone/images/feiji.png b/src/views/drone/images/feiji.png new file mode 100644 index 0000000..de203f7 Binary files /dev/null and b/src/views/drone/images/feiji.png differ diff --git a/src/views/drone/images/flyh.png b/src/views/drone/images/flyh.png new file mode 100644 index 0000000..0bdd340 Binary files /dev/null and b/src/views/drone/images/flyh.png differ diff --git a/src/views/drone/images/guaqi.png b/src/views/drone/images/guaqi.png new file mode 100644 index 0000000..cb84528 Binary files /dev/null and b/src/views/drone/images/guaqi.png differ diff --git a/src/views/drone/images/head.png b/src/views/drone/images/head.png new file mode 100644 index 0000000..4d0e67e Binary files /dev/null and b/src/views/drone/images/head.png differ diff --git a/src/views/drone/images/home/UAV-bg.png b/src/views/drone/images/home/UAV-bg.png new file mode 100644 index 0000000..cecb568 Binary files /dev/null and b/src/views/drone/images/home/UAV-bg.png differ diff --git a/src/views/drone/images/home/action.png b/src/views/drone/images/home/action.png new file mode 100644 index 0000000..771cbf6 Binary files /dev/null and b/src/views/drone/images/home/action.png differ diff --git a/src/views/drone/images/home/aircraft-camera-active.png b/src/views/drone/images/home/aircraft-camera-active.png new file mode 100644 index 0000000..80dbe17 Binary files /dev/null and b/src/views/drone/images/home/aircraft-camera-active.png differ diff --git a/src/views/drone/images/home/aircraft-camera.png b/src/views/drone/images/home/aircraft-camera.png new file mode 100644 index 0000000..3f3eb58 Binary files /dev/null and b/src/views/drone/images/home/aircraft-camera.png differ diff --git a/src/views/drone/images/home/aircraft.png b/src/views/drone/images/home/aircraft.png new file mode 100644 index 0000000..d8a4cb2 Binary files /dev/null and b/src/views/drone/images/home/aircraft.png differ diff --git a/src/views/drone/images/home/border-lb.png b/src/views/drone/images/home/border-lb.png new file mode 100644 index 0000000..a46e477 Binary files /dev/null and b/src/views/drone/images/home/border-lb.png differ diff --git a/src/views/drone/images/home/border-lt.png b/src/views/drone/images/home/border-lt.png new file mode 100644 index 0000000..9432710 Binary files /dev/null and b/src/views/drone/images/home/border-lt.png differ diff --git a/src/views/drone/images/home/border-rb.png b/src/views/drone/images/home/border-rb.png new file mode 100644 index 0000000..11170de Binary files /dev/null and b/src/views/drone/images/home/border-rb.png differ diff --git a/src/views/drone/images/home/border-rt.png b/src/views/drone/images/home/border-rt.png new file mode 100644 index 0000000..30c03c6 Binary files /dev/null and b/src/views/drone/images/home/border-rt.png differ diff --git a/src/views/drone/images/home/cabin.png b/src/views/drone/images/home/cabin.png new file mode 100644 index 0000000..1cc30e8 Binary files /dev/null and b/src/views/drone/images/home/cabin.png differ diff --git a/src/views/drone/images/home/calibration.png b/src/views/drone/images/home/calibration.png new file mode 100644 index 0000000..cd57413 Binary files /dev/null and b/src/views/drone/images/home/calibration.png differ diff --git a/src/views/drone/images/home/debug-cg.png b/src/views/drone/images/home/debug-cg.png new file mode 100644 index 0000000..78c98f0 Binary files /dev/null and b/src/views/drone/images/home/debug-cg.png differ diff --git a/src/views/drone/images/home/debug-fxq.png b/src/views/drone/images/home/debug-fxq.png new file mode 100644 index 0000000..d1c79bd Binary files /dev/null and b/src/views/drone/images/home/debug-fxq.png differ diff --git a/src/views/drone/images/home/debug-jccc.png b/src/views/drone/images/home/debug-jccc.png new file mode 100644 index 0000000..5c6a134 Binary files /dev/null and b/src/views/drone/images/home/debug-jccc.png differ diff --git a/src/views/drone/images/home/debug-jcxt.png b/src/views/drone/images/home/debug-jcxt.png new file mode 100644 index 0000000..a4f402a Binary files /dev/null and b/src/views/drone/images/home/debug-jcxt.png differ diff --git a/src/views/drone/images/home/debug-jyms.png b/src/views/drone/images/home/debug-jyms.png new file mode 100644 index 0000000..473663a Binary files /dev/null and b/src/views/drone/images/home/debug-jyms.png differ diff --git a/src/views/drone/images/home/debug-kt.png b/src/views/drone/images/home/debug-kt.png new file mode 100644 index 0000000..9999cad Binary files /dev/null and b/src/views/drone/images/home/debug-kt.png differ diff --git a/src/views/drone/images/home/debug-tg.png b/src/views/drone/images/home/debug-tg.png new file mode 100644 index 0000000..78c98f0 Binary files /dev/null and b/src/views/drone/images/home/debug-tg.png differ diff --git a/src/views/drone/images/home/debug-zqtc.png b/src/views/drone/images/home/debug-zqtc.png new file mode 100644 index 0000000..461d6e7 Binary files /dev/null and b/src/views/drone/images/home/debug-zqtc.png differ diff --git a/src/views/drone/images/home/file.png b/src/views/drone/images/home/file.png new file mode 100644 index 0000000..b3935dc Binary files /dev/null and b/src/views/drone/images/home/file.png differ diff --git a/src/views/drone/images/home/jicang.png b/src/views/drone/images/home/jicang.png new file mode 100644 index 0000000..2732bdb Binary files /dev/null and b/src/views/drone/images/home/jicang.png differ diff --git a/src/views/drone/images/home/live-stop.png b/src/views/drone/images/home/live-stop.png new file mode 100644 index 0000000..e9f93b1 Binary files /dev/null and b/src/views/drone/images/home/live-stop.png differ diff --git a/src/views/drone/images/home/loading.png b/src/views/drone/images/home/loading.png new file mode 100644 index 0000000..636ec32 Binary files /dev/null and b/src/views/drone/images/home/loading.png differ diff --git a/src/views/drone/images/home/local-point.png b/src/views/drone/images/home/local-point.png new file mode 100644 index 0000000..b1b24dd Binary files /dev/null and b/src/views/drone/images/home/local-point.png differ diff --git a/src/views/drone/images/home/module-item-title.png b/src/views/drone/images/home/module-item-title.png new file mode 100644 index 0000000..2434056 Binary files /dev/null and b/src/views/drone/images/home/module-item-title.png differ diff --git a/src/views/drone/images/home/over.png b/src/views/drone/images/home/over.png new file mode 100644 index 0000000..1dc0c63 Binary files /dev/null and b/src/views/drone/images/home/over.png differ diff --git a/src/views/drone/images/home/paizhao.png b/src/views/drone/images/home/paizhao.png new file mode 100644 index 0000000..dfb80ca Binary files /dev/null and b/src/views/drone/images/home/paizhao.png differ diff --git a/src/views/drone/images/home/pzsyl.png b/src/views/drone/images/home/pzsyl.png new file mode 100644 index 0000000..0782ee8 Binary files /dev/null and b/src/views/drone/images/home/pzsyl.png differ diff --git a/src/views/drone/images/home/recharge.png b/src/views/drone/images/home/recharge.png new file mode 100644 index 0000000..cff400f Binary files /dev/null and b/src/views/drone/images/home/recharge.png differ diff --git a/src/views/drone/images/home/satellite.png b/src/views/drone/images/home/satellite.png new file mode 100644 index 0000000..9b23658 Binary files /dev/null and b/src/views/drone/images/home/satellite.png differ diff --git a/src/views/drone/images/home/uav-bgd-open.png b/src/views/drone/images/home/uav-bgd-open.png new file mode 100644 index 0000000..cb3281a Binary files /dev/null and b/src/views/drone/images/home/uav-bgd-open.png differ diff --git a/src/views/drone/images/home/uav-bgd.png b/src/views/drone/images/home/uav-bgd.png new file mode 100644 index 0000000..ffd54b8 Binary files /dev/null and b/src/views/drone/images/home/uav-bgd.png differ diff --git a/src/views/drone/images/home/uav-close.png b/src/views/drone/images/home/uav-close.png new file mode 100644 index 0000000..0e41de4 Binary files /dev/null and b/src/views/drone/images/home/uav-close.png differ diff --git a/src/views/drone/images/home/uav-local.png b/src/views/drone/images/home/uav-local.png new file mode 100644 index 0000000..1b611de Binary files /dev/null and b/src/views/drone/images/home/uav-local.png differ diff --git a/src/views/drone/images/home/uav-monitor.png b/src/views/drone/images/home/uav-monitor.png new file mode 100644 index 0000000..d550a20 Binary files /dev/null and b/src/views/drone/images/home/uav-monitor.png differ diff --git a/src/views/drone/images/home/uav-reset.png b/src/views/drone/images/home/uav-reset.png new file mode 100644 index 0000000..82f1042 Binary files /dev/null and b/src/views/drone/images/home/uav-reset.png differ diff --git a/src/views/drone/images/home/uav-screen-esc.png b/src/views/drone/images/home/uav-screen-esc.png new file mode 100644 index 0000000..fb69a2b Binary files /dev/null and b/src/views/drone/images/home/uav-screen-esc.png differ diff --git a/src/views/drone/images/home/uav-screen.png b/src/views/drone/images/home/uav-screen.png new file mode 100644 index 0000000..a78b5ca Binary files /dev/null and b/src/views/drone/images/home/uav-screen.png differ diff --git a/src/views/drone/images/home/uav-set.png b/src/views/drone/images/home/uav-set.png new file mode 100644 index 0000000..1c6eda1 Binary files /dev/null and b/src/views/drone/images/home/uav-set.png differ diff --git a/src/views/drone/images/home/uav.png b/src/views/drone/images/home/uav.png new file mode 100644 index 0000000..065e747 Binary files /dev/null and b/src/views/drone/images/home/uav.png differ diff --git a/src/views/drone/images/hover.png b/src/views/drone/images/hover.png new file mode 100644 index 0000000..5d20a63 Binary files /dev/null and b/src/views/drone/images/hover.png differ diff --git a/src/views/drone/images/huifu.png b/src/views/drone/images/huifu.png new file mode 100644 index 0000000..0ad0385 Binary files /dev/null and b/src/views/drone/images/huifu.png differ diff --git a/src/views/drone/images/importpath.png b/src/views/drone/images/importpath.png new file mode 100644 index 0000000..0838bcc Binary files /dev/null and b/src/views/drone/images/importpath.png differ diff --git a/src/views/drone/images/importpathh.png b/src/views/drone/images/importpathh.png new file mode 100644 index 0000000..dff56a5 Binary files /dev/null and b/src/views/drone/images/importpathh.png differ diff --git a/src/views/drone/images/jichang.png b/src/views/drone/images/jichang.png new file mode 100644 index 0000000..38f35d1 Binary files /dev/null and b/src/views/drone/images/jichang.png differ diff --git a/src/views/drone/images/left.png b/src/views/drone/images/left.png new file mode 100644 index 0000000..d1505ae Binary files /dev/null and b/src/views/drone/images/left.png differ diff --git a/src/views/drone/images/left_f.png b/src/views/drone/images/left_f.png new file mode 100644 index 0000000..fb5b93e Binary files /dev/null and b/src/views/drone/images/left_f.png differ diff --git a/src/views/drone/images/loading.png b/src/views/drone/images/loading.png new file mode 100644 index 0000000..dec43b8 Binary files /dev/null and b/src/views/drone/images/loading.png differ diff --git a/src/views/drone/images/loadingdow.gif b/src/views/drone/images/loadingdow.gif new file mode 100644 index 0000000..6bb1f10 Binary files /dev/null and b/src/views/drone/images/loadingdow.gif differ diff --git a/src/views/drone/images/medium/arrow.png b/src/views/drone/images/medium/arrow.png new file mode 100644 index 0000000..dee6da7 Binary files /dev/null and b/src/views/drone/images/medium/arrow.png differ diff --git a/src/views/drone/images/medium/close.png b/src/views/drone/images/medium/close.png new file mode 100644 index 0000000..48a93a3 Binary files /dev/null and b/src/views/drone/images/medium/close.png differ diff --git a/src/views/drone/images/medium/delete.png b/src/views/drone/images/medium/delete.png new file mode 100644 index 0000000..6efad58 Binary files /dev/null and b/src/views/drone/images/medium/delete.png differ diff --git a/src/views/drone/images/medium/down-load.png b/src/views/drone/images/medium/down-load.png new file mode 100644 index 0000000..e17fd57 Binary files /dev/null and b/src/views/drone/images/medium/down-load.png differ diff --git a/src/views/drone/images/medium/files-icon.png b/src/views/drone/images/medium/files-icon.png new file mode 100644 index 0000000..f1e076f Binary files /dev/null and b/src/views/drone/images/medium/files-icon.png differ diff --git a/src/views/drone/images/medium/medium-img.png b/src/views/drone/images/medium/medium-img.png new file mode 100644 index 0000000..be4eb29 Binary files /dev/null and b/src/views/drone/images/medium/medium-img.png differ diff --git a/src/views/drone/images/medium/medium-storage.png b/src/views/drone/images/medium/medium-storage.png new file mode 100644 index 0000000..7fbed3e Binary files /dev/null and b/src/views/drone/images/medium/medium-storage.png differ diff --git a/src/views/drone/images/medium/medium-video.png b/src/views/drone/images/medium/medium-video.png new file mode 100644 index 0000000..2432712 Binary files /dev/null and b/src/views/drone/images/medium/medium-video.png differ diff --git a/src/views/drone/images/medium/prview-icon.png b/src/views/drone/images/medium/prview-icon.png new file mode 100644 index 0000000..a807723 Binary files /dev/null and b/src/views/drone/images/medium/prview-icon.png differ diff --git a/src/views/drone/images/medium/refresh.png b/src/views/drone/images/medium/refresh.png new file mode 100644 index 0000000..8a8baaf Binary files /dev/null and b/src/views/drone/images/medium/refresh.png differ diff --git a/src/views/drone/images/medium/video-icon.png b/src/views/drone/images/medium/video-icon.png new file mode 100644 index 0000000..f60ed92 Binary files /dev/null and b/src/views/drone/images/medium/video-icon.png differ diff --git a/src/views/drone/images/more1.png b/src/views/drone/images/more1.png new file mode 100644 index 0000000..3caaabf Binary files /dev/null and b/src/views/drone/images/more1.png differ diff --git a/src/views/drone/images/more2.png b/src/views/drone/images/more2.png new file mode 100644 index 0000000..b652e9f Binary files /dev/null and b/src/views/drone/images/more2.png differ diff --git a/src/views/drone/images/point.png b/src/views/drone/images/point.png new file mode 100644 index 0000000..4b9c3b5 Binary files /dev/null and b/src/views/drone/images/point.png differ diff --git a/src/views/drone/images/right.png b/src/views/drone/images/right.png new file mode 100644 index 0000000..1b4325d Binary files /dev/null and b/src/views/drone/images/right.png differ diff --git a/src/views/drone/images/right_f.png b/src/views/drone/images/right_f.png new file mode 100644 index 0000000..ff790c9 Binary files /dev/null and b/src/views/drone/images/right_f.png differ diff --git a/src/views/drone/images/save.png b/src/views/drone/images/save.png new file mode 100644 index 0000000..10f6d83 Binary files /dev/null and b/src/views/drone/images/save.png differ diff --git a/src/views/drone/images/saveh.png b/src/views/drone/images/saveh.png new file mode 100644 index 0000000..85ad900 Binary files /dev/null and b/src/views/drone/images/saveh.png differ diff --git a/src/views/drone/images/shanchu.png b/src/views/drone/images/shanchu.png new file mode 100644 index 0000000..04cfd04 Binary files /dev/null and b/src/views/drone/images/shanchu.png differ diff --git a/src/views/drone/images/switch.png b/src/views/drone/images/switch.png new file mode 100644 index 0000000..26f9397 Binary files /dev/null and b/src/views/drone/images/switch.png differ diff --git a/src/views/drone/images/switchh.png b/src/views/drone/images/switchh.png new file mode 100644 index 0000000..cf11678 Binary files /dev/null and b/src/views/drone/images/switchh.png differ diff --git a/src/views/drone/images/tab.png b/src/views/drone/images/tab.png new file mode 100644 index 0000000..8ef5ec4 Binary files /dev/null and b/src/views/drone/images/tab.png differ diff --git a/src/views/drone/images/tab_h.png b/src/views/drone/images/tab_h.png new file mode 100644 index 0000000..8793eac Binary files /dev/null and b/src/views/drone/images/tab_h.png differ diff --git a/src/views/drone/images/time.png b/src/views/drone/images/time.png new file mode 100644 index 0000000..252238a Binary files /dev/null and b/src/views/drone/images/time.png differ diff --git a/src/views/drone/images/title.png b/src/views/drone/images/title.png new file mode 100644 index 0000000..4c66b1b Binary files /dev/null and b/src/views/drone/images/title.png differ diff --git a/src/views/drone/images/top.png b/src/views/drone/images/top.png new file mode 100644 index 0000000..486309e Binary files /dev/null and b/src/views/drone/images/top.png differ diff --git a/src/views/drone/images/top_r.png b/src/views/drone/images/top_r.png new file mode 100644 index 0000000..9cbabd6 Binary files /dev/null and b/src/views/drone/images/top_r.png differ diff --git a/src/views/drone/images/wurenji.png b/src/views/drone/images/wurenji.png new file mode 100644 index 0000000..1d4f443 Binary files /dev/null and b/src/views/drone/images/wurenji.png differ diff --git a/src/views/drone/images/zanting.png b/src/views/drone/images/zanting.png new file mode 100644 index 0000000..5b34b19 Binary files /dev/null and b/src/views/drone/images/zanting.png differ diff --git a/src/views/drone/index.vue b/src/views/drone/index.vue new file mode 100644 index 0000000..f47b7a3 --- /dev/null +++ b/src/views/drone/index.vue @@ -0,0 +1,648 @@ + + + + diff --git a/src/views/drone/style/common.scss b/src/views/drone/style/common.scss new file mode 100644 index 0000000..af843ea --- /dev/null +++ b/src/views/drone/style/common.scss @@ -0,0 +1,62 @@ +.uav_box { + width: 400px; + height: 90%; + position: absolute; + top: 8%; + z-index: 20; + border-radius: 8px; + background: rgba(0, 0, 0, 0.5); + border: 1px solid rgba(0, 255, 255, 0.5); + padding: 15px 10px; +} +.flex { + display: flex; +} +.space_between { + justify-content: space-between; +} +.center { + justify-content: center; +} +.ai_center { + align-items: center; +} +.m10 { + margin: 10px 0; +} +.ml10 { + margin-left: 10px; +} +.mr20 { + margin-right: 20px; +} +.mr10 { + margin-right: 10px; +} +.mt15 { + margin-top: 15px; +} +.mb10 { + margin-bottom: 10px; +} +.f14 { + font-size: 14px; +} +.f12 { + font-size: 12px; +} +.f30 { + font-size: 30px; +} +.fw500 { + font-weight: 500; +} +.text_algin_right { + text-align: right; +} +.text_algin_left { + text-align: left; +} +.text_algin_center { + text-align: center; +} diff --git a/src/views/drone/utils/options.js b/src/views/drone/utils/options.js new file mode 100644 index 0000000..c198abc --- /dev/null +++ b/src/views/drone/utils/options.js @@ -0,0 +1,107 @@ +// 航点类型 +export const waypointType = [ + { + value: "1", + label: "协调转弯,不过点,提前转弯", + }, + { + value: "2", + label: "直线飞行,飞行器到点停", + }, + { + value: "3", + label: "平滑过点,提前转弯", + }, + { + value: "4", + label: "曲线飞行,飞行器到点停", + }, + { + value: "5", + label: "曲线飞行,飞行器到点不停", + }, +]; +// 偏航角模式 +export const yawAngleMode = [ + { + value: "1", + label: "沿航线方向", + }, + { + value: "2", + label: "手动控制", + }, + { + value: "3", + label: "锁定当前偏航角", + }, +]; +// 完成动作 +export const completeAction = [ + { + value: "1", + label: "自动返航", + }, + { + value: "2", + label: "返回航线起始点悬停", + }, + { + value: "3", + label: "推出航线模式", + }, + { + value: "4", + label: "原地降落", + }, +]; + +// 失控选项 +export const exitWaylineOptions = [ + { + label: "继续执行航线", + value: 0, + }, + { + label: "退出并执行失控动作", + value: 1, + }, +]; +// 精度模式 +export const waylinePrecisionTypeOptions = [ + { + label: "GPS 任务", + value: 0, + }, + { + label: "高精度 RTK 任务", + value: 1, + }, +]; +// 失控动作类型 +export const outOfControlOptions = [ + { + label: "返航", + value: 0, + }, + { + label: "悬停", + value: 1, + }, + { + label: "降落", + value: 2, + }, +]; + +// 返航高度模式 +export const rthModeOptions = [ + { + label: "智能高度", + value: 0, + }, + // { + // label: "设定高度", + // value: 1, + // }, +]; diff --git a/src/views/gisHome/index.vue b/src/views/gisHome/index.vue index 56dfb78..8ed4d22 100644 --- a/src/views/gisHome/index.vue +++ b/src/views/gisHome/index.vue @@ -6,7 +6,7 @@
安全生产天数:
-
1,235
+
{{ safetyDay }}
@@ -17,7 +17,7 @@