This commit is contained in:
2023-04-25 18:19:21 +08:00
parent b0524715df
commit 35a86dc2fe
41 changed files with 4390 additions and 321 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,29 @@
<div style="width: 100%; height: 100%" id="cesiumContainer"></div>
<div class="leftWra">
<div class="leftTop">
<div class="title"><span>作物分类面积统计</span></div>
<div class="title">
<span>作物分类面积统计</span>
<p>
下载 &nbsp;
<img
src="@/assets/icons/svg/downloads.svg"
style="width: 14px; height: 14px; cursor: pointer"
/>
</p>
</div>
<div ref="areaDiv" class="areaDiv"></div>
</div>
<div class="leftbottom">
<div class="title"><span>作物类型统计</span></div>
<div class="title">
<span>作物类型统计</span>
<p>
下载 &nbsp;
<img
src="@/assets/icons/svg/downloads.svg"
style="width: 14px; height: 14px; cursor: pointer"
/>
</p>
</div>
<div ref="typesofDiv" class="typesofDiv"></div>
</div>
</div>
@ -24,7 +42,7 @@
</p>
</div>
<div ref="farmlandDiv" class="farmlandDiv"></div>
<div ref="ProgressBarDiv" class="ProgressBar"></div>
<!-- <div ref="ProgressBarDiv" class="ProgressBar"></div> -->
</div>
<div class="rightbottom">
<div class="title">
@ -220,6 +238,74 @@ let layersDic = {
// 马铃薯: 'rgba(225, 153, 75, 1)',
// 白菜和萝卜: 'rgba(166, 209, 82, 1)',
};
let Pie3D = reactive({
arr: [
{
name: '小麦',
value: 101,
itemStyle: {
opacity: 0.8,
color: 'rgba(110, 209, 84, 0.9)',
},
},
{
// 数据项名称
name: '花生',
value: 156,
itemStyle: {
// 透明度
opacity: 0.8,
// 扇形颜色
color: 'rgba(251, 201, 3, 1)',
},
label: {
show: true,
},
},
{
// 数据项名称
name: '大豆',
value: 156,
itemStyle: {
// 透明度
opacity: 0.8,
// 扇形颜色
color: 'rgba(240, 129, 31, 0.9)',
},
label: {
show: true,
},
},
{
// 数据项名称
name: '地瓜',
value: 156,
itemStyle: {
// 透明度
opacity: 0.8,
// 扇形颜色
color: 'rgba(27, 85, 222, 1)',
},
label: {
show: true,
},
},
{
// 数据项名称
name: '蓝莓',
value: 56,
itemStyle: {
// 透明度
opacity: 0.8,
// 扇形颜色
color: 'rgba(72, 102, 211, 0.9)',
},
label: {
show: true,
},
},
],
});
var data = {
title: ['区域一', '区域二', '区域三', '区域四', '区域五', '区域六', '区域七', '区域八'],
corn: [333.3, null, 500, 500, 333.3, null, 333.3, 500],
@ -726,6 +812,7 @@ function hiddenOverlayChart() {
const pop = document.getElementById('popup1');
pop.style.display = 'none'; // 清除监听事件
viewer.scene.postRender.removeEventListener(infoWindowPostRender);
deleteEntityByName('landtype');
}
//显示弹窗
function showOverlayChart(position) {
@ -754,6 +841,13 @@ function getFarmland() {
//返回
function back() {
removeWms(['huangdaoqu_town'], true);
removeWms(['shuzisannong:farmlandgbzn'], true);
addWms('shuzisannong:huangdaoqu_town', 'shuzisannong:huangdaoqu_town');
viewer.camera.flyTo({
destination: Cesium.Rectangle.fromDegrees(119.5091, 35.5671, 120.3285, 36.1455),
duration: 2,
});
flag.value = false;
}
//接口
const getArea = (item, index) => {
@ -820,11 +914,64 @@ const selectTab = () => {
if (value.value == '370211') {
getTownships();
classData = [302034, 243990, 42344, 34234, 304235];
deleteEntityByName('townLine');
removeWms(['village_CQL']);
} else if (value.value) {
classData = [102034, 173990, 22344, 14234, 104235];
}
console.log(classData);
Pie3D.arr = [
{
name: '小麦',
value: 20,
itemStyle: {
opacity: 0.5,
color: 'rgba(110, 209, 84, 0.9)',
},
},
{
// 数据项名称
name: '花生',
value: 10,
itemStyle: {
// 透明度
opacity: 0.5,
// 扇形颜色
color: 'rgba(251, 201, 3, 1)',
},
label: {
show: true,
},
},
{
// 数据项名称
name: '大豆',
value: 13,
itemStyle: {
// 透明度
opacity: 0.5,
// 扇形颜色
color: 'rgba(240, 129, 31, 0.9)',
},
label: {
show: true,
},
},
{
// 数据项名称
name: '地瓜',
value: 18,
itemStyle: {
// 透明度
opacity: 0.5,
// 扇形颜色
color: 'rgba(27, 85, 222, 1)',
},
label: {
show: true,
},
},
];
areachar();
let arr = [...Township.arr];
arr.forEach(item => {
@ -1042,61 +1189,7 @@ function typesof() {
let isSelected = '';
let isHovered = '';
let hoveredIndex = '';
let option = getPie3D(
[
{
name: '小麦',
value: 101,
itemStyle: {
opacity: 0.5,
color: 'rgba(110, 209, 84, 0.9)',
},
},
{
// 数据项名称
name: '花生',
value: 56,
itemStyle: {
// 透明度
opacity: 0.5,
// 扇形颜色
color: 'rgba(251, 201, 3, 1)',
},
label: {
show: true,
},
},
{
// 数据项名称
name: '大豆',
value: 56,
itemStyle: {
// 透明度
opacity: 0.5,
// 扇形颜色
color: 'rgba(240, 129, 31, 0.9)',
},
label: {
show: true,
},
},
{
// 数据项名称
name: '地瓜',
value: 56,
itemStyle: {
// 透明度
opacity: 0.5,
// 扇形颜色
color: 'rgba(27, 85, 222, 1)',
},
label: {
show: true,
},
},
],
0
);
let option = getPie3D(Pie3D.arr, 0);
// 生成扇形的曲面参数方程
function getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, h) {
// 计算
@ -1329,7 +1422,7 @@ function typesof() {
// 后处理特效可以为画面添加高光、景深、环境光遮蔽SSAO、调色等效果。可以让整个画面更富有质感。
postEffect: {
// 配置这项会出现锯齿,请自己去查看官方配置有办法解决
enable: false,
enable: true,
bloom: {
enable: true,
bloomIntensity: 0.1,
@ -1619,6 +1712,8 @@ function ChartClick(item) {
console.log('item:', item);
// 移除作物
removeWms(['huangdaoqu_town'], true);
removeWms(['shuzisannong:huangdaoqu_town']);
selectTab()
let layername = 'shuzisannong:farmland';
// 判断是否存在避免重复添加
@ -1870,7 +1965,7 @@ function ASdivision() {
barBorderRadius: [0, 0, 0, 0],
barBorderRadius: [0, 0, 0, 0], //
borderWidth: 1, // 设置边框宽度
borderColor: 'rgba(255, 225, 104, 0.8)', // 设置边框颜色
borderColor: 'rgba(4, 247, 227, 0.9)', // 设置边框颜色
color: {
colorStops: [
{
@ -2244,7 +2339,7 @@ $height: calc(100vh - 100px);
#popup1 {
border-radius: 5px;
background: rgba(2, 31, 26, 0.6);
background: rgba(2, 31, 26, 1);
display: none;
// justify-content: flex-start;
// align-items: flex-end;

View File

@ -1,7 +1,7 @@
<template>
<div class="login">
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">登陆</h3>
<h3 class="title">种植业生产监管数字化系统</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
@ -174,6 +174,8 @@ getCookie();
margin: 0px auto 30px auto;
text-align: center;
color: #707070;
font-size: 16px;
font-weight: 400;
}
.login-form {