| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | // 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: '', |
| | |
| | | // 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) |
| | | }, |
| | |
| | | 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; |
| | | |