派生自 wuyushui/SewerAndRainNetwork

陈泽平
2021-05-25 1b90ab69c77b1e4717bc9be45ea1acb36b2f6873
src/components/base-page/enterprise-emergency/PositionChange.vue
@@ -4,7 +4,7 @@
            <el-tab-pane label="点击定位" name="first">
                <div class="click-location">
                    <el-input v-model="clickLocation"></el-input>
                    <el-button type="primary">确认</el-button>
                    <el-button type="primary" @click="confirm">确认</el-button>
                </div>
            </el-tab-pane>
            <el-tab-pane label="管线定位" name="second">
@@ -18,7 +18,7 @@
                            </el-form-item>
                        </el-form>
                        <el-button type="primary" size="mini">搜索</el-button>
                    <el-button type="primary">确认</el-button>
                    <el-button type="primary" @click="confirm">确认</el-button>
                </div>
            </el-tab-pane>
            <el-tab-pane label="经纬度定位" name="third">
@@ -34,7 +34,7 @@
                        </el-form>
                        <el-button type="primary" size="mini">定位</el-button>
                    </div>
                    <el-button type="primary">确认</el-button>
                    <el-button type="primary" @click="confirm">确认</el-button>
                </div>
            </el-tab-pane>
        </el-tabs>
@@ -61,18 +61,34 @@
      linePos: {
        lineName: '',
        affFac: ''
      }
      },
      tabLabel: ''
    }
  },
  mounted () {
    // 接收规定 每次重新选择定位 都指定 选择第一个开始
    eventBus.$on('tab-change', (obj) => {
      this.activeName = obj
    })
  },
  methods: {
    handleClick (tab, event) {
      // console.log(tab)
      // console.log(event)
    // tab 切换用于判断
    handleClick (tab) {
      // 控制第三层页面 管线名称/管段代码选择页面
      if (tab.label === '管线定位') {
        // 如果 是管线定位 显示三级附属框 进行选择文件操作
        eventBus.$emit('pipelineFile-choose', true)
      } else {
        // eles 不进行显示
        eventBus.$emit('pipelineFile-choose', false)
      }
    },
    // 点击确认按钮事件
    confirm () {
      // 子组件通过事件 传递数据 控制自身显示隐藏
      this.$emit('localCation', false)
      // 通过bus 控制三级附属弹框的隐藏
      eventBus.$emit('pipelineFile-choose', false)
    }
  }
}