提交
This commit is contained in:
@ -113,6 +113,10 @@ function createWindow(): void {
|
||||
allowRunningInsecureContent: true
|
||||
}
|
||||
})
|
||||
ipcMain.on("restart", () => {
|
||||
app.relaunch();
|
||||
forceQuit();
|
||||
});
|
||||
// 监听启动页完成的消息
|
||||
ipcMain.on('splash-completed', () => {
|
||||
// 启动页进度条已完成,可以关闭启动页并显示主窗口
|
||||
|
||||
2
src/renderer/components.d.ts
vendored
2
src/renderer/components.d.ts
vendored
@ -9,7 +9,9 @@ export {}
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
BaseDialog: typeof import('./src/components/dialog/baseDialog.vue')['default']
|
||||
copy: typeof import('./src/components/dialog/directory copy.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']
|
||||
|
||||
|
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
@ -119,7 +119,7 @@ export default {
|
||||
coorLocation: "坐标定位",
|
||||
mouseLocation: "鼠标定位",
|
||||
annotationAggregation: "标注点聚合",
|
||||
annotation: '卷帘对比',
|
||||
splitScreen: '卷帘对比',
|
||||
screenShot: '屏幕截图',
|
||||
highQuality: '高清出图',
|
||||
videoRecord: '视频录制',
|
||||
|
||||
@ -14,5 +14,13 @@ export const GisApi = {
|
||||
url: `/source/uploadLocationImage`,
|
||||
data
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//修改图层层级
|
||||
updateLayersIndex: async (data: any) => {
|
||||
return await request.post({
|
||||
url: `/source/updateLevel`,
|
||||
data
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -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
|
||||
})
|
||||
},
|
||||
|
||||
@ -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)
|
||||
|
||||
263
src/renderer/src/components/dialog/directoryEdit.vue
Normal file
263
src/renderer/src/components/dialog/directoryEdit.vue
Normal file
@ -0,0 +1,263 @@
|
||||
<template>
|
||||
<div class="adddirectory">
|
||||
<div class="box">
|
||||
<div class="boxHeader nav">
|
||||
<!-- <span></span> -->
|
||||
<span class="label">{{ title }}</span>
|
||||
<div class="close-box" @click="close">
|
||||
<span class="close"></span>
|
||||
<i>x</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="boxBody">
|
||||
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="80px"
|
||||
@keyup.enter.native="submitForm(ruleForm)">
|
||||
<el-form-item label="名称:" prop="sourceName">
|
||||
<!-- @input="removeSpaces" -->
|
||||
<el-input v-model.trim="form.sourceName" placeholder="节点名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div class="btnOption">
|
||||
<el-button type="primary" @click="submitForm(ruleForm)">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { $changeComponentPop } from '@/utils/communication'
|
||||
import { throttle } from '@/utils/index'
|
||||
import { ElMessage, FormInstance } from 'element-plus'
|
||||
import { TreeApi } from '@/api/tree'
|
||||
import { useTreeNode } from '@/views/components/tree/hooks/treeNode'
|
||||
const { getKeyOfSelectedNode, getSelectedNode, cusAddNodes, getSameLevel } = useTreeNode()
|
||||
const title = ref('编辑节点')
|
||||
let form: any = reactive({
|
||||
sourceName: '图层'
|
||||
})
|
||||
const ruleForm = ref()
|
||||
const rules = reactive({
|
||||
sourceName: [{ required: true, message: '请输入名称', trigger: 'blur' }]
|
||||
})
|
||||
const removeSpaces = (value: string) => {
|
||||
form.sourceName = value.replace(/\s/g, '')
|
||||
}
|
||||
const close = () => {
|
||||
$changeComponentPop('.adddirectory', false)
|
||||
}
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
add()
|
||||
} else {
|
||||
console.log('error submit!', fields)
|
||||
}
|
||||
})
|
||||
}
|
||||
const add = throttle(async () => {
|
||||
let parentId = getKeyOfSelectedNode(window.treeObj, 'id')
|
||||
let fnone = getSelectedNode(window.treeObj)
|
||||
const res: any = await TreeApi.addDirectory({
|
||||
id: new YJ.Tools().randomString(),
|
||||
sourceName: form.sourceName,
|
||||
parentId: parentId || undefined
|
||||
})
|
||||
console.log(res)
|
||||
if (res.code == 0 || res.code == 200) {
|
||||
const node = {
|
||||
...res.data
|
||||
}
|
||||
let addNode = await cusAddNodes(window.treeObj, getSelectedNode(window.treeObj), [node], true) //添加节点
|
||||
//获取该节点下的同级节点
|
||||
const someNode: any = getSameLevel(window.treeObj, addNode[0])
|
||||
console.log('someNode', someNode)
|
||||
const newNode = someNode.map((item: any) => {
|
||||
let index = item.getIndex()
|
||||
item.treeIndex = index+1
|
||||
return {
|
||||
...item,
|
||||
treeIndex: item.getIndex()
|
||||
}
|
||||
})
|
||||
ElMessage({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
cancel()
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '添加失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
// 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'
|
||||
// })
|
||||
|
||||
// cancel()
|
||||
// } else {
|
||||
// ElMessage({
|
||||
// message: '添加失败',
|
||||
// type: 'error'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
const cancel = () => {
|
||||
$changeComponentPop('.adddirectory', false)
|
||||
form.sourceName = '图层'
|
||||
ruleForm.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.adddirectory {
|
||||
user-select: none;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
.box {
|
||||
width: 20vw;
|
||||
height: 10vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 45%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: var(--color-sdk-auxiliary-public);
|
||||
font-size: 14px;
|
||||
// z-index: 999999;
|
||||
background: linear-gradient(0deg, var(--color-sdk-bg-gradual)), rgba(0, 0, 0, 0.6);
|
||||
border: 1.5px solid;
|
||||
backdrop-filter: blur(2px);
|
||||
border-image: linear-gradient(to bottom, var(--color-sdk-gradual)) 1;
|
||||
text-align: left;
|
||||
font-family: 'sy-boldface';
|
||||
|
||||
.boxHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 18px;
|
||||
line-height: 46px;
|
||||
padding: 5px 16px 5px 16px;
|
||||
height: 46px;
|
||||
|
||||
.label {
|
||||
font-family: 'Ali-mother-counts-bold';
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
text-align: left;
|
||||
text-shadow: 0px 0px 9px rgb(20 118 255);
|
||||
}
|
||||
|
||||
.close-box {
|
||||
position: absolute;
|
||||
top: -1px;
|
||||
right: 0;
|
||||
height: 30px;
|
||||
cursor: pointer;
|
||||
width: 30px;
|
||||
border-radius: 0 0 0 90%;
|
||||
overflow: hidden;
|
||||
|
||||
.close {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(var(--color-sdk-base-rgb), 1);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
font-size: 18px;
|
||||
font-weight: 900;
|
||||
position: absolute;
|
||||
top: -13px;
|
||||
left: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.boxBody {
|
||||
flex: auto;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
|
||||
.el-form--label-top .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.el-form-item__label {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-input__wrapper {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border: 0.2px solid rgba(0, 255, 255, 0.5);
|
||||
box-shadow: 0 0 0 0.2px rgba(0, 255, 255, 0.5) inset !important;
|
||||
/* 新增此行 */
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
background-color: transparent;
|
||||
color: #fff;
|
||||
// border-color: rgba(var(--color-sdk-base-rgb), 0.5) !important;
|
||||
}
|
||||
|
||||
.btnOption {
|
||||
margin-top: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
background: rgba(var(--color-sdk-base-rgb), 0.2);
|
||||
border-color: rgba(var(--color-sdk-base-rgb), 0.5) !important;
|
||||
color: #ffffff;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.el-button:hover {
|
||||
border-color: rgba(var(--color-sdk-base-rgb), 1) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -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 = () => {
|
||||
// 如果正在动画中,直接返回
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
<div class="leftSideSecondBox">
|
||||
<template v-if="obj">
|
||||
<div class="menuItem" v-for="value in obj.children" @click="handleClick(value)">
|
||||
<img :src="'http://localhost:'+`${availablePort}`+ '/icon/' + `${value}` + '.png'" style="color: rgb(255, 0, 0)" alt="" />
|
||||
<img :src="'http://localhost:' + `${availablePort}` + '/icon/' + `${value}` + '.png'"
|
||||
style="color: rgb(255, 0, 0)" alt="" />
|
||||
<!-- <svg-icon :name="value" :size="20" color="rgba(0, 255, 255, 1)"></svg-icon> -->
|
||||
<span :style="{ color: !clickChange[value] ? 'var(--color-text)' : 'rgb(255,0,0)' }">{{
|
||||
t(`${obj.key}.${value}`)
|
||||
@ -45,7 +46,7 @@ const initList = (value) => {
|
||||
}
|
||||
var clickChange = reactive({
|
||||
mouseLocation: false,
|
||||
annotation: false,
|
||||
splitScreen: false,
|
||||
annotationAggregation: false,
|
||||
videoRecord: false,
|
||||
nightVision: false
|
||||
@ -89,6 +90,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 () => {
|
||||
@ -566,9 +572,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()
|
||||
|
||||
@ -93,6 +93,61 @@
|
||||
<div class="outlineColor"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">标签样式</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">引线颜色</span>
|
||||
<div class="labelLineColor" ref="labelLineColorRef"></div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">背景颜色</span>
|
||||
<div class="labelBackgroundColorStart" ref="labelBackgroundColorStartRef" style="margin-right: 10px;"></div>
|
||||
<div class="labelBackgroundColorEnd" ref="labelBackgroundColorEndRef"></div>
|
||||
</div>
|
||||
<!-- <div class="col font-select-box">
|
||||
<span class="label" style="flex: none">字体选择</span>
|
||||
<el-select class="input input-select font-select" v-model="entityOptions.labelFontFamily">
|
||||
<el-option v-for="item in fontList" :key="item.key" :label="item.name" :value="item.key">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<span class="label">引线宽度</span>
|
||||
<div class="input-number input-number-unit-2">
|
||||
<input
|
||||
class="input"
|
||||
type="number"
|
||||
title=""
|
||||
min="1"
|
||||
max="999"
|
||||
v-model="entityOptions.labelLineWidth"
|
||||
/>
|
||||
<span class="unit">px</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<span class="label">引线长度</span>
|
||||
<div class="input-number input-number-unit-2">
|
||||
<input
|
||||
class="input"
|
||||
type="number"
|
||||
title=""
|
||||
min="0"
|
||||
max="999"
|
||||
v-model="entityOptions.labelPixelOffset"
|
||||
/>
|
||||
<span class="unit">px</span>
|
||||
<span class="arrow"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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)'
|
||||
} //点击清空按钮事件回调
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -52,13 +52,13 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<span>最小初速度</span>
|
||||
<input type="range" max="100" min="0" step="1" v-model="entityOptions.minimumSpeed">
|
||||
<input type="range" max="100" min="0" step="1" :value="entityOptions.minimumSpeed" @input="changeMinimumSpeed">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<span>最大初速度</span>
|
||||
<input type="range" max="100" min="0" step="1" v-model="entityOptions.maximumSpeed">
|
||||
<input type="range" max="100" min="0" step="1" :value="entityOptions.maximumSpeed" @input="changeMaximumSpeed">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -66,13 +66,13 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<span>最小存在时间</span>
|
||||
<input type="range" max="100" min="0.01" step="0.1" v-model="entityOptions.minimumParticleLife">
|
||||
<input type="range" max="100" min="0.01" step="0.1" :value="entityOptions.minimumParticleLife" @input="changeMinimumParticleLife">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<span>最大存在时间</span>
|
||||
<input type="range" max="100" min="0.01" step="0.1" v-model="entityOptions.maximumParticleLife">
|
||||
<input type="range" max="100" min="0.01" step="0.1" :value="entityOptions.maximumParticleLife" @input="changeMaximumParticleLife">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -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<entityOptions.value.minimumSpeed) {
|
||||
maximumSpeed = entityOptions.value.minimumSpeed
|
||||
}
|
||||
entityOptions.value.maximumSpeed = maximumSpeed
|
||||
}
|
||||
const changeMinimumParticleLife = (event) => {
|
||||
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.minimumParticleLife) {
|
||||
maximumParticleLife = entityOptions.value.minimumParticleLife
|
||||
}
|
||||
entityOptions.value.maximumParticleLife = maximumParticleLife
|
||||
}
|
||||
|
||||
|
||||
|
||||
const closeCallback = () => {
|
||||
entityOptions.value.originalOptions = structuredClone(originalOptions)
|
||||
that.positionEditing = false
|
||||
|
||||
@ -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'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 图片文件上传后续
|
||||
|
||||
@ -110,8 +110,8 @@ export const useTree = () => {
|
||||
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'
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
<component :is="currentComponent" ref="dynamicComponentRef" />
|
||||
<richText></richText>
|
||||
<addDirectory ref="adddirectoryBox" class="adddirectoryBox absolute zIndex999"></addDirectory>
|
||||
<editDirectory ref="editdirectoryBox" class="editdirectoryBox absolute zIndex999"></editDirectory>
|
||||
<!-- <addStandText ref="addStandTextRef"></addStandText> -->
|
||||
<!--左侧一级菜单-->
|
||||
<firstMenu class="absolute zIndex9" ref="firstMenuRef"></firstMenu>
|
||||
@ -50,7 +51,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'
|
||||
@ -67,6 +69,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'
|
||||
@ -131,6 +134,12 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||
dynamicComponentRef.value.close()
|
||||
}
|
||||
switch (sourceType) {
|
||||
case 'directory':
|
||||
$changeComponentPop('.editdirectoryBox', true)
|
||||
// currentComponent.value = addDirectory
|
||||
// await nextTick()
|
||||
// dynamicComponentRef.value?.open()
|
||||
break
|
||||
case 'addGroundText':
|
||||
currentComponent.value = addGroundText
|
||||
await nextTick()
|
||||
@ -425,7 +434,7 @@ onMounted(async () => {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.adddirectoryBox {
|
||||
.adddirectoryBox, .editdirectoryBox {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user