From 8e4c9b33eccea1584510dc19e67288c23784646a Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Fri, 31 Oct 2025 17:02:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/图层管理' into 图层管理
---
src/views/layerManagement/components/rightEdit.vue | 10 +++-
src/views/layerManagement/components/utils.js | 6 +-
src/views/layerManagement/components/folderFile.vue | 7 ++-
src/views/layerManagement/index.vue | 38 +++++++++---------
src/styles/element-ui.scss | 7 +++
5 files changed, 39 insertions(+), 29 deletions(-)
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index 090c732..9cc55c2 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -259,7 +259,12 @@
background: transparent;
border: 1px solid #fff;
border-radius: 5px;
-
+ .el-range-editor.is-disabled input {
+ background-color: transparent !important;
+ }
+ .el-range-editor.is-disabled {
+ background-color: transparent !important;
+ }
.el-input__wrapper {
box-shadow: none !important;
background-color: transparent !important;
diff --git a/src/views/layerManagement/components/folderFile.vue b/src/views/layerManagement/components/folderFile.vue
index 56a1ff0..ad94769 100644
--- a/src/views/layerManagement/components/folderFile.vue
+++ b/src/views/layerManagement/components/folderFile.vue
@@ -13,7 +13,7 @@
<div>
<el-select
class="ztzf-layer-search filter-item"
- popper-class="ztzf-select-popper"
+
@change="handleTypeChange"
v-model="formData.event_type"
placeholder="请选择"
@@ -28,7 +28,7 @@
</el-select>
<el-select
v-model="formData.algorithm_name"
- popper-class="ztzf-select-popper"
+
class="ztzf-layer-search"
placeholder="请选择"
clearable
@@ -82,6 +82,7 @@
</template>
<script setup>
+const emit = defineEmits(['refreshMethod']);
import EventBus from '@/utils/eventBus';
import { ElMessage } from 'element-plus';
import dayjs from 'dayjs';
@@ -181,8 +182,8 @@
addFolderApi(params).then(res => {
ElMessage.success('新增成功');
EventBus.emit('gettreeDataApi');
+ emit('refreshMethod');
clearAllData();
-
});
} else {
//文件夹编辑
diff --git a/src/views/layerManagement/components/rightEdit.vue b/src/views/layerManagement/components/rightEdit.vue
index 074f356..502d9e6 100644
--- a/src/views/layerManagement/components/rightEdit.vue
+++ b/src/views/layerManagement/components/rightEdit.vue
@@ -8,7 +8,7 @@
<el-select
:disabled="isDisabled"
class="ztzf-layer-search"
- popper-class="ztzf-select-popper"
+
clearable
v-model="formData.folder_id"
placeholder="请选择"
@@ -38,8 +38,8 @@
<div>
<el-date-picker
:disabled="isDisabled"
- popper-class="ztzf-layer-date-picker-popper"
- class="ztzf-layer-date-picker layertimer"
+
+ class="ztzf-layer-date-picker "
v-model="timeValue"
type="datetimerange"
format="YYYY-MM-DD HH:mm"
@@ -362,7 +362,11 @@
}
:deep(.el-date-editor.el-input__wrapper) {
width: auto !important;
+ background: transparent !important;
}
+ :deep(.el-range-editor.is-disabled input ){
+ background-color: transparent !important;
+ }
}
.detailInfo {
.infpItem {
diff --git a/src/views/layerManagement/components/utils.js b/src/views/layerManagement/components/utils.js
index cdf7c42..65ee603 100644
--- a/src/views/layerManagement/components/utils.js
+++ b/src/views/layerManagement/components/utils.js
@@ -111,7 +111,7 @@
// 开始绘制
startDrawing() {
if (!this.whetherToDraw) {
- console.log('当前不允许绘制');
+
return;
}
@@ -325,7 +325,7 @@
const isPolygonPoint = pickedAllEntity.find(i => i.id.name === DrawPolygon.ENTITY_NAMES.POINT)
const isPolygon = pickedAllEntity.find(i => i.id.name === DrawPolygon.ENTITY_NAMES.POLYGON)
if (this.drawingMode && !this.whetherToDraw) {
- console.log('当前不允许绘制');
+
return; // 阻断后续绘制逻辑
}
// 如果不是绘制模式
@@ -565,7 +565,7 @@
} else {
// 新增:不允许绘制时,确保绘制模式为 false,避免误触发
this.drawingMode = false;
- console.log('当前不允许绘制');
+
}
let newPosition = positions.map(item => {
diff --git a/src/views/layerManagement/index.vue b/src/views/layerManagement/index.vue
index ebecbdd..59a4883 100644
--- a/src/views/layerManagement/index.vue
+++ b/src/views/layerManagement/index.vue
@@ -31,6 +31,7 @@
@callParentMethod="parentMethod"
></rightEdit>
<folderFile
+ @refreshMethod="refreshMethod"
:activeName="activeName"
v-if="layerParams.addFolder || (layerParams.editFolder)"
></folderFile>
@@ -97,16 +98,19 @@
fileType: 1, //文件夹类型
editFolderData: null,
editingIsProhibited:false,//禁止编辑
+ isDetailShow:false
});
const handleClick = tab => {
const clickedTab = tabData.value.find(item => item.type === tab.paneName);
-
activeType.value = clickedTab.type;
activeName.value = clickedTab.name;
getdataFolderApi();
+ parentMethod()
};
-
+const refreshMethod =()=>{
+ getdataFolderApi()
+}
const getdataFolderApi = () => {
let id;
if (activeName.value === '电子围栏') {
@@ -122,13 +126,11 @@
label: folder.name,
value: folder.id.toString(),
}));
- layerParams.value.folderOption = formattedFolderOption;
+ layerParams.value.folderOption = formattedFolderOption;
});
};
// 编辑围栏区域
const handleEdit = val => {
-console.log('编辑数据',val);
-
viewer.entities.removeAll();
layerParams.value.editDetailData = val;
drawPolygonExample.editThePatch(true);
@@ -162,11 +164,6 @@
} else {
viewer.entities.removeAll();
}
-};
-// 编辑围栏区域
-const previewInformation = val => {
-console.log('编辑数据',val);
- layerParams.value.editDetailData = val;
};
const loadDataToMap = dataList => {
if (!viewer) return;
@@ -212,6 +209,7 @@
});
focusOnAllFeatures();
viewInstance.value?.addLeftClickEvent(null, handleFenceClick);
+
};
//计算所有图斑的包围球并定位
const focusOnAllFeatures = () => {
@@ -239,15 +237,15 @@
if (Cesium.defined(pickedObject) && pickedObject.id?.customType === 'fence_polygon') {
const selectedEntity = pickedObject.id;
const selectedData = selectedEntity.customInfo;
- viewer.entities.values.forEach(entity => {
- if (entity.customType === 'fence_polygon') {
- entity.polygon.material = entity === selectedEntity
- ? Cesium.Color.RED.withAlpha(0.5)
- : Cesium.Color.YELLOW.withAlpha(0.5);
- }
- });
-
- layerParams.value.editNest = true; // 显示右侧编辑组件
+ // viewer.entities.values.forEach(entity => {
+ // if (entity.customType === 'fence_polygon') {
+ // entity.polygon.material = entity === selectedEntity
+ // ? Cesium.Color.RED.withAlpha(0.5)
+ // : Cesium.Color.YELLOW.withAlpha(0.5);
+ // }
+ // });
+ if (activeName.value !== '国土空间规划') {
+ layerParams.value.editNest = true; // 显示右侧编辑组件
layerParams.value.decideWhetherToAddOrEdit = 2; // 标记为编辑模式
// 根据围栏类型设置fenceType
if (activeName.value === '电子围栏') {
@@ -259,6 +257,8 @@
layerParams.value.fenceArea = selectedData.area;
layerParams.value.editingIsProhibited = true
}
+ }
+
};
let publicCesiumInstance = null;
let viewer = null;
--
Gitblit v1.9.3