diff --git a/.gitignore b/.gitignore index 09cddb9..8548b0d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ node_modules dist build out +resources +ffplay .history .DS_Store .vscode diff --git a/resources/java/app/license/yjearth.YJ b/resources/java/app/license/yjearth.YJ deleted file mode 100644 index 91c0845..0000000 --- a/resources/java/app/license/yjearth.YJ +++ /dev/null @@ -1 +0,0 @@ -41b/ujShRZRf9Aa433FD3uyIZuxWSSqXWXlc2dyQfJ75ED0HNbadcdsPF5CaMuJ624E+iLBfS14muki3Kp1qv3N0KPVdc0TjJDyrO+AVfwE3xW3RZy00SBFwUgG/tIU6bBTw4XijzGn57R1nl7djDeP1sx04fzNeWSLujfPS4hzwLryTr1ScTPGegLiv1C+rXsbkAxFf47uMIGGK0M2VBZTA9+UoajQ1PHwDUdI7Sfo2JRzkCFW8v6WI1jCNPaFyLypkZtybW+yeNEhnp/jeYw== \ No newline at end of file diff --git a/resources/java/app/license/yjearth.lic b/resources/java/app/license/yjearth.lic deleted file mode 100644 index ff60fca..0000000 --- a/resources/java/app/license/yjearth.lic +++ /dev/null @@ -1 +0,0 @@ -41b/ujShRZRf9Aa433FD3uyIZuxWSSqXWXlc2dyQfJ75ED0HNbadcdsPF5CaMuJ624E+iLBfS14muki3Kp1qv3N0KPVdc0TjJDyrO+AVfwE3xW3RZy00SBFwUgG/tIU6bBTw4XijzGn57R1nl7djDeP1sx04fzNeWSLujfPS4hzwLryTr1ScTPGegLiv1C+rXsbkAxFf47uMIGGK0M2VBZTA9+UoajQ1PHwDUdI7Sfo2JRzkCFW8v6WI1jCNPaFyLypkZtybW+yeNEhnp/jeYw==1 \ No newline at end of file diff --git a/resources/java/app/license/yjearth.yj b/resources/java/app/license/yjearth.yj deleted file mode 100644 index 91c0845..0000000 --- a/resources/java/app/license/yjearth.yj +++ /dev/null @@ -1 +0,0 @@ -41b/ujShRZRf9Aa433FD3uyIZuxWSSqXWXlc2dyQfJ75ED0HNbadcdsPF5CaMuJ624E+iLBfS14muki3Kp1qv3N0KPVdc0TjJDyrO+AVfwE3xW3RZy00SBFwUgG/tIU6bBTw4XijzGn57R1nl7djDeP1sx04fzNeWSLujfPS4hzwLryTr1ScTPGegLiv1C+rXsbkAxFf47uMIGGK0M2VBZTA9+UoajQ1PHwDUdI7Sfo2JRzkCFW8v6WI1jCNPaFyLypkZtybW+yeNEhnp/jeYw== \ No newline at end of file diff --git a/resources/java/app/upload/d2889ca0ad30448a9d4157bf7b4709b7.JPG b/resources/java/app/upload/d2889ca0ad30448a9d4157bf7b4709b7.JPG deleted file mode 100644 index f9594f1..0000000 Binary files a/resources/java/app/upload/d2889ca0ad30448a9d4157bf7b4709b7.JPG and /dev/null differ diff --git a/src/main/index.ts b/src/main/index.ts index a5c441e..97ebef4 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -128,6 +128,19 @@ function createWindow(): void { allowRunningInsecureContent: true } }) + mainWindow.webContents.on('before-input-event', (event, input) => { + // 条件:仅按了 Alt 键(无其他键组合、不是组合键、不是重复按键) + if ( + input.key === 'Alt' && // 按键是 Alt + !input.ctrl && // 未按 Ctrl + !input.shift && // 未按 Shift + !input.meta && // 未按 Meta(Win/Mac) + !input.isComposing && // 非输入法组合态 + input.type === 'keyDown' // 仅拦截按下事件 + ) { + event.preventDefault(); // 阻止 Alt 键的默认行为(激活菜单) + } + }); let ymlBatPath = process.env.NODE_ENV === 'development' ? path.resolve(app.getAppPath(), 'resources', 'java', 'app', 'application.yml') : path.join(process.resourcesPath, 'app.asar.unpacked', 'resources', 'java', 'app', 'application.yml') ymlBatPath = process.platform === 'win32' ? ymlBatPath.replace(/^(\w:)/, '/$1') : ymlBatPath let ymlPath = ymlBatPath.substring(1, 200) @@ -457,6 +470,19 @@ function createWindow(): void { }); // 6. 记录窗口映射 + newWindow.webContents.on('before-input-event', (event, input) => { + // 条件:仅按了 Alt 键(无其他键组合、不是组合键、不是重复按键) + if ( + input.key === 'Alt' && // 按键是 Alt + !input.ctrl && // 未按 Ctrl + !input.shift && // 未按 Shift + !input.meta && // 未按 Meta(Win/Mac) + !input.isComposing && // 非输入法组合态 + input.type === 'keyDown' // 仅拦截按下事件 + ) { + event.preventDefault(); // 阻止 Alt 键的默认行为(激活菜单) + } + }); _winMap.set(id, newWindow.id); return _winMap; @@ -663,7 +689,10 @@ if (!gotTheLock) { let string = data.toString().trim() // console.log(`批处理输出: ${string}`); // 临时处理:应用启动失败或项目文档地址出现时,认为服务初始化完成;后续需后端配合 - if (string.indexOf('APPLICATION FAILED TO START') !== -1 || string.indexOf('项目文档地址') !== -1) { + if (string.indexOf('APPLICATION FAILED TO START') !== -1) { + mainWindow.webContents.send('program-init', '后端服务未正常启动,尝试更换地址或端口') + } + else if (string.indexOf('项目文档地址') !== -1) { if (!isSeverInit) { isSeverInit = true if (isAppInit) { diff --git a/src/renderer/public/sdk/custom/css/index.css b/src/renderer/public/sdk/custom/css/index.css index 04faf54..5749e5a 100644 --- a/src/renderer/public/sdk/custom/css/index.css +++ b/src/renderer/public/sdk/custom/css/index.css @@ -178,6 +178,7 @@ color: rgba(var(--color-base1), 1) !important; cursor: pointer; } + .YJ-custom-base-dialog button:not(button[disabled]):hover svg { fill: rgba(var(--color-base1), 1) !important; } @@ -341,7 +342,7 @@ .YJ-custom-base-dialog>.content input, .YJ-custom-base-dialog>.content textarea { - font-size: 16px; + font-size: 14px; background-color: rgba(0, 0, 0, 0.5); border: 1px solid rgba(var(--color-base1), 0.5); border-radius: 5px; @@ -2534,8 +2535,8 @@ .YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3), .YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .th:nth-child(3), .YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { - flex: 0 0 165px; - width: 165px; + flex: 0 0 175px; + width: 175px; justify-content: center; } @@ -2618,8 +2619,8 @@ .YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3), .YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .th:nth-child(3), .YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { - flex: 0 0 165px; - width: 165px; + flex: 0 0 175px; + width: 175px; justify-content: center; } @@ -2678,8 +2679,8 @@ .YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3), .YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .th:nth-child(3), .YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { - flex: 0 0 165px; - width: 165px; + flex: 0 0 175px; + width: 175px; justify-content: center; } @@ -2761,7 +2762,7 @@ /* 折线 */ .YJ-custom-base-dialog.polyline>.content { - width: 580px; + width: 600px; } .YJ-custom-base-dialog.polyline>.content>div #dashTextureDom { @@ -3796,7 +3797,7 @@ .yj-custom-icon { display: inline-block; width: 22px; - height: 10px; + height: 18px; margin-right: 5px; } diff --git a/src/renderer/public/tree/newFuzzySearch.js b/src/renderer/public/tree/newFuzzySearch.js index 1b4a813..978db79 100644 --- a/src/renderer/public/tree/newFuzzySearch.js +++ b/src/renderer/public/tree/newFuzzySearch.js @@ -80,16 +80,16 @@ window.newFuzzySearch = function ( hideAllNode(allNodes) nodeChildren.forEach((item) => { if (item.oldname) { - item.sourceName = item.oldname + item.sourceName = item.oldname + '' zTreeObj.updateNode(item) } if (contrast) { - if ((item.sourceName || '').indexOf(contrast) > -1) { + if (((item.sourceName || '')+'').indexOf(contrast) > -1) { console.log('sourceName包含关键字') console.log(item) console.log(item.sourceName) - item.oldname = item.sourceName + item.oldname = item.sourceName + '' item.highlight = true let F = new RegExp(contrast, 'gi') item.sourceName = item.oldname.replace(F, function (h) { diff --git a/src/renderer/src/I18n/zh-CN.ts b/src/renderer/src/I18n/zh-CN.ts index ef51b9e..5d1ca3a 100644 --- a/src/renderer/src/I18n/zh-CN.ts +++ b/src/renderer/src/I18n/zh-CN.ts @@ -263,6 +263,8 @@ export default { rtmp: 'rtmp', 物资: '物资', 编辑内容: '编辑内容', + 请输入设备名称进行搜索: '请输入设备名称进行搜索', + 请输入物资名称进行搜索: '请输入物资名称进行搜索', 打开文本编辑器: '打开文本编辑器', 添加链接: '添加链接', 名称: '名称', diff --git a/src/renderer/src/I18n/zh-EN.ts b/src/renderer/src/I18n/zh-EN.ts index 77eeebf..4569f7b 100644 --- a/src/renderer/src/I18n/zh-EN.ts +++ b/src/renderer/src/I18n/zh-EN.ts @@ -47,16 +47,16 @@ export default { excel: 'Excel' }, firstMenu: { - measure: 'measure', - tool: 'tool', - effect: 'effect', + measure: 'Measure', + tool: 'Tool', + effect: 'Special effects', bigData: 'bigData', - modelLibrary: 'modelLibrary', - situation: 'situationLibrary', + modelLibrary: 'Model', + situation: 'Scheme', onlinePictureSource: 'onlinePictureSource', - analysis: 'analysis', + analysis: 'Analyze', militaryMark: 'militaryMark', - ersanwei: 'two and three-dimensional', + ersanwei: '2D/3D', junbiao3d: '3D military logo' }, effect: { @@ -155,7 +155,8 @@ export default { authorize: 'Authorization Information', setting: 'System settings', project: 'Engineering Information', - device: 'device management', + device: 'Device management', + materials: 'Materials management', modelManage: 'Model management', graphLabelManage: 'Military Icon Management', photoManage: 'Icon Management', @@ -262,6 +263,8 @@ export default { rtmp: 'rtmp', 物资: 'Materials', 编辑内容: 'Edit content', + 请输入设备名称进行搜索: 'Please enter the device name to search', + 请输入物资名称进行搜索: 'Please enter the materials name to search', 打开文本编辑器: 'Open the editor', 添加链接: 'Add Link', 名称: 'Name', diff --git a/src/renderer/src/I18n/zh-TW.ts b/src/renderer/src/I18n/zh-TW.ts index 23816a9..a36e7a6 100644 --- a/src/renderer/src/I18n/zh-TW.ts +++ b/src/renderer/src/I18n/zh-TW.ts @@ -155,6 +155,7 @@ export default { setting: '系統設置', project: '工程管理', device: '設備管理', + materials: '物資管理', modelManage: '模型管理', graphLabelManage: '軍標管理', photoManage: '圖標管理', @@ -261,6 +262,8 @@ export default { rtmp: 'rtmp', 物资: '物資', 编辑内容: '編輯內容', + 请输入设备名称进行搜索: '請輸入設備名稱進行搜索', + 请输入物资名称进行搜索: '請輸入物資名稱進行搜索', 打开文本编辑器: '打開文本編輯器', 添加链接: '添加鏈接', 名称: '名稱', diff --git a/src/renderer/src/api/graphLabel/index.ts b/src/renderer/src/api/graphLabel/index.ts index f2ced1a..caf37bc 100644 --- a/src/renderer/src/api/graphLabel/index.ts +++ b/src/renderer/src/api/graphLabel/index.ts @@ -44,7 +44,7 @@ export const GraphApi = { }) }, //军标类型列表 - modelTypeList: async (data: any) => { + modelTypeList: async (data: any = {}) => { return await request.get({ url: `/militaryLibrary/militaryTypeTree`, params: data, diff --git a/src/renderer/src/api/model/index.ts b/src/renderer/src/api/model/index.ts index 764fcf5..611d0e3 100644 --- a/src/renderer/src/api/model/index.ts +++ b/src/renderer/src/api/model/index.ts @@ -44,7 +44,7 @@ export const ModelApi = { }) }, //模型类型列表 - modelTypeList: async (data: any) => { + modelTypeList: async (data: any = {}) => { return await request.get({ url: `/modelLibrary/modelTypeList`, diff --git a/src/renderer/src/api/photo/index.ts b/src/renderer/src/api/photo/index.ts index 829a74e..1573eb3 100644 --- a/src/renderer/src/api/photo/index.ts +++ b/src/renderer/src/api/photo/index.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import request from '@/axios/request' //图标库 export const PhotoApi = { @@ -44,7 +45,7 @@ export const PhotoApi = { }) }, //图标类型列表 - modelTypeList: async (data: any) => { + modelTypeList: async (data?: any) => { return await request.get({ url: `/iconLibrary/iconTypeTree`, params: data, diff --git a/src/renderer/src/api/tree/index.ts b/src/renderer/src/api/tree/index.ts index 0ff8f0f..2ca78a4 100644 --- a/src/renderer/src/api/tree/index.ts +++ b/src/renderer/src/api/tree/index.ts @@ -27,6 +27,7 @@ export const TreeApi = { url: `/source/addOtherSource`, data }).then((res) => { + ElMessage.closeAll() ElMessage({ message: '添加成功', type: 'success' @@ -50,6 +51,7 @@ export const TreeApi = { url: `/source/update`, data }).then((res) => { + ElMessage.closeAll() ElMessage({ message: '操作成功', type: 'success' diff --git a/src/renderer/src/axios/index.ts b/src/renderer/src/axios/index.ts index 8eb1166..1c441ae 100644 --- a/src/renderer/src/axios/index.ts +++ b/src/renderer/src/axios/index.ts @@ -44,12 +44,12 @@ service.interceptors.request.use( const key = getRequestKey(config) // 检查是否有相同请求正在进行 - if (pendingRequests.has(key)) { - ElMessage({ - message: '当前请求已存在,请稍后再试', - type: 'warning' - }) - } + // if (pendingRequests.has(key)) { + // ElMessage({ + // message: '当前请求已存在,请稍后再试', + // type: 'warning' + // }) + // } const controller = new AbortController() config.signal = controller.signal diff --git a/src/renderer/src/common/addMapSource.ts b/src/renderer/src/common/addMapSource.ts index d225190..bab941c 100644 --- a/src/renderer/src/common/addMapSource.ts +++ b/src/renderer/src/common/addMapSource.ts @@ -1,13 +1,13 @@ -import {TreeApi} from '@/api/tree' -import {useTreeNode} from '../views/components/tree/hooks/treeNode' -import {initMapData} from './initMapData' +import { TreeApi } from '@/api/tree' +import { useTreeNode } from '../views/components/tree/hooks/treeNode' +import { initMapData } from './initMapData' -export const addMapSource = async ({type, id, sourceName = '未命名对象', opt = {}}) => { - const {cusAddNodes} = useTreeNode() +export const addMapSource = async ({ type, id, sourceName = '未命名对象', opt = {} }, cd:any = null) => { + const { cusAddNodes } = useTreeNode() if (!id) { id = new YJ.Tools().randomString() } - let options: any = await initMapData(type, opt, null) + let options: any = await initMapData(type, opt, cd) let selectedNodes = window.treeObj.getSelectedNodes() let node = selectedNodes && selectedNodes[selectedNodes.length - 1] function getParentId(nd: any) { @@ -15,7 +15,7 @@ export const addMapSource = async ({type, id, sourceName = '未命名对象', op return nd.id } else { let parentNode = window.treeObj.getNodeByParam("id", nd.parentId, null); - if(parentNode) { + if (parentNode) { return getParentId(parentNode) } else { @@ -28,7 +28,7 @@ export const addMapSource = async ({type, id, sourceName = '未命名对象', op parentId = getParentId(node) } delete options.host - if(options.attribute && options.attribute.rtmp) { + if (options.attribute && options.attribute.rtmp) { delete options.attribute.rtmp } switch (type) { diff --git a/src/renderer/src/common/initMapData.ts b/src/renderer/src/common/initMapData.ts index b082221..4e08fad 100644 --- a/src/renderer/src/common/initMapData.ts +++ b/src/renderer/src/common/initMapData.ts @@ -20,6 +20,7 @@ export const initMapData = async (type, data, cd) => { case 'vrImage': console.log(data, 'dataccccc') entityObject = new YJ.Obj.BillboardObject(window.earth, data) + cd && cd(entityObject) console.log('entityObject', entityObject) // entityObject.options.billboard.defaultImage = '' break @@ -62,11 +63,12 @@ export const initMapData = async (type, data, cd) => { case 'terrain': data.host = baseURL entityObject = new YJ.Obj.Terrain(window.earth, data) + cd && cd(entityObject) break case 'layer': data.host = baseURL - console.log('layer', data) entityObject = new YJ.Obj.Layer(window.earth, data) + cd && cd(entityObject) break case 'gdslImagery': data.host = baseURL @@ -177,11 +179,14 @@ export const initMapData = async (type, data, cd) => { break case 'geojson': entityObject = new YJ.Obj.GeoJson(window.earth, data) - entityObject.on() + entityObject.on().then(()=>{ + cd && cd(entityObject) + }) break case 'vector': let node = window.treeObj.getNodeByParam("id", data.id, null); entityObject = renderVector(node, false) + cd && cd(entityObject) break default: break diff --git a/src/renderer/src/components/dialog/baseDialog.vue b/src/renderer/src/components/dialog/baseDialog.vue index 366539a..f64d9d7 100644 --- a/src/renderer/src/components/dialog/baseDialog.vue +++ b/src/renderer/src/components/dialog/baseDialog.vue @@ -201,8 +201,8 @@ const moveDiv = () => { newLeft = windowWidth - oMoveDivWidth } - if (newTop <= 0) { - newTop = 0 + if (newTop <= 97) { + newTop = 97 } else if (newTop + oMoveDivHeight > windowHeight) { newTop = windowHeight - oMoveDivHeight } diff --git a/src/renderer/src/icons/svg/mbtiles.svg b/src/renderer/src/icons/svg/mbtiles.svg index 849baa7..ba44d46 100644 --- a/src/renderer/src/icons/svg/mbtiles.svg +++ b/src/renderer/src/icons/svg/mbtiles.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/renderer/src/views/TS/components/timeScale.vue b/src/renderer/src/views/TS/components/timeScale.vue index e035cc4..ed9ecf9 100644 --- a/src/renderer/src/views/TS/components/timeScale.vue +++ b/src/renderer/src/views/TS/components/timeScale.vue @@ -1,6 +1,6 @@ diff --git a/src/renderer/src/views/components/propertyBox/ViewShed.vue b/src/renderer/src/views/components/propertyBox/ViewShed.vue index cfdf2ee..81a58d9 100644 --- a/src/renderer/src/views/components/propertyBox/ViewShed.vue +++ b/src/renderer/src/views/components/propertyBox/ViewShed.vue @@ -90,7 +90,7 @@ - + diff --git a/src/renderer/src/views/components/propertyBox/attackArrow.vue b/src/renderer/src/views/components/propertyBox/attackArrow.vue index a2c5924..f4fec57 100644 --- a/src/renderer/src/views/components/propertyBox/attackArrow.vue +++ b/src/renderer/src/views/components/propertyBox/attackArrow.vue @@ -147,7 +147,7 @@ - + @@ -401,4 +401,15 @@ defineExpose({ }) - \ No newline at end of file + \ No newline at end of file diff --git a/src/renderer/src/views/components/propertyBox/attribute.vue b/src/renderer/src/views/components/propertyBox/attribute.vue index da935bc..c615427 100644 --- a/src/renderer/src/views/components/propertyBox/attribute.vue +++ b/src/renderer/src/views/components/propertyBox/attribute.vue @@ -47,15 +47,15 @@
{{ item.url }}
- - +
- - + +
@@ -69,7 +69,7 @@
{{ t('general.编辑内容') }} - + @@ -244,7 +244,7 @@
{{ t('general.编辑内容') }} -
@@ -388,8 +388,8 @@ const cameraSelect = ({page, limit}) => { if (res.code === 0 || res.code === 200) { if (res.data) { cameraParams.value.total = res.data.total + cameraList.value = res.data.records if (res.data.records && res.data.records.length > 0) { - cameraList.value = res.data.records for (let i = 0; i < cameraList.value.length; i++) { cameraList.value[i].checked = false for (let j = 0; j < props.entityOptions.attributeCamera.length; j++) { @@ -724,8 +724,8 @@ const changeAttributeCamera = (e) => { .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .th:nth-child(1), .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(1) { - width: 164px; - flex: 0 0 164px; + width: 150px; + flex: 0 0 150px; } .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .th:nth-child(2), @@ -744,21 +744,21 @@ const changeAttributeCamera = (e) => { .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td:nth-child(3), .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .th:nth-child(3), .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(3) { - flex: 0 0 150px; - width: 150px; + flex: 0 0 175px; + width: 175px; justify-content: center; } -.YJ-custom-base-dialog.dialog-en > .content .attribute-content-link .table .tr .th:nth-child(3), -.YJ-custom-base-dialog.dialog-en > .content .attribute-content-link .table .tr .td:nth-child(3), -.YJ-custom-base-dialog.dialog-en > .content .attribute-content-vr .table .tr .th:nth-child(3), -.YJ-custom-base-dialog.dialog-en > .content .attribute-content-vr .table .tr .td:nth-child(3), -.YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .th:nth-child(3), -.YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .td:nth-child(3) { - flex: 0 0 190px; - width: 190px; - justify-content: center; -} +// .YJ-custom-base-dialog.dialog-en > .content .attribute-content-link .table .tr .th:nth-child(3), +// .YJ-custom-base-dialog.dialog-en > .content .attribute-content-link .table .tr .td:nth-child(3), +// .YJ-custom-base-dialog.dialog-en > .content .attribute-content-vr .table .tr .th:nth-child(3), +// .YJ-custom-base-dialog.dialog-en > .content .attribute-content-vr .table .tr .td:nth-child(3), +// .YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .th:nth-child(3), +// .YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .td:nth-child(3) { +// flex: 0 0 190px; +// width: 190px; +// justify-content: center; +// } .YJ-custom-base-dialog > .content .attribute-content-link .table .tr .td .input-group .input, .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td .input-group .input, diff --git a/src/renderer/src/views/components/propertyBox/billboardObject.vue b/src/renderer/src/views/components/propertyBox/billboardObject.vue index c58fe61..8750cc4 100644 --- a/src/renderer/src/views/components/propertyBox/billboardObject.vue +++ b/src/renderer/src/views/components/propertyBox/billboardObject.vue @@ -3,147 +3,197 @@ :closeCallback="closeCallback"> @@ -375,6 +425,31 @@ const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode() const baseDialog: any = ref(null) const eventBus: any = inject('bus') +const name_map: any = ref([]) +const name_map1: any = ref([]) +const name_map2: any = ref([ + { + epsg: 'EPSG:32601', + name: 'WGS84 通用横轴墨卡托投影' + }, + { + epsg: 'EPSG:4534', + name: '2000 坐标 3 度不带代号' + }, + { + epsg: 'EPSG:4513', + name: '2000 坐标 3 度带代号' + }, + { + epsg: 'EPSG:4502', + name: '2000 坐标 6 度不带代号' + }, + { + epsg: 'EPSG:4491', + name: '2000 坐标 6 度带代号' + } +]) + const epsg_map = ref([ { name: 'WGS 84 / UTM zone 3N', @@ -390,6 +465,10 @@ for (const [key, value] of window.earth.proj.epsg_map) { } epsg_map.value = array +let tool = new YJ.Tools(window.earth) +name_map.value = Array.from(tool.name_map.values()) +name_map1.value = name_map.value.splice(0, 2) + const format1 = ref(true) const format2 = ref(false) const format3 = ref(false) @@ -434,6 +513,9 @@ const x = ref() const y = ref() const z = ref() const coordinate = ref('EPSG:4326') +const isHotGroupOpen: any = ref(true) +const isHotGroupOpen2: any = ref(false) +const showPosiType: any = ref(false) const heightMode = ref(0) const labelColorRef = ref(null) const sourceType = ref('') @@ -454,6 +536,13 @@ const open = async (id, type) => { baseDialog.value?.open() await nextTick() + let data = name_map1.value.filter((item) => item.epsg === coordinate.value) + showPosiType.value = data.length + if (data.length) { + isHotGroupOpen.value = true + } else { + isHotGroupOpen2.value = true + } let labelColorPicker = new window.YJColorPicker({ el: labelColorRef.value, size: 'mini', //颜色box类型 @@ -519,6 +608,11 @@ const closeCallback = () => { eventBus?.emit('destroyComponent') } +const toggleGroup = (type: string) => { + if (type === 'hot') isHotGroupOpen.value = !isHotGroupOpen.value + if (type === 'ty') isHotGroupOpen2.value = !isHotGroupOpen2.value +} + const changeName = (e) => { entityOptions.value.labelText = e.target.value } @@ -771,7 +865,7 @@ defineExpose({ } ::v-deep>.content { - width: 590px; + width: 600px; .title1 { width: 46%; @@ -802,7 +896,7 @@ defineExpose({ .billboard-object.dialog-en { ::v-deep>.content { - width: 690px; + width: 660px; .title1 { width: 40%; diff --git a/src/renderer/src/views/components/propertyBox/circleDiffuse.vue b/src/renderer/src/views/components/propertyBox/circleDiffuse.vue index 2c984a8..9dc8a27 100644 --- a/src/renderer/src/views/components/propertyBox/circleDiffuse.vue +++ b/src/renderer/src/views/components/propertyBox/circleDiffuse.vue @@ -103,7 +103,7 @@
- + diff --git a/src/renderer/src/views/components/propertyBox/curvelineObject.vue b/src/renderer/src/views/components/propertyBox/curvelineObject.vue index 3797927..4a5f54b 100644 --- a/src/renderer/src/views/components/propertyBox/curvelineObject.vue +++ b/src/renderer/src/views/components/propertyBox/curvelineObject.vue @@ -59,13 +59,13 @@
线段缓冲 - +
缓冲宽度
- + m
@@ -190,7 +190,7 @@
- + @@ -383,7 +383,7 @@ const open = async (id, type) => { const heightModeChange = (val) => { that.heightMode = heightMode.value // @ts-ignore - if(heightMode.value === 0 || heightMode.value === '0' || heightMode.value === 1 || heightMode.value === '1') { + if (heightMode.value === 0 || heightMode.value === '0' || heightMode.value === 1 || heightMode.value === '1') { entityOptions.value.extend = false } } @@ -425,8 +425,8 @@ const changeWordsName = (val) => { const lineTypechange = () => { } -const lineExtendchange = (e)=>{ - if(e.target.checked) { +const lineExtendchange = (e) => { + if (e.target.checked) { heightMode.value = 2 } } @@ -554,4 +554,14 @@ defineExpose({ } } } +.polyline.dialog-en { + ::v-deep>.content { + .attribute-content-link .table .tr .td.operation button, + .attribute-content-vr .table .tr .td.operation button, + .attribute-content-rtmp .table .tr .td.operation button { + width: 76px !important; + flex: 0 0 76px !important; + } + } +} \ No newline at end of file diff --git a/src/renderer/src/views/components/propertyBox/explosion.vue b/src/renderer/src/views/components/propertyBox/explosion.vue index 0a3a3ab..db40481 100644 --- a/src/renderer/src/views/components/propertyBox/explosion.vue +++ b/src/renderer/src/views/components/propertyBox/explosion.vue @@ -56,7 +56,7 @@
- + diff --git a/src/renderer/src/views/components/propertyBox/flat.vue b/src/renderer/src/views/components/propertyBox/flat.vue index c826e19..5567587 100644 --- a/src/renderer/src/views/components/propertyBox/flat.vue +++ b/src/renderer/src/views/components/propertyBox/flat.vue @@ -36,7 +36,7 @@ diff --git a/src/renderer/src/views/components/propertyBox/flyLine.vue b/src/renderer/src/views/components/propertyBox/flyLine.vue index 9e94e7a..ee92e96 100644 --- a/src/renderer/src/views/components/propertyBox/flyLine.vue +++ b/src/renderer/src/views/components/propertyBox/flyLine.vue @@ -76,7 +76,7 @@ diff --git a/src/renderer/src/views/components/propertyBox/graph.vue b/src/renderer/src/views/components/propertyBox/graph.vue index 3250ebe..ceb33d7 100644 --- a/src/renderer/src/views/components/propertyBox/graph.vue +++ b/src/renderer/src/views/components/propertyBox/graph.vue @@ -179,6 +179,7 @@ - + diff --git a/src/renderer/src/views/components/propertyBox/polyhedronObject.vue b/src/renderer/src/views/components/propertyBox/polyhedronObject.vue index 8c13bbf..fd351ef 100644 --- a/src/renderer/src/views/components/propertyBox/polyhedronObject.vue +++ b/src/renderer/src/views/components/propertyBox/polyhedronObject.vue @@ -64,7 +64,7 @@
- + diff --git a/src/renderer/src/views/components/propertyBox/polylineObject.vue b/src/renderer/src/views/components/propertyBox/polylineObject.vue index 35616c9..038376b 100644 --- a/src/renderer/src/views/components/propertyBox/polylineObject.vue +++ b/src/renderer/src/views/components/propertyBox/polylineObject.vue @@ -75,8 +75,8 @@
缓冲宽度
- + m
@@ -111,13 +111,13 @@
-
-
- - - - - +
+ + + + + +
高度模式 @@ -176,12 +176,14 @@
-
- +
+
+ +
- - -
+
+ +
@@ -200,7 +202,7 @@ - + @@ -391,7 +393,7 @@ const open = async (id: any, type) => { const heightModeChange = (val) => { that.heightMode = heightMode.value // @ts-ignore - if(heightMode.value === 0 || heightMode.value === '0' || heightMode.value === 1 || heightMode.value === '1') { + if (heightMode.value === 0 || heightMode.value === '0' || heightMode.value === 1 || heightMode.value === '1') { entityOptions.value.extend = false } } @@ -433,8 +435,8 @@ const changeWordsName = (val) => { } const lineTypechange = () => { } -const lineExtendchange = (e)=>{ - if(e.target.checked) { +const lineExtendchange = (e) => { + if (e.target.checked) { heightMode.value = 2 } } @@ -562,4 +564,16 @@ defineExpose({ } } } + +.polyline.dialog-en { + ::v-deep>.content { + + .attribute-content-link .table .tr .td.operation button, + .attribute-content-vr .table .tr .td.operation button, + .attribute-content-rtmp .table .tr .td.operation button { + width: 76px !important; + flex: 0 0 76px !important; + } + } +} diff --git a/src/renderer/src/views/components/propertyBox/radarScan.vue b/src/renderer/src/views/components/propertyBox/radarScan.vue index ceecef7..a33713e 100644 --- a/src/renderer/src/views/components/propertyBox/radarScan.vue +++ b/src/renderer/src/views/components/propertyBox/radarScan.vue @@ -66,7 +66,7 @@ - + diff --git a/src/renderer/src/views/components/propertyBox/radarScanStereoscopic.vue b/src/renderer/src/views/components/propertyBox/radarScanStereoscopic.vue index c30b960..21551fd 100644 --- a/src/renderer/src/views/components/propertyBox/radarScanStereoscopic.vue +++ b/src/renderer/src/views/components/propertyBox/radarScanStereoscopic.vue @@ -82,7 +82,7 @@ - + diff --git a/src/renderer/src/views/components/propertyBox/richText.vue b/src/renderer/src/views/components/propertyBox/richText.vue index 4978f2b..f3d6d71 100644 --- a/src/renderer/src/views/components/propertyBox/richText.vue +++ b/src/renderer/src/views/components/propertyBox/richText.vue @@ -24,7 +24,7 @@ import { GisApi } from '@/api/gisApi' const props = defineProps({ }); -const host = window.location.host +const host = localStorage.getItem('ip') const visible = ref(false) const baseDialog:any = ref(null); const eventBus:any = inject("bus"); diff --git a/src/renderer/src/views/components/propertyBox/standText.vue b/src/renderer/src/views/components/propertyBox/standText.vue index a744a00..977e32f 100644 --- a/src/renderer/src/views/components/propertyBox/standText.vue +++ b/src/renderer/src/views/components/propertyBox/standText.vue @@ -39,7 +39,7 @@ - + diff --git a/src/renderer/src/views/components/propertyBox/terrain.vue b/src/renderer/src/views/components/propertyBox/terrain.vue index 1e4ec0b..15665a2 100644 --- a/src/renderer/src/views/components/propertyBox/terrain.vue +++ b/src/renderer/src/views/components/propertyBox/terrain.vue @@ -14,7 +14,7 @@ diff --git a/src/renderer/src/views/components/propertyBox/tileset.vue b/src/renderer/src/views/components/propertyBox/tileset.vue index 6e9cfb6..9d87d72 100644 --- a/src/renderer/src/views/components/propertyBox/tileset.vue +++ b/src/renderer/src/views/components/propertyBox/tileset.vue @@ -49,7 +49,7 @@ - + diff --git a/src/renderer/src/views/components/propertyBox/trajectoryMotion.vue b/src/renderer/src/views/components/propertyBox/trajectoryMotion.vue index 3f27958..96f2ff7 100644 --- a/src/renderer/src/views/components/propertyBox/trajectoryMotion.vue +++ b/src/renderer/src/views/components/propertyBox/trajectoryMotion.vue @@ -233,7 +233,7 @@ diff --git a/src/renderer/src/views/components/propertyBox/vector.vue b/src/renderer/src/views/components/propertyBox/vector.vue index b3e9f14..fb024fb 100644 --- a/src/renderer/src/views/components/propertyBox/vector.vue +++ b/src/renderer/src/views/components/propertyBox/vector.vue @@ -21,7 +21,7 @@ diff --git a/src/renderer/src/views/components/propertyBox/vectorAttr.vue b/src/renderer/src/views/components/propertyBox/vectorAttr.vue index 29227bb..fe19fc8 100644 --- a/src/renderer/src/views/components/propertyBox/vectorAttr.vue +++ b/src/renderer/src/views/components/propertyBox/vectorAttr.vue @@ -12,18 +12,18 @@
@@ -113,9 +113,10 @@ const maxPageNum: any = ref(0) const filterData: any = ref([]) const title = ref('') const closeCallback = () => { - entityOptions.value.originalOptions = structuredClone(originalOptions) - entityOptions.value.reset() - eventBus.emit('destroyComponent') + // entityOptions.value.originalOptions = structuredClone(originalOptions) + // console.log('entityOptions--------------', entityOptions.value) + // entityOptions.value.reset() + // eventBus.emit('destroyComponent') } const getKeys = () => { keyData.value = [] @@ -140,9 +141,8 @@ let features const open = async (id: any) => { // that = window.earth.entityMap.get(id) node = window.treeObj.getNodeByParam('id', id, null) - entityOptions.value.field = JSON.parse(node.params).field that = getThat(node) - console.log(node, that, entityOptions.field, 'yyyyyyyyyyyyyy') + entityOptions.value.field = that.field if (that.options.id === id) { features = that.geojson.features } else { @@ -157,7 +157,7 @@ const open = async (id: any) => { let spliceData = arrSplice(arr, pageSize.value) maxPageNum.value = spliceData.length tableData.value = spliceData[pageNum.value - 1] - title.value = node.sourceName + title.value = node.title || node.sourceName getKeys() originalOptions = structuredClone(that.options) entityOptions.value = that @@ -227,8 +227,8 @@ const getTableList = ({ page, limit }) => { tableData.value = spliceData[pageNum.value - 1] } const changeFieId = async (e) => { - console.log(e, 'eeeeeeeee') - let data = JSON.parse(node.params) + let fNode = window.treeObj.getNodeByParam('id', that.options.id, null) + let data = JSON.parse(fNode.params) data.field = e let params2 = { id: data.id, diff --git a/src/renderer/src/views/components/propertyBox/wallRealStereoscopic.vue b/src/renderer/src/views/components/propertyBox/wallRealStereoscopic.vue index aa2115a..ff52f13 100644 --- a/src/renderer/src/views/components/propertyBox/wallRealStereoscopic.vue +++ b/src/renderer/src/views/components/propertyBox/wallRealStereoscopic.vue @@ -98,7 +98,7 @@ - + diff --git a/src/renderer/src/views/components/propertyBox/wallStereoscopic.vue b/src/renderer/src/views/components/propertyBox/wallStereoscopic.vue index 8017a7f..f6b9098 100644 --- a/src/renderer/src/views/components/propertyBox/wallStereoscopic.vue +++ b/src/renderer/src/views/components/propertyBox/wallStereoscopic.vue @@ -31,12 +31,16 @@ 材质样式
- + {{ item.name }}
@@ -99,25 +103,25 @@ const material = ref([ name: '纯色墙', value: '纯色墙', key: 0, - icon: 'icon-wall' + icon: '../sdk/custom/img/icon-wall.png', }, { name: '上升墙', value: '上升墙', key: 1, - icon: 'icon-wall-gradient' + icon: '../sdk/custom/img/icon-wall-gradient.png' }, { name: '箭头墙', value: '箭头墙', key: 2, - icon: 'icon-wall-arrow' + icon: '../sdk/img/material/arrow.png' }, { name: '警戒墙', value: '警戒墙', key: 3, - icon: 'icon-wall-warn' + icon: '../sdk/img/material/warn.png' } ]) eventBus.on("openStandTextAdd", () => { diff --git a/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts b/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts index 3f8e516..09f398e 100644 --- a/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts +++ b/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts @@ -98,6 +98,7 @@ export const useRightOperate = () => { params.params = JSON.stringify(params.params) cusAddNodes(window.treeObj, params.parentId, [params]) let entityObject = renderVector(params, true); + entityObject.flyTo(); (window as any)._entityMap.set(id, entityObject) } else if (["geojson"].includes(sourceType)) { let baseURL = localStorage.getItem('ip') @@ -113,6 +114,8 @@ export const useRightOperate = () => { width: 1, color: "rgb(239, 6, 6, 1)", } + }, (entity:any) => { + entity?.flyTo() }) } else { // 获取最后一个点的位置 @@ -683,7 +686,9 @@ export const useRightOperate = () => { }) for (let i = 0; i < res.data.length; i++) { let item = res.data[i] - initMapData(type, JSON.parse(item.params), null) + initMapData(type, JSON.parse(item.params), (entity: any) => { + entity.flyTo() + }) } cusAddNodes(window.treeObj, parentId, res.data) } diff --git a/src/renderer/src/views/components/tree/hooks/treeNode.ts b/src/renderer/src/views/components/tree/hooks/treeNode.ts index bb33d8a..9d525d4 100644 --- a/src/renderer/src/views/components/tree/hooks/treeNode.ts +++ b/src/renderer/src/views/components/tree/hooks/treeNode.ts @@ -595,6 +595,7 @@ export const useTreeNode = () => { node.sourceName = sourceName; node.oldname = sourceName; node.params = params; + delete node.title window.treeObj.updateNode(node); } diff --git a/src/renderer/src/views/login/index.vue b/src/renderer/src/views/login/index.vue index 0443a65..df00208 100644 --- a/src/renderer/src/views/login/index.vue +++ b/src/renderer/src/views/login/index.vue @@ -1,13 +1,7 @@