大屏
This commit is contained in:
@@ -224,6 +224,11 @@
|
|||||||
name: 'AppQxnDv',
|
name: 'AppQxnDv',
|
||||||
label: '警民互联',
|
label: '警民互联',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
DvMap,
|
DvMap,
|
||||||
DoughnutChart
|
DoughnutChart
|
||||||
@@ -599,7 +604,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted () {
|
||||||
|
this.init()
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
init () {
|
||||||
|
this.instance.post(`/wxgridinfo/tree`, null, {
|
||||||
|
params: {
|
||||||
|
corpId: 'wpytYEDgAA5zwi8Ak2mwFh3PwBKwwlWA'
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
Hex2RGBA(color, alpha = 1) {
|
Hex2RGBA(color, alpha = 1) {
|
||||||
let hex = 0;
|
let hex = 0;
|
||||||
if (color.charAt(0) == "#") {
|
if (color.charAt(0) == "#") {
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ export default {
|
|||||||
timer: null,
|
timer: null,
|
||||||
v: `AiDvMap-${new Date().getTime()}`,
|
v: `AiDvMap-${new Date().getTime()}`,
|
||||||
chart: null,
|
chart: null,
|
||||||
isShowInfo: false
|
isShowInfo: false,
|
||||||
|
geoJSON: require('../geoJSon/qxnGeoJSON.json')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
@@ -100,9 +101,9 @@ export default {
|
|||||||
|
|
||||||
initChart() {
|
initChart() {
|
||||||
this.chart = echarts.init(document.querySelector(`.${this.v}`))
|
this.chart = echarts.init(document.querySelector(`.${this.v}`))
|
||||||
this.getData().then(res => {
|
// this.getData().then(res => {
|
||||||
if (res.code === 0) {
|
// if (res.code === 0) {
|
||||||
echarts.registerMap('黔西南', res.data)
|
echarts.registerMap('黔西南', this.geoJSON)
|
||||||
|
|
||||||
let option = {
|
let option = {
|
||||||
geo: [
|
geo: [
|
||||||
@@ -275,8 +276,7 @@ export default {
|
|||||||
this.chart.on('click', e => {
|
this.chart.on('click', e => {
|
||||||
this.isShowInfo = true
|
this.isShowInfo = true
|
||||||
})
|
})
|
||||||
}
|
// })
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
convertData(data) {
|
convertData(data) {
|
||||||
@@ -299,7 +299,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getData() {
|
getData() {
|
||||||
return http.post(`/app/appdvcpconfig/apiForward?url=${encodeURIComponent(`https://geo.datav.aliyun.com/areas_v3/bound/geojson?code=522300_full`)}`,)
|
return http.post(`/app/appdvcpconfig/apiForward?url=${encodeURIComponent(`https://geo.datav.aliyun.com/areas_v3/bound/geojson?code=522300_full`)}`, null, {
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
//设置代理,可解决跨5
|
//设置代理,可解决跨5
|
||||||
'/lan': {
|
'/lan': {
|
||||||
target: 'http://192.168.1.87:9000',
|
target: 'http://192.168.1.87:12000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
//地址重写
|
//地址重写
|
||||||
|
|||||||
Reference in New Issue
Block a user