<template>
|
<div class="side-box map-background" v-show="location">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="点击定位" name="first">
|
<div class="click-location">
|
<el-input v-model="clickLocation"></el-input>
|
<el-button type="primary">确认</el-button>
|
</div>
|
</el-tab-pane>
|
<el-tab-pane label="管线定位" name="second">
|
<div class="line-pos">
|
<el-form :model="linePos" label-width="90px">
|
<el-form-item label="管线名称:">
|
<el-input v-model="linePos.lineName"></el-input>
|
</el-form-item>
|
<el-form-item label="附属设施:">
|
<el-input v-model="linePos.affFac"></el-input>
|
</el-form-item>
|
</el-form>
|
<el-button type="primary" size="mini">搜索</el-button>
|
<el-button type="primary">确认</el-button>
|
</div>
|
</el-tab-pane>
|
<el-tab-pane label="经纬度定位" name="third">
|
<div class="latlng-location">
|
<div class="latlng-location-chose">
|
<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>
|
<el-button type="primary" size="mini">定位</el-button>
|
</div>
|
<el-button type="primary">确认</el-button>
|
</div>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</template>
|
|
<script>
|
import eventBus from '../../../eventBus'
|
|
export default {
|
name: 'PositionChange',
|
props: ['location'],
|
data () {
|
return {
|
pipelineFile: false,
|
activeName: 'first',
|
clickLocation: '',
|
// 经纬度定位
|
LongLatPos: {
|
longPos: '',
|
latPos: ''
|
},
|
// 管段定位
|
linePos: {
|
lineName: '',
|
affFac: ''
|
}
|
}
|
},
|
methods: {
|
handleClick (tab, event) {
|
// console.log(tab)
|
// console.log(event)
|
if (tab.label === '管线定位') {
|
eventBus.$emit('pipelineFile-choose', true)
|
} else {
|
eventBus.$emit('pipelineFile-choose', false)
|
}
|
}
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
|
.side-box {
|
min-width: 1.94532rem;
|
max-height: 1.343213rem;
|
}
|
.click-location {
|
margin: 0 auto;
|
text-align: center;
|
|
.el-input {
|
width: 90%;
|
margin: 15px auto;
|
}
|
|
.el-button {
|
margin: 15px auto;
|
}
|
}
|
|
.line-pos {
|
text-align: center;
|
.el-input {
|
width: 85%;
|
}
|
}
|
|
.latlng-location {
|
text-align: center;
|
|
.latlng-location-chose {
|
display: flex;
|
align-content: center;
|
justify-content: space-around;
|
|
}
|
|
.el-input {
|
width: 85%;
|
}
|
}
|
</style>
|