派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-28 32c49e86a7876f9252b0a88a0685c203830476f1
src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
@@ -1,16 +1,8 @@
<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>
                    </div>
            <el-tab-pane label="搜索定位" name="first">
                <ReportLocationSearch></ReportLocationSearch>
                </el-tab-pane>
                <el-tab-pane label="管段定位" name="second">
                    <ReportLocationSection></ReportLocationSection>
@@ -31,12 +23,11 @@
                            <el-button type="primary" @click="mapPoints">定位</el-button>
                        </div>
                    </el-row>
                    <div class="place-bottom" style="text-align: center;margin: 10px">
                <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>
    </div>
</template>
@@ -44,18 +35,18 @@
// import eventBus from '../../../../eventBus'
// 管段定位组件
import ReportLocationSection from './ReportLocationSection'
import ReportLocationSearch from './ReportLocationSearch'
export default {
  name: 'ReportLocation',
  components: {
    ReportLocationSearch,
    ReportLocationSection
  },
  data () {
    return {
      // active tab切换
      activeName: 'first',
      // 点击定位绑定数据
      clickLocation: '',
      // 经纬度定位
      LongLatPos: {
        longPos: '',
@@ -81,6 +72,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)
    },
@@ -115,19 +109,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;