This commit is contained in:
zh
2025-12-19 12:28:49 +08:00
parent b64fbd886a
commit 92ab2b9a9e
14 changed files with 3464 additions and 61 deletions

View File

@ -1,7 +1,7 @@
server: server:
host: 127.0.0.1 host: 127.0.0.1
port: 8848 port: 8848
path: C:\Users\Administrator\AppData\Roaming\dzsp_shijingjun_offline_Y_save path: C:\Users\MSI\AppData\Roaming\dzsp_shijingjun_offline_Y_save
poi: poi:
global: global:
enabled: false enabled: false

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -441,6 +441,9 @@ img {
.ztree .checkbox_false_full + a,.ztree .checkbox_false_full_focus + a { .ztree .checkbox_false_full + a,.ztree .checkbox_false_full_focus + a {
color: #d7d7d7; color: #d7d7d7;
.svg-icon {
fill: #d7d7d7 !important;
}
} }
.ztree li a.curSelectedNode { .ztree li a.curSelectedNode {
background-color: #ffffff00; background-color: #ffffff00;
@ -450,6 +453,8 @@ img {
.svg-icon { .svg-icon {
color: rgba(var(--color-base1), 1) !important; color: rgba(var(--color-base1), 1) !important;
fill: rgba(var(--color-base1), 1) !important;
stroke: rgba(var(--color-base1), 1) !important;
} }
} }

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -315,7 +315,6 @@ watch(modelName, (val) => {
// treeRef.value!.filter(val) // treeRef.value!.filter(val)
// } // }
categories.value = [] categories.value = []
currModelList.value = []
getModelList() getModelList()
}) })
@ -510,10 +509,41 @@ const modelClick = (index, row) => {
const renderModel = async (data, model) => { const renderModel = async (data, model) => {
let selectedNode = window.treeObj.getSelectedNodes()[0] let selectedNode = window.treeObj.getSelectedNodes()[0]
let z let z
let index = 0
let ids:any = []
if (data.positions.length > 0) { if (data.positions.length > 0) {
data.positions.forEach(async (position, index) => { data.positions.forEach(async (position, i) => {
// let source_id = this.$md5(new Date().getTime() + model.model_name+index); // let source_id = this.$md5(new Date().getTime() + model.model_name+i);
let id = new YJ.Tools().randomString() let id = new YJ.Tools().randomString()
ids.push(id)
if (data.type == '面') {
z = data.rotate - 90
} else if (data.type == '线') {
z = data.rotate[i] - 90
}
let option = {
id: id,
position,
name: model.modelName + i,
show: true,
scale: { x: 1, y: 1, z: 1 },
url: service.value + model.modelDataUrl,
maximumScale: 1,
// host: 'http://127.0.0.1:8848',
rotate: {
x: 0,
y: 0,
z
}
}
let Model = await new YJ.Obj.Model(window.earth, option);
// //鼠标右键点击事件
Model.onRightClick = () => {};
(window as any)._entityMap.set(id, Model)
})
for (let position of data.positions) {
let id = ids[index]
if (data.type == '面') { if (data.type == '面') {
z = data.rotate - 90 z = data.rotate - 90
} else if (data.type == '线') { } else if (data.type == '线') {
@ -535,9 +565,7 @@ const renderModel = async (data, model) => {
z z
} }
} }
let Model = await new YJ.Obj.Model(window.earth, option) await new Promise(resolve => setTimeout(resolve, 50))
;(window as any)._entityMap.set(id, Model)
let DbOption: any = { let DbOption: any = {
params: option, params: option,
id, id,
@ -550,34 +578,21 @@ const renderModel = async (data, model) => {
: undefined : undefined
} }
let res = await TreeApi.addOtherSource(DbOption) let res = await TreeApi.addOtherSource(DbOption)
if(![0, 200].includes(res.code)) { if (![0, 200].includes(res.code)) {
return return
} }
DbOption.isShow = true
DbOption.params = JSON.stringify(DbOption.params)
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
index++
if (index >= data.positions.length - 1) {
ElMessage.closeAll() ElMessage.closeAll()
ElMessage({ ElMessage({
message: '添加成功', message: '添加成功',
type: 'success' type: 'success'
}) })
DbOption.isShow = true }
DbOption.params = JSON.stringify(DbOption.params) }
cusAddNodes(window.treeObj, DbOption.parentId, [DbOption])
// //鼠标右键点击事件
Model.onRightClick = () => {}
// window._entityMap.set(option.id, Model);
// Model.onClick = () => {
// leftClick(node);
// };
// let detailOption = JSON.parse(JSON.stringify(Model.options));
// detailOption.url = model.model_id + ".glb";
// let node = getNodeData(DbOption, detailOption);
// addSource(node).then((res) => {
// if ([0, 200].includes(res.code)) {
// // cusRenderNode(DbOption) DbOption.p_id
// cusAddNodes(this.treeObj, DbOption.p_id, [node]);
// }
// });
})
} }
} }

View File

@ -270,6 +270,7 @@ const translate = () => {
} }
} }
const confirm = () => { const confirm = () => {
that.positionEditing && (that.positionEditing = false)
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
baseDialog.value?.close() baseDialog.value?.close()
let params = structuredClone(that.options) let params = structuredClone(that.options)
@ -350,10 +351,8 @@ const changeMaximumParticleLife = (event) => {
const closeCallback = async () => { const closeCallback = async () => {
entityOptions.value.originalOptions = structuredClone(originalOptions) entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false that.positionEditing && (that.positionEditing = false)
that.reset() that.reset()
await YJ.Global.multiViewportMode.syncData(window.earth, that.options.id)
await YJ.Global.splitScreen.syncData(window.earth, that.options.id)
eventBus?.emit("destroyComponent") eventBus?.emit("destroyComponent")
} }

View File

@ -203,6 +203,7 @@ const open = async (id: any) => {
}) })
} }
const confirm = () => { const confirm = () => {
that.closeNodeEdit()
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
baseDialog.value?.close() baseDialog.value?.close()
let params = structuredClone(that.options) let params = structuredClone(that.options)

View File

@ -156,6 +156,7 @@ const open = async (id: any) => {
}) })
} }
const confirm = () => { const confirm = () => {
that.closeNodeEdit()
originalOptions = structuredClone(that.options) originalOptions = structuredClone(that.options)
baseDialog.value?.close() baseDialog.value?.close()
let params = structuredClone(that.options) let params = structuredClone(that.options)

View File

@ -367,6 +367,13 @@ export const useRightOperate = () => {
entity.remove(); entity.remove();
(window as any)._entityMap.delete(entity.options.id) (window as any)._entityMap.delete(entity.options.id)
} }
else {
let entity = (window as any).pressModelEntities.get(item)
if (entity) {
entity.remove();
(window as any).pressModelEntities.delete(entity.options.id)
}
}
// let node = window.treeObj.getNodeByParam("id", item, null); // let node = window.treeObj.getNodeByParam("id", item, null);
eventBus.emit("destroyComponent", item); eventBus.emit("destroyComponent", item);
}); });

View File

@ -490,7 +490,7 @@ export const useTreeNode = () => {
// return (type === 'directory' || type === 'FeatureCollection') ? undefined : `http://localhost:${availablePort}/icon/${name}.png`; // return (type === 'directory' || type === 'FeatureCollection') ? undefined : `http://localhost:${availablePort}/icon/${name}.png`;
return (type === 'directory' || type === 'FeatureCollection' || type === 'folder') ? undefined : ` return (type === 'directory' || type === 'FeatureCollection' || type === 'folder') ? undefined : `
<svg class="svg-icon" style="color: rgba(var(--color-base2), 1);margin-top: 1px;width:100%;height:100%;fill: currentColor !important;stroke: currentColor !important;stroke-width: ${strokeWidth} !important;shape-rendering: geometricPrecision;"> <svg class="svg-icon" style="color: rgba(var(--color-base2), 1);margin-top: 1px;width:100%;height:100%;fill: #fff;stroke: #fff;stroke-width: ${strokeWidth} !important;shape-rendering: geometricPrecision;">
<use xlink:href="#icon-${name}" /> <use xlink:href="#icon-${name}" />
</svg> </svg>
`; `;

View File

@ -836,7 +836,7 @@ defineExpose({
// .custom-dropdown2 { // .custom-dropdown2 {
// width: 380px !important; // width: 380px !important;
// } // }
.el-select-dropdown__empty, .custom-dropdown .el-select-dropdown__empty,
.el-select-dropdown__loading { .el-select-dropdown__loading {
margin-top: -150px !important; margin-top: -150px !important;
} }

View File

@ -574,14 +574,20 @@ function importAuth() {
filters: [{ name: '授权文件', extensions: ['YJ'] }] filters: [{ name: '授权文件', extensions: ['YJ'] }]
} }
$sendElectronChanel('open-directory-dialog', option) $sendElectronChanel('open-directory-dialog', option)
$recvElectronChanel('selectedItem', (e, paths) => { $recvElectronChanel('selectedItem', async (e, paths) => {
let formdata = new FormData() let formdata = new FormData()
if(!paths[0]) {
return
}
formdata.append('filePath', paths[0]) formdata.append('filePath', paths[0])
try { try {
let res = AuthApi.authImport(formdata) let res = await AuthApi.authImport(formdata)
if(res.code === 0 || res.code === 200) {
ElMessage.success('文件授权成功') ElMessage.success('文件授权成功')
isAuth.value = false isAuth.value = false
baseDialog.value?.close() baseDialog.value?.close()
} else {
}
} catch (error) {} } catch (error) {}
}) })
} }