Compare commits

...

2 Commits

Author SHA1 Message Date
徐景良 231be12de0 Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua 2024-11-21 15:38:25 +08:00
徐景良 1bcb233056 merge 2024-11-21 15:38:10 +08:00
6 changed files with 53 additions and 39 deletions

View File

@ -1334,6 +1334,14 @@ const areKeyDownChange =
}
return true;
};
const showImage = (url) => {
if (url.indexOf('.png') !== -1 || url.indexOf('.jpg') !== -1 || url.indexOf('.jpeg') !== -1) {
return true;
} else {
return false;
}
};
</script>
<style lang="scss" scoped>

View File

@ -996,6 +996,7 @@
return name;
};
async function changeTask() {
let getGeomPrams = {
TableName: 'drone_shp_data ',
FieldName: 'gid',

View File

@ -325,7 +325,7 @@ onMounted(() => {
.search-container-box{
position:absolute;
width:330px;
height:40px;
height:46px;
top:115px;
left:50px;
z-index:9999;

View File

@ -1101,7 +1101,6 @@ const handlerDrawPolygon = () => {
coordinates.push(coordinates[0]);
geojson.geometry.coordinates[0] = coordinates
let wktStr = GeojsonToWkt(geojson.geometry)
// handlerQueryIntersectTif(wtkStr);
emits("handlerQueryIntersectTif",wktStr)
},
});
@ -1122,58 +1121,50 @@ const handlerQueryIntersectTif = (wkt:string)=>{
})
}
const tifLayers = ref<Array<String>>([]);
function handlerChangeTifLayer(item){
if (item.checked) { //
if(map.getLayer(item.tifId)){
map.setLayoutProperty(item.tifId, 'visibility', 'visible');
}else{
console.log("handlerChangeTifLayer",item)
// map.addSource("source"+item.tifId,{
// type: 'raster',
// tiles: [
// item.accessUrl.replace("http://192.168.10.141","http://192.168.156.221")
// ],
// tileSize: 256,
// minzoom:8,
// maxzoom:24,
// })
// map.addLayer({
// id: item.tifId,
// type: 'raster',
// source: "source"+item.tifId,
// layout: {
// visibility: 'visible',
// },
// minzoom:13,
// maxzoom:24
// })
map.addLayer({
id: item.tifId,
type: "raster",
source: {
map.addSource("source"+item.tifId,{
type: "raster",
tiles: [
// "http://60.213.14.14:8060/geoserver/feixian/wms?service=WMS&version=1.1.0&request=GetMap&layers=feixian:yingxiang&styles=&bbox={bbox-epsg-3857}&width=256&height=256&srs=EPSG:3857&format=image/png&TRANSPARENT=TRUE",
item.accessUrl.replace("http://192.168.10.141","http://192.168.156.221")
item.accessUrl.replace("http://192.168.10.141","http://localhost")
],
tileSize: 256,
},
})
map.addLayer({
id: item.tifId,
type: "raster",
source: "source"+item.tifId,
layout: {
visibility: "visible",
},
paint: {},
})
tifLayers.value.push(item.tifId);
}
} else {
map.setLayoutProperty(item.tifId, 'visibility', 'none');
}
}
//
const handlerDeletePolygon = ()=>{
mp.deleteDraw();
tifLayers.value?.forEach((item,index)=>{
if(map.getLayer(item)){
map.removeLayer(item);
map.removeSource("source"+item);
}
})
tifLayers.value = [];
}

View File

@ -1,8 +1,8 @@
<!-- 海康威视组件 -->
<template>
<BasicModal v-bind="$attrs" @register="registerModal" title="视频监控" @cancel="closeMonitor">
<BasicModal v-bind="$attrs" @register="registerModal" title="视频监控" @cancel="closeMonitor" :mask="false">
<div>{{ monitorInfo ? monitorInfo.name : '' }}</div>
<div id="playWnd" class="playWnd"></div>
<!-- <div id="playWnd" class="playWnd"></div> -->
</BasicModal>
</template>
@ -38,7 +38,7 @@
}
monitorInfo.value = obj;
console.log(obj);
initPlugin();
// initPlugin();
});
const WebControl = window.WebControl; //index.html windowsdk
const JSEncrypt = window.JSEncrypt; //index.html windowsdk

View File

@ -1,5 +1,5 @@
<template>
<div class="case-list-container">
<div class="case-list-container" v-show="tifList.length > 0">
<div class="title">
查询结果
</div>
@ -9,8 +9,8 @@
<a-checkbox v-model:checked="item.checked" @change="layerChange(item)" >
<span>{{item.tifName}}</span>
</a-checkbox>
</div>
<a-empty v-if="tifList.length <= 0" />
</div>
</div>
</template>
@ -29,6 +29,9 @@
import {getIntersectTif } from '@/api/tiankongdi';
import { useMessage } from '@/hooks/web/useMessage';
const { createConfirm, createMessage } = useMessage();
const tifList = ref([])
const emits = defineEmits(['changeTifLayer'])
@ -43,10 +46,15 @@
}
getIntersectTif(query).then(res=>{
res.items?.forEach((item,index)=>{
res.items[index].checked = false;
})
tifList.value = res.items;
if(res.items.length>0){
res.items?.forEach((item,index)=>{
res.items[index].checked = false;
})
tifList.value = res.items;
}else{
createMessage.error("当前范围内暂无查询数据!");
}
})
}
@ -122,4 +130,10 @@ defineExpose({
}
}
}
::v-deep .ant-empty{
margin-top:110px;
}
::v-deep .ant-empty-description{
color:#fff;
}
</style>