From 30b25e56b8e5c83109b5a4d123491e05ae049191 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Wed, 26 Apr 2023 09:52:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/bigscreen/dv/AppQxnDv.vue | 20 ++++++++++++++++++++ packages/bigscreen/dv/components/DvMap.vue | 16 +++++++++------- vue.config.js | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/packages/bigscreen/dv/AppQxnDv.vue b/packages/bigscreen/dv/AppQxnDv.vue index b641370a..53ad08e3 100644 --- a/packages/bigscreen/dv/AppQxnDv.vue +++ b/packages/bigscreen/dv/AppQxnDv.vue @@ -224,6 +224,11 @@ name: 'AppQxnDv', label: '警民互联', + props: { + instance: Function, + dict: Object, + }, + components: { DvMap, DoughnutChart @@ -599,7 +604,22 @@ } }, + mounted () { + this.init() + }, + methods: { + init () { + this.instance.post(`/wxgridinfo/tree`, null, { + params: { + corpId: 'wpytYEDgAA5zwi8Ak2mwFh3PwBKwwlWA' + } + }).then(res => { + if (res.code === 0) { + } + }) + }, + Hex2RGBA(color, alpha = 1) { let hex = 0; if (color.charAt(0) == "#") { diff --git a/packages/bigscreen/dv/components/DvMap.vue b/packages/bigscreen/dv/components/DvMap.vue index 7f6389ec..49e801e2 100644 --- a/packages/bigscreen/dv/components/DvMap.vue +++ b/packages/bigscreen/dv/components/DvMap.vue @@ -56,7 +56,8 @@ export default { timer: null, v: `AiDvMap-${new Date().getTime()}`, chart: null, - isShowInfo: false + isShowInfo: false, + geoJSON: require('../geoJSon/qxnGeoJSON.json') } }, directives: { @@ -100,9 +101,9 @@ export default { initChart() { this.chart = echarts.init(document.querySelector(`.${this.v}`)) - this.getData().then(res => { - if (res.code === 0) { - echarts.registerMap('黔西南', res.data) + // this.getData().then(res => { + // if (res.code === 0) { + echarts.registerMap('黔西南', this.geoJSON) let option = { geo: [ @@ -275,8 +276,7 @@ export default { this.chart.on('click', e => { this.isShowInfo = true }) - } - }) + // }) }, convertData(data) { @@ -299,7 +299,9 @@ export default { }, 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, { + + }) } } } diff --git a/vue.config.js b/vue.config.js index 0380fc7e..9d0df882 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,7 +38,7 @@ module.exports = { proxy: { //设置代理,可解决跨5 '/lan': { - target: 'http://192.168.1.87:9000', + target: 'http://192.168.1.87:12000', changeOrigin: true, pathRewrite: { //地址重写