From 38bcd6306f20787e394347a34e50fcf80b265fc6 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期一, 31 五月 2021 14:53:35 +0800
Subject: [PATCH] 企业应急-事件上报-事发位置问题修改
---
src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue | 147 ++++++-------------------------------------------
1 files changed, 18 insertions(+), 129 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..e42ad35 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
@@ -1,152 +1,41 @@
<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>
- <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>
- </el-tab-pane>
- </el-tabs>
- </div>
+ <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">
+ <ReportLocationPoint></ReportLocationPoint>
+ </el-tab-pane>
+ </el-tabs>
</div>
</template>
<script>
-// import eventBus from '../../../../eventBus'
+
// 绠℃瀹氫綅缁勪欢
import ReportLocationSection from './ReportLocationSection'
+import ReportLocationSearch from './ReportLocationSearch'
+import ReportLocationPoint from './ReportLocationPoint'
export default {
name: 'ReportLocation',
components: {
- ReportLocationSection
+ ReportLocationSearch,
+ ReportLocationSection,
+ ReportLocationPoint
},
data () {
return {
// active tab鍒囨崲
- activeName: 'first',
- // 鐐瑰嚮瀹氫綅缁戝畾鏁版嵁
- clickLocation: '',
- // 缁忕含搴﹀畾浣�
- LongLatPos: {
- longPos: '',
- latPos: ''
- }
- }
- },
- // mounted () {
- // // 鎺ユ敹瑙勫畾 姣忔閲嶆柊閫夋嫨瀹氫綅 閮芥寚瀹� 閫夋嫨绗竴涓紑濮�
- // eventBus.$on('tab-change', (obj) => {
- // this.activeName = obj
- // })
- // },
- methods: {
- // 鍦板浘涓婄偣鍑�
- selectPipeLine () {
- window.map.on('click', this.selectClick)
- // window.mapManager.clickDialogSwitch = false
- },
- // 鍦板浘涓婄偣鍑诲洖璋�
- selectClick (e) {
- window.map.off('click', this.selectClick)
- // const point = [e.latlng.lng, e.latlng.lat]
- const pointX = e.latlng.lng
- const pointY = e.latlng.lat
- this.clickLocation = '\'' + pointX + '\'' + pointY + ''
- this.mapPointResult(e)
- },
- mapPointResult (e) {
- console.log(e)
- this.LongLatPos.longPos = e.latlng.lng
- this.LongLatPos.latPos = e.latlng.lat
- },
- // 鑾峰緱鐒︾偣 杩涜瀹氫綅
- focusLocation () {
- this.selectPipeLine()
- },
- // 缁忕含搴﹀畾浣�
- mapPoints () {
- this.selectPipeLine()
- },
- // 鐐瑰嚮纭鎸夐挳浜嬩欢
- confirm () {
- // 閫氳繃瀛愮粍浠跺悜鐖剁粍浠朵紶閫掓暟鎹�
- this.$emit('locationClick', this.LongLatPos)
- this.clickLocation = ''
- this.LongLatPos.longPos = ''
- this.LongLatPos.latPos = ''
+ activeName: 'first'
}
}
}
</script>
<style lang="less" scoped>
- .place-box {
- display: flex;
- 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;
-
- .place-top {
- display: flex;
- align-items: center;
- justify-content: space-around;
-
- .place-right {
- .el-button {
- margin: 15px;
- }
- }
- }
-
- .place-bottom {
- .el-button {
- /*margin: 15px;*/
- }
- }
- }
</style>
--
Gitblit v1.8.0