Commit f1f901a3 authored by 郭铭瑶's avatar 郭铭瑶 🤘

更新

parent 634a6357
......@@ -62,16 +62,21 @@ export default {
options.yAxis = Object.assign(this.defaultOptions.yAxis, this.options.yAxis)
options.series = this.data.map((item, index) => {
let color = colors[index]
if (Array.isArray(color)) {
let shadow = {}
if (Array.isArray(color)) { // 如果颜色是数组则渐变
color = new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: color[0]},
{offset: 1, color: color[1]}
])
shadow = {
shadowColor: '#0076FF',
shadowBlur: 6,
}
}
const result = {
name: item.name,
barWidth: '50%',
itemStyle: { color },
itemStyle: { color, ...shadow },
data: item.data || []
}
if (this.options.series) {
......
import Vue from 'vue'
import Router from 'vue-router'
const Main = () => import('@/views/main')
const ChinaMap = () => import('@/views/china')
const GDProduction = () => import('@/views/guangdong/gd-production')
const GDTrade = () => import('@/views/guangdong/gd-trade')
const GDDisease = () => import('@/views/guangdong/gd-disease')
const GDFish = () => import('@/views/guangdong/gd-fish')
const GDIndustry = () => import('@/views/guangdong/gd-industry')
const MapTest = () => import('@/views/map-test')
const Map3D = () => import('@/views/3d-map')
// const Main = () => import('@/views/project-management/main')
// const ChinaMap = () => import('@/views/china')
// const MapTest = () => import('@/views/map-test')
const GDProduction = () => import('@/views/guangdong/gd-production') // 广东 - 生产专题
const GDTrade = () => import('@/views/guangdong/gd-trade') // 广东 - 交易专题
const GDDisease = () => import('@/views/guangdong/gd-disease') // 广东 - 疫病专题
const GDFish = () => import('@/views/guangdong/gd-fish') // 广发 - 罗非鱼专题
const GDIndustry = () => import('@/views/guangdong/gd-industry') // 广东 - 产业分析专题
const Map3D = () => import('@/views/3d-map') // 浦东 - 街镇电梯地图
Vue.use(Router)
......@@ -44,6 +44,11 @@ export default new Router({
name: 'industry',
component: GDIndustry
},
{
path: '/map3d',
name: 'map3d',
component: Map3D
},
// {
// path: '/main',
// name: 'main',
......@@ -59,10 +64,5 @@ export default new Router({
// name: 'map2',
// component: MapTest
// },
{
path: '/map3d',
name: 'map3d',
component: Map3D
},
]
})
......@@ -63,15 +63,18 @@ export default {
resizeEnable: true,
rotateEnable:true,
pitchEnable:true,
showLabel: false,
showLabel: true,
zoom: 17,
pitch:50,
rotation:45,
viewMode:'3D',//开启3D视图,默认为关闭
buildingAnimation:true,//楼块出现是否带动画
expandZoomRange:true,
zooms:[15,20],
center:[121.497915,31.218138], // 黄浦
// zooms:[17,20],
zooms: [10,20],
// center:[121.497915,31.218138], // 黄浦
// center: [121.558,31.0727], //航头镇
center: [121.502, 31.1956], //南码头
showIndoorMap:false,
// mapStyle:'amap://styles/light',
......@@ -129,6 +132,31 @@ export default {
const location = [e.lnglat.getLng(), e.lnglat.getLat()]
this.showDetail(e, location, marker.getExtData())
})
const searcher = new AMap.DistrictSearch({
level: 'district',
subdistric: 1,
})
searcher.search('浦东新区', (status, result) => {
console.log('---浦东新区街镇---', result.districtList[0].districtList)
})
// new AMap.DistrictSearch({
// level: 'district',
// extensions: 'all',
// subdistric: 1,
// }).search('浦东新区', (staus, result) => {
// var bounds = result.districtList[0].boundaries
// var polygon = new AMap.Polygon({
// strokeWeight: 1,
// path: bounds[0],
// fillOpacity: 0.4,
// fillColor: '#80d8ff',
// strokeColor: '#0091ea'
// })
// this.map.add([polygon])
// })
},
showDetail(e, location, data) {
// TODO
......
......@@ -115,6 +115,7 @@ export default {
},
getOptions(data) {
return {
colors: [['#1FECFF', '#0076FF']],
xAxis: {
data: this.fishChartData.name,
},
......@@ -124,14 +125,6 @@ export default {
series: {
type: 'bar',
barWidth: '40%',
itemStyle: {
shadowColor: '#0076FF',
shadowBlur: 6,
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: '#1FECFF'},
{offset: 1, color: '#0076FF'}
])
},
}
}
},
......
......@@ -46,6 +46,7 @@ export default {
specialProduction: [],
cityData: [],
options: {
colors: [['#1FECFF', '#B645FF']],
xAxis: {
data: [],
},
......@@ -55,14 +56,6 @@ export default {
series: {
type: 'bar',
barWidth: '40%',
itemStyle: {
shadowColor: '#0076FF',
shadowBlur: 6,
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: '#1FECFF'},
{offset: 1, color: '#B645FF'}
])
},
}
},
data: [],
......
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