Commit 3bafd7ad862d48ac2a2434706ac493535a9a4508
1 parent
e52cf1d6
地图点击事件
Showing
3 changed files
with
29 additions
and
25 deletions
src/api/api.js
... | ... | @@ -26,8 +26,8 @@ export const dayAddressDY = p => post(baseDY+'urban/intelligence/orderPark/query |
26 | 26 | export const weekAddress = p => post(baseWX+'urban/intelligence/orderPark/queryOrderParkNumForLastWeek',p) |
27 | 27 | export const weekAddressDY = p => post(baseDY+'urban/intelligence/orderPark/queryOrderParkNumForLastWeek',p) |
28 | 28 | //....停车场总数 |
29 | -export const parkAddress = p => post(baseWX+'urban/intelligence/park/queryParkNumStatisticByOrgIds',p) | |
30 | -export const parkAddressDY = p => post(baseDY+'urban/intelligence/park/queryParkNumStatisticByOrgIds',p) | |
29 | +export const parkAddress = p => post(baseWX+'urban/intelligence/park/queryParkNumInfoStatisticByOrgIds',p) | |
30 | +export const parkAddressDY = p => post(baseDY+'urban/intelligence/park/queryParkNumInfoStatisticByOrgIds',p) | |
31 | 31 | //....地图 |
32 | 32 | export const baiduMapAddress = p => post(baseWX+'urban/intelligence/berth/queryBerthStatisticForOrgId',p) |
33 | 33 | export const baiduMapAddressDY = p => post(baseDY+'urban/intelligence/berth/queryBerthStatisticForOrgId',p) | ... | ... |
src/api/httpRequest.js
... | ... | @@ -7,6 +7,7 @@ const CancelToken = axios.CancelToken; |
7 | 7 | axios.interceptors.request.use(config => { |
8 | 8 | //发起请求时,取消掉当前正在进行的相同请求 |
9 | 9 | config.headers['x-auth-token'] = '18de1300-c3f2-4365-9f51-62f77614f8c5' |
10 | + // config.headers['x-auth-token'] = 'fbea6e17-db8a-462a-8816-49a31c20307a' | |
10 | 11 | config.data = { |
11 | 12 | ...config.data, |
12 | 13 | sysCode: '1001' | ... | ... |
src/components/chinaMap/index.vue
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | let DYdata = acctDY.data.data |
89 | 89 | console.log(WXdata) |
90 | 90 | console.log(DYdata) |
91 | - this.parkParams.endVal=WXdata+DYdata | |
91 | + this.parkParams.endVal=WXdata.allNum+DYdata.allNum | |
92 | 92 | |
93 | 93 | })) |
94 | 94 | }, |
... | ... | @@ -130,28 +130,28 @@ |
130 | 130 | |
131 | 131 | })) |
132 | 132 | |
133 | - | |
134 | - baiduMapAddress({ | |
135 | - orgIds: this.GLOBAL.paramsvariables | |
136 | - }).then((response)=>{ | |
137 | - let data = response.data.data | |
138 | - console.log(data) | |
139 | - //let mapData = []; | |
140 | - for (let i=0;i<data.length;i++){ | |
141 | - this.mapData.push({ | |
142 | - name:data[i].orgName, | |
143 | - value:data[i].allBerthNum | |
144 | - }) | |
145 | - this.coordinateData[data[i].orgName] = [data[i].lonId,data[i].latId] | |
146 | - } | |
147 | - //'双流': [103.912493, 30.586969] | |
148 | - this.mapChart= this.createPie(); | |
149 | - window.addEventListener('resize', function() { | |
150 | - this.mapChart.resize() | |
151 | - }.bind(this)); | |
152 | - }).catch((response)=>{ | |
153 | - console.log(response); | |
154 | - }) | |
133 | + // | |
134 | + // baiduMapAddress({ | |
135 | + // orgIds: this.GLOBAL.paramsvariables | |
136 | + // }).then((response)=>{ | |
137 | + // let data = response.data.data | |
138 | + // console.log(data) | |
139 | + // //let mapData = []; | |
140 | + // for (let i=0;i<data.length;i++){ | |
141 | + // this.mapData.push({ | |
142 | + // name:data[i].orgName, | |
143 | + // value:data[i].allBerthNum | |
144 | + // }) | |
145 | + // this.coordinateData[data[i].orgName] = [data[i].lonId,data[i].latId] | |
146 | + // } | |
147 | + // //'双流': [103.912493, 30.586969] | |
148 | + // this.mapChart= this.createPie(); | |
149 | + // window.addEventListener('resize', function() { | |
150 | + // this.mapChart.resize() | |
151 | + // }.bind(this)); | |
152 | + // }).catch((response)=>{ | |
153 | + // console.log(response); | |
154 | + // }) | |
155 | 155 | |
156 | 156 | |
157 | 157 | }, |
... | ... | @@ -215,6 +215,9 @@ |
215 | 215 | series: series |
216 | 216 | } |
217 | 217 | mapChart.setOption(option); |
218 | + mapChart.on('click',function (params) { | |
219 | + console.log(params.name) | |
220 | + }) | |
218 | 221 | return mapChart; |
219 | 222 | }, |
220 | 223 | //设置 series | ... | ... |