12-19
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
server:
|
||||
host: 127.0.0.1
|
||||
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:
|
||||
global:
|
||||
enabled: false
|
||||
|
||||
Binary file not shown.
3407
src/renderer/public/sdk/YJEarth.min.js
vendored
3407
src/renderer/public/sdk/YJEarth.min.js
vendored
File diff suppressed because one or more lines are too long
@ -441,6 +441,9 @@ img {
|
||||
|
||||
.ztree .checkbox_false_full + a,.ztree .checkbox_false_full_focus + a {
|
||||
color: #d7d7d7;
|
||||
.svg-icon {
|
||||
fill: #d7d7d7 !important;
|
||||
}
|
||||
}
|
||||
.ztree li a.curSelectedNode {
|
||||
background-color: #ffffff00;
|
||||
@ -450,6 +453,8 @@ img {
|
||||
|
||||
.svg-icon {
|
||||
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 |
@ -315,7 +315,6 @@ watch(modelName, (val) => {
|
||||
// treeRef.value!.filter(val)
|
||||
// }
|
||||
categories.value = []
|
||||
currModelList.value = []
|
||||
getModelList()
|
||||
})
|
||||
|
||||
@ -510,10 +509,41 @@ const modelClick = (index, row) => {
|
||||
const renderModel = async (data, model) => {
|
||||
let selectedNode = window.treeObj.getSelectedNodes()[0]
|
||||
let z
|
||||
let index = 0
|
||||
let ids:any = []
|
||||
if (data.positions.length > 0) {
|
||||
data.positions.forEach(async (position, index) => {
|
||||
// let source_id = this.$md5(new Date().getTime() + model.model_name+index);
|
||||
data.positions.forEach(async (position, i) => {
|
||||
// let source_id = this.$md5(new Date().getTime() + model.model_name+i);
|
||||
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 == '面') {
|
||||
z = data.rotate - 90
|
||||
} else if (data.type == '线') {
|
||||
@ -535,9 +565,7 @@ const renderModel = async (data, model) => {
|
||||
z
|
||||
}
|
||||
}
|
||||
let Model = await new YJ.Obj.Model(window.earth, option)
|
||||
;(window as any)._entityMap.set(id, Model)
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, 50))
|
||||
let DbOption: any = {
|
||||
params: option,
|
||||
id,
|
||||
@ -550,34 +578,21 @@ const renderModel = async (data, model) => {
|
||||
: undefined
|
||||
}
|
||||
let res = await TreeApi.addOtherSource(DbOption)
|
||||
if(![0, 200].includes(res.code)) {
|
||||
if (![0, 200].includes(res.code)) {
|
||||
return
|
||||
}
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
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]);
|
||||
// }
|
||||
// });
|
||||
})
|
||||
index++
|
||||
if (index >= data.positions.length - 1) {
|
||||
ElMessage.closeAll()
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -270,6 +270,7 @@ const translate = () => {
|
||||
}
|
||||
}
|
||||
const confirm = () => {
|
||||
that.positionEditing && (that.positionEditing = false)
|
||||
originalOptions = structuredClone(that.options)
|
||||
baseDialog.value?.close()
|
||||
let params = structuredClone(that.options)
|
||||
@ -350,10 +351,8 @@ const changeMaximumParticleLife = (event) => {
|
||||
|
||||
const closeCallback = async () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
that.positionEditing && (that.positionEditing = false)
|
||||
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")
|
||||
}
|
||||
|
||||
|
||||
@ -203,6 +203,7 @@ const open = async (id: any) => {
|
||||
})
|
||||
}
|
||||
const confirm = () => {
|
||||
that.closeNodeEdit()
|
||||
originalOptions = structuredClone(that.options)
|
||||
baseDialog.value?.close()
|
||||
let params = structuredClone(that.options)
|
||||
|
||||
@ -156,6 +156,7 @@ const open = async (id: any) => {
|
||||
})
|
||||
}
|
||||
const confirm = () => {
|
||||
that.closeNodeEdit()
|
||||
originalOptions = structuredClone(that.options)
|
||||
baseDialog.value?.close()
|
||||
let params = structuredClone(that.options)
|
||||
|
||||
@ -367,6 +367,13 @@ export const useRightOperate = () => {
|
||||
entity.remove();
|
||||
(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);
|
||||
eventBus.emit("destroyComponent", item);
|
||||
});
|
||||
|
||||
@ -490,7 +490,7 @@ export const useTreeNode = () => {
|
||||
|
||||
// return (type === 'directory' || type === 'FeatureCollection') ? undefined : `http://localhost:${availablePort}/icon/${name}.png`;
|
||||
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}" />
|
||||
</svg>
|
||||
`;
|
||||
|
||||
@ -836,7 +836,7 @@ defineExpose({
|
||||
// .custom-dropdown2 {
|
||||
// width: 380px !important;
|
||||
// }
|
||||
.el-select-dropdown__empty,
|
||||
.custom-dropdown .el-select-dropdown__empty,
|
||||
.el-select-dropdown__loading {
|
||||
margin-top: -150px !important;
|
||||
}
|
||||
|
||||
@ -574,14 +574,20 @@ function importAuth() {
|
||||
filters: [{ name: '授权文件', extensions: ['YJ'] }]
|
||||
}
|
||||
$sendElectronChanel('open-directory-dialog', option)
|
||||
$recvElectronChanel('selectedItem', (e, paths) => {
|
||||
$recvElectronChanel('selectedItem', async (e, paths) => {
|
||||
let formdata = new FormData()
|
||||
if(!paths[0]) {
|
||||
return
|
||||
}
|
||||
formdata.append('filePath', paths[0])
|
||||
try {
|
||||
let res = AuthApi.authImport(formdata)
|
||||
ElMessage.success('文件授权成功')
|
||||
isAuth.value = false
|
||||
baseDialog.value?.close()
|
||||
let res = await AuthApi.authImport(formdata)
|
||||
if(res.code === 0 || res.code === 200) {
|
||||
ElMessage.success('文件授权成功')
|
||||
isAuth.value = false
|
||||
baseDialog.value?.close()
|
||||
} else {
|
||||
}
|
||||
} catch (error) {}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user