This commit is contained in:
2023-05-12 18:10:29 +08:00
parent e94a491162
commit 37d0be9b23
217 changed files with 4004 additions and 614 deletions

View File

@ -670,6 +670,7 @@ function initMap() {
// );
}
// data数据数组
// name实体名称方便以后删除
// color实体颜色
@ -1190,6 +1191,7 @@ const selectTab = () => {
},
];
if (value.value == '370211') {
console.log('sssssssssssssssssssss');
removeWms(['village_CQL']);
XZDM=null
removeWms(['aaa']);
@ -1318,6 +1320,9 @@ const selectTab = () => {
],
});
hiddenOverlayChart();
ASdivision();
areachar();
typesof();
return
}
areatext = '1293842';

File diff suppressed because it is too large Load Diff

View File

@ -241,6 +241,7 @@
<span><img src="@/assets/images/face.png" alt="" /></span>
<span><img src="@/assets/images/position.png" alt="" /></span>
</div>
<div id="pop"></div>
<div id="popup1">
<div v-for="(item, index) in clickInfoMap.info" :key="index">
<div class="rowWra">
@ -291,6 +292,7 @@ const clickInfoMap = ref({ info: [] });
const flag = ref(false);
let leftWraFlag = ref(false);
let rightWraFlag = ref(false);
let checkListdata = ref([]);
//下载
/*---------------------------*/
const Deta = item => {
@ -446,11 +448,12 @@ function initonMounted() {
getArea(); //请求
getFarmland();
for (const key in dic) {
if(dic[key].disabled !==true){
checkList.value.push(key)
if (dic[key].disabled !== true) {
console.log(key);
checkListdata.value.push(key);
}
}
// checkList.value = Object.keys(dic);
checkList.value = checkListdata.value;
let leftWra = document.querySelector('.leftWra');
leftWra ? (leftWra.style.transform = 'translate(-107%,0)') : '';
let rightWra = document.querySelector('.rightWra');
@ -539,8 +542,67 @@ function initMap() {
layerClick();
// 添加镇级矢量
addWms('shuzisannong:huangdaoqu_town', 'shuzisannong:huangdaoqu_town');
let cityDS = Cesium.GeoJsonDataSource.load('http://121.36.229.60:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson', {
fill: Cesium.Color.YELLOW.withAlpha(0.01),
strokeWidth: 3,
markerSymbol: '?',
clampToGround: true,
outline: true,
outlineColor: Cesium.Color.BLACK
});
viewer.dataSources.add(cityDS);
}
// let handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
// handler.setInputAction(function (movement) {
// let ellipsoid = viewer.scene.globe.ellipsoid; //得到当前三维场景的椭球体
// let cartesian_two = viewer.camera.pickEllipsoid(movement.endPosition, ellipsoid); //当前世界坐标笛卡尔积
// if (cartesian_two) {
// //获取实时经纬度
// let cartographic_two = ellipsoid.cartesianToCartographic(cartesian_two); //将笛卡尔坐标转换为地理坐标
// //将弧度转为度的十进制度表示
// let longitudeString_two = Cesium.Math.toDegrees(cartographic_two.longitude);
// let latitudeString_two = Cesium.Math.toDegrees(cartographic_two.latitude);
// // document.getElementById('address_lon').innerHTML = `${longitudeString_two.toFixed(6)}`;
// // document.getElementById('address_lat').innerHTML = `${latitudeString_two.toFixed(6)}`;
// //这是鼠标移动显示省市
// //自定义悬浮框
// let popClick = document.getElementById('pop');
// document.getElementById('cesiumContainer').onmousemove = e => {
// if (
// viewer.scene.pick(movement.endPosition)
// ) {
// if (
// viewer.scene.pick(movement.endPosition).id &&
// viewer.scene.pick(movement.endPosition).id._properties &&
// viewer.scene.pick(movement.endPosition).id._properties._XZMC
// ) {
// popClick.style.left = movement.endPosition.x + 20 + 'px';
// popClick.style.top = movement.endPosition.y + 10 + 'px';
// if (viewer.scene.pick(movement.endPosition).id._properties._XZMC._value) {
// // popClick.innerHTML = viewer.scene.pick(movement.endPosition).id._name;
// popClick.innerHTML = viewer.scene.pick(
// movement.endPosition
// ).id._properties._XZMC._value;
// }
// popClick.style.display = 'block';
// }
// } else {
// popClick.style.display = 'none';
// }
// };
// document.getElementById('cesiumContainer').onmouseleave = e => {
// if (viewer.scene.pick(movement.endPosition)) {
// popClick.style.display = 'none';
// }
// };
// }
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
const checkList = ref(['false']);
function getLevel(height) {
@ -957,7 +1019,7 @@ function getFarmland() {
//返回
function back() {
value.value = '370211';
selectTab()
selectTab();
removeWms(['huangdaoqu_town'], true);
removeWms(['shuzisannong:farmlandgbzn'], true);
addWms('shuzisannong:huangdaoqu_town', 'shuzisannong:huangdaoqu_town');
@ -1054,7 +1116,7 @@ const getaArea = () => {
const selectTab = () => {
areachar();
if (value.value == '370211') {
XZDM=null
XZDM = null;
//全部
getTownships();
classData = [302034, 243990, 42344, 34234, 304235];
@ -1759,7 +1821,7 @@ function farmland() {
show: true,
top: '10',
left: 'center',
textStyle: { color: 'rgba(255,255,255,.9)' },
textStyle: { color: 'black' },
itemWidth: 20,
itemHeight: 12.5,
icon: 'stack',
@ -1799,7 +1861,8 @@ function farmland() {
},
axisLabel: {
interval: 0,
color: 'rgba(255, 255, 255, 1)',
// color: 'rgba(255, 255, 255, 1)',
color:'block',
fontSize: 14,
},
data: ['片区1', '片区2', '片区3', '片区4', '片区5', '片区6', '片区7'],
@ -2051,7 +2114,8 @@ function ASdivision() {
axisLabel: {
show: true, // 是否显示刻度标签 默认显示
fontSize: 12, // 文字的字体大小
color: 'rgba(255, 255, 255, 1)', // 刻度标签文字的颜色
// color: 'rgba(255, 255, 255, 1)', // 刻度标签文字的颜色
color:'black',
// 使用字符串模板,模板变量为刻度默认标签 {value}
formatter: '{value}',
},
@ -2275,10 +2339,10 @@ $height: calc(100vh - 100px);
.title {
width: 100%;
height: 45px;
background: url('@/assets/images/title.png');
// background: url('@/assets/images/title.png');
background-repeat: no-repeat;
background-size: 110% 100%;
color: #fff;
color: black;
font-size: 18px;
font-weight: 700;
line-height: 45px;
@ -2293,13 +2357,13 @@ $height: calc(100vh - 100px);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
background: linear-gradient(
180deg,
rgba(255, 255, 255, 1) 33.33%,
rgba(41, 255, 219, 1) 100%
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
// background: linear-gradient(
// 180deg,
// rgba(255, 255, 255, 1) 33.33%,
// rgba(41, 255, 219, 1) 100%
// );
// -webkit-background-clip: text;
// -webkit-text-fill-color: transparent;
}
p {
@ -2383,8 +2447,9 @@ $height: calc(100vh - 100px);
display: flex;
flex-direction: column;
align-items: center;
background: rgba(2, 31, 26, 0.85);
box-shadow: inset 0px 0px 15px 6px rgba(41, 255, 255, 0.5);
// background: rgba(2, 31, 26, 0.85);
background: #fff;
// box-shadow: inset 0px 0px 15px 6px rgba(41, 255, 255, 0.5);
transition: transform 1s;
.rightFoldDiv {
width: 30px;
@ -2532,7 +2597,7 @@ $height: calc(100vh - 100px);
}
:deep(.el-checkbox__label) {
color: rgba(255, 255, 255, 1);
color: black;
}
}
@ -2565,6 +2630,17 @@ $height: calc(100vh - 100px);
align-items: flex-start;
display: none;
}
#pop{
border-radius: 5px;
position: absolute;
background:#fff;
display: none;
// justify-content: flex-start;
// align-items: flex-end;
padding: 8px;
border: 2px solid rgba(4, 153, 153, 1);
}
#popup1 {
border-radius: 5px;

File diff suppressed because one or more lines are too long