This commit is contained in:
zyl
2025-12-04 09:31:33 +08:00
71 changed files with 1078 additions and 633 deletions

View File

@ -1,4 +1,4 @@
import { app, shell, BrowserWindow, ipcMain, globalShortcut, dialog } from 'electron' import { app, shell, BrowserWindow, ipcMain, globalShortcut, dialog, session } from 'electron'
import path, { join } from 'path' import path, { join } from 'path'
import { electronApp, optimizer, is } from '@electron-toolkit/utils' import { electronApp, optimizer, is } from '@electron-toolkit/utils'
import icon from '../../resources/earth.png?asset' import icon from '../../resources/earth.png?asset'
@ -82,6 +82,7 @@ let mainWindow;
let isSeverInit = false let isSeverInit = false
let isAppInit = false let isAppInit = false
let severError:any = undefined
function createWindow(): void { function createWindow(): void {
// Create the browser window. // Create the browser window.
@ -128,6 +129,19 @@ function createWindow(): void {
allowRunningInsecureContent: true allowRunningInsecureContent: true
} }
}) })
mainWindow.webContents.on('before-input-event', (event, input) => {
// 条件:仅按了 Alt 键(无其他键组合、不是组合键、不是重复按键)
if (
input.key === 'Alt' && // 按键是 Alt
!input.ctrl && // 未按 Ctrl
!input.shift && // 未按 Shift
!input.meta && // 未按 MetaWin/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') 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 ymlBatPath = process.platform === 'win32' ? ymlBatPath.replace(/^(\w:)/, '/$1') : ymlBatPath
let ymlPath = ymlBatPath.substring(1, 200) let ymlPath = ymlBatPath.substring(1, 200)
@ -159,7 +173,7 @@ function createWindow(): void {
ipcMain.on('splash-completed', () => { ipcMain.on('splash-completed', () => {
// 启动页进度条已完成,可以关闭启动页并显示主窗口 // 启动页进度条已完成,可以关闭启动页并显示主窗口
if (isSeverInit) { if (isSeverInit) {
mainWindow.webContents.send('program-init') mainWindow.webContents.send('program-init', severError)
} }
isAppInit = true isAppInit = true
setTimeout(() => { setTimeout(() => {
@ -376,21 +390,103 @@ function createWindow(): void {
let _winMap = new Map(); let _winMap = new Map();
// 监听渲染进程创建新窗口的请求 // 监听渲染进程创建新窗口的请求
function createTempSession() {
// 生成唯一会话名称(避免冲突)
const sessionName = `temp-session-${Date.now()}-${Math.random().toString(36).slice(2)}`;
// 创建独立会话(基于默认分区,但命名唯一)
const tempSession = session.fromPartition(sessionName, {
cache: true, // 允许缓存,但会话独立
persistent: false // 非持久化,关闭后自动清理
});
// 清空会话初始缓存(确保无残留)
tempSession.clearStorageData({
storages: [
'appcache', 'cookies', 'localstorage', 'sessionstorage',
'indexdb', 'cachestorage', 'websql'
]
}).catch(err => console.error('清空临时会话缓存失败:', err));
return tempSession;
}
// @ts-ignore // @ts-ignore
ipcMain.handle('create-new-window', async (event, params, url, option, id) => { ipcMain.handle('create-new-window', async (event, params, url, option, id) => {
// try {
// console.log('create-new-window', params, url, option, id)
// const newWindow = await new BrowserWindow(params)
// if (url) {
// await newWindow.loadURL(url)
// await newWindow.webContents.send("data", option)
// newWindow.on('closed', () => {
// _winMap.delete(id);
// // a.delete(newWindow.id)
// // closeCB(newWindow.id)
// });
// }
// _winMap.set(id, newWindow.id);
// return _winMap
// } catch (error) {
// console.error('创建窗口失败:', error);
// throw error; // 抛出错误以便渲染进程捕获
// }
try { try {
const newWindow = await new BrowserWindow(params)
// 1. 创建独立临时会话
const tempSession = createTempSession();
// 2. 合并窗口配置:注入独立会话
const windowConfig = {
...params,
webPreferences: {
...params.webPreferences,
session: tempSession, // 关键:使用独立会话
nodeIntegration: true,
contextIsolation: false,
devTools: true,
webSecurity: false,
allowRunningInsecureContent: true
}
};
// 3. 创建新窗口
const newWindow = new BrowserWindow(windowConfig);
// 4. 加载URL并发送初始化数据
if (url) { if (url) {
await newWindow.loadURL(url) await newWindow.loadURL(url);
await newWindow.webContents.send("data", option) await newWindow.webContents.send("data", option);
newWindow.on('closed', () => {
_winMap.delete(id);
// a.delete(newWindow.id)
// closeCB(newWindow.id)
});
} }
// 5. 窗口关闭时清理会话和映射
newWindow.on('closed', async () => {
_winMap.delete(id);
// 清空会话缓存并销毁
await tempSession.clearStorageData({
storages: ['all'] // 清空所有存储
});
// 解除会话引用触发GC
tempSession.clearCache();
session.removePartition(tempSession.getPartition());
});
// 6. 记录窗口映射
newWindow.webContents.on('before-input-event', (event, input) => {
// 条件:仅按了 Alt 键(无其他键组合、不是组合键、不是重复按键)
if (
input.key === 'Alt' && // 按键是 Alt
!input.control && // 未按 Ctrl
!input.shift && // 未按 Shift
!input.meta && // 未按 MetaWin/Mac
!input.isComposing && // 非输入法组合态
input.type === 'keyDown' // 仅拦截按下事件
) {
event.preventDefault(); // 阻止 Alt 键的默认行为(激活菜单)
}
});
_winMap.set(id, newWindow.id); _winMap.set(id, newWindow.id);
return _winMap
return _winMap;
} catch (error) { } catch (error) {
console.error('创建窗口失败:', error); console.error('创建窗口失败:', error);
throw error; // 抛出错误以便渲染进程捕获 throw error; // 抛出错误以便渲染进程捕获
@ -594,18 +690,30 @@ if (!gotTheLock) {
let string = data.toString().trim() let string = data.toString().trim()
// console.log(`批处理输出: ${string}`); // console.log(`批处理输出: ${string}`);
// 临时处理:应用启动失败或项目文档地址出现时,认为服务初始化完成;后续需后端配合 // 临时处理:应用启动失败或项目文档地址出现时,认为服务初始化完成;后续需后端配合
if (string.indexOf('APPLICATION FAILED TO START') !== -1 || string.indexOf('项目文档地址') !== -1) { if (string.indexOf('APPLICATION FAILED TO START') !== -1) {
severError = '后端服务未正常启动,尝试更换地址或端口'
if (!isSeverInit) { if (!isSeverInit) {
isSeverInit = true isSeverInit = true
if (isAppInit) { if (isAppInit) {
mainWindow.webContents.send('program-init') mainWindow.webContents.send('program-init', severError)
}
}
}
else if (string.indexOf('项目文档地址') !== -1) {
if (!isSeverInit) {
isSeverInit = true
if (isAppInit) {
mainWindow.webContents.send('program-init', false)
} }
} }
} }
}); });
ipcMain.on('judgment-isSeverInit', (event) => { ipcMain.on('judgment-isSeverInit', (event) => {
event.returnValue = isSeverInit event.returnValue = {
isSeverInit: isSeverInit,
severError: severError
}
}) })
// 监听错误输出stderr // 监听错误输出stderr

File diff suppressed because one or more lines are too long

View File

@ -55,6 +55,7 @@
.cesium-viewer-cesiumWidgetContainer { .cesium-viewer-cesiumWidgetContainer {
position: relative; position: relative;
overflow: hidden;
} }
.cesium-viewer-cesiumWidgetContainer .cesium-widget:nth-of-type(1) { .cesium-viewer-cesiumWidgetContainer .cesium-widget:nth-of-type(1) {
@ -178,6 +179,7 @@
color: rgba(var(--color-base1), 1) !important; color: rgba(var(--color-base1), 1) !important;
cursor: pointer; cursor: pointer;
} }
.YJ-custom-base-dialog button:not(button[disabled]):hover svg { .YJ-custom-base-dialog button:not(button[disabled]):hover svg {
fill: rgba(var(--color-base1), 1) !important; fill: rgba(var(--color-base1), 1) !important;
} }
@ -341,7 +343,7 @@
.YJ-custom-base-dialog>.content input, .YJ-custom-base-dialog>.content input,
.YJ-custom-base-dialog>.content textarea { .YJ-custom-base-dialog>.content textarea {
font-size: 16px; font-size: 14px;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(var(--color-base1), 0.5); border: 1px solid rgba(var(--color-base1), 0.5);
border-radius: 5px; border-radius: 5px;
@ -2534,8 +2536,8 @@
.YJ-custom-base-dialog.polygon>.content .attribute-content-vr .table .tr .td:nth-child(3), .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 .th:nth-child(3),
.YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { .YJ-custom-base-dialog.polygon>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
flex: 0 0 165px; flex: 0 0 175px;
width: 165px; width: 175px;
justify-content: center; justify-content: center;
} }
@ -2618,8 +2620,8 @@
.YJ-custom-base-dialog.assemble>.content .attribute-content-vr .table .tr .td:nth-child(3), .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 .th:nth-child(3),
.YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { .YJ-custom-base-dialog.assemble>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
flex: 0 0 165px; flex: 0 0 175px;
width: 165px; width: 175px;
justify-content: center; justify-content: center;
} }
@ -2678,8 +2680,8 @@
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-vr .table .tr .td:nth-child(3), .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 .th:nth-child(3),
.YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) { .YJ-custom-base-dialog.pincerArrow>.content .attribute-content-rtmp .table .tr .td:nth-child(3) {
flex: 0 0 165px; flex: 0 0 175px;
width: 165px; width: 175px;
justify-content: center; justify-content: center;
} }
@ -2761,7 +2763,7 @@
/* 折线 */ /* 折线 */
.YJ-custom-base-dialog.polyline>.content { .YJ-custom-base-dialog.polyline>.content {
width: 580px; width: 600px;
} }
.YJ-custom-base-dialog.polyline>.content>div #dashTextureDom { .YJ-custom-base-dialog.polyline>.content>div #dashTextureDom {
@ -3796,7 +3798,7 @@
.yj-custom-icon { .yj-custom-icon {
display: inline-block; display: inline-block;
width: 22px; width: 22px;
height: 10px; height: 18px;
margin-right: 5px; margin-right: 5px;
} }

View File

@ -80,16 +80,16 @@ window.newFuzzySearch = function (
hideAllNode(allNodes) hideAllNode(allNodes)
nodeChildren.forEach((item) => { nodeChildren.forEach((item) => {
if (item.oldname) { if (item.oldname) {
item.sourceName = item.oldname item.sourceName = item.oldname + ''
zTreeObj.updateNode(item) zTreeObj.updateNode(item)
} }
if (contrast) { if (contrast) {
if ((item.sourceName || '').indexOf(contrast) > -1) { if (((item.sourceName || '')+'').indexOf(contrast) > -1) {
console.log('sourceName包含关键字') console.log('sourceName包含关键字')
console.log(item) console.log(item)
console.log(item.sourceName) console.log(item.sourceName)
item.oldname = item.sourceName item.oldname = item.sourceName + ''
item.highlight = true item.highlight = true
let F = new RegExp(contrast, 'gi') let F = new RegExp(contrast, 'gi')
item.sourceName = item.oldname.replace(F, function (h) { item.sourceName = item.oldname.replace(F, function (h) {

View File

@ -263,6 +263,8 @@ export default {
rtmp: 'rtmp', rtmp: 'rtmp',
: '物资', : '物资',
: '编辑内容', : '编辑内容',
: '请输入设备名称进行搜索',
: '请输入物资名称进行搜索',
: '打开文本编辑器', : '打开文本编辑器',
: '添加链接', : '添加链接',
: '名称', : '名称',

View File

@ -47,16 +47,16 @@ export default {
excel: 'Excel' excel: 'Excel'
}, },
firstMenu: { firstMenu: {
measure: 'measure', measure: 'Measure',
tool: 'tool', tool: 'Tool',
effect: 'effect', effect: 'Special effects',
bigData: 'bigData', bigData: 'bigData',
modelLibrary: 'modelLibrary', modelLibrary: 'Model',
situation: 'situationLibrary', situation: 'Scheme',
onlinePictureSource: 'onlinePictureSource', onlinePictureSource: 'onlinePictureSource',
analysis: 'analysis', analysis: 'Analyze',
militaryMark: 'militaryMark', militaryMark: 'militaryMark',
ersanwei: 'two and three-dimensional', ersanwei: '2D/3D',
junbiao3d: '3D military logo' junbiao3d: '3D military logo'
}, },
effect: { effect: {
@ -155,7 +155,8 @@ export default {
authorize: 'Authorization Information', authorize: 'Authorization Information',
setting: 'System settings', setting: 'System settings',
project: 'Engineering Information', project: 'Engineering Information',
device: 'device management', device: 'Device management',
materials: 'Materials management',
modelManage: 'Model management', modelManage: 'Model management',
graphLabelManage: 'Military Icon Management', graphLabelManage: 'Military Icon Management',
photoManage: 'Icon Management', photoManage: 'Icon Management',
@ -262,6 +263,8 @@ export default {
rtmp: 'rtmp', rtmp: 'rtmp',
: 'Materials', : 'Materials',
: 'Edit content', : 'Edit content',
: 'Please enter the device name to search',
: 'Please enter the materials name to search',
: 'Open the editor', : 'Open the editor',
: 'Add Link', : 'Add Link',
: 'Name', : 'Name',

View File

@ -155,6 +155,7 @@ export default {
setting: '系統設置', setting: '系統設置',
project: '工程管理', project: '工程管理',
device: '設備管理', device: '設備管理',
materials: '物資管理',
modelManage: '模型管理', modelManage: '模型管理',
graphLabelManage: '軍標管理', graphLabelManage: '軍標管理',
photoManage: '圖標管理', photoManage: '圖標管理',
@ -261,6 +262,8 @@ export default {
rtmp: 'rtmp', rtmp: 'rtmp',
: '物資', : '物資',
: '編輯內容', : '編輯內容',
: '請輸入設備名稱進行搜索',
: '請輸入物資名稱進行搜索',
: '打開文本編輯器', : '打開文本編輯器',
: '添加鏈接', : '添加鏈接',
: '名稱', : '名稱',

View File

@ -27,6 +27,7 @@ export const TreeApi = {
url: `/source/addOtherSource`, url: `/source/addOtherSource`,
data data
}).then((res) => { }).then((res) => {
ElMessage.closeAll()
ElMessage({ ElMessage({
message: '添加成功', message: '添加成功',
type: 'success' type: 'success'
@ -50,6 +51,7 @@ export const TreeApi = {
url: `/source/update`, url: `/source/update`,
data data
}).then((res) => { }).then((res) => {
ElMessage.closeAll()
ElMessage({ ElMessage({
message: '操作成功', message: '操作成功',
type: 'success' type: 'success'

View File

@ -654,6 +654,10 @@ img {
} }
} }
.jedate {
color: #000;
}
.custom-slider-tooltip { .custom-slider-tooltip {
display: block !important; display: block !important;
opacity: 1 !important; opacity: 1 !important;

View File

@ -44,12 +44,12 @@ service.interceptors.request.use(
const key = getRequestKey(config) const key = getRequestKey(config)
// 检查是否有相同请求正在进行 // 检查是否有相同请求正在进行
if (pendingRequests.has(key)) { // if (pendingRequests.has(key)) {
ElMessage({ // ElMessage({
message: '当前请求已存在,请稍后再试', // message: '当前请求已存在,请稍后再试',
type: 'warning' // type: 'warning'
}) // })
} // }
const controller = new AbortController() const controller = new AbortController()
config.signal = controller.signal config.signal = controller.signal

View File

@ -1,13 +1,13 @@
import {TreeApi} from '@/api/tree' import { TreeApi } from '@/api/tree'
import {useTreeNode} from '../views/components/tree/hooks/treeNode' import { useTreeNode } from '../views/components/tree/hooks/treeNode'
import {initMapData} from './initMapData' import { initMapData } from './initMapData'
export const addMapSource = async ({type, id, sourceName = '未命名对象', opt = {}}) => { export const addMapSource = async ({ type, id, sourceName = '未命名对象', opt = {} }, cd:any = null) => {
const {cusAddNodes} = useTreeNode() const { cusAddNodes } = useTreeNode()
if (!id) { if (!id) {
id = new YJ.Tools().randomString() 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 selectedNodes = window.treeObj.getSelectedNodes()
let node = selectedNodes && selectedNodes[selectedNodes.length - 1] let node = selectedNodes && selectedNodes[selectedNodes.length - 1]
function getParentId(nd: any) { function getParentId(nd: any) {
@ -15,7 +15,7 @@ export const addMapSource = async ({type, id, sourceName = '未命名对象', op
return nd.id return nd.id
} else { } else {
let parentNode = window.treeObj.getNodeByParam("id", nd.parentId, null); let parentNode = window.treeObj.getNodeByParam("id", nd.parentId, null);
if(parentNode) { if (parentNode) {
return getParentId(parentNode) return getParentId(parentNode)
} }
else { else {
@ -28,7 +28,7 @@ export const addMapSource = async ({type, id, sourceName = '未命名对象', op
parentId = getParentId(node) parentId = getParentId(node)
} }
delete options.host delete options.host
if(options.attribute && options.attribute.rtmp) { if (options.attribute && options.attribute.rtmp) {
delete options.attribute.rtmp delete options.attribute.rtmp
} }
switch (type) { switch (type) {

View File

@ -20,6 +20,7 @@ export const initMapData = async (type, data, cd) => {
case 'vrImage': case 'vrImage':
console.log(data, 'dataccccc') console.log(data, 'dataccccc')
entityObject = new YJ.Obj.BillboardObject(window.earth, data) entityObject = new YJ.Obj.BillboardObject(window.earth, data)
cd && cd(entityObject)
console.log('entityObject', entityObject) console.log('entityObject', entityObject)
// entityObject.options.billboard.defaultImage = '' // entityObject.options.billboard.defaultImage = ''
break break
@ -62,11 +63,12 @@ export const initMapData = async (type, data, cd) => {
case 'terrain': case 'terrain':
data.host = baseURL data.host = baseURL
entityObject = new YJ.Obj.Terrain(window.earth, data) entityObject = new YJ.Obj.Terrain(window.earth, data)
cd && cd(entityObject)
break break
case 'layer': case 'layer':
data.host = baseURL data.host = baseURL
console.log('layer', data)
entityObject = new YJ.Obj.Layer(window.earth, data) entityObject = new YJ.Obj.Layer(window.earth, data)
cd && cd(entityObject)
break break
case 'gdslImagery': case 'gdslImagery':
data.host = baseURL data.host = baseURL
@ -177,11 +179,14 @@ export const initMapData = async (type, data, cd) => {
break break
case 'geojson': case 'geojson':
entityObject = new YJ.Obj.GeoJson(window.earth, data) entityObject = new YJ.Obj.GeoJson(window.earth, data)
entityObject.on() entityObject.on().then(()=>{
cd && cd(entityObject)
})
break break
case 'vector': case 'vector':
let node = window.treeObj.getNodeByParam("id", data.id, null); let node = window.treeObj.getNodeByParam("id", data.id, null);
entityObject = renderVector(node, false) entityObject = renderVector(node, false)
cd && cd(entityObject)
break break
default: default:
break break

View File

@ -201,8 +201,8 @@ const moveDiv = () => {
newLeft = windowWidth - oMoveDivWidth newLeft = windowWidth - oMoveDivWidth
} }
if (newTop <= 0) { if (newTop <= 97) {
newTop = 0 newTop = 97
} else if (newTop + oMoveDivHeight > windowHeight) { } else if (newTop + oMoveDivHeight > windowHeight) {
newTop = windowHeight - oMoveDivHeight newTop = windowHeight - oMoveDivHeight
} }

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -26,14 +26,17 @@
<span class="fankuai"></span> <span class="fankuai"></span>
{{ t('auths.authCode') }} {{ t('auths.authCode') }}
</div> </div>
<div <div class="auth_info_text">
class="auth_info_text" <span @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">{{
@click="copy(authInfo.license_code)" authInfo.license_code || ''
style="cursor: pointer" }}</span>
title="点击可复制" <svg-icon
> name="copy"
{{ authInfo.license_code || '' }} @click="copy(authInfo.license_code)"
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon> title="点击可复制"
:size="20"
style="margin-left: 30px; cursor: pointer"
></svg-icon>
</div> </div>
</div> </div>
<div class="auth_info_box"> <div class="auth_info_box">
@ -522,8 +525,11 @@ const copy = async (text) => {
::v-deep .el-message-box { ::v-deep .el-message-box {
--el-messagebox-title-color: #fff !important; --el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important; --el-messagebox-content-color: #fff !important;
background: background: linear-gradient(
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%), 180deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.2) 100%
),
rgba(0, 0, 0, 0.6) !important; rgba(0, 0, 0, 0.6) !important;
} }
@ -732,8 +738,11 @@ const copy = async (text) => {
.el-message-box { .el-message-box {
--el-messagebox-title-color: #fff !important; --el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important; --el-messagebox-content-color: #fff !important;
background: background: linear-gradient(
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%), 180deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.2) 100%
),
rgba(0, 0, 0, 0.6) !important; rgba(0, 0, 0, 0.6) !important;
.el-message-box__btns { .el-message-box__btns {

View File

@ -2,22 +2,25 @@
<div class="bottomMenuBox zIndex9" ref="bottomMenuBox"> <div class="bottomMenuBox zIndex9" ref="bottomMenuBox">
<div class="animate__animated bottomMenu"> <div class="animate__animated bottomMenu">
<div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i"> <div class="bottom_box" v-for="(item, i) of bottomMenuList" :key="i">
<div class="bottom_box_content" @click="addMarker(item, $event)" :title="t('bottomMenu.' + item.sourceType)"> <div class="bottom_box_content" @click="addMarker(item, $event)">
<svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <el-tooltip :content="t('bottomMenu.' + item.sourceType)" effect="customized" placement="top" :hide-after="0">
width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none" <svg class="bottom_box_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
preserveAspectRatio="none"> width="117.030029296875" height="44" viewBox="0 0 117.030029296875 44" fill="none"
<path fill="#000000" fill-opacity="0.5" preserveAspectRatio="none">
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08" /> <path fill="#000000" fill-opacity="0.5"
<path fill-rule="evenodd" fill="url(#linear_border_2442_315_0)" d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08" />
d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08ZM108.931 1.5L115.434 12.3353L108.583 42.5L8.04583 42.5L1.59311 31.3291L8.37717 1.5L108.931 1.5Z" /> <path fill-rule="evenodd" fill="url(#linear_border_2442_315_0)"
<defs> d="M117.03 12.08L109.78 44L7.18002 44L1.52588e-05 31.57L7.18002 0L109.78 0L117.03 12.08ZM108.931 1.5L115.434 12.3353L108.583 42.5L8.04583 42.5L1.59311 31.3291L8.37717 1.5L108.931 1.5Z" />
<linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125" <defs>
x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse"> <linearGradient id="linear_border_2442_315_0" x1="117.030029296875" y1="-1.7520751953125"
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /> x2="15.7401123046875" y2="40.47381591796875" gradientUnits="userSpaceOnUse">
<stop offset="1" stop-color="var(--color-border1)" /> <stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
</linearGradient> <stop offset="1" stop-color="var(--color-border1)" />
</defs> </linearGradient>
</svg> </defs>
</svg>
</el-tooltip>
<svg class="bottom_box_bg bottom_box_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg" <svg class="bottom_box_bg bottom_box_bg_hover" style="opacity: 0;" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45" xmlns:xlink="http://www.w3.org/1999/xlink" width="118.09130859375" height="45"
viewBox="0 0 118.09130859375 45" fill="none" preserveAspectRatio="none"> viewBox="0 0 118.09130859375 45" fill="none" preserveAspectRatio="none">
@ -39,16 +42,16 @@
</div> </div>
</div> </div>
<div class="bottom_children" v-if="item.children" v-show="item.childrenShow"> <div class="bottom_children" v-if="item.children" v-show="item.childrenShow">
<div class="bottom_childre_box" v-for="(item2, m) of item.children" :key="m" <div class="bottom_childre_box" v-for="(item2, m) of item.children" :key="m" @click="addMarker(item2, $event)">
@click="addMarker(item2, $event)" :title="t('bottomMenu.' + item2.sourceType)"> <el-tooltip :content="t('bottomMenu.' + item2.sourceType)" effect="customized" placement="top" :hide-after="0">
<svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg" <svg class="bottom_childre_box_bg" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5" fill="none" xmlns:xlink="http://www.w3.org/1999/xlink" width="6vw" height="44.5" viewBox="0 0 119 35.5" fill="none"
preserveAspectRatio="none"> preserveAspectRatio="none">
<path d="M11 0.5L108 0.5L118 35.5L1 35.5L11 0.5Z" stroke="url(#linear_border_2485_3)" stroke-width="1" <path d="M11 0.5L108 0.5L118 35.5L1 35.5L11 0.5Z" stroke="url(#linear_border_2485_3)" stroke-width="1"
fill="#000000" fill-opacity="0.5" /> fill="#000000" fill-opacity="0.5" />
<path d="M118 34.5L1 34.5L0 36.5L119 36.5L118 34.5Z" fill-rule="evenodd" <path d="M118 34.5L1 34.5L0 36.5L119 36.5L118 34.5Z" fill-rule="evenodd" fill="url(#linear_fill_2485_4)" />
fill="url(#linear_fill_2485_4)" />
</svg> </svg>
</el-tooltip>
<svg class="bottom_childre_box_bg bottom_childre_box_bg_hover" style="opacity: 0;" <svg class="bottom_childre_box_bg bottom_childre_box_bg_hover" style="opacity: 0;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118.32568359375" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="118.32568359375"
height="36" viewBox="0 0 118.32568359375 36" fill="none" preserveAspectRatio="none"> height="36" viewBox="0 0 118.32568359375 36" fill="none" preserveAspectRatio="none">
@ -195,28 +198,28 @@ const bottomMenuList = ref([
let id = new YJ.Tools().randomString() let id = new YJ.Tools().randomString()
let name = t(`default.point`) let name = t(`default.point`)
let defaultStyle = (JSON.parse(localStorage.getItem('defaultStyle') || '{}').point) || {} let defaultStyle = (JSON.parse(localStorage.getItem('defaultStyle') || '{}').point) || {}
if(!defaultStyle) { if (!defaultStyle) {
defaultStyle = {} defaultStyle = {}
} }
if(!defaultStyle.billboard) { if (!defaultStyle.billboard) {
defaultStyle.billboard = {} defaultStyle.billboard = {}
} }
if(!defaultStyle.label) { if (!defaultStyle.label) {
defaultStyle.label = {} defaultStyle.label = {}
} }
if(defaultStyle.billboard.image) { if (defaultStyle.billboard.image) {
try { try {
let urlObject = new URL(defaultStyle.billboardimage) let urlObject = new URL(defaultStyle.billboardimage)
let pathname = urlObject.pathname let pathname = urlObject.pathname
let folderName = pathname.split('/')[1] let folderName = pathname.split('/')[1]
if(folderName === 'iconLibrary') { if (folderName === 'iconLibrary') {
let ip = localStorage.getItem('ip') || '' let ip = localStorage.getItem('ip') || ''
let ipObject = new URL(ip) let ipObject = new URL(ip)
urlObject.port = ipObject.port urlObject.port = ipObject.port
defaultStyle.billboard.image = urlObject.href defaultStyle.billboard.image = urlObject.href
} }
else { else {
urlObject.port = availablePort.value+'' urlObject.port = availablePort.value + ''
defaultStyle.billboard.image = urlObject.href defaultStyle.billboard.image = urlObject.href
} }
} catch (error) { } catch (error) {
@ -233,7 +236,7 @@ const bottomMenuList = ref([
billboard: { billboard: {
show: defaultStyle.billboard.show || true, show: defaultStyle.billboard.show || true,
image: image:
defaultStyle.billboard.image || "http://localhost:" + defaultStyle.billboard.image || "http://localhost:" +
availablePort.value + availablePort.value +
"/" + "/" +
"GEMarker1/A-ablu-blank.png", "GEMarker1/A-ablu-blank.png",
@ -659,6 +662,14 @@ document.addEventListener('click', (e: any) => {
height: 44px; height: 44px;
bottom: 1em; bottom: 1em;
left: 13vw; left: 13vw;
:deep(.el-tooltip__trigger) {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
pointer-events: all;
}
} }
.bottomMenu { .bottomMenu {

View File

@ -5,14 +5,17 @@
<span class="fankuai"></span> <span class="fankuai"></span>
{{ t('auths.authCode') }} {{ t('auths.authCode') }}
</div> </div>
<div <div class="auth_info_text">
class="auth_info_text" <span @click="copy(authInfo.license_code)" title="点击可复制" style="cursor: pointer">{{
@click="copy(authInfo.license_code)" authInfo.license_code || ''
style="cursor: pointer" }}</span>
title="点击可复制" <svg-icon
> name="copy"
{{ authInfo.license_code || '' }} @click="copy(authInfo.license_code)"
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon> title="点击可复制"
:size="20"
style="margin-left: 30px; cursor: pointer"
></svg-icon>
</div> </div>
</div> </div>
<div class="auth_info_box"> <div class="auth_info_box">
@ -113,7 +116,6 @@ const getStatus = () => {
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, '码')
} }
getAuthInfo() getAuthInfo()
getAuthCode() getAuthCode()
@ -122,10 +124,8 @@ getAuthCode()
const copy = async (text) => { const copy = async (text) => {
try { try {
await toClipboard(text) await toClipboard(text)
console.log('复制成功')
ElMessage.success('复制成功') ElMessage.success('复制成功')
} catch (e) { } catch (e) {
console.error('复制失败', e)
ElMessage.error('复制失败') ElMessage.error('复制失败')
} }
} }

View File

@ -79,7 +79,7 @@
<template #icon> <template #icon>
<svg-icon name="POI" /> <svg-icon name="POI" />
</template> </template>
<span>POI导入</span> <span>POIL导入</span>
</el-button> </el-button>
</div> </div>
<div class="fileList" v-if="poiList.length"> <div class="fileList" v-if="poiList.length">

View File

@ -2,17 +2,6 @@
<div class="model-management-container"> <div class="model-management-container">
<div class="equipment_title" style="margin-bottom: 10px"> <div class="equipment_title" style="margin-bottom: 10px">
<div> <div>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择军标库</span>
</el-button>
<el-button <el-button
color="#004b4b" color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)" style="border: 1px solid rgba(var(--color-base1), 0.5)"
@ -23,6 +12,16 @@
</template> </template>
<span>创建军标库</span> <span>创建军标库</span>
</el-button> </el-button>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择军标库</span>
</el-button>
</div> </div>
<el-input <el-input

View File

@ -2,17 +2,6 @@
<div class="model-management-container"> <div class="model-management-container">
<div class="equipment_title" style="margin-bottom: 10px"> <div class="equipment_title" style="margin-bottom: 10px">
<div> <div>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择图标库</span>
</el-button>
<el-button <el-button
color="#004b4b" color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)" style="border: 1px solid rgba(var(--color-base1), 0.5)"
@ -23,6 +12,16 @@
</template> </template>
<span>创建图标库</span> <span>创建图标库</span>
</el-button> </el-button>
<el-button
color="#004b4b"
style="border: 1px solid rgba(var(--color-base1), 0.5)"
@click="importModelDB"
>
<template #icon>
<svg-icon name="select" />
</template>
<span>选择图标库</span>
</el-button>
</div> </div>
<el-input <el-input
v-model="photoName" v-model="photoName"

View File

@ -658,7 +658,7 @@ const intoBack = async () => {
let _winMap = await ipcRenderer.invoke('get-_winMap') let _winMap = await ipcRenderer.invoke('get-_winMap')
if (!_winMap.has(id)) { if (!_winMap.has(id)) {
try { try {
const windowId = await ipcRenderer.invoke( let windowId = await ipcRenderer.invoke(
'create-new-window', 'create-new-window',
{ {
title: '后台管理', title: '后台管理',
@ -683,10 +683,11 @@ const intoBack = async () => {
devTools: true devTools: true
} }
}, },
`http://localhost:${availablePort}/backManage/index.html#/login`, `http://localhost:${availablePort}/backManage/index.html#/login?timestamp=${Date.now()}`,
{}, {},
id id
) )
console.log('windowId', windowId, id)
} catch (error) { } catch (error) {
console.error('创建窗口失败:', error) console.error('创建窗口失败:', error)
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="set_pup"> <div class="set_pup" :class="{'dialog-en': isEN}">
<el-dialog <el-dialog
v-model="isShowPup" v-model="isShowPup"
:modal="true" :modal="true"
@ -135,10 +135,11 @@ import photoManage from './components/photoManage.vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
const { t } = useI18n() const { t, locale } = useI18n()
const tabPosition = ref('left') const tabPosition = ref('left')
const activeName = ref('authorize') const activeName = ref('authorize')
const isShowPup = ref(false) const isShowPup = ref(false)
const isEN = ref(false)
const open = (data) => { const open = (data) => {
isShowPup.value = true isShowPup.value = true
if (data !== 'current') { if (data !== 'current') {
@ -163,6 +164,25 @@ const close = () => {
isShowPup.value = false isShowPup.value = false
} }
onMounted(() => {
// 可以在这里添加初始化逻辑
if(locale.value === 'zh-EN') {
isEN.value = true
}
else {
isEN.value = false
}
})
watch(locale, ()=>{
if(locale.value === 'zh-EN') {
isEN.value = true
}
else {
isEN.value = false
}
})
defineExpose({ defineExpose({
open, open,
close close
@ -182,6 +202,7 @@ defineExpose({
), ),
rgba(0, 0, 0, 0.6); rgba(0, 0, 0, 0.6);
border: 1px solid var(--color-border1); border: 1px solid var(--color-border1);
padding-left: 0px;
// padding-left: 0 !important; // padding-left: 0 !important;
} }
@ -308,14 +329,18 @@ defineExpose({
:deep(.el-tabs__item) { :deep(.el-tabs__item) {
width: 8vw; width: 8vw;
color: #fff !important; color: #fff !important;
font-size: 1.1rem; font-size: 0.9rem;
font-family: 黑体; font-family: SourceHanSansTi;
font-weight: 500; font-weight: 500;
display: flex; line-height: 38px;
display: block;
align-items: center; align-items: center;
justify-content: center; text-align: center;
margin-bottom: 3px; margin-bottom: 3px;
box-sizing: border-box; box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
:deep(.el-tabs__item:hover) { :deep(.el-tabs__item:hover) {
@ -366,4 +391,10 @@ defineExpose({
} }
} }
} }
.set_pup.dialog-en {
:deep(.el-tabs__item) {
text-align: left;
}
}
</style> </style>

View File

@ -2,9 +2,10 @@
<div class="leftBox" ref="leftBoxRef"> <div class="leftBox" ref="leftBoxRef">
<div class="left animate__animated"> <div class="left animate__animated">
<div class="menus"> <div class="menus">
<div class="menus_itemBox" v-for="(item, index) in menuList" :title="t(`firstMenu.${item.name}`)"> <div class="menus_itemBox" v-for="(item, index) in menuList">
<div class="item_icon" @click="(e) => { <el-tooltip :content="t(`firstMenu.${item.name}`)" effect="customized" placement="top" :hide-after="0">
handleClick(item, e) <div class="item_icon" @click="(e) => {
handleClick(item, index, e)
} }
"> ">
<!-- <svg class="item_icon_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <!-- <svg class="item_icon_bg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
@ -56,6 +57,8 @@
{{ t(`firstMenu.${item.name}`) }} {{ t(`firstMenu.${item.name}`) }}
</div> </div>
</div> </div>
</el-tooltip>
</div> </div>
<leftSideSecond class="absolute zIndex99 leftSideSecond" ref="leftSideSecondRef"></leftSideSecond> <leftSideSecond class="absolute zIndex99 leftSideSecond" ref="leftSideSecondRef"></leftSideSecond>
</div> </div>
@ -264,10 +267,12 @@ onMounted(() => {
document.addEventListener('click', handleClickOutside, true); document.addEventListener('click', handleClickOutside, true);
}) })
const leftSideSecondRef = ref() const leftSideSecondRef = ref()
const handleClick = (item: any, e) => { const handleClick = (item: any, index, e) => {
console.log('点击了', item, e) console.log('点击了', item, e, index)
$('.leftSideSecond')[0].style.left = '100%' $('.leftSideSecond')[0].style.left = '100%'
$('.leftSideSecond')[0].style.top = e.layerY - 120 + 'px' // $('.leftSideSecond')[0].style.top = e.layerY + 120 + 'px'
$('.leftSideSecond')[0].style.top = `calc(${index} * 6.32vh)`
$('.leftSideSecond')[0].style.transform = 'translateY(calc(2.6vh - 50%))';
$('.leftSideSecond')[0].style.display = 'none' $('.leftSideSecond')[0].style.display = 'none'
if (item.children.length) { if (item.children.length) {
$('.leftSideSecond')[0].style.display = 'block' $('.leftSideSecond')[0].style.display = 'block'

View File

@ -1,5 +1,5 @@
<template> <template>
<Dialog ref="baseDialog" :title="title+'属性'" left="180px" top="100px" className="circle" :closeCallback="closeCallback"> <Dialog ref="baseDialog" :title="title + '属性'" left="180px" top="100px" className="circle" :closeCallback="closeCallback">
<template #content> <template #content>
<span class="custom-divider"></span> <span class="custom-divider"></span>
<div class="div-item"> <div class="div-item">
@ -14,11 +14,11 @@
<span class="label" style="margin-right: 0px;">投影面积:</span> <span class="label" style="margin-right: 0px;">投影面积:</span>
<input class="input input-text" readonly type="text" v-model="area"> <input class="input input-text" readonly type="text" v-model="area">
<el-select v-model="areaUnit"> <el-select v-model="areaUnit">
<el-option label="平方米" value="m2"></el-option> <el-option label="平方米" value="m2"></el-option>
<el-option label="平方千米" value="km2"></el-option> <el-option label="平方千米" value="km2"></el-option>
<el-option label="亩" value="mu"></el-option> <el-option label="亩" value="mu"></el-option>
<el-option label="公顷" value="ha"></el-option> <el-option label="公顷" value="ha"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
</div> </div>
@ -31,54 +31,59 @@
<attribute :entityOptions="entityOptions"></attribute> <attribute :entityOptions="entityOptions"></attribute>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="空间信息" name="2"> <el-tab-pane label="空间信息" name="2">
<div class="row"> <div class="div-item">
<div class="col height-mode-box"> <div class="row">
<span class="label" style="flex: 0 0 56px;">高度模式</span> <div class="col height-mode-box">
<el-select class="input input-select height-mode-scelect" style="width: 155px;margin-left: 20px" <span class="label" style="flex: 0 0 56px;">高度模式</span>
v-model="heightMode" @change="heightModeChange" placeholder="请选择"> <el-select class="input input-select height-mode-scelect" style="width: 155px;margin-left: 20px"
<el-option v-for="item in heightModeData" :key="item.key" :label="item.name" :value="item.key"> v-model="heightMode" @change="heightModeChange" placeholder="请选择">
</el-option> <el-option v-for="item in heightModeData" :key="item.key" :label="item.name" :value="item.key">
</el-select> </el-option>
</div> </el-select>
<div class="col">
<span class="label">Z值统一增加</span>
<div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height" @input="$handleInputLimit">
<span class="unit">m</span>
<span class="arrow"></span>
</div> </div>
<button class="confirm height-confirm" style="margin-left: 5px;" @click="heightConfirm" <div class="col">
:disabled="heightMode == 2">应用</button> <span class="label">Z值统一增加</span>
</div> <div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }">
</div> <input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height"
<div class="row"> @input="$handleInputLimit">
<div class="table spatial-info-table"> <span class="unit">m</span>
<div class="table-head"> <span class="arrow"></span>
<div class="tr">
<div class="th"></div>
<div class="th">经度X</div>
<div class="th">纬度Y</div>
<div class="th">高度Z</div>
</div> </div>
<button class="confirm height-confirm" style="margin-left: 5px;" @click="heightConfirm"
:disabled="heightMode == 2">应用</button>
</div> </div>
<div class="table-body"> </div>
<div class="tr"> <div class="row">
<div class="td">圆心坐标</div> <div class="table spatial-info-table">
<div class="td lng align-center" @dblclick="inputDblclick($event, 1, 'lng')"> <div class="table-head">
<input class="input" @blur="inputBlurCallBack($event, 1, 'lng', 8)" type="number" <div class="tr">
v-model="entityOptions.center.lng" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lng'" @input="$handleInputLimit"> <div class="th"></div>
<span style="pointer-events: none;" v-else>{{ entityOptions.center.lng.toFixed(8) }}</span> <div class="th">经度X</div>
<div class="th">纬度Y</div>
<div class="th">高度Z</div>
</div> </div>
<div class="td lat align-center" @dblclick="inputDblclick($event, 1, 'lat')"> </div>
<input class="input" @blur="inputBlurCallBack($event, 1, 'lat', 8)" type="number" <div class="table-body">
v-model="entityOptions.center.lat" min="-180" max="180" v-if="activeTd.index == 1 && activeTd.name == 'lat'" @input="$handleInputLimit"> <div class="tr">
<span style="pointer-events: none;" v-else>{{ entityOptions.center.lat.toFixed(8) }}</span> <div class="td">圆心坐标</div>
</div> <div class="td lng align-center" @dblclick="inputDblclick($event, 1, 'lng')">
<div class="td alt align-center" @dblclick="inputDblclick($event, 1, 'alt')"> <input class="input" @blur="inputBlurCallBack($event, 1, 'lng', 8)" type="number"
<input class="input" @blur="inputBlurCallBack($event, 1, 'alt', 2)" type="number" v-model="entityOptions.center.lng" min="-180" max="180"
v-model="entityOptions.height" min="-9999999" max="999999999" v-if="activeTd.index == 1 && activeTd.name == 'lng'" @input="$handleInputLimit">
v-if="activeTd.index == 1 && activeTd.name == 'alt'" @input="$handleInputLimit"> <span style="pointer-events: none;" v-else>{{ entityOptions.center.lng.toFixed(8) }}</span>
<span style="pointer-events: none;" v-else>{{ entityOptions.height.toFixed(2) }}</span> </div>
<div class="td lat align-center" @dblclick="inputDblclick($event, 1, 'lat')">
<input class="input" @blur="inputBlurCallBack($event, 1, 'lat', 8)" type="number"
v-model="entityOptions.center.lat" min="-180" max="180"
v-if="activeTd.index == 1 && activeTd.name == 'lat'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ entityOptions.center.lat.toFixed(8) }}</span>
</div>
<div class="td alt align-center" @dblclick="inputDblclick($event, 1, 'alt')">
<input class="input" @blur="inputBlurCallBack($event, 1, 'alt', 2)" type="number"
v-model="entityOptions.height" min="-9999999" max="999999999"
v-if="activeTd.index == 1 && activeTd.name == 'alt'" @input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ entityOptions.height.toFixed(2) }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -98,7 +103,8 @@
<div class="col"> <div class="col">
<span class="label">描边宽度</span> <span class="label">描边宽度</span>
<div class="input-number input-number-unit-2"> <div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth" @input="$handleInputLimit"> <input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth"
@input="$handleInputLimit">
<span class="unit">px</span> <span class="unit">px</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
@ -124,7 +130,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -186,13 +192,13 @@ let originalOptions: any
let that: any let that: any
const open = async (id: any, type: any) => { const open = async (id: any, type: any) => {
if(type && type === 'circle') { if (type && type === 'circle') {
title.value = '圆' title.value = '圆'
} }
else if(type && type === 'ellipse') { else if (type && type === 'ellipse') {
title.value = '椭圆' title.value = '椭圆'
} }
else if(type && type === 'sector') { else if (type && type === 'sector') {
title.value = '扇形' title.value = '扇形'
} }
that = window.earth.entityMap.get(id) that = window.earth.entityMap.get(id)
@ -273,7 +279,7 @@ const heightConfirm = () => {
} }
} }
const inputDblclick = async (event, i, anme) => { const inputDblclick = async (event, i, anme) => {
if(heightMode.value == 2) { if (heightMode.value == 2) {
return return
} }
activeTd.value = { activeTd.value = {
@ -335,31 +341,31 @@ const close = () => {
const remove = () => { const remove = () => {
close() close()
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(async () => { .then(async () => {
let node = window.treeObj.getNodeByParam('id', that.options.id, null) let node = window.treeObj.getNodeByParam('id', that.options.id, null)
let source_ids = cusRemoveNode(window.treeObj, [node]) let source_ids = cusRemoveNode(window.treeObj, [node])
const res = await TreeApi.removeDirectory({ ids: source_ids }) const res = await TreeApi.removeDirectory({ ids: source_ids })
if (res.code == 0 || res.code == 200) { if (res.code == 0 || res.code == 200) {
ElMessage({ ElMessage({
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}) })
that.remove() that.remove()
(window as any)._entityMap.delete(source_ids[0]) (window as any)._entityMap.delete(source_ids[0])
} else { } else {
ElMessage({ ElMessage({
message: res.msg || '删除失败', message: res.msg || '删除失败',
type: 'error' type: 'error'
}) })
} }
}) })
.catch(() => { .catch(() => {
// 用户点击取消,不执行任何操作 // 用户点击取消,不执行任何操作
}) })
} }
watch( watch(
@ -378,4 +384,15 @@ defineExpose({
}) })
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss">
.circle.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;
}
}
}</style>

View File

@ -63,6 +63,7 @@
:min="0" :min="0"
:max="maxNum" :max="maxNum"
placement="bottom" placement="bottom"
style="max-width: 100%"
@change="precisionInput" @change="precisionInput"
:show-tooltip="false" :show-tooltip="false"
popper-class="custom-tooltip" popper-class="custom-tooltip"
@ -167,6 +168,7 @@ const draw = (e) => {
//滑块 //滑块
var maxNum: any = ref(100) var maxNum: any = ref(100)
var maxNumBar: any = ref(100)
const updateDataAttr = async () => { const updateDataAttr = async () => {
await nextTick() await nextTick()
const sliderButton = document.querySelector('.el-slider__button-wrapper') const sliderButton = document.querySelector('.el-slider__button-wrapper')
@ -183,7 +185,18 @@ const precisionMaxInput = () => {
} }
// cutFill.heights = maxNum.value // cutFill.heights = maxNum.value
} }
watch(
() => maxNum.value,
(x, j) => {
if (!x) {
maxNum.value = 1
}
// if (precision.value != x) {
// visibility.precisions = x
// precision.value = x
// }
}
)
defineExpose({ defineExpose({
open open
}) })

View File

@ -191,6 +191,14 @@ const precisionMaxInput = () => {
} }
// cutFill.heights = height.value // cutFill.heights = height.value
} }
watch(
() => maxNum.value,
(x, j) => {
if (!x) {
maxNum.value = 1
}
}
)
const precisionInput = () => { const precisionInput = () => {
// let dom = document.getElementById('precision') // let dom = document.getElementById('precision')
// if (precision.value < dom.min * 1) { // if (precision.value < dom.min * 1) {

View File

@ -15,7 +15,7 @@
<button @click="draw"> <button @click="draw">
<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>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -251,7 +251,7 @@
<span class="custom-divider" style="order: 10; margin-top: 12px"></span> <span class="custom-divider" style="order: 10; margin-top: 12px"></span>
</template> </template>
<template #footer> <template #footer>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -91,11 +91,11 @@
</div> </div>
<div style="display: flex; margin-bottom: 12px; align-items: center"> <div style="display: flex; margin-bottom: 12px; align-items: center">
<span class="label" style="flex: 0 0 60px">经度(x)</span> <span class="label" style="flex: 0 0 60px">经度(x)</span>
<input class="input right-x" readonly /> <input class="input right-x" type="number" readonly />
</div> </div>
<div style="display: flex; margin-bottom: 10px; align-items: center"> <div style="display: flex; margin-bottom: 10px; align-items: center">
<span class="label" style="flex: 0 0 60px">纬度(y)</span> <span class="label" style="flex: 0 0 60px">纬度(y)</span>
<input class="input right-y" readonly /> <input class="input right-y" type="number" readonly />
</div> </div>
</div> </div>
</div> </div>
@ -103,7 +103,7 @@
<span class="custom-divider"></span> <span class="custom-divider"></span>
</template> </template>
<template #footer> <template #footer>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -43,7 +43,7 @@
</div> </div>
</template> </template>
<!-- <template #footer> <!-- <template #footer>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> --> </template> -->
</Dialog> </Dialog>
</template> </template>

View File

@ -90,7 +90,7 @@
</button> </button>
</div> </div>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -147,7 +147,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -401,4 +401,15 @@ defineExpose({
}) })
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss">
.attackArrow.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;
}
}
}
</style>

View File

@ -47,15 +47,15 @@
</div> </div>
<div class="td" v-else>{{ item.url }}</div> <div class="td" v-else>{{ item.url }}</div>
<div class="td operation" v-if="linkEditActive.index === index"> <div class="td operation" v-if="linkEditActive.index === index">
<button style="width: 76px;flex: 0 0 76px" @click="linkConfirmEdit(index)">{{ <button @click="linkConfirmEdit(index)">{{
t('general.确认') t('general.确认')
}} }}
</button> </button>
<button style="width: 76px;flex: 0 0 76px" @click="linkCancelEdit">{{ t('general.取消') }}</button> <button @click="linkCancelEdit">{{ t('general.取消') }}</button>
</div> </div>
<div class="td operation" v-else> <div class="td operation" v-else>
<button style="width: 76px;flex: 0 0 76px" @click="linkEdit(index, item)">{{ t('general.编辑') }}</button> <button @click="linkEdit(index, item)">{{ t('general.编辑') }}</button>
<button style="width: 76px;flex: 0 0 76px" @click="linkDelete(index)">{{ t('general.删除') }}</button> <button @click="linkDelete(index)">{{ t('general.删除') }}</button>
</div> </div>
</div> </div>
</div> </div>
@ -69,7 +69,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<span class="label">{{ t('general.编辑内容') }}</span> <span class="label">{{ t('general.编辑内容') }}</span>
<input class="input" type="text" v-model="cameraParams.keyWord" style="width: 180px;margin-right: 10px;"/> <input class="input" type="text" :placeholder="t('general.请输入设备名称进行搜索')" v-model="cameraParams.keyWord" style="width: 180px;margin-right: 10px;"/>
<button class="select btn" @click="cameraSelect({page: 1, limit: cameraParams.pageSize })"> <button class="select btn" @click="cameraSelect({page: 1, limit: cameraParams.pageSize })">
{{ t('general.搜索') }} {{ t('general.搜索') }}
</button> </button>
@ -244,7 +244,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<span class="label">{{ t('general.编辑内容') }}</span> <span class="label">{{ t('general.编辑内容') }}</span>
<input class="input goods-select-input" type="text" placeholder="请输入关键字" style="width: 180px;margin-right: 10px;" <input class="input goods-select-input" type="text" :placeholder="t('general.请输入物资名称进行搜索')" style="width: 180px;margin-right: 10px;"
v-model="goodsKeywords"> v-model="goodsKeywords">
<button class="select btn" @click="goodsFilter">{{ t('general.搜索') }}</button> <button class="select btn" @click="goodsFilter">{{ t('general.搜索') }}</button>
</div> </div>
@ -388,8 +388,8 @@ const cameraSelect = ({page, limit}) => {
if (res.code === 0 || res.code === 200) { if (res.code === 0 || res.code === 200) {
if (res.data) { if (res.data) {
cameraParams.value.total = res.data.total cameraParams.value.total = res.data.total
cameraList.value = res.data.records
if (res.data.records && res.data.records.length > 0) { if (res.data.records && res.data.records.length > 0) {
cameraList.value = res.data.records
for (let i = 0; i < cameraList.value.length; i++) { for (let i = 0; i < cameraList.value.length; i++) {
cameraList.value[i].checked = false cameraList.value[i].checked = false
for (let j = 0; j < props.entityOptions.attributeCamera.length; j++) { 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-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 .th:nth-child(1),
.YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(1) { .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(1) {
width: 164px; width: 150px;
flex: 0 0 164px; flex: 0 0 150px;
} }
.YJ-custom-base-dialog > .content .attribute-content-link .table .tr .th:nth-child(2), .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-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 .th:nth-child(3),
.YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(3) { .YJ-custom-base-dialog > .content .attribute-content-rtmp .table .tr .td:nth-child(3) {
flex: 0 0 150px; flex: 0 0 175px;
width: 150px; width: 175px;
justify-content: center; 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 .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-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 .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-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 .th:nth-child(3),
.YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .td:nth-child(3) { // .YJ-custom-base-dialog.dialog-en > .content .attribute-content-rtmp .table .tr .td:nth-child(3) {
flex: 0 0 190px; // flex: 0 0 190px;
width: 190px; // width: 190px;
justify-content: center; // justify-content: center;
} // }
.YJ-custom-base-dialog > .content .attribute-content-link .table .tr .td .input-group .input, .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, .YJ-custom-base-dialog > .content .attribute-content-vr .table .tr .td .input-group .input,

View File

@ -3,147 +3,197 @@
:closeCallback="closeCallback"> :closeCallback="closeCallback">
<template #content> <template #content>
<span class="custom-divider"></span> <span class="custom-divider"></span>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="t('general.基础信息')" name="1"> <el-tab-pane :label="t('general.基础信息')" name="1">
<div class="div-item"> <div class="div-item">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<span class="label" style="flex: unset">{{ t('general.名称') }}</span> <span class="label" style="flex: unset">{{ t('general.名称') }}</span>
<input class="input" type="text" v-model="entityOptions.labelText" @change="changeName" /> <input class="input" type="text" v-model="entityOptions.labelText" @change="changeName" />
</div>
<div class="col"></div>
</div> </div>
<div class="col"></div>
</div> </div>
<span class="custom-divider"></span> </div>
<div class="div-item"> <span class="custom-divider"></span>
<div class="row"> <div class="div-item">
<div class="title1"> <div class="row">
<div class="row"> <div class="title1">
<p class="lable-left-line">{{ t('dialog.point.WGS84') }}</p> <div class="row">
</div> <p class="lable-left-line">{{ t('dialog.point.WGS84') }}</p>
</div>
<div class="title2">
<div class="row coordinate-select-box">
<div class="lable-left-line">
{{ t('dialog.point.转换坐标选择') }}
<el-select class="input input-select coordinate-select" style="width: 155px; margin-left: 20px"
v-model="coordinate" @change="coordinateChange" placeholder="请选择">
<el-option v-for="item in epsg_map" :key="item.epsg" :label="item.name" :value="item.epsg">
</el-option>
</el-select>
</div>
</div>
</div> </div>
</div> </div>
<div class="row" style="padding-left: 12px;"> <div class="title2">
<div style="width: 46%;"> <div class="row coordinate-select-box">
<div class="row" style="margin-bottom: 5px"> <div class="lable-left-line">
<div class="col"> {{ t('dialog.point.转换坐标选择') }}
<span class="label">{{ t('general.经度') }}</span> <el-select style="width: 155px; margin-left: 20px;" v-model="coordinate" @change="coordinateChange">
<input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng" <div class="group-header" :class="name_map1.filter((item) => {
@change="changLng" @input="$handleInputLimit" /> return item.epsg == coordinate
</div> }).length > 0
</div> ? 'arrowActive'
<div class="row" style="margin-bottom: 5px"> : ''
<div class="col"> " @click="toggleGroup('hot')">
<span class="label">{{ t('general.纬度') }}</span> 地理坐标系
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" <svg-icon v-if="isHotGroupOpen" name="arrow2" :size="10" :color="name_map1.filter((item) => {
@change="changLat" @input="$handleInputLimit" /> return item.epsg == coordinate
</div> }).length > 0
</div> ? 'rgba(0, 255, 255, 1)'
<div class="row"> : 'rgba(255, 255, 255, 1)'
<div class="col"> " style="margin-left: 10px"></svg-icon>
<span class="label">{{ t('general.海拔高度') }}</span> <svg-icon v-else name="arrow1" :size="10" :color="name_map1.filter((item) => {
<div class="input-number input-number-unit-1 alt-box" return item.epsg == coordinate
:class="{ disabled: heightMode == 2 || heightMode === 3 }"> }).length > 0
<input class="input" type="number" title="" min="-9999999" max="999999999" ? 'rgba(0, 255, 255, 1)'
v-model="entityOptions.alt" @change="changAlt" @input="$handleInputLimit" /> : 'rgba(255, 255, 255, 1)'
<span class="unit">m</span> " style="margin-left: 10px"></svg-icon>
<span class="arrow"></span>
</div> </div>
</div> <div v-show="isHotGroupOpen">
</div> <el-option v-for="item in name_map1" :key="item.epsg" :label="item.name"
</div> :value="item.epsg"></el-option>
<div style="width: 50%;"> </div>
<div class="row" style="margin-bottom: 5px"> <div class="group-header" :class="name_map2.filter((item) => {
<div class="col"> return item.epsg == coordinate
<span class="label">{{ t('dialog.point.XAxis') }}:</span> }).length > 0
<input style="border: none; background: none" class="input convert-x" readonly v-model="x" /> ? 'arrowActive'
</div> : ''
</div> " @click="toggleGroup('ty')">
<div class="row" style="margin-bottom: 5px"> 投影坐标系
<div class="col"> <svg-icon v-if="isHotGroupOpen2" name="arrow2" :size="10" :color="name_map2.filter((item) => {
<span class="label">{{ t('dialog.point.YAxis') }}:</span> return item.epsg == coordinate
<input style="border: none; background: none" class="input convert-y" readonly v-model="y" /> }).length > 0
</div> ? 'rgba(0, 255, 255, 1)'
</div> : 'rgba(255, 255, 255, 1)'
<div class="row"> " style="margin-left: 10px"></svg-icon>
<div class="col"> <svg-icon v-else name="arrow1" :size="10" :color="name_map2.filter((item) => {
<span class="label">{{ t('dialog.point.ZAxis') }}:</span> return item.epsg == coordinate
<input style="border: none; background: none" class="input convert-z" readonly v-model="z" /> }).length > 0
</div> ? 'rgba(0, 255, 255, 1)'
: 'rgba(255, 255, 255, 1)'
" style="margin-left: 10px"></svg-icon>
</div>
<div v-show="isHotGroupOpen2">
<el-option v-for="item in name_map2" :key="item.epsg" :label="item.name"
:value="item.epsg"></el-option>
</div>
</el-select>
<!-- <el-select class="input input-select coordinate-select" style="width: 155px; margin-left: 20px"
v-model="coordinate" @change="coordinateChange" placeholder="请选择">
<el-option v-for="item in epsg_map" :key="item.epsg" :label="item.name" :value="item.epsg">
</el-option>
</el-select> -->
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<span class="custom-divider"></span> <div class="row" style="padding-left: 12px;">
<div class="div-item"> <div style="width: 46%;">
<setStyle type="点" :sourceType="sourceType" :entityOptions="entityOptions"></setStyle> <div class="row" style="margin-bottom: 5px">
<div class="row" style="padding-left: 12px;"> <div class="col">
<div class="col"> <span class="label">{{ t('general.经度') }}</span>
<span class="label" style="flex: none">{{ t('dialog.point.icon.show') }}</span> <input class="input" type="number" title="" min="-180" max="180" v-model="entityOptions.lng"
<input class="btn-switch" type="checkbox" v-model="entityOptions.billboardShow" /> @change="changLng" @input="$handleInputLimit" />
</div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none">{{ t('dialog.point.icon.current') }}</span>
<div class="image-box" @click="clickChangeImage">
<img class="image" :src="entityOptions.billboardImage" alt="" />
</div> </div>
</div> </div>
<div class="col"> <div class="row" style="margin-bottom: 5px">
<span class="label" style="flex: none">{{ t('dialog.point.icon.multiple') }}</span> <div class="col">
<div class="input-number input-number-unit-2"> <span class="label">{{ t('general.纬度') }}</span>
<input class="input" type="number" title="" min="0.1" max="99" v-model="entityOptions.billboardScale" <input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat"
@input="$handleInputLimit" /> @change="changLat" @input="$handleInputLimit" />
<span class="unit">{{ t('general.times') }}</span>
<span class="arrow"></span>
</div> </div>
</div> </div>
<div class="col"></div> <div class="row">
</div> <div class="col">
<div class="row" style="padding-left: 12px;"> <span class="label">{{ t('general.海拔高度') }}</span>
<div class="col" style="flex: 0 0 80px;"> <div class="input-number input-number-unit-1 alt-box"
<span class="label" style="flex: none;">{{ t('dialog.point.text.show') }}</span> :class="{ disabled: heightMode == 2 || heightMode === 3 }">
<input class="btn-switch" type="checkbox" v-model="entityOptions.labelShow" /> <input class="input" type="number" title="" min="-9999999" max="999999999"
</div> v-model="entityOptions.alt" @change="changAlt" @input="$handleInputLimit" />
</div> <span class="unit">m</span>
<div class="row" style="padding-left: 12px;"> <span class="arrow"></span>
<div class="col"> </div>
<span class="label" style="flex: none;">{{ t('general.text.color') }}</span>
<div class="labelColor" ref="labelColorRef"></div>
</div>
<div class="col">
<span class="label" style="flex: none;">{{ t('general.text.size') }}</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize"
style="min-width: 70px;" @input="$handleInputLimit" />
<span class="unit">px</span>
<span class="arrow"></span>
</div> </div>
</div> </div>
<div class="col font-select-box"> </div>
<span class="label" style="flex: none;">{{ t('general.text.font') }}</span> <div style="width: 50%;">
<el-select class="input input-select font-select" style="width: 100px" <div class="row" style="margin-bottom: 5px">
v-model="entityOptions.labelFontFamily"> <div class="col">
<el-option v-for="item in fontList" :key="item.key" :label="t('general.' + item.name)" <span class="label">{{ t('dialog.point.XAxis') }}:</span>
:value="item.key"> <input style="border: none; background: none" class="input convert-x" readonly v-model="x" />
</el-option> </div>
</el-select> </div>
<div class="row" style="margin-bottom: 5px">
<div class="col">
<span class="label">{{ t('dialog.point.YAxis') }}:</span>
<input style="border: none; background: none" class="input convert-y" readonly v-model="y" />
</div>
</div>
<div class="row">
<div class="col">
<span class="label">{{ t('dialog.point.ZAxis') }}:</span>
<input style="border: none; background: none" class="input convert-z" readonly v-model="z" />
</div>
</div> </div>
</div> </div>
<!-- <div class="row" style="padding-left: 12px;"> </div>
</div>
<span class="custom-divider"></span>
<div class="div-item">
<setStyle type="点" :sourceType="sourceType" :entityOptions="entityOptions"></setStyle>
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none">{{ t('dialog.point.icon.show') }}</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.billboardShow" />
</div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none">{{ t('dialog.point.icon.current') }}</span>
<div class="image-box" @click="clickChangeImage">
<img class="image" :src="entityOptions.billboardImage" alt="" />
</div>
</div>
<div class="col">
<span class="label" style="flex: none">{{ t('dialog.point.icon.multiple') }}</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0.1" max="99" v-model="entityOptions.billboardScale"
@input="$handleInputLimit" />
<span class="unit">{{ t('general.times') }}</span>
<span class="arrow"></span>
</div>
</div>
<div class="col"></div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col" style="flex: 0 0 80px;">
<span class="label" style="flex: none;">{{ t('dialog.point.text.show') }}</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.labelShow" />
</div>
</div>
<div class="row" style="padding-left: 12px;">
<div class="col">
<span class="label" style="flex: none;">{{ t('general.text.color') }}</span>
<div class="labelColor" ref="labelColorRef"></div>
</div>
<div class="col">
<span class="label" style="flex: none;">{{ t('general.text.size') }}</span>
<div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="1" max="99" v-model="entityOptions.labelFontSize"
style="min-width: 70px;" @input="$handleInputLimit" />
<span class="unit">px</span>
<span class="arrow"></span>
</div>
</div>
<div class="col font-select-box">
<span class="label" style="flex: none;">{{ t('general.text.font') }}</span>
<el-select class="input input-select font-select" style="width: 100px"
v-model="entityOptions.labelFontFamily">
<el-option v-for="item in fontList" :key="item.key" :label="t('general.' + item.name)"
:value="item.key">
</el-option>
</el-select>
</div>
</div>
<!-- <div class="row" style="padding-left: 12px;">
<div class="col"> <div class="col">
<div class="customized-tip"></div> <div class="customized-tip"></div>
<span class="label" style="flex: none;">{{ t('general.text.style') }}</span> <span class="label" style="flex: none;">{{ t('general.text.style') }}</span>
@ -187,41 +237,41 @@
</div> </div>
<div class="col"></div> <div class="col"></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" style="flex: 0 0 120px"> <div class="col" style="flex: 0 0 120px">
<span class="label">{{ t('general.视野缩放') }}</span> <span class="label">{{ t('general.视野缩放') }}</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.scaleByDistance" /> <input class="btn-switch" type="checkbox" v-model="entityOptions.scaleByDistance" />
</div>
<div class="col">
<span class="label">{{ t('general.最近距离') }}</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.near"
@input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div> </div>
<div class="col"> </div>
<span class="label">{{ t('general.最近距离') }}</span> <div class="col">
<div class="input-number input-number-unit-1"> <span class="label">{{ t('general.最远距离') }}</span>
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.near" <div class="input-number input-number-unit-1">
@input="$handleInputLimit" /> <input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.far"
<span class="unit">m</span> @input="$handleInputLimit" />
<span class="arrow"></span> <span class="unit">m</span>
</div> <span class="arrow"></span>
</div>
<div class="col">
<span class="label">{{ t('general.最远距离') }}</span>
<div class="input-number input-number-unit-1">
<input class="input" type="number" title="" min="1" max="99999999" v-model="entityOptions.far"
@input="$handleInputLimit" />
<span class="unit">m</span>
<span class="arrow"></span>
</div>
</div> </div>
</div> </div>
</div> </div>
</el-tab-pane> </div>
<el-tab-pane :label="t('general.属性信息')" name="2"> </el-tab-pane>
<attribute :entityOptions="entityOptions"></attribute> <el-tab-pane :label="t('general.属性信息')" name="2">
</el-tab-pane> <attribute :entityOptions="entityOptions"></attribute>
<el-tab-pane :label="t('general.空间信息')" name="3"> </el-tab-pane>
<div class="div-item"> <el-tab-pane :label="t('general.空间信息')" name="3">
<div class="row"> <div class="div-item">
<div class="row">
<div class="col height-mode-box"> <div class="col height-mode-box">
<span class="label" style="flex: 0 0 56px">{{ t('general.高度模式') }}</span> <span class="label" style="flex: 0 0 56px">{{ t('general.高度模式') }}</span>
<el-select class="input input-select height-mode-scelect" style="width: 155px; margin-left: 20px" <el-select class="input input-select height-mode-scelect" style="width: 155px; margin-left: 20px"
@ -336,9 +386,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<span class="custom-divider"></span> <span class="custom-divider"></span>
</template> </template>
<template #footer> <template #footer>
@ -352,7 +402,7 @@
</div> </div>
<button @click="remove">{{ t('general.删除') }}</button> <button @click="remove">{{ t('general.删除') }}</button>
<button @click="confirm">{{ t('general.确定') }}</button> <button @click="confirm">{{ t('general.确定') }}</button>
<button @click="close">{{ t('general.关闭') }}</button> <button @click="close">{{ t('general.取消') }}</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -375,6 +425,31 @@ const { cusUpdateNode, getSelectedNodes, cusRemoveNode } = useTreeNode()
const baseDialog: any = ref(null) const baseDialog: any = ref(null)
const eventBus: any = inject('bus') 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([ const epsg_map = ref([
{ {
name: 'WGS 84 / UTM zone 3N', name: 'WGS 84 / UTM zone 3N',
@ -390,6 +465,10 @@ for (const [key, value] of window.earth.proj.epsg_map) {
} }
epsg_map.value = array 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 format1 = ref(true)
const format2 = ref(false) const format2 = ref(false)
const format3 = ref(false) const format3 = ref(false)
@ -434,6 +513,9 @@ const x = ref()
const y = ref() const y = ref()
const z = ref() const z = ref()
const coordinate = ref('EPSG:4326') 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 heightMode = ref(0)
const labelColorRef = ref(null) const labelColorRef = ref(null)
const sourceType = ref('') const sourceType = ref('')
@ -454,6 +536,13 @@ const open = async (id, type) => {
baseDialog.value?.open() baseDialog.value?.open()
await nextTick() 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({ let labelColorPicker = new window.YJColorPicker({
el: labelColorRef.value, el: labelColorRef.value,
size: 'mini', //颜色box类型 size: 'mini', //颜色box类型
@ -519,6 +608,11 @@ const closeCallback = () => {
eventBus?.emit('destroyComponent') eventBus?.emit('destroyComponent')
} }
const toggleGroup = (type: string) => {
if (type === 'hot') isHotGroupOpen.value = !isHotGroupOpen.value
if (type === 'ty') isHotGroupOpen2.value = !isHotGroupOpen2.value
}
const changeName = (e) => { const changeName = (e) => {
entityOptions.value.labelText = e.target.value entityOptions.value.labelText = e.target.value
} }
@ -771,7 +865,7 @@ defineExpose({
} }
::v-deep>.content { ::v-deep>.content {
width: 590px; width: 600px;
.title1 { .title1 {
width: 46%; width: 46%;
@ -802,7 +896,7 @@ defineExpose({
.billboard-object.dialog-en { .billboard-object.dialog-en {
::v-deep>.content { ::v-deep>.content {
width: 690px; width: 660px;
.title1 { .title1 {
width: 40%; width: 40%;

View File

@ -103,7 +103,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -59,13 +59,13 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<span class="label">线段缓冲</span> <span class="label">线段缓冲</span>
<input class="btn-switch" type="checkbox" v-model="entityOptions.extend" @change="lineExtendchange"/> <input class="btn-switch" type="checkbox" v-model="entityOptions.extend" @change="lineExtendchange" />
</div> </div>
<div class="col" style="flex: 0 0 33%"> <div class="col" style="flex: 0 0 33%">
<span class="label">缓冲宽度</span> <span class="label">缓冲宽度</span>
<div class="input-number input-number-unit-1" style="width: 80px"> <div class="input-number input-number-unit-1" style="width: 80px">
<input class="input" type="number" title="" min="0" data-min="0.01" max="999999" <input class="input" type="number" title="" min="0" data-min="0.01" max="999999" @input="$handleInputLimit"
@input="$handleInputLimit" v-model="entityOptions.extendWidth" /> v-model="entityOptions.extendWidth" />
<span class="unit">m</span> <span class="unit">m</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
@ -190,7 +190,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -383,7 +383,7 @@ const open = async (id, type) => {
const heightModeChange = (val) => { const heightModeChange = (val) => {
that.heightMode = heightMode.value that.heightMode = heightMode.value
// @ts-ignore // @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 entityOptions.value.extend = false
} }
} }
@ -425,8 +425,8 @@ const changeWordsName = (val) => {
const lineTypechange = () => { } const lineTypechange = () => { }
const lineExtendchange = (e)=>{ const lineExtendchange = (e) => {
if(e.target.checked) { if (e.target.checked) {
heightMode.value = 2 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;
}
}
}
</style> </style>

View File

@ -56,7 +56,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -36,7 +36,7 @@
</template> </template>
<template #footer> <template #footer>
<button @click="sure">确认</button> <button @click="sure">确认</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -76,7 +76,7 @@
<template #footer> <template #footer>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -194,7 +194,7 @@
<button @click="returnY"><svg-icon name="yaxis" :size="12"></svg-icon>Y轴翻转</button> <button @click="returnY"><svg-icon name="yaxis" :size="12"></svg-icon>Y轴翻转</button>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -74,7 +74,7 @@
</template> </template>
<template #footer> <template #footer>
<button @click="save">保存</button> <button @click="save">保存</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -1,6 +1,5 @@
<template> <template>
<Dialog ref="baseDialog" title="贴地文字属性" left="180px" top="100px" className="ground-text" <Dialog ref="baseDialog" title="贴地文字属性" left="180px" top="100px" className="ground-text" :closeCallback="closeCallback">
:closeCallback="closeCallback">
<template #content> <template #content>
<span class="custom-divider"></span> <span class="custom-divider"></span>
<div class="div-item"> <div class="div-item">
@ -11,8 +10,7 @@
</div> </div>
<div class="col"> <div class="col">
<span class="label">颜色</span> <span class="label">颜色</span>
<div class="color" ref="colorRef" </div> <div class="color" ref="colorRef"></div>
</div>
</div> </div>
</div> </div>
<span class="custom-divider"></span> <span class="custom-divider"></span>
@ -25,7 +23,8 @@
</div> </div>
<div class="col"> <div class="col">
<span class="label">纬度</span> <span class="label">纬度</span>
<input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat" @input="$handleInputLimit"> <input class="input" type="number" title="" min="-90" max="90" v-model="entityOptions.lat"
@input="$handleInputLimit">
</div> </div>
</div> </div>
</div> </div>
@ -37,8 +36,8 @@
<input type="range" max="360" min="0" step="1" v-model="entityOptions.angle"> <input type="range" max="360" min="0" step="1" v-model="entityOptions.angle">
<div class="input-number input-number-unit" <div class="input-number input-number-unit"
style="width: 100px;flex: 0 0 100px;margin-left: 10px;"> style="width: 100px;flex: 0 0 100px;margin-left: 10px;">
<input class="input" type="number" title="" min="0" max="360" step="1" @input="$handleInputLimit" <input class="input" type="number" title="" min="0" max="360" step="1"
v-model="entityOptions.angle"> @input="$handleInputLimit" v-model="entityOptions.angle">
<span class="unit">°</span> <span class="unit">°</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
@ -60,14 +59,15 @@
<span class="label">滚动速度</span> <span class="label">滚动速度</span>
<input type="range" max="100" min="0" step="1" v-model="entityOptions.speed"> <input type="range" max="100" min="0" step="1" v-model="entityOptions.speed">
<div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;"> <div class="input-number" style="width: 100px;flex: 0 0 100px;margin-left: 10px;">
<input class="input" type="number" title="" min="0" max="100" step="1" @input="$handleInputLimit" <input class="input" type="number" title="" min="0" max="100" step="1"
v-model="entityOptions.speed"> @input="$handleInputLimit" v-model="entityOptions.speed">
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<span class="custom-divider"></span> <span class="custom-divider"></span>
</div>
</template> </template>
<template #footer> <template #footer>
<div style="position: absolute; left: 24px; display: flex;"> <div style="position: absolute; left: 24px; display: flex;">
@ -77,7 +77,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -32,7 +32,7 @@
</button> </button>
</div> </div>
<button @click="save">保存</button> <button @click="save">保存</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -38,7 +38,7 @@
<div class="row"></div> <div class="row"></div>
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<span class="label">字体样式</span> <span class="label">字体风格</span>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -63,7 +63,7 @@
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="row"> <!-- <div class="row">
<div class="col"> <div class="col">
<div class="customized-tip"></div> <div class="customized-tip"></div>
<span class="label" style="flex: none;">{{ t('general.text.style') }}</span> <span class="label" style="flex: none;">{{ t('general.text.style') }}</span>
@ -106,7 +106,7 @@
</div> </div>
</div> </div>
<div class="col"></div> <div class="col"></div>
</div> </div> -->
<span class="custom-divider"></span> <span class="custom-divider"></span>
<div class="row"></div> <div class="row"></div>
<div class="row"> <div class="row">
@ -124,13 +124,6 @@
<div class="labelBackgroundColorStart" ref="labelBackgroundColorStartRef" style="margin-right: 10px;"></div> <div class="labelBackgroundColorStart" ref="labelBackgroundColorStartRef" style="margin-right: 10px;"></div>
<div class="labelBackgroundColorEnd" ref="labelBackgroundColorEndRef"></div> <div class="labelBackgroundColorEnd" ref="labelBackgroundColorEndRef"></div>
</div> </div>
<!-- <div class="col font-select-box">
<span class="label" style="flex: none">字体选择</span>
<el-select class="input input-select font-select" v-model="entityOptions.labelFontFamily">
<el-option v-for="item in fontList" :key="item.key" :label="item.name" :value="item.key">
</el-option>
</el-select>
</div> -->
</div> </div>
<div class="row"> <div class="row">
<div class="col"> <div class="col">

View File

@ -31,7 +31,7 @@
<template #footer> <template #footer>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -524,7 +524,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -74,7 +74,7 @@
</template> </template>
<template #footer> <template #footer>
<button @click="save">保存</button> <button @click="save">保存</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -183,7 +183,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -14,7 +14,7 @@
<el-input <el-input
v-model="modelName" v-model="modelName"
class="w-50 m-2" class="w-50 m-2"
placeholder="请输入图标类型进行搜索" placeholder="请输入图标名称进行搜索"
:suffix-icon="Search" :suffix-icon="Search"
/> />
</div> </div>
@ -205,9 +205,11 @@ let observer: IntersectionObserver | null = null
const treeRef: any = ref('') const treeRef: any = ref('')
watch(modelName, (val) => { watch(modelName, (val) => {
if (treeRef.value && treeRef.value !== '') { // if (treeRef.value && treeRef.value !== '') {
treeRef.value?.filter(val) // treeRef.value?.filter(val)
} // }
getModelList()
// categories.value = []
}) })
watch(isShowPup, (val) => { watch(isShowPup, (val) => {
if (!val) { if (!val) {
@ -349,7 +351,6 @@ let typeArr = {
const modelClick = (index, row) => { const modelClick = (index, row) => {
activeIndex.value = index activeIndex.value = index
isShowPup.value = false isShowPup.value = false
console.log(index, row)
let selectedImg let selectedImg
if (selectCallback) { if (selectCallback) {
if (butActiveIndex.value === 0) { if (butActiveIndex.value === 0) {
@ -369,12 +370,21 @@ const modelClick = (index, row) => {
const getModelListByType = (id) => { const getModelListByType = (id) => {
if (butActiveIndex.value === 0) { if (butActiveIndex.value === 0) {
categories.value = [...threePhoto] let arr = threePhoto.filter((item) => {
return item.iconName.indexOf(modelName.value) > -1
})
// categories.value = [...threePhoto]
categories.value = arr
} else if (butActiveIndex.value === 1) { } else if (butActiveIndex.value === 1) {
categories.value = [...ordinaryPhoto] let arr = ordinaryPhoto.filter((item) => {
return item.iconName.indexOf(modelName.value) > -1
})
// categories.value = [...ordinaryPhoto]
categories.value = arr
} else { } else {
let formData = new FormData() let formData = new FormData()
formData.append('iconTypeId', id) formData.append('iconTypeId', id)
formData.append('name', modelName.value)
PhotoApi.showModelByType(formData).then((res) => { PhotoApi.showModelByType(formData).then((res) => {
categories.value = res.data categories.value = res.data
}) })
@ -391,13 +401,23 @@ const getModelList = async () => {
} }
] ]
if (butActiveIndex.value == 0) { if (butActiveIndex.value == 0) {
categories.value = [...threePhoto] let arr = threePhoto.filter((item) => {
return item.iconName.indexOf(modelName.value) > -1
})
// categories.value = [...threePhoto]
categories.value = arr
} }
if (butActiveIndex.value == 1) { if (butActiveIndex.value == 1) {
categories.value = [...ordinaryPhoto] let arr = ordinaryPhoto.filter((item) => {
return item.iconName.indexOf(modelName.value) > -1
})
// categories.value = [...ordinaryPhoto]
categories.value = arr
} }
} else { } else {
const res: any = await PhotoApi.modelTypeList() const params = new URLSearchParams()
params.append('iconName', modelName.value)
const res: any = await PhotoApi.modelTypeList(params)
if (res.code == 0 || res.code == 200) { if (res.code == 0 || res.code == 200) {
let data = transformNestedJson(res.data, 'name', 'label') let data = transformNestedJson(res.data, 'name', 'label')
typeTreeData.value = data typeTreeData.value = data
@ -503,8 +523,11 @@ defineExpose({
// height: 50vh; // height: 50vh;
:deep(.el-dialog) { :deep(.el-dialog) {
background: background: linear-gradient(
linear-gradient(180deg, rgba(var(--color-base1), 0.2) 0%, rgba(var(--color-base1), 0) 100%), 180deg,
rgba(var(--color-base1), 0.2) 0%,
rgba(var(--color-base1), 0) 100%
),
rgba(0, 0, 0, 0.6); rgba(0, 0, 0, 0.6);
border: 1px solid var(--color-border1); border: 1px solid var(--color-border1);
padding-left: 0 !important; padding-left: 0 !important;
@ -561,22 +584,22 @@ defineExpose({
// height: 50vh; // height: 50vh;
:deep( :deep(
.el-tabs--left .el-tabs__active-bar.is-left, .el-tabs--left .el-tabs__active-bar.is-left,
.el-tabs--left .el-tabs__active-bar.is-right, .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-left,
.el-tabs--right .el-tabs__active-bar.is-right .el-tabs--right .el-tabs__active-bar.is-right
) { ) {
width: 3px; width: 3px;
background: rgba(var(--color-base1), 1); background: rgba(var(--color-base1), 1);
height: 40px !important; height: 40px !important;
} }
:deep( :deep(
.el-tabs--left .el-tabs__nav-wrap.is-left::after, .el-tabs--left .el-tabs__nav-wrap.is-left::after,
.el-tabs--left .el-tabs__nav-wrap.is-right::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-left::after,
.el-tabs--right .el-tabs__nav-wrap.is-right::after .el-tabs--right .el-tabs__nav-wrap.is-right::after
) { ) {
width: 3px; width: 3px;
} }
@ -915,10 +938,7 @@ defineExpose({
width: 90px; width: 90px;
height: 32px; height: 32px;
opacity: 1; opacity: 1;
border-radius: border-radius: 0px 4px, 4px, 0px;
0px 4px,
4px,
0px;
background: rgba(var(--color-base1), 0.2); background: rgba(var(--color-base1), 0.2);
border: 1px solid rgba(var(--color-base1), 0.1); border: 1px solid rgba(var(--color-base1), 0.1);
display: flex; display: flex;

View File

@ -1,5 +1,6 @@
<template> <template>
<Dialog ref="baseDialog" :title="title+'属性'" left="180px" top="100px" className="polygon" :closeCallback="closeCallback"> <Dialog ref="baseDialog" :title="title + '属性'" left="180px" top="100px" className="polygon"
:closeCallback="closeCallback">
<template #content> <template #content>
<span class="custom-divider"></span> <span class="custom-divider"></span>
<div class="div-item"> <div class="div-item">
@ -14,11 +15,11 @@
<span class="label" style="margin-right: 0px;">投影面积:</span> <span class="label" style="margin-right: 0px;">投影面积:</span>
<input class="input input-text" readonly type="text" v-model="area"> <input class="input input-text" readonly type="text" v-model="area">
<el-select v-model="areaUnit"> <el-select v-model="areaUnit">
<el-option label="平方米" value="m2"></el-option> <el-option label="平方米" value="m2"></el-option>
<el-option label="平方千米" value="km2"></el-option> <el-option label="平方千米" value="km2"></el-option>
<el-option label="亩" value="mu"></el-option> <el-option label="亩" value="mu"></el-option>
<el-option label="公顷" value="ha"></el-option> <el-option label="公顷" value="ha"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
</div> </div>
@ -43,7 +44,8 @@
<div class="col"> <div class="col">
<span class="label">Z值统一增加</span> <span class="label">Z值统一增加</span>
<div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }"> <div class="input-number input-number-unit-1 height-box" :class="{ 'disabled': heightMode == 2 }">
<input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height" @input="$handleInputLimit" /> <input class="input height" type="number" title="" min="-9999999" max="999999999" v-model="height"
@input="$handleInputLimit" />
<span class="unit">m</span> <span class="unit">m</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
@ -66,15 +68,18 @@
<div class="td">{{ i + 1 }}</div> <div class="td">{{ i + 1 }}</div>
<div class="td lng align-center" @dblclick="inputDblclick($event, i, 'lng')"> <div class="td lng align-center" @dblclick="inputDblclick($event, i, 'lng')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lng', 8)" type="number" <input class="input" @blur="inputBlurCallBack($event, i, 'lng', 8)" type="number"
v-model="item.lng" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lng'" @input="$handleInputLimit" /> v-model="item.lng" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lng'"
@input="$handleInputLimit" />
<span style="pointer-events: none;" v-else>{{ (item.lng).toFixed(8) }}</span> <span style="pointer-events: none;" v-else>{{ (item.lng).toFixed(8) }}</span>
</div> </div>
<div class="td lat align-center" @dblclick="inputDblclick($event, i, 'lat')"> <div class="td lat align-center" @dblclick="inputDblclick($event, i, 'lat')">
<input class="input" @blur="inputBlurCallBack($event, i, 'lat', 8)" type="number" <input class="input" @blur="inputBlurCallBack($event, i, 'lat', 8)" type="number"
v-model="item.lat" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lat'" @input="$handleInputLimit"> v-model="item.lat" min="-180" max="180" v-if="activeTd.index == i && activeTd.name == 'lat'"
@input="$handleInputLimit">
<span style="pointer-events: none;" v-else>{{ (item.lat).toFixed(8) }}</span> <span style="pointer-events: none;" v-else>{{ (item.lat).toFixed(8) }}</span>
</div> </div>
<div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')" @input="$handleInputLimit"> <div class="td alt align-center" @dblclick="inputDblclick($event, i, 'alt')"
@input="$handleInputLimit">
<input class="input" @blur="inputBlurCallBack($event, i, 'alt', 2)" type="number" <input class="input" @blur="inputBlurCallBack($event, i, 'alt', 2)" type="number"
v-model="entityOptions.height" min="-9999999" max="999999999" v-model="entityOptions.height" min="-9999999" max="999999999"
v-if="activeTd.index == i && activeTd.name == 'alt'"> v-if="activeTd.index == i && activeTd.name == 'alt'">
@ -98,7 +103,8 @@
<div class="col"> <div class="col">
<span class="label">描边宽度</span> <span class="label">描边宽度</span>
<div class="input-number input-number-unit-2"> <div class="input-number input-number-unit-2">
<input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth" @input="$handleInputLimit"> <input class="input" type="number" title="" min="0" max="99" v-model="entityOptions.lineWidth"
@input="$handleInputLimit">
<span class="unit">px</span> <span class="unit">px</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
@ -124,7 +130,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -186,10 +192,10 @@ let originalOptions: any
let that: any let that: any
const open = async (id: any, type: any) => { const open = async (id: any, type: any) => {
if(type && type === 'rectangle') { if (type && type === 'rectangle') {
title.value = '矩形' title.value = '矩形'
} }
else if(type && type === 'rendezvous') { else if (type && type === 'rendezvous') {
title.value = '集结地' title.value = '集结地'
} }
that = window.earth.entityMap.get(id) that = window.earth.entityMap.get(id)
@ -270,7 +276,7 @@ const heightConfirm = () => {
} }
} }
const inputDblclick = async (event, i, anme) => { const inputDblclick = async (event, i, anme) => {
if(heightMode.value == 2) { if (heightMode.value == 2) {
return return
} }
activeTd.value = { activeTd.value = {
@ -333,31 +339,31 @@ const close = () => {
const remove = () => { const remove = () => {
close() close()
ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', { ElMessageBox.confirm('此操作将永久删除节点及所有子节点, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(async () => { .then(async () => {
let node = window.treeObj.getNodeByParam('id', that.options.id, null) let node = window.treeObj.getNodeByParam('id', that.options.id, null)
let source_ids = cusRemoveNode(window.treeObj, [node]) let source_ids = cusRemoveNode(window.treeObj, [node])
const res = await TreeApi.removeDirectory({ ids: source_ids }) const res = await TreeApi.removeDirectory({ ids: source_ids })
if (res.code == 0 || res.code == 200) { if (res.code == 0 || res.code == 200) {
ElMessage({ ElMessage({
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}) })
that.remove() that.remove()
(window as any)._entityMap.delete(source_ids[0]) (window as any)._entityMap.delete(source_ids[0])
} else { } else {
ElMessage({ ElMessage({
message: res.msg || '删除失败', message: res.msg || '删除失败',
type: 'error' type: 'error'
}) })
} }
}) })
.catch(() => { .catch(() => {
// 用户点击取消,不执行任何操作 // 用户点击取消,不执行任何操作
}) })
} }
watch( watch(
@ -376,4 +382,16 @@ defineExpose({
}) })
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss">
.polygon.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;
}
}
}
</style>

View File

@ -64,7 +64,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -75,8 +75,8 @@
<div class="col" style="flex: 0 0 33%"> <div class="col" style="flex: 0 0 33%">
<span class="label">缓冲宽度</span> <span class="label">缓冲宽度</span>
<div class="input-number input-number-unit-1" style="width: 80px"> <div class="input-number input-number-unit-1" style="width: 80px">
<input class="input" type="number" title="" min="0" data-min="0.01" max="999999" <input class="input" type="number" title="" min="0" data-min="0.01" max="999999" @input="$handleInputLimit"
@input="$handleInputLimit" v-model="entityOptions.extendWidth" /> v-model="entityOptions.extendWidth" />
<span class="unit">m</span> <span class="unit">m</span>
<span class="arrow"></span> <span class="arrow"></span>
</div> </div>
@ -111,13 +111,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="div-item"> <div class="row">
<div class="row"> <el-tabs v-model="activeName">
<el-tabs v-model="activeName"> <el-tab-pane label="属性信息" name="1">
<el-tab-pane label="属性信息" name="1"> <attribute :entityOptions="entityOptions"></attribute>
<attribute :entityOptions="entityOptions"></attribute> </el-tab-pane>
</el-tab-pane> <el-tab-pane label="空间信息" name="2">
<el-tab-pane label="空间信息" name="2"> <div class="div-item">
<div class="row"> <div class="row">
<div class="col height-mode-box"> <div class="col height-mode-box">
<span class="label" style="flex: 0 0 56px">高度模式</span> <span class="label" style="flex: 0 0 56px">高度模式</span>
@ -176,12 +176,14 @@
</div> </div>
</div> </div>
</div> </div>
</el-tab-pane> </div>
<el-tab-pane label="标签风格" name="3"> </el-tab-pane>
<el-tab-pane label="标签风格" name="3">
<div class="div-item">
<labelStyle type="线" :entityOptions="entityOptions"></labelStyle> <labelStyle type="线" :entityOptions="entityOptions"></labelStyle>
</el-tab-pane> </div>
</el-tabs> </el-tab-pane>
</div> </el-tabs>
</div> </div>
<span class="custom-divider"></span> <span class="custom-divider"></span>
</template> </template>
@ -200,7 +202,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -391,7 +393,7 @@ const open = async (id: any, type) => {
const heightModeChange = (val) => { const heightModeChange = (val) => {
that.heightMode = heightMode.value that.heightMode = heightMode.value
// @ts-ignore // @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 entityOptions.value.extend = false
} }
} }
@ -433,8 +435,8 @@ const changeWordsName = (val) => {
} }
const lineTypechange = () => { } const lineTypechange = () => { }
const lineExtendchange = (e)=>{ const lineExtendchange = (e) => {
if(e.target.checked) { if (e.target.checked) {
heightMode.value = 2 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;
}
}
}
</style> </style>

View File

@ -66,7 +66,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -82,7 +82,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -24,7 +24,7 @@ import { GisApi } from '@/api/gisApi'
const props = defineProps({ const props = defineProps({
}); });
const host = window.location.host const host = localStorage.getItem('ip')
const visible = ref(false) const visible = ref(false)
const baseDialog:any = ref(null); const baseDialog:any = ref(null);
const eventBus:any = inject("bus"); const eventBus:any = inject("bus");

View File

@ -39,7 +39,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -14,7 +14,7 @@
<template #footer> <template #footer>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -49,7 +49,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -233,7 +233,7 @@
<template #footer> <template #footer>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -21,7 +21,7 @@
</template> </template>
<template #footer> <template #footer>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -12,18 +12,18 @@
<div class="div-item" style="display: flex"> <div class="div-item" style="display: flex">
<button @click="importHeader" style="margin-right: 15px"> <button @click="importHeader" style="margin-right: 15px">
<svg class="icon-updateheigh"> <svg class="icon-updateheigh">
<use xlink:href="#icon-importHeader"></use></svg <use xlink:href="#icon-importHeader"></use>
>{{ t('vector.导入表头') }} </svg>{{ t('vector.导入表头') }}
</button> </button>
<button @click="downloadHeader"> <button @click="downloadHeader">
<svg> <svg>
<use xlink:href="#icon-download"></use></svg <use xlink:href="#icon-download"></use>
>{{ t('vector.下载字典模板') }} </svg>{{ t('vector.下载字典模板') }}
</button> </button>
<button @click="exportExcel" style="position: absolute; right: 25px"> <button @click="exportExcel" style="position: absolute; right: 25px">
<svg> <svg>
<use xlink:href="#icon-export"></use></svg <use xlink:href="#icon-export"></use>
>{{ t('vector.导出') }} </svg>{{ t('vector.导出') }}
</button> </button>
</div> </div>
<span class="custom-divider"></span> <span class="custom-divider"></span>
@ -113,9 +113,10 @@ const maxPageNum: any = ref(0)
const filterData: any = ref([]) const filterData: any = ref([])
const title = ref('') const title = ref('')
const closeCallback = () => { const closeCallback = () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) // entityOptions.value.originalOptions = structuredClone(originalOptions)
entityOptions.value.reset() // console.log('entityOptions--------------', entityOptions.value)
eventBus.emit('destroyComponent') // entityOptions.value.reset()
// eventBus.emit('destroyComponent')
} }
const getKeys = () => { const getKeys = () => {
keyData.value = [] keyData.value = []
@ -140,9 +141,8 @@ let features
const open = async (id: any) => { const open = async (id: any) => {
// that = window.earth.entityMap.get(id) // that = window.earth.entityMap.get(id)
node = window.treeObj.getNodeByParam('id', id, null) node = window.treeObj.getNodeByParam('id', id, null)
entityOptions.value.field = JSON.parse(node.params).field
that = getThat(node) that = getThat(node)
console.log(node, that, entityOptions.field, 'yyyyyyyyyyyyyy') entityOptions.value.field = that.field
if (that.options.id === id) { if (that.options.id === id) {
features = that.geojson.features features = that.geojson.features
} else { } else {
@ -157,7 +157,7 @@ const open = async (id: any) => {
let spliceData = arrSplice(arr, pageSize.value) let spliceData = arrSplice(arr, pageSize.value)
maxPageNum.value = spliceData.length maxPageNum.value = spliceData.length
tableData.value = spliceData[pageNum.value - 1] tableData.value = spliceData[pageNum.value - 1]
title.value = node.sourceName title.value = node.title || node.sourceName
getKeys() getKeys()
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
entityOptions.value = that entityOptions.value = that
@ -227,8 +227,8 @@ const getTableList = ({ page, limit }) => {
tableData.value = spliceData[pageNum.value - 1] tableData.value = spliceData[pageNum.value - 1]
} }
const changeFieId = async (e) => { const changeFieId = async (e) => {
console.log(e, 'eeeeeeeee') let fNode = window.treeObj.getNodeByParam('id', that.options.id, null)
let data = JSON.parse(node.params) let data = JSON.parse(fNode.params)
data.field = e data.field = e
let params2 = { let params2 = {
id: data.id, id: data.id,

View File

@ -98,7 +98,7 @@
</div> </div>
<button @click="remove">删除</button> <button @click="remove">删除</button>
<button @click="confirm">确定</button> <button @click="confirm">确定</button>
<button @click="close">关闭</button> <button @click="close">取消</button>
</template> </template>
</Dialog> </Dialog>
</template> </template>

View File

@ -31,12 +31,16 @@
<span class="label">材质样式</span> <span class="label">材质样式</span>
<el-select class="input input-select input-select-line-type" v-model="entityOptions.material"> <el-select class="input input-select input-select-line-type" v-model="entityOptions.material">
<template #label="{ label, value }"> <template #label="{ label, value }">
<i class="yj-custom-icon" :class="material[value].icon"></i> <i class="yj-custom-icon" :class="material[value].icon"
:style="`background: url(${material[value].icon}) 100% 100% no-repeat;background-size: 100% 100%;`">
</i>
{{ label }} {{ label }}
</template> </template>
<el-option v-for="item in material" :key="item.key" :label="item.name" :value="item.key"> <el-option v-for="item in material" :key="item.key" :label="item.name" :value="item.key">
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center;">
<i class="yj-custom-icon" :class="item.icon"></i> <i class="yj-custom-icon" :class="item.icon"
:style="`background: url(${item.icon}) 100% 100% no-repeat;background-size: 100% 100%;`"
></i>
{{ item.name }} {{ item.name }}
</div> </div>
</el-option> </el-option>
@ -99,25 +103,25 @@ const material = ref([
name: '纯色墙', name: '纯色墙',
value: '纯色墙', value: '纯色墙',
key: 0, key: 0,
icon: 'icon-wall' icon: '../sdk/custom/img/icon-wall.png',
}, },
{ {
name: '上升墙', name: '上升墙',
value: '上升墙', value: '上升墙',
key: 1, key: 1,
icon: 'icon-wall-gradient' icon: '../sdk/custom/img/icon-wall-gradient.png'
}, },
{ {
name: '箭头墙', name: '箭头墙',
value: '箭头墙', value: '箭头墙',
key: 2, key: 2,
icon: 'icon-wall-arrow' icon: '../sdk/img/material/arrow.png'
}, },
{ {
name: '警戒墙', name: '警戒墙',
value: '警戒墙', value: '警戒墙',
key: 3, key: 3,
icon: 'icon-wall-warn' icon: '../sdk/img/material/warn.png'
} }
]) ])
eventBus.on("openStandTextAdd", () => { eventBus.on("openStandTextAdd", () => {

View File

@ -1,4 +1,6 @@
import { useTreeNode } from '@/views/components/tree/hooks/treeNode' import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
import { rightClick } from '../../entityClick'
import { getEventBus } from '../../../../home/eventBus'
const { cusAddNodes } = useTreeNode() const { cusAddNodes } = useTreeNode()
export function renderVector(node, ifFly = true) { export function renderVector(node, ifFly = true) {
// if (node.detail != "") node.detail.field = node.detail.fieldName || "id"; // if (node.detail != "") node.detail.field = node.detail.fieldName || "id";
@ -51,13 +53,17 @@ export function renderVector(node, ifFly = true) {
} }
if (ifFly) Vector.flyTo(); if (ifFly) Vector.flyTo();
// Vector.onClick = shpTotal; // Vector.onClick = shpTotal;
Vector.onClick = () => { Vector.onClick = (a,b,c) => {
alert('left') const eventBus = getEventBus()
rightClick({id: b})
eventBus.emit("openDialog", 'vectorAttr', b);
// alert('left')
}; };
//鼠标右键点击事件 //鼠标右键点击事件
// Vector.onRightClick = shpSelect; // Vector.onRightClick = shpSelect;
Vector.onRightClick = () => { Vector.onRightClick = (a,b,c) => {
alert('right') rightClick({id: b})
// alert('right')
}; };
}); });
}); });

View File

@ -98,6 +98,7 @@ export const useRightOperate = () => {
params.params = JSON.stringify(params.params) params.params = JSON.stringify(params.params)
cusAddNodes(window.treeObj, params.parentId, [params]) cusAddNodes(window.treeObj, params.parentId, [params])
let entityObject = renderVector(params, true); let entityObject = renderVector(params, true);
entityObject.flyTo();
(window as any)._entityMap.set(id, entityObject) (window as any)._entityMap.set(id, entityObject)
} else if (["geojson"].includes(sourceType)) { } else if (["geojson"].includes(sourceType)) {
let baseURL = localStorage.getItem('ip') let baseURL = localStorage.getItem('ip')
@ -113,6 +114,8 @@ export const useRightOperate = () => {
width: 1, width: 1,
color: "rgb(239, 6, 6, 1)", color: "rgb(239, 6, 6, 1)",
} }
}, (entity:any) => {
entity?.flyTo()
}) })
} else { } else {
// 获取最后一个点的位置 // 获取最后一个点的位置
@ -340,10 +343,13 @@ export const useRightOperate = () => {
} }
console.log(node.id, 'nnodenodenodenodeode') console.log(node.id, 'nnodenodenodenodeode')
if (node) { if (node) {
if (node.sourceType == 'pressModel' || node.sourceType == 'roam') { if(node.sourceType === 'Feature') {
eventBus.emit("openDialog", node.sourceType, node); eventBus.emit('openDialog','vectorAttr', node.id);
}
else if (node.sourceType == 'pressModel' || node.sourceType == 'roam') {
eventBus.emit('openDialog', node.sourceType, node);
} else { } else {
eventBus.emit("openDialog", node.sourceType, node.id); eventBus.emit('openDialog', node.sourceType, node.id);
} }
} }
} }
@ -683,7 +689,9 @@ export const useRightOperate = () => {
}) })
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
let item = res.data[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) cusAddNodes(window.treeObj, parentId, res.data)
} }

View File

@ -111,7 +111,7 @@ export const useTree = () => {
} else { } else {
entityObject = (window as any)._entityMap.get(treeNode.id) entityObject = (window as any)._entityMap.get(treeNode.id)
} }
entityObject.flyTo() entityObject?.flyTo()
} }
console.log('entityObject', entityObject) console.log('entityObject', entityObject)
@ -265,7 +265,7 @@ export const useTree = () => {
// 如果当前节点有父节点,检查所有子节点状态 // 如果当前节点有父节点,检查所有子节点状态
if (parentNode) { if (parentNode && parentNode.sourceType !== 'tileset') {
checkChildNodes(parentNode); checkChildNodes(parentNode);
} }
@ -322,6 +322,13 @@ export const useTree = () => {
}) })
} }
} else { } else {
if(node.sourceType === 'tileset') {
if (node.children && node.children.length > 0) {
node.children.forEach((item) => {
sourceStatus(item)
})
}
}
let params = JSON.parse(node.params) let params = JSON.parse(node.params)
let entityObject let entityObject
if (node.sourceType == 'pressModel') { if (node.sourceType == 'pressModel') {
@ -335,7 +342,7 @@ export const useTree = () => {
positions: params.positions, positions: params.positions,
height: params.height, height: params.height,
name: node.sourceName name: node.sourceName
}) });
(window as any).pressModelEntities.set(node.id, entityObject) (window as any).pressModelEntities.set(node.id, entityObject)
} }

View File

@ -595,6 +595,7 @@ export const useTreeNode = () => {
node.sourceName = sourceName; node.sourceName = sourceName;
node.oldname = sourceName; node.oldname = sourceName;
node.params = params; node.params = params;
delete node.title
window.treeObj.updateNode(node); window.treeObj.updateNode(node);
} }

View File

@ -614,6 +614,7 @@ defineExpose({
transform: translateY(-50%); transform: translateY(-50%);
width: 17vw; width: 17vw;
height: calc(100% - 420px); height: calc(100% - 420px);
z-index: 1;
// overflow-x: hidden; // overflow-x: hidden;
.box1 { .box1 {

View File

@ -0,0 +1,11 @@
let eventBus
function setEventBus(bus: any) {
eventBus = bus
}
function getEventBus() {
return eventBus
}
export { setEventBus, getEventBus }

View File

@ -135,6 +135,8 @@ import { sysChange as utilsSysChange } from '@/utils/sysChange'
import { getdefaultStyle } from '../components/propertyBox/defaultStyle/style' import { getdefaultStyle } from '../components/propertyBox/defaultStyle/style'
import { getdefaultLabelStyle } from '../components/propertyBox/defaultLabelStyle/style' import { getdefaultLabelStyle } from '../components/propertyBox/defaultLabelStyle/style'
import { setEventBus } from './eventBus'
const { rightMenus } = useRightOperate() const { rightMenus } = useRightOperate()
const firstMenuRef = ref(null) const firstMenuRef = ref(null)
const bottomMenuRef = ref(null) const bottomMenuRef = ref(null)
@ -146,6 +148,9 @@ let tree = ref()
let selectImgRef = ref() let selectImgRef = ref()
let editdirectoryBox = ref() let editdirectoryBox = ref()
setEventBus(eventBus)
// 标注标绘默认样式 // 标注标绘默认样式
if (!localStorage.getItem('defaultStyle')) { if (!localStorage.getItem('defaultStyle')) {
let defaultStyle = getdefaultStyle(null) let defaultStyle = getdefaultStyle(null)

View File

@ -187,24 +187,30 @@
<div class="item port"> <div class="item port">
<template v-if="servVal == '单机'"> <template v-if="servVal == '单机'">
<span class="itemLabel">端口</span> <span class="itemLabel">端口</span>
<el-form-item prop="localport" :rules="[ <el-form-item
{ prop="localport"
validator: validateLocalportRange, :rules="[
trigger: 'blur' {
} validator: validateLocalportRange,
]"> trigger: 'blur'
}
]"
>
<el-input-number v-model="localport" :controls="false" /> <el-input-number v-model="localport" :controls="false" />
</el-form-item> </el-form-item>
</template> </template>
<template v-if="servVal == '网络'"> <template v-if="servVal == '网络'">
<span class="itemLabel">端口</span> <span class="itemLabel">端口</span>
<el-form-item prop="port" :rules="[ <el-form-item
{ prop="port"
validator: validatePortRange, :rules="[
message: '端口号必须在 102465535 之间', {
trigger: 'blur' validator: validatePortRange,
} message: '端口号必须在 102465535 之间',
]"> trigger: 'blur'
}
]"
>
<el-input-number v-model="port" :controls="false" /> <el-input-number v-model="port" :controls="false" />
</el-form-item> </el-form-item>
</template> </template>
@ -250,14 +256,20 @@
<span class="fankuai"></span> <span class="fankuai"></span>
{{ t('auths.authCode') }} {{ t('auths.authCode') }}
</div> </div>
<div <div class="auth_info_text">
class="auth_info_text" <span
@click="copy(authInfo.license_code)" @click="copy(authInfo.license_code)"
style="cursor: pointer" style="cursor: pointer"
title="点击可复制" title="点击可复制"
> >{{ authInfo.license_code || '' }}</span
{{ authInfo.license_code || '' }} >
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon> <svg-icon
name="copy"
:size="20"
@click="copy(authInfo.license_code)"
title="点击可复制"
style="margin-left: 30px; cursor: pointer"
></svg-icon>
</div> </div>
</div> </div>
<div class="auth_info_box"> <div class="auth_info_box">
@ -313,6 +325,14 @@
import { User, Unlock, Setting, SwitchButton } from '@element-plus/icons-vue' import { User, Unlock, Setting, SwitchButton } from '@element-plus/icons-vue'
import { useLogin } from './useLogin' import { useLogin } from './useLogin'
import { useSetUp } from './useSetUp' import { useSetUp } from './useSetUp'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import useClipboard from 'vue-clipboard3'
import { ipcMain } from 'electron'
import { AuthApi } from '@/api/setting/auth'
import Dialog from '@/components/dialog/baseDialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { $sendElectronChanel } from '@/utils/communication'
const { const {
loginFormRef, loginFormRef,
@ -330,7 +350,6 @@ const {
loginInit, loginInit,
isDesktop isDesktop
} = useLogin() // 登录逻辑 } = useLogin() // 登录逻辑
console.log('isDesktop', isDesktop)
const { const {
serviceDialog, serviceDialog,
@ -358,21 +377,26 @@ onMounted(() => {
loginInit() loginInit()
initialize() initialize()
let isSeverInit = ipcRenderer.sendSync('judgment-isSeverInit'); let { isSeverInit, severError } = ipcRenderer.sendSync('judgment-isSeverInit')
// 如果服务端未初始化,等待初始化完成 // 如果服务端未初始化,等待初始化完成
if (isSeverInit) { if (isSeverInit) {
if (!router.currentRoute.value.query.type) { if (severError) {
ElMessage.error(severError)
return
} else if (!router.currentRoute.value.query.type) {
setTimeout(() => { setTimeout(() => {
getAuthCode() getAuthCode()
getAuthInfo() getAuthInfo()
}, 0); }, 0)
} else { } else {
isAuth.value = false isAuth.value = false
} }
} } else {
else { ipcRenderer.once('program-init', (e, error) => {
ipcRenderer.once('program-init', () => { if (error) {
if (!router.currentRoute.value.query.type) { ElMessage.error(error)
return
} else if (!router.currentRoute.value.query.type) {
getAuthCode() getAuthCode()
getAuthInfo() getAuthInfo()
} else { } else {
@ -383,14 +407,6 @@ onMounted(() => {
}) })
//授权判断 //授权判断
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import useClipboard from 'vue-clipboard3'
import { ipcMain } from 'electron'
import { AuthApi } from '@/api/setting/auth'
import Dialog from '@/components/dialog/baseDialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { $sendElectronChanel } from '@/utils/communication'
let isAuth = ref(true) let isAuth = ref(true)
@ -402,7 +418,6 @@ const getAuthInfo = async () => {
if (typeof res.data === 'object') { if (typeof res.data === 'object') {
authInfo.value.generateTime = res.data.generateTime authInfo.value.generateTime = res.data.generateTime
authInfo.value.expireTime = res.data.expireTime authInfo.value.expireTime = res.data.expireTime
console.log(authInfo.value.expireTime, '授权时间222')
getStatus2() getStatus2()
getStatus(res.data.expireTime) getStatus(res.data.expireTime)
} }
@ -512,7 +527,6 @@ const getStatus2 = () => {
const timestamp = new Date(authInfo.value.expireTime).getTime() const timestamp = new Date(authInfo.value.expireTime).getTime()
const currentTimestamp = Date.now() const currentTimestamp = Date.now()
console.log('timestamp', timestamp > currentTimestamp)
if (timestamp > currentTimestamp) { if (timestamp > currentTimestamp) {
authInfo.value.status = true authInfo.value.status = true
} else { } else {
@ -540,27 +554,26 @@ const copy = async (text) => {
const validateLocalportRange = (rule, value, callback) => { const validateLocalportRange = (rule, value, callback) => {
if (!localport.value) { if (!localport.value) {
callback(new Error('请输入端口号')); // 校验失败 callback(new Error('请输入端口号')) // 校验失败
return return
} }
if (localport.value < 1024 || localport.value > 65535) { if (localport.value < 1024 || localport.value > 65535) {
callback(new Error('端口号范围在 102465535 之间')); // 校验失败 callback(new Error('端口号范围在 102465535 之间')) // 校验失败
} else { } else {
callback(); // 校验通过 callback() // 校验通过
} }
}; }
const validatePortRange = (rule, value, callback) => { const validatePortRange = (rule, value, callback) => {
if (!port.value) { if (!port.value) {
callback(new Error('请输入端口号')); // 校验失败 callback(new Error('请输入端口号')) // 校验失败
return return
} }
if (port.value < 1024 || port.value > 65535) { if (port.value < 1024 || port.value > 65535) {
callback(new Error('端口号范围在 102465535 之间')); // 校验失败 callback(new Error('端口号范围在 102465535 之间')) // 校验失败
} else { } else {
callback(); // 校验通过 callback() // 校验通过
} }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
// 添加过渡样式 // 添加过渡样式
@ -1139,8 +1152,11 @@ const validatePortRange = (rule, value, callback) => {
::v-deep .el-message-box { ::v-deep .el-message-box {
--el-messagebox-title-color: #fff !important; --el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important; --el-messagebox-content-color: #fff !important;
background: background: linear-gradient(
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%), 180deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.2) 100%
),
rgba(0, 0, 0, 0.6) !important; rgba(0, 0, 0, 0.6) !important;
} }
@ -1351,13 +1367,17 @@ const validatePortRange = (rule, value, callback) => {
.el-message-box { .el-message-box {
--el-messagebox-title-color: #fff !important; --el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important; --el-messagebox-content-color: #fff !important;
background: background: linear-gradient(
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%), 180deg,
rgba(var(--color-base1), 0) 0%,
rgba(var(--color-base1), 0.2) 100%
),
rgba(0, 0, 0, 0.6) !important; rgba(0, 0, 0, 0.6) !important;
.el-message-box__headerbtn { .el-message-box__headerbtn {
display: none !important; display: none !important;
} }
.el-message-box__btns { .el-message-box__btns {
.el-button { .el-button {
--el-button-text-color: #fff; --el-button-text-color: #fff;