Browse Source

点位配置

master
juwei001 1 year ago
parent
commit
c557bfcd75
  1. 228
      src/views/next/screen-content-map/cpt/point.json
  2. 70
      src/views/next/screen-content-map/cpt/zdyf-map.vue

228
src/views/next/screen-content-map/cpt/point.json

@ -15,7 +15,7 @@
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.21399, 120.21399,
36.54200 36.54900
] ]
} }
}, },
@ -30,8 +30,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.207301, 120.197301,
36.559783 36.561783
] ]
} }
}, },
@ -46,7 +46,7 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.206376, 120.193301,
36.555345 36.555345
] ]
} }
@ -62,8 +62,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.21425, 120.20325,
36.56496 36.56896
] ]
} }
}, },
@ -78,8 +78,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.203251, 120.190251,
36.468723 36.465723
] ]
} }
}, },
@ -110,31 +110,31 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.207032, 120.190301,
36.565412 36.550345
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛浩丰生物科技有限公司", "name": "山东汉研种业科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "1777617911371534337"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.243555, 120.22399,
36.483133 36.55500
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛海育种业有限公司", "name": "青岛浩丰生物科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "11"
@ -142,15 +142,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.24024, 120.23414,
36.465497 36.48609
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛顺发种业有限公司", "name": "青岛海育种业有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "11"
@ -158,15 +158,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.208949, 120.24024,
36.58008 36.465497
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛信利来种业有限公司", "name": "青岛顺发种业有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "11"
@ -174,31 +174,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.227448, 120.19725,
36.451863 36.57996
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "山东汉研种业科技有限公司", "name": "青岛信利来种业有限公司",
"type": "marker",
"category": "unit",
"id": "1777617911371534337"
},
"geometry": {
"type": "Point",
"coordinates": [
120.23914,
36.48409
]
}
},
{
"type": "Feature",
"properties": {
"name": "青岛顺发种业有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "11"
@ -206,15 +190,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.254949, 120.20414,
36.54008 36.47609
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛信利来种业有限公司", "name": "即墨良种中心",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "11" "id": "11"
@ -222,8 +206,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.247448, 120.22810,
36.451863 36.49461
] ]
} }
}, },
@ -238,8 +222,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.217448, 120.19525,
36.551863 36.56996
] ]
} }
} }
@ -260,15 +244,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.202739, 120.195139,
36.558909 36.555909
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛旺禾农业科技有限公司", "name": "青岛地平线现代农业科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -276,15 +260,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.18472, 120.188286,
36.564018 36.563778
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛旺禾农业科技有限公司", "name": "即墨区新盛禾种苗场",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -292,8 +276,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.18472, 120.19078,
36.504018 36.53914
] ]
} }
}, },
@ -308,15 +292,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.282739, 120.18272,
36.528909 36.559018
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛旺禾农业科技有限公司", "name": "青岛鑫诚农业发展有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -324,8 +308,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.24472, 120.22327,
36.564018 36.54890
] ]
} }
} }
@ -370,7 +354,7 @@
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛地平线蔬菜专业合作社", "name": "青岛真野种植专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1774615823391416321" "id": "1774615823391416321"
@ -378,95 +362,95 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.188286, 120.16360,
36.563778 36.51482
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛诚一果蔬现代农业专业合作社", "name": "青岛地平线蔬菜专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1774615189523030018" "id": "1774615823391416321"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.207973, 120.188316,
36.538222 36.563782
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛浩丰生物科技有限公司", "name": "青岛金元斗农业开发有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1774615823391416321"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.240555, 120.16330,
36.483133 36.51273
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛贸润蔬菜瓜果专业合作社", "name": "青岛太平盛丰果蔬专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1777604628077875202" "id": "1774615823391416321"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.162582, 120.18992,
36.54486 36.52368
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛沽河青青蔬菜专业合作社", "name": "青岛园泉生态农业专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1774615823391416321"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.188286, 120.19193,
36.563778 36.53453
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛恒源顺生态果蔬种植专业合作社", "name": "青岛诚一果蔬现代农业专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1774615189523030018"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.196259, 120.212873,
36.51241 36.553622
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛佳蔬蔬菜专业合作社", "name": "青岛浩丰生物科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -474,31 +458,31 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.16755, 120.240555,
36.531503 36.483133
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛春花秋实蔬菜专业合作社", "name": "青岛贸润蔬菜瓜果专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1777604628077875202"
}, },
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.267973, 120.162582,
36.538222 36.54486
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛大丰收蔬菜专业合作社", "name": "青岛沽河青青蔬菜专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -506,15 +490,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.20645, 120.168286,
36.489536 36.553778
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛大欧庄户绿色食品有限公司", "name": "青岛恒源顺生态果蔬种植专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -522,15 +506,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.189507, 120.196259,
36.456081 36.51241
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "即墨区兆硕家庭农场", "name": "青岛佳蔬蔬菜专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -538,15 +522,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.208705, 120.16755,
36.481948 36.531503
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛湍湾生态农业科技发展有限公司", "name": "青岛康辉德果树种植专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -554,15 +538,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.264708, 120.21664,
36.477422 36.44843
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛佳蔬蔬菜专业合作社", "name": "青岛春花秋实蔬菜专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -570,15 +554,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.18755, 120.267973,
36.501503 36.538222
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛春花秋实蔬菜专业合作社", "name": "青岛大丰收蔬菜专业合作社",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -586,15 +570,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.187973, 120.20645,
36.508222 36.489536
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛大丰收蔬菜专业合作社", "name": "青岛大欧庄户绿色食品有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -602,15 +586,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.25645, 120.189507,
36.489536 36.456081
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "青岛大欧庄户绿色食品有限公司", "name": "即墨区兆硕家庭农场",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -618,15 +602,15 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.189507, 120.208705,
36.486081 36.481948
] ]
} }
}, },
{ {
"type": "Feature", "type": "Feature",
"properties": { "properties": {
"name": "即墨区兆硕家庭农场", "name": "青岛昌瑞农业科技有限公司",
"type": "marker", "type": "marker",
"category": "unit", "category": "unit",
"id": "1" "id": "1"
@ -634,8 +618,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.248705, 120.21928,
36.481948 36.56231
] ]
} }
}, },
@ -651,7 +635,7 @@
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.264708, 120.264708,
36.483422 36.477422
] ]
} }
} }
@ -688,8 +672,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.22248, 120.21918,
36.550282 36.55805
] ]
} }
}, },
@ -736,8 +720,8 @@
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [ "coordinates": [
120.208412, 120.213612,
36.585586 36.584086
] ]
} }
}, },

70
src/views/next/screen-content-map/cpt/zdyf-map.vue

@ -32,6 +32,7 @@ import jdbandaoJson from './jdbandao.json'
import point from './point.json' import point from './point.json'
import chinaMap from './chinaMap.vue' import chinaMap from './chinaMap.vue'
import { selectConfigList } from '@/api/home' import { selectConfigList } from '@/api/home'
import { seedCompanyList } from '@/api/zdyf'
import { mapActions, mapGetters } from 'vuex' import { mapActions, mapGetters } from 'vuex'
const width = 0 const width = 0
const height = 0 const height = 0
@ -41,6 +42,7 @@ let polygonLayer
let polygonLayer1 let polygonLayer1
let lineLayer let lineLayer
let dotLayer let dotLayer
let textLayer
let dotLayer1 let dotLayer1
let dotLayer2 let dotLayer2
let dotLayer3 let dotLayer3
@ -109,6 +111,7 @@ export default {
{ name: '年平均降水', units: '毫升', num: '687' }, { name: '年平均降水', units: '毫升', num: '687' },
{ name: '土壤有机质', units: '含量', num: '1.5%' } { name: '土壤有机质', units: '含量', num: '1.5%' }
], ],
companyList: [],
mapType: '', mapType: '',
showPage: false, showPage: false,
width: 1920, width: 1920,
@ -151,6 +154,9 @@ export default {
} }
}) })
}) })
seedCompanyList().then(res => {
this.companyList = res.data
})
}, },
methods: { methods: {
...mapActions({ ...mapActions({
@ -159,9 +165,9 @@ export default {
}), }),
...mapActions({}), ...mapActions({}),
openCompanyDetail (item) { openCompanyDetail (item) {
console.log('item::', item) const row = this.companyList.filter(item1 => item1.name === item.name)
this.set_qyjj(true) this.set_qyjj(true)
this.set_gsxq_id(item.id) this.set_gsxq_id(row[0].id)
}, },
async switcMapType1 (arr) { async switcMapType1 (arr) {
this.removeDotLayers() this.removeDotLayers()
@ -184,7 +190,6 @@ export default {
myMapZd = new GaodeMap({ myMapZd = new GaodeMap({
pitch: 40.24716321414439, pitch: 40.24716321414439,
mapStyle: 'amap://styles/blue', mapStyle: 'amap://styles/blue',
// style: styleConfig.style,
showLabel: false, showLabel: false,
center: [120.220563, 36.496127], center: [120.220563, 36.496127],
token: 'fc14b42e0ca18387866d68ebd4f150c1', token: 'fc14b42e0ca18387866d68ebd4f150c1',
@ -193,7 +198,6 @@ export default {
showIndoorMap: false, showIndoorMap: false,
showBuildingBlock: false, showBuildingBlock: false,
resizeEnable: true, resizeEnable: true,
// doubleClickZoom: false,
showRoad: false, showRoad: false,
viewMode: '3D' viewMode: '3D'
}) })
@ -317,10 +321,7 @@ export default {
.source(data['育种企业']) .source(data['育种企业'])
.shape(images['育种企业']) .shape(images['育种企业'])
.size('name', (val) => { .size('name', (val) => {
if (gaoliang.some((item) => item === val)) { return 8
return 12
}
return 10
}) })
scene.addLayer(dotLayer) scene.addLayer(dotLayer)
} }
@ -329,10 +330,7 @@ export default {
.source(data['育苗企业']) .source(data['育苗企业'])
.shape(images['育苗企业']) .shape(images['育苗企业'])
.size('name', (val) => { .size('name', (val) => {
if (gaoliang.some((item) => item === val)) { return 8
return 12
}
return 10
}) })
scene.addLayer(dotLayer1) scene.addLayer(dotLayer1)
} }
@ -341,45 +339,49 @@ export default {
.source(data['种植企业']) .source(data['种植企业'])
.shape(images['种植企业']) .shape(images['种植企业'])
.size('name', (val) => { .size('name', (val) => {
if (gaoliang.some((item) => item === val)) { return 8
return 12
}
return 10
}) })
scene.addLayer(dotLayer2) scene.addLayer(dotLayer2)
// textLayer = new PolygonLayer({
// zIndex: 20
// })
// .source(data[''])
// .color('name', 'rgba(126, 187, 255, 1)')
// .shape('name', 'text')
// .size(14)
// .style({
// textAnchor: 'left', // center|left|right|top|bottom|top-left
// // textOffset: [0, 40], // [, ]
// spacing: 2, //
// padding: [2, 2], // padding []
// stroke: '#666', //
// strokeWidth: 0.1, //
// raisingHeight: 300,
// textAllowOverlap: true
// })
// .active(true)
// scene.addLayer(textLayer)
} }
if (arr.some((item) => item === '加工企业')) { if (arr.some((item) => item === '加工企业')) {
dotLayer3 = new PointLayer({ zIndex: 30 }) dotLayer3 = new PointLayer({ zIndex: 30 })
.source(data['加工企业']) .source(data['加工企业'])
.shape(images['加工企业']) .shape(images['加工企业'])
.size('name', (val) => { .size('name', (val) => {
if (gaoliang.some((item) => item === val)) { return 8
return 12
}
return 10
}) })
scene.addLayer(dotLayer3) scene.addLayer(dotLayer3)
} }
dotLayer.on('click', (e) => { dotLayer.on('click', (e) => {
console.log('e::', e) this.openCompanyDetail(e.feature.properties)
if (gaoliang.some((item) => item === e.feature.properties.name)) {
this.openCompanyDetail(e.feature.properties)
}
}) })
dotLayer1.on('click', (e) => { dotLayer1.on('click', (e) => {
if (gaoliang.some((item) => item === e.feature.properties.name)) { this.openCompanyDetail(e.feature.properties)
this.openCompanyDetail(e.feature.properties)
}
}) })
dotLayer2.on('click', (e) => { dotLayer2.on('click', (e) => {
if (gaoliang.some((item) => item === e.feature.properties.name)) { this.openCompanyDetail(e.feature.properties)
this.openCompanyDetail(e.feature.properties)
}
}) })
dotLayer3.on('click', (e) => { dotLayer3.on('click', (e) => {
if (gaoliang.some((item) => item === e.feature.properties.name)) { this.openCompanyDetail(e.feature.properties)
this.openCompanyDetail(e.feature.properties)
}
}) })
} }
}, },
@ -414,7 +416,7 @@ export default {
.map-legeng { .map-legeng {
position: absolute; position: absolute;
top: 550px; top: 535px;
left: 654px; left: 654px;
transform: scale(0.7) translate(-50%); transform: scale(0.7) translate(-50%);
width: 140px; width: 140px;

Loading…
Cancel
Save