|
|
@ -48,7 +48,7 @@ const mouseToolRef = ref(null)
|
|
|
|
// 绘制面积(亩)
|
|
|
|
// 绘制面积(亩)
|
|
|
|
const floorSpace = ref(0)
|
|
|
|
const floorSpace = ref(0)
|
|
|
|
const maxHeight = ref(window.innerHeight - 100);
|
|
|
|
const maxHeight = ref(window.innerHeight - 100);
|
|
|
|
const zoom = ref(17);
|
|
|
|
const zoom = ref(16);
|
|
|
|
// 是否处于绘制模式
|
|
|
|
// 是否处于绘制模式
|
|
|
|
const protract = ref(false)
|
|
|
|
const protract = ref(false)
|
|
|
|
// 显示鼠标绘制
|
|
|
|
// 显示鼠标绘制
|
|
|
@ -62,6 +62,54 @@ const gridLines = ref([])
|
|
|
|
const polygonList = reactive([
|
|
|
|
const polygonList = reactive([
|
|
|
|
{
|
|
|
|
{
|
|
|
|
id: 1,
|
|
|
|
id: 1,
|
|
|
|
|
|
|
|
title: '地块1',
|
|
|
|
|
|
|
|
cropType: '甘蔗',
|
|
|
|
|
|
|
|
path: [
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585681,
|
|
|
|
|
|
|
|
22.481152
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585536,
|
|
|
|
|
|
|
|
22.481152
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585524,
|
|
|
|
|
|
|
|
22.48856
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585662,
|
|
|
|
|
|
|
|
22.48844
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
fillColor: undefined
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id: 2,
|
|
|
|
|
|
|
|
title: '地块2',
|
|
|
|
|
|
|
|
cropType: '甘蔗',
|
|
|
|
|
|
|
|
path: [
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585526,
|
|
|
|
|
|
|
|
22.481149
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585274,
|
|
|
|
|
|
|
|
22.481137
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585257,
|
|
|
|
|
|
|
|
22.48857
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585515,
|
|
|
|
|
|
|
|
22.48839
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
fillColor: undefined
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id: 3,
|
|
|
|
title: '测试地块1',
|
|
|
|
title: '测试地块1',
|
|
|
|
cropType: '甘蔗',
|
|
|
|
cropType: '甘蔗',
|
|
|
|
path: [
|
|
|
|
path: [
|
|
|
@ -89,7 +137,7 @@ const polygonList = reactive([
|
|
|
|
fillColor: undefined
|
|
|
|
fillColor: undefined
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
id: 2,
|
|
|
|
id: 4,
|
|
|
|
title: '测试地块2',
|
|
|
|
title: '测试地块2',
|
|
|
|
cropType: '甘蔗',
|
|
|
|
cropType: '甘蔗',
|
|
|
|
path: [
|
|
|
|
path: [
|
|
|
@ -160,6 +208,66 @@ const ridgeList = ref([
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id:1,
|
|
|
|
|
|
|
|
polygonId:1,
|
|
|
|
|
|
|
|
title:'垄1',
|
|
|
|
|
|
|
|
path:[
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585681,
|
|
|
|
|
|
|
|
22.481152
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585662,
|
|
|
|
|
|
|
|
22.48844
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id:2,
|
|
|
|
|
|
|
|
polygonId:1,
|
|
|
|
|
|
|
|
title:'垄28',
|
|
|
|
|
|
|
|
path:[
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585536,
|
|
|
|
|
|
|
|
22.481152
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585524,
|
|
|
|
|
|
|
|
22.48856
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id:3,
|
|
|
|
|
|
|
|
polygonId:2,
|
|
|
|
|
|
|
|
title:'垄1',
|
|
|
|
|
|
|
|
path:[
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585526,
|
|
|
|
|
|
|
|
22.481149
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585515,
|
|
|
|
|
|
|
|
22.48839
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
id:3,
|
|
|
|
|
|
|
|
polygonId:2,
|
|
|
|
|
|
|
|
title:'垄43',
|
|
|
|
|
|
|
|
path:[
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585274,
|
|
|
|
|
|
|
|
22.481137
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
107.585257,
|
|
|
|
|
|
|
|
22.48857
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
])
|
|
|
|
])
|
|
|
|
// 植株列表
|
|
|
|
// 植株列表
|
|
|
|
const plantList = ref([
|
|
|
|
const plantList = ref([
|
|
|
@ -305,8 +413,8 @@ const cancelMassif = () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 当前中心点
|
|
|
|
// 当前中心点
|
|
|
|
const center = ref([
|
|
|
|
const center = ref([
|
|
|
|
116.338461,
|
|
|
|
107.5856025,
|
|
|
|
39.97947
|
|
|
|
22.484856
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
// 进入搜索选择的位置
|
|
|
|
// 进入搜索选择的位置
|
|
|
|
const selectPoi = ({poi}) => {
|
|
|
|
const selectPoi = ({poi}) => {
|
|
|
@ -477,7 +585,6 @@ const toAddMassif = () => {
|
|
|
|
:path="polygonTemp"
|
|
|
|
:path="polygonTemp"
|
|
|
|
@addnode="updateMassif"
|
|
|
|
@addnode="updateMassif"
|
|
|
|
@removenode="updateMassif"
|
|
|
|
@removenode="updateMassif"
|
|
|
|
:zooms="[13,20]"
|
|
|
|
|
|
|
|
@adjust="updateMassif"
|
|
|
|
@adjust="updateMassif"
|
|
|
|
:visible="true"
|
|
|
|
:visible="true"
|
|
|
|
:editable="true"
|
|
|
|
:editable="true"
|
|
|
@ -496,7 +603,6 @@ const toAddMassif = () => {
|
|
|
|
<el-amap-polyline
|
|
|
|
<el-amap-polyline
|
|
|
|
v-if="control.massifGrid"
|
|
|
|
v-if="control.massifGrid"
|
|
|
|
v-for="grid in gridLines"
|
|
|
|
v-for="grid in gridLines"
|
|
|
|
:zooms="[16,20]"
|
|
|
|
|
|
|
|
stroke-color="#e36ea4"
|
|
|
|
stroke-color="#e36ea4"
|
|
|
|
:path="grid"
|
|
|
|
:path="grid"
|
|
|
|
:visible="true">
|
|
|
|
:visible="true">
|
|
|
@ -505,7 +611,6 @@ const toAddMassif = () => {
|
|
|
|
<el-amap-polyline
|
|
|
|
<el-amap-polyline
|
|
|
|
v-if="control.showRidge"
|
|
|
|
v-if="control.showRidge"
|
|
|
|
v-for="ridge in ridgeList"
|
|
|
|
v-for="ridge in ridgeList"
|
|
|
|
:zooms="[16,20]"
|
|
|
|
|
|
|
|
:strokeWeight="5"
|
|
|
|
:strokeWeight="5"
|
|
|
|
strokeColor="#a4e36e"
|
|
|
|
strokeColor="#a4e36e"
|
|
|
|
:path="ridge.path"
|
|
|
|
:path="ridge.path"
|
|
|
|