12-5
This commit is contained in:
@ -37,6 +37,7 @@ win:
|
|||||||
executableName: 实景三维电子沙盘系统
|
executableName: 实景三维电子沙盘系统
|
||||||
icon: build/icons/81.ico
|
icon: build/icons/81.ico
|
||||||
nsis:
|
nsis:
|
||||||
|
unicode: true
|
||||||
artifactName: 实景三维电子沙盘系统-${version}-setup.${ext}
|
artifactName: 实景三维电子沙盘系统-${version}-setup.${ext}
|
||||||
shortcutName: 实景三维电子沙盘系统
|
shortcutName: 实景三维电子沙盘系统
|
||||||
uninstallDisplayName: 实景三维电子沙盘系统
|
uninstallDisplayName: 实景三维电子沙盘系统
|
||||||
|
|||||||
@ -1,9 +1,44 @@
|
|||||||
|
Unicode True
|
||||||
|
!include "LogicLib.nsh"
|
||||||
|
|
||||||
|
Var defaultInstallDir
|
||||||
|
|
||||||
!macro preInit
|
!macro preInit
|
||||||
SetRegView 64
|
|
||||||
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$PROGRAMFILES\${APP_ID}"
|
IfFileExists "D:\*.*" DDriveExists CDriveDefault
|
||||||
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$PROGRAMFILES\${APP_ID}"
|
|
||||||
#writeUninstaller $INSTDIR\uninstaller.exe
|
CDriveDefault:
|
||||||
SetRegView 32
|
StrCpy $defaultInstallDir "$PROGRAMFILES\${APP_ID}"
|
||||||
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "$PROGRAMFILES\${APP_ID}"
|
Goto doneDetect
|
||||||
WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "$PROGRAMFILES\${APP_ID}"
|
|
||||||
|
DDriveExists:
|
||||||
|
StrCpy $defaultInstallDir "D:\${APP_ID}"
|
||||||
|
|
||||||
|
doneDetect:
|
||||||
|
|
||||||
|
StrCpy $INSTDIR "$defaultInstallDir"
|
||||||
|
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
!macro init
|
||||||
|
${If} $INSTDIR == ""
|
||||||
|
StrCpy $INSTDIR "$defaultInstallDir"
|
||||||
|
${EndIf}
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
|
!insertmacro preInit
|
||||||
|
!insertmacro init
|
||||||
|
|
||||||
|
Section "MainSection" SEC01
|
||||||
|
CreateDirectory "$INSTDIR"
|
||||||
|
SetRegView 64
|
||||||
|
WriteRegStr HKLM "${INSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
|
||||||
|
WriteRegStr HKCU "${INSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
|
||||||
|
SetRegView 32
|
||||||
|
WriteRegStr HKLM "${INSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
|
||||||
|
WriteRegStr HKCU "${INSTALL_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Page Directory
|
||||||
|
Page InstFiles
|
||||||
@ -1,7 +1,7 @@
|
|||||||
server:
|
server:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 8848
|
port: 8849
|
||||||
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save
|
path: C:\Users\MSI\AppData\Roaming\dzsp_shijingjun_offline_Y_save
|
||||||
poi:
|
poi:
|
||||||
global:
|
global:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|||||||
Binary file not shown.
@ -1,3 +1,4 @@
|
|||||||
|
// @ts-nocheck
|
||||||
import { app, shell, BrowserWindow, ipcMain, globalShortcut, dialog, session } 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'
|
||||||
|
|||||||
8
src/renderer/public/sdk/YJEarth.min.js
vendored
8
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1503,7 +1503,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 80px;
|
left: 50% !important;
|
||||||
|
transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .pagination .pageTips {
|
.YJ-custom-base-dialog>.content .pagination .pageTips {
|
||||||
@ -1517,6 +1518,8 @@
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
margin: 0 2px !important;
|
||||||
|
padding: 0 2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog>.content .pagination .list-items {
|
.YJ-custom-base-dialog>.content .pagination .list-items {
|
||||||
|
|||||||
@ -162,6 +162,18 @@ export default {
|
|||||||
graphLabelManage: '军标管理',
|
graphLabelManage: '军标管理',
|
||||||
version: '版本信息'
|
version: '版本信息'
|
||||||
},
|
},
|
||||||
|
project: {
|
||||||
|
engineeringSettings: '工程设置',
|
||||||
|
importRoadNetwork: '路网导入',
|
||||||
|
locationData: '地点数据',
|
||||||
|
importPOLI: 'POLI导入',
|
||||||
|
engineeringData: '工程数据',
|
||||||
|
engineeringOverrideImport: '工程覆盖导入',
|
||||||
|
engineeringMergeImports: '工程合并导入',
|
||||||
|
engineeringExport: '工程导出',
|
||||||
|
activated: '已启用',
|
||||||
|
activate: '启用',
|
||||||
|
},
|
||||||
auths: {
|
auths: {
|
||||||
authType: '授权状态',
|
authType: '授权状态',
|
||||||
authTime: '授权时间',
|
authTime: '授权时间',
|
||||||
|
|||||||
@ -162,6 +162,18 @@ export default {
|
|||||||
photoManage: 'Icon Management',
|
photoManage: 'Icon Management',
|
||||||
version: 'Version information'
|
version: 'Version information'
|
||||||
},
|
},
|
||||||
|
project: {
|
||||||
|
engineeringSettings: 'Engineering Settings',
|
||||||
|
importRoadNetwork: 'Import Road Network',
|
||||||
|
locationData: 'Location Data',
|
||||||
|
importPOLI: 'Import POLI',
|
||||||
|
engineeringData: 'Engineering Data',
|
||||||
|
engineeringOverrideImport: 'Engineering Override Import',
|
||||||
|
engineeringMergeImports: 'Engineering Merge Imports',
|
||||||
|
engineeringExport: 'Engineering Export',
|
||||||
|
activated: 'activated',
|
||||||
|
activate: 'activate',
|
||||||
|
},
|
||||||
auths: {
|
auths: {
|
||||||
authType: 'Authorization status',
|
authType: 'Authorization status',
|
||||||
authTime: 'Authorization time',
|
authTime: 'Authorization time',
|
||||||
|
|||||||
@ -161,6 +161,18 @@ export default {
|
|||||||
photoManage: '圖標管理',
|
photoManage: '圖標管理',
|
||||||
version: '版本信息'
|
version: '版本信息'
|
||||||
},
|
},
|
||||||
|
project: {
|
||||||
|
engineeringSettings: '工程設置',
|
||||||
|
importRoadNetwork: '路網導入',
|
||||||
|
locationData: '地點數據',
|
||||||
|
importPOLI: 'POLI導入',
|
||||||
|
engineeringData: '工程數據',
|
||||||
|
engineeringOverrideImport: '工程覆蓋導入',
|
||||||
|
engineeringMergeImports: '工程合並導入',
|
||||||
|
engineeringExport: '工程導出',
|
||||||
|
activated: '已啟用',
|
||||||
|
activate: '啟用',
|
||||||
|
},
|
||||||
auths: {
|
auths: {
|
||||||
authType: '授權狀態',
|
authType: '授權狀態',
|
||||||
authTime: '授權時間',
|
authTime: '授權時間',
|
||||||
|
|||||||
@ -826,6 +826,10 @@ img {
|
|||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
.el-message.is-center {
|
||||||
|
top: calc(5vw + 10px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
.el-message--success {
|
.el-message--success {
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
|
||||||
|
|||||||
@ -228,7 +228,7 @@ export const initMapData = async (type, data, cd) => {
|
|||||||
if(type === 'textBox') {
|
if(type === 'textBox') {
|
||||||
entityObject.callback = (options) => {
|
entityObject.callback = (options) => {
|
||||||
let params = structuredClone(options)
|
let params = structuredClone(options)
|
||||||
let sourceName = '文本框'
|
let sourceName = params.text ? params.text : '文本框'
|
||||||
delete params.name
|
delete params.name
|
||||||
delete params.host
|
delete params.host
|
||||||
let params2 = {
|
let params2 = {
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="engineering">
|
<div class="engineering">
|
||||||
<div class="engineering_title">
|
<div class="engineering_title">
|
||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
<span class="setting_title">工程设置</span>
|
<span class="setting_title">{{ t('project.engineeringSettings') }}</span>
|
||||||
|
|
||||||
<!-- <el-upload
|
<!-- <el-upload
|
||||||
:action="uploadUrl()"
|
:action="uploadUrl()"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<svg-icon name="road_network" />
|
<svg-icon name="road_network" />
|
||||||
</template>
|
</template>
|
||||||
<span>路网导入</span>
|
<span>{{ t('project.importRoadNetwork') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- </el-upload> -->
|
<!-- </el-upload> -->
|
||||||
</div>
|
</div>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<div class="item_right">
|
<div class="item_right">
|
||||||
<span style="color: rgba(var(--color-text2), 1)">{{ item.createdAt }}</span>
|
<span style="color: rgba(var(--color-text2), 1)">{{ item.createdAt }}</span>
|
||||||
<div class="but">
|
<div class="but">
|
||||||
<span v-if="item.isEnable">已启用</span>
|
<span v-if="item.isEnable">{{ t('project.activated') }}</span>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!item.isEnable"
|
v-if="!item.isEnable"
|
||||||
@ -52,7 +52,7 @@
|
|||||||
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
||||||
@click="enableRouteData(item)"
|
@click="enableRouteData(item)"
|
||||||
>
|
>
|
||||||
<span>启用</span>
|
<span>{{ t('project.activate') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!item.isEnable"
|
v-if="!item.isEnable"
|
||||||
@ -60,7 +60,7 @@
|
|||||||
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
||||||
@click="delRouteData(item)"
|
@click="delRouteData(item)"
|
||||||
>
|
>
|
||||||
<span>删除</span>
|
<span>{{ t('general.删除') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -70,7 +70,7 @@
|
|||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="engineering_title2">
|
<div class="engineering_title2">
|
||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
<span class="setting_title">地点数据</span>
|
<span class="setting_title">{{ t('project.locationData') }}</span>
|
||||||
<el-button
|
<el-button
|
||||||
color="#004b4b"
|
color="#004b4b"
|
||||||
@click="poiImport"
|
@click="poiImport"
|
||||||
@ -79,7 +79,7 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<svg-icon name="POI" />
|
<svg-icon name="POI" />
|
||||||
</template>
|
</template>
|
||||||
<span>POIL导入</span>
|
<span>{{ t('project.importPOLI') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="fileList" v-if="poiList.length">
|
<div class="fileList" v-if="poiList.length">
|
||||||
@ -101,7 +101,7 @@
|
|||||||
<div class="item_right">
|
<div class="item_right">
|
||||||
<span style="color: rgba(var(--color-text2), 1)">{{ item.createdAt }}</span>
|
<span style="color: rgba(var(--color-text2), 1)">{{ item.createdAt }}</span>
|
||||||
<div class="but">
|
<div class="but">
|
||||||
<span v-if="item.isEnable">已启用</span>
|
<span v-if="item.isEnable">{{ t('project.activated') }}</span>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!item.isEnable"
|
v-if="!item.isEnable"
|
||||||
@ -109,7 +109,7 @@
|
|||||||
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
||||||
@click="enablePoieData(item)"
|
@click="enablePoieData(item)"
|
||||||
>
|
>
|
||||||
<span>启用</span>
|
<span>{{ t('project.activate') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!item.isEnable"
|
v-if="!item.isEnable"
|
||||||
@ -117,7 +117,7 @@
|
|||||||
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
style="border: 1px solid rgba(var(--color-base1), 0.5)"
|
||||||
@click="delPoiData(item)"
|
@click="delPoiData(item)"
|
||||||
>
|
>
|
||||||
<span>删除</span>
|
<span>{{ t('general.删除') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="engineering_title2">
|
<div class="engineering_title2">
|
||||||
<span class="fankuai"></span>
|
<span class="fankuai"></span>
|
||||||
<span class="setting_title">工程数据</span>
|
<span class="setting_title">{{ t('project.engineeringData') }}</span>
|
||||||
<el-button
|
<el-button
|
||||||
@click="importProject"
|
@click="importProject"
|
||||||
color="#004b4b"
|
color="#004b4b"
|
||||||
@ -136,7 +136,7 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<svg-icon name="leading_in" />
|
<svg-icon name="leading_in" />
|
||||||
</template>
|
</template>
|
||||||
<span>工程覆盖导入</span>
|
<span>{{ t('project.engineeringOverrideImport') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@click="mergeProject"
|
@click="mergeProject"
|
||||||
@ -146,7 +146,7 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<svg-icon name="leading_in" />
|
<svg-icon name="leading_in" />
|
||||||
</template>
|
</template>
|
||||||
<span>工程合并导入</span>
|
<span>{{ t('project.engineeringMergeImports') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@click="derive"
|
@click="derive"
|
||||||
@ -156,7 +156,7 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<svg-icon name="leading_out" />
|
<svg-icon name="leading_out" />
|
||||||
</template>
|
</template>
|
||||||
<span>工程导出</span>
|
<span>{{ t('project.engineeringExport') }}</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
@ -176,7 +176,8 @@ import {
|
|||||||
$changeComponentShow
|
$changeComponentShow
|
||||||
} from '@/utils/communication'
|
} from '@/utils/communication'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { dialog } from 'electron'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
const { t } = useI18n()
|
||||||
// 上传状态
|
// 上传状态
|
||||||
const isUploading = ref(false)
|
const isUploading = ref(false)
|
||||||
|
|
||||||
|
|||||||
@ -603,21 +603,23 @@ const sysChange = async () => {
|
|||||||
}
|
}
|
||||||
const searchWayChange = (val) => {
|
const searchWayChange = (val) => {
|
||||||
localStorage.setItem('searchWay', val)
|
localStorage.setItem('searchWay', val)
|
||||||
|
ElMessage.closeAll()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '操作成功',
|
message: '切换成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const concurrentWorkloadChange = (val) => {
|
const concurrentWorkloadChange = (val) => {
|
||||||
YJ.Global.setMaximumRequestsPerServer(val)
|
YJ.Global.setMaximumRequestsPerServer(val)
|
||||||
localStorage.setItem('concurrentcode', val)
|
localStorage.setItem('concurrentcode', val)
|
||||||
|
ElMessage.closeAll()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '操作成功',
|
message: '切换成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const setView = () => {
|
const setView = () => {
|
||||||
let msg = '操作成功'
|
let msg = '设置成功'
|
||||||
let view = YJ.Global.getCurrentView(window.earth)
|
let view = YJ.Global.getCurrentView(window.earth)
|
||||||
const options = {
|
const options = {
|
||||||
destination: view.position,
|
destination: view.position,
|
||||||
@ -625,6 +627,7 @@ const setView = () => {
|
|||||||
}
|
}
|
||||||
YJ.Global.setDefaultView(window.earth, options)
|
YJ.Global.setDefaultView(window.earth, options)
|
||||||
localStorage.setItem('defaultView', JSON.stringify(options))
|
localStorage.setItem('defaultView', JSON.stringify(options))
|
||||||
|
ElMessage.closeAll()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: msg,
|
message: msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
@ -633,6 +636,7 @@ const setView = () => {
|
|||||||
const setData = () => {
|
const setData = () => {
|
||||||
TreeApi.getTreeDefault().then((res) => {
|
TreeApi.getTreeDefault().then((res) => {
|
||||||
if (res.code == 0 || res.code == 200) {
|
if (res.code == 0 || res.code == 200) {
|
||||||
|
ElMessage.closeAll()
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '添加完成,2秒后将重启系统',
|
message: '添加完成,2秒后将重启系统',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|||||||
@ -270,7 +270,8 @@ const methodMap = {
|
|||||||
opt: {
|
opt: {
|
||||||
id: id,
|
id: id,
|
||||||
name: name,
|
name: name,
|
||||||
positions: positions
|
positions: positions,
|
||||||
|
material: 1,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -970,11 +971,11 @@ const methodMap = {
|
|||||||
params: {
|
params: {
|
||||||
id: id,
|
id: id,
|
||||||
path: path[0],
|
path: path[0],
|
||||||
field: 'id',
|
// field: 'id',
|
||||||
name: name,
|
name: name,
|
||||||
headTables: [],
|
headTables: [],
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
color: 'rgba(0,255,184,0.5)',
|
// color: 'rgba(0,255,184,0.5)',
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
id,
|
id,
|
||||||
|
|||||||
@ -112,7 +112,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="标签风格" name="4">
|
<el-tab-pane label="标签风格" name="4">
|
||||||
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<el-slider
|
<el-slider
|
||||||
v-model="precision"
|
v-model="precision"
|
||||||
:min="0"
|
:min="1"
|
||||||
:max="maxNum"
|
:max="maxNum"
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
style="max-width: 100%"
|
style="max-width: 100%"
|
||||||
@ -77,7 +77,7 @@
|
|||||||
id="precision"
|
id="precision"
|
||||||
type="number"
|
type="number"
|
||||||
title=""
|
title=""
|
||||||
min="1"
|
min="2"
|
||||||
max="360"
|
max="360"
|
||||||
v-model="maxNum"
|
v-model="maxNum"
|
||||||
@input="precisionMaxInput"
|
@input="precisionMaxInput"
|
||||||
|
|||||||
@ -183,8 +183,17 @@ const close = (e) => {
|
|||||||
baseDialog.value?.close()
|
baseDialog.value?.close()
|
||||||
}
|
}
|
||||||
const sure = (e) => {
|
const sure = (e) => {
|
||||||
YJ.Global.ContourStartDraw(window.earth, show.value)
|
let value = YJ.Global.ContourStartDraw(window.earth, show.value)
|
||||||
baseDialog.value?.close()
|
if (value) {
|
||||||
|
ElMessage.closeAll()
|
||||||
|
ElMessage({
|
||||||
|
message: value,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
baseDialog.value?.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open
|
open
|
||||||
|
|||||||
@ -129,7 +129,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="标签风格" name="4">
|
<el-tab-pane label="标签风格" name="4">
|
||||||
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -90,7 +90,9 @@
|
|||||||
<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">
|
||||||
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -173,7 +173,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="标签风格" name="3">
|
<el-tab-pane label="标签风格" name="3">
|
||||||
<labelStyle type="线" :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle type="线" :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -383,7 +383,7 @@ const renderModel = async (model) => {
|
|||||||
let GroundSvg = new YJ.Obj.GroundSvg(window.earth, option)
|
let GroundSvg = new YJ.Obj.GroundSvg(window.earth, option)
|
||||||
|
|
||||||
GroundSvg.load(() => {
|
GroundSvg.load(() => {
|
||||||
GroundSvg.drag(true, (data) => {
|
GroundSvg.drag(true, null, (data) => {
|
||||||
let params = data
|
let params = data
|
||||||
delete params.attributeType
|
delete params.attributeType
|
||||||
delete params.attribute.ISC
|
delete params.attribute.ISC
|
||||||
@ -416,6 +416,10 @@ const renderModel = async (model) => {
|
|||||||
DbOption.isShow = true
|
DbOption.isShow = true
|
||||||
DbOption.params = JSON.stringify(DbOption.params)
|
DbOption.params = JSON.stringify(DbOption.params)
|
||||||
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
|
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
|
||||||
|
|
||||||
|
if (GroundSvg.options.id) {
|
||||||
|
(window as any)._entityMap.set(GroundSvg.options.id, GroundSvg)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
min="0.001"
|
min="0.001"
|
||||||
max="200"
|
max="200"
|
||||||
step="0.001"
|
step="0.001"
|
||||||
@input="$handleInputLimit"
|
@input="scaleChange"
|
||||||
v-model="entityOptions.scale.x"
|
v-model="entityOptions.scale.x"
|
||||||
/>
|
/>
|
||||||
<div class="input-number input-number-unit-1" style="width: auto; margin-left: 10px">
|
<div class="input-number input-number-unit-1" style="width: auto; margin-left: 10px">
|
||||||
@ -62,7 +62,7 @@
|
|||||||
min="0.001"
|
min="0.001"
|
||||||
max="200"
|
max="200"
|
||||||
step="0.001"
|
step="0.001"
|
||||||
@input="$handleInputLimit"
|
@input="scaleChange"
|
||||||
v-model="entityOptions.scale.x"
|
v-model="entityOptions.scale.x"
|
||||||
/>
|
/>
|
||||||
<span class="arrow"></span>
|
<span class="arrow"></span>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
min="0.001"
|
min="0.001"
|
||||||
max="200"
|
max="200"
|
||||||
step="0.001"
|
step="0.001"
|
||||||
@input="$handleInputLimit"
|
@input="scaleChange"
|
||||||
v-model="entityOptions.scale.y"
|
v-model="entityOptions.scale.y"
|
||||||
/>
|
/>
|
||||||
<div class="input-number input-number-unit-1" style="width: auto; margin-left: 10px">
|
<div class="input-number input-number-unit-1" style="width: auto; margin-left: 10px">
|
||||||
@ -88,7 +88,7 @@
|
|||||||
min="0.001"
|
min="0.001"
|
||||||
max="200"
|
max="200"
|
||||||
step="0.001"
|
step="0.001"
|
||||||
@input="$handleInputLimit"
|
@input="scaleChange"
|
||||||
v-model="entityOptions.scale.y"
|
v-model="entityOptions.scale.y"
|
||||||
/>
|
/>
|
||||||
<span class="arrow"></span>
|
<span class="arrow"></span>
|
||||||
@ -200,7 +200,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, getCurrentInstance } from 'vue'
|
||||||
import { inject } from 'vue'
|
import { inject } from 'vue'
|
||||||
import { TreeApi } from '@/api/tree'
|
import { TreeApi } from '@/api/tree'
|
||||||
import Dialog from '@/components/dialog/baseDialog.vue'
|
import Dialog from '@/components/dialog/baseDialog.vue'
|
||||||
@ -210,6 +210,7 @@ import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
|||||||
import { getFontList } from './fontSelect'
|
import { getFontList } from './fontSelect'
|
||||||
|
|
||||||
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
|
const { cusUpdateNode, cusRemoveNode } = useTreeNode()
|
||||||
|
const { proxy } = getCurrentInstance()!
|
||||||
|
|
||||||
const fontList = ref(getFontList())
|
const fontList = ref(getFontList())
|
||||||
|
|
||||||
@ -241,9 +242,10 @@ const entityOptions: any = ref({})
|
|||||||
let originalOptions: any
|
let originalOptions: any
|
||||||
let that: any
|
let that: any
|
||||||
|
|
||||||
const scaleChange = () => {
|
const scaleChange = (e) => {
|
||||||
entityOptions.value.scaleY = entityOptions.value.scaleX
|
proxy?.$handleInputLimit(e)
|
||||||
entityOptions.value.scaleZ = entityOptions.value.scaleX
|
console.log(entityOptions.value.scale)
|
||||||
|
entityOptions.value.scale = entityOptions.value.scale
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = async (id: any, type: any) => {
|
const open = async (id: any, type: any) => {
|
||||||
@ -349,8 +351,10 @@ const closeCallback = () => {
|
|||||||
|
|
||||||
const nodeEdit = () => {
|
const nodeEdit = () => {
|
||||||
that.drag(!entityOptions.value._isdrag, (data) => {
|
that.drag(!entityOptions.value._isdrag, (data) => {
|
||||||
that.options = data
|
entityOptions.value.angle = data.angle
|
||||||
})
|
entityOptions.value.scale.x = data.scale.x
|
||||||
|
entityOptions.value.scale.y = data.scale.y
|
||||||
|
}, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
@ -363,6 +367,7 @@ const confirm = () => {
|
|||||||
delete params.attribute.camera
|
delete params.attribute.camera
|
||||||
delete params.attribute.goods
|
delete params.attribute.goods
|
||||||
delete params.attribute.vr
|
delete params.attribute.vr
|
||||||
|
delete params.host
|
||||||
|
|
||||||
let params2 = {
|
let params2 = {
|
||||||
id: params.id,
|
id: params.id,
|
||||||
|
|||||||
@ -112,7 +112,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="标签风格" name="4">
|
<el-tab-pane label="标签风格" name="4">
|
||||||
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -46,7 +46,9 @@
|
|||||||
<attribute :entityOptions="entityOptions"></attribute>
|
<attribute :entityOptions="entityOptions"></attribute>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="标签风格" name="4">
|
<el-tab-pane label="标签风格" name="4">
|
||||||
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -53,7 +53,9 @@
|
|||||||
<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">
|
||||||
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -69,7 +69,9 @@
|
|||||||
<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">
|
||||||
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -103,7 +103,7 @@ const updateNode = (children, field) => {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(children[i].params) {
|
if(children[i].params) {
|
||||||
cusUpdateNode({ "id": children[i].id, "sourceName": children[i].params.properties[field], "params": children[i].params })
|
cusUpdateNode({ "id": children[i].id, "sourceName": (children[i].params.properties[field] || children[i].params.properties[field] == 0)? children[i].params.properties[field] : '未知', "params": children[i].params })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog ref="baseDialog" :title="title" width="900px" left="calc(50% - 450px)" top="calc(50% - 360px)"
|
||||||
ref="baseDialog"
|
:closeCallback="closeCallback">
|
||||||
:title="title"
|
|
||||||
width="900px"
|
|
||||||
left="calc(50% - 450px)"
|
|
||||||
top="calc(50% - 360px)"
|
|
||||||
:closeCallback="closeCallback"
|
|
||||||
>
|
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span>
|
||||||
<div class="div-item" style="display: flex">
|
<div class="div-item" style="display: flex">
|
||||||
@ -64,13 +58,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<Pagination
|
<Pagination :total="total" v-model:page="pageNum" v-model:limit="pageSize" :pageSizes="pageSizes"
|
||||||
:total="total"
|
@pagination="getTableList" />
|
||||||
v-model:page="pageNum"
|
|
||||||
v-model:limit="pageSize"
|
|
||||||
:pageSizes="pageSizes"
|
|
||||||
@pagination="getTableList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -248,9 +237,9 @@ const updateNode = (children, field) => {
|
|||||||
cusUpdateNode({
|
cusUpdateNode({
|
||||||
id: children[i].id,
|
id: children[i].id,
|
||||||
sourceName:
|
sourceName:
|
||||||
children[i].params.properties[field] === undefined
|
(children[i].params.properties[field] || children[i].params.properties[field] == 0)
|
||||||
? ''
|
? children[i].params.properties[field]
|
||||||
: children[i].params.properties[field],
|
: '未知',
|
||||||
params: children[i].params
|
params: children[i].params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -399,6 +388,7 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog {
|
.YJ-custom-base-dialog {
|
||||||
::v-deep .foot {
|
::v-deep .foot {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|||||||
@ -30,8 +30,8 @@
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<span class="label">拉伸高度</span>
|
<span class="label">拉伸高度</span>
|
||||||
<div class="input-number input-number-unit-1">
|
<div class="input-number input-number-unit-1">
|
||||||
<input class="input" type="number" title="" min="0" max="999999999"
|
<input class="input" type="number" title="" min="0" max="999999999" v-model="entityOptions.extrudedHeight"
|
||||||
v-model="entityOptions.extrudedHeight" @input="$handleInputLimit">
|
@input="$handleInputLimit">
|
||||||
<span class="unit">m</span>
|
<span class="unit">m</span>
|
||||||
<span class="arrow"></span>
|
<span class="arrow"></span>
|
||||||
</div>
|
</div>
|
||||||
@ -40,25 +40,36 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col material-box">
|
<div class="col material-box">
|
||||||
<span class="label">拐角类型</span>
|
<span class="label">拐角类型</span>
|
||||||
<el-select class="input input-select input-select-line-type"
|
<el-select class="input input-select input-select-line-type" v-model="entityOptions.cornerType">
|
||||||
v-model="entityOptions.material">
|
<template #label="{ label, value }">
|
||||||
<el-option v-for="item in material" :key="item.key" :label="item.name" :value="item.key">
|
<svg class="icon-yj">
|
||||||
<i class="yj-custom-icon" :class="item.icon"></i>
|
<use :xlink:href="`#yj-${cornerType[value].icon}`"></use>
|
||||||
{{ item.name }}
|
</svg>
|
||||||
|
{{ label }}
|
||||||
|
</template>
|
||||||
|
<el-option v-for="item in cornerType" :key="item.key" :label="item.name" :value="item.key">
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<svg class="icon-yj" style="width: 12px; height: 12px;">
|
||||||
|
<use :xlink:href="`#yj-${item.icon}`"></use>
|
||||||
|
</svg>
|
||||||
|
{{ item.name }}
|
||||||
|
</div>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col material-box">
|
<div class="col material-box">
|
||||||
<span class="label">墙体样式</span>
|
<span class="label">墙体样式</span>
|
||||||
<el-select class="input input-select input-select-line-type"
|
<el-select class="input input-select input-select-line-type" v-model="entityOptions.material">
|
||||||
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>
|
||||||
@ -74,18 +85,18 @@
|
|||||||
</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">
|
||||||
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<span class="custom-divider"></span>
|
<span class="custom-divider"></span>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -116,30 +127,50 @@ 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 cornerType = ref([
|
||||||
|
{
|
||||||
|
name: '直角',
|
||||||
|
value: '直角',
|
||||||
|
key: 0,
|
||||||
|
icon: 'icon-zj',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '斜角',
|
||||||
|
value: '斜角',
|
||||||
|
key: 1,
|
||||||
|
icon: 'icon-xj',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '圆角',
|
||||||
|
value: '圆角',
|
||||||
|
key: 2,
|
||||||
|
icon: 'icon-yj',
|
||||||
|
},
|
||||||
|
])
|
||||||
const material = ref([
|
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-brick1'
|
icon: '../sdk/img/material/brick1.png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '黄砖墙',
|
name: '黄砖墙',
|
||||||
value: '黄砖墙',
|
value: '黄砖墙',
|
||||||
key: 2,
|
key: 2,
|
||||||
icon: 'icon-wall-brick2'
|
icon: '../sdk/img/material/brick2.png'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '灰瓷墙',
|
name: '灰瓷墙',
|
||||||
value: '灰瓷墙',
|
value: '灰瓷墙',
|
||||||
key: 3,
|
key: 3,
|
||||||
icon: 'icon-wall-brick3'
|
icon: '../sdk/img/material/brick3.png'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
eventBus.on("openStandTextAdd", () => {
|
eventBus.on("openStandTextAdd", () => {
|
||||||
@ -151,7 +182,7 @@ let originalOptions: any
|
|||||||
let that: any
|
let that: any
|
||||||
const colorRef = ref(null)
|
const colorRef = ref(null)
|
||||||
const open = async (id: any) => {
|
const open = async (id: any) => {
|
||||||
that = window.earth.entityMap.get('aaa')
|
that = window.earth.entityMap.get(id)
|
||||||
originalOptions = structuredClone(that.options)
|
originalOptions = structuredClone(that.options)
|
||||||
entityOptions.value = that
|
entityOptions.value = that
|
||||||
baseDialog.value?.open()
|
baseDialog.value?.open()
|
||||||
@ -193,31 +224,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(() => {
|
||||||
// 用户点击取消,不执行任何操作
|
// 用户点击取消,不执行任何操作
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const nodeEdit = () => {
|
const nodeEdit = () => {
|
||||||
that.nodeEdit()
|
that.nodeEdit()
|
||||||
@ -225,7 +256,6 @@ const nodeEdit = () => {
|
|||||||
|
|
||||||
const closeCallback = () => {
|
const closeCallback = () => {
|
||||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||||
that.positionEditing = false
|
|
||||||
that.reset()
|
that.reset()
|
||||||
eventBus?.emit("destroyComponent")
|
eventBus?.emit("destroyComponent")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,9 @@
|
|||||||
<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">
|
||||||
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
<div class="div-item">
|
||||||
|
<labelStyle :entityOptions="entityOptions"></labelStyle>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export function renderVector(node, ifFly = true) {
|
|||||||
sourceType: item.type,
|
sourceType: item.type,
|
||||||
sourcePath: params.path,
|
sourcePath: params.path,
|
||||||
sourceName:
|
sourceName:
|
||||||
item.properties[Vector.field] || Object.keys(item.properties)[0] || '未知',
|
(item.properties[Vector.field] || item.properties[Vector.field] == 0) ? item.properties[Vector.field] : '未知',
|
||||||
params: {
|
params: {
|
||||||
...item,
|
...item,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { TreeApi } from '@/api/tree'
|
import { TreeApi } from '@/api/tree'
|
||||||
import { $changeComponentPop } from '@/utils/communication'
|
import { $changeComponentPop, $sendElectronChanel, $recvElectronChanel } from '@/utils/communication'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||||
import { initMapData } from '@/common/initMapData'
|
import { initMapData } from '@/common/initMapData'
|
||||||
@ -85,12 +85,10 @@ export const useRightOperate = () => {
|
|||||||
params: {
|
params: {
|
||||||
id: id,
|
id: id,
|
||||||
path: filePaths[i],
|
path: filePaths[i],
|
||||||
field: 'id',
|
// field: 'id',
|
||||||
name: name,
|
name: name,
|
||||||
headTables: [],
|
headTables: [{}],
|
||||||
opacity: 1,
|
show: true,
|
||||||
color: 'rgba(0,255,184,0.5)',
|
|
||||||
show: true
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
TreeApi.addOtherSource(params)
|
TreeApi.addOtherSource(params)
|
||||||
@ -191,35 +189,21 @@ export const useRightOperate = () => {
|
|||||||
parentId = node.parentId
|
parentId = node.parentId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const pickerOpts = {
|
let option = {
|
||||||
types: [
|
properties: ['openFile', 'multiSelections'],
|
||||||
|
filters: [
|
||||||
{
|
{
|
||||||
description: '全景图',
|
name: '全景图',
|
||||||
accept:
|
extensions: ['jpg']
|
||||||
{
|
|
||||||
'image/jpg': ['.jpg']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
excludeAcceptAllOption: true,
|
|
||||||
multiple: true
|
|
||||||
};
|
|
||||||
if ((window as any).showOpenFilePicker) {
|
|
||||||
const fileHandles = await (window as any).showOpenFilePicker(pickerOpts);
|
|
||||||
const files = await Promise.all(fileHandles.map(fileHandle => fileHandle.getFile()));
|
|
||||||
const dataTransfer = new DataTransfer();
|
|
||||||
handleFileImgInput(files, parentId, 'vrImage')
|
|
||||||
} else {
|
|
||||||
let input = document.createElement('input')
|
|
||||||
input.type = 'file'
|
|
||||||
input.accept = '.jpg'
|
|
||||||
input.multiple = true
|
|
||||||
input.click()
|
|
||||||
input.addEventListener('input', async (e: any) => {
|
|
||||||
let files = e.target.files
|
|
||||||
handleFileImgInput(files, parentId, 'vrImage')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
$sendElectronChanel('open-directory-dialog', option)
|
||||||
|
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||||
|
if (paths.length) {
|
||||||
|
handleFileImgInput(paths, parentId, 'vrImage')
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//图片定位
|
//图片定位
|
||||||
const pictureLocation = async () => {
|
const pictureLocation = async () => {
|
||||||
@ -233,35 +217,21 @@ export const useRightOperate = () => {
|
|||||||
parentId = node.parentId
|
parentId = node.parentId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const pickerOpts = {
|
let option = {
|
||||||
types: [
|
properties: ['openFile', 'multiSelections'],
|
||||||
|
filters: [
|
||||||
{
|
{
|
||||||
description: '无人机航拍',
|
name: '无人机航拍',
|
||||||
accept:
|
extensions: ['jpg']
|
||||||
{
|
|
||||||
'image/jpg': ['.jpg']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
excludeAcceptAllOption: true,
|
|
||||||
multiple: true
|
|
||||||
};
|
|
||||||
if ((window as any).showOpenFilePicker) {
|
|
||||||
const fileHandles = await (window as any).showOpenFilePicker(pickerOpts);
|
|
||||||
const files = await Promise.all(fileHandles.map(fileHandle => fileHandle.getFile()));
|
|
||||||
const dataTransfer = new DataTransfer();
|
|
||||||
handleFileImgInput(files, parentId, 'linkImage')
|
|
||||||
} else {
|
|
||||||
let input = document.createElement('input')
|
|
||||||
input.type = 'file'
|
|
||||||
input.accept = '.jpg'
|
|
||||||
input.multiple = true
|
|
||||||
input.click()
|
|
||||||
input.addEventListener('input', async (e: any) => {
|
|
||||||
let files = e.target.files
|
|
||||||
handleFileImgInput(files, parentId, 'linkImage')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
$sendElectronChanel('open-directory-dialog', option)
|
||||||
|
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||||
|
if (paths.length) {
|
||||||
|
handleFileImgInput(paths, parentId, 'linkImage')
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//属性
|
//属性
|
||||||
const showAttr = (eventBus) => {
|
const showAttr = (eventBus) => {
|
||||||
@ -442,6 +412,9 @@ export const useRightOperate = () => {
|
|||||||
if (node.sourceType == 'standText' || node.sourceType == 'groundText') {
|
if (node.sourceType == 'standText' || node.sourceType == 'groundText') {
|
||||||
sourceName = params.text
|
sourceName = params.text
|
||||||
}
|
}
|
||||||
|
else if (node.sourceType == 'textBox') {
|
||||||
|
sourceName = params.text ? params.text : '文本框'
|
||||||
|
}
|
||||||
let params2 = {
|
let params2 = {
|
||||||
"id": node.id,
|
"id": node.id,
|
||||||
"sourceName": sourceName,
|
"sourceName": sourceName,
|
||||||
@ -634,12 +607,13 @@ export const useRightOperate = () => {
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
let ids: any = []
|
let ids: any = []
|
||||||
let filesList: any = []
|
let filesList: any = []
|
||||||
|
console.log('files', files)
|
||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
const element = files[i]
|
const element = files[i]
|
||||||
ids.push(new YJ.Tools().randomString())
|
ids.push(new YJ.Tools().randomString())
|
||||||
filesList.push(element)
|
filesList.push(element)
|
||||||
formData.append('files', element)
|
|
||||||
}
|
}
|
||||||
|
formData.append('filePaths', filesList)
|
||||||
let params: any = {
|
let params: any = {
|
||||||
"id": ids[0],
|
"id": ids[0],
|
||||||
"show": true,
|
"show": true,
|
||||||
|
|||||||
@ -583,7 +583,7 @@ export const useTree = () => {
|
|||||||
let res = await TreeApi.getTreeList()
|
let res = await TreeApi.getTreeList()
|
||||||
if ([0, 200].includes(res.code)) {
|
if ([0, 200].includes(res.code)) {
|
||||||
res.data.list.sort((a: any, b: any) => {
|
res.data.list.sort((a: any, b: any) => {
|
||||||
if (a.treeIndex && b.treeIndex) {
|
if ((a.treeIndex || a.treeIndex == 0) && (b.treeIndex || b.treeIndex == 0)) {
|
||||||
return a.treeIndex - b.treeIndex
|
return a.treeIndex - b.treeIndex
|
||||||
}
|
}
|
||||||
if (a.treeIndex) {
|
if (a.treeIndex) {
|
||||||
|
|||||||
@ -456,7 +456,7 @@ export const useTreeNode = () => {
|
|||||||
const cusNodeIcon = async (node) => {
|
const cusNodeIcon = async (node) => {
|
||||||
let availablePort = await ipcRenderer.invoke('get-available-port');
|
let availablePort = await ipcRenderer.invoke('get-available-port');
|
||||||
let type
|
let type
|
||||||
if (node.sourcePath || node.sourceType === 'vector') {
|
if ((node.sourcePath || node.sourceType === 'vector') && (node.sourceType !== 'vrImage' && node.sourceType !== 'linkImage')) {
|
||||||
let path = node.sourcePath ? node.sourcePath : JSON.parse(node.params).path
|
let path = node.sourcePath ? node.sourcePath : JSON.parse(node.params).path
|
||||||
// 获取最后一个点的位置
|
// 获取最后一个点的位置
|
||||||
const lastDotIndex = path.lastIndexOf('.');
|
const lastDotIndex = path.lastIndexOf('.');
|
||||||
|
|||||||
@ -222,7 +222,7 @@
|
|||||||
v-for="(item, index) in poiOptions"
|
v-for="(item, index) in poiOptions"
|
||||||
:key="item.search_key + index"
|
:key="item.search_key + index"
|
||||||
:label="item.search_key"
|
:label="item.search_key"
|
||||||
:value="item.address"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -417,6 +417,7 @@ const searchPlace = debounce(function () {
|
|||||||
item.location.lat
|
item.location.lat
|
||||||
)
|
)
|
||||||
arr.push({
|
arr.push({
|
||||||
|
id: item.id,
|
||||||
address: item.name,
|
address: item.name,
|
||||||
search_key: item.name,
|
search_key: item.name,
|
||||||
search_type: item.id,
|
search_type: item.id,
|
||||||
@ -505,7 +506,7 @@ const searchPlace = debounce(function () {
|
|||||||
|
|
||||||
const availablePort = ref(55110)
|
const availablePort = ref(55110)
|
||||||
const locationChange = () => {
|
const locationChange = () => {
|
||||||
let item = poiOptions.value.find((item) => item.address == value.value)
|
let item = poiOptions.value.find((item) => item.id == value.value)
|
||||||
let id = new YJ.Tools().randomString()
|
let id = new YJ.Tools().randomString()
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
select1.value.blur()
|
select1.value.blur()
|
||||||
@ -811,14 +812,26 @@ defineExpose({
|
|||||||
width: 380px !important;
|
width: 380px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-select-dropdown__item {
|
||||||
|
svg {
|
||||||
|
fill: #ffffff !important;
|
||||||
|
margin: 2px 5px 0 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.el-select-dropdown__item.is-hovering {
|
.el-select-dropdown__item.is-hovering {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
color: rgba(var(--color-base1), 1) !important;
|
color: rgba(var(--color-base1), 1) !important;
|
||||||
|
svg {
|
||||||
|
fill: rgba(var(--color-base1), 1) !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select-dropdown__item.is-selected {
|
.el-select-dropdown__item.is-selected {
|
||||||
background-color: unset !important;
|
background-color: unset !important;
|
||||||
color: rgba(var(--color-base1), 1) !important;
|
color: rgba(var(--color-base1), 1) !important;
|
||||||
|
svg {
|
||||||
|
fill: rgba(var(--color-base1), 1) !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .custom-dropdown2 {
|
// .custom-dropdown2 {
|
||||||
|
|||||||
@ -631,7 +631,7 @@ const validatePortRange = (rule, value, callback) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
::placeholder {
|
::placeholder {
|
||||||
color: #fff;
|
color: rgba(113, 126, 143, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
|
|||||||
@ -17,56 +17,59 @@ export const useSetUp = () => {
|
|||||||
const selectedService = ref('接口服务')
|
const selectedService = ref('接口服务')
|
||||||
const serviceOptions: any = ref([{ name: '接口服务' }, { name: '北斗串口' }])
|
const serviceOptions: any = ref([{ name: '接口服务' }, { name: '北斗串口' }])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let serveUrl: any = getIP()
|
|
||||||
let isOk = validateURL(serveUrl)
|
|
||||||
let serverMode = localStorage.getItem('serverMode')
|
let serverMode = localStorage.getItem('serverMode')
|
||||||
if (isOk) {
|
const reset = () => {
|
||||||
const parsedUrl = new URL(serveUrl);
|
let serveUrl: any = getIP()
|
||||||
const host = parsedUrl.host;
|
let isOk = validateURL(serveUrl)
|
||||||
const ipPort = host.split(':');
|
serverMode = localStorage.getItem('serverMode')
|
||||||
if (serverMode === 'false') {
|
if (isOk) {
|
||||||
servVal.value = '网络'
|
const parsedUrl = new URL(serveUrl);
|
||||||
ip.value = ipPort[0]
|
const host = parsedUrl.host;
|
||||||
port.value = Number(ipPort[1])
|
const ipPort = host.split(':');
|
||||||
prototype.value = parsedUrl.protocol.slice(0, -1)
|
if (serverMode === 'false') {
|
||||||
}
|
servVal.value = '网络'
|
||||||
else {
|
ip.value = ipPort[0]
|
||||||
localip.value = ipPort[0]
|
port.value = Number(ipPort[1])
|
||||||
localport.value = Number(ipPort[1])
|
prototype.value = parsedUrl.protocol.slice(0, -1)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
localip.value = ipPort[0]
|
||||||
|
localport.value = Number(ipPort[1])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset()
|
||||||
|
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
switch (selectedService.value) {
|
switch (selectedService.value) {
|
||||||
case '接口服务':
|
case '接口服务':
|
||||||
// this.submitIP();
|
// this.submitIP();
|
||||||
if (serverMode === 'false') {
|
if (serverMode === 'false') {
|
||||||
if(Number(port.value) < 1024 || Number(port.value) > 65535) {
|
if (Number(port.value) < 1024 || Number(port.value) > 65535) {
|
||||||
// ElMessage.error('端口号范围为1024-65535')
|
// ElMessage.error('端口号范围为1024-65535')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(Number(localport.value) < 1024 || Number(localport.value) > 65535) {
|
if (Number(localport.value) < 1024 || Number(localport.value) > 65535) {
|
||||||
// ElMessage.error('端口号范围为1024-65535')
|
// ElMessage.error('端口号范围为1024-65535')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
submitIP()
|
submitIP()
|
||||||
break
|
break
|
||||||
case '北斗串口':
|
case '北斗串口':
|
||||||
// this.submitGPS();
|
submitGPS();
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
selectedService.value = '接口服务'
|
||||||
}
|
}
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
serviceDialog.value = false
|
serviceDialog.value = false
|
||||||
|
selectedService.value = '接口服务'
|
||||||
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
const submitIP = () => {
|
const submitIP = () => {
|
||||||
@ -99,6 +102,9 @@ export const useSetUp = () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const submitGPS = () => {
|
||||||
|
serviceDialog.value = false
|
||||||
|
}
|
||||||
const initialize = () => {
|
const initialize = () => {
|
||||||
|
|
||||||
if (serverMode === 'false') {
|
if (serverMode === 'false') {
|
||||||
|
|||||||
Reference in New Issue
Block a user