This commit is contained in:
2023-09-11 21:56:39 +08:00
parent 7a43f39ec8
commit 4c2c1739fc
1719 changed files with 33351 additions and 103245 deletions

View File

@ -383,12 +383,6 @@ let dic = {
白菜和萝卜: 'rgba(250, 129, 109, 0.8)',
其他: 'rgba(250, 129, 109, 0.8)',
};
watch(
() => Township.arr,
val => {
console.log('val:', val);
}
);
//行政区划数据
var data = {
title: [],
@ -405,11 +399,6 @@ let dd = {
白菜和萝卜: [],
其他: [],
};
let areatext = '8383894';
const change = () => {
console.log(checkedCities.value);
};
//表格数据
let tableData = [
@ -447,7 +436,6 @@ let TypeTime = {
// 组件挂载完成后执行
onMounted(() => {
getArea(); //请求
getTownships();
getvillages(); //村
@ -463,7 +451,7 @@ onMounted(() => {
let leftWra = document.querySelector('.leftWra');
leftWra ? (leftWra.style.transform = 'translate(-107%,0)') : '';
let rightWra = document.querySelector('.rightWra');
rightWra.style.transform = 'translate(107%,0)';
rightWra.style.transform = 'translate(101%,0)';
});
/*-------------地图------------------------*/
@ -747,7 +735,6 @@ function getFarmland() {
method: 'get',
})
.then(res => {
console.log('农田:', res);
formLandRef.value = res.data.features;
})
.catch(err => {});
@ -797,11 +784,6 @@ function layerClick() {
if (data.length > 0) {
let newData = data['0'];
if (newData.properties && newData.properties.XZDM) {
console.log('XZDM:', XZDM);
console.log(
'newData.properties.XZDM:',
newData.properties.XZDM
);
if (XZDM !== newData.properties.XZDM) {
flag.value = true;
//防止重复加载
@ -848,10 +830,6 @@ function layerClick() {
let info = entitys[na]._info;
// entitys[na].label.show = true
townZuowu.value = info; //保存数据
console.log(
townZuowu.value,
'------------------'
);
showOverlayChart(movement.position); // 添加地图移动监听:使地图移动弹窗跟着移动
viewer.scene.postRender.addEventListener(
infoWindowPostRender
@ -908,7 +886,6 @@ function villageClick(layers, xy, level, cartographic, movement) {
promise.then(data => {
if (data.length > 0) {
let newData = data['0'];
console.log(newData);
viewer.camera.flyTo({
destination: Cesium.Rectangle.fromDegrees(
newData.data.bbox[0],
@ -936,7 +913,6 @@ function villageClick(layers, xy, level, cartographic, movement) {
// 后插和村
if (newData.properties.XZQDM === '370211104217') {
// console.log('后河岔村委会')
const rectangle = Cesium.Rectangle.fromDegrees(
item.bbox[0],
item.bbox[1],
@ -1047,16 +1023,11 @@ function rightFoldClick() {
rightWra.style.transform = 'translate(0,0)';
} else {
let rightWra = document.querySelector('.rightWra');
rightWra.style.transform = 'translate(107%,0)';
rightWra.style.transform = 'translate(101%,0)';
}
}
/*------------------接口--------------------*/
const getArea = () => {
getarea({ time: '2023-04-25', subregion: '1', parent: '黄岛区' }).then(res => {
console.log(res);
});
};
//镇
const getTownships = () => {
getTownship().then(res => {
@ -1167,7 +1138,6 @@ const selectTab = () => {
},
];
if (value.value == '370211') {
console.log('sssssssssssssssssssss');
removeWms(['village_CQL']);
XZDM=null
removeWms(['aaa']);
@ -1331,7 +1301,6 @@ const selectTab = () => {
];
let arr = [...Township.arr];
console.log('arr:', arr);
arr.forEach(item => {
if (item.properties.XZDM == value.value) {
viewer.camera.flyTo({
@ -1346,13 +1315,11 @@ const selectTab = () => {
}
let arr = [...Township.brr];
let brr = [];
// console.log(Township.brr);
arr.forEach(item => {
if (item.properties.XZDM == value.value) {
brr.push(item.properties.XZQMC);
}
});
// console.log(brr);
data.title = [...Object.values(brr)];
});
ASdivision();
@ -1383,8 +1350,6 @@ const selectTab = () => {
townZuowu.value = {
label: arr,
};
console.log();
console.log(arr);
showOverlayChart({ x: 642, y: 312 });
});
};
@ -1768,7 +1733,6 @@ function areachar() {
}
function typesof() {
console.log(Pie3D.arr);
const typesofDivIntance = echarts.init(typesofDiv.value);
let isSelected = '';
let isHovered = '';
@ -2273,10 +2237,6 @@ function farmland() {
// },
};
farmlandDivIntance.on('click', function (params) {
console.log(params.name);
});
farmlandDivIntance.on('click', param => ChartClick(param));
option && farmlandDivIntance.setOption(option, { notMerge: true, grid: { bottom: 20 } });
useEcharts(farmlandDivIntance, option);
}
@ -2376,7 +2336,6 @@ function back() {
value.value = '370211';
selectTab();
if (flag.value === '1') {
console.log(flag.value);
addWms('shuzisannong:huangdaoqu_town', 'tl');
}
viewer.camera.flyTo({
@ -2417,10 +2376,7 @@ function ChartClick(item) {
// 定位到地块
let features = formLandRef.value;
features.forEach(it => {
console.log('it.properties.name:', it.properties.name);
console.log('item.name:', item.name);
if (it.properties.name === item.name) {
console.log('dingwei');
viewer.camera.flyTo({
destination: Cesium.Rectangle.fromDegrees(
it.bbox[0],
@ -2769,14 +2725,12 @@ function ASdivision() {
/*--------------------------------------------------------------------------------------------*/
function getAreaFenlei() {
let fl = fenleiRef.value;
console.log('fl:', fl);
axios({
url:
serverAPI.geoserverUrl +
'/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson',
})
.then(res => {
console.log('res1111:', res);
let data = res.data.features;
data.forEach((item, index) => {
const rectangle = Cesium.Rectangle.fromDegrees(
@ -2807,8 +2761,6 @@ function getAreaFenlei() {
return it.properties;
});
}
// label = label.join(' ')
// console.log('label:', index, label,fl[item.properties.XZMC],item.properties.XZMC)
// 添加点
viewer.entities.add({
name: 'point' + item.properties.XZDM,
@ -3565,17 +3517,7 @@ $height: calc(100vh - 100px);
</style>
<style lang="scss">
.select_city {
background: rgba(2, 31, 26, 0.85);
box-shadow: inset 0px 0px 15px 6px rgba(41, 255, 255, 0.5);
.el-select-dropdown__item.hover {
background: rgba(2, 31, 26, 0.95);
box-shadow: inset 0px 0px 15px 6px rgba(41, 255, 255, 0.7);
}
.el-select-dropdown__item {
color: #fff;
}
background:#fff;
}
.el-select__popper {