This commit is contained in:
2025-12-08 11:10:13 +08:00
51 changed files with 542 additions and 301 deletions

View File

@ -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: 实景三维电子沙盘系统

View File

@ -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 "D:\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

View File

@ -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

View File

@ -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'

File diff suppressed because one or more lines are too long

View File

@ -1486,7 +1486,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 {
@ -1500,6 +1501,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 {

View File

@ -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: '授权时间',
@ -366,7 +378,7 @@ export default {
operationalTime: "作战时间", operationalTime: "作战时间",
enterTuiyan: "进入推演页面", enterTuiyan: "进入推演页面",
ersanwei: "二三维模式", ersanwei: "二三维模式",
back: "返回", back: "返回到历史推演",
exitTs: "退出方案库", exitTs: "退出方案库",
save: "保存", save: "保存",
cancel: "取消", cancel: "取消",

View File

@ -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',

View File

@ -48,10 +48,10 @@ export default {
firstMenu: { firstMenu: {
situation: '態勢推演', situation: '態勢推演',
measure: '測量庫', measure: '測量庫',
tool: '工具', tool: '工具',
effect: '工具庫', effect: '特效庫',
bigData: '大數據', bigData: '大數據',
modelLibrary: '模型', modelLibrary: '模型',
onlinePictureSource: '在線圖源', onlinePictureSource: '在線圖源',
analysis: '分析庫', analysis: '分析庫',
militaryMark: '軍標庫', militaryMark: '軍標庫',
@ -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: '授權時間',
@ -364,7 +376,7 @@ export default {
operationalTime: "作戰時間", operationalTime: "作戰時間",
enterTuiyan: "進入推演頁面", enterTuiyan: "進入推演頁面",
ersanwei: "二三維模式", ersanwei: "二三維模式",
back: "返回", back: "返回到曆史推演",
exitTs: "退出方案庫", exitTs: "退出方案庫",
save: "儲存", save: "儲存",
cancel: "取消", cancel: "取消",

View File

@ -46,6 +46,13 @@ export const TsApi = {
data data
}) })
}, },
//修改树层级
updateTreeIndex: async (data: any) => {
return await request.post({
url: `/tsSource/dragSource`,
data
})
},
//树的隐藏显示 //树的隐藏显示
updateTreeShow: async (data: any) => { updateTreeShow: async (data: any) => {
let datas = [] let datas = []

File diff suppressed because one or more lines are too long

View File

@ -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)),

View File

@ -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 = {

View File

@ -156,22 +156,25 @@ const initTreeCallBack = () => {
} }
} }
if (layerTypes.includes(arr[i].sourceType)) { if (layerTypes.includes(arr[i].sourceType)) {
console.log(detail, params)
if (!detail && !params) { if (!detail && !params) {
detail = { detail = {
id: arr[i].id, id: arr[i].id,
name: arr[i].sourceName, name: arr[i].sourceName,
isShow: arr[i].isShow show: Boolean(arr[i].isShow)
} }
} }
layers.push( let layer = {
{
sourceType: arr[i].sourceType, sourceType: arr[i].sourceType,
detail: {...detail, ...params} detail: {...detail, ...params, layerIndex: layers.length + 1}
} }
) console.log(layer)
layers.push(layer)
} else { } else {
console.log({...detail, ...params}) 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) { if ((window as any).earth_ts) {
for (let i = 0; i < layers.length; i++) { for (let i = 0; i < layers.length; i++) {
initMapData(layers[i].sourceType, layers[i].detail, (layer) => { 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 = (window as any)._entityMap.get(treeNode.id)
entityObject.flyTo() 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) => { const onClick = (event: MouseEvent, treeId: string, treeNode: any) => {
console.log('selectNode', treeNode) console.log('selectNode', treeNode)
@ -422,7 +467,8 @@ const setting = {
onRightClick: rightClick, onRightClick: rightClick,
onClick: onClick, onClick: onClick,
onCheck: onCheck, onCheck: onCheck,
onDblClick: onDblClick onDblClick: onDblClick,
onDrop: onDrop,
/* /*
onClick: this.onClick, onClick: this.onClick,
onDblClick: this.onDblClick, onDblClick: this.onDblClick,

View File

@ -7,9 +7,9 @@
</template> </template>
<template v-for="(event,index) in eventList" :key="index"> <template v-for="(event,index) in eventList" :key="index">
<div class="row" :style="getStyle"> <div class="row" :style="getStyle">
<div class="bar" :style="progressStyle(event)" @dblclick="clickEventBar(event)"><!--{{ <div class="bar oneLine" :style="progressStyle(event)" @dblclick="clickEventBar(event)"
event.name + event.duration_time :title="event.name + event.duration_time ">
}}--> {{ event.name }}
</div> </div>
</div> </div>
</template> </template>

View File

@ -56,6 +56,7 @@ let ticLabel = (val) => {
<style scoped> <style scoped>
/* 样式不变 */ /* 样式不变 */
.timeScale { .timeScale {
width: 100%;
height: 30px; height: 30px;
position: relative; position: relative;
flex-shrink: 0; flex-shrink: 0;

View File

@ -145,6 +145,9 @@ window['updateProp'] = (key: string, val: any) => {
console.log("window['updateProp']", key, val) console.log("window['updateProp']", key, val)
if (propsMap[key]) if (propsMap[key])
propsMap[key].value = val propsMap[key].value = val
if (key == 'currentStamp') {
eventBus.emit("changeStamp", val)
}
} }

View File

@ -322,7 +322,12 @@ eventBus.on('add-event', (task) => {
// 新建态势推演对象 // 新建态势推演对象
let newTS = (params, events) => { 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'] tsOBJ.value = window['tsObj']
window['tsAction'] = window['tsObj'].initAction() window['tsAction'] = window['tsObj'].initAction()
@ -331,18 +336,33 @@ let newTS = (params, events) => {
// dom加载完成后通过宽度和间隔来计算出刻度线的数量 // dom加载完成后通过宽度和间隔来计算出刻度线的数量
window['tsObj']._Store.init() window['tsObj']._Store.init()
window['tsObj'].renderLabel({left: 0}) window['tsObj'].renderLabel({left: 0})
stamp.value = getFormatedDate(window['tsObj']._Store._currentTimestamp)
}) })
} }
getEventList() 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 () => { onMounted(async () => {
let baseURL = localStorage.getItem('service') let baseURL = localStorage.getItem('service')
// getAuthInfo() // getAuthInfo()
await YJ.on({host: baseURL}) await YJ.on({host: baseURL})
createEarth() createEarth()
window.addEventListener('click', handleClick) window.addEventListener('click', handleClick)
window.addEventListener('resize', handleResize)
// window.addEventListener('contextmenu', handleClick) // window.addEventListener('contextmenu', handleClick)
}) })
const createEarth = async () => { const createEarth = async () => {
(window as any).earth_ts = await new YJ.YJEarth('earthContainer', {navigationHelpButton: false}) (window as any).earth_ts = await new YJ.YJEarth('earthContainer', {navigationHelpButton: false})
@ -379,27 +399,25 @@ const createEarth = async () => {
console.log("createEarth++++++++++++++++++++") console.log("createEarth++++++++++++++++++++")
cabin.value.initTreeCallBack() cabin.value.initTreeCallBack()
} }
/*
const timer = setInterval(() => { const timer = setInterval(() => {
const date = new Date(); stamp.value = getFormatedData()
// 配置年-月-日 时:分:秒 格式
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
}, 1000) }, 1000)
*/
eventBus.on("changeStamp", val => {
stamp.value = getFormatedDate(val)
})
onUnmounted(() => { onUnmounted(() => {
clearInterval(timer) // clearInterval(timer)
window.removeEventListener('click', handleClick) window.removeEventListener('click', handleClick)
window.removeEventListener('resize', handleResize)
// window.removeEventListener('contextmenu', handleClick) // window.removeEventListener('contextmenu', handleClick)
}) })
//
const handleResize = () => {
window['tsObj']._Store.init()
}
// 定义可复用的回调函数 // 定义可复用的回调函数
const handleClick = (e) => { const handleClick = (e) => {
// console.log('点击事件触发', e) // console.log('点击事件触发', e)

View File

@ -740,6 +740,7 @@ const confirm = () => {
TsApi.updateTsSource(params2).then(res => { TsApi.updateTsSource(params2).then(res => {
if (res.code == 200) { if (res.code == 200) {
ElMessage({type: "success", message: "操作成功"}) ElMessage({type: "success", message: "操作成功"})
// @ts-ignore
cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)}) cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)})
} }
}) })

View File

@ -490,6 +490,7 @@ const confirm = () => {
TsApi.updateTsSource(params2).then(res => { TsApi.updateTsSource(params2).then(res => {
if (res.code == 200) { if (res.code == 200) {
ElMessage({type: "success", message: "操作成功"}) ElMessage({type: "success", message: "操作成功"})
// @ts-ignore
cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)}) cusUpdateNode({id: params.id, sourceName: params.name, detail: JSON.stringify(params)})
} }
}) })

View File

@ -192,7 +192,10 @@ export function addMapSource(type, pId, option, cb: any = null) {
cb && cb(res) cb && cb(res)
// 上树 // 上树
let selectedNode = window.treeObj.getNodeByParam('id', pId) 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])
})
}) })
} }

View File

@ -60,9 +60,10 @@
<div class="tableBox"> <div class="tableBox">
<el-table <el-table
:data="tableData" :data="tableData"
height="100%"
style="width: 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" prop="name" :label="t('ts.deduceName')"/>
<el-table-column align="center" :label="t('ts.deduceDesc')" :class-name="'ellipsis-column'"> <el-table-column align="center" :label="t('ts.deduceDesc')" :class-name="'ellipsis-column'">
<template #default="scope"> <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' import en from 'element-plus/es/locale/lang/en'
const language = ref('zh-CN') const language = ref('zh-CN')
// @ts-ignore
language.value = JSON.parse(localStorage.getItem("systemSetting"))?.language || 'zh-CN' language.value = JSON.parse(localStorage.getItem("systemSetting"))?.language || 'zh-CN'
const locale = computed(() => (language.value === "zh-CN" ? zhCn : (language.value === "zh-TW" ? zhTw : en))) 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 => { TsApi.planList(formData).then(res => {
console.log(res) console.log(res)
if (res.code == 200) { if (res.code == 200) {
/* let arr = []
for (let i = 0; i < 50; i++) {
arr.push(res.data.records[0])
}*/
tableData.value = res.data.records tableData.value = res.data.records
total.value = res.data.total total.value = res.data.total
} }
@ -438,6 +444,11 @@ onUnmounted(() => {
height: 26px; height: 26px;
right: 8px; right: 8px;
top: 8px; top: 8px;
fill: #fff;
&:hover {
fill: #0ff;
}
} }
.list-container { .list-container {
@ -494,7 +505,8 @@ onUnmounted(() => {
} }
.tableBox { .tableBox {
flex: auto; height: calc(72vh - 159px);
overflow-y: auto;
} }
.pageBox { .pageBox {

View File

@ -31,7 +31,7 @@ export class Store {
_currentTimestamp _currentTimestamp
_tasks _tasks
_multiplier _multiplier
private _panelWidth //面板宽度 _panelWidth //面板宽度
constructor(option) { constructor(option) {
this._multiplier = option.multiplier || 1 this._multiplier = option.multiplier || 1
@ -53,9 +53,9 @@ export class Store {
let panel = dom.getBoundingClientRect();// 安全调用 let panel = dom.getBoundingClientRect();// 安全调用
// console.log(dom.getBoundingClientRect()) // console.log(dom.getBoundingClientRect())
this._panelWidth = Math.floor(panel.width); 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("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() // this.getMinTimeOfPanel()
@ -129,10 +129,10 @@ export class Store {
// 通过时间戳来设置位置 // 通过时间戳来设置位置
setCursorLeft(stamp) { setCursorLeft(stamp) {
let newLeft = ((stamp - this._startTimestamp) / 1000) * this._scales.preSecondPx - this._scales.scrollLeft let newLeft = ((stamp - this._startTimestamp) / 1000) * this._scales.preSecondPx - this._scales.scrollLeft
console.log("stamp", stamp) // console.log("stamp", stamp)
console.log("this._startTimestamp", this._startTimestamp) // console.log("this._startTimestamp", this._startTimestamp)
console.log("this._scales.preSecondPx", this._scales.preSecondPx) // console.log("this._scales.preSecondPx", this._scales.preSecondPx)
console.log("newLeft", newLeft) // console.log("newLeft", newLeft)
this.setScale('cursorLeft', newLeft) this.setScale('cursorLeft', newLeft)
} }
@ -177,4 +177,9 @@ export class Store {
window['updateProp']("currentStamp", val) window['updateProp']("currentStamp", val)
} }
set panelWidth(val) {
console.log("新的面板宽度", val)
this._panelWidth = val
this.init()
}
} }

View File

@ -14,7 +14,6 @@ export class TS extends Tools {
this._Clock = new Clock() this._Clock = new Clock()
this.name = option.name this.name = option.name
this._Store._scales.fullHeight = this._Store._tasks.length * this._Store._scales.cellHeight this._Store._scales.fullHeight = this._Store._tasks.length * this._Store._scales.cellHeight
} }
tuningLine() { tuningLine() {
@ -38,6 +37,15 @@ export class TS extends Tools {
this._Store.setScale('timeLabels', allTimeLabels) 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() { initAction() {
return (l) => { return (l) => {
console.log("action的参数", l) console.log("action的参数", l)
@ -47,13 +55,7 @@ export class TS extends Tools {
case "wheel-timeLine": case "wheel-timeLine":
const value = l.num const value = l.num
// 第几个大格,小标-=1 // 第几个大格,小标-=1
let num = Math.ceil(value / 3) this.setWheel(value)
// 小格宽度的选值【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")])
break; break;
case "scroll-chart": case "scroll-chart":
this._Store._scales.scrollTop = obj.top this._Store._scales.scrollTop = obj.top

View File

@ -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)

View File

@ -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'

View File

@ -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,

View File

@ -112,7 +112,9 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="标签风格" name="4"> <el-tab-pane label="标签风格" name="4">
<div class="div-item">
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle> <labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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"

View File

@ -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)
if (value) {
ElMessage.closeAll()
ElMessage({
message: value,
type: 'error'
})
}
else {
baseDialog.value?.close() baseDialog.value?.close()
}
} }
defineExpose({ defineExpose({
open open

View File

@ -10,7 +10,7 @@
<template #content> <template #content>
<el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef"> <el-form label-width="100px" :model="addForm" :rules="peopleRules" ref="peopleFormRef">
<el-form-item label="名称" prop="cameraName"> <el-form-item label="名称" prop="cameraName">
<el-input v-model.trim="addForm.cameraName" clearable placeholder="请输入设备名称" /> <el-input v-model.trim="addForm.cameraName" clearable placeholder="请输入设备名称"/>
</el-form-item> </el-form-item>
<el-form-item label="设备IP" prop="ip"> <el-form-item label="设备IP" prop="ip">
<el-input v-model.trim="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input> <el-input v-model.trim="addForm.ip" clearable placeholder="请输入设备IP地址"></el-input>
@ -26,8 +26,8 @@
</el-form-item> </el-form-item>
<el-form-item label="设备类型" prop="type"> <el-form-item label="设备类型" prop="type">
<el-select v-model.trim="addForm.type" placeholder="请选择设备类型"> <el-select v-model.trim="addForm.type" placeholder="请选择设备类型">
<el-option label="海康" value="海康"> </el-option> <el-option label="海康" value="海康"></el-option>
<el-option label="大华" value="大华"> </el-option> <el-option label="大华" value="大华"></el-option>
<!-- <el-option label="手动录入" value="3"> </el-option> --> <!-- <el-option label="手动录入" value="3"> </el-option> -->
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -44,23 +44,23 @@
</el-form> </el-form>
</template> </template>
<template #footer> <template #footer>
<el-button type="primary" @click="submitProtal"> 确定 </el-button> <el-button type="primary" @click="submitProtal"> 确定</el-button>
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import {ref} 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'
import { initMapData } from '../../../common/initMapData' import {initMapData} from '../../../common/initMapData'
import { useTreeNode } from '../tree/hooks/treeNode' import {useTreeNode} from '../tree/hooks/treeNode'
import { deviceApi } from '@/api/deviceManage/index' import {deviceApi} from '@/api/deviceManage/index'
import { ElMessage, ElMessageBox } from 'element-plus' import {ElMessage, ElMessageBox} from 'element-plus'
const { cusAddNodes } = useTreeNode() const {cusAddNodes} = useTreeNode()
const baseDialog: any = ref(null) const baseDialog: any = ref(null)
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
@ -79,10 +79,10 @@ var addForm: any = ref({
}) })
const peopleRules: any = reactive({ const peopleRules: any = reactive({
cameraName: [{ required: true, message: '请输入名称', trigger: 'blur' }], cameraName: [{required: true, message: '请输入名称', trigger: 'blur'}],
ip: [{ required: true, message: '请输入ip', trigger: 'blur' }], ip: [{required: true, message: '请输入ip', trigger: 'blur'}],
port: [ port: [
{ required: true, message: '请输入设备端口号', trigger: 'blur' }, {required: true, message: '请输入设备端口号', trigger: 'blur'},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!value) { if (!value) {
@ -111,10 +111,10 @@ const peopleRules: any = reactive({
trigger: 'blur' trigger: 'blur'
} }
], ],
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], username: [{required: true, message: '请输入用户名', trigger: 'blur'}],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }], password: [{required: true, message: '请输入密码', trigger: 'blur'}],
type: [{ required: true, message: '请选择设备类型', trigger: 'blur' }], type: [{required: true, message: '请选择设备类型', trigger: 'blur'}],
channel: [{ required: true, message: '请输入通道号', trigger: 'blur' }] channel: [{required: true, message: '请输入通道号', trigger: 'blur'}]
}) })
var cancel = () => { var cancel = () => {
@ -221,10 +221,12 @@ defineExpose({
::v-deep .el-form-item--label-right .el-form-item__label { ::v-deep .el-form-item--label-right .el-form-item__label {
color: #fff !important; color: #fff !important;
} }
::v-deep .el-form-item .el-input__wrapper { ::v-deep .el-form-item .el-input__wrapper {
background-color: rgba(0, 0, 0, 0.5) !important; background-color: rgba(0, 0, 0, 0.5) !important;
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */ box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
} }
::v-deep .el-form-item .el-select__wrapper { ::v-deep .el-form-item .el-select__wrapper {
background-color: rgba(0, 0, 0, 0.5) !important; background-color: rgba(0, 0, 0, 0.5) !important;
box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */ box-shadow: 0 0 0 0.5px rgba(var(--color-base1), 1) inset !important; /* 新增此行 */
@ -233,15 +235,19 @@ defineExpose({
border: unset !important; border: unset !important;
} }
} }
::v-deep .el-form-item .el-input__inner { ::v-deep .el-form-item .el-input__inner {
color: #fff !important; color: #fff !important;
} }
::v-deep .el-form-item .el-select__placeholder { ::v-deep .el-form-item .el-select__placeholder {
color: #fff !important; color: #fff !important;
} }
::v-deep .el-input__wrapper { ::v-deep .el-input__wrapper {
padding: 0px !important; padding: 0px !important;
} }
::v-deep .el-button:hover { ::v-deep .el-button:hover {
background-color: rgba(var(--color-base1), 0.2) !important; background-color: rgba(var(--color-base1), 0.2) !important;
color: rgba(var(--color-base1), 1) !important; color: rgba(var(--color-base1), 1) !important;

View File

@ -129,7 +129,9 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="标签风格" name="4"> <el-tab-pane label="标签风格" name="4">
<div class="div-item">
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle> <labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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">
<div class="div-item">
<labelStyle :entityOptions="entityOptions"></labelStyle> <labelStyle :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -173,7 +173,9 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="标签风格" name="3"> <el-tab-pane label="标签风格" name="3">
<div class="div-item">
<labelStyle type="线" :entityOptions="entityOptions"></labelStyle> <labelStyle type="线" :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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)
}
}) })
}) })
} }

View File

@ -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,

View File

@ -112,7 +112,9 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="标签风格" name="4"> <el-tab-pane label="标签风格" name="4">
<div class="div-item">
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle> <labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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">
<div class="div-item">
<labelStyle :type="title" :entityOptions="entityOptions"></labelStyle> <labelStyle :type="title" :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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">
<div class="div-item">
<labelStyle :entityOptions="entityOptions"></labelStyle> <labelStyle :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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">
<div class="div-item">
<labelStyle :entityOptions="entityOptions"></labelStyle> <labelStyle :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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 })
} }
} }
} }

View File

@ -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;

View File

@ -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>
</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 }} {{ 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">
<div class="div-item">
<labelStyle :entityOptions="entityOptions"></labelStyle> <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()
@ -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")
} }

View File

@ -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">
<div class="div-item">
<labelStyle :entityOptions="entityOptions"></labelStyle> <labelStyle :entityOptions="entityOptions"></labelStyle>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>

View File

@ -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,
}, },

View File

@ -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,36 +189,22 @@ 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']
} }
]
}
$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 () => { const pictureLocation = async () => {
let selectedNodes = window.treeObj.getSelectedNodes() let selectedNodes = window.treeObj.getSelectedNodes()
@ -233,36 +217,22 @@ 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']
} }
]
}
$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) => { const showAttr = (eventBus) => {
let node let node
@ -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,

View File

@ -322,7 +322,7 @@ export const useTree = () => {
}) })
} }
} else { } else {
if(node.sourceType === 'tileset') { if (node.sourceType === 'tileset') {
if (node.children && node.children.length > 0) { if (node.children && node.children.length > 0) {
node.children.forEach((item) => { node.children.forEach((item) => {
sourceStatus(item) sourceStatus(item)
@ -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) {
@ -704,6 +704,7 @@ export const useTree = () => {
layers.sort((obj1, obj2) => { layers.sort((obj1, obj2) => {
return obj1.params.layerIndex - obj2.params.layerIndex; return obj1.params.layerIndex - obj2.params.layerIndex;
}); });
console.log("layers", layers)
for (let i = 0; i < layers.length; i++) { for (let i = 0; i < layers.length; i++) {
initMapData(layers[i].sourceType, layers[i].params, null) initMapData(layers[i].sourceType, layers[i].params, null)
} }

View File

@ -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('.');

View File

@ -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 {

View File

@ -734,7 +734,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 {

View File

@ -17,14 +17,11 @@ export const useSetUp = () => {
const selectedService = ref('接口服务') const selectedService = ref('接口服务')
const serviceOptions: any = ref([{ name: '接口服务' }, { name: '北斗串口' }]) const serviceOptions: any = ref([{ name: '接口服务' }, { name: '北斗串口' }])
let serverMode = localStorage.getItem('serverMode')
const reset = () => {
let serveUrl: any = getIP() let serveUrl: any = getIP()
let isOk = validateURL(serveUrl) let isOk = validateURL(serveUrl)
let serverMode = localStorage.getItem('serverMode') serverMode = localStorage.getItem('serverMode')
if (isOk) { if (isOk) {
const parsedUrl = new URL(serveUrl); const parsedUrl = new URL(serveUrl);
const host = parsedUrl.host; const host = parsedUrl.host;
@ -40,33 +37,39 @@ export const useSetUp = () => {
localport.value = Number(ipPort[1]) 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') {