From ff7d4833fba266445fa57fd3998e6ce43bacc80a Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期一, 29 三月 2021 15:43:02 +0800
Subject: [PATCH] 弹出框修改

---
 src/api/request.js                                     |   24 +++---------
 src/components/BaseNav/SolidWaste/directive.js         |    6 +-
 src/components/flueGas/flueGas.js                      |    6 +-
 src/utils/axios.js                                     |    2 
 src/views/MapTemplate.vue                              |   33 +++++++++++-----
 src/components/BaseNav/PublicBounced/PublicBounced.vue |   27 ++++++++++++-
 6 files changed, 60 insertions(+), 38 deletions(-)

diff --git a/src/api/request.js b/src/api/request.js
index a27be63..445b185 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -8,22 +8,10 @@
     }
   })
 }
-export const FlueGas = (url) => {
-  return $http.get('./static/airQuality.json')
+export const FlueGas = (data = {}) => {
+  return $http.post('/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', Qs.stringify(data), {
+    headers: {
+      'Content-Type': 'application/json'
+    }
+  })
 }
-// export function FlueGas () {
-//   return axios.post('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', {
-//     companyId: 3900100145,
-//     id: '',
-//     monType: 2,
-//     userCode: 'wenchun.deng',
-//     monDuration: '',
-//     epName: '',
-//     secdDeptId: '',
-//     contrLevel: '',
-//     dataStatus: '',
-//     dataFlag: '',
-//     runStatus: '',
-//     emissTypeId: ''
-//   })
-// }
diff --git a/src/components/BaseNav/PublicBounced/PublicBounced.vue b/src/components/BaseNav/PublicBounced/PublicBounced.vue
index 003f1dc..ed22e56 100644
--- a/src/components/BaseNav/PublicBounced/PublicBounced.vue
+++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -1,16 +1,19 @@
 <template>
-  <div class="public-bounced" v-show="flag">
+  <div class="public-bounced" v-draw v-show="flag">
     <div class="public-bounced-title">
       <span>{{ displayContent.Name }}</span>
       <i class="el-icon-circle-close" @click="closePopup"></i>
     </div>
     <div class="public-bounced-content">
-      <span>鍐呭</span>
+      <div class="public-bounced-content-left"></div>
+      <div class="public-bounced-content-right"></div>
     </div>
   </div>
 </template>
 
 <script>
+
+import '@/components/BaseNav/SolidWaste/directive'
 
 export default {
   name: 'PublicBounced',
@@ -42,7 +45,7 @@
   left: 10%;
   background-color: #002432;
   margin: 1% auto;
-  border: 1px #a5bfd8 solid;
+  border: 1px #9fc5c8 solid;
 
   .public-bounced-title {
     width: 100%;
@@ -65,5 +68,23 @@
     }
   }
 
+  .public-bounced-content {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    .public-bounced-content-left {
+      width: 48%;
+      height: 400px;
+      border: 1px red solid;
+    }
+    .public-bounced-content-right {
+      width: 48%;
+      height: 400px;
+      border: 1px red solid;
+    }
+  }
+
 }
 </style>
diff --git a/src/components/BaseNav/SolidWaste/directive.js b/src/components/BaseNav/SolidWaste/directive.js
index adc9450..773a4a8 100644
--- a/src/components/BaseNav/SolidWaste/directive.js
+++ b/src/components/BaseNav/SolidWaste/directive.js
@@ -2,9 +2,9 @@
 
 // 鑷畾涔夊厓绱犲疄鐜板脊妗嗘嫋鎷絒閲嶇偣]
 Vue.directive('draw', {
-  inserted: function (el, binding, vNode) {
-    el.setAttribute('style', 'position: fixed; z-index: 9999')
-  },
+  // inserted: function (el, binding, vNode) {
+  //   el.setAttribute('style', 'position: fixed; z-index: 9999')
+  // },
   bind: function (el, bindding, vNode) {
     el.setAttribute('draggable', true)
     let left, top, width, height
diff --git a/src/components/flueGas/flueGas.js b/src/components/flueGas/flueGas.js
index ab62d6a..1c816be 100644
--- a/src/components/flueGas/flueGas.js
+++ b/src/components/flueGas/flueGas.js
@@ -15,8 +15,8 @@
   }
 
   // 鑾峰彇鏁版嵁
-  requestData () {
-    FlueGas().then(res => {
+  requestData (data) {
+    FlueGas(data).then(res => {
       console.log(res)
       this.DrawFlueGasContent(res.Result.DataInfo)
     }).catch(err => {
@@ -75,7 +75,7 @@
         try {
           // console.log(e)
           this.EffectOfPulse(e.target.getLatLng())
-          this.FlueGasPopup.setDate(data[i])
+          this.FlueGasPopup.setData(data[i])
         } catch (error) {
           console.log(error)
         }
diff --git a/src/utils/axios.js b/src/utils/axios.js
index 69078ed..7f944e8 100644
--- a/src/utils/axios.js
+++ b/src/utils/axios.js
@@ -83,7 +83,7 @@
 
 // 鍒涘缓axios瀹炰緥
 const Service = axios.create({
-  timeout: 1000,
+  timeout: 5000,
   baseURL: 'http://10.246.162.140:8080/'
 })
 
diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue
index 2e804f4..253123a 100644
--- a/src/views/MapTemplate.vue
+++ b/src/views/MapTemplate.vue
@@ -17,10 +17,8 @@
     <enterprise></enterprise>
     <!--    <el-button id="map-btn" el-icon-c-scale-to-original icon="el-icon-c-scale-to-original" circle @click="isShowHidden"></el-button>-->
     <el-button type="primary" @click="ChangeState" class="solid-waste">鍥哄簾</el-button>
-<!--    <SolidContent ref="SolidWastePopup"></SolidContent>-->
+    <PublicBounced ref="PublicBounced"></PublicBounced>
     <el-button type="primary" @click="AddGasHelper" class="flue-gas">搴熸皵</el-button>
-    <popup-gas ref="FlueGas"></popup-gas>
-    <public-bouncedounced ref="PublicBounced"></public-bouncedounced>
   </div>
 </template>
 
@@ -44,9 +42,9 @@
 // import SolidContent from '@components/SolidWaste/SolidContent'
 // 搴熸皵
 import AddGasHelper from '@components/flueGas/flueGas'
-import PopupGas from '@/components/flueGas/popup-gas'
+// import PopupGas from '@/components/flueGas/popup-gas'
 // // 鍏叡灞曠ず鏁版嵁
-// import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
+import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
 
 export default {
   name: 'MapTemplate',
@@ -63,8 +61,8 @@
     Popup,
     summarySheets,
     // SolidContent,
-    PopupGas
-    // PublicBounced
+    // PopupGas,
+    PublicBounced
   },
   data () {
     return {
@@ -88,9 +86,23 @@
   },
   methods: {
     AddGasHelper () {
+      const data = {
+        companyId: 3900100145,
+        id: '',
+        monType: 2,
+        userCode: 'wenchun.deng',
+        monDuration: '',
+        epName: '',
+        secdDeptId: '',
+        contrLevel: '',
+        dataStatus: '',
+        dataFlag: '',
+        runStatus: '',
+        emissTypeId: ''
+      }
       const AddGas = new AddGasHelper({ map: this.map })
-      AddGas.requestData()
-      AddGas.SetPlueGasContent(this.config, this.$refs.FlueGas)
+      AddGas.requestData(data)
+      AddGas.SetPlueGasContent(this.config, this.$refs.PublicBounced)
     },
     ChangeState () {
       const data = {
@@ -179,11 +191,12 @@
 
 <style lang="less">
 .flue-gas {
-  position:fixed;
+  position: fixed;
   top: 88px;
   left: 180px;
   z-index: 500;
 }
+
 .solid-waste {
   position: absolute;
   top: 88px;

--
Gitblit v1.8.0