diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index 3bbeaeb..de58764 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -56,7 +56,7 @@ '霜冻': '11', '大雾': '12', '霾': '13', - '道路结冰': '14' + '道路结冰': '14', }, // 灾害与数字对应表 disasterLevel: { '蓝色': '01', @@ -104,8 +104,8 @@ let data = res.data.map(item => { return { name: item['WD52_03'].trim(), - lng: parseFloat(item['WD52_06'].trim()), - lat: parseFloat(item['WD52_05'].trim()), + lng: parseFloat(item['WD52_05'].trim()), + lat: parseFloat(item['WD52_06'].trim()), value: item['WD52_08'].trim(), zhlx: item['WD52_12'].trim(), zhdj: item['WD52_13'].trim() @@ -114,7 +114,10 @@ data = data.filter(item => item.lng != null) this.data = data for (const item of data) { - const img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + let img='static/images/weather_disaster/0000.png' + if(this.disaster[item.zhlx]){ + img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + } const graphic = new mars3d.graphic.BillboardEntity({ name: '气象灾害', position: [item.lng, item.lat, height], diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index 3bbeaeb..de58764 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -56,7 +56,7 @@ '霜冻': '11', '大雾': '12', '霾': '13', - '道路结冰': '14' + '道路结冰': '14', }, // 灾害与数字对应表 disasterLevel: { '蓝色': '01', @@ -104,8 +104,8 @@ let data = res.data.map(item => { return { name: item['WD52_03'].trim(), - lng: parseFloat(item['WD52_06'].trim()), - lat: parseFloat(item['WD52_05'].trim()), + lng: parseFloat(item['WD52_05'].trim()), + lat: parseFloat(item['WD52_06'].trim()), value: item['WD52_08'].trim(), zhlx: item['WD52_12'].trim(), zhdj: item['WD52_13'].trim() @@ -114,7 +114,10 @@ data = data.filter(item => item.lng != null) this.data = data for (const item of data) { - const img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + let img='static/images/weather_disaster/0000.png' + if(this.disaster[item.zhlx]){ + img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + } const graphic = new mars3d.graphic.BillboardEntity({ name: '气象灾害', position: [item.lng, item.lat, height], diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 9c4e07b..e64f114 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -98,19 +98,20 @@ const date = getToday('yyyyMMdd') getAreaSupply(date).then(res => { if (res.status === 200) { + debugger const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) @@ -172,6 +173,10 @@ removeLayer() { const { map, layer } = this if (this.layer) { + const graphics = layer.graphics + for (const graphic of graphics) { + graphic.closePopup() + } map.removeLayer(layer) this.layer = null } diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index 3bbeaeb..de58764 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -56,7 +56,7 @@ '霜冻': '11', '大雾': '12', '霾': '13', - '道路结冰': '14' + '道路结冰': '14', }, // 灾害与数字对应表 disasterLevel: { '蓝色': '01', @@ -104,8 +104,8 @@ let data = res.data.map(item => { return { name: item['WD52_03'].trim(), - lng: parseFloat(item['WD52_06'].trim()), - lat: parseFloat(item['WD52_05'].trim()), + lng: parseFloat(item['WD52_05'].trim()), + lat: parseFloat(item['WD52_06'].trim()), value: item['WD52_08'].trim(), zhlx: item['WD52_12'].trim(), zhdj: item['WD52_13'].trim() @@ -114,7 +114,10 @@ data = data.filter(item => item.lng != null) this.data = data for (const item of data) { - const img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + let img='static/images/weather_disaster/0000.png' + if(this.disaster[item.zhlx]){ + img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + } const graphic = new mars3d.graphic.BillboardEntity({ name: '气象灾害', position: [item.lng, item.lat, height], diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 9c4e07b..e64f114 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -98,19 +98,20 @@ const date = getToday('yyyyMMdd') getAreaSupply(date).then(res => { if (res.status === 200) { + debugger const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) @@ -172,6 +173,10 @@ removeLayer() { const { map, layer } = this if (this.layer) { + const graphics = layer.graphics + for (const graphic of graphics) { + graphic.closePopup() + } map.removeLayer(layer) this.layer = null } diff --git a/src/components/Map/components/supplyLayerCone.vue b/src/components/Map/components/supplyLayerCone.vue index de46f58..fc7fc50 100644 --- a/src/components/Map/components/supplyLayerCone.vue +++ b/src/components/Map/components/supplyLayerCone.vue @@ -79,7 +79,7 @@ methods: { load() { console.log('load') - if(this.show) this.initLayer() + if (this.show) this.initLayer() }, initLayer() { const { mars3d, map } = this @@ -105,17 +105,17 @@ if (res.status === 200) { const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index 3bbeaeb..de58764 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -56,7 +56,7 @@ '霜冻': '11', '大雾': '12', '霾': '13', - '道路结冰': '14' + '道路结冰': '14', }, // 灾害与数字对应表 disasterLevel: { '蓝色': '01', @@ -104,8 +104,8 @@ let data = res.data.map(item => { return { name: item['WD52_03'].trim(), - lng: parseFloat(item['WD52_06'].trim()), - lat: parseFloat(item['WD52_05'].trim()), + lng: parseFloat(item['WD52_05'].trim()), + lat: parseFloat(item['WD52_06'].trim()), value: item['WD52_08'].trim(), zhlx: item['WD52_12'].trim(), zhdj: item['WD52_13'].trim() @@ -114,7 +114,10 @@ data = data.filter(item => item.lng != null) this.data = data for (const item of data) { - const img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + let img='static/images/weather_disaster/0000.png' + if(this.disaster[item.zhlx]){ + img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + } const graphic = new mars3d.graphic.BillboardEntity({ name: '气象灾害', position: [item.lng, item.lat, height], diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 9c4e07b..e64f114 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -98,19 +98,20 @@ const date = getToday('yyyyMMdd') getAreaSupply(date).then(res => { if (res.status === 200) { + debugger const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) @@ -172,6 +173,10 @@ removeLayer() { const { map, layer } = this if (this.layer) { + const graphics = layer.graphics + for (const graphic of graphics) { + graphic.closePopup() + } map.removeLayer(layer) this.layer = null } diff --git a/src/components/Map/components/supplyLayerCone.vue b/src/components/Map/components/supplyLayerCone.vue index de46f58..fc7fc50 100644 --- a/src/components/Map/components/supplyLayerCone.vue +++ b/src/components/Map/components/supplyLayerCone.vue @@ -79,7 +79,7 @@ methods: { load() { console.log('load') - if(this.show) this.initLayer() + if (this.show) this.initLayer() }, initLayer() { const { mars3d, map } = this @@ -105,17 +105,17 @@ if (res.status === 200) { const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) diff --git a/src/components/Map/components/vipLayer.vue b/src/components/Map/components/vipLayer.vue index 154d153..9e18725 100644 --- a/src/components/Map/components/vipLayer.vue +++ b/src/components/Map/components/vipLayer.vue @@ -77,12 +77,12 @@ name: item['WD02_03'], x: parseFloat(item['WD02_04']), y: parseFloat(item['WD02_05']), - pngNeed: item['DL03'], - lngNeed: item['DL02'], - pngSupply: item['DL03'], - lngSupply: item['DL02'], - supply: item['DL03'] + item['DL02'], - need: item['DL03'] + item['DL02'] + pngNeed: item['DL01'], + lngNeed: 0, + pngSupply: item['DL01'], + lngSupply: 0, + supply: item['DL01'], + need: item['DL01'] } }) this.data = data @@ -104,10 +104,10 @@ this.layer.bindPopup(event => { const item = event.graphic.attr var html = `` diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index 3bbeaeb..de58764 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -56,7 +56,7 @@ '霜冻': '11', '大雾': '12', '霾': '13', - '道路结冰': '14' + '道路结冰': '14', }, // 灾害与数字对应表 disasterLevel: { '蓝色': '01', @@ -104,8 +104,8 @@ let data = res.data.map(item => { return { name: item['WD52_03'].trim(), - lng: parseFloat(item['WD52_06'].trim()), - lat: parseFloat(item['WD52_05'].trim()), + lng: parseFloat(item['WD52_05'].trim()), + lat: parseFloat(item['WD52_06'].trim()), value: item['WD52_08'].trim(), zhlx: item['WD52_12'].trim(), zhdj: item['WD52_13'].trim() @@ -114,7 +114,10 @@ data = data.filter(item => item.lng != null) this.data = data for (const item of data) { - const img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + let img='static/images/weather_disaster/0000.png' + if(this.disaster[item.zhlx]){ + img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + } const graphic = new mars3d.graphic.BillboardEntity({ name: '气象灾害', position: [item.lng, item.lat, height], diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 9c4e07b..e64f114 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -98,19 +98,20 @@ const date = getToday('yyyyMMdd') getAreaSupply(date).then(res => { if (res.status === 200) { + debugger const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) @@ -172,6 +173,10 @@ removeLayer() { const { map, layer } = this if (this.layer) { + const graphics = layer.graphics + for (const graphic of graphics) { + graphic.closePopup() + } map.removeLayer(layer) this.layer = null } diff --git a/src/components/Map/components/supplyLayerCone.vue b/src/components/Map/components/supplyLayerCone.vue index de46f58..fc7fc50 100644 --- a/src/components/Map/components/supplyLayerCone.vue +++ b/src/components/Map/components/supplyLayerCone.vue @@ -79,7 +79,7 @@ methods: { load() { console.log('load') - if(this.show) this.initLayer() + if (this.show) this.initLayer() }, initLayer() { const { mars3d, map } = this @@ -105,17 +105,17 @@ if (res.status === 200) { const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) diff --git a/src/components/Map/components/vipLayer.vue b/src/components/Map/components/vipLayer.vue index 154d153..9e18725 100644 --- a/src/components/Map/components/vipLayer.vue +++ b/src/components/Map/components/vipLayer.vue @@ -77,12 +77,12 @@ name: item['WD02_03'], x: parseFloat(item['WD02_04']), y: parseFloat(item['WD02_05']), - pngNeed: item['DL03'], - lngNeed: item['DL02'], - pngSupply: item['DL03'], - lngSupply: item['DL02'], - supply: item['DL03'] + item['DL02'], - need: item['DL03'] + item['DL02'] + pngNeed: item['DL01'], + lngNeed: 0, + pngSupply: item['DL01'], + lngSupply: 0, + supply: item['DL01'], + need: item['DL01'] } }) this.data = data @@ -104,10 +104,10 @@ this.layer.bindPopup(event => { const item = event.graphic.attr var html = `` diff --git a/src/components/Map/components/weatherLayer.vue b/src/components/Map/components/weatherLayer.vue index b9f2096..ff93fa0 100644 --- a/src/components/Map/components/weatherLayer.vue +++ b/src/components/Map/components/weatherLayer.vue @@ -92,8 +92,8 @@ name: item['WD51_20'], lng: parseFloat(item['WD51_21']), lat: parseFloat(item['WD51_22']), - wd: item['WD51_15'].trim(), - wg: item['WD51_14'].trim(), + wd: item['WD51_14'].trim(), + wg: item['WD51_15'].trim(), tqxx12: item['WD51_10'], tqxx24: item['WD51_12'] } diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index 3bbeaeb..de58764 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -56,7 +56,7 @@ '霜冻': '11', '大雾': '12', '霾': '13', - '道路结冰': '14' + '道路结冰': '14', }, // 灾害与数字对应表 disasterLevel: { '蓝色': '01', @@ -104,8 +104,8 @@ let data = res.data.map(item => { return { name: item['WD52_03'].trim(), - lng: parseFloat(item['WD52_06'].trim()), - lat: parseFloat(item['WD52_05'].trim()), + lng: parseFloat(item['WD52_05'].trim()), + lat: parseFloat(item['WD52_06'].trim()), value: item['WD52_08'].trim(), zhlx: item['WD52_12'].trim(), zhdj: item['WD52_13'].trim() @@ -114,7 +114,10 @@ data = data.filter(item => item.lng != null) this.data = data for (const item of data) { - const img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + let img='static/images/weather_disaster/0000.png' + if(this.disaster[item.zhlx]){ + img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + } const graphic = new mars3d.graphic.BillboardEntity({ name: '气象灾害', position: [item.lng, item.lat, height], diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 9c4e07b..e64f114 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -98,19 +98,20 @@ const date = getToday('yyyyMMdd') getAreaSupply(date).then(res => { if (res.status === 200) { + debugger const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) @@ -172,6 +173,10 @@ removeLayer() { const { map, layer } = this if (this.layer) { + const graphics = layer.graphics + for (const graphic of graphics) { + graphic.closePopup() + } map.removeLayer(layer) this.layer = null } diff --git a/src/components/Map/components/supplyLayerCone.vue b/src/components/Map/components/supplyLayerCone.vue index de46f58..fc7fc50 100644 --- a/src/components/Map/components/supplyLayerCone.vue +++ b/src/components/Map/components/supplyLayerCone.vue @@ -79,7 +79,7 @@ methods: { load() { console.log('load') - if(this.show) this.initLayer() + if (this.show) this.initLayer() }, initLayer() { const { mars3d, map } = this @@ -105,17 +105,17 @@ if (res.status === 200) { const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) diff --git a/src/components/Map/components/vipLayer.vue b/src/components/Map/components/vipLayer.vue index 154d153..9e18725 100644 --- a/src/components/Map/components/vipLayer.vue +++ b/src/components/Map/components/vipLayer.vue @@ -77,12 +77,12 @@ name: item['WD02_03'], x: parseFloat(item['WD02_04']), y: parseFloat(item['WD02_05']), - pngNeed: item['DL03'], - lngNeed: item['DL02'], - pngSupply: item['DL03'], - lngSupply: item['DL02'], - supply: item['DL03'] + item['DL02'], - need: item['DL03'] + item['DL02'] + pngNeed: item['DL01'], + lngNeed: 0, + pngSupply: item['DL01'], + lngSupply: 0, + supply: item['DL01'], + need: item['DL01'] } }) this.data = data @@ -104,10 +104,10 @@ this.layer.bindPopup(event => { const item = event.graphic.attr var html = `` diff --git a/src/components/Map/components/weatherLayer.vue b/src/components/Map/components/weatherLayer.vue index b9f2096..ff93fa0 100644 --- a/src/components/Map/components/weatherLayer.vue +++ b/src/components/Map/components/weatherLayer.vue @@ -92,8 +92,8 @@ name: item['WD51_20'], lng: parseFloat(item['WD51_21']), lat: parseFloat(item['WD51_22']), - wd: item['WD51_15'].trim(), - wg: item['WD51_14'].trim(), + wd: item['WD51_14'].trim(), + wg: item['WD51_15'].trim(), tqxx12: item['WD51_10'], tqxx24: item['WD51_12'] } diff --git a/src/views/maps/mapOverview.vue b/src/views/maps/mapOverview.vue index 50c4c2f..959b91c 100644 --- a/src/views/maps/mapOverview.vue +++ b/src/views/maps/mapOverview.vue @@ -148,13 +148,13 @@ if (res.status === 200) { const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.cities = data diff --git a/src/api/needSupply.js b/src/api/needSupply.js index 54fdd46..d6a608d 100644 --- a/src/api/needSupply.js +++ b/src/api/needSupply.js @@ -14,45 +14,37 @@ }) } // 各地区供给 -export function getAreaSupply(date) { +export function getAreaSupply() { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_01,WD09_05,DL01,DL02,DL03', - 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': 'E84C7DDEC62842CDAB9309D64239E4E9', + 'distinct': true, 'type': 0, - 'conditionList': [ - [ - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '1', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_01', - 'value': [date] - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'AECABF09DDD143E6A5A9621EF4AE1B8F', - 'key': 'WD09_05' - - } - ] - ], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} +// 各地区供给-旧 +export function getAreaSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { + 'showField': 'WD01_03,WD03_04,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, 'pageNo': null, 'pageSize': null, 'sign': sign, @@ -78,6 +70,28 @@ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { + 'showField': 'WD01_03,WD02_03,WD02_04,WD02_05,DL01', + 'indexId': '8C2A9E095D0849EAAF54FFDAF832FDC3', + 'distinct': true, + 'type': 0, + 'conditionList': [], + 'pageNo': null, + 'pageSize': null, + 'sign': sign, + 'name': username, + 'time': timestamp + } + }) +} + +// 各用户供需数据-old +export function getUserSupplyOld(date) { + const baseConfig = Vue.prototype.baseConfig + const { sign, username, timestamp } = getSignTimeStamp() + return request({ + url: baseConfig.biUrl + '/factdata/index/getData', + method: 'post', + data: { 'showField': 'WD01_01,WD_01_03,WD02_01,WD02_03,WD02_04,WD02_05,WD_06,DL02,DL03', 'indexId': '56680A347AF44DAEB1286A7C69D97A2F', 'type': 0, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index 3bbeaeb..de58764 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -56,7 +56,7 @@ '霜冻': '11', '大雾': '12', '霾': '13', - '道路结冰': '14' + '道路结冰': '14', }, // 灾害与数字对应表 disasterLevel: { '蓝色': '01', @@ -104,8 +104,8 @@ let data = res.data.map(item => { return { name: item['WD52_03'].trim(), - lng: parseFloat(item['WD52_06'].trim()), - lat: parseFloat(item['WD52_05'].trim()), + lng: parseFloat(item['WD52_05'].trim()), + lat: parseFloat(item['WD52_06'].trim()), value: item['WD52_08'].trim(), zhlx: item['WD52_12'].trim(), zhdj: item['WD52_13'].trim() @@ -114,7 +114,10 @@ data = data.filter(item => item.lng != null) this.data = data for (const item of data) { - const img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + let img='static/images/weather_disaster/0000.png' + if(this.disaster[item.zhlx]){ + img = 'static/images/weather_disaster/' + this.disaster[item.zhlx] + this.disasterLevel[item.zhdj] + '.png' + } const graphic = new mars3d.graphic.BillboardEntity({ name: '气象灾害', position: [item.lng, item.lat, height], diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 9c4e07b..e64f114 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -98,19 +98,20 @@ const date = getToday('yyyyMMdd') getAreaSupply(date).then(res => { if (res.status === 200) { + debugger const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) @@ -172,6 +173,10 @@ removeLayer() { const { map, layer } = this if (this.layer) { + const graphics = layer.graphics + for (const graphic of graphics) { + graphic.closePopup() + } map.removeLayer(layer) this.layer = null } diff --git a/src/components/Map/components/supplyLayerCone.vue b/src/components/Map/components/supplyLayerCone.vue index de46f58..fc7fc50 100644 --- a/src/components/Map/components/supplyLayerCone.vue +++ b/src/components/Map/components/supplyLayerCone.vue @@ -79,7 +79,7 @@ methods: { load() { console.log('load') - if(this.show) this.initLayer() + if (this.show) this.initLayer() }, initLayer() { const { mars3d, map } = this @@ -105,17 +105,17 @@ if (res.status === 200) { const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.wholeData = data - this.filteredData = data + this.filteredData = data.filter(item => item.name !== '无') // 计算缩放倍数 if (this.index == null) { this.index = getIndex(this.filteredData.map(item => item.supply)) diff --git a/src/components/Map/components/vipLayer.vue b/src/components/Map/components/vipLayer.vue index 154d153..9e18725 100644 --- a/src/components/Map/components/vipLayer.vue +++ b/src/components/Map/components/vipLayer.vue @@ -77,12 +77,12 @@ name: item['WD02_03'], x: parseFloat(item['WD02_04']), y: parseFloat(item['WD02_05']), - pngNeed: item['DL03'], - lngNeed: item['DL02'], - pngSupply: item['DL03'], - lngSupply: item['DL02'], - supply: item['DL03'] + item['DL02'], - need: item['DL03'] + item['DL02'] + pngNeed: item['DL01'], + lngNeed: 0, + pngSupply: item['DL01'], + lngSupply: 0, + supply: item['DL01'], + need: item['DL01'] } }) this.data = data @@ -104,10 +104,10 @@ this.layer.bindPopup(event => { const item = event.graphic.attr var html = `` diff --git a/src/components/Map/components/weatherLayer.vue b/src/components/Map/components/weatherLayer.vue index b9f2096..ff93fa0 100644 --- a/src/components/Map/components/weatherLayer.vue +++ b/src/components/Map/components/weatherLayer.vue @@ -92,8 +92,8 @@ name: item['WD51_20'], lng: parseFloat(item['WD51_21']), lat: parseFloat(item['WD51_22']), - wd: item['WD51_15'].trim(), - wg: item['WD51_14'].trim(), + wd: item['WD51_14'].trim(), + wg: item['WD51_15'].trim(), tqxx12: item['WD51_10'], tqxx24: item['WD51_12'] } diff --git a/src/views/maps/mapOverview.vue b/src/views/maps/mapOverview.vue index 50c4c2f..959b91c 100644 --- a/src/views/maps/mapOverview.vue +++ b/src/views/maps/mapOverview.vue @@ -148,13 +148,13 @@ if (res.status === 200) { const data = res.data.map(item => { return { - name: item['WD09_05'], - pngSupply: item['DL03'] / 10000.0, - pngNeed: item['DL03'] / 10000.0, - lngSupply: item['DL02'] / 10000.0, - lngNeed: item['DL02'] / 10000.0, - supply: (item['DL03'] + item['DL02']) / 10000.0, - need: (item['DL03'] + item['DL02']) / 10000.0 + name: item['WD03_04'], + pngSupply: item['DL01'] / 10000.0, + pngNeed: item['DL01'] / 10000.0, + lngSupply: 0, + lngNeed: 0, + supply: (item['DL01'] + 0) / 10000.0, + need: (item['DL01'] + 0) / 10000.0 } }) this.cities = data diff --git a/src/views/maps/mapOverview2.vue b/src/views/maps/mapOverview2.vue index 492e15b..8481861 100644 --- a/src/views/maps/mapOverview2.vue +++ b/src/views/maps/mapOverview2.vue @@ -6,7 +6,7 @@