Compare commits
2 Commits
5ea8ac3388
...
f56c6cc4ed
| Author | SHA1 | Date |
|---|---|---|
|
|
f56c6cc4ed | |
|
|
1adcb863c1 |
|
|
@ -28,11 +28,11 @@
|
|||
<script type="text/javascript" src="./public/monitor/monitorQX/EasyPlayer-element.min.js"></script>
|
||||
|
||||
<style>
|
||||
.mars3d-template-content{
|
||||
/* .mars3d-template-content{
|
||||
background-image:url(/public/map/popup-background.png);
|
||||
background-size:100% 128%;
|
||||
padding:20px;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@
|
|||
selectItem.value = item;
|
||||
}
|
||||
|
||||
function handleCheck(keys){
|
||||
const item = treeFindById(treeData.value, keys[0]);
|
||||
emit("checked",item);
|
||||
function handleCheck(keys,e){
|
||||
console.log("record",keys,e);
|
||||
emit("checked",e);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ const EditDrawingGeometry = (map,geometry) => {
|
|||
"visibleDepth": true
|
||||
}
|
||||
},
|
||||
clampToGround:true,
|
||||
popup: [],
|
||||
popupOptions: {
|
||||
showNull: true
|
||||
|
|
@ -158,6 +159,7 @@ const AddDrawingGeometry = (map,type) => {
|
|||
"visibleDepth": true
|
||||
}
|
||||
},
|
||||
clampToGround:true,
|
||||
popup: [],
|
||||
popupOptions: {
|
||||
showNull: true
|
||||
|
|
@ -268,9 +270,10 @@ const PreviewDrawingGeometry = (map,geometry) => {
|
|||
"scaleByDistance_near": 1000,
|
||||
"scaleByDistance_nearValue": 1,
|
||||
"distanceDisplayCondition_far": 10000,
|
||||
"visibleDepth": true
|
||||
"visibleDepth": false
|
||||
}
|
||||
},
|
||||
clampToGround:true,
|
||||
popup: [],
|
||||
popupOptions: {
|
||||
showNull: true
|
||||
|
|
|
|||
|
|
@ -100,7 +100,9 @@
|
|||
</div>
|
||||
<div class="detail-button">
|
||||
<a-button type="primary" @click="detailToEdit"> 编辑 </a-button>
|
||||
|
||||
<a-button type="primary" @click="closeDetail" danger> 关闭 </a-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 编辑 -->
|
||||
|
|
@ -228,52 +230,71 @@
|
|||
formState.value.geom = e;
|
||||
});
|
||||
|
||||
// 加载图层
|
||||
// 图层目录树控制逻辑
|
||||
const handlerLoadLayer = (node) => {
|
||||
|
||||
const handlerLoadLayer = (record) => {
|
||||
let layer = globalMap.getLayerById(record.id);
|
||||
|
||||
if (layer) {
|
||||
layer.show = !layer.show;
|
||||
} else {
|
||||
let tileLayer = new mars3d.layer.WmsLayer({
|
||||
name: record.applicationName,
|
||||
id: record.id,
|
||||
url: VITE_GLOB_GEOSERVER_BASE_URL + '/geoserver/my_workspace/wms',
|
||||
layers: 'my_workspace:' + record.tableName,
|
||||
parameters: {
|
||||
transparent: true,
|
||||
format: 'image/png',
|
||||
},
|
||||
getFeatureInfoParameters: {
|
||||
feature_count: 10,
|
||||
},
|
||||
// 单击高亮及其样式
|
||||
highlight: {
|
||||
type: 'wallP',
|
||||
diffHeight: 100,
|
||||
materialType: mars3d.MaterialType.LineFlow,
|
||||
materialOptions: {
|
||||
image: 'https://data.mars3d.cn/img/textures/fence.png',
|
||||
color: '#ffff00',
|
||||
speed: 10, // 速度,建议取值范围1-100
|
||||
axisY: true,
|
||||
},
|
||||
},
|
||||
popup: 'all',
|
||||
flyTo: true,
|
||||
featureToGraphic: function (e) {
|
||||
// 获取点击查询到的数据
|
||||
let wkt = GeojsonToWkt(e.data.geometry);
|
||||
let editData = { ...e.data.properties };
|
||||
editData.geom = wkt;
|
||||
viewData(editData);
|
||||
},
|
||||
});
|
||||
globalMap.addLayer(tileLayer);
|
||||
if(node.node.tableName){ // 图层节点
|
||||
handlerToggleLayer(node.node);
|
||||
}else{ // 分类节点
|
||||
node.node.child?.forEach((item,index)=>{
|
||||
if(!node.node.checked){
|
||||
item.checked = node.node.checked;
|
||||
handlerToggleLayer(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
const handlerToggleLayer = (node)=>{
|
||||
if(!node.checked){
|
||||
let layer = globalMap.getLayerById(node.id);
|
||||
if(layer){
|
||||
layer.show = true
|
||||
}else{
|
||||
let tileLayer = new mars3d.layer.WmsLayer({
|
||||
name: node.applicationName,
|
||||
id:node.id,
|
||||
url: VITE_GLOB_GEOSERVER_BASE_URL+"/geoserver/my_workspace/wms",
|
||||
layers: "my_workspace:"+node.tableName,
|
||||
parameters: {
|
||||
transparent: true,
|
||||
format: 'image/png',
|
||||
},
|
||||
crs: "EPSG:4326",
|
||||
getFeatureInfoParameters: {
|
||||
feature_count: 10
|
||||
},
|
||||
// 单击高亮及其样式
|
||||
highlight: {
|
||||
type: "wallP",
|
||||
diffHeight: 100,
|
||||
materialType: mars3d.MaterialType.LineFlow,
|
||||
materialOptions: {
|
||||
image: "https://data.mars3d.cn/img/textures/fence.png",
|
||||
color: "#ffff00",
|
||||
speed: 10, // 速度,建议取值范围1-100
|
||||
axisY: true
|
||||
}
|
||||
},
|
||||
popup: "all",
|
||||
flyTo: true,
|
||||
featureToGraphic:function(e){ // 获取点击查询到的数据
|
||||
let wkt = GeojsonToWkt(e.data.geometry);
|
||||
let editData = {...e.data.properties}
|
||||
editData.geom = wkt;
|
||||
viewData(editData)
|
||||
}
|
||||
})
|
||||
globalMap.addLayer(tileLayer);
|
||||
}
|
||||
}else{
|
||||
let layer = globalMap.getLayerById(node.id);
|
||||
if(layer){
|
||||
layer.show = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
const { createConfirm, createMessage } = useMessage();
|
||||
const showTable = ref('');
|
||||
|
|
@ -433,10 +454,13 @@
|
|||
});
|
||||
};
|
||||
|
||||
const checkedLayer = (e) => {
|
||||
console.log('e123', e);
|
||||
handlerLoadLayer(e);
|
||||
};
|
||||
|
||||
const checkedLayer = (node) => {
|
||||
handlerLoadLayer(node);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const hanlerLoadLayer = () => {};
|
||||
const handleSuccess = () => {
|
||||
|
|
@ -478,6 +502,11 @@
|
|||
showTable.value = 'edit';
|
||||
};
|
||||
|
||||
const detailClose = ()=>{
|
||||
showTable.value = ''
|
||||
DrawingEnd();
|
||||
}
|
||||
|
||||
const delData = (record) => {
|
||||
createConfirm({
|
||||
iconType: 'info',
|
||||
|
|
|
|||
Loading…
Reference in New Issue