Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yuji-dataview
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郭铭瑶
yuji-dataview
Commits
21609145
Commit
21609145
authored
Aug 24, 2020
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换病害测报点数据
parent
2132ef3c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10143 additions
and
9810 deletions
+10143
-9810
disease-map.vue
src/views/components/disease/disease-map.vue
+42
-79
aquafarm-points-bak.json
static/aquafarm-points-bak.json
+9731
-0
aquafarm-points.json
static/aquafarm-points.json
+370
-9731
No files found.
src/views/components/disease/disease-map.vue
View file @
21609145
...
@@ -6,43 +6,6 @@
...
@@ -6,43 +6,6 @@
<
script
>
<
script
>
import
china
from
'echarts/map/json/china.json'
import
china
from
'echarts/map/json/china.json'
// const mapData = [
// {name: '海门', value: [121.15, 31.89]},
// {name: '鄂尔多斯', value: [109.781327, 39.608266]},
// {name: '招远', value: [120.38, 37.35]},
// {name: '舟山', value: [122.207216, 29.985295]},
// // { name: '北京', value: 177 },
// // { name: '天津', value: 42 },
// // { name: '河北', value: 102 },
// // { name: '山西', value: 81 },
// // { name: '内蒙古', value: 17 },
// // { name: '辽宁', value: 67 },
// // { name: '吉林', value: 182 },
// // { name: '黑龙江', value: 100 },
// // { name: '上海', value: 24 },
// // { name: '江苏', value: 299 },
// // { name: '浙江', value: 114 },
// // { name: '安徽', value: 29 },
// // { name: '福建', value: 316 },
// // { name: '江西', value: 91 },
// // { name: '山东', value: 19 },
// // { name: '河南', value: 137 },
// // { name: '湖北', value: 26 },
// // { name: '湖南', value: 114 },
// // { name: '重庆', value: 91 },
// // { name: '四川', value: 25 },
// // { name: '贵州', value: 62 },
// // { name: '云南', value: 83 },
// // { name: '西藏', value: 9 },
// // { name: '陕西', value: 80 },
// // { name: '甘肃', value: 256 },
// // { name: '青海', value: 10 },
// // { name: '宁夏', value: 18 },
// // { name: '新疆', value: 67 },
// // { name: '广东', value: 123 },
// // { name: '广西', value: 59 },
// // { name: '海南', value: 14 }
// ]
export
default
{
export
default
{
name
:
'DiseaseMap'
,
name
:
'DiseaseMap'
,
props
:
{
props
:
{
...
@@ -163,48 +126,48 @@ export default {
...
@@ -163,48 +126,48 @@ export default {
}
}
this
.
map
.
setOption
(
this
.
config
)
this
.
map
.
setOption
(
this
.
config
)
},
},
addEvent
()
{
//
addEvent() {
// 监听地图点击事件
//
// 监听地图点击事件
this
.
map
.
on
(
'click'
,
(
ev
)
=>
{
//
this.map.on('click', (ev) => {
const
{
name
}
=
ev
.
data
//
const {name} = ev.data
console
.
log
(
name
)
//
console.log(name)
this
.
setRegions
(
name
)
//
this.setRegions(name)
this
.
curProvince
=
name
//
this.curProvince = name
this
.
$emit
(
'select'
,
name
)
//
this.$emit('select', name)
})
//
})
// 点击空白处则取消选中状态
//
// 点击空白处则取消选中状态
this
.
map
.
getZr
().
on
(
'click'
,
e
=>
{
//
this.map.getZr().on('click', e => {
if
(
!
e
.
target
&&
this
.
curProvince
)
{
//
if (!e.target && this.curProvince) {
const
name
=
this
.
curProvince
//
const name = this.curProvince
this
.
setRegions
(
null
)
//
this.setRegions(null)
this
.
$emit
(
'select'
,
name
)
//
this.$emit('select', name)
}
//
}
})
//
})
},
//
},
setRegions
(
name
)
{
//
setRegions(name) {
this
.
curProvince
=
name
//
this.curProvince = name
if
(
!
name
)
{
//
if (!name) {
this
.
config
.
geo
.
regions
=
[]
//
this.config.geo.regions = []
this
.
map
.
setOption
(
this
.
config
)
//
this.map.setOption(this.config)
return
//
return
}
//
}
let
regions
=
[{
//
let regions = [{
name
,
//
name,
selected
:
true
,
//
selected: true,
itemStyle
:
{
//
itemStyle: {
areaColor
:
'#5ad4ff'
,
//
areaColor: '#5ad4ff',
shadowColor
:
'rgba(0, 0, 0, 1)'
,
//
shadowColor: 'rgba(0, 0, 0, 1)',
shadowBlur
:
10
,
//
shadowBlur: 10,
shadowOffsetY
:
10
,
//
shadowOffsetY: 10,
shadowOffsetX
:
-
5
,
//
shadowOffsetX: -5,
}
//
}
}]
//
}]
if
(
this
.
config
.
geo
.
regions
.
length
>
0
&&
this
.
config
.
geo
.
regions
[
0
].
name
==
name
)
{
//
if (this.config.geo.regions.length > 0 && this.config.geo.regions[0].name == name) {
regions
=
[]
//
regions = []
}
//
}
this
.
config
.
geo
.
regions
=
regions
//
this.config.geo.regions = regions
this
.
map
.
setOption
(
this
.
config
)
//
this.map.setOption(this.config)
},
//
},
},
},
watch
:
{
watch
:
{
'$store.state.aquafarmPoints'
:
{
'$store.state.aquafarmPoints'
:
{
...
...
static/aquafarm-points-bak.json
0 → 100644
View file @
21609145
This diff is collapsed.
Click to expand it.
static/aquafarm-points.json
View file @
21609145
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment