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