diff --git a/auto-imports.d.ts b/auto-imports.d.ts index ba90363..f06c23a 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -2,6 +2,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElMessage: typeof import('element-plus/es')['ElMessage'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] diff --git a/src/views/cesiums/App.vue b/src/views/cesiums/App.vue index 8323bec..5da98c9 100644 --- a/src/views/cesiums/App.vue +++ b/src/views/cesiums/App.vue @@ -1,13 +1,7 @@ - - - diff --git a/src/views/cesiums/CesiumViewers.vue b/src/views/cesiums/CesiumViewers.vue new file mode 100644 index 0000000..e25800c --- /dev/null +++ b/src/views/cesiums/CesiumViewers.vue @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/cesiums/DrawingToolPanel.vue b/src/views/cesiums/DrawingToolPanel.vue index 1127d7a..b7be3fd 100644 --- a/src/views/cesiums/DrawingToolPanel.vue +++ b/src/views/cesiums/DrawingToolPanel.vue @@ -328,19 +328,6 @@ import { ref } from 'vue'; import * as Cesium from 'cesium'; import type { DrawingResult } from './components/DrawingTool'; -// const props = defineProps<{ -// isDrawing: boolean; -// currentDrawingType: string | null; -// drawings: Map; -// selectedDrawing: string | null; -// drawingInfo: any; -// drawingOptions: any; -// getDrawingStatus: () => string; -// getDrawingInfoText: () => string; -// printSelectedDrawingInfo: () => void; -// printAllDrawingsInfo: () => void; -// exportSelectedDrawingAsText: () => string; -// }>(); // 定义props const props = defineProps<{ diff --git a/src/views/cesiums/ImportToolPanel.vue b/src/views/cesiums/ImportToolPanel.vue index 9ff0852..e376ba9 100644 --- a/src/views/cesiums/ImportToolPanel.vue +++ b/src/views/cesiums/ImportToolPanel.vue @@ -124,7 +124,6 @@ + + \ No newline at end of file diff --git a/src/views/cesiums/api.js b/src/views/cesiums/api.js new file mode 100644 index 0000000..672387b --- /dev/null +++ b/src/views/cesiums/api.js @@ -0,0 +1,161 @@ +import request from '@/utils/request' + +/** + * + * @param {*} options + * 航线规划添加项目 + */ +export function addPlaning (options) { + return request({ + url: `/item`, + method: 'post', + data: options, + }) +} + +/** + * + * @param {*} options + * 获取应用列表 + */ +export function getApplicationList (data) { + return request({ + url: `/app/management/findApplicationList`, + method: 'get', + params: data + }) +} + + +/** +* @param {*} options +* 获取项目列表 +*/ +export function getPlaningList_c (data) { + return request({ + url: `/item/list`, + method: 'get', + params: data + }) +} + + +/** + * 新增航线 + */ + +// export function addAirLine_c (data) { +// return request({ +// url: `/airline`, +// method: 'post', +// data: data +// }) +// } +export function addAirLine_c (data) { + return request({ + url: `/airspace`, + method: 'post', + data: data + }) +} + + +/** + * 修改航线 + */ +// export function eidtAirLine_c (data) { +// return request({ +// url: `/airline`, +// method: 'put', +// data: data +// }) +// } +export function eidtAirLine_c (data) { + return request({ + url: `/airspace`, + method: 'put', + data: data + }) +} +/** + * 获取航线详情 + */ + +// export function getLineListDetial_c (data) { +// return request({ +// url: `/airline/` + data, +// method: 'GET', +// }) +// } +export function getLineListDetial_c (data) { + return request({ + url: `/airspace/` + data, + method: 'GET', + }) +} +export function getPlottingByUuid (data) { + return request({ + url: '/plot/selectPlotByUuid/'+ data, + method: 'get' + }) +} + + +/** + * 获取无人机类型 + */ + +export function getSelectUavTypeList_c () { + return request({ + url: '/type/selectUavTypeList', + method: 'GET', + }) +} + + +/** + * 获取航线列表 + */ + +// export function getLineList_c (data) { +// return request({ +// url: `/airline/list`, +// method: 'GET', +// params: data +// }) +// } +export function getLineList_c (data) { + return request({ + url: `/airspace/list`, + method: 'GET', + params: data + }) +} + +export function API_PUT_archiveAirline (id) { + return request({ + url: '/airline/archive/' + id, + method: 'put' + }) +} + +export function API_PUT_removeAirline (id) { + return request({ + // url: '/airline/remove/' + id, + url: '/airspace/' + id, + method: 'DELETE' + }) +} +export function API_PUT_removeAspace (id) { + return request({ + url: '/airspace/' + id, + method: 'DElETE' + }) +} +//查询分组 +export function getGroupList () { + return request({ + url: `/airline/groups/groups`, + method: 'GET', + }) +} \ No newline at end of file diff --git a/src/views/cesiums/c_airspace.vue b/src/views/cesiums/c_airspace.vue new file mode 100644 index 0000000..a5999ea --- /dev/null +++ b/src/views/cesiums/c_airspace.vue @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/cesiums/components/ele.dark.style.css b/src/views/cesiums/components/ele.dark.style.css new file mode 100644 index 0000000..575d2b3 --- /dev/null +++ b/src/views/cesiums/components/ele.dark.style.css @@ -0,0 +1,92 @@ +.dark { + color-scheme: dark; + --el-color-primary: #409eff; + --el-color-primary-light-3: #3375b9; + --el-color-primary-light-5: #2a598a; + --el-color-primary-light-7: #213d5b; + --el-color-primary-light-8: #1d3043; + --el-color-primary-light-9: #18222c; + --el-color-primary-dark-2: #66b1ff; + --el-color-success: #67c23a; + --el-color-success-light-3: #4e8e2f; + --el-color-success-light-5: #3e6b27; + --el-color-success-light-7: #2d481f; + --el-color-success-light-8: #25371c; + --el-color-success-light-9: #1c2518; + --el-color-success-dark-2: #85ce61; + --el-color-warning: #e6a23c; + --el-color-warning-light-3: #a77730; + --el-color-warning-light-5: #7d5b28; + --el-color-warning-light-7: #533f20; + --el-color-warning-light-8: #3e301c; + --el-color-warning-light-9: #292218; + --el-color-warning-dark-2: #ebb563; + --el-color-danger: #f56c6c; + --el-color-danger-light-3: #b25252; + --el-color-danger-light-5: #854040; + --el-color-danger-light-7: #582e2e; + --el-color-danger-light-8: #412626; + --el-color-danger-light-9: #2b1d1d; + --el-color-danger-dark-2: #f78989; + --el-color-error: #f56c6c; + --el-color-error-light-3: #b25252; + --el-color-error-light-5: #854040; + --el-color-error-light-7: #582e2e; + --el-color-error-light-8: #412626; + --el-color-error-light-9: #2b1d1d; + --el-color-error-dark-2: #f78989; + --el-color-info: #909399; + --el-color-info-light-3: #6b6d71; + --el-color-info-light-5: #525457; + --el-color-info-light-7: #393a3c; + --el-color-info-light-8: #2d2d2f; + --el-color-info-light-9: #202121; + --el-color-info-dark-2: #a6a9ad; + --el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.36), + 0px 8px 20px rgba(0, 0, 0, 0.72); + --el-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, 0.72); + --el-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, 0.72); + --el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, 0.72), + 0px 12px 32px #000000, 0px 8px 16px -8px #000000; + --el-bg-color-page: #0a0a0a; + --el-bg-color: #141414; + --el-bg-color-overlay: #1d1e1f; + --el-text-color-primary: #e5eaf3; + --el-text-color-regular: #cfd3dc; + --el-text-color-secondary: #a3a6ad; + --el-text-color-placeholder: #8d9095; + --el-text-color-disabled: #6c6e72; + --el-border-color-darker: #636466; + --el-border-color-dark: #58585b; + --el-border-color: #d9d9d9; + --el-border-color-light: #414243; + --el-border-color-lighter: #363637; + --el-border-color-extra-light: #2b2b2c; + --el-fill-color-darker: #424243; + --el-fill-color-dark: #39393a; + --el-fill-color: #303030; + --el-fill-color-light: #262727; + --el-fill-color-lighter: #1d1d1d; + --el-fill-color-extra-light: #191919; + --el-fill-color-blank: transparent; + --el-mask-color: rgba(0, 0, 0, 0.8); + --el-mask-color-extra-light: rgba(0, 0, 0, 0.3); +} +.dark .el-button { + --el-button-disabled-text-color: rgba(255, 255, 255, 0.5); +} +.dark .el-card { + --el-card-bg-color: var(--el-bg-color-overlay); +} +.dark .el-empty { + --el-empty-fill-color-0: var(--el-color-black); + --el-empty-fill-color-1: #4b4b52; + --el-empty-fill-color-2: #36383d; + --el-empty-fill-color-3: #1e1e20; + --el-empty-fill-color-4: #262629; + --el-empty-fill-color-5: #202124; + --el-empty-fill-color-6: #212224; + --el-empty-fill-color-7: #1b1c1f; + --el-empty-fill-color-8: #1c1d1f; + --el-empty-fill-color-9: #18181a; +} diff --git a/src/views/cesiums/components/routeAdd.vue b/src/views/cesiums/components/routeAdd.vue new file mode 100644 index 0000000..c7f6fa9 --- /dev/null +++ b/src/views/cesiums/components/routeAdd.vue @@ -0,0 +1,564 @@ + + + + + + + 创建空域 + + + + + + + + + + + + {{ item.name }} + + + + + {{ item.name }} + + + + + + + + + + + + {{ item.name }} + + + + + 绘制空域: + + + + + + 绘制空域: + + + + 清除空域 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/cesiums/components/routeGet.vue b/src/views/cesiums/components/routeGet.vue new file mode 100644 index 0000000..d3cffee --- /dev/null +++ b/src/views/cesiums/components/routeGet.vue @@ -0,0 +1,388 @@ + + + + + + 创建空域 + + + + + + + + + + + + {{ item.name }} + + + + + {{ item.name }} + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/cesiums/components/routeList.vue b/src/views/cesiums/components/routeList.vue new file mode 100644 index 0000000..916ba30 --- /dev/null +++ b/src/views/cesiums/components/routeList.vue @@ -0,0 +1,299 @@ + + + + + + 空域列表 + + + + + + + + + + + + + + + + + + + + + + + + + + 空域名称:{{item.name?item.name:'--'}} + + + 高度范围:{{0+"m~"+item.hightMax}}m + + 开始时间 {{item.planBeg}} + + + 截止时间 {{item.planEnd}} + + 创建时间:{{item.createTime}} + + + + + + + + + + + + 查看 + 编辑 + 删除 + + + + + + + + + + + diff --git a/src/views/cesiums/components/useDrawingManager.ts b/src/views/cesiums/components/useDrawingManager.ts index 1bfb52f..317df19 100644 --- a/src/views/cesiums/components/useDrawingManager.ts +++ b/src/views/cesiums/components/useDrawingManager.ts @@ -366,12 +366,29 @@ export function useDrawingManager(drawingTool: any) { // 修改参数类型为 a * 导入空域数据 */ const importAirspaceData = (data: any[], options: ImportOptions = {}): string[] => { + console.log("drawingTool:",drawingTool) + watch(() => drawingTool?.value, (newTool) => { + if (newTool) { + newTool.setCallbacks({ + onClick: (result: DrawingResult, info: DrawingInfo) => { + handleDrawingClick(result, info); + } + }); + } + }, { immediate: true }); + const getTool = () => { + console.log("drawingTool1:",drawingTool) + console.log("drawingTool2:",drawingTool?.value) + return drawingTool?.value; + }; const tool = getTool(); + console.log("tool:",tool) if (!tool) { console.error('❌ 绘图工具未初始化'); return []; } + console.log('开始导入空域数据:', data); console.log('开始导入空域数据,数量:', data.length); return tool.importAirspaceData(data, options); }; diff --git a/src/views/cesiums/sandtable.vue b/src/views/cesiums/sandtable.vue new file mode 100644 index 0000000..073869d --- /dev/null +++ b/src/views/cesiums/sandtable.vue @@ -0,0 +1,49 @@ + + + + + + + + + + + + + \ No newline at end of file