From 3549c290a222caa01cc07aadd3801ba458128613 Mon Sep 17 00:00:00 2001
From: seatonwan9 <seatonwan9@163.com>
Date: 星期日, 30 五月 2021 15:46:03 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue   |  123 +++++++++++++++++++++++-----------------
 src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue  |   11 ++-
 dist.zip                                                                                |    0 
 src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue |   13 ++--
 4 files changed, 83 insertions(+), 64 deletions(-)

diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..1e1ad71
--- /dev/null
+++ b/dist.zip
Binary files differ
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue
index 58c1bc9..ca90d4e 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue
@@ -1,38 +1,52 @@
 <template>
     <div class="location-lon-and-lat">
-        <el-row class="place-box">
-            <div class="place-left">
-                <el-form :model="LongLatPos" label-width="90px">
-                    <el-row style="display: flex;align-items: center">
-                        <el-form-item label="缁忓害:" style="display: inline-block">
-                            <el-col :span="20">
-                                <el-input v-model="LongLatPos.longPos"></el-input>
-                            </el-col>
-                        </el-form-item>
-                        <el-col :span="4">
-                            <el-button type="primary" size="small" @click="mapPoints">鐐瑰嚮瀹氫綅</el-button>
-                        </el-col>
-                    </el-row>
-                    <el-row style="display: flex;align-items: center">
-                        <el-form-item label="绾害:">
-                            <el-col :span="20">
-                                <el-input v-model="LongLatPos.latPos"></el-input>
-                            </el-col>
-                        </el-form-item>
-                        <el-col :span="4">
-                            <el-button type="primary" size="small" @click="dataPoints">鏁版嵁瀹氫綅</el-button>
-                        </el-col>
-                    </el-row>
-                </el-form>
-            </div>
-            <!--            <div class="place-right">-->
-            <!--                <el-button type="primary" size="small" @click="mapPoints">鐐瑰嚮瀹氫綅</el-button>-->
-            <!--                <el-button type="primary" size="small" @click="dataPoints">鏁版嵁瀹氫綅</el-button>-->
-            <!--            </div>-->
+        <!--        <el-row>-->
+        <!--            <el-form :model="lonlatpos" label-width="60px">-->
+        <!--                <el-col :span="12">-->
+        <!--                    <el-form-item label="缁忓害:">-->
+        <!--                        <el-input type="text" v-model="lonlatpos.longPos"></el-input>-->
+        <!--                    </el-form-item>-->
+        <!--                </el-col>-->
+        <!--                <el-col :span="12">-->
+        <!--                    <el-form-item label="绾害:">-->
+        <!--                        <el-input type="text" v-model="lonlatpos.latPos"></el-input>-->
+        <!--                    </el-form-item>-->
+        <!--                </el-col>-->
+        <!--            </el-form>-->
+        <!--            <el-row>-->
+        <!--                <el-col :span="12" style="text-align: center;margin: 5px 0">-->
+        <!--                    <el-button type="primary" size="small" @click="mapPoints">绮剧‘瀹氫綅</el-button>-->
+        <!--                </el-col>-->
+        <!--                <el-col :span="12" style="text-align: center;margin: 5px 0">-->
+        <!--                    <el-button type="primary" size="small" @click="dataPoints">鏁版嵁璇嗗彇</el-button>-->
+        <!--                </el-col>-->
+        <!--            </el-row>-->
+        <!--        </el-row>-->
+        <el-form :model="lonlatpos" label-width="60px">
+            <el-row class="pipe-line-search">
+                <el-col :span="12">
+                    <el-form-item label="缁忓害:">
+                        <el-input v-model="lonlatpos.longPos"></el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item label="绾害:">
+                        <el-input v-model="lonlatpos.latPos"></el-input>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+        </el-form>
+        <el-row>
+            <el-col :span="12" style="text-align: center;margin: 5px 0">
+                <el-button type="primary" size="small" @click="mapPoints">绮剧‘瀹氫綅</el-button>
+            </el-col>
+            <el-col :span="12" style="text-align: center;margin: 5px 0">
+                <el-button type="primary" size="small" @click="dataPoints">鏁版嵁璇嗗彇</el-button>
+            </el-col>
         </el-row>
-        <div class="place-bottom" style="text-align: right;margin: 5px">
+        <el-row class="place-bottom" style="text-align: right;margin: 5px">
             <el-button type="primary" @click="confirm" size="small">纭</el-button>
-        </div>
+        </el-row>
     </div>
 </template>
 
@@ -46,7 +60,7 @@
   data () {
     return {
       // 缁忕含搴﹀畾浣�
-      LongLatPos: {
+      lonlatpos: {
         longPos: '',
         latPos: ''
       },
@@ -54,20 +68,20 @@
     }
   },
   methods: {
-    // 鐐瑰嚮瀹氫綅
+    // 绮剧‘瀹氫綅
     mapPoints () {
       window.map.on('click', (e) => {
-        this.LongLatPos.longPos = parseFloat(e.latlng.lng).toFixed(6)
-        this.LongLatPos.latPos = parseFloat(e.latlng.lat).toFixed(6)
-        const as = [this.LongLatPos.latPos, this.LongLatPos.longPos]
+        this.lonlatpos.longPos = parseFloat(e.latlng.lng).toFixed(8)
+        this.lonlatpos.latPos = parseFloat(e.latlng.lat).toFixed(8)
+        const as = [e.latlng.lat, e.latlng.lng]
         // console.log(as)
         window.map.setView(as, 17)
         pulseEffect(as)
         this.marker = window.L.marker(as, {
           icon: window.L.icon({
             iconUrl: iconUrl,
-            iconSize: [25, 45],
-            iconAnchor: [15, 15]
+            iconSize: [26, 40],
+            iconAnchor: [13, 20]
           })
         })
         window.map.addLayer(this.marker)
@@ -76,28 +90,31 @@
     },
     // 閫氳繃鏁版嵁瀹氫綅
     dataPoints () {
-      const as = [this.LongLatPos.latPos, this.LongLatPos.longPos]
-      // console.log(as)
-      window.map.setView(as, 17)
-      pulseEffect(as)
-      this.marker = window.L.marker(as, {
-        icon: window.L.icon({
-          iconUrl: iconUrl,
-          iconSize: [30, 30],
-          iconAnchor: [15, 15]
+      // this.lonlatpos.latPos = ''
+      // this.lonlatpos.longPos = ''
+      if (this.lonlatpos.latPos !== '' && this.lonlatpos.longPos !== '') {
+        const as = [this.lonlatpos.latPos, this.lonlatpos.longPos]
+        window.map.setView(as, 17)
+        pulseEffect(as)
+        this.marker = window.L.marker(as, {
+          icon: window.L.icon({
+            iconUrl: iconUrl,
+            iconSize: [30, 40],
+            iconAnchor: [15, 20]
+          })
         })
-      })
-      window.map.addLayer(this.marker)
-      this.LongLatPos.latPos = ''
-      this.LongLatPos.longPos = ''
+        window.map.addLayer(this.marker)
+      } else {
+        this.$message('璇疯緭鍏ヨ瘑鍙栫粡绾害')
+      }
     },
     // 鐐瑰嚮纭鎸夐挳浜嬩欢
     confirm () {
       window.mapManager.clearHighlight()
       window.map.removeLayer(this.marker)
       eventBus.$emit('location-setChange', true)
-      this.LongLatPos.longPos = ''
-      this.LongLatPos.latPos = ''
+      this.lonlatpos.longPos = ''
+      this.lonlatpos.latPos = ''
     }
   }
 }
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue
index fbd79d3..599d02d 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue
@@ -1,7 +1,11 @@
 <template>
     <div class="click-location">
         <el-row>
-            <el-input type="text" v-model="clickLocation" clearable @change="focusLocation"></el-input>
+            <el-input type="text" v-model="clickLocation" @change="focusLocation">
+                <el-button slot="suffix" type="text" @click="focusLocation">
+                    <img src="../../../../../public/assets/images/map/emergency/search.png" alt="">
+                </el-button>
+            </el-input>
         </el-row>
         <!--        <el-scrollbar style="height:250.34px">-->
         <el-row v-for="(item,index) in searchList.slice((currentPage-1)*pageSize,currentPage*pageSize)" :key="index"
@@ -92,6 +96,7 @@
         },
         type: 'query'
       }
+      // $http.get('http://10.246.133.164//api/search?', data)
       reportLocationSearch(data).then(res => {
         console.log(res)
         this.searchList = res.pois
@@ -176,10 +181,6 @@
 
         .el-input {
             width: 80%;
-            margin: 15px auto;
-        }
-
-        .el-button {
             margin: 15px auto;
         }
     }
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
index 3e9cbff..9603092 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
@@ -2,16 +2,16 @@
     <div class="ReportLocationSection">
         <el-form :model="form" label-width="120px">
             <el-row class="pipe-line-search">
-                <el-col :span="12">
+                <el-col :span="18">
                     <el-form-item label="绠$嚎鍚嶇О:">
-                        <el-input v-model="form.pipeName">
+                        <el-input v-model="form.pipeName" @change="pipelineSearch">
                             <el-button style="padding-right:10px;" slot="suffix" type="text" @click="pipelineSearch">
                                 <img src="../../../../../public/assets/images/map/emergency/search.png" alt="">
                             </el-button>
                         </el-input>
                     </el-form-item>
                 </el-col>
-                <el-col :span="8">
+                <el-col :span="6">
                     <el-button type="primary" size="small" icon="el-icon-location-outline" @click="pipeClickLocation">瀹氫綅
                     </el-button>
                 </el-col>
@@ -25,12 +25,12 @@
             </el-row>
             <el-row>
                 <el-col :span="12">
-                    <el-form-item label="闄勫睘璁炬柦鍚嶇О:">
+                    <el-form-item label="闄勫睘璁炬柦缂栫爜:">
                         <el-input v-model="form.affiliatedFacilities" disabled></el-input>
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                    <el-form-item label="闄勫睘璁炬柦缂栫爜:">
+                    <el-form-item label="闄勫睘璁炬柦绫诲瀷:">
                         <el-input v-model="form.affiliatedFacilitiesCode" disabled></el-input>
                     </el-form-item>
                 </el-col>
@@ -268,8 +268,9 @@
     // 鐐瑰嚮闄勫睘璁炬柦鍒楄〃 绠℃缂栫爜浼犻��
     affFacName (val) {
       console.log(val)
+      // this.form.affiliatedFacilities = val.properties.code
       this.form.affiliatedFacilities = val.properties.name
-      this.form.affiliatedFacilitiesCode = val.properties.code
+      this.form.affiliatedFacilitiesCode = val.properties.type
     },
     // 瀹氫綅鍔熻兘
     localAdr (val) {

--
Gitblit v1.8.0