Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
@ -195,6 +195,7 @@ function createWindow(): void {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// 监听渲染进程创建新窗口的请求
|
// 监听渲染进程创建新窗口的请求
|
||||||
|
// @ts-ignore
|
||||||
ipcMain.handle('create-new-window', async (event, params, url, option) => {
|
ipcMain.handle('create-new-window', async (event, params, url, option) => {
|
||||||
try {
|
try {
|
||||||
const newWindow = await new BrowserWindow(params)
|
const newWindow = await new BrowserWindow(params)
|
||||||
|
|||||||
@ -899,14 +899,14 @@
|
|||||||
|
|
||||||
.fly-roam>.content .table .tr .th:first-child,
|
.fly-roam>.content .table .tr .th:first-child,
|
||||||
.fly-roam>.content .table .tr .td:first-child {
|
.fly-roam>.content .table .tr .td:first-child {
|
||||||
flex: 0 0 95px;
|
flex: 0 0 70px;
|
||||||
width: 95px;
|
width: 70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fly-roam>.content .table .tr .th:nth-child(2),
|
.fly-roam>.content .table .tr .th:nth-child(2),
|
||||||
.fly-roam>.content .table .tr .td:nth-child(2) {
|
.fly-roam>.content .table .tr .td:nth-child(2) {
|
||||||
flex: 0 0 240px;
|
flex: 0 0 100px;
|
||||||
width: 240px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fly-roam>.content .table .tr .th:last-child,
|
.fly-roam>.content .table .tr .th:last-child,
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import { title } from "process";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
week: {
|
week: {
|
||||||
0: '星期日',
|
0: '星期日',
|
||||||
@ -163,7 +165,9 @@ export default {
|
|||||||
authTime: '授权时间',
|
authTime: '授权时间',
|
||||||
authCode: '授权码',
|
authCode: '授权码',
|
||||||
upload: '授权导入',
|
upload: '授权导入',
|
||||||
authexpire: '授权过期'
|
authexpire: '授权过期',
|
||||||
|
authTempExpire: '授权正常',
|
||||||
|
noAuthexpire: '暂未授权',
|
||||||
},
|
},
|
||||||
systemSetting: {
|
systemSetting: {
|
||||||
setLanguage: '语言设置',
|
setLanguage: '语言设置',
|
||||||
@ -188,6 +192,7 @@ export default {
|
|||||||
areaUnit: '面积单位',
|
areaUnit: '面积单位',
|
||||||
heightUnit: '高度单位',
|
heightUnit: '高度单位',
|
||||||
speedUnit: '速度单位',
|
speedUnit: '速度单位',
|
||||||
|
administrativeArea: '行政区划',
|
||||||
skinList: {
|
skinList: {
|
||||||
yingguangse: '荧光色',
|
yingguangse: '荧光色',
|
||||||
gonganlan: '科技蓝',
|
gonganlan: '科技蓝',
|
||||||
@ -205,5 +210,9 @@ export default {
|
|||||||
versions: {
|
versions: {
|
||||||
version_code: '版本号',
|
version_code: '版本号',
|
||||||
version_update: '检查更新'
|
version_update: '检查更新'
|
||||||
|
},
|
||||||
|
model: {
|
||||||
|
title: '模型选择',
|
||||||
|
setting: '默认模型参数设置'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
src/renderer/src/api/route/index.ts
Normal file
@ -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'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
@ -1,335 +1,330 @@
|
|||||||
// productName
|
// productName
|
||||||
let obj = require("../../../../../config/app_config");
|
let obj = require('../../../../../config/app_config')
|
||||||
console.log(obj);
|
console.log(obj)
|
||||||
module.exports = {
|
module.exports = {
|
||||||
title: {
|
title: {
|
||||||
name: obj.productName, //"实景三维数字孪生系统"
|
name: obj.productName //"实景三维数字孪生系统"
|
||||||
},
|
},
|
||||||
login: {
|
login: {
|
||||||
signIn: "登录",
|
signIn: '登录'
|
||||||
},
|
},
|
||||||
dashboard: {
|
dashboard: {
|
||||||
langLable: "中文简体",
|
langLable: '中文简体'
|
||||||
},
|
},
|
||||||
leftMenu: {
|
leftMenu: {
|
||||||
firstMenu: {
|
firstMenu: {
|
||||||
measure: "测量库",
|
measure: '测量库',
|
||||||
tool: "工具库",
|
tool: '工具库',
|
||||||
effect: "特效库",
|
effect: '特效库',
|
||||||
bigData: "大数据",
|
bigData: '大数据',
|
||||||
modelLibrary: "模型库",
|
modelLibrary: '模型库',
|
||||||
situation: "方案库",
|
situation: '方案库',
|
||||||
onlinePictureSource: "在线图源",
|
onlinePictureSource: '在线图源',
|
||||||
analysis: "分析库",
|
analysis: '分析库',
|
||||||
militaryMark: "军标库",
|
militaryMark: '军标库',
|
||||||
ersanwei: "二三维",
|
ersanwei: '二三维',
|
||||||
junbiao3d: "三维军标",
|
junbiao3d: '三维军标'
|
||||||
},
|
},
|
||||||
secondMenu: {
|
secondMenu: {
|
||||||
//模型库
|
//模型库
|
||||||
imports: "导入",
|
imports: '导入',
|
||||||
// 测量二级菜单
|
// 测量二级菜单
|
||||||
projectionArea: "投影面积",
|
projectionArea: '投影面积',
|
||||||
areaMeasure: "贴地面积",
|
areaMeasure: '贴地面积',
|
||||||
distanceMeasure: "贴地距离",
|
distanceMeasure: '贴地距离',
|
||||||
heightMeasure: "垂直高度",
|
heightMeasure: '垂直高度',
|
||||||
triangleMeasure: "空间三角",
|
triangleMeasure: '空间三角',
|
||||||
coorMeasure: "坐标",
|
coorMeasure: '坐标',
|
||||||
MeasureAngle: "夹角",
|
MeasureAngle: '夹角',
|
||||||
clearMeasure: "清除测量",
|
clearMeasure: '清除测量',
|
||||||
MeasureAzimuth: "方位角",
|
MeasureAzimuth: '方位角',
|
||||||
lopeDistanceMeasures: "坡度",
|
lopeDistanceMeasures: '坡度',
|
||||||
projectionDistanceMeasure: "投影距离",
|
projectionDistanceMeasure: '投影距离',
|
||||||
clear: "清除",
|
clear: '清除',
|
||||||
|
|
||||||
// 工具二级菜单
|
// 工具二级菜单
|
||||||
BIMEdit: "BIM编辑",
|
BIMEdit: 'BIM编辑',
|
||||||
goodsSearch: "物资统计",
|
goodsSearch: '物资统计',
|
||||||
goodsSearchPolgon: "多边形统计",
|
goodsSearchPolgon: '多边形统计',
|
||||||
goodsSearchCircle: "圆形统计",
|
goodsSearchCircle: '圆形统计',
|
||||||
rangeQuery: "范围查询",
|
rangeQuery: '范围查询',
|
||||||
floodSimulation: "淹没模拟",
|
floodSimulation: '淹没模拟',
|
||||||
clearQuery: "清除查询",
|
clearQuery: '清除查询',
|
||||||
destoryRecord: "结束录制",
|
destoryRecord: '结束录制',
|
||||||
graffiti: "涂鸦",
|
graffiti: '涂鸦',
|
||||||
stopGraffiti: "结束涂鸦",
|
stopGraffiti: '结束涂鸦',
|
||||||
clearGraffiti: "清除涂鸦",
|
clearGraffiti: '清除涂鸦',
|
||||||
HDScreen: "屏幕截图",
|
HDScreen: '屏幕截图',
|
||||||
HDScreenHD: "高清出图",
|
HDScreenHD: '高清出图',
|
||||||
areaScreen: "范围截图",
|
areaScreen: '范围截图',
|
||||||
coorLocation: "坐标定位",
|
coorLocation: '坐标定位',
|
||||||
perspective: "透视",
|
perspective: '透视',
|
||||||
Intervisibility: "视线分析",
|
Intervisibility: '视线分析',
|
||||||
transform: "模型转换",
|
transform: '模型转换',
|
||||||
videoRecording: "视频录制",
|
videoRecording: '视频录制',
|
||||||
routePlan: "路径规划",
|
routePlan: '路径规划',
|
||||||
tilesetClipping: "剖切",
|
tilesetClipping: '剖切',
|
||||||
clearTilesetClipping: "清除剖切",
|
clearTilesetClipping: '清除剖切',
|
||||||
pressModel: "模型压平",
|
pressModel: '模型压平',
|
||||||
terrainDig: "地形开挖",
|
terrainDig: '地形开挖',
|
||||||
splitScreen: "卷帘对比",
|
splitScreen: '卷帘对比',
|
||||||
|
|
||||||
path: "飞行漫游",
|
path: '飞行漫游',
|
||||||
annotationAggregation: "标注点聚合",
|
annotationAggregation: '标注点聚合',
|
||||||
mouseLocation: "鼠标定位",
|
mouseLocation: '鼠标定位',
|
||||||
mouseOver: "结束定位",
|
mouseOver: '结束定位',
|
||||||
importImg: "全景关联",
|
importImg: '全景关联',
|
||||||
gdbImport: "gdb导入",
|
gdbImport: 'gdb导入',
|
||||||
projConvert: "度分秒",
|
projConvert: '度分秒',
|
||||||
projectionConvert: "投影转换",
|
projectionConvert: '投影转换',
|
||||||
peopleRoomLink: "人房关联",
|
peopleRoomLink: '人房关联',
|
||||||
|
|
||||||
// 特效库二级菜单
|
// 特效库二级菜单
|
||||||
fire: "火焰",
|
fire: '火焰',
|
||||||
smoke: "烟雾",
|
smoke: '烟雾',
|
||||||
explosion: "爆炸",
|
explosion: '爆炸',
|
||||||
waterSurface: "水面",
|
waterSurface: '水面',
|
||||||
radarLightWave: "扩散光波",
|
radarLightWave: '扩散光波',
|
||||||
diffusedLightWave: "雷达光波",
|
diffusedLightWave: '雷达光波',
|
||||||
scanStereoscopic: "立体雷达",
|
scanStereoscopic: '立体雷达',
|
||||||
electronicFence: "电子围墙",
|
electronicFence: '电子围墙',
|
||||||
entityWall: "实体墙",
|
entityWall: '实体墙',
|
||||||
multilateralBody: "多边体",
|
multilateralBody: '多边体',
|
||||||
cube: "立方体",
|
cube: '立方体',
|
||||||
trajectoryMotion: "轨迹运动",
|
trajectoryMotion: '轨迹运动',
|
||||||
clearTrajectoryMotion: "清除轨迹",
|
clearTrajectoryMotion: '清除轨迹',
|
||||||
roadDraw: "道路绘制",
|
roadDraw: '道路绘制',
|
||||||
lineDraw: "线路绘制",
|
lineDraw: '线路绘制',
|
||||||
rain: "雨",
|
rain: '雨',
|
||||||
snow: "雪",
|
snow: '雪',
|
||||||
fog: "雾",
|
fog: '雾',
|
||||||
nightVision: "夜视",
|
nightVision: '夜视',
|
||||||
skystarry: "星空",
|
skystarry: '星空',
|
||||||
illumination: "光照",
|
illumination: '光照',
|
||||||
light: "光照",
|
light: '光照',
|
||||||
heatMap: "热力图",
|
heatMap: '热力图',
|
||||||
fountain: "喷泉",
|
fountain: '喷泉',
|
||||||
waterL: "喷射水柱",
|
waterL: '喷射水柱',
|
||||||
flyLine:"飞线",
|
flyLine: '飞线',
|
||||||
// 分析二级菜单
|
// 分析二级菜单
|
||||||
inundationAnalysis: "淹没分析",
|
inundationAnalysis: '淹没分析',
|
||||||
visualFieldAnalysis: "视域分析",
|
visualFieldAnalysis: '视域分析',
|
||||||
visualFieldAnalysis2: "圆形视域",
|
visualFieldAnalysis2: '圆形视域',
|
||||||
profileAnalysis: "剖面分析",
|
profileAnalysis: '剖面分析',
|
||||||
cutFill: "土方分析",
|
cutFill: '土方分析',
|
||||||
slopeDirection: "坡度坡向",
|
slopeDirection: '坡度坡向',
|
||||||
contour: "等高线",
|
contour: '等高线',
|
||||||
qcontour:'全局等高线',
|
qcontour: '全局等高线',
|
||||||
pictureLocation: "照片定位",
|
pictureLocation: '照片定位',
|
||||||
importPanorama: "全景导入",
|
importPanorama: '全景导入',
|
||||||
},
|
clearAnalysis: '清除'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
bottomMenu: {
|
bottomMenu: {
|
||||||
groundText: "贴地文字",
|
groundText: '贴地文字',
|
||||||
standText: "立体文字",
|
standText: '立体文字',
|
||||||
point: "点",
|
point: '点',
|
||||||
line: "线",
|
line: '线',
|
||||||
curve: "曲线",
|
curve: '曲线',
|
||||||
panel: "面",
|
panel: '面',
|
||||||
ellipse: "椭圆",
|
ellipse: '椭圆',
|
||||||
sector: "扇形",
|
sector: '扇形',
|
||||||
circle: "圆",
|
circle: '圆',
|
||||||
attackArrow: "箭头",
|
attackArrow: '箭头',
|
||||||
pincerArrow: "双箭头",
|
pincerArrow: '双箭头',
|
||||||
assemble: "集结地",
|
assemble: '集结地',
|
||||||
rect: "矩形",
|
rect: '矩形',
|
||||||
unLock: "锁定",
|
unLock: '锁定',
|
||||||
Lock: "解锁",
|
Lock: '解锁'
|
||||||
},
|
},
|
||||||
headerTitles: {
|
headerTitles: {
|
||||||
//顶部抬头以及系统设置页面文字汉语翻译
|
//顶部抬头以及系统设置页面文字汉语翻译
|
||||||
systemTitle: "系统设置",
|
systemTitle: '系统设置',
|
||||||
udp: "物理沙盘",
|
udp: '物理沙盘',
|
||||||
ConcurrencyControl: "并发量控制",
|
ConcurrencyControl: '并发量控制',
|
||||||
localIP: "本地IP",
|
localIP: '本地IP',
|
||||||
localPort: "本地端口",
|
localPort: '本地端口',
|
||||||
remoteIP: "远程IP",
|
remoteIP: '远程IP',
|
||||||
remotePort: "远程端口",
|
remotePort: '远程端口',
|
||||||
weather: "天气",
|
weather: '天气',
|
||||||
week: [
|
week: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||||
"星期日",
|
|
||||||
"星期一",
|
|
||||||
"星期二",
|
|
||||||
"星期三",
|
|
||||||
"星期四",
|
|
||||||
"星期五",
|
|
||||||
"星期六",
|
|
||||||
],
|
|
||||||
equipment: {
|
equipment: {
|
||||||
title: "设备管理",
|
title: '设备管理',
|
||||||
addEquipment: "添加设备",
|
addEquipment: '添加设备',
|
||||||
downloadEquipment: "下载模板",
|
downloadEquipment: '下载模板',
|
||||||
bulkImport: "批量导入",
|
bulkImport: '批量导入'
|
||||||
},
|
},
|
||||||
// 无人机
|
// 无人机
|
||||||
air: {
|
air: {
|
||||||
title: "无人机管理",
|
title: '无人机管理',
|
||||||
addAir: "添加无人机",
|
addAir: '添加无人机',
|
||||||
downloadAir: "下载模板",
|
downloadAir: '下载模板'
|
||||||
},
|
},
|
||||||
// 0827
|
// 0827
|
||||||
isc: {
|
isc: {
|
||||||
title: "ISC平台",
|
title: 'ISC平台',
|
||||||
url: "平台地址",
|
url: '平台地址',
|
||||||
setInfo: "设置平台信息",
|
setInfo: '设置平台信息',
|
||||||
updateEquipment: "更新平台设备",
|
updateEquipment: '更新平台设备'
|
||||||
},
|
},
|
||||||
iconTitle: {
|
iconTitle: {
|
||||||
reset: "默认视角",
|
reset: '默认视角',
|
||||||
fullScreen: "全屏",
|
fullScreen: '全屏',
|
||||||
set: "设置",
|
set: '设置',
|
||||||
shrink: "退出全屏",
|
shrink: '退出全屏',
|
||||||
logout: "退出登录",
|
logout: '退出登录',
|
||||||
locate: "北斗定位",
|
locate: '北斗定位',
|
||||||
air: "无人机",
|
air: '无人机',
|
||||||
excel: "Excel",
|
excel: 'Excel'
|
||||||
},
|
},
|
||||||
auth: "授权信息",
|
auth: '授权信息',
|
||||||
Engineering: "工程信息",
|
Engineering: '工程信息',
|
||||||
Hikang: "海康平台",
|
Hikang: '海康平台',
|
||||||
Version: "版本信息",
|
Version: '版本信息',
|
||||||
Theme: "系统设置",
|
Theme: '系统设置',
|
||||||
Satellite: "卫星定位",
|
Satellite: '卫星定位',
|
||||||
searchWay: {
|
searchWay: {
|
||||||
title: "搜索方式",
|
title: '搜索方式',
|
||||||
searchWayList: {
|
searchWayList: {
|
||||||
poi: "离线搜索",
|
poi: '离线搜索',
|
||||||
net: "在线搜索",
|
net: '在线搜索'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
Service: "服务接入",
|
Service: '服务接入',
|
||||||
confirm: "确认",
|
confirm: '确认',
|
||||||
auths: {
|
auths: {
|
||||||
authType: "授权状态",
|
authType: '授权状态',
|
||||||
authTime: "授权时间",
|
authTime: '授权时间',
|
||||||
authCode: "授权码",
|
authCode: '授权码',
|
||||||
upload: "授权导入",
|
upload: '授权导入',
|
||||||
authexpire: "授权过期",
|
authexpire: '授权过期',
|
||||||
|
authTempExpire: '授权正常',
|
||||||
|
noAuthexpire: '暂未授权'
|
||||||
},
|
},
|
||||||
service: {
|
service: {
|
||||||
offline: "离线服务",
|
offline: '离线服务',
|
||||||
official: "官方服务",
|
official: '官方服务',
|
||||||
customize: "自定义",
|
customize: '自定义',
|
||||||
agreements: {
|
agreements: {
|
||||||
Agreement: "协议",
|
Agreement: '协议',
|
||||||
setAgreement: "协议设置",
|
setAgreement: '协议设置',
|
||||||
port: "端口",
|
port: '端口',
|
||||||
location: "地址",
|
location: '地址'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
Engineerings: {
|
Engineerings: {
|
||||||
import: "路网导入",
|
import: '路网导入',
|
||||||
cover: "覆盖",
|
cover: '覆盖',
|
||||||
increase: "增加",
|
increase: '增加',
|
||||||
importProject: "工程覆盖导入",
|
importProject: '工程覆盖导入',
|
||||||
consolidated: "工程合并导入",
|
consolidated: '工程合并导入',
|
||||||
derive: "工程导出",
|
derive: '工程导出',
|
||||||
importPOI: "POI导入",
|
importPOI: 'POI导入'
|
||||||
},
|
},
|
||||||
Hikangs: {
|
Hikangs: {
|
||||||
enable: "启用",
|
enable: '启用'
|
||||||
},
|
},
|
||||||
versions: {
|
versions: {
|
||||||
version_code: "版本号",
|
version_code: '版本号',
|
||||||
version_update: "检查更新",
|
version_update: '检查更新'
|
||||||
},
|
},
|
||||||
systemSetting: {
|
systemSetting: {
|
||||||
setLanguage: "语言设置",
|
setLanguage: '语言设置',
|
||||||
theme: "主题换肤",
|
theme: '主题换肤',
|
||||||
defaultView: "设置默认视角",
|
defaultView: '设置默认视角',
|
||||||
defaultData: "添加在线数据",
|
defaultData: '添加在线数据',
|
||||||
management: "后台管理",
|
management: '后台管理',
|
||||||
showCompass: "导航器",
|
showCompass: '导航器',
|
||||||
showLatitudeLongitudeNetwork: "经纬网",
|
showLatitudeLongitudeNetwork: '经纬网',
|
||||||
showFangliNet: "方里网",
|
showFangliNet: '方里网',
|
||||||
showDistanceLegend: "比例尺",
|
showDistanceLegend: '比例尺',
|
||||||
showToolBar: "信息栏",
|
showToolBar: '信息栏',
|
||||||
showFPS: "刷新率",
|
showFPS: '刷新率',
|
||||||
showMapX: "鹰眼图",
|
showMapX: '鹰眼图',
|
||||||
occlusion: "地形遮挡",
|
occlusion: '地形遮挡',
|
||||||
coordinateSystem: "系统坐标系",
|
coordinateSystem: '系统坐标系',
|
||||||
sheetIndexStatusSwitch: "标准图幅",
|
sheetIndexStatusSwitch: '标准图幅',
|
||||||
switch: "切换",
|
switch: '切换',
|
||||||
battery: "电池信息",
|
battery: '电池信息',
|
||||||
skinList: {
|
skinList: {
|
||||||
yingguangse: "荧光色",
|
yingguangse: '荧光色',
|
||||||
gonganlan: "科技蓝",
|
gonganlan: '科技蓝',
|
||||||
hong: "烈日红",
|
hong: '烈日红'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
title: "模型管理",
|
title: '模型管理',
|
||||||
createModelLibrary: "创建模型库",
|
createModelLibrary: '创建模型库',
|
||||||
selectModelLibrary: "选择模型库",
|
selectModelLibrary: '选择模型库',
|
||||||
addModelType: "添加模型类型",
|
addModelType: '添加模型类型',
|
||||||
importModel: "导入模型",
|
importModel: '导入模型',
|
||||||
updatePoster: "更换缩略图",
|
updatePoster: '更换缩略图',
|
||||||
preview: "预览",
|
preview: '预览',
|
||||||
updateModel: "更换模型",
|
updateModel: '更换模型',
|
||||||
deleteModel: "删除",
|
deleteModel: '删除',
|
||||||
editModel: "编辑",
|
editModel: '编辑'
|
||||||
},
|
},
|
||||||
graphLabel: {
|
graphLabel: {
|
||||||
title: "军标管理",
|
title: '军标管理',
|
||||||
createGraphLabelLibrary: "创建军标库",
|
createGraphLabelLibrary: '创建军标库',
|
||||||
selectGraphLabelLibrary: "选择军标库",
|
selectGraphLabelLibrary: '选择军标库',
|
||||||
addGraphLabelType: "添加军标类型",
|
addGraphLabelType: '添加军标类型',
|
||||||
importGraphLabel: "导入军标",
|
importGraphLabel: '导入军标',
|
||||||
edit: "编辑",
|
edit: '编辑',
|
||||||
delete: "删除",
|
delete: '删除',
|
||||||
importGraph: "导入军标",
|
importGraph: '导入军标',
|
||||||
addLine: "添加线",
|
addLine: '添加线',
|
||||||
addPanel: "添加面",
|
addPanel: '添加面',
|
||||||
addCircle: "添加圆",
|
addCircle: '添加圆'
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
title: "用户管理",
|
title: '用户管理',
|
||||||
deleteUser: "删除",
|
deleteUser: '删除',
|
||||||
createUser: "创建用户",
|
createUser: '创建用户',
|
||||||
importUser: "导入用户",
|
importUser: '导入用户',
|
||||||
role: "权限管理",
|
role: '权限管理',
|
||||||
deleteRole: "删除",
|
deleteRole: '删除',
|
||||||
createRole: "创建角色",
|
createRole: '创建角色',
|
||||||
depart: "部门管理",
|
depart: '部门管理',
|
||||||
createDepart: "创建部门",
|
createDepart: '创建部门',
|
||||||
deleteDepart: "删除部门",
|
deleteDepart: '删除部门',
|
||||||
editDepart: "修改部门",
|
editDepart: '修改部门'
|
||||||
},
|
},
|
||||||
terrain: {
|
terrain: {
|
||||||
terrainSetting: "地形设置",
|
terrainSetting: '地形设置'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
rightMenu: {
|
rightMenu: {
|
||||||
addDirectory: "添加文件夹",
|
addDirectory: '添加文件夹',
|
||||||
addResource: "添加地图数据",
|
addResource: '添加地图数据',
|
||||||
pictureLocation: "带定位照片",
|
pictureLocation: '带定位照片',
|
||||||
importPanorama: "带定位全景",
|
importPanorama: '带定位全景',
|
||||||
addBIM: "添加BIM",
|
addBIM: '添加BIM',
|
||||||
edit: "编辑节点",
|
edit: '编辑节点',
|
||||||
del: "删除节点",
|
del: '删除节点',
|
||||||
setView: "设置视角",
|
setView: '设置视角',
|
||||||
resetView: "重置视角",
|
resetView: '重置视角',
|
||||||
layerRaise: "图层上移",
|
layerRaise: '图层上移',
|
||||||
layerLower: "图层下移",
|
layerLower: '图层下移',
|
||||||
layerToTop: "图层置顶",
|
layerToTop: '图层置顶',
|
||||||
layerToBottom: "图层置底",
|
layerToBottom: '图层置底',
|
||||||
tilesetClipping: "剖切",
|
tilesetClipping: '剖切',
|
||||||
addTrajectory: "轨迹运动",
|
addTrajectory: '轨迹运动',
|
||||||
addXlsx: "添加作战数据",
|
addXlsx: '添加作战数据',
|
||||||
showAttr: "查看属性",
|
showAttr: '查看属性',
|
||||||
importHeader: "导入表头",
|
importHeader: '导入表头',
|
||||||
resetPerspective: "重置透视",
|
resetPerspective: '重置透视'
|
||||||
},
|
},
|
||||||
tree: {
|
tree: {
|
||||||
title: "图层指挥舱",
|
title: '图层指挥舱',
|
||||||
// title: "综合信息",
|
// title: "综合信息",
|
||||||
layer: "图层",
|
layer: '图层',
|
||||||
location: "地点",
|
location: '地点'
|
||||||
},
|
},
|
||||||
btn: {
|
btn: {
|
||||||
search: "搜索",
|
search: '搜索',
|
||||||
treePlaceholder: "关键词搜索",
|
treePlaceholder: '关键词搜索',
|
||||||
selectPlaceholder: "请选择",
|
selectPlaceholder: '请选择',
|
||||||
selectNoText: "无数据",
|
selectNoText: '无数据'
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
BIN
src/renderer/src/assets/images/noData.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
@ -20,7 +20,7 @@ export const initMapData = async (type, data) => {
|
|||||||
case 'linkImage':
|
case 'linkImage':
|
||||||
case 'vrImage':
|
case 'vrImage':
|
||||||
entityObject = new YJ.Obj.BillboardObject(window.earth, data)
|
entityObject = new YJ.Obj.BillboardObject(window.earth, data)
|
||||||
entityObject.options.billboard.defaultImage=''
|
entityObject.options.billboard.defaultImage = ''
|
||||||
break
|
break
|
||||||
case 'line':
|
case 'line':
|
||||||
entityObject = await new YJ.Obj.PolylineObject(window.earth, data)
|
entityObject = await new YJ.Obj.PolylineObject(window.earth, data)
|
||||||
@ -56,7 +56,7 @@ export const initMapData = async (type, data) => {
|
|||||||
break
|
break
|
||||||
case 'layer':
|
case 'layer':
|
||||||
data.host = baseURL
|
data.host = baseURL
|
||||||
console.log('data',data)
|
console.log('data', data)
|
||||||
entityObject = new YJ.Obj.Layer(window.earth, data)
|
entityObject = new YJ.Obj.Layer(window.earth, data)
|
||||||
break
|
break
|
||||||
case 'tileset':
|
case 'tileset':
|
||||||
@ -101,16 +101,19 @@ export const initMapData = async (type, data) => {
|
|||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
options = structuredClone(entityObject.options)
|
|
||||||
delete options.host
|
if (entityObject) {
|
||||||
//鼠标左键点击事件
|
options = structuredClone(entityObject.options)
|
||||||
entityObject.onClick = () => {
|
delete options.host
|
||||||
leftClick(options);
|
//鼠标左键点击事件
|
||||||
};
|
entityObject.onClick = () => {
|
||||||
//鼠标右键点击事件
|
leftClick(options);
|
||||||
entityObject.onRightClick = () => {
|
};
|
||||||
rightClick(options);
|
//鼠标右键点击事件
|
||||||
};
|
entityObject.onRightClick = () => {
|
||||||
|
rightClick(options);
|
||||||
|
};
|
||||||
|
}
|
||||||
// options = entityObject
|
// options = entityObject
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { UploadFilled } from '@element-plus/icons-vue'
|
import { UploadFilled } from '@element-plus/icons-vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
|
||||||
// 组件属性
|
// 组件属性
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -49,7 +50,7 @@ const isUploading = ref(false)
|
|||||||
const uploadUrl = () => {
|
const uploadUrl = () => {
|
||||||
//process.env.BASE_API +
|
//process.env.BASE_API +
|
||||||
console.log(process.env.BASE_API, 'yyyyy')
|
console.log(process.env.BASE_API, 'yyyyy')
|
||||||
let url = 'http://192.168.110.25:8848' + '/yjearth4.0/api/v1/auth/import'
|
let url = 'http://127.0.0.1:8848' + '/auth/import'
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
// 上传前处理
|
// 上传前处理
|
||||||
@ -68,6 +69,7 @@ const handleBeforeUpload = (file: File) => {
|
|||||||
const handleSuccess = (response: any) => {
|
const handleSuccess = (response: any) => {
|
||||||
isUploading.value = false
|
isUploading.value = false
|
||||||
ElMessage.success('文件上传成功')
|
ElMessage.success('文件上传成功')
|
||||||
|
eventBus.emit('upload', true)
|
||||||
// 可以在这里添加成功后的其他逻辑
|
// 可以在这里添加成功后的其他逻辑
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
src/renderer/src/icons/svg/arrow.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="6" viewBox="0 0 12 6" fill="none"><path d="M0.27 0.27L0 0L12 0L10.67 1.33L6 6L5 5L0.27 0.27Z" fill="#00FFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 227 B |
1
src/renderer/src/icons/svg/delModel.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="11.7431640625" height="12" viewBox="0 0 11.7431640625 12" fill="none"><path d="M11.2307 3.25001L0.512179 3.25001C0.2311 3.25001 0 3.02501 0 2.75C0 2.475 0.2311 2.25 0.512179 2.25L11.2307 2.25C11.5117 2.25 11.7429 2.475 11.7429 2.75C11.7429 3.02501 11.5117 3.25001 11.2307 3.25001Z" fill="#FFFFFF" ></path><path d="M4.52223 2.61251C4.50975 2.53751 4.50349 2.45625 4.50349 2.375C4.50349 1.61876 5.12187 1.00001 5.87766 1.00001C6.63346 1.00001 7.25183 1.61876 7.25183 2.375C7.25183 2.45625 7.24558 2.53125 7.2331 2.61251L8.23873 2.61251C8.24498 2.53751 8.25122 2.45625 8.25122 2.375C8.25122 1.0625 7.18937 0 5.87766 0C4.56596 0 3.50411 1.0625 3.50411 2.375C3.50411 2.45625 3.51035 2.53125 3.5166 2.61251L4.52223 2.61251ZM9.3693 2.73125L9.3693 11L2.37354 11L2.37354 2.73125L1.37415 2.73125L1.37415 11.2188C1.37415 11.65 1.72394 12 2.15493 12L9.58791 12C10.0189 12 10.3687 11.65 10.3687 11.2188L10.3687 2.73125L9.3693 2.73125Z" fill="#FFFFFF" ></path><path d="M4.12862 9.36249L4.11614 9.36249C3.84131 9.36249 3.62268 9.14373 3.62268 8.86873L3.62268 5.35623C3.62268 5.08123 3.84131 4.86249 4.11614 4.86249L4.12862 4.86249C4.40347 4.86249 4.62208 5.08123 4.62208 5.35623L4.62208 8.87499C4.62208 9.14373 4.40347 9.36249 4.12862 9.36249ZM5.87757 9.36249L5.86508 9.36249C5.59024 9.36249 5.37162 9.14373 5.37162 8.86873L5.37162 5.35623C5.37162 5.08123 5.59024 4.86249 5.86508 4.86249L5.87757 4.86249C6.15239 4.86249 6.37102 5.08123 6.37102 5.35623L6.37102 8.87499C6.37102 9.14373 6.15239 9.36249 5.87757 9.36249ZM7.62651 9.36249L7.61401 9.36249C7.33918 9.36249 7.12056 9.14373 7.12056 8.86873L7.12056 5.35623C7.12056 5.08123 7.33918 4.86249 7.61401 4.86249L7.62651 4.86249C7.90134 4.86249 8.11995 5.08123 8.11995 5.35623L8.11995 8.87499C8.11995 9.14373 7.90134 9.36249 7.62651 9.36249Z" fill="#FFFFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
1
src/renderer/src/icons/svg/importModel.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M11.9143 5.01493L11.9143 0.776121C11.9143 0.417911 11.6164 0.119404 11.259 0.119404L6.85072 0.119404C6.49329 0.119404 6.19544 0.417911 6.19544 0.776121L6.19544 5.01493C6.19544 5.37314 6.49329 5.67166 6.85072 5.67166L11.259 5.67166C11.6164 5.67166 11.9143 5.37314 11.9143 5.01493ZM0.655291 6.32837C0.297862 6.32837 0 6.62687 0 6.98508L0 11.2239C0 11.5821 0.297862 11.8806 0.655291 11.8806L5.06357 11.8806C5.421 11.8806 5.71886 11.5821 5.71886 11.2239L5.71886 6.98508C5.71886 6.62687 5.421 6.32837 5.06357 6.32837L0.655291 6.32837ZM3.09772 3.46269L2.44244 3.46269C2.44244 2.32836 3.39557 1.37314 4.52743 1.37314L4.76572 1.37314C4.94444 1.37314 5.06357 1.25373 5.06357 1.07462L5.06357 0.298513C5.06357 0.119404 4.94444 0 4.76572 0L4.52743 0C2.62115 0 1.07228 1.55225 1.07228 3.46269L0.297862 3.46269C0.178714 3.46269 0.119144 3.58209 0.119144 3.70151C0.119144 3.7612 0.119144 3.7612 0.178714 3.8209L1.48929 5.31345C1.60843 5.43285 1.78714 5.43285 1.90629 5.31345L3.21686 3.8209C3.27643 3.7612 3.27643 3.6418 3.21686 3.58209C3.15729 3.5224 3.15729 3.46269 3.09772 3.46269ZM8.81657 8.47762L9.47185 8.47762C9.47185 9.61196 8.51872 10.5672 7.38686 10.5672L7.14857 10.5672C6.96986 10.5672 6.85072 10.6866 6.85072 10.8657L6.85072 11.7015C6.85072 11.8806 6.96986 12 7.14857 12L7.38686 12C9.29314 12 10.842 10.4478 10.842 8.53733L11.6164 8.53733C11.7356 8.53733 11.7951 8.47762 11.7951 8.35823C11.7951 8.29852 11.7951 8.29852 11.7356 8.23881L10.425 6.74628C10.3059 6.62687 10.1271 6.62687 10.008 6.74628L8.69744 8.23881C8.63786 8.29852 8.63786 8.41792 8.69744 8.47762C8.69744 8.41792 8.757 8.47762 8.81657 8.47762Z" fill="#FFFFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
1
src/renderer/src/icons/svg/more.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="6" height="12" viewBox="0 0 6 12" fill="none"><path d="M0.266672 11.7333L0 12L0 0L1.33334 1.33333L6 6L5 7L0.266672 11.7333ZM1.33334 8.66667L3.93334 6L1.33334 3.33333L1.33334 8.66667Z" fill="#00FFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 305 B |
1
src/renderer/src/icons/svg/rename.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.00048828125" height="11.5714111328125" viewBox="0 0 12.00048828125 11.5714111328125" fill="none"><path d="M3.7409 6.41011C3.73308 6.42006 3.72525 6.43049 3.72175 6.44307L3.11799 8.65004C3.08272 8.77852 3.11886 8.91695 3.2142 9.01459C3.2856 9.08404 3.37962 9.12225 3.47974 9.12225C3.51282 9.12225 3.54591 9.11834 3.57855 9.10964L5.77641 8.51201C5.77991 8.51201 5.78166 8.51504 5.78426 8.51504C5.80949 8.51504 5.83433 8.50593 5.85306 8.48681L11.7302 2.6281C11.9047 2.45386 12.0005 2.21645 12.0005 1.95821C12.0005 1.66547 11.876 1.37296 11.6579 1.15616L11.1029 0.601926C10.8852 0.384481 10.5914 0.260132 10.298 0.260132C10.039 0.260132 9.80087 0.35563 9.62585 0.529435L3.7496 6.3897C3.74353 6.39533 3.74527 6.40359 3.7409 6.41011ZM11.1551 2.05435L10.5713 2.63594L9.62497 1.67742L10.2005 1.10364C10.2915 1.01252 10.4677 1.02576 10.5722 1.13034L11.1276 1.68459C11.1856 1.74232 11.2186 1.81911 11.2186 1.89506C11.2182 1.95736 11.196 2.01379 11.1551 2.05435ZM4.78608 6.50212L9.02687 2.27375L9.97368 3.23292L5.74074 7.45302L4.78608 6.50212ZM4.01341 8.21646L4.31987 7.09497L5.13737 7.91005L4.01341 8.21646Z" fill="#FFFFFF" ></path><path d="M11.5269 4.37595C11.3045 4.37595 11.1221 4.55627 11.1212 4.7811L11.1212 10.2433C11.1212 10.5298 10.8879 10.7624 10.6001 10.7624L1.33239 10.7624C1.04508 10.7624 0.810873 10.5298 0.810873 10.2433L0.810873 1.32787C0.810873 1.04119 1.04508 0.808348 1.33239 0.808348L7.30135 0.808348C7.52508 0.808348 7.70665 0.627163 7.70665 0.404064C7.70665 0.18142 7.52508 0 7.30135 0L1.27058 0C0.570171 0 0.00012207 0.56791 0.00012207 1.26667L0.00012207 10.305C0.00012207 11.0037 0.570171 11.5714 1.27058 11.5714L10.6615 11.5714C11.3624 11.5714 11.9322 11.0037 11.9322 10.305L11.9322 4.77849C11.9313 4.55627 11.7494 4.37595 11.5269 4.37595Z" fill="#FFFFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
1
src/renderer/src/icons/svg/stop.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M1.89609 6.22642L1.92439 6.22642L1.89609 6.22642ZM10.2446 1.75472C9.14086 0.650943 7.64097 0 5.99957 0C4.35818 0 2.82999 0.679245 1.75459 1.75472C0.679197 2.83019 0 4.33019 0 6C0 7.64151 0.679197 9.16981 1.75459 10.2453C2.82999 11.3491 4.35818 12 5.99957 12C7.66927 12 9.16916 11.3208 10.2446 10.2453C11.3483 9.16981 11.9991 7.66981 11.9991 6C12.0274 4.33019 11.3483 2.83019 10.2446 1.75472ZM9.59366 9.59434C8.68806 10.5 7.41457 11.0943 5.99957 11.0943C4.58458 11.0943 3.31109 10.5283 2.40549 9.59434C1.49989 8.68868 0.905596 7.41509 0.905596 6C0.905596 4.58491 1.47159 3.31132 2.40549 2.40566C3.33939 1.5 4.61288 0.90566 5.99957 0.90566C7.38627 0.90566 8.65976 1.4717 9.56536 2.37736L9.59366 2.40566C10.4993 3.31132 11.0936 4.58491 11.0936 6C11.0936 7.41509 10.5276 8.68868 9.59366 9.59434ZM8.97106 3.0566L3.05639 3.0566L3.05639 8.9717L8.97106 8.9717L8.97106 3.0566Z" fill="#FFFFFF" ></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@ -34,7 +34,11 @@ const i18n = createI18n({
|
|||||||
'zh-TW': zhTW,
|
'zh-TW': zhTW,
|
||||||
'zh-EN': zhEN
|
'zh-EN': zhEN
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
|
if (!localStorage.getItem("searchWay")) {
|
||||||
|
localStorage.setItem("searchWay", "poi");
|
||||||
|
}
|
||||||
// 注册全局指令
|
// 注册全局指令
|
||||||
(window as any)._winMap = new Map();
|
(window as any)._winMap = new Map();
|
||||||
const setApp = createApp(App)
|
const setApp = createApp(App)
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="bottomMenuBox zIndex9">
|
<div class="bottomMenuBox zIndex9">
|
||||||
<div class="animate__animated bottomMenu">
|
<div class="animate__animated bottomMenu">
|
||||||
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i" :title="t('bottomMenu.' + item.sourceType)"
|
<div
|
||||||
@click="addMarker(item)">
|
class="bottom_box"
|
||||||
|
v-for="(item, i) of bottomMenuList"
|
||||||
|
:key="i"
|
||||||
|
:title="t('bottomMenu.' + item.sourceType)"
|
||||||
|
@click="addMarker(item)"
|
||||||
|
>
|
||||||
<svg-icon :name="item.sourceType" :size="20" color="rgba(0, 255, 255, 1)"></svg-icon>
|
<svg-icon :name="item.sourceType" :size="20" color="rgba(0, 255, 255, 1)"></svg-icon>
|
||||||
<div class="span">
|
<div class="span">
|
||||||
{{ t('bottomMenu.' + item.sourceType) }}
|
{{ t('bottomMenu.' + item.sourceType) }}
|
||||||
@ -62,6 +67,7 @@ const bottomMenuList = ref([
|
|||||||
fun: () => {
|
fun: () => {
|
||||||
let Draw = new YJ.Draw.DrawPoint(window.earth)
|
let Draw = new YJ.Draw.DrawPoint(window.earth)
|
||||||
Draw.start(async (a, position) => {
|
Draw.start(async (a, position) => {
|
||||||
|
console.log(position, 'position')
|
||||||
if (!position) {
|
if (!position) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -182,7 +188,8 @@ const bottomMenuList = ref([
|
|||||||
opt: {
|
opt: {
|
||||||
id: id,
|
id: id,
|
||||||
name: name,
|
name: name,
|
||||||
center: opt.center, radius: opt.radius
|
center: opt.center,
|
||||||
|
radius: opt.radius
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -407,7 +414,7 @@ const addMarker = (item: any) => {
|
|||||||
transform: scale(0.8);
|
transform: scale(0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
>.span {
|
> .span {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: 黑体;
|
font-family: 黑体;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
|||||||
@ -5,8 +5,13 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authCode') }}
|
{{ t('auths.authCode') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="auth_info_text" @click="copy" style="cursor: pointer" title="点击可复制">
|
<div
|
||||||
{{ authInfo.license_code || '23232323232323232' }}
|
class="auth_info_text"
|
||||||
|
@click="copy(authInfo.license_code)"
|
||||||
|
style="cursor: pointer"
|
||||||
|
title="点击可复制"
|
||||||
|
>
|
||||||
|
{{ authInfo.license_code || '' }}
|
||||||
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -15,14 +20,11 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authTime') }}
|
{{ t('auths.authTime') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="auth_info_text" v-if="authInfo.status != null">
|
||||||
class="auth_info_text"
|
<template v-if="authInfo.generateTime != ''">
|
||||||
v-if="authInfo.message === '永久授权' || authInfo.message === '临时授权'"
|
{{ authInfo.generateTime || '2023-01-01' }}-
|
||||||
>
|
|
||||||
<template v-if="authInfo.start_at != ''">
|
|
||||||
{{ authInfo.start_at || '2023-01-01' }}-
|
|
||||||
</template>
|
</template>
|
||||||
{{ authInfo.end_at || '2023-01-01' }}
|
{{ authInfo.expireTime || '2023-01-01' }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="auth_info_text">暂无</div>
|
<div v-else class="auth_info_text">暂无</div>
|
||||||
</div>
|
</div>
|
||||||
@ -31,10 +33,18 @@
|
|||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
{{ t('auths.authType') }}
|
{{ t('auths.authType') }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="authInfo.message.includes('token')" class="auth_info_text">
|
<div
|
||||||
{{ t('auths.authexpire') }}
|
v-if="authInfo.status != null"
|
||||||
|
class="auth_info_text"
|
||||||
|
style="font-size: 16px"
|
||||||
|
:style="{ color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)' }"
|
||||||
|
>
|
||||||
|
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
|
||||||
|
</div>
|
||||||
|
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> -->
|
||||||
|
<div v-else class="auth_info_text" style="font-size: 16px; color: rgba(241, 108, 85, 1)">
|
||||||
|
{{ t('auths.noAuthexpire') }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<uploadFiles accept=".lic" :maxSize="1"></uploadFiles>
|
<uploadFiles accept=".lic" :maxSize="1"></uploadFiles>
|
||||||
</div>
|
</div>
|
||||||
@ -44,31 +54,64 @@
|
|||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import uploadFiles from '@/components/upload/uploadFiles.vue'
|
import uploadFiles from '@/components/upload/uploadFiles.vue'
|
||||||
import { AuthApi } from '@/api/setting/auth'
|
import { AuthApi } from '@/api/setting/auth'
|
||||||
|
import useClipboard from 'vue-clipboard3'
|
||||||
|
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const authInfo = ref({
|
const authInfo = ref({
|
||||||
license_code: '',
|
license_code: '',
|
||||||
//授权信息
|
//授权信息
|
||||||
device_serial: '', //授权码
|
generateTime: '', //开始时间
|
||||||
start_at: '', //授权时间
|
expireTime: '', //结束时间
|
||||||
end_at: '', //授权时间
|
authDays: null, //授权时间
|
||||||
auth_type: '无', //授权时间
|
status: null
|
||||||
message: '' //
|
|
||||||
})
|
})
|
||||||
|
//上传授权文件成功
|
||||||
|
eventBus.on('upload', (data) => {
|
||||||
|
if (data) {
|
||||||
|
getAuthInfo()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const { toClipboard } = useClipboard()
|
||||||
|
|
||||||
const getAuthInfo = async () => {
|
const getAuthInfo = async () => {
|
||||||
const res = await AuthApi.showAuth()
|
const res = await AuthApi.showAuth()
|
||||||
console.log(res, 'resres')
|
if (typeof res.data === 'object') {
|
||||||
|
authInfo.value.generateTime = res.data.generateTime
|
||||||
|
authInfo.value.expireTime = res.data.expireTime
|
||||||
|
getStatus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStatus = () => {
|
||||||
|
const timestamp = new Date(authInfo.value.expireTime).getTime()
|
||||||
|
|
||||||
|
const currentTimestamp = Date.now()
|
||||||
|
|
||||||
|
if (timestamp > currentTimestamp) {
|
||||||
|
authInfo.value.status = true
|
||||||
|
} else {
|
||||||
|
authInfo.value.status = false
|
||||||
|
}
|
||||||
|
window.checkAuthIsValid = authInfo.value.status
|
||||||
}
|
}
|
||||||
const getAuthCode = async () => {
|
const getAuthCode = async () => {
|
||||||
const res = await AuthApi.authInfo()
|
const res = await AuthApi.authInfo()
|
||||||
authInfo.value.license_code = res.data
|
authInfo.value.license_code = res.data
|
||||||
console.log(res, 'resres22')
|
console.log(res, '码')
|
||||||
}
|
}
|
||||||
getAuthInfo()
|
getAuthInfo()
|
||||||
getAuthCode()
|
getAuthCode()
|
||||||
//复制
|
//复制
|
||||||
const copy = () => {
|
|
||||||
console.log(1111111)
|
const copy = async (text) => {
|
||||||
|
try {
|
||||||
|
await toClipboard(text)
|
||||||
|
console.log('复制成功')
|
||||||
|
} catch (e) {
|
||||||
|
console.error('复制失败', e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -83,8 +126,8 @@ const copy = () => {
|
|||||||
|
|
||||||
.auth_info_text {
|
.auth_info_text {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 18px;
|
font-size: 14px;
|
||||||
font-weight: bolder;
|
font-weight: 700;
|
||||||
margin: 7px 0 15px 15px;
|
margin: 7px 0 15px 15px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
v-show="visible"
|
||||||
|
class="context-menu"
|
||||||
|
:style="{ left: x + 'px', top: y + 'px' }"
|
||||||
|
@click.stop
|
||||||
|
@contextmenu.stop
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="item in menuItems"
|
||||||
|
:key="item.command"
|
||||||
|
class="menu-item"
|
||||||
|
@click="handleClick(item.command)"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
:name="item.icon"
|
||||||
|
:size="12"
|
||||||
|
color="rgba(0, 255, 255, 1)"
|
||||||
|
style="margin-right: 5px"
|
||||||
|
></svg-icon>
|
||||||
|
{{ item.label }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
x: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
menuItems: {
|
||||||
|
type: Array as () => Array<{
|
||||||
|
command: string
|
||||||
|
icon: string
|
||||||
|
label: string
|
||||||
|
disabled?: boolean
|
||||||
|
}>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:visible', 'command'])
|
||||||
|
|
||||||
|
const handleClick = (command: string) => {
|
||||||
|
emit('update:visible', false)
|
||||||
|
emit('command', command)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.context-menu {
|
||||||
|
position: fixed;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: 9999;
|
||||||
|
border: 1.5px solid;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-image: linear-gradient(137.95deg, rgba(0, 255, 255, 1) 6.25%, rgba(0, 200, 255, 1) 100%)
|
||||||
|
1.5;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item {
|
||||||
|
padding: 8px 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item:hover {
|
||||||
|
background-color: rgba(var(--color-sdk-base-rgb), 0.2);
|
||||||
|
color: rgba(var(--color-sdk-base-rgb), 1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -3,16 +3,47 @@
|
|||||||
<div class="engineering_title">
|
<div class="engineering_title">
|
||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
<span class="setting_title">工程设置</span>
|
<span class="setting_title">工程设置</span>
|
||||||
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
|
||||||
<template #icon>
|
<el-upload
|
||||||
<svg-icon name="road_network" />
|
:action="uploadUrl()"
|
||||||
</template>
|
:headers="headers"
|
||||||
<span>路网导入</span>
|
:data="data"
|
||||||
</el-button>
|
:show-file-list="false"
|
||||||
|
:before-upload="handleBeforeUpload"
|
||||||
|
:on-success="handleSuccess"
|
||||||
|
:on-error="handleError"
|
||||||
|
class="simple-upload"
|
||||||
|
>
|
||||||
|
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
||||||
|
<template #icon>
|
||||||
|
<svg-icon name="road_network" />
|
||||||
|
</template>
|
||||||
|
<span>路网导入</span>
|
||||||
|
</el-button>
|
||||||
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="fileList">
|
<div class="fileList">
|
||||||
<div class="fileList_nav">
|
<div class="fileList_nav" v-if="routeList.length">
|
||||||
<div class="fileList_nav_item">
|
<div class="fileList_nav_item" v-for="(item, index) in routeList" :key="index">
|
||||||
|
<div class="item_left">
|
||||||
|
<div class="img">
|
||||||
|
<img
|
||||||
|
src="../../../../../../assets/images/pdf.png"
|
||||||
|
style="width: 40px; height: 50px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="file_name">
|
||||||
|
<span>{{ item.fileName }}</span>
|
||||||
|
<span>{{ item.createdAt }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item_right">
|
||||||
|
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
||||||
|
<span>删除</span>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="fileList_nav_item">
|
||||||
<div class="item_left">
|
<div class="item_left">
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<img
|
<img
|
||||||
@ -49,26 +80,7 @@
|
|||||||
<span>删除</span>
|
<span>删除</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="fileList_nav_item">
|
|
||||||
<div class="item_left">
|
|
||||||
<div class="img">
|
|
||||||
<img
|
|
||||||
src="../../../../../../assets/images/pdf.png"
|
|
||||||
style="width: 40px; height: 50px"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="file_name">
|
|
||||||
<span>xxxxxx.pdf</span>
|
|
||||||
<span>2025-4-10 10:22</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item_right">
|
|
||||||
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
|
||||||
<span>删除</span>
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
@ -109,7 +121,100 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { GisApi } from '@/api/gisApi'
|
||||||
|
import { RouteApi } from '@/api/route'
|
||||||
|
// 上传状态
|
||||||
|
const isUploading = ref(false)
|
||||||
|
|
||||||
|
const headers = ref({
|
||||||
|
// Authorization: 'Bearer ' + localStorage.getItem('access_token')
|
||||||
|
Authorization: localStorage.getItem('Authorization')
|
||||||
|
})
|
||||||
|
// 组件属性
|
||||||
|
const props = defineProps({
|
||||||
|
// 额外上传数据
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
// 接受的文件类型
|
||||||
|
accept: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// 最大文件大小(MB)
|
||||||
|
maxSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const uploadUrl = () => {
|
||||||
|
//process.env.BASE_API +
|
||||||
|
console.log(process.env.BASE_API, 'yyyyy')
|
||||||
|
let url = 'http://192.168.110.25:8848' + '/yjearth4.0/api/v1/fileInfo/upload'
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
const handleBeforeUpload = (file: File) => {
|
||||||
|
// 检查文件大小
|
||||||
|
if (props.maxSize && file.size > props.maxSize * 1024 * 1024) {
|
||||||
|
ElMessage.error(`文件大小不能超过 ${props.maxSize}MB`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
console.log(file)
|
||||||
|
// 标记为上传中
|
||||||
|
const formData = new FormData()
|
||||||
|
// fileArray.forEach((file, index) => {
|
||||||
|
formData.append(`files`, file) // 生成files[0]格式参数
|
||||||
|
console.log(formData, 'formData')
|
||||||
|
// })
|
||||||
|
GisApi.linkFile(formData).then((res) => {
|
||||||
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
ElMessage({
|
||||||
|
message: '上传成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
getList()
|
||||||
|
let id = routeList[routeList.length - 1].id
|
||||||
|
addRoute(id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return false // 阻止默认上传
|
||||||
|
|
||||||
|
// isUploading.value = true
|
||||||
|
// return true
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取路网列表
|
||||||
|
var routeList: any = reactive([])
|
||||||
|
const getList = async () => {
|
||||||
|
let list = await RouteApi.getRouteList()
|
||||||
|
console.log(list, 'list')
|
||||||
|
routeList.splice(0, routeList.length, ...list.data)
|
||||||
|
}
|
||||||
|
getList()
|
||||||
|
|
||||||
|
const addRoute = async (fileId) => {
|
||||||
|
let res = await RouteApi.loadRoute({ fileId })
|
||||||
|
console.log(res, 'res')
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上传成功处理
|
||||||
|
const handleSuccess = (response: any) => {
|
||||||
|
isUploading.value = false
|
||||||
|
ElMessage.success('文件上传成功')
|
||||||
|
// 可以在这里添加成功后的其他逻辑
|
||||||
|
}
|
||||||
|
// 上传失败处理
|
||||||
|
const handleError = (error: Error) => {
|
||||||
|
isUploading.value = false
|
||||||
|
ElMessage.error('文件上传失败')
|
||||||
|
console.error('上传错误:', error)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.engineering {
|
.engineering {
|
||||||
@ -119,7 +224,8 @@
|
|||||||
.engineering_title {
|
.engineering_title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// padding: 20px 0;
|
display: flex;
|
||||||
|
line-height: 32px; // padding: 20px 0;
|
||||||
.fankuai {
|
.fankuai {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
@ -129,6 +235,7 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
margin-top: 11px;
|
||||||
}
|
}
|
||||||
.setting_title {
|
.setting_title {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
|
|||||||
@ -0,0 +1,438 @@
|
|||||||
|
<template>
|
||||||
|
<div class="model-management-container">
|
||||||
|
<div class="equipment_title" style="margin-bottom: 10px">
|
||||||
|
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
||||||
|
<template #icon>
|
||||||
|
<svg-icon name="leading_in" />
|
||||||
|
</template>
|
||||||
|
<span>选择模型库</span>
|
||||||
|
</el-button>
|
||||||
|
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
||||||
|
<template #icon>
|
||||||
|
<svg-icon name="leading_in" />
|
||||||
|
</template>
|
||||||
|
<span>创建模型库</span>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<!-- 左侧分类树 -->
|
||||||
|
<el-col :span="6" class="tree">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<div class="tree-container" @click="handleClick" @contextmenu="divContextMenu">
|
||||||
|
<el-table
|
||||||
|
:data="typeTreeData"
|
||||||
|
row-key="id"
|
||||||
|
ref="tableRef"
|
||||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
|
@row-contextmenu="handleContextMenu"
|
||||||
|
@row-click="handleTypeClick"
|
||||||
|
>
|
||||||
|
<el-table-column prop="name" label="模型类型" width="180">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span
|
||||||
|
:class="{
|
||||||
|
'primary-type': !row.parentId,
|
||||||
|
'selected-text': row.id === currentTypeId
|
||||||
|
}"
|
||||||
|
@click.stop="toggleExpand(row)"
|
||||||
|
class="allowDrag"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
:name="row._expanded ? 'arrow' : 'more'"
|
||||||
|
:size="12"
|
||||||
|
color="rgba(0, 255, 255, 1)"
|
||||||
|
style="margin-right: 5px"
|
||||||
|
v-if="row.parentId == null"
|
||||||
|
@click.stop="toggleExpand(row)"
|
||||||
|
></svg-icon>
|
||||||
|
{{ row.name }}</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- 右侧模型列表 -->
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-table :data="modelList" border style="width: 100%">
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="name" label="模型名称" />
|
||||||
|
<el-table-column prop="thumbnail" label="缩略图" width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-image
|
||||||
|
style="width: 80px; height: 60px"
|
||||||
|
:src="row.thumbnail"
|
||||||
|
:preview-src-list="[row.thumbnail]"
|
||||||
|
fit="cover"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button size="small" @click="handleEdit(row)">编辑</el-button> -->
|
||||||
|
<el-button size="small" @click="handleEdit(row)">预览</el-button>
|
||||||
|
<el-button size="small" @click="handleEdit(row)">更换缩略图</el-button>
|
||||||
|
<el-button size="small" @click="handleDelete(row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #empty>
|
||||||
|
<div class="custom-empty">
|
||||||
|
<img src="@/assets/images/noData.png" alt="暂无数据" />
|
||||||
|
<div class="noData">暂无数据</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 右键菜单 -->
|
||||||
|
<contextMenuCom
|
||||||
|
v-model:visible="contextMenu.visible"
|
||||||
|
:x="contextMenu.x"
|
||||||
|
:y="contextMenu.y"
|
||||||
|
:menu-items="contextMenu.items"
|
||||||
|
@command="handleMenuCommand"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, reactive, nextTick, onMounted } from 'vue'
|
||||||
|
import type { TableColumnCtx } from 'element-plus'
|
||||||
|
import contextMenuCom from './contentMenu.vue'
|
||||||
|
import Sortable from 'sortablejs'
|
||||||
|
|
||||||
|
interface TypeNode {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
parentId: string | null
|
||||||
|
children?: TypeNode[]
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ModelItem {
|
||||||
|
id: string
|
||||||
|
typeId: string
|
||||||
|
name: string
|
||||||
|
thumbnail: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const typeTreeData = ref<TypeNode[]>([
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name: '一级分类1',
|
||||||
|
parentId: null,
|
||||||
|
children: [
|
||||||
|
{ id: '1-1', name: '二级分类1-1', parentId: '1' },
|
||||||
|
{ id: '1-2', name: '二级分类1-2', parentId: '1' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name: '一级分类2',
|
||||||
|
parentId: null,
|
||||||
|
children: [
|
||||||
|
{ id: '2-1', name: '二级分类2-1', parentId: '2' },
|
||||||
|
{ id: '2-2', name: '二级分类2-2', parentId: '2' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const modelList = ref<ModelItem[]>([])
|
||||||
|
const currentTypeId = ref<string>('')
|
||||||
|
|
||||||
|
const contextMenu = reactive({
|
||||||
|
visible: false,
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
currentRow: null as TypeNode | null,
|
||||||
|
items: [] as { command: string; icon: string; label: string; disabled?: boolean }[]
|
||||||
|
})
|
||||||
|
|
||||||
|
const tableRef = ref()
|
||||||
|
var sortableInstance: any = reactive(null)
|
||||||
|
//拖拽
|
||||||
|
const setSort = () => {
|
||||||
|
nextTick(() => {
|
||||||
|
const tbody = tableRef.value?.$el.querySelector('.el-table__body-wrapper tbody')
|
||||||
|
if (!tbody) {
|
||||||
|
console.warn('tbody 不存在,拖拽初始化失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 销毁旧实例
|
||||||
|
if (sortableInstance) {
|
||||||
|
sortableInstance.destroy()
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('tbody', tbody)
|
||||||
|
// 创建新的拖拽实例
|
||||||
|
sortableInstance = Sortable.create(tbody, {
|
||||||
|
handle: '.allowDrag', // 指定拖拽区域
|
||||||
|
animation: 150,
|
||||||
|
onEnd: (evt) => {
|
||||||
|
console.log(evt, 'evt')
|
||||||
|
const movedItem = typeTreeData.value.splice(evt.oldIndex, 1)[0]
|
||||||
|
typeTreeData.value.splice(evt.newIndex, 0, movedItem)
|
||||||
|
console.log(typeTreeData, 'typeTreeData')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleContextMenu = (row: TypeNode, column: TableColumnCtx<TypeNode>, event: MouseEvent) => {
|
||||||
|
event.stopPropagation()
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
|
contextMenu.currentRow = row
|
||||||
|
contextMenu.x = event.clientX
|
||||||
|
contextMenu.y = event.clientY
|
||||||
|
|
||||||
|
if (row.parentId) {
|
||||||
|
// 二级分类菜单
|
||||||
|
contextMenu.items = [
|
||||||
|
{ command: 'import', label: '导入模型', icon: 'importModel' },
|
||||||
|
{ command: 'rename', label: '重命名', icon: 'rename' },
|
||||||
|
{ command: 'delete', label: '删除', icon: 'delModel' }
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
// 一级分类菜单
|
||||||
|
contextMenu.items = [
|
||||||
|
{ command: 'add-child', label: '添加子类型', icon: 'add' },
|
||||||
|
{ command: 'import', label: '导入模型', icon: 'importModel' },
|
||||||
|
{ command: 'rename', label: '重命名', icon: 'rename' },
|
||||||
|
{ command: 'delete', label: '删除', icon: 'delModel' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
contextMenu.visible = true
|
||||||
|
}
|
||||||
|
const toggleExpand = (row: any) => {
|
||||||
|
if (row.parentId == null) {
|
||||||
|
row._expanded = !row._expanded
|
||||||
|
// 这里需要调用el-table的toggleRowExpansion方法
|
||||||
|
// 需要通过ref获取table实例
|
||||||
|
tableRef.value?.toggleRowExpansion(row, row._expanded)
|
||||||
|
}
|
||||||
|
currentTypeId.value = row.id
|
||||||
|
loadModelsByType(row.id)
|
||||||
|
contextMenu.visible && (contextMenu.visible = false)
|
||||||
|
}
|
||||||
|
const divContextMenu = (event: MouseEvent) => {
|
||||||
|
event.preventDefault()
|
||||||
|
contextMenu.x = event.clientX
|
||||||
|
contextMenu.y = event.clientY
|
||||||
|
console.log('空白右击')
|
||||||
|
|
||||||
|
contextMenu.items = [{ command: 'addType', label: '添加类型', icon: 'add' }]
|
||||||
|
|
||||||
|
contextMenu.visible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleMenuCommand = (command: string) => {
|
||||||
|
const row = contextMenu.currentRow
|
||||||
|
if (!row) return
|
||||||
|
|
||||||
|
switch (command) {
|
||||||
|
case 'add-child':
|
||||||
|
handleAddChildType(row)
|
||||||
|
break
|
||||||
|
case 'import':
|
||||||
|
handleImportModel(row)
|
||||||
|
break
|
||||||
|
case 'rename':
|
||||||
|
handleRenameType(row)
|
||||||
|
break
|
||||||
|
case 'delete':
|
||||||
|
handleDeleteType(row)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleTypeClick = (row: TypeNode) => {
|
||||||
|
// currentTypeId.value = row.id
|
||||||
|
// // 模拟根据类型ID加载模型数据
|
||||||
|
// loadModelsByType(row.id)
|
||||||
|
// contextMenu.visible && (contextMenu.visible = false)
|
||||||
|
}
|
||||||
|
const handleClick = () => {
|
||||||
|
contextMenu.visible && (contextMenu.visible = false)
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadModelsByType = (typeId: string) => {
|
||||||
|
// 模拟数据加载
|
||||||
|
modelList.value = [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
typeId: typeId,
|
||||||
|
name: `模型_${typeId}_1`,
|
||||||
|
thumbnail: 'https://picsum.photos/200/150?random=1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
typeId: typeId,
|
||||||
|
name: `模型_${typeId}_2`,
|
||||||
|
thumbnail: 'https://picsum.photos/200/150?random=2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAddChildType = (row: TypeNode) => {
|
||||||
|
console.log('添加子类型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleImportModel = (row: TypeNode) => {
|
||||||
|
console.log('导入模型到', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRenameType = (row: TypeNode) => {
|
||||||
|
console.log('重命名类型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDeleteType = (row: TypeNode) => {
|
||||||
|
console.log('删除类型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleEdit = (row: ModelItem) => {
|
||||||
|
console.log('编辑模型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDelete = (row: ModelItem) => {
|
||||||
|
console.log('删除模型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
setSort() //删除,新增都必须再调用一次
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.model-management-container {
|
||||||
|
padding: 20px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.tree {
|
||||||
|
border-right: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-container {
|
||||||
|
height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.el-row {
|
||||||
|
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
}
|
||||||
|
::v-deep .el-button--small {
|
||||||
|
padding: 5px 7px !important;
|
||||||
|
}
|
||||||
|
.el-button {
|
||||||
|
background-color: rgba(var(--color-sdk-base-rgb), 0.2) !important;
|
||||||
|
--el-button-text-color: rgba(255, 255, 255, 1) !important;
|
||||||
|
--el-button-border-color: rgba(var(--color-sdk-base-rgb), 0.2);
|
||||||
|
--el-button-hover-text-color: rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||||
|
--el-button-hover-border-color: rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary-type {
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
::v-deep .el-scrollbar {
|
||||||
|
height: 360px !important;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.el-card {
|
||||||
|
--el-card-border-color: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.el-table {
|
||||||
|
--el-table-border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
--el-table-header-bg-color: transparent !important;
|
||||||
|
--el-table-tr-bg-color: transparent !important;
|
||||||
|
--el-table-bg-color: transparent !important;
|
||||||
|
--el-table-current-row-bg-color: transparent !important;
|
||||||
|
--el-table-row-hover-bg-color: transparent !important;
|
||||||
|
--el-table-border-color: transparent !important;
|
||||||
|
--el-table-text-color: rgba(230, 247, 255, 1) !important;
|
||||||
|
--el-table-header-text-color: rgba(230, 247, 255, 1) !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 500 !important;
|
||||||
|
}
|
||||||
|
/* 一级菜单 */
|
||||||
|
.primary-type {
|
||||||
|
color: rgba(255, 255, 255, 1) !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 500 !important;
|
||||||
|
}
|
||||||
|
.tree .el-table {
|
||||||
|
--el-table-border: unset !important;
|
||||||
|
--el-table-text-color: rgba(255, 255, 255, 1) !important;
|
||||||
|
--el-table-header-text-color: rgba(255, 255, 255, 1) !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
font-weight: 400 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .tree .el-table__header-wrapper {
|
||||||
|
border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
|
||||||
|
}
|
||||||
|
.el-table__body {
|
||||||
|
height: 360px !important;
|
||||||
|
}
|
||||||
|
.el-table td.el-table__cell,
|
||||||
|
.el-table th.el-table__cell.is-leaf {
|
||||||
|
border-bottom: transparent !important;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
::v-deep .el-card.is-always-shadow,
|
||||||
|
::v-deep .el-card.is-hover-shadow:focus,
|
||||||
|
::v-deep .el-card.is-hover-shadow:hover {
|
||||||
|
box-shadow: transparent !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-card.is-always-shadow,
|
||||||
|
::v-deep .el-card.is-hover-shadow:focus,
|
||||||
|
::v-deep .el-card.is-hover-shadow:hover {
|
||||||
|
box-shadow: transparent !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-card__body {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-col,
|
||||||
|
.el-col-6,
|
||||||
|
.is-guttered {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-icon svg {
|
||||||
|
color: rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||||
|
}
|
||||||
|
.selected-text {
|
||||||
|
color: rgba(var(--color-sdk-base-rgb), 1) !important; /* Element UI主色,可自定义 */
|
||||||
|
}
|
||||||
|
::v-deep .el-table__expand-icon {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.el-table__empty-text {
|
||||||
|
line-height: 0px !important;
|
||||||
|
}
|
||||||
|
.noData {
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.custom-empty {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center; /* 水平居中 */
|
||||||
|
align-items: center; /* 垂直居中 */
|
||||||
|
flex-direction: column;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
.custom-empty img {
|
||||||
|
display: block;
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="model_manage">
|
<div class="model-management-container">
|
||||||
<div class="equipment_title">
|
<div class="equipment_title" style="margin-bottom: 10px">
|
||||||
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
<el-button color="#004b4b" style="border: 1px solid rgba(0, 255, 255, 0.5)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<svg-icon name="leading_in" />
|
<svg-icon name="leading_in" />
|
||||||
@ -14,14 +14,475 @@
|
|||||||
<span>创建模型库</span>
|
<span>创建模型库</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<!-- 左侧分类树 -->
|
||||||
|
<el-col :span="6" class="tree">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<div class="tree-container" @click="handleClick" @contextmenu="divContextMenu">
|
||||||
|
<el-tree
|
||||||
|
style="max-width: 600px"
|
||||||
|
:allow-drop="allowDrop"
|
||||||
|
:allow-drag="allowDrag"
|
||||||
|
:data="typeTreeData"
|
||||||
|
draggable
|
||||||
|
ref="treeRef"
|
||||||
|
default-expand-all
|
||||||
|
node-key="id"
|
||||||
|
@node-click="handleTypeClick"
|
||||||
|
@node-contextmenu="handleContextMenu"
|
||||||
|
@node-drag-start="handleDragStart"
|
||||||
|
@node-drag-enter="handleDragEnter"
|
||||||
|
@node-drag-leave="handleDragLeave"
|
||||||
|
@node-drag-over="handleDragOver"
|
||||||
|
@node-drag-end="handleDragEnd"
|
||||||
|
@node-drop="handleDrop"
|
||||||
|
>
|
||||||
|
<template #default="{ node, data }">
|
||||||
|
<!-- <span> {{ node.label }}</span> -->
|
||||||
|
|
||||||
|
<span
|
||||||
|
:class="{
|
||||||
|
'primary-type': !(node.childNodes.length != 0),
|
||||||
|
'selected-text': node.id === currentTypeId
|
||||||
|
}"
|
||||||
|
@click.stop="toggleExpand(node)"
|
||||||
|
class="allowDrag"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
:name="node.expanded ? 'arrow' : 'more'"
|
||||||
|
:size="12"
|
||||||
|
color="rgba(0, 255, 255, 1)"
|
||||||
|
style="margin-right: 5px; margin-left: 5px"
|
||||||
|
v-if="node.childNodes.length != 0"
|
||||||
|
@click.stop="toggleExpand(node)"
|
||||||
|
></svg-icon>
|
||||||
|
{{ node.label }}</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-tree>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- 右侧模型列表 -->
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-table :data="modelList" border style="width: 100%">
|
||||||
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
<el-table-column prop="name" label="模型名称" />
|
||||||
|
<el-table-column prop="thumbnail" label="缩略图" width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-image
|
||||||
|
style="width: 80px; height: 60px"
|
||||||
|
@click="showImage(row)"
|
||||||
|
:src="row.thumbnail"
|
||||||
|
fit="cover"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<!-- <el-button size="small" @click="handleEdit(row)">编辑</el-button> -->
|
||||||
|
<el-button size="small" @click="handleEdit(row)">预览</el-button>
|
||||||
|
<el-button size="small" @click="handleEdit(row)">更换缩略图</el-button>
|
||||||
|
<el-button size="small" @click="handleDelete(row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #empty>
|
||||||
|
<div class="custom-empty">
|
||||||
|
<img src="@/assets/images/noData.png" alt="暂无数据" />
|
||||||
|
<div class="noData">暂无数据</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 右键菜单 -->
|
||||||
|
<contextMenuCom
|
||||||
|
v-model:visible="contextMenu.visible"
|
||||||
|
:x="contextMenu.x"
|
||||||
|
:y="contextMenu.y"
|
||||||
|
:menu-items="contextMenu.items"
|
||||||
|
@command="handleMenuCommand"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts"></script>
|
<script lang="ts" setup>
|
||||||
|
import { ref, reactive, nextTick, onMounted } from 'vue'
|
||||||
|
import type { TableColumnCtx } from 'element-plus'
|
||||||
|
import contextMenuCom from './contentMenu.vue'
|
||||||
|
import Sortable from 'sortablejs'
|
||||||
|
import { inject } from 'vue'
|
||||||
|
import type { DragEvents } from 'element-plus/es/components/tree/src/model/useDragNode'
|
||||||
|
import type { AllowDropType, NodeDropType, RenderContentContext } from 'element-plus'
|
||||||
|
|
||||||
<style scoped lang="scss">
|
const eventBus: any = inject('bus')
|
||||||
.model_manage {
|
|
||||||
width: 100%;
|
interface TypeNode {
|
||||||
|
id: string
|
||||||
|
label: string
|
||||||
|
parentId: string | null
|
||||||
|
children?: TypeNode[]
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ModelItem {
|
||||||
|
id: string
|
||||||
|
typeId: string
|
||||||
|
name: string
|
||||||
|
thumbnail: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const typeTreeData = ref<TypeNode[]>([
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
label: '一级分类1',
|
||||||
|
parentId: null,
|
||||||
|
children: [
|
||||||
|
{ id: '1-1', label: '二级分类1-1', parentId: '1' },
|
||||||
|
{ id: '1-2', label: '二级分类1-2', parentId: '1' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
label: '一级分类2',
|
||||||
|
parentId: null,
|
||||||
|
children: [
|
||||||
|
{ id: '2-1', label: '二级分类2-1', parentId: '2' },
|
||||||
|
{ id: '2-2', label: '二级分类2-2', parentId: '2' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const modelList = ref<ModelItem[]>([])
|
||||||
|
const currentTypeId = ref<string>('')
|
||||||
|
|
||||||
|
const contextMenu = reactive({
|
||||||
|
visible: false,
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
currentRow: null as TypeNode | null,
|
||||||
|
items: [] as { command: string; icon: string; label: string; disabled?: boolean }[]
|
||||||
|
})
|
||||||
|
|
||||||
|
const treeRef = ref()
|
||||||
|
var sortableInstance: any = reactive(null)
|
||||||
|
|
||||||
|
//拖拽
|
||||||
|
type Node = RenderContentContext['node']
|
||||||
|
|
||||||
|
const handleDragStart = (node: Node, ev: DragEvents) => {
|
||||||
|
console.log('drag start', node)
|
||||||
|
}
|
||||||
|
const handleDragEnter = (draggingNode: Node, dropNode: Node, ev: DragEvents) => {
|
||||||
|
console.log('tree drag enter:', dropNode.label)
|
||||||
|
}
|
||||||
|
const handleDragLeave = (draggingNode: Node, dropNode: Node, ev: DragEvents) => {
|
||||||
|
console.log('tree drag leave:', dropNode.label)
|
||||||
|
}
|
||||||
|
const handleDragOver = (draggingNode: Node, dropNode: Node, ev: DragEvents) => {
|
||||||
|
console.log('tree drag over:', dropNode.label)
|
||||||
|
}
|
||||||
|
const handleDragEnd = (
|
||||||
|
draggingNode: Node,
|
||||||
|
dropNode: Node,
|
||||||
|
dropType: NodeDropType,
|
||||||
|
ev: DragEvents
|
||||||
|
) => {
|
||||||
|
console.log('tree drag end:', dropNode && dropNode.label, dropType)
|
||||||
|
}
|
||||||
|
const handleDrop = (draggingNode: Node, dropNode: Node, dropType: NodeDropType, ev: DragEvents) => {
|
||||||
|
console.log('tree drop:', dropNode.label, dropType)
|
||||||
|
}
|
||||||
|
const allowDrop = (draggingNode: Node, dropNode: Node, type: AllowDropType) => {
|
||||||
|
if (dropNode.data.label === 'Level two 3-1') {
|
||||||
|
return type !== 'inner'
|
||||||
|
} else {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const allowDrag = (draggingNode: Node) => {
|
||||||
|
return !draggingNode.data.label.includes('Level three 3-1-1')
|
||||||
|
}
|
||||||
|
|
||||||
|
//拖拽结束
|
||||||
|
|
||||||
|
//---------------------查看缩略图--------------------
|
||||||
|
|
||||||
|
const showImage = (row: any) => {
|
||||||
|
console.log(row, 'image')
|
||||||
|
eventBus.emit('imagePopDialog', row)
|
||||||
|
eventBus.emit('settingPop', false)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleContextMenu = (event: MouseEvent, row: TypeNode) => {
|
||||||
|
event.stopPropagation()
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
|
contextMenu.currentRow = row
|
||||||
|
contextMenu.x = event.clientX
|
||||||
|
contextMenu.y = event.clientY
|
||||||
|
|
||||||
|
if (row.parentId) {
|
||||||
|
// 二级分类菜单
|
||||||
|
contextMenu.items = [
|
||||||
|
{ command: 'import', label: '导入模型', icon: 'importModel' },
|
||||||
|
{ command: 'rename', label: '重命名', icon: 'rename' },
|
||||||
|
{ command: 'delete', label: '删除', icon: 'delModel' }
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
// 一级分类菜单
|
||||||
|
contextMenu.items = [
|
||||||
|
{ command: 'add-child', label: '添加子类型', icon: 'add' },
|
||||||
|
{ command: 'import', label: '导入模型', icon: 'importModel' },
|
||||||
|
{ command: 'rename', label: '重命名', icon: 'rename' },
|
||||||
|
{ command: 'delete', label: '删除', icon: 'delModel' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
contextMenu.visible = true
|
||||||
|
}
|
||||||
|
const toggleExpand = (row: any) => {
|
||||||
|
if (row.childNodes.length != 0) {
|
||||||
|
// row._expanded = !row._expanded
|
||||||
|
// 这里需要调用el-table的toggleRowExpansion方法
|
||||||
|
// 需要通过ref获取table实例
|
||||||
|
// tableRef.value?.toggleRowExpansion(row, row._expanded)
|
||||||
|
|
||||||
|
if (row.expanded) {
|
||||||
|
row.collapse()
|
||||||
|
} else {
|
||||||
|
row.expand()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
currentTypeId.value = row.id
|
||||||
|
loadModelsByType(row.id)
|
||||||
|
contextMenu.visible && (contextMenu.visible = false)
|
||||||
|
}
|
||||||
|
const divContextMenu = (event: MouseEvent) => {
|
||||||
|
event.preventDefault()
|
||||||
|
contextMenu.x = event.clientX
|
||||||
|
contextMenu.y = event.clientY
|
||||||
|
console.log('空白右击')
|
||||||
|
|
||||||
|
contextMenu.items = [{ command: 'addType', label: '添加类型', icon: 'add' }]
|
||||||
|
|
||||||
|
contextMenu.visible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleMenuCommand = (command: string) => {
|
||||||
|
const row = contextMenu.currentRow
|
||||||
|
if (!row) return
|
||||||
|
|
||||||
|
switch (command) {
|
||||||
|
case 'add-child':
|
||||||
|
handleAddChildType(row)
|
||||||
|
break
|
||||||
|
case 'import':
|
||||||
|
handleImportModel(row)
|
||||||
|
break
|
||||||
|
case 'rename':
|
||||||
|
handleRenameType(row)
|
||||||
|
break
|
||||||
|
case 'delete':
|
||||||
|
handleDeleteType(row)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleTypeClick = (row: TypeNode) => {
|
||||||
|
console.log(row)
|
||||||
|
// currentTypeId.value = row.id
|
||||||
|
// // 模拟根据类型ID加载模型数据
|
||||||
|
// loadModelsByType(row.id)
|
||||||
|
// contextMenu.visible && (contextMenu.visible = false)
|
||||||
|
}
|
||||||
|
const handleClick = () => {
|
||||||
|
contextMenu.visible && (contextMenu.visible = false)
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadModelsByType = (typeId: string) => {
|
||||||
|
// 模拟数据加载
|
||||||
|
modelList.value = [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
typeId: typeId,
|
||||||
|
name: `模型_${typeId}_1`,
|
||||||
|
thumbnail: 'https://picsum.photos/200/150?random=1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
typeId: typeId,
|
||||||
|
name: `模型_${typeId}_2`,
|
||||||
|
thumbnail: 'https://picsum.photos/200/150?random=2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleAddChildType = (row: TypeNode) => {
|
||||||
|
console.log('添加子类型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleImportModel = (row: TypeNode) => {
|
||||||
|
console.log('导入模型到', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRenameType = (row: TypeNode) => {
|
||||||
|
console.log('重命名类型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDeleteType = (row: TypeNode) => {
|
||||||
|
console.log('删除类型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleEdit = (row: ModelItem) => {
|
||||||
|
console.log('编辑模型', row)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDelete = (row: ModelItem) => {
|
||||||
|
console.log('删除模型', row)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.model-management-container {
|
||||||
|
padding: 20px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.tree {
|
||||||
|
border-right: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-container {
|
||||||
|
height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.el-row {
|
||||||
|
border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
}
|
||||||
|
::v-deep .el-button--small {
|
||||||
|
padding: 5px 7px !important;
|
||||||
|
}
|
||||||
|
.el-button {
|
||||||
|
background-color: rgba(var(--color-sdk-base-rgb), 0.2) !important;
|
||||||
|
--el-button-text-color: rgba(255, 255, 255, 1) !important;
|
||||||
|
--el-button-border-color: rgba(var(--color-sdk-base-rgb), 0.2);
|
||||||
|
--el-button-hover-text-color: rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||||
|
--el-button-hover-border-color: rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary-type {
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
::v-deep .el-scrollbar {
|
||||||
|
height: 360px !important;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.el-card {
|
||||||
|
--el-card-border-color: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
.el-table {
|
||||||
|
--el-table-border: 1px solid rgba(var(--color-sdk-base-rgb), 0.5);
|
||||||
|
--el-table-header-bg-color: transparent !important;
|
||||||
|
--el-table-tr-bg-color: transparent !important;
|
||||||
|
--el-table-bg-color: transparent !important;
|
||||||
|
--el-table-current-row-bg-color: transparent !important;
|
||||||
|
--el-table-row-hover-bg-color: transparent !important;
|
||||||
|
--el-table-border-color: transparent !important;
|
||||||
|
--el-table-text-color: rgba(230, 247, 255, 1) !important;
|
||||||
|
--el-table-header-text-color: rgba(230, 247, 255, 1) !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 500 !important;
|
||||||
|
}
|
||||||
|
/* 一级菜单 */
|
||||||
|
.primary-type {
|
||||||
|
color: rgba(255, 255, 255, 1) !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
font-weight: 400 !important;
|
||||||
|
}
|
||||||
|
.tree .el-table {
|
||||||
|
--el-table-border: unset !important;
|
||||||
|
--el-table-text-color: rgba(255, 255, 255, 1) !important;
|
||||||
|
--el-table-header-text-color: rgba(255, 255, 255, 1) !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
font-weight: 400 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .tree .el-table__header-wrapper {
|
||||||
|
border-bottom: 1px solid rgba(var(--color-sdk-base-rgb), 0.5) !important;
|
||||||
|
}
|
||||||
|
.el-table__body {
|
||||||
|
height: 360px !important;
|
||||||
|
}
|
||||||
|
.el-table td.el-table__cell,
|
||||||
|
.el-table th.el-table__cell.is-leaf {
|
||||||
|
border-bottom: transparent !important;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
::v-deep .el-card.is-always-shadow,
|
||||||
|
::v-deep .el-card.is-hover-shadow:focus,
|
||||||
|
::v-deep .el-card.is-hover-shadow:hover {
|
||||||
|
box-shadow: transparent !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-card.is-always-shadow,
|
||||||
|
::v-deep .el-card.is-hover-shadow:focus,
|
||||||
|
::v-deep .el-card.is-hover-shadow:hover {
|
||||||
|
box-shadow: transparent !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-card__body {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-col,
|
||||||
|
.el-col-6,
|
||||||
|
.is-guttered {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-icon svg {
|
||||||
|
color: rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||||
|
}
|
||||||
|
.selected-text {
|
||||||
|
color: rgba(var(--color-sdk-base-rgb), 1) !important; /* Element UI主色,可自定义 */
|
||||||
|
}
|
||||||
|
::v-deep .el-table__expand-icon {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-tree-node__expand-icon {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.el-table__empty-text {
|
||||||
|
line-height: 0px !important;
|
||||||
|
}
|
||||||
|
.noData {
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.custom-empty {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center; /* 水平居中 */
|
||||||
|
align-items: center; /* 垂直居中 */
|
||||||
|
flex-direction: column;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
.custom-empty img {
|
||||||
|
display: block;
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
.el-tree {
|
||||||
|
background: transparent !important;
|
||||||
|
--el-tree-node-hover-bg-color: rgba(var(--color-sdk-base-rgb), 0.2) !important;
|
||||||
|
color: rgba(255, 255, 255, 1) !important;
|
||||||
|
/* font-size: 12px !important; */
|
||||||
|
}
|
||||||
|
::v-deep .el-text {
|
||||||
|
color: rgba(255, 255, 255, 1) !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -171,7 +171,7 @@
|
|||||||
}}</el-button>
|
}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="detailSkin1">
|
<div class="detailSkin1">
|
||||||
<span>默认数据:</span>
|
<span>在线数据:</span>
|
||||||
<el-button color="#005c5c" @click="setData">{{
|
<el-button color="#005c5c" @click="setData">{{
|
||||||
t('systemSetting.defaultData')
|
t('systemSetting.defaultData')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
@ -224,10 +224,10 @@
|
|||||||
</el-switch>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
<div class="detailSkin2">
|
<div class="detailSkin2">
|
||||||
<span>{{ t('systemSetting.showCompass') }}:</span>
|
<span>{{ t('systemSetting.showToolBar') }}:</span>
|
||||||
<el-switch
|
<el-switch
|
||||||
@change="sysChange"
|
@change="sysChange"
|
||||||
v-model="systemSetting.showCompass"
|
v-model="systemSetting.showToolBar"
|
||||||
style="--el-switch-on-color: #00ffff; --el-switch-off-color: #003333"
|
style="--el-switch-on-color: #00ffff; --el-switch-off-color: #003333"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
@ -241,13 +241,12 @@
|
|||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailSkin2">
|
<div class="detailSkin2">
|
||||||
<span>{{ t('systemSetting.showToolBar') }}:</span>
|
<span>{{ t('systemSetting.showMapX') }}:</span>
|
||||||
|
|
||||||
<el-switch
|
<el-switch
|
||||||
@change="sysChange"
|
@change="sysChange"
|
||||||
v-model="systemSetting.showToolBar"
|
v-model="systemSetting.showMapX"
|
||||||
style="--el-switch-on-color: #00ffff; --el-switch-off-color: #003333"
|
style="--el-switch-on-color: #00ffff; --el-switch-off-color: #003333"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
@ -263,16 +262,18 @@
|
|||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailSkin2">
|
<div class="detailSkin2">
|
||||||
<span>{{ t('systemSetting.showMapX') }}:</span>
|
<span>{{ t('systemSetting.administrativeArea') }}:</span>
|
||||||
|
|
||||||
<el-switch
|
<el-switch
|
||||||
@change="sysChange"
|
@change="sysChange"
|
||||||
v-model="systemSetting.showMapX"
|
v-model="systemSetting.administrativeArea"
|
||||||
style="--el-switch-on-color: #00ffff; --el-switch-off-color: #003333"
|
style="--el-switch-on-color: #00ffff; --el-switch-off-color: #003333"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailSkin2">
|
<div class="detailSkin2">
|
||||||
<span>{{ t('systemSetting.showLatitudeLongitudeNetwork') }}:</span>
|
<span>{{ t('systemSetting.showLatitudeLongitudeNetwork') }}:</span>
|
||||||
|
|
||||||
@ -293,6 +294,16 @@
|
|||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="detailSkin2">
|
||||||
|
<span>{{ t('systemSetting.sheetIndexStatusSwitch') }}:</span>
|
||||||
|
|
||||||
|
<el-switch
|
||||||
|
@change="sysChange"
|
||||||
|
v-model="systemSetting.sheetIndexStatusSwitch"
|
||||||
|
style="--el-switch-on-color: #00ffff; --el-switch-off-color: #003333"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="detailSkin2">
|
<div class="detailSkin2">
|
||||||
<span>{{ t('systemSetting.occlusion') }}:</span>
|
<span>{{ t('systemSetting.occlusion') }}:</span>
|
||||||
@ -321,6 +332,10 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { inject } from 'vue'
|
||||||
|
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
@ -328,11 +343,13 @@ const systemSetting = ref({
|
|||||||
showFangliNet: false, // 方里网
|
showFangliNet: false, // 方里网
|
||||||
showLatitudeLongitudeNetwork: false, //经纬网
|
showLatitudeLongitudeNetwork: false, //经纬网
|
||||||
showToolBar: false, //信息栏
|
showToolBar: false, //信息栏
|
||||||
showCompass: false, //罗盘
|
showCompass: true, //罗盘
|
||||||
showMapX: false, //鹰眼图
|
showMapX: false, //鹰眼图
|
||||||
occlusion: false, //点遮挡
|
occlusion: true, //点遮挡
|
||||||
showDistanceLegend: true, //比例尺
|
showDistanceLegend: true, //比例尺
|
||||||
showFps: false, //比例尺
|
showFps: false, //比例尺
|
||||||
|
administrativeArea: false, //行政区划
|
||||||
|
sheetIndexStatusSwitch: false, //标准图幅
|
||||||
skinInfo: 'yingguangse', //主题色
|
skinInfo: 'yingguangse', //主题色
|
||||||
language: '', //语言
|
language: '', //语言
|
||||||
coordinate: 'EPSG:4326' //坐标系
|
coordinate: 'EPSG:4326' //坐标系
|
||||||
@ -375,12 +392,66 @@ const name_map: any = ref([])
|
|||||||
const searchWay = ref()
|
const searchWay = ref()
|
||||||
const concurrentcode = ref()
|
const concurrentcode = ref()
|
||||||
const showBattery = ref()
|
const showBattery = ref()
|
||||||
const sysChange = () => {
|
searchWay.value = localStorage.getItem('searchWay') || 'net'
|
||||||
console.log(11111111111)
|
concurrentcode.value = localStorage.getItem('concurrentcode') || 10
|
||||||
|
const sysChange = async () => {
|
||||||
|
const obj = {
|
||||||
|
compass: systemSetting.value.showCompass, //罗盘
|
||||||
|
legend: systemSetting.value.showDistanceLegend, //比例尺
|
||||||
|
info: systemSetting.value.showToolBar, //信息栏
|
||||||
|
// system.showFps
|
||||||
|
frame: systemSetting.value.showFps //刷新率
|
||||||
|
}
|
||||||
|
YJ.Global.CesiumContainer(window.earth, obj)
|
||||||
|
//经纬网
|
||||||
|
YJ.Global.JwwStatusSwitch(window.earth, systemSetting.value.showLatitudeLongitudeNetwork)
|
||||||
|
//方里网
|
||||||
|
YJ.Global.FlwStatusSwitch(window.earth, systemSetting.value.showFangliNet)
|
||||||
|
//地形遮挡
|
||||||
|
YJ.Global.setGroundCover(window.earth, systemSetting.value.occlusion)
|
||||||
|
|
||||||
|
//比例尺
|
||||||
|
await YJ.Global.SheetIndexStatusSwitch(window.earth, systemSetting.value.sheetIndexStatusSwitch)
|
||||||
|
eventBus.emit('tufuInput', systemSetting.value.sheetIndexStatusSwitch)
|
||||||
|
|
||||||
|
//鹰眼图
|
||||||
|
if (systemSetting.value.showMapX) {
|
||||||
|
YJ.Global.MapX.open(window.earth)
|
||||||
|
} else {
|
||||||
|
YJ.Global.MapX.close(window.earth)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const searchWayChange = (val) => {
|
||||||
|
localStorage.setItem('searchWay', val)
|
||||||
|
ElMessage({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const concurrentWorkloadChange = (val) => {
|
||||||
|
YJ.Global.setMaximumRequestsPerServer(val)
|
||||||
|
localStorage.setItem('concurrentcode', val)
|
||||||
|
ElMessage({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const setView = () => {
|
||||||
|
console.log('hhhhh')
|
||||||
|
let msg = '操作成功'
|
||||||
|
let view = YJ.Global.getCurrentView(window.earth)
|
||||||
|
const options = {
|
||||||
|
destination: view.position,
|
||||||
|
orientation: view.orientation
|
||||||
|
}
|
||||||
|
YJ.Global.setDefaultView(window.earth, options)
|
||||||
|
localStorage.setItem('defaultView', JSON.stringify(options))
|
||||||
|
console.log('defaultView')
|
||||||
|
ElMessage({
|
||||||
|
message: msg,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const searchWayChange = () => {}
|
|
||||||
const concurrentWorkloadChange = () => {}
|
|
||||||
const setView = () => {}
|
|
||||||
const setData = () => {}
|
const setData = () => {}
|
||||||
const management = () => {}
|
const management = () => {}
|
||||||
const batteryChange = () => {}
|
const batteryChange = () => {}
|
||||||
|
|||||||
@ -50,9 +50,13 @@ const isShowPup = ref(false)
|
|||||||
const open = () => {
|
const open = () => {
|
||||||
isShowPup.value = true
|
isShowPup.value = true
|
||||||
}
|
}
|
||||||
|
const close = () => {
|
||||||
|
isShowPup.value = false
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open
|
open,
|
||||||
|
close
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
export const uesSetTool = (setPupRef?: any) => {
|
export const uesSetTool = (setPupRef?: any) => {
|
||||||
//打开弹窗
|
//打开弹窗
|
||||||
const setShow = () => {
|
const setShow = () => {
|
||||||
console.log(setPupRef)
|
console.log(setPupRef, 'setPupRef')
|
||||||
setPupRef.value.open()
|
setPupRef.value.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,8 +13,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="set_item" :title="t('iconTitle.' + item.name)" v-for="(item, i) of setList" :key="item.id"
|
<div
|
||||||
:class="{ 'last-item': i === setList.length - 1 }" @click="item.callback">
|
class="set_item"
|
||||||
|
:title="t('iconTitle.' + item.name)"
|
||||||
|
v-for="(item, i) of setList"
|
||||||
|
:key="item.id"
|
||||||
|
:class="{ 'last-item': i === setList.length - 1 }"
|
||||||
|
@click="item.callback"
|
||||||
|
>
|
||||||
<svg-icon :name="item.icon" :size="20"></svg-icon>
|
<svg-icon :name="item.icon" :size="20"></svg-icon>
|
||||||
</div>
|
</div>
|
||||||
<setPup ref="setPupRef"></setPup>
|
<setPup ref="setPupRef"></setPup>
|
||||||
@ -25,18 +31,26 @@
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import setPup from '../setPup/setPup.vue'
|
import setPup from '../setPup/setPup.vue'
|
||||||
|
import { inject } from 'vue'
|
||||||
const router = useRouter() // 路由实例
|
const router = useRouter() // 路由实例
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
import { uesSetTool } from './hooks'
|
import { uesSetTool } from './hooks'
|
||||||
import { LoginApi } from '@renderer/api/login'
|
import { LoginApi } from '@renderer/api/login'
|
||||||
const setPupRef = ref()
|
const setPupRef = ref()
|
||||||
const { setShow } = uesSetTool(setPupRef)
|
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 () => {
|
const logout = async () => {
|
||||||
let res = await LoginApi.logout()
|
let res = await LoginApi.logout()
|
||||||
console.log(res);
|
console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
router.push({ path: '/' })
|
router.push({ path: '/' })
|
||||||
localStorage.clear()
|
// localStorage.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const setList = ref([
|
const setList = ref([
|
||||||
@ -85,7 +99,7 @@ const setList = ref([
|
|||||||
name: 'logout',
|
name: 'logout',
|
||||||
className: 'header_public',
|
className: 'header_public',
|
||||||
dbcallback: null,
|
dbcallback: null,
|
||||||
callback: logout,
|
callback: logout
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
@ -121,10 +135,12 @@ const setList = ref([
|
|||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
background: linear-gradient(180deg,
|
background: linear-gradient(
|
||||||
rgba(0, 255, 255, 0),
|
180deg,
|
||||||
rgba(0, 255, 255, 1),
|
rgba(0, 255, 255, 0),
|
||||||
rgba(204, 204, 204, 0));
|
rgba(0, 255, 255, 1),
|
||||||
|
rgba(204, 204, 204, 0)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
.set_item.last-item::after {
|
.set_item.last-item::after {
|
||||||
|
|||||||
@ -0,0 +1,98 @@
|
|||||||
|
<template>
|
||||||
|
<div class="tufu_select" ref="tufu_select" v-if="show">
|
||||||
|
<span
|
||||||
|
style="
|
||||||
|
font-size: 20px;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 10px;
|
||||||
|
vertical-align: middle;
|
||||||
|
display: inline-block;
|
||||||
|
"
|
||||||
|
>图幅比例尺</span
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="value"
|
||||||
|
size="small"
|
||||||
|
:popper-append-to-body="false"
|
||||||
|
style="width: 100px; vertical-align: middle; display: inline-block"
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="handleChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { reactive, ref } from 'vue'
|
||||||
|
import { inject } from 'vue'
|
||||||
|
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
var show = ref(false)
|
||||||
|
var value = ref('1:100万')
|
||||||
|
var options = reactive([
|
||||||
|
{ value: '1:100万', label: '1:100万' },
|
||||||
|
{ value: '1:50万', label: '1:50万' },
|
||||||
|
{ value: '1:25万', label: '1:25万' },
|
||||||
|
{ value: '1:10万', label: '1:10万' },
|
||||||
|
{ value: '1:5万', label: '1:5万' },
|
||||||
|
{ value: '1:2.5万', label: '1:2.5万' },
|
||||||
|
{ value: '1:1万', label: '1:1万' },
|
||||||
|
{ value: '1:5000', label: '1:5000' }
|
||||||
|
])
|
||||||
|
const handleChange = (value) => {
|
||||||
|
YJ.Global.SheetIndexShangeScale(window.earth, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
eventBus.on('tufuInput', (data) => {
|
||||||
|
show.value = data
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.tufu_select {
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
// justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 17%;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
.el-range-editor.is-active .el-range-editor.is-active:hover,
|
||||||
|
.el-select .el-input.is-focus .el-input__inner,
|
||||||
|
.el-input.is-active .el-input__inner,
|
||||||
|
.el-input__inner:focus {
|
||||||
|
border-color: rgba(0, 255, 255, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-select__wrapper {
|
||||||
|
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||||
|
color: white;
|
||||||
|
border: 1px solid rgba(0, 255, 255, 1);
|
||||||
|
box-shadow: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-select-dropdown {
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
border-color: rgba(0, 255, 255, 1);
|
||||||
|
}
|
||||||
|
::v-deep .el-select__placeholder {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
.el-select-dropdown__item {
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-select-dropdown__item.hover,
|
||||||
|
.el-select-dropdown__item:hover {
|
||||||
|
color: rgba(0, 255, 255, 1);
|
||||||
|
background-color: rgba(0, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -37,6 +37,7 @@ import { useI18n } from 'vue-i18n'
|
|||||||
|
|
||||||
import { bus } from '@/utils/bus'
|
import { bus } from '@/utils/bus'
|
||||||
import leftSideSecond from '@/views/components/leftSide/leftSideSecond.vue'
|
import leftSideSecond from '@/views/components/leftSide/leftSideSecond.vue'
|
||||||
|
import { ElMessage, ElLoading } from 'element-plus'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
@ -191,6 +192,16 @@ const handleClick = (item: any, e) => {
|
|||||||
if (item.children.length) {
|
if (item.children.length) {
|
||||||
$('.leftSideSecond')[0].style.display = 'block'
|
$('.leftSideSecond')[0].style.display = 'block'
|
||||||
leftSideSecondRef.value.initList(item)
|
leftSideSecondRef.value.initList(item)
|
||||||
|
} else if (item.key === 'model') {
|
||||||
|
//模型库
|
||||||
|
if (window.checkAuthIsValid) {
|
||||||
|
eventBus.emit('openModel', true)
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
message: '您没有该功能的权限',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const fold = () => {
|
const fold = () => {
|
||||||
|
|||||||
@ -3,10 +3,14 @@
|
|||||||
<div class="leftSideSecondBox">
|
<div class="leftSideSecondBox">
|
||||||
<template v-if="obj">
|
<template v-if="obj">
|
||||||
<div class="menuItem" v-for="value in obj.children" @click="handleClick(value)">
|
<div class="menuItem" v-for="value in obj.children" @click="handleClick(value)">
|
||||||
<img :src="'src/assets/images/second/' + `${value}` + '.png'" style="color: rgb(255, 0, 0)" alt="" />
|
<img
|
||||||
|
:src="'src/assets/images/second/' + `${value}` + '.png'"
|
||||||
|
style="color: rgb(255, 0, 0)"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
<span :style="{ color: !clickChange[value] ? 'var(--color-text)' : 'rgb(255,0,0)' }">{{
|
<span :style="{ color: !clickChange[value] ? 'var(--color-text)' : 'rgb(255,0,0)' }">{{
|
||||||
t(`${obj.key}.${value}`)
|
t(`${obj.key}.${value}`)
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@ -31,7 +35,7 @@ import dayjs from 'dayjs'
|
|||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { findParentId, findTreeIndex, cusAddNodes } = useTreeNode()
|
const { findParentId, findTreeIndex, cusAddNodes } = useTreeNode()
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const obj:any = ref(null)
|
const obj: any = ref(null)
|
||||||
const isclick = ref(false)
|
const isclick = ref(false)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
const initList = (value) => {
|
const initList = (value) => {
|
||||||
@ -50,7 +54,7 @@ eventBus.on('graffitiObj', (data: never) => {
|
|||||||
|
|
||||||
function openLoading(
|
function openLoading(
|
||||||
text = '拼命加载中...',
|
text = '拼命加载中...',
|
||||||
option:any = {
|
option: any = {
|
||||||
fullscreen: true,
|
fullscreen: true,
|
||||||
background: 'rgba(0,0,0,0.63)',
|
background: 'rgba(0,0,0,0.63)',
|
||||||
lock: true
|
lock: true
|
||||||
@ -61,6 +65,26 @@ function openLoading(
|
|||||||
let loadingInstance = ElLoading.service(option)
|
let loadingInstance = ElLoading.service(option)
|
||||||
return loadingInstance
|
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 = {
|
const methodMap = {
|
||||||
// 轨迹运动
|
// 轨迹运动
|
||||||
@ -79,11 +103,11 @@ const methodMap = {
|
|||||||
name: name,
|
name: name,
|
||||||
model: {
|
model: {
|
||||||
show: true,
|
show: true,
|
||||||
url: "http://localhost:5173/tank.glb",
|
url: 'http://localhost:5173/tank.glb'
|
||||||
},
|
},
|
||||||
line: {
|
line: {
|
||||||
show: true,
|
show: true,
|
||||||
positions: positions,
|
positions: positions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -104,7 +128,7 @@ const methodMap = {
|
|||||||
opt: {
|
opt: {
|
||||||
id: id,
|
id: id,
|
||||||
name: name,
|
name: name,
|
||||||
positions: positions,
|
positions: positions
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -130,9 +154,9 @@ const methodMap = {
|
|||||||
circle: [
|
circle: [
|
||||||
{
|
{
|
||||||
radius: options.radius,
|
radius: options.radius,
|
||||||
color: '#ff0000',
|
color: '#ff0000'
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -254,7 +278,9 @@ const methodMap = {
|
|||||||
eventBus.emit('routePlanningDialog')
|
eventBus.emit('routePlanningDialog')
|
||||||
},
|
},
|
||||||
//路径清除
|
//路径清除
|
||||||
clearRoute() { },
|
clearRoute() {
|
||||||
|
new YJ.ClearAllRoutePlanning()
|
||||||
|
},
|
||||||
//涂鸦
|
//涂鸦
|
||||||
graffiti() {
|
graffiti() {
|
||||||
eventBus.emit('graffitiDialog')
|
eventBus.emit('graffitiDialog')
|
||||||
@ -277,6 +303,12 @@ const methodMap = {
|
|||||||
mouseLocation() {
|
mouseLocation() {
|
||||||
clickChange.mouseLocation = !clickChange.mouseLocation
|
clickChange.mouseLocation = !clickChange.mouseLocation
|
||||||
new YJ.Global.MouseCoordinate(window.earth, clickChange.mouseLocation)
|
new YJ.Global.MouseCoordinate(window.earth, clickChange.mouseLocation)
|
||||||
|
|
||||||
|
// if (clickChange.mouseLocation) {
|
||||||
|
// window.addEventListener('keydown', handleKeyDown)
|
||||||
|
// } else {
|
||||||
|
// window.removeEventListener('keydown', handleKeyDown)
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
//聚合标注
|
//聚合标注
|
||||||
annotationAggregation() {
|
annotationAggregation() {
|
||||||
@ -329,7 +361,7 @@ const methodMap = {
|
|||||||
// window.multiViewportMode = false;
|
// window.multiViewportMode = false;
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
let doms:any = document.querySelectorAll('.cesium-widget')
|
let doms: any = document.querySelectorAll('.cesium-widget')
|
||||||
let leftWidth = doms[0].offsetWidth
|
let leftWidth = doms[0].offsetWidth
|
||||||
let rightWidth = doms[1].offsetWidth
|
let rightWidth = doms[1].offsetWidth
|
||||||
combineBase64Images(res2, leftWidth, res, rightWidth)
|
combineBase64Images(res2, leftWidth, res, rightWidth)
|
||||||
@ -356,16 +388,16 @@ const methodMap = {
|
|||||||
videoRecord() {
|
videoRecord() {
|
||||||
clickChange.videoRecord = !clickChange.videoRecord
|
clickChange.videoRecord = !clickChange.videoRecord
|
||||||
|
|
||||||
let time:any = 3
|
let time: any = 3
|
||||||
$changeComponentShow('#secondMenu', false)
|
$changeComponentShow('#secondMenu', false)
|
||||||
if (clickChange.videoRecord) {
|
if (clickChange.videoRecord) {
|
||||||
// document.addEventListener("keydown", onKeyDown);
|
// document.addEventListener("keydown", onKeyDown);
|
||||||
let loading:any = openLoading(time, {
|
let loading: any = openLoading(time, {
|
||||||
background: 'rgba(0,0,0,0)',
|
background: 'rgba(0,0,0,0)',
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
customClass: 'timer'
|
customClass: 'timer'
|
||||||
})
|
})
|
||||||
let timer:any = ''
|
let timer: any = ''
|
||||||
const p = document.createElement('p')
|
const p = document.createElement('p')
|
||||||
p.style.color = '#fff'
|
p.style.color = '#fff'
|
||||||
p.innerHTML = '再次点击录制结束'
|
p.innerHTML = '再次点击录制结束'
|
||||||
@ -386,121 +418,126 @@ const methodMap = {
|
|||||||
// document.removeEventListener("keydown", onKeyDown);
|
// document.removeEventListener("keydown", onKeyDown);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//压模
|
//模型压平
|
||||||
pressModel() {
|
pressModel() {
|
||||||
// if (window.checkAuthIsValid) {
|
if (window.checkAuthIsValid) {
|
||||||
let selectedNode = window.treeObj.getSelectedNodes()[0]
|
let selectedNode = window.treeObj.getSelectedNodes()[0]
|
||||||
if (selectedNode) {
|
if (selectedNode) {
|
||||||
let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType)
|
let isTileset = ['bim', 'tileset'].includes(selectedNode.sourceType)
|
||||||
if (!isTileset) {
|
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({
|
ElMessage({
|
||||||
message: '请在图层指挥舱选中对应模型进行操作',
|
message: '请在图层指挥舱选中对应模型进行操作',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
return
|
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)
|
let draw = new YJ.Draw.DrawPolygon(window.earth)
|
||||||
draw.start((err, params) => {
|
draw.start((err, pos) => {
|
||||||
if (params.length > 2) {
|
let section = new YJ.Analysis.Section(window.earth, tileset.entity, {
|
||||||
if (err) throw err
|
positions: pos
|
||||||
let alt = params[0].alt
|
})
|
||||||
params.forEach((item) => {
|
// _entityMap.set(selectedNode.source_id + 'pouqie', section)
|
||||||
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 {
|
} 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({
|
ElMessage({
|
||||||
message: '请在图层指挥舱选中对应模型进行操作',
|
message: '您没有该功能的权限',
|
||||||
type: 'warning'
|
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() {
|
clearTilesetClipping() {
|
||||||
@ -515,29 +552,28 @@ const methodMap = {
|
|||||||
eventBus.emit('ProjectionConvertDialog')
|
eventBus.emit('ProjectionConvertDialog')
|
||||||
},
|
},
|
||||||
//GDB导入
|
//GDB导入
|
||||||
gdbImport() { },
|
gdbImport() {},
|
||||||
//圆形统计
|
//圆形统计
|
||||||
circleStatistics() {
|
circleStatistics() {
|
||||||
// if (window.checkAuthIsValid) {
|
if (window.checkAuthIsValid) {
|
||||||
eventBus.emit('goodsSearchCircleDialog')
|
eventBus.emit('goodsSearchCircleDialog')
|
||||||
// } else {
|
} else {
|
||||||
// this.$message({
|
ElMessage({
|
||||||
// message: '您没有该功能的权限',
|
message: '您没有该功能的权限',
|
||||||
// type: 'warning'
|
type: 'warning'
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
},
|
},
|
||||||
//多边形统计
|
//多边形统计
|
||||||
polygonStatistics() {
|
polygonStatistics() {
|
||||||
// if (window.checkAuthIsValid) {
|
if (window.checkAuthIsValid) {
|
||||||
eventBus.emit('goodsSearchPolgonDialog')
|
eventBus.emit('goodsSearchPolgonDialog')
|
||||||
|
} else {
|
||||||
// } else {
|
ElMessage({
|
||||||
// this.$message({
|
message: '您没有该功能的权限',
|
||||||
// message: "您没有该功能的权限",
|
type: 'warning'
|
||||||
// type: "warning",
|
})
|
||||||
// });
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="度分秒格式" name="second">
|
<el-tab-pane label="度分格式" name="second">
|
||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span>
|
||||||
<div class="div-item">
|
<div class="div-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="度分格式" name="third">
|
<el-tab-pane label="度分秒格式" name="third">
|
||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span>
|
||||||
<div class="div-item">
|
<div class="div-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -117,8 +117,8 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<!-- <button @click="draw">确定</button> -->
|
<button @click="draw">保存</button>
|
||||||
<button @click="close">关闭</button>
|
<button @click="close">取消</button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -127,6 +127,8 @@
|
|||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
import { addMapSource } from '../../../common/addMapSource'
|
||||||
|
import { initMapData } from '@/common/initMapData'
|
||||||
|
|
||||||
const baseDialog: any = ref(null)
|
const baseDialog: any = ref(null)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
@ -141,14 +143,15 @@ var latMin = ref(null)
|
|||||||
|
|
||||||
var lngSec = ref(null)
|
var lngSec = ref(null)
|
||||||
var latSec = ref(null)
|
var latSec = ref(null)
|
||||||
|
var id = ref(null)
|
||||||
|
|
||||||
eventBus.on('coorLocationDialog', () => {
|
eventBus.on('coorLocationDialog', () => {
|
||||||
|
id.value = new YJ.Tools().randomString()
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
})
|
})
|
||||||
|
|
||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
console.log(tab, event)
|
|
||||||
longitude.value = null
|
longitude.value = null
|
||||||
latitude.value = null
|
latitude.value = null
|
||||||
lngMin.value = null
|
lngMin.value = null
|
||||||
@ -163,13 +166,21 @@ const closeCallBack = (e) => {
|
|||||||
latMin.value = null
|
latMin.value = null
|
||||||
lngSec.value = null
|
lngSec.value = null
|
||||||
latSec.value = null
|
latSec.value = null
|
||||||
|
activeName.value = 'first'
|
||||||
}
|
}
|
||||||
const flyto = (e) => {
|
const turnToPosition = async () => {
|
||||||
|
let position
|
||||||
switch (activeName.value) {
|
switch (activeName.value) {
|
||||||
case 'first':
|
case 'first':
|
||||||
new YJ.Global.flyTo(window.earth, {
|
var point = await new YJ.Tools().sampleHeightMostDetailed(
|
||||||
position: { lng: longitude.value, lat: latitude.value, alt: 100 }
|
[{ 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
|
break
|
||||||
case 'second':
|
case 'second':
|
||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
@ -181,10 +192,16 @@ const flyto = (e) => {
|
|||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
lat = latitude.value < 0 ? -lat : lat
|
lat = latitude.value < 0 ? -lat : lat
|
||||||
|
|
||||||
var position = { lng, lat, alt: 100 }
|
var point2 = await new YJ.Tools().sampleHeightMostDetailed(
|
||||||
new YJ.Global.flyTo(window.earth, {
|
[{ lng, lat, alt: 0 }],
|
||||||
position: position
|
window.earth
|
||||||
})
|
)
|
||||||
|
position = {
|
||||||
|
lng: lng,
|
||||||
|
lat: lat,
|
||||||
|
alt: point2[0].height < 0 ? 0 : point2[0].height
|
||||||
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
case 'third':
|
case 'third':
|
||||||
var lng =
|
var lng =
|
||||||
@ -199,14 +216,97 @@ const flyto = (e) => {
|
|||||||
// @ts-ignore (define in dts)
|
// @ts-ignore (define in dts)
|
||||||
lat = latitude.value < 0 ? -lat : lat
|
lat = latitude.value < 0 ? -lat : lat
|
||||||
|
|
||||||
var position = { lng, lat, alt: 100 }
|
var point3 = await new YJ.Tools().sampleHeightMostDetailed(
|
||||||
new YJ.Global.flyTo(window.earth, {
|
[{ lng, lat, alt: 0 }],
|
||||||
position: position
|
window.earth
|
||||||
})
|
)
|
||||||
|
position = {
|
||||||
|
lng: lng,
|
||||||
|
lat: lat,
|
||||||
|
alt: point3[0].height < 0 ? 0 : point3[0].height
|
||||||
|
}
|
||||||
break
|
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()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<!-- <template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
ref="baseDialog"
|
ref="baseDialog"
|
||||||
class="fly-roam"
|
class="fly-roam"
|
||||||
title="飞行漫游"
|
title="飞行漫游"
|
||||||
|
width="382px"
|
||||||
left="180px"
|
left="180px"
|
||||||
top="100px"
|
top="100px"
|
||||||
:closeCallback="closeCallBack"
|
:closeCallback="closeCallBack"
|
||||||
@ -11,15 +12,29 @@
|
|||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span>
|
||||||
<div class="div-item">
|
<div class="div-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col" style="flex: 0 0 205px">
|
||||||
<span class="label">名称</span>
|
<span class="label">名称</span>
|
||||||
<input class="input" type="text" name="name" />
|
<input class="input" type="text" name="name" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col"></div>
|
<div class="col">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="repeat"
|
||||||
|
style="
|
||||||
|
width: 16px;
|
||||||
|
line-height: 15px;
|
||||||
|
height: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: auto;
|
||||||
|
margin-right: 5px;
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<span class="label">循环播放</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span>
|
||||||
<div class="div-item">
|
<!-- <div class="div-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input
|
<input
|
||||||
@ -67,28 +82,63 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span> -->
|
||||||
<div class="div-item">
|
<div class="div-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<!-- <div class="col">
|
||||||
<button class="add-point">
|
<button class="add-point">
|
||||||
<svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点
|
<svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="col">
|
<!-- <div class="col">
|
||||||
<button class="modify-point">
|
<button class="modify-point">
|
||||||
<svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>调整视点
|
<svg class="icon-edit"><use xlink:href="#yj-icon-edit"></use></svg>调整视点
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<button class="afreshPlay">
|
<button class="afreshPlay">
|
||||||
<svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>播放
|
<svg class="icon-play"><use xlink:href="#yj-icon-play"></use></svg>全局播放
|
||||||
|
</button>
|
||||||
|
<button class="cease" style="margin-left: 10px">
|
||||||
|
<svg-icon name="stop" :size="12" color="rgba(255, 255, 255, 1)"></svg-icon>结束播放
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<!-- <div class="col">
|
||||||
<button class="cease">
|
<button class="cease">
|
||||||
<svg class="icon-pause"><use xlink:href="#yj-icon-pause"></use></svg>结束
|
<svg class="icon-pause"><use xlink:href="#yj-icon-pause"></use></svg>结束播放
|
||||||
</button>
|
</button>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="flex: 0 0 200px">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="isTotalTime"
|
||||||
|
style="
|
||||||
|
width: 16px;
|
||||||
|
line-height: 15px;
|
||||||
|
height: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: auto;
|
||||||
|
margin-right: 5px;
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<span class="label">设置总时长</span>
|
||||||
|
<div class="input-number input-number-unit-3">
|
||||||
|
<input
|
||||||
|
class="input total-time"
|
||||||
|
type="number"
|
||||||
|
title=""
|
||||||
|
min="0"
|
||||||
|
max="999999.99"
|
||||||
|
step="0.01"
|
||||||
|
name="totalTime"
|
||||||
|
value="0"
|
||||||
|
/>
|
||||||
|
<span class="unit" style="top: 6px">s</span>
|
||||||
|
<span class="arrow"></span>
|
||||||
|
</div>
|
||||||
|
<!-- <button style="margin-left: 10px" @click="apply">应用</button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
@ -110,8 +160,13 @@
|
|||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<button @click="draw">确定</button>
|
<div style="position: absolute; left: 24px; display: flex">
|
||||||
<button @click="close">关闭</button>
|
<button class="add-point">
|
||||||
|
<svg class="icon-add"><use xlink:href="#yj-icon-add"></use></svg>增加视点
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button class="saveRoam" @click="draw">保存</button>
|
||||||
|
<button @click="close">取消</button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -120,6 +175,12 @@
|
|||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.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 baseDialog: any = ref(null)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
@ -130,9 +191,44 @@ eventBus.on('flyRoamDialog', () => {
|
|||||||
show.value = true
|
show.value = true
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity })
|
flyRoam = YJ.Global.FlyRoam.open(window.earth, { repeat: Infinity }, {}, draw)
|
||||||
}, 0)
|
}, 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 clangeViewPointHeight = () => {}
|
||||||
const viewPointHeightInput = () => {
|
const viewPointHeightInput = () => {
|
||||||
@ -147,11 +243,30 @@ const closeCallBack = (e) => {
|
|||||||
YJ.Global.FlyRoam.cease(window.earth)
|
YJ.Global.FlyRoam.cease(window.earth)
|
||||||
YJ.Global.FlyRoam.close()
|
YJ.Global.FlyRoam.close()
|
||||||
}
|
}
|
||||||
const draw = (e) => {}
|
const apply = (e) => {
|
||||||
|
YJ.Global.FlyRoam.apply()
|
||||||
|
}
|
||||||
const close = (e) => {
|
const close = (e) => {
|
||||||
show.value = false
|
show.value = false
|
||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style> -->
|
<style scoped lang="scss">
|
||||||
|
.afreshPlay {
|
||||||
|
background:
|
||||||
|
linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||||
|
linear-gradient(180deg, rgba(27, 248, 195, 0.2) 0%, rgba(27, 248, 195, 0) 100%) !important;
|
||||||
|
border: 1px solid rgba(27, 248, 195, 1) !important;
|
||||||
|
}
|
||||||
|
.cease {
|
||||||
|
background:
|
||||||
|
linear-gradient(180deg, rgba(241, 108, 85, 0.2) 0%, rgba(241, 108, 85, 0) 100%),
|
||||||
|
rgba(0, 0, 0, 0.5) !important;
|
||||||
|
border: 1px solid rgba(241, 108, 85, 1) !important;
|
||||||
|
}
|
||||||
|
::v-deep .content input.YJ-custom-checkbox[type='checkbox'] {
|
||||||
|
border: 1px solid rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -5,30 +5,129 @@
|
|||||||
title="路径规划"
|
title="路径规划"
|
||||||
left="180px"
|
left="180px"
|
||||||
top="100px"
|
top="100px"
|
||||||
|
width="527px"
|
||||||
:closeCallback="closeCallBack"
|
:closeCallback="closeCallBack"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="row" style="align-items: flex-start">
|
<div class="row" style="align-items: flex-start">
|
||||||
<div class="col start-col">
|
<div class="col start-col">
|
||||||
<button class="crossPoint">
|
<button
|
||||||
<svg-icon name="add" :size="16" color="rgba(255, 255, 255, 1)"></svg-icon> 途径点
|
class="crossPoint"
|
||||||
|
@mouseenter="svgHover[0] = true"
|
||||||
|
@mouseleave="svgHover[0] = false"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
name="add"
|
||||||
|
:size="12"
|
||||||
|
:color="svgHover[0] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
|
||||||
|
></svg-icon>
|
||||||
|
途径点
|
||||||
</button>
|
</button>
|
||||||
<button style="margin-left: 10px">
|
<button
|
||||||
<svg-icon name="add" :size="16" color="rgba(255, 255, 255, 1)"></svg-icon>避让点
|
class="crossPoint"
|
||||||
|
@mouseenter="svgHover[1] = true"
|
||||||
|
@mouseleave="svgHover[1] = false"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
name="add"
|
||||||
|
:size="12"
|
||||||
|
:color="svgHover[1] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
|
||||||
|
></svg-icon
|
||||||
|
>避让点
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" style="align-items: flex-start">
|
<div class="row">
|
||||||
|
<p class="lable-left-line">路径规划</p>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="flex: 0 0 50px">
|
||||||
|
<span class="label">起点</span>
|
||||||
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
<span class="label">经度</span>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
id="startLng"
|
||||||
|
type="number"
|
||||||
|
title=""
|
||||||
|
min="-180"
|
||||||
|
max="180"
|
||||||
|
@model="startLng"
|
||||||
|
v-model="startLng"
|
||||||
|
@change="changeStartLng"
|
||||||
|
@input="inputStartLng"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">纬度</span>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
id="startLat"
|
||||||
|
type="number"
|
||||||
|
title=""
|
||||||
|
min="-90"
|
||||||
|
max="90"
|
||||||
|
@model="startLat"
|
||||||
|
v-model="startLat"
|
||||||
|
@change="changeStartLat"
|
||||||
|
@input="inputStartLat"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 80px">
|
||||||
|
<button class="end-pick-btn" @click="pickStartPos" style="margin-left: 10px">拾取</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="flex: 0 0 50px">
|
||||||
<span class="label">终点</span>
|
<span class="label">终点</span>
|
||||||
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
|
</div>
|
||||||
<input class="input" type="number" title="" min="-90" max="90" @model="endLat" />
|
<div class="col">
|
||||||
|
<span class="label">经度</span>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
id="endLng"
|
||||||
|
type="number"
|
||||||
|
title=""
|
||||||
|
min="-180"
|
||||||
|
max="180"
|
||||||
|
@model="endLng"
|
||||||
|
v-model="endLng"
|
||||||
|
@change="changeEndLng"
|
||||||
|
@input="inputEndLng"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">纬度</span>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
id="endLat"
|
||||||
|
type="number"
|
||||||
|
title=""
|
||||||
|
min="-180"
|
||||||
|
max="180"
|
||||||
|
@model="endLat"
|
||||||
|
v-model="endLat"
|
||||||
|
@change="changeEndLat"
|
||||||
|
@input="inputEndLat"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 80px">
|
||||||
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
|
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<span class="custom-divider"></span>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<button @click="draw">绘制</button>
|
<button id="routeQuery" @clik="routeQuery">
|
||||||
|
<svg class="icon-query"><use xlink:href="#yj-icon-query"></use></svg>查询
|
||||||
|
</button>
|
||||||
|
<button id="clearRoute" @click="clearRoute">
|
||||||
|
<svg class="icon-route"><use xlink:href="#yj-icon-route"></use></svg>清除路线
|
||||||
|
</button>
|
||||||
|
<button @click="close">取消</button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -37,6 +136,7 @@
|
|||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
import { RouteApi } from '@/api/route/index.ts'
|
||||||
|
|
||||||
const baseDialog: any = ref(null)
|
const baseDialog: any = ref(null)
|
||||||
const eventBus: any = inject('bus')
|
const eventBus: any = inject('bus')
|
||||||
@ -48,29 +148,148 @@ var endLng: any = ref(null)
|
|||||||
var endLat: any = ref(null)
|
var endLat: any = ref(null)
|
||||||
|
|
||||||
var routePlanning: any = reactive([])
|
var routePlanning: any = reactive([])
|
||||||
|
|
||||||
|
var svgHover: any = reactive([false, false])
|
||||||
eventBus.on('routePlanningDialog', () => {
|
eventBus.on('routePlanningDialog', () => {
|
||||||
baseDialog.value?.open()
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
::v-deep .RoutePlanning > .content {
|
#routeQuery {
|
||||||
width: 460px;
|
position: absolute;
|
||||||
|
left: 10px;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
::v-deep .RoutePlanning > .content > div > .row .col {
|
#clearRoute {
|
||||||
margin: 0 10px;
|
position: absolute;
|
||||||
|
left: 95px;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
::v-deep .RoutePlanning > .content .row .label {
|
.YJ-custom-base-dialog > .content .row > .col {
|
||||||
flex: auto;
|
margin: 0 5px !important;
|
||||||
}
|
|
||||||
.crossPoint:hover {
|
|
||||||
color: rgba(var(--color-sdk-base-rgb), 1);
|
|
||||||
}
|
}
|
||||||
.crossPoint:hover {
|
.crossPoint:hover {
|
||||||
color: rgba(var(--color-sdk-base-rgb), 1);
|
color: rgba(var(--color-sdk-base-rgb), 1);
|
||||||
|
|||||||
@ -0,0 +1,171 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog
|
||||||
|
ref="baseDialog"
|
||||||
|
class="RoutePlanning"
|
||||||
|
title="路径规划"
|
||||||
|
left="180px"
|
||||||
|
top="100px"
|
||||||
|
width="527px"
|
||||||
|
:closeCallback="closeCallBack"
|
||||||
|
>
|
||||||
|
<template #content>
|
||||||
|
<div class="row" style="align-items: flex-start">
|
||||||
|
<div class="col start-col">
|
||||||
|
<button
|
||||||
|
class="crossPoint"
|
||||||
|
@mouseenter="svgHover[0] = true"
|
||||||
|
@mouseleave="svgHover[0] = false"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
name="add"
|
||||||
|
:size="12"
|
||||||
|
:color="svgHover[0] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
|
||||||
|
></svg-icon>
|
||||||
|
途径点
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="crossPoint"
|
||||||
|
@mouseenter="svgHover[1] = true"
|
||||||
|
@mouseleave="svgHover[1] = false"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
>
|
||||||
|
<svg-icon
|
||||||
|
name="add"
|
||||||
|
:size="12"
|
||||||
|
:color="svgHover[1] ? 'rgba(0, 255, 255, 1)' : 'rgba(255, 255, 255, 1)'"
|
||||||
|
></svg-icon
|
||||||
|
>避让点
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<p class="lable-left-line">路径规划</p>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="flex: 0 0 50px">
|
||||||
|
<span class="label">起点</span>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">经度</span>
|
||||||
|
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">纬度</span>
|
||||||
|
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 80px">
|
||||||
|
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 途径点 -->
|
||||||
|
<div class="row" v-for="(item, index) in positionList.waypoints" :key="index">
|
||||||
|
<div class="col" style="flex: 0 0 50px">
|
||||||
|
<span class="label">途径点</span>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">经度</span>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
title=""
|
||||||
|
min="-180"
|
||||||
|
max="180"
|
||||||
|
@model="endLng"
|
||||||
|
v-model="item.lng"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">纬度</span>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
type="number"
|
||||||
|
title=""
|
||||||
|
min="-180"
|
||||||
|
max="180"
|
||||||
|
@model="endLng"
|
||||||
|
v-model="item.lat"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 80px">
|
||||||
|
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="flex: 0 0 50px">
|
||||||
|
<span class="label">终点</span>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">经度</span>
|
||||||
|
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<span class="label">纬度</span>
|
||||||
|
<input class="input" type="number" title="" min="-180" max="180" @model="endLng" />
|
||||||
|
</div>
|
||||||
|
<div class="col" style="flex: 0 0 80px">
|
||||||
|
<button class="end-pick-btn" @click="pickEndPos" style="margin-left: 10px">拾取</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<button @click="draw">绘制</button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { inject } from 'vue'
|
||||||
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
|
const baseDialog: any = ref(null)
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
|
||||||
|
var positionList: any = reactive([
|
||||||
|
{
|
||||||
|
startlng: 0,
|
||||||
|
startlat: 0,
|
||||||
|
endlng: 0,
|
||||||
|
endlat: 0,
|
||||||
|
waypoints: [
|
||||||
|
{
|
||||||
|
lat: 0,
|
||||||
|
lng: 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
//属性
|
||||||
|
var startLng: any = ref(null)
|
||||||
|
var startLat: any = ref(null)
|
||||||
|
var endLng: any = ref(null)
|
||||||
|
var endLat: any = ref(null)
|
||||||
|
|
||||||
|
var svgHover: any = reactive([false, false])
|
||||||
|
eventBus.on('routePlanningDialog', () => {
|
||||||
|
baseDialog.value?.open()
|
||||||
|
})
|
||||||
|
const closeCallBack = (e) => {}
|
||||||
|
|
||||||
|
function pickStartPos() {}
|
||||||
|
function pickEndPos() {}
|
||||||
|
|
||||||
|
const draw = (e) => {}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
// ::v-deep .RoutePlanning > .content > div > .row .col {
|
||||||
|
// margin: 0 10px;
|
||||||
|
// }
|
||||||
|
// ::v-deep .RoutePlanning > .content .row .label {
|
||||||
|
// flex: auto;
|
||||||
|
// }
|
||||||
|
.YJ-custom-base-dialog > .content .row > .col {
|
||||||
|
margin: 0 5px !important;
|
||||||
|
}
|
||||||
|
.crossPoint:hover {
|
||||||
|
color: rgba(var(--color-sdk-base-rgb), 1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
109
src/renderer/src/views/components/propertyBox/imagePop.vue
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog
|
||||||
|
ref="baseDialog"
|
||||||
|
title="模型预览器"
|
||||||
|
class="imagePop"
|
||||||
|
left="180px"
|
||||||
|
top="100px"
|
||||||
|
:closeCallback="closeCallBack"
|
||||||
|
>
|
||||||
|
<template #content>
|
||||||
|
<div class="content">
|
||||||
|
<span class="custom-divider"></span>
|
||||||
|
<div class="imageCon">
|
||||||
|
<img class="image" :src="rowData.thumbnail" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="inputCon">
|
||||||
|
<span class="label">模型名称</span>
|
||||||
|
<input class="input" maxlength="40" type="text" v-model="newData.name" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #footer>
|
||||||
|
<div style="position: absolute; left: -400px; display: flex">
|
||||||
|
<button @click="setImage">设置预览图</button>
|
||||||
|
</div>
|
||||||
|
<button @click="save">保存</button>
|
||||||
|
<button @click="close">关闭</button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { inject } from 'vue'
|
||||||
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
|
|
||||||
|
const baseDialog: any = ref(null)
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
const viewPointHeight: any = ref(1.8)
|
||||||
|
var rowData: any = reactive([])
|
||||||
|
var newData: any = reactive({
|
||||||
|
name: ''
|
||||||
|
})
|
||||||
|
eventBus.on('imagePopDialog', (data) => {
|
||||||
|
console.log(data, 'data')
|
||||||
|
rowData = data
|
||||||
|
baseDialog.value?.open()
|
||||||
|
})
|
||||||
|
|
||||||
|
const clangeViewPointHeight = () => {}
|
||||||
|
const viewPointHeightInput = () => {
|
||||||
|
let dom: any = document.getElementById('viewPointHeight')
|
||||||
|
if (viewPointHeight.value < dom.min * 1) {
|
||||||
|
viewPointHeight.value = dom.min * 1
|
||||||
|
} else if (viewPointHeight.value > dom.max * 1) {
|
||||||
|
viewPointHeight.value = dom.max * 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const closeCallBack = (e) => {
|
||||||
|
//打开系统设置弹框
|
||||||
|
eventBus.emit('settingPop', true)
|
||||||
|
}
|
||||||
|
const setImage = (e) => {
|
||||||
|
baseDialog.value?.close()
|
||||||
|
}
|
||||||
|
const close = (e) => {
|
||||||
|
baseDialog.value?.close()
|
||||||
|
}
|
||||||
|
const save = (e) => {
|
||||||
|
baseDialog.value?.close()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.imageCon {
|
||||||
|
width: 400px;
|
||||||
|
height: 400px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.inputCon {
|
||||||
|
width: 180px;
|
||||||
|
float: left;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.inputCon span {
|
||||||
|
display: block;
|
||||||
|
width: 60px;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.inputCon .input {
|
||||||
|
float: left;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
width: 600px;
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
204
src/renderer/src/views/components/propertyBox/model.vue
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<template>
|
||||||
|
<div class="set_pup">
|
||||||
|
<el-dialog v-model="isShowPup" :modal="false" draggable>
|
||||||
|
<template #header>
|
||||||
|
<div class="set_pup_header">
|
||||||
|
<div class="system_title">
|
||||||
|
{{ t('model.title') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="set_detail"></div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
const { t } = useI18n()
|
||||||
|
const isShowPup = ref(false)
|
||||||
|
const eventBus: any = inject('bus')
|
||||||
|
|
||||||
|
eventBus.on('openModel', (data) => {
|
||||||
|
isShowPup.value = data
|
||||||
|
})
|
||||||
|
const open = () => {
|
||||||
|
isShowPup.value = true
|
||||||
|
}
|
||||||
|
const close = () => {
|
||||||
|
isShowPup.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.set_pup {
|
||||||
|
width: 40vw;
|
||||||
|
height: 50vh;
|
||||||
|
:deep(.el-dialog) {
|
||||||
|
background:
|
||||||
|
linear-gradient(180deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0) 100%),
|
||||||
|
rgba(0, 0, 0, 0.6);
|
||||||
|
border: 1px solid #00c9ff;
|
||||||
|
padding-left: 0 !important;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__body) {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__headerbtn) {
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
border-bottom-left-radius: 80%;
|
||||||
|
background-color: #008989;
|
||||||
|
&:hover {
|
||||||
|
background-color: #00ffff;
|
||||||
|
.el-dialog__close {
|
||||||
|
color: rgba(0, 66, 66, 1); // 悬停时改变关闭图标为红色
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__headerbtn .el-dialog__close) {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.set_pup_header {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
// background-color: #00ffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
.system_title {
|
||||||
|
background: url('../../../../../assets/images/titlebg.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 229px;
|
||||||
|
height: 34px;
|
||||||
|
line-height: 34px;
|
||||||
|
text-align: center;
|
||||||
|
font-family: 'alimamashuheiti';
|
||||||
|
font-size: 18px;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.set_detail {
|
||||||
|
box-sizing: border-box;
|
||||||
|
// height: 50vh;
|
||||||
|
:deep(
|
||||||
|
.el-tabs--left .el-tabs__active-bar.is-left,
|
||||||
|
.el-tabs--left .el-tabs__active-bar.is-right,
|
||||||
|
.el-tabs--right .el-tabs__active-bar.is-left,
|
||||||
|
.el-tabs--right .el-tabs__active-bar.is-right
|
||||||
|
) {
|
||||||
|
width: 3px;
|
||||||
|
background: rgba(0, 255, 255, 1);
|
||||||
|
height: 40px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(
|
||||||
|
.el-tabs--left .el-tabs__nav-wrap.is-left::after,
|
||||||
|
.el-tabs--left .el-tabs__nav-wrap.is-right::after,
|
||||||
|
.el-tabs--right .el-tabs__nav-wrap.is-left::after,
|
||||||
|
.el-tabs--right .el-tabs__nav-wrap.is-right::after
|
||||||
|
) {
|
||||||
|
width: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__nav-wrap::after) {
|
||||||
|
background: rgba(204, 204, 204, 0.5);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// .switchmy {
|
||||||
|
// display: flex;
|
||||||
|
// flex-wrap: wrap;
|
||||||
|
// margin-top: 15px;
|
||||||
|
|
||||||
|
// .center {
|
||||||
|
// width: 33%;
|
||||||
|
// margin-bottom: 15px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
:deep(.el-tabs__content) {
|
||||||
|
height: 50vh;
|
||||||
|
width: 80%;
|
||||||
|
padding: 0 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 美化滚动条
|
||||||
|
:deep(.el-tabs__content::-webkit-scrollbar) {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__content::-webkit-scrollbar-thumb) {
|
||||||
|
background-color: #0ff;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__content::-webkit-scrollbar-track) {
|
||||||
|
background-color: rgba(0, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__item) {
|
||||||
|
width: 8vw;
|
||||||
|
color: #fff !important;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-family: 黑体;
|
||||||
|
font-weight: 500;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__item:hover) {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(0, 255, 255, 0) 0%,
|
||||||
|
rgba(0, 255, 255, 0.5) 48.91%,
|
||||||
|
rgba(0, 255, 255, 0) 100%
|
||||||
|
);
|
||||||
|
border: 1px solid;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-image: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(0, 255, 255, 0) 0%,
|
||||||
|
rgba(0, 255, 255, 1) 55.55%,
|
||||||
|
rgba(0, 255, 255, 0) 100%
|
||||||
|
)
|
||||||
|
1;
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__item.is-active) {
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(0, 255, 255, 0) 0%,
|
||||||
|
rgba(0, 255, 255, 0.5) 48.91%,
|
||||||
|
rgba(0, 255, 255, 0) 100%
|
||||||
|
) !important;
|
||||||
|
border: 0.1px solid;
|
||||||
|
// box-sizing: border-box;
|
||||||
|
border-image: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(0, 255, 255, 0) 0%,
|
||||||
|
rgba(0, 255, 255, 1) 55.55%,
|
||||||
|
rgba(0, 255, 255, 0) 100%
|
||||||
|
)
|
||||||
|
1 !important;
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__header) {
|
||||||
|
height: 50vh !important;
|
||||||
|
width: 8vw;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
:deep(.el-tabs__nav-next, .el-tabs__nav-prev) {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -10,32 +10,41 @@
|
|||||||
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
|
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
|
||||||
<!--底部菜单-->
|
<!--底部菜单-->
|
||||||
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
|
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
|
||||||
<input type="file" id="fileInputlink" style="display: none" multiple accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
<input
|
||||||
@input="uploadFile" />
|
type="file"
|
||||||
|
id="fileInputlink"
|
||||||
|
style="display: none"
|
||||||
|
multiple
|
||||||
|
accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
||||||
|
@input="uploadFile"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 多点视线分析 -->
|
<!-- 多点视线分析 -->
|
||||||
<Visibility ref="visibility"></Visibility>
|
<Visibility ref="visibility"></Visibility>
|
||||||
<CircleViewShed ref="CircleViewShed"></CircleViewShed>
|
<CircleViewShed ref="circleViewShed"></CircleViewShed>
|
||||||
<Submerge ref="Submerge"></Submerge>
|
<Submerge ref="submerge"></Submerge>
|
||||||
<Profile ref="Profile"></Profile>
|
<Profile ref="profile"></Profile>
|
||||||
<ViewShed ref="ViewShed"></ViewShed>
|
<ViewShed ref="viewShed"></ViewShed>
|
||||||
<CutFill ref="CutFill"></CutFill>
|
<CutFill ref="cutFill"></CutFill>
|
||||||
<Contour ref="Contour"></Contour>
|
<Contour ref="contour"></Contour>
|
||||||
<RoutePlanning ref="RoutePlanning"></RoutePlanning>
|
<RoutePlanning ref="routePlanning"></RoutePlanning>
|
||||||
<Graffiti ref="Graffiti"></Graffiti>
|
<Graffiti ref="graffiti"></Graffiti>
|
||||||
<!-- <FlyRoam ref="FlyRoam"></FlyRoam> -->
|
<FlyRoam ref="flyRoam"></FlyRoam>
|
||||||
<CoorLocation ref="CoorLocation"></CoorLocation>
|
<CoorLocation ref="coorLocation"></CoorLocation>
|
||||||
<ScreenShot ref="ScreenShot"></ScreenShot>
|
<ScreenShot ref="screenShot"></ScreenShot>
|
||||||
<TerrainExcavation ref="TerrainExcavation"></TerrainExcavation>
|
<TerrainExcavation ref="terrainExcavation"></TerrainExcavation>
|
||||||
<ProjConvert ref="ProjConvert"></ProjConvert>
|
<ProjConvert ref="projConvert"></ProjConvert>
|
||||||
<ProjectionConvert ref="ProjectionConvert"></ProjectionConvert>
|
<ProjectionConvert ref="projectionConvert"></ProjectionConvert>
|
||||||
<GoodsSearchCircle ref="GoodsSearchCircle"></GoodsSearchCircle>
|
<GoodsSearchCircle ref="goodsSearchCircle"></GoodsSearchCircle>
|
||||||
<GoodsSearchPolgon ref="GoodsSearchPolgon"></GoodsSearchPolgon>
|
<GoodsSearchPolgon ref="goodsSearchPolgon"></GoodsSearchPolgon>
|
||||||
<!-- <selectImg ref="selectImgRef"></selectImg> -->
|
<tufuSelect ref="tufuselect"></tufuSelect>
|
||||||
|
<imagePop ref="imagepop"></imagePop>
|
||||||
|
<model ref="Model"></model>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject, shallowRef, ref } from 'vue'
|
import { inject, shallowRef, ref } from 'vue'
|
||||||
|
import { AuthApi } from '@/api/setting/auth'
|
||||||
import Headers from '../components/headers/index.vue'
|
import Headers from '../components/headers/index.vue'
|
||||||
import Tree from '../components/tree/index.vue'
|
import Tree from '../components/tree/index.vue'
|
||||||
import addStandText from '../components/propertyBox/addStandText.vue'
|
import addStandText from '../components/propertyBox/addStandText.vue'
|
||||||
@ -79,6 +88,9 @@ import flat from '../components/propertyBox/flat.vue'
|
|||||||
import terrain from '../components/propertyBox/terrain.vue'
|
import terrain from '../components/propertyBox/terrain.vue'
|
||||||
import { useRightOperate } from '../components/tree/components/hooks/rightOperate'
|
import { useRightOperate } from '../components/tree/components/hooks/rightOperate'
|
||||||
// import selectImg from '../components/selectImg/index.vue'
|
// import selectImg from '../components/selectImg/index.vue'
|
||||||
|
import tufuSelect from '../components/headers/components/tufu_select.vue'
|
||||||
|
import imagePop from '../components/propertyBox/imagePop.vue'
|
||||||
|
import model from '../components/propertyBox/model.vue'
|
||||||
|
|
||||||
import { GisApi } from '@/api/gisApi'
|
import { GisApi } from '@/api/gisApi'
|
||||||
|
|
||||||
@ -234,6 +246,11 @@ const createEarth = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
tree.value.initTreeCallBack()
|
tree.value.initTreeCallBack()
|
||||||
|
let options = JSON.parse(localStorage.getItem('defaultView'))
|
||||||
|
YJ.Global.setDefaultView(window.earth, options)
|
||||||
|
setTimeout(() => {
|
||||||
|
new YJ.Tools(window.earth).flyHome()
|
||||||
|
}, 1000)
|
||||||
// YJ.Global.setDefaultView(window.earth, {
|
// YJ.Global.setDefaultView(window.earth, {
|
||||||
// destination: { lng: 100, lat: 30, alt: 10 },
|
// destination: { lng: 100, lat: 30, alt: 10 },
|
||||||
// orientation: {
|
// orientation: {
|
||||||
@ -271,8 +288,28 @@ const uploadFile = (event) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const getAuthInfo = async () => {
|
||||||
|
const res = await AuthApi.showAuth()
|
||||||
|
if (typeof res.data === 'object') {
|
||||||
|
let time = res.data.expireTime
|
||||||
|
getStatus(time)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStatus = (time) => {
|
||||||
|
const timestamp = new Date(time).getTime()
|
||||||
|
|
||||||
|
const currentTimestamp = Date.now()
|
||||||
|
|
||||||
|
if (timestamp > currentTimestamp) {
|
||||||
|
window.checkAuthIsValid = true
|
||||||
|
} else {
|
||||||
|
window.checkAuthIsValid = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
getAuthInfo()
|
||||||
await YJ.on()
|
await YJ.on()
|
||||||
createEarth()
|
createEarth()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { throttle } from '@/utils/index'
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { LoginApi } from '@/api/login'
|
import { LoginApi } from '@/api/login'
|
||||||
import { useUserStore } from '@/store/modules/user'
|
import { useUserStore } from '@/store/modules/user'
|
||||||
|
import { AuthApi } from '@/api/setting/auth'
|
||||||
// const { ipcRenderer } = require('electron')
|
// const { ipcRenderer } = require('electron')
|
||||||
export const useLogin = () => {
|
export const useLogin = () => {
|
||||||
const showContent = ref(false) // 控制视频显示
|
const showContent = ref(false) // 控制视频显示
|
||||||
@ -72,7 +73,7 @@ export const useLogin = () => {
|
|||||||
const res = await LoginApi.login(loginForm.value)
|
const res = await LoginApi.login(loginForm.value)
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
if ([0,200].includes(res.code) ) {
|
if ([0, 200].includes(res.code)) {
|
||||||
checkboxVModel.value = true
|
checkboxVModel.value = true
|
||||||
localStorage.setItem(res.data.header, res.data.token)
|
localStorage.setItem(res.data.header, res.data.token)
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
@ -85,6 +86,7 @@ export const useLogin = () => {
|
|||||||
)
|
)
|
||||||
ElMessage.success('登录成功')
|
ElMessage.success('登录成功')
|
||||||
router.push({ path: '/home' })
|
router.push({ path: '/home' })
|
||||||
|
getAuthInfo()
|
||||||
// ipcRenderer.send('renderNode')
|
// ipcRenderer.send('renderNode')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -105,6 +107,27 @@ export const useLogin = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//获取授权信息
|
||||||
|
const getAuthInfo = async () => {
|
||||||
|
const res = await AuthApi.showAuth()
|
||||||
|
if (typeof res.data === 'object') {
|
||||||
|
let time = res.data.expireTime
|
||||||
|
getStatus(time)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getStatus = (time) => {
|
||||||
|
const timestamp = new Date(time).getTime()
|
||||||
|
|
||||||
|
const currentTimestamp = Date.now()
|
||||||
|
|
||||||
|
if (timestamp > currentTimestamp) {
|
||||||
|
window.checkAuthIsValid = true
|
||||||
|
} else {
|
||||||
|
window.checkAuthIsValid = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
// 播放第一个视频
|
// 播放第一个视频
|
||||||
// 这里可以添加一些逻辑来处理视频播放
|
// 这里可以添加一些逻辑来处理视频播放
|
||||||
const playFirstVideo = () => {
|
const playFirstVideo = () => {
|
||||||
|
|||||||