diff --git a/src/main/index.ts b/src/main/index.ts
index 32dabfa..2283ebb 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -113,6 +113,10 @@ function createWindow(): void {
allowRunningInsecureContent: true
}
})
+ ipcMain.on("restart", () => {
+ app.relaunch();
+ forceQuit();
+ });
// 监听启动页完成的消息
ipcMain.on('splash-completed', () => {
// 启动页进度条已完成,可以关闭启动页并显示主窗口
@@ -206,16 +210,21 @@ function createWindow(): void {
}
* */
- console.log('GetHomeDir()', GetHomeDir())
+ // console.log('GetHomeDir()', GetHomeDir())
+ let prefix =
+ process.env.NODE_ENV === "development"
+ ? "src/renderer/public"
+ : "resources/app.asar/out/renderer";
let data = {};
for (const objKey in obj) {
let files = fs.readdirSync(
path.join(
- global.__static ? global.__static : GetHomeDir() + "/src/renderer/public",
+ GetHomeDir(),
+ prefix,
obj[objKey]
)
);
- console.log(files);
+ // console.log(files);
for (let i = 0; i < files.length; i++) {
files[i] = obj[objKey] + "/" + files[i];
}
diff --git a/src/renderer/components.d.ts b/src/renderer/components.d.ts
index 493dc42..cefa92b 100644
--- a/src/renderer/components.d.ts
+++ b/src/renderer/components.d.ts
@@ -10,6 +10,7 @@ declare module 'vue' {
export interface GlobalComponents {
BaseDialog: typeof import('./src/components/dialog/baseDialog.vue')['default']
Directory: typeof import('./src/components/dialog/directory.vue')['default']
+ DirectoryEdit: typeof import('./src/components/dialog/directoryEdit.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
diff --git a/src/renderer/public/icon/annotation.png b/src/renderer/public/icon/splitScreen.png
similarity index 100%
rename from src/renderer/public/icon/annotation.png
rename to src/renderer/public/icon/splitScreen.png
diff --git a/src/renderer/src/I18n/zh-CN.ts b/src/renderer/src/I18n/zh-CN.ts
index 69fba62..79b84fa 100644
--- a/src/renderer/src/I18n/zh-CN.ts
+++ b/src/renderer/src/I18n/zh-CN.ts
@@ -119,7 +119,7 @@ export default {
coorLocation: "坐标定位",
mouseLocation: "鼠标定位",
annotationAggregation: "标注点聚合",
- annotation: '卷帘对比',
+ splitScreen: '卷帘对比',
screenShot: '屏幕截图',
highQuality: '高清出图',
videoRecord: '视频录制',
diff --git a/src/renderer/src/api/gisApi.ts b/src/renderer/src/api/gisApi.ts
index 21dfc79..bf4e5ce 100644
--- a/src/renderer/src/api/gisApi.ts
+++ b/src/renderer/src/api/gisApi.ts
@@ -14,5 +14,13 @@ export const GisApi = {
url: `/source/uploadLocationImage`,
data
})
- }
+ },
+
+ //修改图层层级
+ updateLayersIndex: async (data: any) => {
+ return await request.post({
+ url: `/source/updateLevel`,
+ data
+ })
+ },
}
diff --git a/src/renderer/src/api/tree/index.ts b/src/renderer/src/api/tree/index.ts
index 3e30250..717be41 100644
--- a/src/renderer/src/api/tree/index.ts
+++ b/src/renderer/src/api/tree/index.ts
@@ -62,10 +62,10 @@ export const TreeApi = {
data
})
},
- //上传或修改树的层级
- updateTree: async (data: any) => {
+ //修改树层级
+ updateTreeIndex: async (data: any) => {
return await request.post({
- url: `/yjearth4/api/v1/source/update_treeindex`,
+ url: `/source/dragSource`,
data
})
},
diff --git a/src/renderer/src/common/initMapData.ts b/src/renderer/src/common/initMapData.ts
index 5ddb1f1..f0e011d 100644
--- a/src/renderer/src/common/initMapData.ts
+++ b/src/renderer/src/common/initMapData.ts
@@ -106,7 +106,7 @@ export const initMapData = async (type, data, cd) => {
entityObject = new YJ.Obj.RadarScanStereoscopic(window.earth, data)
break
case 'textBox':
- entityObject = new YJ.Obj.TextBox(window.earth, data, ()=>{})
+ entityObject = new YJ.Obj.TextBox(window.earth, data, () => { })
break
case 'polyhedronObject':
entityObject = new YJ.Obj.PolyhedronObject(window.earth, data)
@@ -129,7 +129,7 @@ export const initMapData = async (type, data, cd) => {
case 'flyLine':
entityObject = new YJ.Obj.FlowLine(window.earth, data)
break
- case 'explosion':
+ case 'explosion':
entityObject = new YJ.Obj.Explosion(window.earth, data)
break
default:
@@ -137,31 +137,37 @@ export const initMapData = async (type, data, cd) => {
}
if (entityObject) {
- options = structuredClone(entityObject.options)
- delete options.host
- switch (type) {
- case 'textBox':
- delete options.name
- break
- case 'fountain':
- case 'fire':
- case 'smoke':
- case 'waterL':
- delete options.url
- break
- default:
- break
+ function getOptions() {
+ let opt = structuredClone(entityObject.options)
+ delete opt.host
+ switch (type) {
+ case 'textBox':
+ delete opt.name
+ break
+ case 'fountain':
+ case 'fire':
+ case 'smoke':
+ case 'waterL':
+ delete opt.url
+ break
+ default:
+ break
+ }
+ return opt
}
+ options = getOptions()
console.log('--------------------onClick')
//鼠标左键点击事件
entityObject.onClick = () => {
// console.log('onClick')
- leftClick(options);
+ leftClick(getOptions());
};
//鼠标右键点击事件
entityObject.onRightClick = () => {
- rightClick(options);
+ rightClick(getOptions());
};
+
+
}
// options = entityObject
return options
diff --git a/src/renderer/src/components/dialog/directory.vue b/src/renderer/src/components/dialog/directory.vue
index db9b3cd..286faf5 100644
--- a/src/renderer/src/components/dialog/directory.vue
+++ b/src/renderer/src/components/dialog/directory.vue
@@ -97,31 +97,31 @@ const add = throttle(async () => {
}
// console.log(res)
}, 3000)
-//上传或修改树的层级
-const updateTree = async (newNode: any) => {
- const list = newNode.map((item: any) => {
- return {
- id: item.id,
- treeIndex: item.treeIndex,
- parentId: item.parentId
- }
- })
- console.log(list)
- const res = await TreeApi.updateTree({ list })
- if (res.code == 0) {
- ElMessage({
- message: '添加成功',
- type: 'success'
- })
+////上传或修改树的层级
+// const updateTree = async (newNode: any) => {
+// const list = newNode.map((item: any) => {
+// return {
+// id: item.id,
+// treeIndex: item.treeIndex,
+// parentId: item.parentId
+// }
+// })
+// console.log(list)
+// const res = await TreeApi.updateTree({ list })
+// if (res.code == 0) {
+// ElMessage({
+// message: '添加成功',
+// type: 'success'
+// })
- cancel()
- } else {
- ElMessage({
- message: '添加失败',
- type: 'error'
- })
- }
-}
+// cancel()
+// } else {
+// ElMessage({
+// message: '添加失败',
+// type: 'error'
+// })
+// }
+// }
const cancel = () => {
$changeComponentPop('.adddirectory', false)
diff --git a/src/renderer/src/components/dialog/directoryEdit.vue b/src/renderer/src/components/dialog/directoryEdit.vue
new file mode 100644
index 0000000..f97f192
--- /dev/null
+++ b/src/renderer/src/components/dialog/directoryEdit.vue
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+ 取消
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/src/icons/svg/weather.svg b/src/renderer/src/icons/svg/weather.svg
new file mode 100644
index 0000000..98103e7
--- /dev/null
+++ b/src/renderer/src/icons/svg/weather.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/renderer/src/views/components/headers/components/setPup/components/photoManage.vue b/src/renderer/src/views/components/headers/components/setPup/components/photoManage.vue
index 603cb50..3d95a51 100644
--- a/src/renderer/src/views/components/headers/components/setPup/components/photoManage.vue
+++ b/src/renderer/src/views/components/headers/components/setPup/components/photoManage.vue
@@ -97,7 +97,7 @@
ref="imageRef"
fit="contain"
:preview-teleported="true"
- :preview-src-list="modelList.map((item) => 'http://127.0.0.1:8848' + item.data)"
+ :preview-src-list="modelList.map((item:any) => 'http://127.0.0.1:8848' + item.data)"
style="width: 80px; height: 60px"
:src="'http://127.0.0.1:8848' + row.data"
:initial-index="currentIndex"
@@ -109,7 +109,7 @@
ref="imageRef"
fit="contain"
:preview-teleported="true"
- :preview-src-list="modelList.map((item) => 'http://localhost:55110/' + item.data)"
+ :preview-src-list="modelList.map((item:any) => 'http://localhost:55110/' + item.data)"
style="width: 80px; height: 60px"
:src="'http://localhost:55110/' + row.data"
:initial-index="currentIndex"
@@ -772,6 +772,7 @@ const setPhotoList = () => {
dirName1s: 'GEMarker1s'
})
$recvElectronChanel('dirFiles', (e, res) => {
+ console.log('dirFiles', res)
res.GEMarker1s.forEach((item) => {
let name = item.split('.')[0]
name = name.split('/')[1]
diff --git a/src/renderer/src/views/components/headers/components/setTool/setTool.vue b/src/renderer/src/views/components/headers/components/setTool/setTool.vue
index cf9782d..26e03f2 100644
--- a/src/renderer/src/views/components/headers/components/setTool/setTool.vue
+++ b/src/renderer/src/views/components/headers/components/setTool/setTool.vue
@@ -110,7 +110,7 @@ const setList = ref([
width: 15vw;
position: absolute;
right: 1vw;
- top: 7%;
+ top: 0;
border-radius: 5px;
// background: var(--svg-headColorbg);
display: flex;
diff --git a/src/renderer/src/views/components/headers/index.vue b/src/renderer/src/views/components/headers/index.vue
index 5a63ab8..4d8e5fe 100644
--- a/src/renderer/src/views/components/headers/index.vue
+++ b/src/renderer/src/views/components/headers/index.vue
@@ -10,6 +10,9 @@
{{ date.ymd }}
{{ t(`week.${date.week}`) }}
+
+
+
@@ -101,7 +104,7 @@ onUnmounted(() => {
position: absolute;
left: 20px;
//top: 15px;
- top: 0.35vw;
+ top: 0.55vw;
height: 50px;
//border: 1px solid red;
//width: 200px;
@@ -133,6 +136,14 @@ onUnmounted(() => {
font-size: 0.8rem;
}
}
+
+ .weather {
+ margin-left: 15px;
+ svg {
+ fill: rgba(0, 255, 255, 1) !important;
+ cursor: pointer;
+ }
+ }
}
.headButton {
diff --git a/src/renderer/src/views/components/leftSide/leftSideFirst.vue b/src/renderer/src/views/components/leftSide/leftSideFirst.vue
index f81a1a6..85bcc4f 100644
--- a/src/renderer/src/views/components/leftSide/leftSideFirst.vue
+++ b/src/renderer/src/views/components/leftSide/leftSideFirst.vue
@@ -140,7 +140,7 @@ const menuList: any = ref([
'coorLocation',
'mouseLocation',
'annotationAggregation',
- 'annotation',
+ 'splitScreen',
'screenShot',
'highQuality',
'videoRecord',
@@ -215,6 +215,15 @@ const handleClick = (item: any, e) => {
})
}
}
+ else if (item.key === 'ersanwei') {
+ if(YJ.Global.multiViewportMode.getSdk().sdkD) {
+ YJ.Global.multiViewportMode.off(window.earth);
+ }
+ else {
+ eventBus.emit('closeSplitScreen')
+ YJ.Global.multiViewportMode.on(window.earth);
+ }
+ }
}
const fold = () => {
// 如果正在动画中,直接返回
diff --git a/src/renderer/src/views/components/leftSide/leftSideSecond.vue b/src/renderer/src/views/components/leftSide/leftSideSecond.vue
index 0a3ee3c..35e4ee6 100644
--- a/src/renderer/src/views/components/leftSide/leftSideSecond.vue
+++ b/src/renderer/src/views/components/leftSide/leftSideSecond.vue
@@ -49,7 +49,7 @@ const initList = (value) => {
}
var clickChange = reactive({
mouseLocation: false,
- annotation: false,
+ splitScreen: false,
annotationAggregation: false,
videoRecord: false,
nightVision: false
@@ -93,6 +93,11 @@ const handleKeyDown = (e) => {
}
window.addEventListener('keydown', handleKeyDown)
+eventBus.on('closeSplitScreen', (data: never) => {
+ clickChange.splitScreen = !clickChange.splitScreen
+ YJ.Global.splitScreen.off()
+})
+
const methodMap = {
// 轨迹运动
trajectoryMotion: async () => {
@@ -575,9 +580,9 @@ const methodMap = {
YJ.Global.switchCluster(window.earth, clickChange.annotationAggregation)
},
//卷帘对比
- annotation() {
- clickChange.annotation = !clickChange.annotation
- if (clickChange.annotation) {
+ splitScreen() {
+ clickChange.splitScreen = !clickChange.splitScreen
+ if (clickChange.splitScreen) {
YJ.Global.splitScreen.on(window.earth)
} else {
YJ.Global.splitScreen.off()
diff --git a/src/renderer/src/views/components/propertyBox/billboardObject.vue b/src/renderer/src/views/components/propertyBox/billboardObject.vue
index 89a88f4..34a597f 100644
--- a/src/renderer/src/views/components/propertyBox/billboardObject.vue
+++ b/src/renderer/src/views/components/propertyBox/billboardObject.vue
@@ -762,10 +762,14 @@ const close = () => {
}
const clickChangeImage = () => {
- eventBus?.emit('openSelectImg', entityOptions.value.billboardImage, entityOptions.value)
+ eventBus?.emit('openPhoto', (img)=>{
+ entityOptions.value.billboardImage = img
+ })
}
const clickChangeDefaultImage = () => {
- eventBus?.emit('openSelectImg', entityOptions.value.billboardDefaultImage, entityOptions.value)
+ eventBus?.emit('openPhoto', (img)=>{
+ entityOptions.value.billboardDefaultImage = img
+ })
}
const fontChange = (val) => {
entityOptions.value.labelFontFamily = val
diff --git a/src/renderer/src/views/components/propertyBox/labelStyle.vue b/src/renderer/src/views/components/propertyBox/labelStyle.vue
index 379a62a..f492c88 100644
--- a/src/renderer/src/views/components/propertyBox/labelStyle.vue
+++ b/src/renderer/src/views/components/propertyBox/labelStyle.vue
@@ -93,6 +93,61 @@
-->
+
+
+
@@ -114,13 +169,16 @@ const props = defineProps({
const entityOptions = ref(props.entityOptions)
const fontList = ref(getFontList())
const labelColorRef = ref(null)
+const labelLineColorRef = ref(null)
+const labelBackgroundColorStartRef = ref(null)
+const labelBackgroundColorEndRef = ref(null)
const fontChange = (val) => {
entityOptions.value.labelFontFamily = val
}
onMounted(() => {
- let labelColorPicker = new (window as any).YJColorPicker({
+ new (window as any).YJColorPicker({
el: labelColorRef.value,
size: 'mini', //颜色box类型
alpha: true, //是否开启透明度
@@ -134,6 +192,48 @@ onMounted(() => {
entityOptions.value.labelColor = 'rgba(255,255,255,1)'
} //点击清空按钮事件回调
})
+ new (window as any).YJColorPicker({
+ el: labelLineColorRef.value,
+ size: 'mini', //颜色box类型
+ alpha: true, //是否开启透明度
+ defaultColor: entityOptions.value.labelLineColor,
+ disabled: false, //是否禁止打开颜色选择器
+ openPickerAni: 'opacity', //打开颜色选择器动画
+ sure: (color) => {
+ entityOptions.value.labelLineColor = color
+ }, //点击确认按钮事件回调
+ clear: () => {
+ entityOptions.value.labelLineColor = 'rgba(255,255,255,1)'
+ } //点击清空按钮事件回调
+ })
+ new (window as any).YJColorPicker({
+ el: labelBackgroundColorStartRef.value,
+ size: 'mini', //颜色box类型
+ alpha: true, //是否开启透明度
+ defaultColor: entityOptions.value.labelBackgroundColorStart,
+ disabled: false, //是否禁止打开颜色选择器
+ openPickerAni: 'opacity', //打开颜色选择器动画
+ sure: (color) => {
+ entityOptions.value.labelBackgroundColorStart = color
+ }, //点击确认按钮事件回调
+ clear: () => {
+ entityOptions.value.labelBackgroundColorStart = 'rgba(255,255,255,1)'
+ } //点击清空按钮事件回调
+ })
+ new (window as any).YJColorPicker({
+ el: labelBackgroundColorEndRef.value,
+ size: 'mini', //颜色box类型
+ alpha: true, //是否开启透明度
+ defaultColor: entityOptions.value.labelBackgroundColorEnd,
+ disabled: false, //是否禁止打开颜色选择器
+ openPickerAni: 'opacity', //打开颜色选择器动画
+ sure: (color) => {
+ entityOptions.value.labelBackgroundColorEnd = color
+ }, //点击确认按钮事件回调
+ clear: () => {
+ entityOptions.value.labelBackgroundColorEnd = 'rgba(255,255,255,1)'
+ } //点击清空按钮事件回调
+ })
})
diff --git a/src/renderer/src/views/components/propertyBox/particleEffects.vue b/src/renderer/src/views/components/propertyBox/particleEffects.vue
index 4ee6038..230d398 100644
--- a/src/renderer/src/views/components/propertyBox/particleEffects.vue
+++ b/src/renderer/src/views/components/propertyBox/particleEffects.vue
@@ -52,13 +52,13 @@
@@ -66,13 +66,13 @@
@@ -318,6 +318,37 @@ const remove = () => {
})
}
+const changeMinimumSpeed = (event) => {
+ let minimumSpeed = Number(event.target.value)
+ if(minimumSpeed>entityOptions.value.maximumSpeed) {
+ minimumSpeed = entityOptions.value.maximumSpeed
+ }
+ entityOptions.value.minimumSpeed = minimumSpeed
+}
+const changeMaximumSpeed = (event) => {
+ let maximumSpeed = Number(event.target.value)
+ if(maximumSpeed {
+ let minimumParticleLife = Number(event.target.value)
+ if(minimumParticleLife>entityOptions.value.maximumParticleLife) {
+ minimumParticleLife = entityOptions.value.maximumParticleLife
+ }
+ entityOptions.value.minimumParticleLife = minimumParticleLife
+}
+const changeMaximumParticleLife = (event) => {
+ let maximumParticleLife = Number(event.target.value)
+ if(maximumParticleLife {
entityOptions.value.originalOptions = structuredClone(originalOptions)
that.positionEditing = false
diff --git a/src/renderer/src/views/components/propertyBox/photo.vue b/src/renderer/src/views/components/propertyBox/photo.vue
index 49add7e..92bcb87 100644
--- a/src/renderer/src/views/components/propertyBox/photo.vue
+++ b/src/renderer/src/views/components/propertyBox/photo.vue
@@ -11,55 +11,29 @@
-
+
- {{ item }}
+ {{ item }}
-
+
-
-
- {{ node.label }}
+
+
+ {{ node.label }}
@@ -68,29 +42,17 @@
-
+
-
@@ -101,38 +63,21 @@
- 基本类型
+ 基本类型
-
+
-
@@ -159,6 +104,8 @@ import {
$recvElectronChanel,
$changeComponentShow
} from '@/utils/communication'
+
+const { ipcRenderer } = require('electron')
const { t } = useI18n()
const { findParentId, findTreeIndex, cusAddNodes } = useTreeNode()
const isShowPup = ref(false)
@@ -166,6 +113,15 @@ const eventBus: any = inject('bus')
const { cusUpdateNode } = useTreeNode()
var modelName = ref('')
+const availablePort = ref(55110)
+const service = ref(localStorage.getItem("service"))
+
+ipcRenderer.invoke('get-available-port').then((port) => {
+ availablePort.value = port
+})
+
+let selectCallback
+
//tab
interface Model {
id: string
@@ -290,6 +246,10 @@ const handleScroll = () => {
const currentTypeId = ref
('')
var activeIndex: any = ref(null)
+//立体图标、普通图标
+let threePhoto: any = []
+let ordinaryPhoto: any = []
+
interface TypeNode {
id: string
label: string
@@ -330,14 +290,30 @@ let typeArr = {
const modelClick = (index, row) => {
activeIndex.value = index
isShowPup.value = false
- console.log(row, '点中了')
+ console.log(index, row)
+ let selectedImg
+ if(selectCallback) {
+ if(butActiveIndex.value === 0)
+ {
+ selectedImg = 'http://localhost:' + availablePort.value + '/' + (row.data.indexOf("1s/") > -1 ? row.data.replace(/1s/g, "1") : row.data)
+ }
+ else if(butActiveIndex.value === 1)
+ {
+ selectedImg = 'http://localhost:' + availablePort.value + '/' + row.data
+ }
+ else if(butActiveIndex.value === 2)
+ {
+ selectedImg = service.value + row.data
+ }
+ selectCallback(selectedImg)
+ }
}
const getModelListByType = (id) => {
if (butActiveIndex.value === 0) {
- categories.value = threePhoto
+ categories.value = [...threePhoto]
} else if (butActiveIndex.value === 1) {
- categories.value = ordinaryPhoto
+ categories.value = [...ordinaryPhoto]
} else {
let formData = new FormData()
formData.append('iconTypeId', id)
@@ -356,11 +332,20 @@ const getModelList = async () => {
parentId: null
}
]
+ if(butActiveIndex.value==0) {
+ categories.value = [...threePhoto]
+ }
+ if(butActiveIndex.value==1) {
+ categories.value = [...ordinaryPhoto]
+ }
} else {
const res: any = await PhotoApi.modelTypeList()
if (res.code == 0 || res.code == 200) {
let data = transformNestedJson(res.data, 'name', 'label')
typeTreeData.value = data
+ if(typeTreeData.value.length>0) {
+ getModelListByType(typeTreeData.value[0].id)
+ }
}
}
}
@@ -389,26 +374,18 @@ onBeforeUnmount(() => {
observer?.disconnect()
})
//end
-
-eventBus.on('openPhoto', (data) => {
- isShowPup.value = data
- if (data) {
- getModelList()
- getSetting()
- setPhotoList()
- }
+eventBus.on('openPhoto', async(cb) => {
+ isShowPup.value = true
+ selectCallback = cb
+ getModelList()
+ getSetting()
+ setPhotoList()
})
-eventBus.on('closeModelSet', (data) => {
- isShowPup.value = data
- if (data) {
- getSetting()
- }
+eventBus.on('closePhoto', () => {
+ isShowPup.value = false
+ getSetting()
})
-//立体图标、普通图标
-let threePhoto: any = []
-let ordinaryPhoto: any = []
-
const setPhotoList = () => {
$sendElectronChanel('requireGEMarkerName', {
dirName: 'GEMarker',
@@ -431,6 +408,7 @@ const setPhotoList = () => {
data: item
})
})
+ categories.value = [...threePhoto]
})
}
@@ -465,6 +443,7 @@ defineExpose({
.set_pup {
width: 40vw;
height: 50vh;
+
:deep(.el-dialog) {
background:
linear-gradient(180deg, rgba(0, 255, 255, 0.2) 0%, rgba(0, 255, 255, 0) 100%),
@@ -472,24 +451,30 @@ defineExpose({
border: 1px solid #00c9ff;
padding-left: 0 !important;
}
+
:deep(.el-dialog__body) {
padding: 0 !important;
}
+
:deep(.el-dialog__headerbtn) {
height: 30px;
width: 30px;
border-bottom-left-radius: 80%;
background-color: #008989;
+
&:hover {
background-color: #00ffff;
+
.el-dialog__close {
color: rgba(0, 66, 66, 1); // 悬停时改变关闭图标为红色
}
}
}
+
:deep(.el-dialog__headerbtn .el-dialog__close) {
color: #fff;
}
+
.set_pup_header {
width: 100%;
height: 100%;
@@ -498,6 +483,7 @@ defineExpose({
justify-content: center;
align-items: center;
padding-bottom: 20px;
+
.system_title {
background: url('@/assets/images/titlebg.png') no-repeat;
background-size: 100% 100%;
@@ -511,26 +497,24 @@ defineExpose({
font-weight: 700;
}
}
+
.set_detail {
box-sizing: border-box;
+
// height: 50vh;
- :deep(
- .el-tabs--left .el-tabs__active-bar.is-left,
+ :deep(.el-tabs--left .el-tabs__active-bar.is-left,
.el-tabs--left .el-tabs__active-bar.is-right,
.el-tabs--right .el-tabs__active-bar.is-left,
- .el-tabs--right .el-tabs__active-bar.is-right
- ) {
+ .el-tabs--right .el-tabs__active-bar.is-right) {
width: 3px;
background: rgba(0, 255, 255, 1);
height: 40px !important;
}
- :deep(
- .el-tabs--left .el-tabs__nav-wrap.is-left::after,
+ :deep(.el-tabs--left .el-tabs__nav-wrap.is-left::after,
.el-tabs--left .el-tabs__nav-wrap.is-right::after,
.el-tabs--right .el-tabs__nav-wrap.is-left::after,
- .el-tabs--right .el-tabs__nav-wrap.is-right::after
- ) {
+ .el-tabs--right .el-tabs__nav-wrap.is-right::after) {
width: 3px;
}
@@ -563,13 +547,16 @@ defineExpose({
width: 5px;
height: 5px;
}
+
:deep(.el-tabs__content::-webkit-scrollbar-thumb) {
background-color: #0ff;
border-radius: 5px;
}
+
:deep(.el-tabs__content::-webkit-scrollbar-track) {
background-color: rgba(0, 255, 255, 0.2);
}
+
:deep(.el-tabs__item) {
width: 8vw;
color: #fff !important;
@@ -582,50 +569,45 @@ defineExpose({
margin-bottom: 3px;
box-sizing: border-box;
}
+
:deep(.el-tabs__item:hover) {
- background: linear-gradient(
- 90deg,
- rgba(0, 255, 255, 0) 0%,
- rgba(0, 255, 255, 0.5) 48.91%,
- rgba(0, 255, 255, 0) 100%
- );
+ background: linear-gradient(90deg,
+ rgba(0, 255, 255, 0) 0%,
+ rgba(0, 255, 255, 0.5) 48.91%,
+ rgba(0, 255, 255, 0) 100%);
border: 1px solid;
box-sizing: border-box;
- border-image: linear-gradient(
- 90deg,
+ border-image: linear-gradient(90deg,
rgba(0, 255, 255, 0) 0%,
rgba(0, 255, 255, 1) 55.55%,
- rgba(0, 255, 255, 0) 100%
- )
- 1;
+ rgba(0, 255, 255, 0) 100%) 1;
}
+
:deep(.el-tabs__item.is-active) {
- background: linear-gradient(
- 90deg,
- rgba(0, 255, 255, 0) 0%,
- rgba(0, 255, 255, 0.5) 48.91%,
- rgba(0, 255, 255, 0) 100%
- ) !important;
+ background: linear-gradient(90deg,
+ rgba(0, 255, 255, 0) 0%,
+ rgba(0, 255, 255, 0.5) 48.91%,
+ rgba(0, 255, 255, 0) 100%) !important;
border: 0.1px solid;
// box-sizing: border-box;
- border-image: linear-gradient(
- 90deg,
+ border-image: linear-gradient(90deg,
rgba(0, 255, 255, 0) 0%,
rgba(0, 255, 255, 1) 55.55%,
- rgba(0, 255, 255, 0) 100%
- )
- 1 !important;
+ rgba(0, 255, 255, 0) 100%) 1 !important;
}
+
:deep(.el-tabs__header) {
height: 50vh !important;
width: 8vw;
overflow-y: auto;
overflow-x: hidden;
}
+
:deep(.el-tabs__nav-next, .el-tabs__nav-prev) {
color: #fff;
}
}
+
.el-input {
width: 300px;
margin-left: 30px;
@@ -637,9 +619,11 @@ defineExpose({
--el-input-hover-border-color: rgba(var(--color-sdk-base-rgb), 0.5) !important;
--el-input-focus-border-color: rgba(var(--color-sdk-base-rgb), 0.5) !important;
}
+
::v-deep .el-input__wrapper {
background-color: rgba(0, 0, 0, 0.5) !important;
}
+
.btn {
float: right;
height: 32px;
@@ -650,9 +634,11 @@ defineExpose({
color: #fff !important;
padding: 0 15px;
}
+
.btn:hover {
color: rgba(var(--color-sdk-base-rgb), 1) !important;
border: 1px solid rgba(var(--color-sdk-base-rgb), 1) !important;
+
.setIcon {
color: rgba(var(--color-sdk-base-rgb), 1) !important;
}
@@ -670,17 +656,20 @@ defineExpose({
display: flex;
height: 100vh;
}
+
.model-tabs {
width: 130px;
height: 100%;
float: left;
}
+
.treeCon {
width: 140px;
height: 100%;
float: left;
border-right: 1px solid rgba(204, 204, 204, 0.2);
}
+
.model-gallery {
flex: 1;
/* padding: 20px; */
@@ -690,16 +679,19 @@ defineExpose({
float: left;
margin-left: 10px;
}
+
.model-section {
min-height: 10vh;
margin-bottom: 40px;
}
+
.model-grid {
display: flex;
flex-wrap: wrap;
/* justify-content: space-around; */
gap: 20px;
}
+
.model-name {
width: 100%;
height: 30px;
@@ -711,18 +703,22 @@ defineExpose({
color: rgba(255, 255, 255, 1);
}
+
.isactive {
color: rgba(var(--color-sdk-base-rgb), 1) !important;
}
+
.model-item {
border-radius: 8px;
overflow: hidden;
width: 70px;
/* box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); */
}
+
.model-item:hover {
cursor: pointer !important;
color: rgba(var(--color-sdk-base-rgb), 1) !important;
+
.model-name {
color: rgba(var(--color-sdk-base-rgb), 1) !important;
}
@@ -734,17 +730,20 @@ defineExpose({
background: url('@/assets/images/model-bg.png') no-repeat;
background-size: 100% 100%;
}
+
.model-section2 {
.imgbg {
background: unset;
}
}
+
.thumbnail {
width: 64px;
height: 64px;
margin-left: 3px;
margin-top: 3px;
}
+
.loading-more {
text-align: center;
padding: 20px;
@@ -753,10 +752,12 @@ defineExpose({
::v-deep .el-tabs__content {
display: none !important;
}
+
/* 修改滚动条轨道的颜色 */
::v-deep ::-webkit-scrollbar-track {
background: rgba(var(--color-sdk-base-rgb), 0.1) !important;
}
+
/* 修改滚动条滑块的样式 */
::v-deep ::-webkit-scrollbar-thumb {
background: rgba(var(--color-sdk-base-rgb), 1) !important;
@@ -773,11 +774,13 @@ defineExpose({
width: 5px;
height: 5px;
}
+
/* 定义背景颜色和圆角 */
::-webkit-scrollbar-thumb {
border-radius: 1em;
background-color: rgba(50, 50, 50, 0.3);
}
+
/* //定义滚动条轨道 内阴影+圆角 */
::-webkit-scrollbar-track {
border-radius: 1em;
@@ -785,9 +788,10 @@ defineExpose({
}
/* tree */
-.el-tree-node__content > .el-tree-node__expand-icon {
+.el-tree-node__content>.el-tree-node__expand-icon {
display: none !important;
}
+
.el-tree {
background: transparent !important;
--el-tree-node-hover-bg-color: rgba(var(--color-sdk-base-rgb), 0.2) !important;
@@ -797,16 +801,21 @@ defineExpose({
float: left;
margin-left: 10px;
}
+
::v-deep .el-text {
color: rgba(255, 255, 255, 1) !important;
font-size: 12px !important;
}
+
.selected-text {
- color: rgba(var(--color-sdk-base-rgb), 1) !important; /* Element UI主色,可自定义 */
+ color: rgba(var(--color-sdk-base-rgb), 1) !important;
+ /* Element UI主色,可自定义 */
}
-::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
+
+::v-deep .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
border-right: 1px solid rgba(var(--color-sdk-base-rgb), 0.2) !important;
}
+
.typeBut {
left: 527px;
top: 3764px;
@@ -816,6 +825,7 @@ defineExpose({
display: flex;
justify-content: flex-start;
align-items: flex-start;
+
span {
display: block;
width: 90px;
@@ -835,21 +845,25 @@ defineExpose({
cursor: pointer;
color: #fff;
}
+
span:hover {
color: rgba(var(--color-sdk-base-rgb), 1);
border: 1px solid rgba(var(--color-sdk-base-rgb), 1);
border-radius: 4px;
}
}
+
.clickButClass {
color: rgba(var(--color-sdk-base-rgb), 1);
border: 1px solid rgba(var(--color-sdk-base-rgb), 1) !important;
border-radius: 4px;
}
+
.top {
display: flex;
justify-content: space-between;
}
+
.typeTitltName {
font-size: 16px;
font-weight: 400;
diff --git a/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts b/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts
index 1620ded..076586c 100644
--- a/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts
+++ b/src/renderer/src/views/components/tree/components/hooks/rightOperate.ts
@@ -450,25 +450,37 @@ export const useRightOperate = () => {
let entityOptions = window.earth.entityMap.get(item.id)
let layerIndex = entityOptions.layerIndex;
layers.push({ id: item.id, layerIndex });
- let params = {
- layerIndex: entityOptions.layerIndex,
- alpha: entityOptions.alpha,
- brightness: entityOptions.brightness,
- name: entityOptions.name,
- show: entityOptions.show,
- id: item.id,
- }
- let params2 = {
- "id": params.id,
- "sourceName": params.name,
- "params": params,
- "isShow": params.show ? 1 : 0
- }
- TreeApi.updateDirectoryInfo(params2)
- cusUpdateNode({ "id": params.id, "sourceName": params.name, "params": JSON.stringify(params) })
+ // let params = {
+ // layerIndex: entityOptions.layerIndex,
+ // alpha: entityOptions.alpha,
+ // brightness: entityOptions.brightness,
+ // name: entityOptions.name,
+ // show: entityOptions.show,
+ // id: item.id,
+ // }
+ // let params2 = {
+ // "id": params.id,
+ // "sourceName": params.name,
+ // "params": params,
+ // "isShow": params.show ? 1 : 0
+ // }
+ // TreeApi.updateDirectoryInfo(params2)
+ // cusUpdateNode({ "id": params.id, "sourceName": params.name, "params": JSON.stringify(params) })
}
});
- console.log('layers', layers)
+ GisApi.updateLayersIndex(layers).then((res) => {
+ if (res.code == 0 || res.code == 200) {
+ ElMessage({
+ message: '操作成功',
+ type: 'success'
+ })
+ } else {
+ ElMessage({
+ message: '操作失败',
+ type: 'error'
+ })
+ }
+ })
}
// 图片文件上传后续
diff --git a/src/renderer/src/views/components/tree/hooks/tree.ts b/src/renderer/src/views/components/tree/hooks/tree.ts
index a3312f0..3f10dc2 100644
--- a/src/renderer/src/views/components/tree/hooks/tree.ts
+++ b/src/renderer/src/views/components/tree/hooks/tree.ts
@@ -6,7 +6,7 @@ import { initMapData } from '../../../../common/initMapData'
export const useTree = () => {
const rightMenuRef: any = ref() //右键菜单的实例
const treeObj = ref() //树形的实例
- const { getSelectedNodes, showRightMenu, cusSelectNode, getSameLevel, cusNodeIcon } = useTreeNode() //树上一系列的方法hooks
+ const { getSelectedNodes, showRightMenu, cusSelectNode, getSameLevel, cusNodeIcon, nodeType } = useTreeNode() //树上一系列的方法hooks
const nodes: any = ref([])
/**
* 用于捕获zTree上鼠标按键按下后的事件回调函数
@@ -100,18 +100,18 @@ export const useTree = () => {
item.treeIndex = index
return {
...item,
- treeIndex: item.getIndex()+1
+ treeIndex: item.getIndex() + 1
}
})
const list = newNode.map((item: any) => {
return {
id: item.id,
treeIndex: item.treeIndex,
- parentId: item.parentId
+ parentId: item.parentId || ''
}
})
- const res = await TreeApi.updateTree({ list })
- if (res.code == 0) {
+ const res = await TreeApi.updateTreeIndex(list)
+ if (res.code == 0 || res.code == 200) {
ElMessage({
message: '操作成功',
type: 'success'
@@ -190,29 +190,26 @@ export const useTree = () => {
* @returns {boolean} 返回 false,zTree 将恢复被拖拽的节点,也无法触发 onDrop 事件回调函数
*/
const beforeDrop = (
- event: DragEvent,
treeId: any,
treeNodes: any,
targetNode: any,
moveType: any
) => {
- console.log('开始拖拽之前')
-
- // if (
- // ['prev', 'next', 'inner'].includes(moveType) &&
- // ['pressModel', 'terrainDig'].includes(treeNodes[0].sourceType)
- // ) {
- // return false
- // }
- // if (['prev', 'next'].includes(moveType)) {
- // let parent = this.treeObj.getNodeByParam('id', targetNode.parentId, null)
- // if (parent && !treeNodeOption.nodeType[parent.sourceType].allowChildren) return false
- // }
- // if (targetNode) {
- // if (moveType == 'inner' && !treeNodeOption.nodeType[targetNode.sourceType].allowChildren) {
- // return false
- // }
- // }
+ if (
+ ['prev', 'next', 'inner'].includes(moveType) &&
+ ['pressModel', 'terrainDig'].includes(treeNodes[0].sourceType)
+ ) {
+ return false
+ }
+ if (['prev', 'next'].includes(moveType)) {
+ let parent = treeObj.value.getNodeByParam('id', targetNode.parentId, null)
+ if (parent && !nodeType[parent.sourceType].allowChildren) return false
+ }
+ if (targetNode) {
+ if (moveType == 'inner' && !nodeType[targetNode.sourceType].allowChildren) {
+ return false
+ }
+ }
}
/**
* 捕获 checkbox / radio 被勾选 或 取消勾选的事件回调函数
@@ -544,7 +541,7 @@ export const useTree = () => {
"GDSLImagery",
"layer",
];
- let layers:any = []
+ let layers: any = []
if (window.earth) {
for (let i = 0; i < zNodes.value.length; i++) {
if (zNodes.value[i].sourceType === 'directory') {
@@ -560,7 +557,7 @@ export const useTree = () => {
if (!params.name) {
params.name = zNodes.value[i].sourceName
}
- if(arr.includes(zNodes.value[i].sourceType)) {
+ if (arr.includes(zNodes.value[i].sourceType)) {
layers.push(
{
sourceType: zNodes.value[i].sourceType,
@@ -575,7 +572,7 @@ export const useTree = () => {
layers.sort((obj1, obj2) => {
return obj1.params.layerIndex - obj2.params.layerIndex;
});
- for(let i = 0; i < layers.length; i++) {
+ for (let i = 0; i < layers.length; i++) {
initMapData(layers[i].sourceType, layers[i].params, null)
}
}
diff --git a/src/renderer/src/views/components/tree/hooks/treeNode.ts b/src/renderer/src/views/components/tree/hooks/treeNode.ts
index 90ce6e9..651a45b 100644
--- a/src/renderer/src/views/components/tree/hooks/treeNode.ts
+++ b/src/renderer/src/views/components/tree/hooks/treeNode.ts
@@ -661,6 +661,7 @@ export const useTreeNode = () => {
}
return {
+ nodeType,
showRightMenu,
cusNodeIcon,
getSelectedNodes,
diff --git a/src/renderer/src/views/home/index.vue b/src/renderer/src/views/home/index.vue
index 16637c6..c740cfa 100644
--- a/src/renderer/src/views/home/index.vue
+++ b/src/renderer/src/views/home/index.vue
@@ -5,19 +5,14 @@
+
-
+
@@ -57,7 +52,8 @@ import { AuthApi } from '@/api/setting/auth'
import {
$sendElectronChanel,
$recvElectronChanel,
- $changeComponentShow
+ $changeComponentShow,
+ $changeComponentPop
} from '@/utils/communication'
import Headers from '../components/headers/index.vue'
import Tree from '../components/tree/index.vue'
@@ -74,6 +70,7 @@ import groundText from '../components/propertyBox/groundText.vue'
import standText from '../components/propertyBox/standText.vue'
import circleObject from '../components/propertyBox/circleObject.vue'
import addDirectory from '@/components/dialog/directory.vue'
+import editDirectory from '@/components/dialog/directoryEdit.vue'
import firstMenu from '@/views/components/leftSide/leftSideFirst.vue'
import bottomMenu from '@/views/components/bottomSide/bottomSide.vue'
import Visibility from '../components/propertyBox/Visibility.vue'
@@ -132,12 +129,19 @@ let dynamicComponentRef = ref()
let addStandTextRef = ref()
let tree = ref()
let selectImgRef = ref()
+let editdirectoryBox = ref()
eventBus.on('openDialog', async (sourceType: any, id: any) => {
console.log(sourceType, id)
if (dynamicComponentRef.value && dynamicComponentRef.value.close) {
dynamicComponentRef.value.close()
}
switch (sourceType) {
+ case 'directory':
+ editdirectoryBox.value.open()
+ // currentComponent.value = addDirectory
+ // await nextTick()
+ // dynamicComponentRef.value?.open()
+ break
case 'addGroundText':
currentComponent.value = addGroundText
await nextTick()
@@ -413,9 +417,9 @@ const getStatus = (time) => {
const currentTimestamp = Date.now()
if (timestamp > currentTimestamp) {
- ;(window as any).checkAuthIsValid = true
+ ; (window as any).checkAuthIsValid = true
} else {
- ;(window as any).checkAuthIsValid = false
+ ; (window as any).checkAuthIsValid = false
}
}
@@ -432,7 +436,8 @@ onMounted(async () => {
height: 100%;
}
-.adddirectoryBox {
+.adddirectoryBox,
+.editdirectoryBox {
display: none;
}