Merge branch 'zyl' of http://xny.yj-3d.com:3000/zhouyulong/electron-4 into zyl
This commit is contained in:
1
src/renderer/components.d.ts
vendored
1
src/renderer/components.d.ts
vendored
@ -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']
|
||||
|
||||
|
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
|
||||
})
|
||||
},
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
245
src/renderer/src/components/dialog/directoryEdit.vue
Normal file
245
src/renderer/src/components/dialog/directoryEdit.vue
Normal file
@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<div class="editdirectoryBox">
|
||||
<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="close">取消</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, cusUpdateNode, getSameLevel, getSelectedNodes } = useTreeNode()
|
||||
const title = ref('编辑节点')
|
||||
const sourceId = 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('.editdirectoryBox', false)
|
||||
sourceId.value = ''
|
||||
form.sourceName = ''
|
||||
ruleForm.value?.resetFields()
|
||||
}
|
||||
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 () => {
|
||||
const res: any = await TreeApi.updateDirectoryInfo({
|
||||
id: sourceId.value,
|
||||
sourceName: form.sourceName
|
||||
})
|
||||
cusUpdateNode({ id: sourceId.value, sourceName: form.sourceName, params: undefined })
|
||||
// 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 open = () => {
|
||||
let selectNodes = getSelectedNodes(window.treeObj);
|
||||
if (selectNodes && selectNodes[selectNodes.length - 1]) {
|
||||
sourceId.value = selectNodes[selectNodes.length - 1].id
|
||||
form.sourceName = selectNodes[selectNodes.length - 1].sourceName
|
||||
$changeComponentPop('.editdirectoryBox', true)
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
close
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.editdirectoryBox {
|
||||
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>
|
||||
1
src/renderer/src/icons/svg/weather.svg
Normal file
1
src/renderer/src/icons/svg/weather.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 32 KiB |
@ -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]
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -10,6 +10,9 @@
|
||||
<span>{{ date.ymd }}</span>
|
||||
<span>{{ t(`week.${date.week}`) }}</span>
|
||||
</div>
|
||||
<div class="weather">
|
||||
<svg-icon name="weather" :size="40"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<setTool ref="setToolRef"></setTool>
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 = () => {
|
||||
// 如果正在动画中,直接返回
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -11,55 +11,29 @@
|
||||
<div class="set_detail">
|
||||
<div class="top">
|
||||
<div>
|
||||
<el-input
|
||||
v-model="modelName"
|
||||
class="w-50 m-2"
|
||||
placeholder="请输入图标名称进行搜索"
|
||||
:suffix-icon="Search"
|
||||
/>
|
||||
<el-input v-model="modelName" class="w-50 m-2" placeholder="请输入图标类型进行搜索" :suffix-icon="Search" />
|
||||
</div>
|
||||
<div class="typeBut">
|
||||
<span
|
||||
v-for="(item, index) in butList"
|
||||
:key="index"
|
||||
:class="{ clickButClass: butActiveIndex === index }"
|
||||
@click="typeClick(index)"
|
||||
>{{ item }}</span
|
||||
>
|
||||
<span v-for="(item, index) in butList" :key="index" :class="{ clickButClass: butActiveIndex === index }"
|
||||
@click="typeClick(index)">{{ item }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<!-- 左侧Tab导航 -->
|
||||
<div class="treeCon">
|
||||
<el-tree
|
||||
style="max-width: 600px"
|
||||
:data="typeTreeData"
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
@node-click="handleTypeClick"
|
||||
:filter-node-method="filterNode"
|
||||
>
|
||||
<el-tree style="max-width: 600px" :data="typeTreeData" ref="treeRef" node-key="id"
|
||||
@node-click="handleTypeClick" :filter-node-method="filterNode">
|
||||
<template #default="{ node, data }">
|
||||
<!-- <span> {{ node.label }}</span> -->
|
||||
|
||||
<span
|
||||
:class="{
|
||||
'primary-type': !(node.childNodes.length != 0),
|
||||
'selected-text': node.id === currentTypeId
|
||||
}"
|
||||
@click.stop="toggleExpand(node)"
|
||||
class="allowDrag"
|
||||
>
|
||||
<svg-icon
|
||||
:name="node.expanded ? 'arrow' : 'more'"
|
||||
:size="12"
|
||||
color="rgba(0, 255, 255, 1)"
|
||||
style="margin-right: 5px; margin-left: 5px"
|
||||
v-if="node.childNodes.length != 0"
|
||||
@click.stop="toggleExpand(node)"
|
||||
></svg-icon>
|
||||
{{ node.label }}</span
|
||||
>
|
||||
<span :class="{
|
||||
'primary-type': !(node.childNodes.length != 0),
|
||||
'selected-text': node.id === currentTypeId
|
||||
}" @click.stop="toggleExpand(node)" class="allowDrag">
|
||||
<svg-icon :name="node.expanded ? 'arrow' : 'more'" :size="12" color="rgba(0, 255, 255, 1)"
|
||||
style="margin-right: 5px; margin-left: 5px" v-if="node.childNodes.length != 0"
|
||||
@click.stop="toggleExpand(node)"></svg-icon>
|
||||
{{ node.label }}</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
@ -68,29 +42,17 @@
|
||||
<div class="model-section" v-if="butActiveIndex === 2">
|
||||
<!-- <h2 class="section-title">{{ categories[Number(currentTypeId)].name }}</h2> -->
|
||||
<div class="model-grid">
|
||||
<div
|
||||
v-for="(model, mIndex) in categories"
|
||||
:key="mIndex"
|
||||
class="model-item"
|
||||
@click="modelClick(mIndex, model)"
|
||||
>
|
||||
<div v-for="(model, mIndex) in categories" :key="mIndex" class="model-item"
|
||||
@click="modelClick(mIndex, model)">
|
||||
<div class="imgbg">
|
||||
<el-image
|
||||
:src="'http://127.0.0.1:8848' + model.data"
|
||||
fit="contain"
|
||||
class="thumbnail"
|
||||
>
|
||||
<el-image :src="service + model.data" fit="contain" class="thumbnail">
|
||||
<template #error>
|
||||
<div class="image-error">加载失败</div>
|
||||
</template>
|
||||
</el-image>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="model-name"
|
||||
:class="{ isactive: activeIndex == mIndex }"
|
||||
:title="model.iconName"
|
||||
>
|
||||
<div class="model-name" :class="{ isactive: activeIndex == mIndex }" :title="model.iconName">
|
||||
{{ model.iconName }}
|
||||
</div>
|
||||
</div>
|
||||
@ -101,38 +63,21 @@
|
||||
<div class="model-section2" v-else>
|
||||
<!-- <h2 class="section-title">{{ categories[Number(currentTypeId)].name }}</h2> -->
|
||||
<div class="typeTitltName" v-if="categories.length">
|
||||
<svg-icon
|
||||
name="fk"
|
||||
:size="16"
|
||||
color="rgba(0, 255, 255, 1)"
|
||||
style="margin-right: 5px"
|
||||
></svg-icon
|
||||
>基本类型
|
||||
<svg-icon name="fk" :size="16" color="rgba(0, 255, 255, 1)" style="margin-right: 5px"></svg-icon>基本类型
|
||||
</div>
|
||||
<div class="model-grid">
|
||||
<div
|
||||
v-for="(model, mIndex) in categories"
|
||||
:key="mIndex"
|
||||
class="model-item"
|
||||
@click="modelClick(mIndex, model)"
|
||||
>
|
||||
<div v-for="(model, mIndex) in categories" :key="mIndex" class="model-item"
|
||||
@click="modelClick(mIndex, model)">
|
||||
<div class="imgbg">
|
||||
<el-image
|
||||
:src="'http://localhost:55110/' + model.data"
|
||||
fit="contain"
|
||||
class="thumbnail"
|
||||
>
|
||||
<el-image :src="'http://localhost:' + availablePort + '/' + model.data" fit="contain"
|
||||
class="thumbnail">
|
||||
<template #error>
|
||||
<div class="image-error">加载失败</div>
|
||||
</template>
|
||||
</el-image>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="model-name"
|
||||
:class="{ isactive: activeIndex == mIndex }"
|
||||
:title="model.iconName"
|
||||
>
|
||||
<div class="model-name" :class="{ isactive: activeIndex == mIndex }" :title="model.iconName">
|
||||
{{ model.iconName }}
|
||||
</div>
|
||||
</div>
|
||||
@ -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<string>('')
|
||||
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;
|
||||
|
||||
@ -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'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 图片文件上传后续
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -661,6 +661,7 @@ export const useTreeNode = () => {
|
||||
}
|
||||
|
||||
return {
|
||||
nodeType,
|
||||
showRightMenu,
|
||||
cusNodeIcon,
|
||||
getSelectedNodes,
|
||||
|
||||
@ -5,19 +5,14 @@
|
||||
<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>
|
||||
<!--底部菜单-->
|
||||
<bottomMenu class="absolute zIndex9" ref="bottomMenuRef"></bottomMenu>
|
||||
<input
|
||||
type="file"
|
||||
id="fileInputlink"
|
||||
style="display: none"
|
||||
multiple
|
||||
accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
||||
@input="uploadFile"
|
||||
/>
|
||||
<input type="file" id="fileInputlink" style="display: none" multiple accept=".jpeg,.png,.jpg,.mp4,.pdf"
|
||||
@input="uploadFile" />
|
||||
|
||||
<!-- 多点视线分析 -->
|
||||
<Visibility ref="visibility"></Visibility>
|
||||
@ -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;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user