Compare commits

..

No commits in common. "17288ef7857773a81946f29ab2764e822feafa8f" and "49bcfb120ce1d3cf4355582b8c7fe18c523a4a0c" have entirely different histories.

3 changed files with 4827 additions and 8326 deletions

12750
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +1,4 @@
{
<<<<<<< HEAD
"name": "ruoyi",
"version": "3.8.4",
"description": "若依管理系统",
"author": "若依",
"license": "MIT",
"scripts": {
"dev": "vite",
"build:prod": "vite build",
"build:stage": "vite build --mode staging",
"preview": "vite preview"
},
"repository": {
"type": "git",
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": {
"@element-plus/icons-vue": "2.0.10",
"@fit-screen/vue": "^0.2.0",
"@vueuse/core": "9.5.0",
"axios": "0.27.2",
"echarts": "^5.3.0",
"element-plus": "2.2.21",
"file-saver": "2.0.5",
"fuse.js": "6.6.2",
"js-cookie": "3.0.1",
"jsencrypt": "3.3.1",
"lib-flexible": "^0.3.2",
"nprogress": "0.2.0",
"pinia": "2.0.22",
"postcss-px2rem": "^0.3.0",
"v-scale-screen": "^2.2.0",
"vue": "3.2.45",
"vue-cropper": "1.0.3",
"vue-router": "4.1.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "3.1.0",
"@vue/compiler-sfc": "3.2.45",
"sass": "1.56.1",
"unplugin-auto-import": "0.11.4",
"vite": "3.2.3",
"vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-setup-extend": "0.4.0"
}
=======
"name": "ruoyi",
"version": "3.8.4",
"description": "若依管理系统",
@ -91,6 +44,5 @@
"vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons": "2.0.1",
"vite-plugin-vue-setup-extend": "0.4.0"
>>>>>>> 49bcfb120ce1d3cf4355582b8c7fe18c523a4a0c
}
}

View File

@ -5,13 +5,19 @@
<div class="leftTop">
<div class="title">
<span>种植面积时间统计</span>
<p @click="Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianjishijian.xlsx'
)
">
<p
@click="
Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianjishijian.xlsx'
)
"
>
下载 &nbsp;
<img src="@/assets/icons/svg/downloads.svg" style="width: 14px; height: 14px; cursor: pointer" />
<img
src="@/assets/icons/svg/downloads.svg"
style="width: 14px; height: 14px; cursor: pointer"
/>
</p>
</div>
<div ref="areaDiv" class="areaDiv"></div>
@ -20,12 +26,18 @@
<div class="leftbottom">
<div class="title">
<span>种植面积统计</span>
<p @click="Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianji%20.xlsx'
)
">
<p
@click="
Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/zhongzhimianji%20.xlsx'
)
"
>
下载 &nbsp;
<img src="@/assets/icons/svg/downloads.svg" style="width: 14px; height: 14px; cursor: pointer" />
<img
src="@/assets/icons/svg/downloads.svg"
style="width: 14px; height: 14px; cursor: pointer"
/>
</p>
</div>
<div ref="typesofDiv" class="typesofDiv"></div>
@ -42,12 +54,18 @@
<div class="rightTop">
<div class="title">
<span>作物类型统计-高标准农田</span>
<p @click="Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/81f3b011-7a5d-4a21-88aa-8ea51142e564_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx'
)
">
<p
@click="
Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/81f3b011-7a5d-4a21-88aa-8ea51142e564_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx'
)
"
>
下载 &nbsp;
<img src="@/assets/icons/svg/downloads.svg" style="width: 14px; height: 14px; cursor: pointer" />
<img
src="@/assets/icons/svg/downloads.svg"
style="width: 14px; height: 14px; cursor: pointer"
/>
</p>
</div>
<div ref="farmlandDiv" class="farmlandDiv"></div>
@ -56,17 +74,27 @@
<div class="rightbottom">
<div class="title">
<span>作物类型统计-行政区划</span>
<p @click="Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/0c0ff4cf-151a-470e-856a-b0fce0fde997_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx'
)
">
<p
@click="
Deta(
'https://1912c.oss-cn-beijing.aliyuncs.com/egg-oss-demo/0c0ff4cf-151a-470e-856a-b0fce0fde997_%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%87%BA.xlsx'
)
"
>
下载 &nbsp;
<img src="@/assets/icons/svg/downloads.svg" style="width: 14px; height: 14px; cursor: pointer" />
<img
src="@/assets/icons/svg/downloads.svg"
style="width: 14px; height: 14px; cursor: pointer"
/>
</p>
</div>
<el-select @change="selectTab(item)" v-model="value" clearable placeholder="全部">
<el-option v-for="item in Township.arr" :key="item.properties.XZDM" :label="item.properties.XZMC"
:value="item.properties.XZDM" />
<el-option
v-for="item in Township.arr"
:key="item.properties.XZDM"
:label="item.properties.XZMC"
:value="item.properties.XZDM"
/>
</el-select>
<div ref="ASdivisionDiv" class="ASdivision"></div>
</div>
@ -75,42 +103,78 @@
<p>图例</p>
<div class="mt-4">
<el-checkbox-group @change="change()" v-model="checkedCities">
<el-checkbox checked style="
<el-checkbox
checked
style="
background: rgba(102, 142, 214, 0.8);
border: 1px solid rgba(102, 142, 214, 1);
" label="小麦" />
<el-checkbox checked style="
"
label="小麦"
/>
<el-checkbox
checked
style="
background: rgba(255, 225, 104, 0.8);
border: 1px solid rgba(255, 225, 104, 1);
" label="玉米" />
<el-checkbox checked style="
"
label="玉米"
/>
<el-checkbox
checked
style="
background: rgba(156, 220, 130, 0.8);
border: 1px solid rgba(156, 220, 130, 1);
" label="大豆" />
<el-checkbox checked style="
"
label="大豆"
/>
<el-checkbox
checked
style="
background: rgba(209, 91, 127, 0.8);
border: 1px solid rgba(209, 91, 127, 1);
" label="地瓜" />
<el-checkbox checked style="
"
label="地瓜"
/>
<el-checkbox
checked
style="
background: rgba(212, 236, 89, 0.8);
border: 1px solid rgba(212, 236, 89, 1);
" label="花生" />
<el-checkbox checked style="
"
label="花生"
/>
<el-checkbox
checked
style="
background: rgba(50, 211, 235, 0.8);
border: 1px solid rgba(50, 211, 235, 1);
" label="蓝莓" />
<el-checkbox checked style="
"
label="蓝莓"
/>
<el-checkbox
checked
style="
background: rgba(91, 196, 159, 0.8);
border: 1px solid rgba(91, 196, 159, 1);
" label="茶叶" />
<el-checkbox checked style="
"
label="茶叶"
/>
<el-checkbox
checked
style="
background: rgba(254, 182, 77, 0.8);
border: 1px solid rgba(254, 182, 77, 1);
" label="马铃薯" />
<el-checkbox checked style="
"
label="马铃薯"
/>
<el-checkbox
checked
style="
background: rgba(250, 129, 109, 0.8);
border: 1px solid rgba(250, 129, 109, 1);
" label="白菜和萝卜" />
"
label="白菜和萝卜"
/>
</el-checkbox-group>
</div>
</div>
@ -134,7 +198,7 @@
</template>
<script setup>
import { ref, onMounted, inject, reactive, watch } from 'vue';
import { ref, onMounted, inject, reactive } from 'vue';
import * as echarts from 'echarts';
import TimeLine from '@/components/TimeLine/TimeLine.vue';
import { useEcharts } from '@/hooks/useEcharts';
@ -166,9 +230,7 @@ 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: [],
@ -323,11 +385,6 @@ function initMap() {
destination: Cesium.Rectangle.fromDegrees(119.5091, 35.5671, 120.3285, 36.1455),
duration: 2,
});
<<<<<<< HEAD
//
layerClick()
=======
var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
handler.setInputAction(function (movement) {
var ray = viewer.camera.getPickRay(movement.position);
@ -367,7 +424,6 @@ function initMap() {
}
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
>>>>>>> 49bcfb120ce1d3cf4355582b8c7fe18c523a4a0c
//
// Cesium.GeoJsonDataSource.load(
@ -475,9 +531,6 @@ function initMap() {
// );
}
// data
// name便
// color
function addBoundaryHandle(data, name, color) {
data.forEach(item => {
let arr = [];
@ -546,128 +599,6 @@ function getLevel(height) {
}
}
<<<<<<< HEAD
let XZDM = ''
//
function layerClick() {
var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
handler.setInputAction(function (movement) {
var ray = viewer.camera.getPickRay(movement.position);
var cartesian = viewer.scene.globe.pick(ray, viewer.scene);
if (cartesian) {
let cartographic = Cesium.Cartographic.fromCartesian(cartesian);
if (cartographic) {
let xy = new Cesium.Cartesian2();
let alti = viewer.camera.positionCartographic.height;
let level = getLevel(alti);
const layers = viewer.imageryLayers._layers;
console.log('layers:', layers);
const index = layers.findIndex(item => item._imageryProvider._layers && item._imageryProvider._layers === 'shuzisannong:huangdaoqu_town')
if (index > -1) {
const providerPoint = layers[index];
//
let provider = providerPoint._imageryProvider;
if (provider && provider.ready && provider._layers && providerPoint.show === true) {
xy = provider.tilingScheme.positionToTileXY(cartographic, level, xy);
let promise = provider.pickFeatures(xy.x, xy.y, level, cartographic.longitude, cartographic.latitude);
if (promise) {
promise.then(data => {
if (data.length > 0) {
console.log('data:', data)
let newData = data['0']
if (newData.properties && newData.properties.XZDM) {
if (XZDM !== newData.properties.XZDM) {//
XZDM = newData.properties.XZDM
console.log('111', newData)
let item = newData.data
//
viewer.camera.flyTo({
destination: Cesium.Rectangle.fromDegrees(item.bbox[0], item.bbox[1], item.bbox[2], item.bbox[3]),
duration: 2,
});
//
deleteEntityByName('townLine')
//
addBoundaryHandle(item.geometry.coordinates, 'townLine', 'yellow')
//
removeWms(['village_CQL'])
//
addvillage(`XZDM=${newData.properties.XZDM}`, 'village_CQL')
}
} else {
removeWms(['village_CQL'])
}
}
});
}
}
}
}
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
}
//
// CQL_FILTER:
// customName
function addvillage(CQL_FILTER, customName) {
console.log('222')
let map2 = new Cesium.WebMapServiceImageryProvider({
url: `http://121.36.229.60:9080/geoserver/shuzisannong/wms`,
layers: 'shuzisannong:huangdaoqu_village', //
parameters: {
service: 'WMS',
format: 'image/png',
transparent: true, //
// CQL_FILTER: `XZDM=${value.value}`,
CQL_FILTER: CQL_FILTER
},
});
map2.customName = customName;
viewer.imageryLayers.addImageryProvider(map2);
}
// wms
// nameArry customName
// isMohu
function removeWms(nameArry, isMohu) {
if (viewer) {
// customName
const layers = viewer.imageryLayers._layers
for (let f = layers.length - 1; f >= 0; f--) {
nameArry.forEach(item => {
if (layers[f]._imageryProvider && layers[f]._imageryProvider.customName) {
if (isMohu) {
if (layers[f]._imageryProvider.customName.indexOf(item) > -1) {
viewer.imageryLayers.remove(layers[f])
}
} else {
if (layers[f]._imageryProvider.customName === item) {
viewer.imageryLayers.remove(layers[f])
}
}
}
})
}
}
}
// ()
function deleteEntityByName(name) {
if (viewer) {
let entitys = viewer.entities._entities._array;
for (var na = entitys.length - 1; na >= 0; na--) {
if (entitys[na]._name && entitys[na]._name === name) {
viewer.entities.remove(entitys[na]);
}
}
}
}
=======
>>>>>>> 49bcfb120ce1d3cf4355582b8c7fe18c523a4a0c
/*------------------接口--------------------*/
const getArea = () => {
getarea({ time: '2023-04-19', subregion: '0', parent: '黄岛区' }).then(res => {
@ -730,7 +661,6 @@ const selectTab = () => {
getTownships();
}
let arr = [...Township.arr];
console.log('arr:', arr)
arr.forEach(item => {
if (item.properties.XZDM == value.value) {
viewer.camera.flyTo({
@ -755,20 +685,24 @@ const selectTab = () => {
data.title = [...Object.values(brr)];
ASdivision();
});
let town = [...Township.arr]
const townData = town.find(item => item.properties.XZDM === value.value)
if (townData) {
//
deleteEntityByName('townLine')
//
addBoundaryHandle(townData.geometry.coordinates, 'townLine', 'yellow')
const layers = viewer.imageryLayers._layers;
for (let f = layers.length - 1; f >= 0; f--) {
if (layers[f]._imageryProvider.aaa === 'aaa') {
viewer.imageryLayers.remove(layers[f]);
}
}
//
removeWms(['aaa'])
//
addvillage(`XZDM=${value.value}`, 'aaa')
let map2 = new Cesium.WebMapServiceImageryProvider({
url: `http://121.36.229.60:9080/geoserver/shuzisannong/wms`,
layers: 'shuzisannong:huangdaoqu_village', //
parameters: {
service: 'WMS',
format: 'image/png',
transparent: true, //
CQL_FILTER: `XZDM=${value.value}`,
},
});
map2.aaa = 'aaa';
viewer.imageryLayers.addImageryProvider(map2);
};
//
@ -1372,6 +1306,7 @@ function ProgressBar() {
// option && ProgressBarDivIntance.setOption(option);
useEcharts(ProgressBarDivIntance, option);
}
function ASdivision() {
const ASdivisionDivIntance = echarts.init(ASdivisionDiv.value);
var option = {
@ -1607,7 +1542,6 @@ function ASdivision() {
// option && ASdivisionDivIntance.setOption(option, true);
useEcharts(ASdivisionDivIntance, option);
}
/*--------------------------------------------------------------------------------------------*/
/*------------------------------------------柱状图--------------------------------------------*/
@ -1844,17 +1778,14 @@ function ASdivision() {
// function random(min, max) {
// return Math.floor(Math.random() * (max - min)) + min;
// }
/*-------------------------------------------------------------------------------------------*/
</script>
<style lang="scss" scoped>
$height: calc(100vh - 100px);
.center {
width: 100%;
height: 100%;
.title {
width: 100%;
height: 45px;
@ -1868,22 +1799,22 @@ $height: calc(100vh - 100px);
cursor: pointer;
align-items: center;
justify-content: space-between;
span {
width: 80%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
p {
width: 79px;
height: 25px;
border-radius: 20px;
font-size: 14px;
background: linear-gradient(180deg,
rgba(16, 111, 111, 1) 0%,
rgba(47, 214, 214, 1) 100%);
background: linear-gradient(
180deg,
rgba(16, 111, 111, 1) 0%,
rgba(47, 214, 214, 1) 100%
);
border: 1.5px solid rgba(23, 194, 180, 1);
display: flex;
justify-content: center;
@ -1904,7 +1835,6 @@ $height: calc(100vh - 100px);
max-width: calc(100% - 20px);
display: flex;
flex-direction: column;
.areaDiv {
width: 100%;
height: 327px;
@ -1912,14 +1842,12 @@ $height: calc(100vh - 100px);
display: flex;
padding: 1px;
}
.ProgressBar {
width: 100%;
height: 9px;
opacity: 1;
}
}
.leftbottom {
width: 100%;
height: 455px;
@ -1929,18 +1857,15 @@ $height: calc(100vh - 100px);
justify-content: flex-start;
align-items: center;
padding-top: 13px;
.typesofDiv {
width: 100%;
height: 200px;
}
.tableDiv {
background: rgba(255, 255, 255, 0.05);
display: flex;
justify-content: center;
width: 85%;
:deep(.ones) {
width: 100%;
height: 171;
@ -1971,7 +1896,6 @@ $height: calc(100vh - 100px);
flex-direction: column;
align-items: center;
background: rgba(2, 31, 26, 0.3);
.rightTop {
width: 100%;
height: 40%;
@ -1980,20 +1904,17 @@ $height: calc(100vh - 100px);
flex-direction: column;
justify-content: flex-start;
align-items: center;
.farmlandDiv {
width: 100%;
height: 340px;
opacity: 1;
}
.ProgressBar {
width: 100%;
height: 9px;
opacity: 1;
}
}
.rightbottom {
width: 100%;
height: 490px;
@ -2010,16 +1931,13 @@ $height: calc(100vh - 100px);
background: rgba(22, 94, 102, 1);
border: 1px solid rgba(4, 153, 153, 1) !important;
margin-top: 20px;
:deep(.el-input__wrapper) {
background-color: transparent;
}
:deep(.el-input__inner) {
color: rgba(255, 255, 255, 0.7);
}
}
.ASdivision {
width: 415px;
height: 368px;
@ -2042,7 +1960,6 @@ $height: calc(100vh - 100px);
justify-content: flex-start;
align-items: center;
padding: 10px 10px 10px 10px;
p {
margin: 10px;
font-size: 14px;
@ -2052,7 +1969,6 @@ $height: calc(100vh - 100px);
color: rgba(255, 255, 255, 1);
text-align: center;
}
.mt-4 {
.el-checkbox {
height: 30px;
@ -2067,7 +1983,6 @@ $height: calc(100vh - 100px);
text-align: left;
}
}
:deep(.el-checkbox__label) {
color: rgba(255, 255, 255, 1);
}
@ -2085,7 +2000,6 @@ $height: calc(100vh - 100px);
background: rgba(2, 31, 26, 0.6);
border: 1px solid rgba(4, 153, 153, 1);
}
.tool {
position: absolute;
right: 30%;
@ -2098,7 +2012,6 @@ $height: calc(100vh - 100px);
justify-content: flex-start;
align-items: flex-start;
}
#popup {
border-radius: 5px;
background: rgba(2, 31, 26, 0.6);
@ -2107,7 +2020,7 @@ $height: calc(100vh - 100px);
// align-items: flex-end;
padding: 30px 8px 20px 8px;
&>div:nth-child(1) {
& > div:nth-child(1) {
font-weight: 400;
letter-spacing: 0px;
color: rgba(255, 255, 255, 1);
@ -2115,7 +2028,7 @@ $height: calc(100vh - 100px);
line-height: 24px;
}
&>div:nth-child(2) {
& > div:nth-child(2) {
color: rgba(255, 255, 255, 1);
width: 129px;
height: 24px;
@ -2137,6 +2050,6 @@ $height: calc(100vh - 100px);
cursor: pointer;
}
}
:deep(.el-select__popper.el-popper) {}
:deep(.el-select__popper.el-popper) {
}
</style>