From dd9af28934e9b34f74a58cf3f92a472b898d738e Mon Sep 17 00:00:00 2001
From: seatonwan9 <seatonwan9@163.com>
Date: 星期五, 28 五月 2021 19:39:51 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue |   92 +++++++++++++++++++++------------------------
 1 files changed, 43 insertions(+), 49 deletions(-)

diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
index bfb60e1..3e8e096 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
@@ -1,42 +1,33 @@
 <template>
     <div class="report-location-box">
-        <div class="report-location">
-            <el-tabs v-model="activeName">
-                <el-tab-pane label="鐐瑰嚮瀹氫綅" name="first">
-                    <div class="click-location">
-                        <el-row>
-                            <el-input type="text" v-model="clickLocation" clearable @focus="focusLocation"></el-input>
-                        </el-row>
-                        <el-row>
-                            <el-button type="primary" @click="confirm">纭</el-button>
-                        </el-row>
+        <el-tabs v-model="activeName">
+            <el-tab-pane label="鎼滅储瀹氫綅" name="first">
+                <ReportLocationSearch></ReportLocationSearch>
+            </el-tab-pane>
+            <el-tab-pane label="绠℃瀹氫綅" name="second">
+                <ReportLocationSection></ReportLocationSection>
+            </el-tab-pane>
+            <el-tab-pane label="缁忕含搴﹀畾浣�" name="third">
+                <el-row class="place-box">
+                    <div class="place-left">
+                        <el-form :model="LongLatPos" label-width="90px">
+                            <el-form-item label="缁忓害:">
+                                <el-input v-model="LongLatPos.longPos"></el-input>
+                            </el-form-item>
+                            <el-form-item label="绾害:">
+                                <el-input v-model="LongLatPos.latPos"></el-input>
+                            </el-form-item>
+                        </el-form>
                     </div>
-                </el-tab-pane>
-                <el-tab-pane label="绠℃瀹氫綅" name="second">
-                    <ReportLocationSection></ReportLocationSection>
-                </el-tab-pane>
-                <el-tab-pane label="缁忕含搴﹀畾浣�" name="third">
-                    <el-row class="place-box">
-                        <div class="place-left">
-                            <el-form :model="LongLatPos" label-width="90px">
-                                <el-form-item label="缁忓害:">
-                                    <el-input v-model="LongLatPos.longPos"></el-input>
-                                </el-form-item>
-                                <el-form-item label="绾害:">
-                                    <el-input v-model="LongLatPos.latPos"></el-input>
-                                </el-form-item>
-                            </el-form>
-                        </div>
-                        <div class="place-right">
-                            <el-button type="primary" @click="mapPoints">瀹氫綅</el-button>
-                        </div>
-                    </el-row>
-                    <div class="place-bottom" style="text-align: center;margin: 10px">
-                        <el-button type="primary" @click="confirm">纭</el-button>
+                    <div class="place-right">
+                        <el-button type="primary" @click="mapPoints">瀹氫綅</el-button>
                     </div>
-                </el-tab-pane>
-            </el-tabs>
-        </div>
+                </el-row>
+                <div class="place-bottom" style="text-align: center;margin: 5px">
+                    <el-button type="primary" @click="confirm">纭</el-button>
+                </div>
+            </el-tab-pane>
+        </el-tabs>
     </div>
 </template>
 
@@ -44,18 +35,20 @@
 // import eventBus from '../../../../eventBus'
 // 绠℃瀹氫綅缁勪欢
 import ReportLocationSection from './ReportLocationSection'
+import ReportLocationSearch from './ReportLocationSearch'
+
+import iconUrl from '../../../../../public/assets/images/map/loc.png'
 
 export default {
   name: 'ReportLocation',
   components: {
+    ReportLocationSearch,
     ReportLocationSection
   },
   data () {
     return {
       // active tab鍒囨崲
       activeName: 'first',
-      // 鐐瑰嚮瀹氫綅缁戝畾鏁版嵁
-      clickLocation: '',
       // 缁忕含搴﹀畾浣�
       LongLatPos: {
         longPos: '',
@@ -81,6 +74,9 @@
       // const point = [e.latlng.lng, e.latlng.lat]
       const pointX = e.latlng.lng
       const pointY = e.latlng.lat
+      // let marker = window.L.marker(point,{
+      //
+      // })
       this.clickLocation = '\'' + pointX + '\'' + pointY + ''
       this.mapPointResult(e)
     },
@@ -88,6 +84,16 @@
       console.log(e)
       this.LongLatPos.longPos = e.latlng.lng
       this.LongLatPos.latPos = e.latlng.lat
+      const as = [e.latlng.lat, e.latlng.lng]
+      // console.log(as)
+      const marker = window.L.marker(as, {
+        icon: window.L.icon({
+          iconUrl: iconUrl,
+          iconSize: [30, 30],
+          iconAnchor: [15, 15]
+        })
+      })
+      window.map.addLayer(marker)
     },
     // 鑾峰緱鐒︾偣 杩涜瀹氫綅
     focusLocation () {
@@ -115,19 +121,7 @@
         align-items: center;
         justify-content: space-around;
     }
-    .click-location {
-        margin: 0 auto;
-        text-align: center;
 
-        .el-input {
-            width: 80%;
-            margin: 15px auto;
-        }
-
-        .el-button {
-            margin: 15px auto;
-        }
-    }
     .place {
         text-align: center;
 

--
Gitblit v1.8.0