提交
This commit is contained in:
@ -210,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];
|
||||
}
|
||||
|
||||
1
src/renderer/components.d.ts
vendored
1
src/renderer/components.d.ts
vendored
@ -9,7 +9,6 @@ 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']
|
||||
|
||||
@ -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)
|
||||
@ -137,31 +137,37 @@ export const initMapData = async (type, data, cd) => {
|
||||
}
|
||||
|
||||
if (entityObject) {
|
||||
options = structuredClone(entityObject.options)
|
||||
delete options.host
|
||||
function getOptions() {
|
||||
let opt = structuredClone(entityObject.options)
|
||||
delete opt.host
|
||||
switch (type) {
|
||||
case 'textBox':
|
||||
delete options.name
|
||||
delete opt.name
|
||||
break
|
||||
case 'fountain':
|
||||
case 'fire':
|
||||
case 'smoke':
|
||||
case 'waterL':
|
||||
delete options.url
|
||||
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
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="adddirectory">
|
||||
<div class="editdirectoryBox">
|
||||
<div class="box">
|
||||
<div class="boxHeader nav">
|
||||
<!-- <span></span> -->
|
||||
@ -19,7 +19,7 @@
|
||||
<el-form-item>
|
||||
<div class="btnOption">
|
||||
<el-button type="primary" @click="submitForm(ruleForm)">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -34,10 +34,11 @@ 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 { getKeyOfSelectedNode, getSelectedNode, cusUpdateNode, getSameLevel, getSelectedNodes } = useTreeNode()
|
||||
const title = ref('编辑节点')
|
||||
const sourceId = ref('')
|
||||
let form: any = reactive({
|
||||
sourceName: '图层'
|
||||
sourceName: ''
|
||||
})
|
||||
const ruleForm = ref()
|
||||
const rules = reactive({
|
||||
@ -47,7 +48,10 @@ const removeSpaces = (value: string) => {
|
||||
form.sourceName = value.replace(/\s/g, '')
|
||||
}
|
||||
const close = () => {
|
||||
$changeComponentPop('.adddirectory', false)
|
||||
$changeComponentPop('.editdirectoryBox', false)
|
||||
sourceId.value = ''
|
||||
form.sourceName = ''
|
||||
ruleForm.value?.resetFields()
|
||||
}
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
@ -60,41 +64,11 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
})
|
||||
}
|
||||
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
|
||||
const res: any = await TreeApi.updateDirectoryInfo({
|
||||
id: sourceId.value,
|
||||
sourceName: form.sourceName
|
||||
})
|
||||
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'
|
||||
})
|
||||
}
|
||||
cusUpdateNode({ id: sourceId.value, sourceName: form.sourceName, params: undefined })
|
||||
// console.log(res)
|
||||
}, 3000)
|
||||
// //上传或修改树的层级
|
||||
@ -123,15 +97,23 @@ const add = throttle(async () => {
|
||||
// }
|
||||
// }
|
||||
|
||||
const cancel = () => {
|
||||
$changeComponentPop('.adddirectory', false)
|
||||
form.sourceName = '图层'
|
||||
ruleForm.value?.resetFields()
|
||||
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">
|
||||
.adddirectory {
|
||||
.editdirectoryBox {
|
||||
user-select: none;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
||||
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 {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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="{
|
||||
<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
|
||||
>
|
||||
}" @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) {
|
||||
eventBus.on('openPhoto', async(cb) => {
|
||||
isShowPup.value = true
|
||||
selectCallback = cb
|
||||
getModelList()
|
||||
getSetting()
|
||||
setPhotoList()
|
||||
}
|
||||
})
|
||||
eventBus.on('closeModelSet', (data) => {
|
||||
isShowPup.value = data
|
||||
if (data) {
|
||||
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,
|
||||
background: linear-gradient(90deg,
|
||||
rgba(0, 255, 255, 0) 0%,
|
||||
rgba(0, 255, 255, 0.5) 48.91%,
|
||||
rgba(0, 255, 255, 0) 100%
|
||||
);
|
||||
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,
|
||||
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;
|
||||
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;
|
||||
|
||||
@ -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,14 +100,14 @@ 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.updateTreeIndex(list)
|
||||
@ -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,
|
||||
|
||||
@ -11,14 +11,8 @@
|
||||
<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>
|
||||
@ -135,6 +129,7 @@ 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) {
|
||||
@ -142,7 +137,7 @@ eventBus.on('openDialog', async (sourceType: any, id: any) => {
|
||||
}
|
||||
switch (sourceType) {
|
||||
case 'directory':
|
||||
$changeComponentPop('.editdirectoryBox', true)
|
||||
editdirectoryBox.value.open()
|
||||
// currentComponent.value = addDirectory
|
||||
// await nextTick()
|
||||
// dynamicComponentRef.value?.open()
|
||||
@ -422,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
|
||||
}
|
||||
}
|
||||
|
||||
@ -441,7 +436,8 @@ onMounted(async () => {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.adddirectoryBox, .editdirectoryBox {
|
||||
.adddirectoryBox,
|
||||
.editdirectoryBox {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user