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