Commit 64266bff authored by 郭铭瑶's avatar 郭铭瑶 🤘

添加数据

parent 21a03179
...@@ -3,6 +3,7 @@ $font-pang = Pangmenzhengdao, 'Avenir', Helvetica, Arial, sans-serif ...@@ -3,6 +3,7 @@ $font-pang = Pangmenzhengdao, 'Avenir', Helvetica, Arial, sans-serif
$font-din = DIN, 'Avenir', Helvetica, Arial, sans-serif $font-din = DIN, 'Avenir', Helvetica, Arial, sans-serif
$color-map(opacity = 0.3) $color-map(opacity = 0.3)
rgba(91, 213, 255, opacity) rgba(91, 213, 255, opacity)
$color-green = #71C012
$gd-layout() $gd-layout()
width 100% width 100%
height 100% height 100%
......
...@@ -70,8 +70,8 @@ export default { ...@@ -70,8 +70,8 @@ export default {
viewMode:'3D',//开启3D视图,默认为关闭 viewMode:'3D',//开启3D视图,默认为关闭
buildingAnimation:true,//楼块出现是否带动画 buildingAnimation:true,//楼块出现是否带动画
expandZoomRange:true, expandZoomRange:true,
zooms:[17,20], zooms:[15,20],
center:[121.497915,31.218138], center:[121.497915,31.218138], // 黄浦
showIndoorMap:false, showIndoorMap:false,
// mapStyle:'amap://styles/light', // mapStyle:'amap://styles/light',
...@@ -86,7 +86,6 @@ export default { ...@@ -86,7 +86,6 @@ export default {
const location = [e.lnglat.getLng(), e.lnglat.getLat()] const location = [e.lnglat.getLng(), e.lnglat.getLat()]
this.map.setZoomAndCenter(18.8, location) this.map.setZoomAndCenter(18.8, location)
console.log(e, e.lnglat.getLng() + ',' + e.lnglat.getLat()) console.log(e, e.lnglat.getLng() + ',' + e.lnglat.getLat())
this.showDetail(e, location)
}) })
this.map.addControl(new AMap.ControlBar({ this.map.addControl(new AMap.ControlBar({
...@@ -98,14 +97,14 @@ export default { ...@@ -98,14 +97,14 @@ export default {
} }
})) }))
new AMap.Polygon({ // new AMap.Polygon({
bubble:true, // bubble:true,
fillColor: 'blue', // fillColor: 'green',
fillOpacity:0.2, // fillOpacity:0.2,
strokeWeight:1, // strokeWeight:1,
path:this.buildingOptions.areas[0].path, // path:this.buildingOptions.areas[0].path,
map:this.map // map:this.map
}) // })
// new AMap.Polygon({ // new AMap.Polygon({
// bubble:true, // bubble:true,
// fillOpacity:0.2, // fillOpacity:0.2,
...@@ -113,15 +112,31 @@ export default { ...@@ -113,15 +112,31 @@ export default {
// path:this.buildingOptions.areas[1].path, // path:this.buildingOptions.areas[1].path,
// map:this.map // map:this.map
// }) // })
const marker = new AMap.Marker({
map: this.map,
position: [121.498973,31.218018],
extData: {
title: '测试点击',
content: '测试额外附加数据',
}, },
showDetail(e, location) { icon: new AMap.Icon({
size: new AMap.Size(30, 30), //图标大小
image: require('@/assets/images/attorney.png'),
// imageOffset: new AMap.Pixel(0, -60)
})
})
marker.on('click', e => {
const location = [e.lnglat.getLng(), e.lnglat.getLat()]
this.showDetail(e, location, marker.getExtData())
})
},
showDetail(e, location, data) {
// TODO // TODO
const infoWindow = new AMap.InfoWindow({ const infoWindow = new AMap.InfoWindow({
content: ` content: `
<div> <div>
<b>测试建筑物</b> <b>${data.title}</b>
<p>电话 : 021-1234567 邮编 : 200000</p> <p>${data.content}</p>
</div> </div>
` `
}) })
...@@ -141,4 +156,8 @@ export default { ...@@ -141,4 +156,8 @@ export default {
.amap-logo .amap-logo
.amap-copyright .amap-copyright
display none !important display none !important
.amap-icon
img
width 100%
height 100%
</style> </style>
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
justify-content space-between justify-content space-between
b b
font-size 1.1rem font-size 1.1rem
color #71C012 color $color-green
.unit .unit
font-size 0.5rem font-size 0.5rem
margin-left 0.2rem margin-left 0.2rem
......
<template>
<ul class="list">
<li class="row">
<p></p>
<p>养殖面积(公顷)</p>
<p>产值(万元)</p>
</li>
<li class="row" v-for="(item, i) in list" :key="item.name + i">
<p>{{item.name}}</p>
<p><b><m-count :value="item.area" :decimal="0"/></b></p>
<p><b><m-count :value="item.output"/></b></p>
</li>
</ul>
</template>
<script>
export default {
name: 'ProductionList',
props: {
list: {
type: Array,
default() {
return []
}
}
}
}
</script>
<style lang="stylus" scoped>
.list
height 100%
overflow auto
padding 0.5rem 1rem
.row
display flex
color #ccc
padding 0.5rem 0
align-items center
justify-content space-between
border-bottom 0.1rem solid rgba(28, 66, 95, 0.4)
&:first-child
color $color-map(1)
p
width 40%
text-align right
&:first-child
width 20%
text-align center
&:last-child
b
color $color-green
b
color #FFCE34
</style>
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
width 21% width 21%
b b
font-size 1.1rem font-size 1.1rem
color #71C012 color $color-green
.unit .unit
font-size 0.5rem font-size 0.5rem
margin-left 0.2rem margin-left 0.2rem
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
<p>损失<b><m-count :value="sum.loss"/></b>万元</p> <p>损失<b><m-count :value="sum.loss"/></b>万元</p>
</div> </div>
<div class="box1"> <div class="box1">
<m-card mode="2" title="各疫病的发病次数(次)"> <m-card mode="2" title="各市疫病情况">
<DataList :list="disease" :decimal="0"/> <DiseaseList :list="citySituation"/>
</m-card> </m-card>
</div> </div>
<div class="box2"> <div class="box2">
<m-card mode="2" title="各市疫病情况"> <m-card mode="2" title="各疫病的发病次数(次)">
<DiseaseList :list="citySituation"/> <DataList :list="disease" :decimal="0"/>
</m-card> </m-card>
</div> </div>
<div class="box3"> <div class="box3">
......
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
boundaryGap: false, boundaryGap: false,
}, },
yAxis: { yAxis: {
name: '(元/公斤)', name: '(元)',
max: 8, max: 8,
}, },
series: { series: {
...@@ -122,10 +122,10 @@ export default { ...@@ -122,10 +122,10 @@ export default {
span span
background #5BD5FF background #5BD5FF
&:last-child &:last-child
color #71C012 color $color-green
margin-left 3rem margin-left 3rem
span span
background #71C012 background $color-green
span span
display inline-block display inline-block
width 0.8rem width 0.8rem
......
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
data: this.fishChartData.name, data: this.fishChartData.name,
}, },
yAxis: { yAxis: {
name: data.unit, name: `(${data.unit})`,
}, },
series: { series: {
type: 'bar', type: 'bar',
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
<div class="box2"> <div class="box2">
<m-card mode="2" title="各市养殖面积(亩)"> <m-card mode="2" title="各市养殖面积(亩)">
<DataList :list="list2"/> <ProductionList :list="cityData"/>
</m-card> </m-card>
</div> </div>
<div class="box3"> <div class="box3">
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<script> <script>
import DataList from './components/list' import DataList from './components/list'
import ProductionList from './components/production-list'
import ThemeTitle from './components/title' import ThemeTitle from './components/title'
import GuangdongMap from './components/map' import GuangdongMap from './components/map'
import axios from 'axios' import axios from 'axios'
...@@ -34,6 +35,7 @@ export default { ...@@ -34,6 +35,7 @@ export default {
name: 'GDProduction', name: 'GDProduction',
components: { components: {
DataList, DataList,
ProductionList,
ThemeTitle, ThemeTitle,
GuangdongMap, GuangdongMap,
}, },
...@@ -42,29 +44,7 @@ export default { ...@@ -42,29 +44,7 @@ export default {
area: 0, area: 0,
production: [], production: [],
specialProduction: [], specialProduction: [],
list2: [ cityData: [],
{name: '广州市', value: 7434.40, unit: ''},
{name: '韶关市', value: 18218.06, unit: ''},
{name: '深圳市', value: 1996.85, unit: ''},
{name: '珠海市', value: 1711.24, unit: ''},
{name: '汕头市', value: 2198.70, unit: ''},
{name: '佛山市', value: 3875, unit: ''},
{name: '江门市', value: 9505, unit: ''},
{name: '湛江市', value: 13225.44, unit: ''},
{name: '茂名市', value: 11458, unit: ''},
{name: '肇庆市', value: 7434.40, unit: ''},
{name: '惠州市', value: 11599, unit: ''},
{name: '梅州市', value: 15864.5, unit: ''},
{name: '汕尾市', value: 5271, unit: ''},
{name: '河源市', value: 15642, unit: ''},
{name: '阳江市', value: 7955.9, unit: ''},
{name: '清远市', value: 19000, unit: ''},
{name: '东莞市', value: 2460.10, unit: ''},
{name: '中山市', value: 1783.67, unit: ''},
{name: '潮州市', value: 3679, unit: ''},
{name: '揭阳市', value: 5240.5, unit: ''},
{name: '云浮市', value: 7785.11, unit: ''},
],
options: { options: {
xAxis: { xAxis: {
data: [], data: [],
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
{"name": "稚龟", "unit": "万只", "data": [546, 547, 564, 665]}, {"name": "稚龟", "unit": "万只", "data": [546, 547, 564, 665]},
{"name": "鳗苗", "unit": "千克", "data": [835, 801, 800, 43]}, {"name": "鳗苗", "unit": "千克", "data": [835, 801, 800, 43]},
{"name": "虾类", "unit": "亿尾", "data": [4000, 4000, 4100, 5455]}, {"name": "虾类", "unit": "亿尾", "data": [4000, 4000, 4100, 5455]},
{"name": "贝类", "unit": "", "data": [605659, 245210, 255032, 293678]}, {"name": "贝类", "unit": "万颗", "data": [605659, 245210, 255032, 293678]},
{"name": "罗非鱼", "unit": "亿尾", "data": [116.65, 113, 104.54, 102.24]} {"name": "罗非鱼", "unit": "亿尾", "data": [116.65, 113, 104.54, 102.24]}
] ]
} }
......
{ {
"area": 482540, "area": 478897,
"cityData": [
{"name": "广州市", "area": 23010, "output": 338068.2145},
{"name": "韶关市", "area": 15968, "output": 101234.3071},
{"name": "深圳市", "area": 1126, "output": 211927.7261},
{"name": "珠海市", "area": 25697, "output": 786416.7286},
{"name": "汕头市", "area": 15330, "output": 603102.5457},
{"name": "佛山市", "area": 34888, "output": 1704450.882},
{"name": "江门市", "area": 55194, "output": 1783605.536},
{"name": "湛江市", "area": 81382, "output": 2472339.802},
{"name": "茂名市", "area": 37383, "output": 852607.1035},
{"name": "肇庆市", "area": 33945, "output": 549175.9952},
{"name": "惠州市", "area": 17670, "output": 277631.0517},
{"name": "梅州市", "area": 10697, "output": 122771.9367},
{"name": "汕尾市", "area": 18408, "output": 706701.8312},
{"name": "河源市", "area": 5664, "output": 46794.78575},
{"name": "阳江市", "area": 31472, "output": 2101692.311},
{"name": "清远市", "area": 16861, "output": 187195.4563},
{"name": "东莞市", "area": 5596, "output": 70267.57092},
{"name": "中山市", "area": 20596, "output": 623650.283},
{"name": "潮州市", "area": 13030, "output": 246433.1558},
{"name": "揭阳市", "area": 8219, "output": 245622.1037},
{"name": "云浮市", "area": 6762, "output": 122186.4332}
],
"production": [ "production": [
{"name": "海水养殖产量", "unit": "", "value": 3167259}, {"name": "海水养殖产量", "unit": "", "value": 3167259},
{"name": "鱼类", "unit": "", "value": 594793}, {"name": "鱼类", "unit": "", "value": 594793},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment