From b41c6ca44111844bb96f3daffe2e61a0e9824f60 Mon Sep 17 00:00:00 2001
From: zhangshuaibao <15731629597@163.com>
Date: 星期一, 29 三月 2021 16:02:35 +0800
Subject: [PATCH] 废水弹框内容加载
---
src/api/request.js | 10 +++-
src/components/BaseNav/WasteWater/WasteWater.js | 16 ++++---
src/views/MapTemplate.vue | 36 +++++++++++------
3 files changed, 39 insertions(+), 23 deletions(-)
diff --git a/src/api/request.js b/src/api/request.js
index c3ce5bf..af919c9 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -9,9 +9,6 @@
}
})
}
-// export const FlueGas = (url) => {
-// return $http.get('./static/airQuality.json')
-// }
export function FlueGas (data = {}) {
return $http.post('EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', Qs.stringify(data), {
headers: {
@@ -19,3 +16,10 @@
}
})
}
+export function requestWasteWater (data = {}) {
+ return $http.post('EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', Qs.stringify(data), {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ })
+}
diff --git a/src/components/BaseNav/WasteWater/WasteWater.js b/src/components/BaseNav/WasteWater/WasteWater.js
index af1d4fb..c2f3d6b 100644
--- a/src/components/BaseNav/WasteWater/WasteWater.js
+++ b/src/components/BaseNav/WasteWater/WasteWater.js
@@ -16,9 +16,10 @@
}
// 璇锋眰鏁版嵁 data 涓哄弬鏁帮紝 璇锋眰鍚庡彴鏁版嵁鏃� 鎼哄甫data鍙傛暟
- requestData () {
- requestWasteWater().then(res => {
- this.DrawTheWasteWaterContent(res.Result.DataInfo)
+ requestData (data) {
+ requestWasteWater(data).then(res => {
+ console.log(res)
+ this.DrawWasteWaterContent(res.Result.DataInfo)
// console.log(res)
}).catch(err => {
console.log(err)
@@ -26,7 +27,7 @@
}
// 鏍规嵁鑾峰彇鏁版嵁 鐢诲嚭 鍐呭
- DrawTheWasteWaterContent (data) {
+ DrawWasteWaterContent (data) {
// 鍥炬爣鏍峰紡鎵╁睍
const WasteWaterIcon = this.WasteWaterIcon()
@@ -36,8 +37,8 @@
}
for (let i = 0; i < data.length; i++) {
// 缁忕含搴� 浣嶇疆
- const positionX = data[i].positionX
- const positionY = data[i].positionY
+ const positionX = data[i].Latitude
+ const positionY = data[i].Longitude
// 鍒ゆ柇 缁忕含搴︿綅缃俊鎭槸鍚﹀瓨鍦�
// if (positionX != null && positionY != null) {
@@ -62,7 +63,7 @@
autoClose: false
})
// 鍒掕繃鍑虹幇 灞曠ず鏁版嵁
- marker.bindTooltip(data[i].StoragePlaceName, {
+ marker.bindTooltip(data[i].Name, {
permanent: true,
offset: [0, -16],
direction: 'top',
@@ -74,6 +75,7 @@
// console.log(e)
this.EffectOfPulse(e.target.getLatLng())
this.WasteWaterPopup.setDate(data[i])
+ return this.WasteWaterPopup.$el
} catch (error) {
console.log(error)
}
diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue
index 540e1b9..dcbaf77 100644
--- a/src/views/MapTemplate.vue
+++ b/src/views/MapTemplate.vue
@@ -19,7 +19,7 @@
<el-button type="primary" @click="ChangeState" class="solid-waste">鍥哄簾</el-button>
<SolidContent ref="SolidWastePopup"></SolidContent>
<el-button type="primary" @click="ChangeWaterState" class="Waste-water">搴熸按</el-button>
- <WasteWaterContent ref="WasteWaterPopup"></WasteWaterContent>
+ <PublicBounced ref="PublicBounced"></PublicBounced>
<!-- <SolidContent ref="SolidWastePopup"></SolidContent>-->
<el-button type="primary" @click="AddGasHelper" class="flue-gas">搴熸皵</el-button>
<popup-gas ref="FlueGas"></popup-gas>
@@ -43,7 +43,7 @@
import LegendPanel from '@components/panel/LegendPanel'
import Enterprise from '../components/table/enterprise'
import SolidContent from '@components/BaseNav/SolidWaste/SolidContent'
-import WasteWaterContent from '@components/BaseNav/WasteWater/WasteWaterContent'
+// import WasteWaterContent from '@components/BaseNav/WasteWater/WasteWaterContent'
// 搴曞浘涓氬姟js閫昏緫
import AddSolidWasteHelper from '@components/BaseNav/SolidWaste/SolidWaste'
import AddWasteWaterHelper from '@components/BaseNav/WasteWater/WasteWater'
@@ -69,7 +69,7 @@
Popup,
summarySheets,
SolidContent,
- WasteWaterContent
+ // WasteWaterContent,
// SolidContent,
PopupGas,
PublicBounced
@@ -124,17 +124,27 @@
longDayWarr: ''
}
const AddSolidWaste = new AddSolidWasteHelper({ map: this.map })
- AddSolidWaste.requestData()
- AddSolidWaste.SetSolidWasteContent(this.config, this.$refs.SolidWastePopup)
- },
- ChangeWaterState () {
- if (this.show) {
- const AddWasteWater = new AddWasteWaterHelper({ map: this.map })
- AddWasteWater.requestData()
- AddWasteWater.SetWasteWaterContent(this.config, this.$refs.WasteWaterPopup)
- }
AddSolidWaste.requestData(data)
AddSolidWaste.SetSolidWasteContent(this.config, this.$refs.PublicBounced)
+ },
+ ChangeWaterState () {
+ const data = {
+ companyId: 3900100145,
+ id: '',
+ monType: 1,
+ userCode: 'wenchun.deng',
+ monDuration: '',
+ epName: '',
+ secdDeptId: '',
+ contrLevel: '',
+ dataStatus: '',
+ dataFlag: '',
+ runStatus: '',
+ emissTypeId: ''
+ }
+ const AddWasteWater = new AddWasteWaterHelper({ map: this.map })
+ AddWasteWater.requestData(data)
+ AddWasteWater.SetWasteWaterContent(this.config, this.$refs.PublicBounced)
},
// isShowHidden () {
// this.isShowBtn = !this.isShowBtn
@@ -231,7 +241,7 @@
.Waste-water {
position: absolute;
top: 88px;
- left: 380px;
+ left: 280px;
z-index: 999;
}
--
Gitblit v1.8.0