Commit 21a03179 authored by 郭铭瑶's avatar 郭铭瑶 🤘

完善

parent e9836d4e
...@@ -60,8 +60,6 @@ export default { ...@@ -60,8 +60,6 @@ export default {
} }
options.xAxis = Object.assign(this.defaultOptions.xAxis, this.options.xAxis) options.xAxis = Object.assign(this.defaultOptions.xAxis, this.options.xAxis)
options.yAxis = Object.assign(this.defaultOptions.yAxis, this.options.yAxis) options.yAxis = Object.assign(this.defaultOptions.yAxis, this.options.yAxis)
console.log(this.data)
options.series = this.data.map((item, index) => { options.series = this.data.map((item, index) => {
let color = colors[index] let color = colors[index]
if (Array.isArray(color)) { if (Array.isArray(color)) {
...@@ -165,8 +163,6 @@ export default { ...@@ -165,8 +163,6 @@ export default {
}, },
watch: { watch: {
data(cur, past) { data(cur, past) {
console.log('sss', cur, past)
if (cur && cur !== past && cur.length > 0) { if (cur && cur !== past && cur.length > 0) {
this.init() this.init()
} }
......
...@@ -105,7 +105,6 @@ export default { ...@@ -105,7 +105,6 @@ export default {
}, },
emphasis: { emphasis: {
show: false, show: false,
color: '#fff',
} }
}, },
itemStyle: { itemStyle: {
...@@ -191,6 +190,11 @@ export default { ...@@ -191,6 +190,11 @@ export default {
geoIndex: 0, geoIndex: 0,
data: this.data, data: this.data,
}) })
this.config.tooltip = {
trigger: 'item',
extraCssText: 'transform: rotate(-28deg);',
formatter: '{b}<br/>疫病发生面积:{c}亩'
},
this.config.visualMap = { this.config.visualMap = {
show: false, show: false,
// min: 0, // min: 0,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<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"/> <DataList :list="disease" :decimal="0"/>
</m-card> </m-card>
</div> </div>
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
</m-card> </m-card>
</div> </div>
<div class="box3"> <div class="box3">
<m-card mode="2" title="市场平均价格"> <m-card mode="2" title="当年罗非鱼各规格均价">
<PriceChart /> <m-chart :options="options1" :data="data1"/>
</m-card> </m-card>
</div> </div>
</div> </div>
...@@ -37,15 +37,14 @@ ...@@ -37,15 +37,14 @@
import ApplyDemandList from './components/apply-demand-list' import ApplyDemandList from './components/apply-demand-list'
import ThemeTitle from './components/title' import ThemeTitle from './components/title'
import MarketingChart from './components/marketing-chart.vue' import MarketingChart from './components/marketing-chart.vue'
import PriceChart from './components/price-chart.vue'
import FishMap from './components/fish-map' import FishMap from './components/fish-map'
import axios from 'axios'
export default { export default {
name: 'GDFish', name: 'GDFish',
components: { components: {
ApplyDemandList, ApplyDemandList,
ThemeTitle, ThemeTitle,
MarketingChart, MarketingChart,
PriceChart,
FishMap, FishMap,
}, },
data() { data() {
...@@ -59,9 +58,43 @@ export default { ...@@ -59,9 +58,43 @@ export default {
{name: '阳西益豪水产食品加工厂', value: 101, unit: '吨'}, {name: '阳西益豪水产食品加工厂', value: 101, unit: '吨'},
{name: '中恒食品添加剂有限公司', value: 69, unit: '吨'}, {name: '中恒食品添加剂有限公司', value: 69, unit: '吨'},
{name: '北京自伍鑫发水产商贸有限公司', value: 59, unit: '吨'}, {name: '北京自伍鑫发水产商贸有限公司', value: 59, unit: '吨'},
] ],
options1: {
colors: ['#0076FF', '#F47C1F', '#21640D'],
legend: {
left: '60%'
},
xAxis: {
data: [],
boundaryGap: false,
},
yAxis: {
name: '(元/公斤)',
max: 8,
},
series: {
type: 'line',
symbol: 'circle',
areaStyle: {
opacity: 0.5,
},
} }
}, },
data1: [],
}
},
mounted() {
this.getData()
},
methods: {
getData() {
axios.get(this.$api.FILE_URL + 'gd-fish.json').then(res => {
const {comparison} = res.data
this.options1.xAxis.data = comparison.name
this.data1 = comparison.value.reverse()
})
}
}
} }
</script> </script>
......
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
<ThemeTitle>广东省生产专题</ThemeTitle> <ThemeTitle>广东省生产专题</ThemeTitle>
<div class="area"> <div class="area">
<p>当前广东省养殖面积</p> <p>当前广东省养殖面积</p>
<b><m-flip :value="828688678"/></b> <b v-if="area"><m-flip :value="area"/></b>
<span>k㎡</span> <span>公顷</span>
</div> </div>
<div class="box1"> <div class="box1">
<m-card mode="2" title="各品种企业排行榜"> <m-card mode="2" title="各种类养殖产量(吨)">
<DataList :list="list1"/> <DataList :list="production"/>
</m-card> </m-card>
</div> </div>
<div class="box2"> <div class="box2">
<m-card mode="2" title="各市养殖面积"> <m-card mode="2" title="各市养殖面积(亩)">
<DataList :list="list2"/> <DataList :list="list2"/>
</m-card> </m-card>
</div> </div>
<div class="box3"> <div class="box3">
<m-card mode="2" title="各品种养殖/出塘数据"> <m-card mode="2" title="特色品种养殖产量">
<m-chart :showLegend="false" :options="options" :data="data" /> <m-chart :showLegend="false" :options="options" :data="data" />
</m-card> </m-card>
</div> </div>
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
import DataList from './components/list' import DataList from './components/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'
export default { export default {
name: 'GDProduction', name: 'GDProduction',
components: { components: {
...@@ -38,53 +39,42 @@ export default { ...@@ -38,53 +39,42 @@ export default {
}, },
data() { data() {
return { return {
list1: [ area: 0,
{name: '淡水鱼苗', value: 8279, unit: '亿尾'}, production: [],
{name: '淡水鱼种', value: 222544, unit: '吨'}, specialProduction: [],
{name: '投放鱼种', value: 193027, unit: '吨'},
{name: '稚鳖', value: 6549, unit: '万只'},
{name: '稚龟', value: 655, unit: '万只'},
{name: '鳗苗捕捞', value: 43, unit: '千克'},
{name: '海水鱼苗', value: 508510, unit: '万尾'},
{name: '虾类育苗', value: 5455, unit: '万尾'},
{name: '贝类育苗', value: 293678, unit: '万尾'},
{name: '海带', value: 100, unit: '亿株'},
{name: '紫菜', value: 0.06, unit: '亿株'},
{name: '海参', value: 0.09, unit: '亿头'},
],
list2: [ list2: [
{name: '广州市', value: 7434.40, unit: 'k㎡'}, {name: '广州市', value: 7434.40, unit: ''},
{name: '韶关市', value: 18218.06, unit: 'k㎡'}, {name: '韶关市', value: 18218.06, unit: ''},
{name: '深圳市', value: 1996.85, unit: 'k㎡'}, {name: '深圳市', value: 1996.85, unit: ''},
{name: '珠海市', value: 1711.24, unit: 'k㎡'}, {name: '珠海市', value: 1711.24, unit: ''},
{name: '汕头市', value: 2198.70, unit: 'k㎡'}, {name: '汕头市', value: 2198.70, unit: ''},
{name: '佛山市', value: 3875, unit: 'k㎡'}, {name: '佛山市', value: 3875, unit: ''},
{name: '江门市', value: 9505, unit: 'k㎡'}, {name: '江门市', value: 9505, unit: ''},
{name: '湛江市', value: 13225.44, unit: 'k㎡'}, {name: '湛江市', value: 13225.44, unit: ''},
{name: '茂名市', value: 11458, unit: 'k㎡'}, {name: '茂名市', value: 11458, unit: ''},
{name: '肇庆市', value: 7434.40, unit: 'k㎡'}, {name: '肇庆市', value: 7434.40, unit: ''},
{name: '惠州市', value: 11599, unit: 'k㎡'}, {name: '惠州市', value: 11599, unit: ''},
{name: '梅州市', value: 15864.5, unit: 'k㎡'}, {name: '梅州市', value: 15864.5, unit: ''},
{name: '汕尾市', value: 5271, unit: 'k㎡'}, {name: '汕尾市', value: 5271, unit: ''},
{name: '河源市', value: 15642, unit: 'k㎡'}, {name: '河源市', value: 15642, unit: ''},
{name: '阳江市', value: 7955.9, unit: 'k㎡'}, {name: '阳江市', value: 7955.9, unit: ''},
{name: '清远市', value: 19000, unit: 'k㎡'}, {name: '清远市', value: 19000, unit: ''},
{name: '东莞市', value: 2460.10, unit: 'k㎡'}, {name: '东莞市', value: 2460.10, unit: ''},
{name: '中山市', value: 1783.67, unit: 'k㎡'}, {name: '中山市', value: 1783.67, unit: ''},
{name: '潮州市', value: 3679, unit: 'k㎡'}, {name: '潮州市', value: 3679, unit: ''},
{name: '揭阳市', value: 5240.5, unit: 'k㎡'}, {name: '揭阳市', value: 5240.5, unit: ''},
{name: '云浮市', value: 7785.11, unit: 'k㎡'}, {name: '云浮市', value: 7785.11, unit: ''},
], ],
options: { options: {
xAxis: { xAxis: {
data: ['淡水育苗', '淡水鱼种', '投放鱼种', '稚鳖', '稚龟', '鳗苗捕捞', '海水鱼苗', '虾类育苗', '贝类育苗', '海带', '紫菜', '海参'], data: [],
}, },
yAxis: { yAxis: {
name: '(吨)', name: '(吨)',
interval: 2000,
}, },
series: { series: {
type: 'bar', type: 'bar',
barWidth: '40%',
itemStyle: { itemStyle: {
shadowColor: '#0076FF', shadowColor: '#0076FF',
shadowBlur: 6, shadowBlur: 6,
...@@ -95,11 +85,27 @@ export default { ...@@ -95,11 +85,27 @@ export default {
}, },
} }
}, },
data: [ data: [],
{data: [6500, 8500, 6000, 4600, 5600, 8500, 6000, 2500, 4500, 6500, 4500, 8000]},
],
} }
}, },
mounted() {
this.getData()
},
methods: {
getData() {
axios.get(this.$api.FILE_URL + 'gd-production.json').then(res => {
for(let key in res.data) {
this[key] = res.data[key]
}
const chartData = []
this.specialProduction.forEach(item => {
this.options.xAxis.data.push(item.name)
chartData.push(item.value)
})
this.data = [{data: chartData}]
})
}
}
} }
</script> </script>
...@@ -132,5 +138,5 @@ export default { ...@@ -132,5 +138,5 @@ export default {
b b
font-size 3rem font-size 3rem
>span >span
font-size 1.5rem font-family $font-pang
</style> </style>
...@@ -41,72 +41,72 @@ ...@@ -41,72 +41,72 @@
{"name": "云浮市", "count": 2, "area": 50, "loss": 0.04} {"name": "云浮市", "count": 2, "area": 50, "loss": 0.04}
], ],
"disease": [ "disease": [
{"name":"车轮虫病","value":135,"unit": ""}, {"name":"车轮虫病","value":135,"unit": ""},
{"name":"淡水鱼细菌性败血症","value":101,"unit": ""}, {"name":"淡水鱼细菌性败血症","value":101,"unit": ""},
{"name":"烂鳃病","value":93,"unit": ""}, {"name":"烂鳃病","value":93,"unit": ""},
{"name":"细菌性肠炎病","value":81,"unit": ""}, {"name":"细菌性肠炎病","value":81,"unit": ""},
{"name":"锚头鳋病","value":74,"unit": ""}, {"name":"锚头鳋病","value":74,"unit": ""},
{"name":"指环虫病","value":51,"unit": ""}, {"name":"指环虫病","value":51,"unit": ""},
{"name":"斜管虫病","value":43,"unit": ""}, {"name":"斜管虫病","value":43,"unit": ""},
{"name":"草鱼出血病","value":41,"unit": ""}, {"name":"草鱼出血病","value":41,"unit": ""},
{"name":"链球菌病","value":38,"unit": ""}, {"name":"链球菌病","value":38,"unit": ""},
{"name":"弧菌病","value":35,"unit": ""}, {"name":"弧菌病","value":35,"unit": ""},
{"name":"肝胆综合征","value":33,"unit": ""}, {"name":"肝胆综合征","value":33,"unit": ""},
{"name":"溃疡病","value":33,"unit": ""}, {"name":"溃疡病","value":33,"unit": ""},
{"name":"诺卡菌病","value":32,"unit": ""}, {"name":"诺卡菌病","value":32,"unit": ""},
{"name":"水霉病","value":26,"unit": ""}, {"name":"水霉病","value":26,"unit": ""},
{"name":"赤皮病","value":25,"unit": ""}, {"name":"赤皮病","value":25,"unit": ""},
{"name":"固着类纤毛虫病","value":20,"unit": ""}, {"name":"固着类纤毛虫病","value":20,"unit": ""},
{"name":"不明病因疾病","value":20,"unit": ""}, {"name":"不明病因疾病","value":20,"unit": ""},
{"name":"类结节病","value":13,"unit": ""}, {"name":"类结节病","value":13,"unit": ""},
{"name":"鮰类肠败血症","value":13,"unit": ""}, {"name":"鮰类肠败血症","value":13,"unit": ""},
{"name":"烂尾病","value":11,"unit": ""}, {"name":"烂尾病","value":11,"unit": ""},
{"name":"鳖溃烂病","value":11,"unit": ""}, {"name":"鳖溃烂病","value":11,"unit": ""},
{"name":"黏孢子虫病","value":10,"unit": ""}, {"name":"黏孢子虫病","value":10,"unit": ""},
{"name":"真鲷虹彩病毒病","value":10,"unit": ""}, {"name":"真鲷虹彩病毒病","value":10,"unit": ""},
{"name":"脂肪肝","value":9,"unit": ""}, {"name":"脂肪肝","value":9,"unit": ""},
{"name":"流行性溃疡综合征","value":9,"unit": ""}, {"name":"流行性溃疡综合征","value":9,"unit": ""},
{"name":"气泡病","value":9,"unit": ""}, {"name":"气泡病","value":9,"unit": ""},
{"name":"缺氧症","value":9,"unit": ""}, {"name":"缺氧症","value":9,"unit": ""},
{"name":"急性肝胰腺坏死病","value":9,"unit": ""}, {"name":"急性肝胰腺坏死病","value":9,"unit": ""},
{"name":"氨中毒症","value":9,"unit": ""}, {"name":"氨中毒症","value":9,"unit": ""},
{"name":"鳖肠型出血病(白底板病)","value": 8,"unit": ""}, {"name":"鳖肠型出血病(白底板病)","value": 8,"unit": ""},
{"name":"小瓜虫病","value":8,"unit": ""}, {"name":"小瓜虫病","value":8,"unit": ""},
{"name":"鳖腮腺炎病","value":7,"unit": ""}, {"name":"鳖腮腺炎病","value":7,"unit": ""},
{"name":"病毒性出血性败血症","value":7,"unit": ""}, {"name":"病毒性出血性败血症","value":7,"unit": ""},
{"name":"对虾肠道细菌病","value":6,"unit": ""}, {"name":"对虾肠道细菌病","value":6,"unit": ""},
{"name":"蜕壳不遂症","value":6,"unit": ""}, {"name":"蜕壳不遂症","value":6,"unit": ""},
{"name":"疖疮病","value":5,"unit": ""}, {"name":"疖疮病","value":5,"unit": ""},
{"name":"迟缓爱德华氏菌病","value":5,"unit": ""}, {"name":"迟缓爱德华氏菌病","value":5,"unit": ""},
{"name":"白斑综合征","value":5,"unit": ""}, {"name":"白斑综合征","value":5,"unit": ""},
{"name":"鳖穿孔病","value":4,"unit": ""}, {"name":"鳖穿孔病","value":4,"unit": ""},
{"name":"鳖红脖子病","value":4,"unit": ""}, {"name":"鳖红脖子病","value":4,"unit": ""},
{"name":"对虾微孢子虫病","value":4,"unit": ""}, {"name":"对虾微孢子虫病","value":4,"unit": ""},
{"name":"坏死性肝胰腺炎","value":4,"unit": ""}, {"name":"坏死性肝胰腺炎","value":4,"unit": ""},
{"name":"缺氧","value":4,"unit": ""}, {"name":"缺氧","value":4,"unit": ""},
{"name":"鱼柱状黄杆菌病(鱼屈挠杆菌病)","value":3,"unit": ""}, {"name":"鱼柱状黄杆菌病(鱼屈挠杆菌病)","value":3,"unit": ""},
{"name":"肠炎病","value":3,"unit": ""}, {"name":"肠炎病","value":3,"unit": ""},
{"name":"鳖红底板病","value":2,"unit": ""}, {"name":"鳖红底板病","value":2,"unit": ""},
{"name":"斑点叉尾鮰传染性套肠症","value":2,"unit": ""}, {"name":"斑点叉尾鮰传染性套肠症","value":2,"unit": ""},
{"name":"传染性皮下和造血器官坏死病","value":2,"unit": ""}, {"name":"传染性皮下和造血器官坏死病","value":2,"unit": ""},
{"name":"三毛金藻中毒症","value":2,"unit": ""}, {"name":"三毛金藻中毒症","value":2,"unit": ""},
{"name":"石斑鱼膨胀病","value":2,"unit": ""}, {"name":"石斑鱼膨胀病","value":2,"unit": ""},
{"name":"打印病","value":2,"unit": ""}, {"name":"打印病","value":2,"unit": ""},
{"name":"鲫造血器官坏死症","value":2,"unit": ""}, {"name":"鲫造血器官坏死症","value":2,"unit": ""},
{"name":"三代虫病","value":1,"unit": ""}, {"name":"三代虫病","value":1,"unit": ""},
{"name":"鳗弧菌病","value":1,"unit": ""}, {"name":"鳗弧菌病","value":1,"unit": ""},
{"name":"偷死野田村病毒病","value":1,"unit": ""}, {"name":"偷死野田村病毒病","value":1,"unit": ""},
{"name":"头槽绦虫病","value":1,"unit": ""}, {"name":"头槽绦虫病","value":1,"unit": ""},
{"name":"鱼波豆虫病","value":1,"unit": ""}, {"name":"鱼波豆虫病","value":1,"unit": ""},
{"name":"传染性脾肾坏死病","value":1,"unit": ""}, {"name":"传染性脾肾坏死病","value":1,"unit": ""},
{"name":"传染性套肠症","value":1,"unit": ""}, {"name":"传染性套肠症","value":1,"unit": ""},
{"name":"对虾黑鳃综合征","value":1,"unit": ""}, {"name":"对虾黑鳃综合征","value":1,"unit": ""},
{"name":"对虾红腿病","value":1,"unit": ""}, {"name":"对虾红腿病","value":1,"unit": ""},
{"name":"腹水病","value":1,"unit": ""}, {"name":"腹水病","value":1,"unit": ""},
{"name":"贝尼登虫病","value":1,"unit": ""}, {"name":"贝尼登虫病","value":1,"unit": ""},
{"name":"斑点叉尾鮰病毒病","value":1,"unit": ""}, {"name":"斑点叉尾鮰病毒病","value":1,"unit": ""},
{"name":"侧殖吸虫病","value":1,"unit": ""}, {"name":"侧殖吸虫病","value":1,"unit": ""},
{"name":"病毒性神经坏死病","value":1,"unit": ""} {"name":"病毒性神经坏死病","value":1,"unit": ""}
], ],
"cityDiseaseArea": [ "cityDiseaseArea": [
{"name": "广州市", "value": 10797.47}, {"name": "广州市", "value": 10797.47},
......
{
"comparison": {
"name": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
"value": [
{"name": "0.6-1斤", "data": [3.2, 0, 3.35, 3.47, 3.3, 3.24, 3.12, 3.07, 3.03, 3.05, 2.84, 0]},
{"name": "1斤以上", "data": [4.18 , 0, 4.36, 4.58 , 4.34, 4.16, 4.21, 4.08, 4.13, 4.1, 3.94, 0]},
{"name": "1.2-1.6斤以上", "data": [4.4, 0, 4.69, 4.94, 4.88, 4.93, 4.95, 4.59, 4.56, 4.41, 4.13, 0]}
]
}
}
{
"area": 482540,
"production": [
{"name": "海水养殖产量", "unit": "", "value": 3167259},
{"name": "鱼类", "unit": "", "value": 594793},
{"name": "甲壳类", "unit": "", "value": 582121},
{"name": "贝类", "unit": "", "value": 1898078},
{"name": "藻类", "unit": "", "value": 73191},
{"name": "其他", "unit": "", "value": 19076},
{"name": "淡水养殖产量", "unit": "", "value": 3837113},
{"name": "鱼类", "unit": "", "value": 3497894},
{"name": "甲壳类", "unit": "", "value": 258386},
{"name": "贝类", "unit": "", "value": 12870},
{"name": "其他类", "unit": "", "value": 48306},
{"name": "观赏鱼", "unit": "", "value": 19657}
],
"specialProduction": [
{"name": "南美白对虾", "unit": "吨", "value": 611025},
{"name": "鳖", "unit": "吨", "value": 18434},
{"name": "龟", "unit": "吨", "value": 7288},
{"name": "鳗鲡", "unit": "吨", "value": 106423},
{"name": "罗非鱼", "unit": "吨", "value": 751239},
{"name": "牡蛎", "unit": "吨", "value": 1141457},
{"name": "鲈鱼", "unit": "吨", "value": 345035},
{"name": "乌鳢", "unit": "吨", "value": 165236},
{"name": "螺", "unit": "吨", "value": 86760},
{"name": "草鱼", "unit": "吨", "value": 892370},
{"name": "鳜鱼", "unit": "吨", "value": 92363},
{"name": "黄颡鱼", "unit": "吨", "value": 54065}
]
}
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