diff --git a/src/main/index.ts b/src/main/index.ts
index 69fd92b..69738f8 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -195,6 +195,7 @@ function createWindow(): void {
});
});
// 监听渲染进程创建新窗口的请求
+ // @ts-ignore
ipcMain.handle('create-new-window', async (event, params, url, option) => {
try {
const newWindow = await new BrowserWindow(params)
diff --git a/src/renderer/public/sdk/custom/css/index.css b/src/renderer/public/sdk/custom/css/index.css
index 37d4333..13c193a 100644
--- a/src/renderer/public/sdk/custom/css/index.css
+++ b/src/renderer/public/sdk/custom/css/index.css
@@ -899,14 +899,14 @@
.fly-roam>.content .table .tr .th:first-child,
.fly-roam>.content .table .tr .td:first-child {
- flex: 0 0 95px;
- width: 95px;
+ flex: 0 0 70px;
+ width: 70px;
}
.fly-roam>.content .table .tr .th:nth-child(2),
.fly-roam>.content .table .tr .td:nth-child(2) {
- flex: 0 0 240px;
- width: 240px;
+ flex: 0 0 100px;
+ width: 100px;
}
.fly-roam>.content .table .tr .th:last-child,
diff --git a/src/renderer/src/I18n/zh-CN.ts b/src/renderer/src/I18n/zh-CN.ts
index 59dc626..e4dea9b 100644
--- a/src/renderer/src/I18n/zh-CN.ts
+++ b/src/renderer/src/I18n/zh-CN.ts
@@ -1,3 +1,5 @@
+import { title } from "process";
+
export default {
week: {
0: '星期日',
@@ -163,7 +165,9 @@ export default {
authTime: '授权时间',
authCode: '授权码',
upload: '授权导入',
- authexpire: '授权过期'
+ authexpire: '授权过期',
+ authTempExpire: '授权正常',
+ noAuthexpire: '暂未授权',
},
systemSetting: {
setLanguage: '语言设置',
@@ -188,6 +192,7 @@ export default {
areaUnit: '面积单位',
heightUnit: '高度单位',
speedUnit: '速度单位',
+ administrativeArea: '行政区划',
skinList: {
yingguangse: '荧光色',
gonganlan: '科技蓝',
@@ -205,5 +210,9 @@ export default {
versions: {
version_code: '版本号',
version_update: '检查更新'
+ },
+ model: {
+ title: '模型选择',
+ setting: '默认模型参数设置'
}
}
diff --git a/src/renderer/src/api/route/index.ts b/src/renderer/src/api/route/index.ts
new file mode 100644
index 0000000..09a8140
--- /dev/null
+++ b/src/renderer/src/api/route/index.ts
@@ -0,0 +1,25 @@
+//路径规划
+import request from '@/axios/request'
+export const RouteApi = {
+ // 查看路径
+ queryRoute: async (data: any) => {
+ return await request.post({
+ url: `/graphhopper/route`,
+ data
+ });
+ },
+ //获取地图列表
+ getRouteList: async () => {
+ return await request.get({
+ url: `/graphhopper/list`
+ })
+ },
+ //加载路网数据
+ loadRoute: async (data: any) => {
+ return await request.post({
+ url: `/graphhopper/loadMap`,
+ data,
+ headersType: 'application/x-www-form-urlencoded'
+ })
+ },
+}
diff --git a/src/renderer/src/assets/i18n/lang/local_zh.js b/src/renderer/src/assets/i18n/lang/local_zh.js
index 25e986d..794ca02 100644
--- a/src/renderer/src/assets/i18n/lang/local_zh.js
+++ b/src/renderer/src/assets/i18n/lang/local_zh.js
@@ -1,335 +1,330 @@
// productName
-let obj = require("../../../../../config/app_config");
-console.log(obj);
+let obj = require('../../../../../config/app_config')
+console.log(obj)
module.exports = {
title: {
- name: obj.productName, //"实景三维数字孪生系统"
+ name: obj.productName //"实景三维数字孪生系统"
},
login: {
- signIn: "登录",
+ signIn: '登录'
},
dashboard: {
- langLable: "中文简体",
+ langLable: '中文简体'
},
leftMenu: {
firstMenu: {
- measure: "测量库",
- tool: "工具库",
- effect: "特效库",
- bigData: "大数据",
- modelLibrary: "模型库",
- situation: "方案库",
- onlinePictureSource: "在线图源",
- analysis: "分析库",
- militaryMark: "军标库",
- ersanwei: "二三维",
- junbiao3d: "三维军标",
+ measure: '测量库',
+ tool: '工具库',
+ effect: '特效库',
+ bigData: '大数据',
+ modelLibrary: '模型库',
+ situation: '方案库',
+ onlinePictureSource: '在线图源',
+ analysis: '分析库',
+ militaryMark: '军标库',
+ ersanwei: '二三维',
+ junbiao3d: '三维军标'
},
secondMenu: {
//模型库
- imports: "导入",
+ imports: '导入',
// 测量二级菜单
- projectionArea: "投影面积",
- areaMeasure: "贴地面积",
- distanceMeasure: "贴地距离",
- heightMeasure: "垂直高度",
- triangleMeasure: "空间三角",
- coorMeasure: "坐标",
- MeasureAngle: "夹角",
- clearMeasure: "清除测量",
- MeasureAzimuth: "方位角",
- lopeDistanceMeasures: "坡度",
- projectionDistanceMeasure: "投影距离",
- clear: "清除",
+ projectionArea: '投影面积',
+ areaMeasure: '贴地面积',
+ distanceMeasure: '贴地距离',
+ heightMeasure: '垂直高度',
+ triangleMeasure: '空间三角',
+ coorMeasure: '坐标',
+ MeasureAngle: '夹角',
+ clearMeasure: '清除测量',
+ MeasureAzimuth: '方位角',
+ lopeDistanceMeasures: '坡度',
+ projectionDistanceMeasure: '投影距离',
+ clear: '清除',
// 工具二级菜单
- BIMEdit: "BIM编辑",
- goodsSearch: "物资统计",
- goodsSearchPolgon: "多边形统计",
- goodsSearchCircle: "圆形统计",
- rangeQuery: "范围查询",
- floodSimulation: "淹没模拟",
- clearQuery: "清除查询",
- destoryRecord: "结束录制",
- graffiti: "涂鸦",
- stopGraffiti: "结束涂鸦",
- clearGraffiti: "清除涂鸦",
- HDScreen: "屏幕截图",
- HDScreenHD: "高清出图",
- areaScreen: "范围截图",
- coorLocation: "坐标定位",
- perspective: "透视",
- Intervisibility: "视线分析",
- transform: "模型转换",
- videoRecording: "视频录制",
- routePlan: "路径规划",
- tilesetClipping: "剖切",
- clearTilesetClipping: "清除剖切",
- pressModel: "模型压平",
- terrainDig: "地形开挖",
- splitScreen: "卷帘对比",
+ BIMEdit: 'BIM编辑',
+ goodsSearch: '物资统计',
+ goodsSearchPolgon: '多边形统计',
+ goodsSearchCircle: '圆形统计',
+ rangeQuery: '范围查询',
+ floodSimulation: '淹没模拟',
+ clearQuery: '清除查询',
+ destoryRecord: '结束录制',
+ graffiti: '涂鸦',
+ stopGraffiti: '结束涂鸦',
+ clearGraffiti: '清除涂鸦',
+ HDScreen: '屏幕截图',
+ HDScreenHD: '高清出图',
+ areaScreen: '范围截图',
+ coorLocation: '坐标定位',
+ perspective: '透视',
+ Intervisibility: '视线分析',
+ transform: '模型转换',
+ videoRecording: '视频录制',
+ routePlan: '路径规划',
+ tilesetClipping: '剖切',
+ clearTilesetClipping: '清除剖切',
+ pressModel: '模型压平',
+ terrainDig: '地形开挖',
+ splitScreen: '卷帘对比',
- path: "飞行漫游",
- annotationAggregation: "标注点聚合",
- mouseLocation: "鼠标定位",
- mouseOver: "结束定位",
- importImg: "全景关联",
- gdbImport: "gdb导入",
- projConvert: "度分秒",
- projectionConvert: "投影转换",
- peopleRoomLink: "人房关联",
+ path: '飞行漫游',
+ annotationAggregation: '标注点聚合',
+ mouseLocation: '鼠标定位',
+ mouseOver: '结束定位',
+ importImg: '全景关联',
+ gdbImport: 'gdb导入',
+ projConvert: '度分秒',
+ projectionConvert: '投影转换',
+ peopleRoomLink: '人房关联',
// 特效库二级菜单
- fire: "火焰",
- smoke: "烟雾",
- explosion: "爆炸",
- waterSurface: "水面",
- radarLightWave: "扩散光波",
- diffusedLightWave: "雷达光波",
- scanStereoscopic: "立体雷达",
- electronicFence: "电子围墙",
- entityWall: "实体墙",
- multilateralBody: "多边体",
- cube: "立方体",
- trajectoryMotion: "轨迹运动",
- clearTrajectoryMotion: "清除轨迹",
- roadDraw: "道路绘制",
- lineDraw: "线路绘制",
- rain: "雨",
- snow: "雪",
- fog: "雾",
- nightVision: "夜视",
- skystarry: "星空",
- illumination: "光照",
- light: "光照",
- heatMap: "热力图",
- fountain: "喷泉",
- waterL: "喷射水柱",
- flyLine:"飞线",
+ fire: '火焰',
+ smoke: '烟雾',
+ explosion: '爆炸',
+ waterSurface: '水面',
+ radarLightWave: '扩散光波',
+ diffusedLightWave: '雷达光波',
+ scanStereoscopic: '立体雷达',
+ electronicFence: '电子围墙',
+ entityWall: '实体墙',
+ multilateralBody: '多边体',
+ cube: '立方体',
+ trajectoryMotion: '轨迹运动',
+ clearTrajectoryMotion: '清除轨迹',
+ roadDraw: '道路绘制',
+ lineDraw: '线路绘制',
+ rain: '雨',
+ snow: '雪',
+ fog: '雾',
+ nightVision: '夜视',
+ skystarry: '星空',
+ illumination: '光照',
+ light: '光照',
+ heatMap: '热力图',
+ fountain: '喷泉',
+ waterL: '喷射水柱',
+ flyLine: '飞线',
// 分析二级菜单
- inundationAnalysis: "淹没分析",
- visualFieldAnalysis: "视域分析",
- visualFieldAnalysis2: "圆形视域",
- profileAnalysis: "剖面分析",
- cutFill: "土方分析",
- slopeDirection: "坡度坡向",
- contour: "等高线",
- qcontour:'全局等高线',
- pictureLocation: "照片定位",
- importPanorama: "全景导入",
- },
+ inundationAnalysis: '淹没分析',
+ visualFieldAnalysis: '视域分析',
+ visualFieldAnalysis2: '圆形视域',
+ profileAnalysis: '剖面分析',
+ cutFill: '土方分析',
+ slopeDirection: '坡度坡向',
+ contour: '等高线',
+ qcontour: '全局等高线',
+ pictureLocation: '照片定位',
+ importPanorama: '全景导入',
+ clearAnalysis: '清除'
+ }
},
bottomMenu: {
- groundText: "贴地文字",
- standText: "立体文字",
- point: "点",
- line: "线",
- curve: "曲线",
- panel: "面",
- ellipse: "椭圆",
- sector: "扇形",
- circle: "圆",
- attackArrow: "箭头",
- pincerArrow: "双箭头",
- assemble: "集结地",
- rect: "矩形",
- unLock: "锁定",
- Lock: "解锁",
+ groundText: '贴地文字',
+ standText: '立体文字',
+ point: '点',
+ line: '线',
+ curve: '曲线',
+ panel: '面',
+ ellipse: '椭圆',
+ sector: '扇形',
+ circle: '圆',
+ attackArrow: '箭头',
+ pincerArrow: '双箭头',
+ assemble: '集结地',
+ rect: '矩形',
+ unLock: '锁定',
+ Lock: '解锁'
},
headerTitles: {
//顶部抬头以及系统设置页面文字汉语翻译
- systemTitle: "系统设置",
- udp: "物理沙盘",
- ConcurrencyControl: "并发量控制",
- localIP: "本地IP",
- localPort: "本地端口",
- remoteIP: "远程IP",
- remotePort: "远程端口",
- weather: "天气",
- week: [
- "星期日",
- "星期一",
- "星期二",
- "星期三",
- "星期四",
- "星期五",
- "星期六",
- ],
+ systemTitle: '系统设置',
+ udp: '物理沙盘',
+ ConcurrencyControl: '并发量控制',
+ localIP: '本地IP',
+ localPort: '本地端口',
+ remoteIP: '远程IP',
+ remotePort: '远程端口',
+ weather: '天气',
+ week: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
equipment: {
- title: "设备管理",
- addEquipment: "添加设备",
- downloadEquipment: "下载模板",
- bulkImport: "批量导入",
+ title: '设备管理',
+ addEquipment: '添加设备',
+ downloadEquipment: '下载模板',
+ bulkImport: '批量导入'
},
// 无人机
air: {
- title: "无人机管理",
- addAir: "添加无人机",
- downloadAir: "下载模板",
+ title: '无人机管理',
+ addAir: '添加无人机',
+ downloadAir: '下载模板'
},
// 0827
isc: {
- title: "ISC平台",
- url: "平台地址",
- setInfo: "设置平台信息",
- updateEquipment: "更新平台设备",
+ title: 'ISC平台',
+ url: '平台地址',
+ setInfo: '设置平台信息',
+ updateEquipment: '更新平台设备'
},
iconTitle: {
- reset: "默认视角",
- fullScreen: "全屏",
- set: "设置",
- shrink: "退出全屏",
- logout: "退出登录",
- locate: "北斗定位",
- air: "无人机",
- excel: "Excel",
+ reset: '默认视角',
+ fullScreen: '全屏',
+ set: '设置',
+ shrink: '退出全屏',
+ logout: '退出登录',
+ locate: '北斗定位',
+ air: '无人机',
+ excel: 'Excel'
},
- auth: "授权信息",
- Engineering: "工程信息",
- Hikang: "海康平台",
- Version: "版本信息",
- Theme: "系统设置",
- Satellite: "卫星定位",
+ auth: '授权信息',
+ Engineering: '工程信息',
+ Hikang: '海康平台',
+ Version: '版本信息',
+ Theme: '系统设置',
+ Satellite: '卫星定位',
searchWay: {
- title: "搜索方式",
+ title: '搜索方式',
searchWayList: {
- poi: "离线搜索",
- net: "在线搜索",
- },
+ poi: '离线搜索',
+ net: '在线搜索'
+ }
},
- Service: "服务接入",
- confirm: "确认",
+ Service: '服务接入',
+ confirm: '确认',
auths: {
- authType: "授权状态",
- authTime: "授权时间",
- authCode: "授权码",
- upload: "授权导入",
- authexpire: "授权过期",
+ authType: '授权状态',
+ authTime: '授权时间',
+ authCode: '授权码',
+ upload: '授权导入',
+ authexpire: '授权过期',
+ authTempExpire: '授权正常',
+ noAuthexpire: '暂未授权'
},
service: {
- offline: "离线服务",
- official: "官方服务",
- customize: "自定义",
+ offline: '离线服务',
+ official: '官方服务',
+ customize: '自定义',
agreements: {
- Agreement: "协议",
- setAgreement: "协议设置",
- port: "端口",
- location: "地址",
- },
+ Agreement: '协议',
+ setAgreement: '协议设置',
+ port: '端口',
+ location: '地址'
+ }
},
Engineerings: {
- import: "路网导入",
- cover: "覆盖",
- increase: "增加",
- importProject: "工程覆盖导入",
- consolidated: "工程合并导入",
- derive: "工程导出",
- importPOI: "POI导入",
+ import: '路网导入',
+ cover: '覆盖',
+ increase: '增加',
+ importProject: '工程覆盖导入',
+ consolidated: '工程合并导入',
+ derive: '工程导出',
+ importPOI: 'POI导入'
},
Hikangs: {
- enable: "启用",
+ enable: '启用'
},
versions: {
- version_code: "版本号",
- version_update: "检查更新",
+ version_code: '版本号',
+ version_update: '检查更新'
},
systemSetting: {
- setLanguage: "语言设置",
- theme: "主题换肤",
- defaultView: "设置默认视角",
- defaultData: "添加在线数据",
- management: "后台管理",
- showCompass: "导航器",
- showLatitudeLongitudeNetwork: "经纬网",
- showFangliNet: "方里网",
- showDistanceLegend: "比例尺",
- showToolBar: "信息栏",
- showFPS: "刷新率",
- showMapX: "鹰眼图",
- occlusion: "地形遮挡",
- coordinateSystem: "系统坐标系",
- sheetIndexStatusSwitch: "标准图幅",
- switch: "切换",
- battery: "电池信息",
+ setLanguage: '语言设置',
+ theme: '主题换肤',
+ defaultView: '设置默认视角',
+ defaultData: '添加在线数据',
+ management: '后台管理',
+ showCompass: '导航器',
+ showLatitudeLongitudeNetwork: '经纬网',
+ showFangliNet: '方里网',
+ showDistanceLegend: '比例尺',
+ showToolBar: '信息栏',
+ showFPS: '刷新率',
+ showMapX: '鹰眼图',
+ occlusion: '地形遮挡',
+ coordinateSystem: '系统坐标系',
+ sheetIndexStatusSwitch: '标准图幅',
+ switch: '切换',
+ battery: '电池信息',
skinList: {
- yingguangse: "荧光色",
- gonganlan: "科技蓝",
- hong: "烈日红",
- },
+ yingguangse: '荧光色',
+ gonganlan: '科技蓝',
+ hong: '烈日红'
+ }
},
model: {
- title: "模型管理",
- createModelLibrary: "创建模型库",
- selectModelLibrary: "选择模型库",
- addModelType: "添加模型类型",
- importModel: "导入模型",
- updatePoster: "更换缩略图",
- preview: "预览",
- updateModel: "更换模型",
- deleteModel: "删除",
- editModel: "编辑",
+ title: '模型管理',
+ createModelLibrary: '创建模型库',
+ selectModelLibrary: '选择模型库',
+ addModelType: '添加模型类型',
+ importModel: '导入模型',
+ updatePoster: '更换缩略图',
+ preview: '预览',
+ updateModel: '更换模型',
+ deleteModel: '删除',
+ editModel: '编辑'
},
graphLabel: {
- title: "军标管理",
- createGraphLabelLibrary: "创建军标库",
- selectGraphLabelLibrary: "选择军标库",
- addGraphLabelType: "添加军标类型",
- importGraphLabel: "导入军标",
- edit: "编辑",
- delete: "删除",
- importGraph: "导入军标",
- addLine: "添加线",
- addPanel: "添加面",
- addCircle: "添加圆",
+ title: '军标管理',
+ createGraphLabelLibrary: '创建军标库',
+ selectGraphLabelLibrary: '选择军标库',
+ addGraphLabelType: '添加军标类型',
+ importGraphLabel: '导入军标',
+ edit: '编辑',
+ delete: '删除',
+ importGraph: '导入军标',
+ addLine: '添加线',
+ addPanel: '添加面',
+ addCircle: '添加圆'
},
user: {
- title: "用户管理",
- deleteUser: "删除",
- createUser: "创建用户",
- importUser: "导入用户",
- role: "权限管理",
- deleteRole: "删除",
- createRole: "创建角色",
- depart: "部门管理",
- createDepart: "创建部门",
- deleteDepart: "删除部门",
- editDepart: "修改部门",
+ title: '用户管理',
+ deleteUser: '删除',
+ createUser: '创建用户',
+ importUser: '导入用户',
+ role: '权限管理',
+ deleteRole: '删除',
+ createRole: '创建角色',
+ depart: '部门管理',
+ createDepart: '创建部门',
+ deleteDepart: '删除部门',
+ editDepart: '修改部门'
},
terrain: {
- terrainSetting: "地形设置",
- },
+ terrainSetting: '地形设置'
+ }
},
rightMenu: {
- addDirectory: "添加文件夹",
- addResource: "添加地图数据",
- pictureLocation: "带定位照片",
- importPanorama: "带定位全景",
- addBIM: "添加BIM",
- edit: "编辑节点",
- del: "删除节点",
- setView: "设置视角",
- resetView: "重置视角",
- layerRaise: "图层上移",
- layerLower: "图层下移",
- layerToTop: "图层置顶",
- layerToBottom: "图层置底",
- tilesetClipping: "剖切",
- addTrajectory: "轨迹运动",
- addXlsx: "添加作战数据",
- showAttr: "查看属性",
- importHeader: "导入表头",
- resetPerspective: "重置透视",
+ addDirectory: '添加文件夹',
+ addResource: '添加地图数据',
+ pictureLocation: '带定位照片',
+ importPanorama: '带定位全景',
+ addBIM: '添加BIM',
+ edit: '编辑节点',
+ del: '删除节点',
+ setView: '设置视角',
+ resetView: '重置视角',
+ layerRaise: '图层上移',
+ layerLower: '图层下移',
+ layerToTop: '图层置顶',
+ layerToBottom: '图层置底',
+ tilesetClipping: '剖切',
+ addTrajectory: '轨迹运动',
+ addXlsx: '添加作战数据',
+ showAttr: '查看属性',
+ importHeader: '导入表头',
+ resetPerspective: '重置透视'
},
tree: {
- title: "图层指挥舱",
+ title: '图层指挥舱',
// title: "综合信息",
- layer: "图层",
- location: "地点",
+ layer: '图层',
+ location: '地点'
},
btn: {
- search: "搜索",
- treePlaceholder: "关键词搜索",
- selectPlaceholder: "请选择",
- selectNoText: "无数据",
- },
-};
+ search: '搜索',
+ treePlaceholder: '关键词搜索',
+ selectPlaceholder: '请选择',
+ selectNoText: '无数据'
+ }
+}
diff --git a/src/renderer/src/assets/images/noData.png b/src/renderer/src/assets/images/noData.png
new file mode 100644
index 0000000..4549694
Binary files /dev/null and b/src/renderer/src/assets/images/noData.png differ
diff --git a/src/renderer/src/common/initMapData.ts b/src/renderer/src/common/initMapData.ts
index 19f45fa..324336a 100644
--- a/src/renderer/src/common/initMapData.ts
+++ b/src/renderer/src/common/initMapData.ts
@@ -20,7 +20,7 @@ export const initMapData = async (type, data) => {
case 'linkImage':
case 'vrImage':
entityObject = new YJ.Obj.BillboardObject(window.earth, data)
- entityObject.options.billboard.defaultImage=''
+ entityObject.options.billboard.defaultImage = ''
break
case 'line':
entityObject = await new YJ.Obj.PolylineObject(window.earth, data)
@@ -56,7 +56,7 @@ export const initMapData = async (type, data) => {
break
case 'layer':
data.host = baseURL
- console.log('data',data)
+ console.log('data', data)
entityObject = new YJ.Obj.Layer(window.earth, data)
break
case 'tileset':
@@ -101,16 +101,19 @@ export const initMapData = async (type, data) => {
default:
break
}
- options = structuredClone(entityObject.options)
- delete options.host
- //鼠标左键点击事件
- entityObject.onClick = () => {
- leftClick(options);
- };
- //鼠标右键点击事件
- entityObject.onRightClick = () => {
- rightClick(options);
- };
+
+ if (entityObject) {
+ options = structuredClone(entityObject.options)
+ delete options.host
+ //鼠标左键点击事件
+ entityObject.onClick = () => {
+ leftClick(options);
+ };
+ //鼠标右键点击事件
+ entityObject.onRightClick = () => {
+ rightClick(options);
+ };
+ }
// options = entityObject
return options
}
diff --git a/src/renderer/src/components/upload/uploadFiles.vue b/src/renderer/src/components/upload/uploadFiles.vue
index 4e634aa..67ccaf4 100644
--- a/src/renderer/src/components/upload/uploadFiles.vue
+++ b/src/renderer/src/components/upload/uploadFiles.vue
@@ -19,6 +19,7 @@
@@ -83,8 +126,8 @@ const copy = () => {
.auth_info_text {
color: #fff;
- font-size: 18px;
- font-weight: bolder;
+ font-size: 14px;
+ font-weight: 700;
margin: 7px 0 15px 15px;
display: flex;
align-items: center;
diff --git a/src/renderer/src/views/components/headers/components/setPup/components/contentMenu.vue b/src/renderer/src/views/components/headers/components/setPup/components/contentMenu.vue
new file mode 100644
index 0000000..65c4d90
--- /dev/null
+++ b/src/renderer/src/views/components/headers/components/setPup/components/contentMenu.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue b/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue
index 7d19627..f7e9d45 100644
--- a/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue
+++ b/src/renderer/src/views/components/headers/components/setPup/components/engineering.vue
@@ -3,16 +3,47 @@
工程设置
-
-
-
-
- 路网导入
-
+
+
+
+
+
+
+ 路网导入
+
+
-
-
+
+
+
+
+

+
+
+ {{ item.fileName }}
+ {{ item.createdAt }}
+
+
+
+
+ 删除
+
+
+
+
@@ -109,7 +121,100 @@
-
+
diff --git a/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue b/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue
index 7d5b3fc..c2c05be 100644
--- a/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue
+++ b/src/renderer/src/views/components/headers/components/setPup/components/modelManage.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -14,14 +14,475 @@
创建模型库
+
+
+
+
+
+
+
+
+
+
+
+ {{ node.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 预览
+ 更换缩略图
+ 删除
+
+
+
+
+

+
暂无数据
+
+
+
+
+
+
+
+
+
-
+
+
+
diff --git a/src/renderer/src/views/components/headers/components/setPup/components/setting.vue b/src/renderer/src/views/components/headers/components/setPup/components/setting.vue
index 58d0263..3c180b2 100644
--- a/src/renderer/src/views/components/headers/components/setPup/components/setting.vue
+++ b/src/renderer/src/views/components/headers/components/setPup/components/setting.vue
@@ -171,7 +171,7 @@
}}
- 默认数据:
+ 在线数据:
{{
t('systemSetting.defaultData')
}}
@@ -224,10 +224,10 @@
- {{ t('systemSetting.showCompass') }}:
+ {{ t('systemSetting.showToolBar') }}:
@@ -241,13 +241,12 @@
>
-
- {{ t('systemSetting.showToolBar') }}:
+ {{ t('systemSetting.showMapX') }}:
@@ -263,16 +262,18 @@
>
+
- {{ t('systemSetting.showMapX') }}:
+ {{ t('systemSetting.administrativeArea') }}:
+
{{ t('systemSetting.showLatitudeLongitudeNetwork') }}:
@@ -293,6 +294,16 @@
>
+
+ {{ t('systemSetting.sheetIndexStatusSwitch') }}:
+
+
+
+
{{ t('systemSetting.occlusion') }}:
@@ -321,6 +332,10 @@
diff --git a/src/renderer/src/views/components/headers/components/setTool/hooks/index.ts b/src/renderer/src/views/components/headers/components/setTool/hooks/index.ts
index 05b1039..7eb9a7f 100644
--- a/src/renderer/src/views/components/headers/components/setTool/hooks/index.ts
+++ b/src/renderer/src/views/components/headers/components/setTool/hooks/index.ts
@@ -1,7 +1,7 @@
export const uesSetTool = (setPupRef?: any) => {
//打开弹窗
const setShow = () => {
- console.log(setPupRef)
+ console.log(setPupRef, 'setPupRef')
setPupRef.value.open()
}
diff --git a/src/renderer/src/views/components/headers/components/setTool/setTool.vue b/src/renderer/src/views/components/headers/components/setTool/setTool.vue
index 0a115ac..cf9782d 100644
--- a/src/renderer/src/views/components/headers/components/setTool/setTool.vue
+++ b/src/renderer/src/views/components/headers/components/setTool/setTool.vue
@@ -13,8 +13,14 @@
-->
-
+
@@ -25,18 +31,26 @@
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import setPup from '../setPup/setPup.vue'
+import { inject } from 'vue'
const router = useRouter() // 路由实例
const { t } = useI18n()
import { uesSetTool } from './hooks'
import { LoginApi } from '@renderer/api/login'
const setPupRef = ref()
const { setShow } = uesSetTool(setPupRef)
+
+//控制显隐
+const eventBus: any = inject('bus')
+eventBus.on('settingPop', (data) => {
+ console.log(setPupRef.value, 'data')
+ data ? setPupRef.value.open() : setPupRef.value.close()
+})
const logout = async () => {
let res = await LoginApi.logout()
- console.log(res);
+ console.log(res)
if (res.code === 200) {
router.push({ path: '/' })
- localStorage.clear()
+ // localStorage.clear()
}
}
const setList = ref([
@@ -85,7 +99,7 @@ const setList = ref([
name: 'logout',
className: 'header_public',
dbcallback: null,
- callback: logout,
+ callback: logout
}
])
@@ -121,10 +135,12 @@ const setList = ref([
top: 0;
bottom: 0;
width: 1px;
- background: linear-gradient(180deg,
- rgba(0, 255, 255, 0),
- rgba(0, 255, 255, 1),
- rgba(204, 204, 204, 0));
+ background: linear-gradient(
+ 180deg,
+ rgba(0, 255, 255, 0),
+ rgba(0, 255, 255, 1),
+ rgba(204, 204, 204, 0)
+ );
}
.set_item.last-item::after {
diff --git a/src/renderer/src/views/components/headers/components/tufu_select.vue b/src/renderer/src/views/components/headers/components/tufu_select.vue
new file mode 100644
index 0000000..da6a3ca
--- /dev/null
+++ b/src/renderer/src/views/components/headers/components/tufu_select.vue
@@ -0,0 +1,98 @@
+
+
+ 图幅比例尺
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/components/leftSide/leftSideFirst.vue b/src/renderer/src/views/components/leftSide/leftSideFirst.vue
index 494a0df..c9211c1 100644
--- a/src/renderer/src/views/components/leftSide/leftSideFirst.vue
+++ b/src/renderer/src/views/components/leftSide/leftSideFirst.vue
@@ -37,6 +37,7 @@ import { useI18n } from 'vue-i18n'
import { bus } from '@/utils/bus'
import leftSideSecond from '@/views/components/leftSide/leftSideSecond.vue'
+import { ElMessage, ElLoading } from 'element-plus'
const { t } = useI18n()
const eventBus: any = inject('bus')
@@ -191,6 +192,16 @@ const handleClick = (item: any, e) => {
if (item.children.length) {
$('.leftSideSecond')[0].style.display = 'block'
leftSideSecondRef.value.initList(item)
+ } else if (item.key === 'model') {
+ //模型库
+ if (window.checkAuthIsValid) {
+ eventBus.emit('openModel', true)
+ } else {
+ ElMessage({
+ message: '您没有该功能的权限',
+ type: 'warning'
+ })
+ }
}
}
const fold = () => {
diff --git a/src/renderer/src/views/components/leftSide/leftSideSecond.vue b/src/renderer/src/views/components/leftSide/leftSideSecond.vue
index 7a24870..d5afb94 100644
--- a/src/renderer/src/views/components/leftSide/leftSideSecond.vue
+++ b/src/renderer/src/views/components/leftSide/leftSideSecond.vue
@@ -3,10 +3,14 @@
@@ -31,7 +35,7 @@ import dayjs from 'dayjs'
const { t } = useI18n()
const { findParentId, findTreeIndex, cusAddNodes } = useTreeNode()
const fs = require('fs')
-const obj:any = ref(null)
+const obj: any = ref(null)
const isclick = ref(false)
const eventBus: any = inject('bus')
const initList = (value) => {
@@ -50,7 +54,7 @@ eventBus.on('graffitiObj', (data: never) => {
function openLoading(
text = '拼命加载中...',
- option:any = {
+ option: any = {
fullscreen: true,
background: 'rgba(0,0,0,0.63)',
lock: true
@@ -61,6 +65,26 @@ function openLoading(
let loadingInstance = ElLoading.service(option)
return loadingInstance
}
+// 监听键盘esc键,移出鼠标定位
+
+const handleKeyDown = (e) => {
+ if (e.key === 'Escape') {
+ if (clickChange.mouseLocation) {
+ //鼠标定位
+ clickChange.mouseLocation = false
+ new YJ.Global.MouseCoordinate(window.earth, clickChange.mouseLocation)
+ // window.removeEventListener('keydown', handleKeyDown)
+ }
+
+ //视频录制
+ if (clickChange.videoRecord) {
+ methodMap['videoRecord']()
+ }
+
+ console.log('全局ESC监听')
+ }
+}
+window.addEventListener('keydown', handleKeyDown)
const methodMap = {
// 轨迹运动
@@ -79,11 +103,11 @@ const methodMap = {
name: name,
model: {
show: true,
- url: "http://localhost:5173/tank.glb",
+ url: 'http://localhost:5173/tank.glb'
},
line: {
show: true,
- positions: positions,
+ positions: positions
}
}
})
@@ -104,7 +128,7 @@ const methodMap = {
opt: {
id: id,
name: name,
- positions: positions,
+ positions: positions
}
})
}
@@ -130,9 +154,9 @@ const methodMap = {
circle: [
{
radius: options.radius,
- color: '#ff0000',
+ color: '#ff0000'
}
- ],
+ ]
}
})
}
@@ -254,7 +278,9 @@ const methodMap = {
eventBus.emit('routePlanningDialog')
},
//路径清除
- clearRoute() { },
+ clearRoute() {
+ new YJ.ClearAllRoutePlanning()
+ },
//涂鸦
graffiti() {
eventBus.emit('graffitiDialog')
@@ -277,6 +303,12 @@ const methodMap = {
mouseLocation() {
clickChange.mouseLocation = !clickChange.mouseLocation
new YJ.Global.MouseCoordinate(window.earth, clickChange.mouseLocation)
+
+ // if (clickChange.mouseLocation) {
+ // window.addEventListener('keydown', handleKeyDown)
+ // } else {
+ // window.removeEventListener('keydown', handleKeyDown)
+ // }
},
//聚合标注
annotationAggregation() {
@@ -329,7 +361,7 @@ const methodMap = {
// window.multiViewportMode = false;
})
} else {
- let doms:any = document.querySelectorAll('.cesium-widget')
+ let doms: any = document.querySelectorAll('.cesium-widget')
let leftWidth = doms[0].offsetWidth
let rightWidth = doms[1].offsetWidth
combineBase64Images(res2, leftWidth, res, rightWidth)
@@ -356,16 +388,16 @@ const methodMap = {
videoRecord() {
clickChange.videoRecord = !clickChange.videoRecord
- let time:any = 3
+ let time: any = 3
$changeComponentShow('#secondMenu', false)
if (clickChange.videoRecord) {
// document.addEventListener("keydown", onKeyDown);
- let loading:any = openLoading(time, {
+ let loading: any = openLoading(time, {
background: 'rgba(0,0,0,0)',
fullscreen: false,
customClass: 'timer'
})
- let timer:any = ''
+ let timer: any = ''
const p = document.createElement('p')
p.style.color = '#fff'
p.innerHTML = '再次点击录制结束'
@@ -386,121 +418,126 @@ const methodMap = {
// document.removeEventListener("keydown", onKeyDown);
}
},
- //压模
+ //模型压平
pressModel() {
- // if (window.checkAuthIsValid) {
- let selectedNode = window.treeObj.getSelectedNodes()[0]
- if (selectedNode) {
- let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType)
- if (!isTileset) {
+ if (window.checkAuthIsValid) {
+ let selectedNode = window.treeObj.getSelectedNodes()[0]
+ if (selectedNode) {
+ let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType)
+ if (!isTileset) {
+ console.log('aaaaaa')
+ ElMessage({
+ message: '请在图层指挥舱选中对应模型进行操作',
+ type: 'warning'
+ })
+ return
+ }
+ // let source_id = this.$md5(new Date().getTime() + '压平面')
+
+ let draw = new YJ.Draw.DrawPolygon(window.earth)
+ draw.start((err, params) => {
+ if (params.length > 2) {
+ if (err) throw err
+ let alt = params[0].alt
+ params.forEach((item) => {
+ if (item.alt < alt) alt = item.alt
+ })
+
+ //获取节点树对象
+
+ let entity = window.earth.entityMap.get(selectedNode.id).entity
+
+ let flat = new YJ.Analysis.Flat(window.earth, entity, {
+ positions: params
+ })
+ let detailOption = {
+ // modleId: selectedNode.id,
+ modelId: selectedNode.id,
+ positions: params,
+ height: flat.height
+ }
+ let id = new YJ.Tools().randomString()
+ let paramsData: any = {
+ params: detailOption,
+ id,
+ sourceName: '压平面',
+ sourceType: 'pressModel',
+ // parentId:
+ // selectedNode.sourceType == 'directory' ? selectedNode.id : selectedNode.parentId
+ parentId: selectedNode.id
+ }
+
+ TreeApi.addOtherSource(paramsData)
+ paramsData.isShow = true
+ paramsData.params = JSON.stringify(paramsData.params)
+ ;(window as any).pressModelMap.set(id + '_' + selectedNode.id, paramsData)
+ ;(window as any).pressModelEntities.set(id, flat)
+ cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])
+ // //鼠标右键点击事件
+ flat.onRightClick = () => {}
+ // _entityMap.set(node.source_id, flat)
+ } else {
+ // this.$message.warning('至少三个点')
+ }
+ })
+ } else {
+ console.log('bbbbb')
+ ElMessage({
+ message: '请在图层指挥舱选中对应模型进行操作',
+ type: 'warning'
+ })
+ }
+ } else {
+ ElMessage({
+ message: '您没有该功能的权限',
+ type: 'warning'
+ })
+ }
+ },
+ //地形开挖
+ terrainDig() {
+ if (window.checkAuthIsValid) {
+ // new YJ.Analysis.TerrainExcavation(window.Earth1);
+ eventBus.emit('terrainExcavationDialog')
+ } else {
+ ElMessage({
+ message: '您没有该功能的权限',
+ type: 'warning'
+ })
+ }
+ },
+ //剖切
+ tilesetClipping() {
+ if (window.checkAuthIsValid) {
+ let selectedNode = window.treeObj.getSelectedNodes()
+ if (selectedNode.length < 1) {
ElMessage({
message: '请在图层指挥舱选中对应模型进行操作',
type: 'warning'
})
return
}
- // let source_id = this.$md5(new Date().getTime() + '压平面')
-
+ if (!(selectedNode[0].sourceType === 'tileset' || selectedNode[0].sourceType === 'bim')) {
+ ElMessage({
+ message: '选中的节点不能进行剖切',
+ type: 'warning'
+ })
+ return
+ }
+ let tileset = window.earth.entityMap.get(selectedNode[0].id)
let draw = new YJ.Draw.DrawPolygon(window.earth)
- draw.start((err, params) => {
- if (params.length > 2) {
- if (err) throw err
- let alt = params[0].alt
- params.forEach((item) => {
- if (item.alt < alt) alt = item.alt
- })
-
- //获取节点树对象
-
- let entity = window.earth.entityMap.get(selectedNode.id).entity
-
- let flat = new YJ.Analysis.Flat(window.earth, entity, {
- positions: params
- })
- let detailOption = {
- // modleId: selectedNode.id,
- modelId: selectedNode.id,
- positions: params,
- height: flat.height
- }
- let id = new YJ.Tools().randomString()
- let paramsData:any = {
- params: detailOption,
- id,
- sourceName: '压平面',
- sourceType: 'pressModel',
- // parentId:
- // selectedNode.sourceType == 'directory' ? selectedNode.id : selectedNode.parentId
- parentId: selectedNode.id
- }
-
- TreeApi.addOtherSource(paramsData)
- paramsData.isShow = true;
- paramsData.params = JSON.stringify(paramsData.params);
- (window as any).pressModelMap.set(id + '_' + selectedNode.id, paramsData)
- (window as any).pressModelEntities.set(id, flat)
- cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])
- // //鼠标右键点击事件
- flat.onRightClick = () => {}
- // _entityMap.set(node.source_id, flat)
- } else {
- // this.$message.warning('至少三个点')
- }
+ draw.start((err, pos) => {
+ let section = new YJ.Analysis.Section(window.earth, tileset.entity, {
+ positions: pos
+ })
+ // _entityMap.set(selectedNode.source_id + 'pouqie', section)
})
} else {
- // this.$message.warning('请在图层指挥舱选中对应模型进行操作!')
- }
- // } else {
- // this.$message({
- // message: '您没有该功能的权限',
- // type: 'warning'
- // })
- // }
- },
- //地形开挖
- terrainDig() {
- // if (window.checkAuthIsValid) {
- // new YJ.Analysis.TerrainExcavation(window.Earth1);
- eventBus.emit('terrainExcavationDialog')
- // } else {
- // this.$message({
- // message: '您没有该功能的权限',
- // type: 'warning'
- // })
- // }
- },
- //剖切
- tilesetClipping() {
- // if (window.checkAuthIsValid) {
- let selectedNode = window.treeObj.getSelectedNodes()
- if (selectedNode.length < 1) {
ElMessage({
- message: '请在图层指挥舱选中对应模型进行操作',
+ message: '您没有该功能的权限',
type: 'warning'
})
- return
}
- if (!(selectedNode[0].sourceType === 'tileset' || selectedNode[0].sourceType === 'bim')) {
- ElMessage({
- message: '选中的节点不能进行剖切',
- type: 'warning'
- })
- return
- }
- let tileset = window.earth.entityMap.get(selectedNode[0].id)
- let draw = new YJ.Draw.DrawPolygon(window.earth)
- draw.start((err, pos) => {
- let section = new YJ.Analysis.Section(window.earth, tileset.entity, {
- positions: pos
- })
- // _entityMap.set(selectedNode.source_id + 'pouqie', section)
- })
- // } else {
- // this.$message({
- // message: '您没有该功能的权限',
- // type: 'warning'
- // })
- // }
},
//删除剖切
clearTilesetClipping() {
@@ -515,29 +552,28 @@ const methodMap = {
eventBus.emit('ProjectionConvertDialog')
},
//GDB导入
- gdbImport() { },
+ gdbImport() {},
//圆形统计
circleStatistics() {
- // if (window.checkAuthIsValid) {
- eventBus.emit('goodsSearchCircleDialog')
- // } else {
- // this.$message({
- // message: '您没有该功能的权限',
- // type: 'warning'
- // })
- // }
+ if (window.checkAuthIsValid) {
+ eventBus.emit('goodsSearchCircleDialog')
+ } else {
+ ElMessage({
+ message: '您没有该功能的权限',
+ type: 'warning'
+ })
+ }
},
//多边形统计
polygonStatistics() {
- // if (window.checkAuthIsValid) {
- eventBus.emit('goodsSearchPolgonDialog')
-
- // } else {
- // this.$message({
- // message: "您没有该功能的权限",
- // type: "warning",
- // });
- // }
+ if (window.checkAuthIsValid) {
+ eventBus.emit('goodsSearchPolgonDialog')
+ } else {
+ ElMessage({
+ message: '您没有该功能的权限',
+ type: 'warning'
+ })
+ }
}
}
diff --git a/src/renderer/src/views/components/propertyBox/CoorLocation.vue b/src/renderer/src/views/components/propertyBox/CoorLocation.vue
index 8b30014..8458fa5 100644
--- a/src/renderer/src/views/components/propertyBox/CoorLocation.vue
+++ b/src/renderer/src/views/components/propertyBox/CoorLocation.vue
@@ -46,7 +46,7 @@
-
+
-
+
@@ -117,8 +117,8 @@
-
-
+
+
@@ -127,6 +127,8 @@
import { ref, reactive } from 'vue'
import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue'
+import { addMapSource } from '../../../common/addMapSource'
+import { initMapData } from '@/common/initMapData'
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
@@ -141,14 +143,15 @@ var latMin = ref(null)
var lngSec = ref(null)
var latSec = ref(null)
+var id = ref(null)
eventBus.on('coorLocationDialog', () => {
+ id.value = new YJ.Tools().randomString()
baseDialog.value?.open()
})
// @ts-ignore (define in dts)
const handleClick = (tab: TabsPaneContext, event: Event) => {
- console.log(tab, event)
longitude.value = null
latitude.value = null
lngMin.value = null
@@ -163,13 +166,21 @@ const closeCallBack = (e) => {
latMin.value = null
lngSec.value = null
latSec.value = null
+ activeName.value = 'first'
}
-const flyto = (e) => {
+const turnToPosition = async () => {
+ let position
switch (activeName.value) {
case 'first':
- new YJ.Global.flyTo(window.earth, {
- position: { lng: longitude.value, lat: latitude.value, alt: 100 }
- })
+ var point = await new YJ.Tools().sampleHeightMostDetailed(
+ [{ lng: longitude.value, lat: latitude.value, alt: 0 }],
+ window.earth
+ )
+ position = {
+ lng: longitude.value,
+ lat: latitude.value,
+ alt: point[0].height < 0 ? 0 : point[0].height
+ }
break
case 'second':
// @ts-ignore (define in dts)
@@ -181,10 +192,16 @@ const flyto = (e) => {
// @ts-ignore (define in dts)
lat = latitude.value < 0 ? -lat : lat
- var position = { lng, lat, alt: 100 }
- new YJ.Global.flyTo(window.earth, {
- position: position
- })
+ var point2 = await new YJ.Tools().sampleHeightMostDetailed(
+ [{ lng, lat, alt: 0 }],
+ window.earth
+ )
+ position = {
+ lng: lng,
+ lat: lat,
+ alt: point2[0].height < 0 ? 0 : point2[0].height
+ }
+
break
case 'third':
var lng =
@@ -199,14 +216,97 @@ const flyto = (e) => {
// @ts-ignore (define in dts)
lat = latitude.value < 0 ? -lat : lat
- var position = { lng, lat, alt: 100 }
- new YJ.Global.flyTo(window.earth, {
- position: position
- })
+ var point3 = await new YJ.Tools().sampleHeightMostDetailed(
+ [{ lng, lat, alt: 0 }],
+ window.earth
+ )
+ position = {
+ lng: lng,
+ lat: lat,
+ alt: point3[0].height < 0 ? 0 : point3[0].height
+ }
break
}
+ return position
}
-const draw = (e) => {
+
+const flyto = async (e) => {
+ let position = await turnToPosition()
+ new YJ.Global.flyTo(window.earth, {
+ position: { lng: position.lng, lat: position.lat, alt: position.alt + 100 }
+ })
+ let name = '点标注'
+ let params = {
+ type: 'point',
+ id: id.value,
+ sourceName: name,
+ opt: {
+ id: id.value,
+ name: name,
+ position: position
+ }
+ }
+ if (!window.earth.entityMap.get(id.value)) {
+ await initMapData('point', params)
+ }
+ // switch (activeName.value) {
+ // case 'first':
+ // new YJ.Global.flyTo(window.earth, {
+ // position: { lng: longitude.value, lat: latitude.value, alt: 100 }
+ // })
+ // break
+ // case 'second':
+ // // @ts-ignore (define in dts)
+ // var lng = Math.abs(longitude.value) + Math.abs(lngMin.value) / 60
+ // // @ts-ignore (define in dts)
+ // var lat = Math.abs(latitude.value) + Math.abs(latMin.value) / 60
+ // // @ts-ignore (define in dts)
+ // lng = longitude.value < 0 ? -lng : lng
+ // // @ts-ignore (define in dts)
+ // lat = latitude.value < 0 ? -lat : lat
+
+ // var position = { lng, lat, alt: 100 }
+ // new YJ.Global.flyTo(window.earth, {
+ // position: position
+ // })
+ // break
+ // case 'third':
+ // var lng =
+ // // @ts-ignore (define in dts)
+ // Math.abs(longitude.value) + Math.abs(lngMin.value) / 60 + Math.abs(lngSec.value) / 3600
+ // var lat =
+ // // @ts-ignore (define in dts)
+ // Math.abs(latitude.value) + Math.abs(latMin.value) / 60 + Math.abs(latSec.value) / 3600
+
+ // // @ts-ignore (define in dts)
+ // lng = longitude.value < 0 ? -lng : lng
+ // // @ts-ignore (define in dts)
+ // lat = latitude.value < 0 ? -lat : lat
+
+ // var position = { lng, lat, alt: 100 }
+ // new YJ.Global.flyTo(window.earth, {
+ // position: position
+ // })
+ // break
+ // }
+}
+const draw = async (e) => {
+ let position = await turnToPosition()
+ if (!position) {
+ return
+ }
+ let name = '点标注'
+ await addMapSource({
+ type: 'point',
+ id: id.value,
+ sourceName: name,
+ opt: {
+ id: id.value,
+ name: name,
+ position: position
+ }
+ })
+
baseDialog.value?.close()
}
const close = (e) => {
diff --git a/src/renderer/src/views/components/propertyBox/FlyRoam.vue b/src/renderer/src/views/components/propertyBox/FlyRoam.vue
index 3c56ad2..eaa19a8 100644
--- a/src/renderer/src/views/components/propertyBox/FlyRoam.vue
+++ b/src/renderer/src/views/components/propertyBox/FlyRoam.vue
@@ -1,8 +1,9 @@
-
-
+
+
+
-
+
+
+
@@ -110,8 +160,13 @@
-
-
+
+
+
+
+
@@ -120,6 +175,12 @@
import { ref, reactive } from 'vue'
import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue'
+import { app } from 'electron'
+import { TreeApi } from '@/api/tree'
+import { useTreeNode } from '../tree/hooks/treeNode'
+import { ElMessage } from 'element-plus'
+
+const { cusAddNodes } = useTreeNode()
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
@@ -130,9 +191,44 @@ eventBus.on('flyRoamDialog', () => {
show.value = true
baseDialog.value?.open()
setTimeout(() => {
- flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity })
- }, 0)
+ flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
+ }, 100)
})
+const draw = (data) => {
+ if (data.points.length != 0) {
+ let selectedNodes = window.treeObj.getSelectedNodes()
+ let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
+ let parentId
+ if (node) {
+ if (node.sourceType === 'directory') {
+ parentId = node.id
+ } else {
+ parentId = node.parentId
+ }
+ }
+ let id = new YJ.Tools().randomString()
+ let paramsData: any = {
+ params: data,
+ id,
+ sourceName: '漫游路径',
+ sourceType: 'roam',
+ parentId: parentId
+ }
+
+ TreeApi.addOtherSource(paramsData)
+ paramsData.isShow = true
+ paramsData.params = JSON.stringify(paramsData.params)
+ cusAddNodes(window.treeObj, paramsData.parentId, [paramsData])
+ baseDialog.value?.close()
+ } else {
+ ElMessage({
+ message: '请添加数据',
+ type: 'warning'
+ })
+ }
+
+ console.log(data)
+}
const clangeViewPointHeight = () => {}
const viewPointHeightInput = () => {
@@ -147,11 +243,30 @@ const closeCallBack = (e) => {
YJ.Global.FlyRoam.cease(window.earth)
YJ.Global.FlyRoam.close()
}
-const draw = (e) => {}
+const apply = (e) => {
+ YJ.Global.FlyRoam.apply()
+}
const close = (e) => {
show.value = false
baseDialog.value?.close()
}
- -->
+
diff --git a/src/renderer/src/views/components/propertyBox/RoutePlanning.vue b/src/renderer/src/views/components/propertyBox/RoutePlanning.vue
index aecc66a..55a4e73 100644
--- a/src/renderer/src/views/components/propertyBox/RoutePlanning.vue
+++ b/src/renderer/src/views/components/propertyBox/RoutePlanning.vue
@@ -5,30 +5,129 @@
title="路径规划"
left="180px"
top="100px"
+ width="527px"
:closeCallback="closeCallBack"
>
-
-
+
+
+
+ 起点
+
+ 经度
+
+
+
+ 纬度
+
+
+
+ 拾取
+
+
+
+
+
- 绘制
+
+ 查询
+
+
+ 清除路线
+
+ 取消
@@ -37,6 +136,7 @@
import { ref, reactive } from 'vue'
import { inject } from 'vue'
import Dialog from '@/components/dialog/baseDialog.vue'
+import { RouteApi } from '@/api/route/index.ts'
const baseDialog: any = ref(null)
const eventBus: any = inject('bus')
@@ -48,29 +148,148 @@ var endLng: any = ref(null)
var endLat: any = ref(null)
var routePlanning: any = reactive([])
+
+var svgHover: any = reactive([false, false])
eventBus.on('routePlanningDialog', () => {
baseDialog.value?.open()
+ setTimeout(() => {
+ //加载路网数据
+
+ let host = 'http://192.168.110.25:8848'
+ routePlanning = new YJ.Obj.RoutePlanning(window.earth, {
+ gps: false,
+ host
+ })
+ routePlanning.Dialog.queryCallBack = async (v) => {
+ console.log(v, 'vvvvvvvvv')
+ // await queryRoute(params, (response) => {
+ // if (response) {
+ // routePlanning.createRoute(response.list[0].positions)
+ // }
+ // })
+ let res = await RouteApi.queryRoute({
+ startLng: startLng.value,
+ startLat: startLat.value,
+ endLng: endLng.value,
+ endLat: endLat.value,
+ waypoints: []
+ })
+ routePlanning.createRoute(res.data.pathPoints)
+ console.log(res, 'routLIst')
+ }
+ }, 100)
})
-const closeCallBack = (e) => {}
-function pickStartPos() {}
-function pickEndPos() {}
+//加载路网数据
-const draw = (e) => {}
+const addRoute = async (fileId) => {
+ let res = await RouteApi.loadRoute({ fileId })
+ console.log(res, 'res')
+}
+const getList = async () => {
+ let list = await RouteApi.getRouteList()
+ if (list.data.length > 0) {
+ let file = list.data[list.data.length - 1]
+ addRoute(file.id)
+ }
+ console.log(list, 'list')
+}
+
+const closeCallBack = (e) => {
+ startLng.value = null
+ startLat.value = null
+ endLng.value = null
+ endLat.value = null
+}
+const routeQuery = async (e) => {
+ console.log('aaaaa')
+ let res = await RouteApi.queryRoute({
+ startLng: startLng.value,
+ startLat: startLat.value,
+ endLng: endLng.value,
+ endLat: endLat.value,
+ waypoints: []
+ })
+ console.log(res, 'res')
+}
+const clearRoute = (e) => {}
+const pickStartPos = () => {
+ routePlanning.pickStartPos((position) => {
+ console.log(position, 'position')
+ startLng.value = position.lng
+ startLat.value = position.lat
+ })
+}
+const pickEndPos = () => {
+ routePlanning.pickEndPos((position) => {
+ endLng.value = position.lng
+ endLat.value = position.lat
+ })
+}
+
+const close = (e) => {
+ baseDialog.value?.close()
+}
+
+const changeStartLng = () => {
+ routePlanning.startLng = startLng.value
+}
+const inputStartLng = () => {
+ let dom: any = document.getElementById('startLng')
+ if (startLng.value < dom.min * 1) {
+ startLng.value = dom.min * 1
+ } else if (startLng.value > dom.max * 1) {
+ startLng.value = dom.max * 1
+ }
+}
+const changeStartLat = () => {
+ routePlanning.startLat = startLat.value
+}
+const inputStartLat = () => {
+ let dom: any = document.getElementById('startLat')
+ if (startLat.value < dom.min * 1) {
+ startLat.value = dom.min * 1
+ } else if (startLat.value > dom.max * 1) {
+ startLat.value = dom.max * 1
+ }
+}
+const changeEndLng = () => {
+ routePlanning.endLng = endLng.value
+}
+const inputEndLng = () => {
+ let dom: any = document.getElementById('endLng')
+ if (endLng.value < dom.min * 1) {
+ endLng.value = dom.min * 1
+ } else if (endLng.value > dom.max * 1) {
+ endLng.value = dom.max * 1
+ }
+}
+const changeEndLat = () => {
+ routePlanning.endLat = endLat.value
+}
+const inputEndLat = () => {
+ let dom: any = document.getElementById('endLat')
+ if (endLat.value < dom.min * 1) {
+ endLat.value = dom.min * 1
+ } else if (endLat.value > dom.max * 1) {
+ endLat.value = dom.max * 1
+ }
+}
diff --git a/src/renderer/src/views/components/propertyBox/imagePop.vue b/src/renderer/src/views/components/propertyBox/imagePop.vue
new file mode 100644
index 0000000..11f4cfa
--- /dev/null
+++ b/src/renderer/src/views/components/propertyBox/imagePop.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/components/propertyBox/model.vue b/src/renderer/src/views/components/propertyBox/model.vue
new file mode 100644
index 0000000..02c5331
--- /dev/null
+++ b/src/renderer/src/views/components/propertyBox/model.vue
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
diff --git a/src/renderer/src/views/home/index.vue b/src/renderer/src/views/home/index.vue
index fe926a2..f395abd 100644
--- a/src/renderer/src/views/home/index.vue
+++ b/src/renderer/src/views/home/index.vue
@@ -10,32 +10,41 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+