Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
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 "D:\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
|
||||
|
||||
@ -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
@ -1486,7 +1486,8 @@
|
||||
display: flex;
|
||||
padding-left: 0;
|
||||
position: relative;
|
||||
left: 80px;
|
||||
left: 50% !important;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.YJ-custom-base-dialog>.content .pagination .pageTips {
|
||||
@ -1500,6 +1501,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: '授权时间',
|
||||
@ -366,7 +378,7 @@ export default {
|
||||
operationalTime: "作战时间",
|
||||
enterTuiyan: "进入推演页面",
|
||||
ersanwei: "二三维模式",
|
||||
back: "返回",
|
||||
back: "返回到历史推演",
|
||||
exitTs: "退出方案库",
|
||||
save: "保存",
|
||||
cancel: "取消",
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -48,10 +48,10 @@ export default {
|
||||
firstMenu: {
|
||||
situation: '態勢推演',
|
||||
measure: '測量庫',
|
||||
tool: '工具库',
|
||||
effect: '工具庫',
|
||||
tool: '工具庫',
|
||||
effect: '特效庫',
|
||||
bigData: '大數據',
|
||||
modelLibrary: '模型库',
|
||||
modelLibrary: '模型庫',
|
||||
onlinePictureSource: '在線圖源',
|
||||
analysis: '分析庫',
|
||||
militaryMark: '軍標庫',
|
||||
@ -161,6 +161,18 @@ export default {
|
||||
photoManage: '圖標管理',
|
||||
version: '版本信息'
|
||||
},
|
||||
project: {
|
||||
engineeringSettings: '工程設置',
|
||||
importRoadNetwork: '路網導入',
|
||||
locationData: '地點數據',
|
||||
importPOLI: 'POLI導入',
|
||||
engineeringData: '工程數據',
|
||||
engineeringOverrideImport: '工程覆蓋導入',
|
||||
engineeringMergeImports: '工程合並導入',
|
||||
engineeringExport: '工程導出',
|
||||
activated: '已啟用',
|
||||
activate: '啟用',
|
||||
},
|
||||
auths: {
|
||||
authType: '授權狀態',
|
||||
authTime: '授權時間',
|
||||
@ -364,7 +376,7 @@ export default {
|
||||
operationalTime: "作戰時間",
|
||||
enterTuiyan: "進入推演頁面",
|
||||
ersanwei: "二三維模式",
|
||||
back: "返回",
|
||||
back: "返回到曆史推演",
|
||||
exitTs: "退出方案庫",
|
||||
save: "儲存",
|
||||
cancel: "取消",
|
||||
|
||||
@ -46,6 +46,13 @@ export const TsApi = {
|
||||
data
|
||||
})
|
||||
},
|
||||
//修改树层级
|
||||
updateTreeIndex: async (data: any) => {
|
||||
return await request.post({
|
||||
url: `/tsSource/dragSource`,
|
||||
data
|
||||
})
|
||||
},
|
||||
//树的隐藏显示
|
||||
updateTreeShow: async (data: any) => {
|
||||
let datas = []
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -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 = {
|
||||
|
||||
@ -156,22 +156,25 @@ const initTreeCallBack = () => {
|
||||
}
|
||||
}
|
||||
if (layerTypes.includes(arr[i].sourceType)) {
|
||||
console.log(detail, params)
|
||||
if (!detail && !params) {
|
||||
detail = {
|
||||
id: arr[i].id,
|
||||
name: arr[i].sourceName,
|
||||
isShow: arr[i].isShow
|
||||
show: Boolean(arr[i].isShow)
|
||||
}
|
||||
}
|
||||
layers.push(
|
||||
{
|
||||
let layer = {
|
||||
sourceType: arr[i].sourceType,
|
||||
detail: {...detail, ...params}
|
||||
detail: {...detail, ...params, layerIndex: layers.length + 1}
|
||||
}
|
||||
)
|
||||
console.log(layer)
|
||||
layers.push(layer)
|
||||
} else {
|
||||
console.log({...detail, ...params})
|
||||
initMapData(arr[i].sourceType, {...detail, ...params},)
|
||||
let details = {...detail, ...params}
|
||||
details.show = Boolean(arr[i].isShow)
|
||||
initMapData(arr[i].sourceType, details)
|
||||
|
||||
}
|
||||
}
|
||||
@ -199,7 +202,7 @@ const initTreeCallBack = () => {
|
||||
if ((window as any).earth_ts) {
|
||||
for (let i = 0; i < layers.length; i++) {
|
||||
initMapData(layers[i].sourceType, layers[i].detail, (layer) => {
|
||||
layer.show = Boolean(layers[i].isShow)
|
||||
// layer.show = Boolean(layers[i].show)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -210,6 +213,48 @@ const onDblClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
entityObject = (window as any)._entityMap.get(treeNode.id)
|
||||
entityObject.flyTo()
|
||||
}
|
||||
/**
|
||||
* 用于捕获节点拖拽操作结束的事件回调函数
|
||||
* @param event 事件对象
|
||||
* @param treeId 树形结构id
|
||||
* @param treeNodes 被拖拽的节点 JSON 数据集合
|
||||
* @param targetNode 成为 treeNodes 拖拽结束的目标节点 JSON 数据对象
|
||||
* @param moveType
|
||||
*/
|
||||
const onDrop = async (event: DragEvent,
|
||||
treeId: any,
|
||||
treeNodes: any,
|
||||
targetNode: any,
|
||||
moveType: any) => {
|
||||
const someNode: any = getSameLevel(window['treeObj'], treeNodes[0])
|
||||
const newNode = someNode.map((item: any) => {
|
||||
let index = item.getIndex()
|
||||
item.treeIndex = index
|
||||
return {
|
||||
...item,
|
||||
treeIndex: item.getIndex() + 1
|
||||
}
|
||||
})
|
||||
const list = newNode.map((item: any) => {
|
||||
return {
|
||||
id: item.id,
|
||||
treeIndex: item.treeIndex,
|
||||
parentId: item.parentId || ''
|
||||
}
|
||||
})
|
||||
const res = await TsApi.updateTreeIndex(list)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
ElMessage({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '操作失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
const onClick = (event: MouseEvent, treeId: string, treeNode: any) => {
|
||||
console.log('selectNode', treeNode)
|
||||
|
||||
@ -422,7 +467,8 @@ const setting = {
|
||||
onRightClick: rightClick,
|
||||
onClick: onClick,
|
||||
onCheck: onCheck,
|
||||
onDblClick: onDblClick
|
||||
onDblClick: onDblClick,
|
||||
onDrop: onDrop,
|
||||
/*
|
||||
onClick: this.onClick,
|
||||
onDblClick: this.onDblClick,
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
</template>
|
||||
<template v-for="(event,index) in eventList" :key="index">
|
||||
<div class="row" :style="getStyle">
|
||||
<div class="bar" :style="progressStyle(event)" @dblclick="clickEventBar(event)"><!--{{
|
||||
event.name + event.duration_time
|
||||
}}-->
|
||||
<div class="bar oneLine" :style="progressStyle(event)" @dblclick="clickEventBar(event)"
|
||||
:title="event.name + event.duration_time ">
|
||||
{{ event.name }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -56,6 +56,7 @@ let ticLabel = (val) => {
|
||||
<style scoped>
|
||||
/* 样式不变 */
|
||||
.timeScale {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
|
||||
@ -145,6 +145,9 @@ window['updateProp'] = (key: string, val: any) => {
|
||||
console.log("window['updateProp']", key, val)
|
||||
if (propsMap[key])
|
||||
propsMap[key].value = val
|
||||
if (key == 'currentStamp') {
|
||||
eventBus.emit("changeStamp", val)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -322,7 +322,12 @@ eventBus.on('add-event', (task) => {
|
||||
// 新建态势推演对象
|
||||
let newTS = (params, events) => {
|
||||
|
||||
window['tsObj'] = new TS({name: params.name, tasks: events, startTimestamp: params.start_time})
|
||||
window['tsObj'] = new TS({
|
||||
name: params.name,
|
||||
tasks: events,
|
||||
startTimestamp: params.start_time,
|
||||
wheel: params.wheel || 20
|
||||
})
|
||||
tsOBJ.value = window['tsObj']
|
||||
window['tsAction'] = window['tsObj'].initAction()
|
||||
|
||||
@ -331,18 +336,33 @@ let newTS = (params, events) => {
|
||||
// dom加载完成后,通过宽度和间隔来计算出刻度线的数量
|
||||
window['tsObj']._Store.init()
|
||||
window['tsObj'].renderLabel({left: 0})
|
||||
stamp.value = getFormatedDate(window['tsObj']._Store._currentTimestamp)
|
||||
})
|
||||
}
|
||||
getEventList()
|
||||
|
||||
|
||||
let getFormatedDate = (stamp = null) => {
|
||||
const date = stamp ? new Date(stamp) : new Date();
|
||||
const formattedDate = date.toLocaleString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
hour12: false // 禁用12小时制,使用24小时制
|
||||
}).replace(/\//g, '-');
|
||||
return formattedDate
|
||||
}
|
||||
onMounted(async () => {
|
||||
let baseURL = localStorage.getItem('service')
|
||||
// getAuthInfo()
|
||||
await YJ.on({host: baseURL})
|
||||
createEarth()
|
||||
window.addEventListener('click', handleClick)
|
||||
window.addEventListener('resize', handleResize)
|
||||
// window.addEventListener('contextmenu', handleClick)
|
||||
|
||||
})
|
||||
const createEarth = async () => {
|
||||
(window as any).earth_ts = await new YJ.YJEarth('earthContainer', {navigationHelpButton: false})
|
||||
@ -379,27 +399,25 @@ const createEarth = async () => {
|
||||
console.log("createEarth++++++++++++++++++++")
|
||||
cabin.value.initTreeCallBack()
|
||||
}
|
||||
/*
|
||||
const timer = setInterval(() => {
|
||||
const date = new Date();
|
||||
// 配置年-月-日 时:分:秒 格式
|
||||
const formattedDate = date.toLocaleString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
hour12: false // 禁用12小时制,使用24小时制
|
||||
}).replace(/\//g, '-');
|
||||
stamp.value = formattedDate
|
||||
stamp.value = getFormatedData()
|
||||
}, 1000)
|
||||
*/
|
||||
|
||||
eventBus.on("changeStamp", val => {
|
||||
stamp.value = getFormatedDate(val)
|
||||
})
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer)
|
||||
// clearInterval(timer)
|
||||
window.removeEventListener('click', handleClick)
|
||||
window.removeEventListener('resize', handleResize)
|
||||
// window.removeEventListener('contextmenu', handleClick)
|
||||
})
|
||||
|
||||
//
|
||||
const handleResize = () => {
|
||||
window['tsObj']._Store.init()
|
||||
}
|
||||
// 定义可复用的回调函数
|
||||
const handleClick = (e) => {
|
||||
// console.log('点击事件触发', e)
|
||||
|
||||
@ -740,6 +740,7 @@ const confirm = () => {
|
||||
TsApi.updateTsSource(params2).then(res => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({type: "success", message: "操作成功"})
|
||||
// @ts-ignore
|
||||
cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)})
|
||||
}
|
||||
})
|
||||
|
||||
@ -490,6 +490,7 @@ const confirm = () => {
|
||||
TsApi.updateTsSource(params2).then(res => {
|
||||
if (res.code == 200) {
|
||||
ElMessage({type: "success", message: "操作成功"})
|
||||
// @ts-ignore
|
||||
cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)})
|
||||
}
|
||||
})
|
||||
|
||||
@ -192,7 +192,10 @@ export function addMapSource(type, pId, option, cb: any = null) {
|
||||
cb && cb(res)
|
||||
// 上树
|
||||
let selectedNode = window.treeObj.getNodeByParam('id', pId)
|
||||
cusAddNodes(window.treeObj, selectedNode, [dbOption], true)
|
||||
cusAddNodes(window.treeObj, selectedNode, [dbOption], true).then((addNodes) => {
|
||||
console.log("addNodes", addNodes)
|
||||
addNodes.length && window['treeObj'].selectNode(addNodes[0])
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -60,9 +60,10 @@
|
||||
<div class="tableBox">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
|
||||
height="100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column align="center" prop="name" :label="t('ts.deduceName')"/>
|
||||
<el-table-column align="center" :label="t('ts.deduceDesc')" :class-name="'ellipsis-column'">
|
||||
<template #default="scope">
|
||||
@ -164,6 +165,7 @@ import zhTw from 'element-plus/es/locale/lang/zh-tw'
|
||||
import en from 'element-plus/es/locale/lang/en'
|
||||
|
||||
const language = ref('zh-CN')
|
||||
// @ts-ignore
|
||||
language.value = JSON.parse(localStorage.getItem("systemSetting"))?.language || 'zh-CN'
|
||||
const locale = computed(() => (language.value === "zh-CN" ? zhCn : (language.value === "zh-TW" ? zhTw : en)))
|
||||
|
||||
@ -228,6 +230,10 @@ const getList = (params: any = null) => {
|
||||
TsApi.planList(formData).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
/* let arr = []
|
||||
for (let i = 0; i < 50; i++) {
|
||||
arr.push(res.data.records[0])
|
||||
}*/
|
||||
tableData.value = res.data.records
|
||||
total.value = res.data.total
|
||||
}
|
||||
@ -438,6 +444,11 @@ onUnmounted(() => {
|
||||
height: 26px;
|
||||
right: 8px;
|
||||
top: 8px;
|
||||
fill: #fff;
|
||||
|
||||
&:hover {
|
||||
fill: #0ff;
|
||||
}
|
||||
}
|
||||
|
||||
.list-container {
|
||||
@ -494,7 +505,8 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
flex: auto;
|
||||
height: calc(72vh - 159px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.pageBox {
|
||||
|
||||
@ -31,7 +31,7 @@ export class Store {
|
||||
_currentTimestamp
|
||||
_tasks
|
||||
_multiplier
|
||||
private _panelWidth //面板宽度
|
||||
_panelWidth //面板宽度
|
||||
|
||||
constructor(option) {
|
||||
this._multiplier = option.multiplier || 1
|
||||
@ -53,9 +53,9 @@ export class Store {
|
||||
let panel = dom.getBoundingClientRect();// 安全调用
|
||||
// console.log(dom.getBoundingClientRect())
|
||||
this._panelWidth = Math.floor(panel.width);
|
||||
dom['style'].width = this._panelWidth + "px"
|
||||
// dom['style'].width = this._panelWidth + "px"
|
||||
this.setScale("ticTiny", this.ceil(this._panelWidth / this.getScale("distanceOfTicTiny")))
|
||||
this.setScale("ticMain", this.ceil(this._panelWidth / this.getScale("distanceOfTicMain")) + 1)
|
||||
this.setScale("ticMain", this.ceil(this._panelWidth / this.getScale("distanceOfTicMain")) + 2)
|
||||
|
||||
|
||||
// this.getMinTimeOfPanel()
|
||||
@ -129,10 +129,10 @@ export class Store {
|
||||
// 通过时间戳来设置位置
|
||||
setCursorLeft(stamp) {
|
||||
let newLeft = ((stamp - this._startTimestamp) / 1000) * this._scales.preSecondPx - this._scales.scrollLeft
|
||||
console.log("stamp", stamp)
|
||||
console.log("this._startTimestamp", this._startTimestamp)
|
||||
console.log("this._scales.preSecondPx", this._scales.preSecondPx)
|
||||
console.log("newLeft", newLeft)
|
||||
// console.log("stamp", stamp)
|
||||
// console.log("this._startTimestamp", this._startTimestamp)
|
||||
// console.log("this._scales.preSecondPx", this._scales.preSecondPx)
|
||||
// console.log("newLeft", newLeft)
|
||||
|
||||
this.setScale('cursorLeft', newLeft)
|
||||
}
|
||||
@ -177,4 +177,9 @@ export class Store {
|
||||
window['updateProp']("currentStamp", val)
|
||||
}
|
||||
|
||||
set panelWidth(val) {
|
||||
console.log("新的面板宽度", val)
|
||||
this._panelWidth = val
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ export class TS extends Tools {
|
||||
this._Clock = new Clock()
|
||||
this.name = option.name
|
||||
this._Store._scales.fullHeight = this._Store._tasks.length * this._Store._scales.cellHeight
|
||||
|
||||
}
|
||||
|
||||
tuningLine() {
|
||||
@ -38,6 +37,15 @@ export class TS extends Tools {
|
||||
this._Store.setScale('timeLabels', allTimeLabels)
|
||||
}
|
||||
|
||||
setWheel(value) {
|
||||
let num = Math.ceil(value / 3)
|
||||
// 小格宽度的选值,【3,5,8】
|
||||
let index = value % 3
|
||||
this._Store.setScale('preMainIndex', num - 1)
|
||||
this._Store.setScale('distanceOfTicTiny', this._Store.getScale("distanceOfTicTinyRange")[index])
|
||||
this._Store.setScale('preSecondPx', this._Store.getScale("distanceOfTicMain") / this._Store.getScale("preMains")[this._Store.getScale("preMainIndex")])
|
||||
}
|
||||
|
||||
initAction() {
|
||||
return (l) => {
|
||||
console.log("action的参数", l)
|
||||
@ -47,13 +55,7 @@ export class TS extends Tools {
|
||||
case "wheel-timeLine":
|
||||
const value = l.num
|
||||
// 第几个大格,小标-=1
|
||||
let num = Math.ceil(value / 3)
|
||||
// 小格宽度的选值,【3,5,8】
|
||||
let index = value % 3
|
||||
this._Store.setScale('preMainIndex', num - 1)
|
||||
this._Store.setScale('distanceOfTicTiny', this._Store.getScale("distanceOfTicTinyRange")[index])
|
||||
this._Store.setScale('preSecondPx', this._Store.getScale("distanceOfTicMain") / this._Store.getScale("preMains")[this._Store.getScale("preMainIndex")])
|
||||
|
||||
this.setWheel(value)
|
||||
break;
|
||||
case "scroll-chart":
|
||||
this._Store._scales.scrollTop = obj.top
|
||||
|
||||
@ -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
|
||||
})
|
||||
|
||||
@ -221,10 +221,12 @@ defineExpose({
|
||||
::v-deep .el-form-item--label-right .el-form-item__label {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item .el-input__wrapper {
|
||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
|
||||
}
|
||||
|
||||
::v-deep .el-form-item .el-select__wrapper {
|
||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
|
||||
@ -233,15 +235,19 @@ defineExpose({
|
||||
border: unset !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-form-item .el-input__inner {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item .el-select__placeholder {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
::v-deep .el-input__wrapper {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
::v-deep .el-button:hover {
|
||||
background-color: rgba(var(--color-base1), 0.2) !important;
|
||||
color: rgba(var(--color-base1), 1) !important;
|
||||
|
||||
@ -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) {
|
||||
@ -704,6 +704,7 @@ export const useTree = () => {
|
||||
layers.sort((obj1, obj2) => {
|
||||
return obj1.params.layerIndex - obj2.params.layerIndex;
|
||||
});
|
||||
console.log("layers", layers)
|
||||
for (let i = 0; i < layers.length; i++) {
|
||||
initMapData(layers[i].sourceType, layers[i].params, null)
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -734,7 +734,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