<template>
|
<div class="side-box map-background" v-show="location">
|
<el-tabs v-model="activeName">
|
<el-tab-pane label="点击定位" name="first">
|
<div class="click-location">
|
<el-input v-model="clickLocation"></el-input>
|
<el-button type="primary" @click="confirm">确认</el-button>
|
</div>
|
</el-tab-pane>
|
<el-tab-pane label="管段定位" name="second">
|
<div class="place">
|
<div class="place-top">
|
<!-- <div class="place-left">-->
|
<el-form :model="linePos" label-width="90px">
|
<el-row class="elrow">
|
<el-col :span="16">
|
<el-form-item label="管线名称:">
|
<el-input v-model="linePos.lineName"></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8" style="vertical-align: middle !important;">
|
<el-button type="primary" size="mini" @click="fileChoose">...</el-button>
|
<el-button type="primary" size="mini" @click="tableAccod">搜索</el-button>
|
</el-col>
|
</el-row>
|
<el-form-item label="附属设施:">
|
<el-select v-model="linePos.affFac">
|
<el-option
|
v-for="item in linePos.affFacList"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-form>
|
</div>
|
<div class="place-bottom">
|
<el-button type="primary" @click="confirm">确认</el-button>
|
</div>
|
</div>
|
</el-tab-pane>
|
<el-tab-pane label="经纬度定位" name="third">
|
<div class="place">
|
<div class="place-top">
|
<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" size="small">搜索</el-button>
|
</div>
|
</div>
|
<div class="place-bottom">
|
<el-button type="primary" @click="confirm">确认</el-button>
|
</div>
|
</div>
|
</el-tab-pane>
|
</el-tabs>
|
<div class="pipe-table" v-show="pipeTable">
|
<el-table
|
:data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
|
border
|
style="width: 100%">
|
<el-table-column
|
prop="number"
|
label="序号">
|
</el-table-column>
|
<el-table-column
|
prop="seares"
|
label="搜索结果">
|
</el-table-column>
|
<el-table-column
|
prop="restype"
|
label="结果类型">
|
</el-table-column>
|
</el-table>
|
<!-- <el-card class="footer-page" v-if="total >= 0">-->
|
<el-pagination
|
mini
|
@size-change="handleSizeChange"
|
@current-change="handlePage"
|
:page-size=pageSize
|
:current-page="currentPage"
|
layout="prev, pager, next"
|
:total=total
|
class="warnPagination"
|
>
|
</el-pagination>
|
<!-- </el-card>-->
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import eventBus from '../../../../eventBus'
|
export default {
|
name: 'PositionChange',
|
props: ['location'],
|
data () {
|
return {
|
// 接收数据 控制页面展示/隐藏
|
pipelineFile: false,
|
// active tab切换
|
activeName: 'first',
|
// 管段查询table
|
pipeTable: false,
|
// 分页功能
|
pageSize: 3,
|
total: 0,
|
currentPage: 1,
|
// 点击定位绑定数据
|
clickLocation: '',
|
// 经纬度定位
|
LongLatPos: {
|
longPos: '',
|
latPos: ''
|
},
|
// 管段定位
|
linePos: {
|
lineName: '',
|
affFac: '',
|
affFacList: [
|
{
|
label: '阀门A',
|
value: '1'
|
},
|
{
|
label: '阀门B',
|
value: '2'
|
}
|
]
|
},
|
fileChoChange: false,
|
tableData: [
|
{
|
number: 1,
|
seares: '20路雨水管线',
|
restype: '管线名称'
|
}, {
|
number: 2,
|
seares: '20路雨水管线',
|
restype: '管线名称'
|
}, {
|
number: 3,
|
seares: '100020',
|
restype: '管段编码'
|
},
|
{
|
number: 4,
|
seares: '20路雨水管线',
|
restype: '管线名称'
|
}, {
|
number: 5,
|
seares: '20路雨水管线',
|
restype: '管线名称'
|
}, {
|
number: 6,
|
seares: '100020',
|
restype: '管段编码'
|
}
|
]
|
}
|
},
|
mounted () {
|
// 接收规定 每次重新选择定位 都指定 选择第一个开始
|
eventBus.$on('tab-change', (obj) => {
|
this.activeName = obj
|
})
|
},
|
methods: {
|
// 分页功能 currentPage 改变时会触发
|
handlePage (val) {
|
// console.log(val)
|
this.currentPage = val
|
},
|
// 分页功能 pageSize 改变时会触发
|
handleSizeChange (val) {
|
// console.log(val)
|
this.pageSize = val
|
},
|
// 点击文件选择 显示第三级页面 进行管线/段选择
|
fileChoose () {
|
this.fileChoChange = !this.fileChoChange
|
eventBus.$emit('pipelineFile-choose', this.fileChoChange)
|
},
|
// 点击确认按钮事件
|
confirm () {
|
// 子组件通过事件 传递数据 控制自身显示隐藏
|
this.$emit('localCation', false)
|
// 通过bus 控制三级附属弹框的隐藏
|
eventBus.$emit('pipelineFile-choose', false)
|
},
|
// 管段查询表格展示
|
tableAccod () {
|
this.pipeTable = !this.pipeTable
|
}
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
/deep/
|
.warnPagination {
|
.btn-quicknext, .btn-quickprev {
|
color: #e4e8f1 !important;
|
background-color: transparent;
|
// border: 1px solid #25AECD;
|
border-left: 1px solid #25AECD;
|
border-bottom: 1px solid #25AECD;
|
border-top: 1px solid #25AECD;
|
color: #e4e8f1;
|
}
|
|
.el-pager li {
|
color: #e4e8f1;
|
background: transparent;
|
// border: 1px solid #25AECD;
|
border-left: 1px solid #25AECD;
|
border-bottom: 1px solid #25AECD;
|
border-top: 1px solid #25AECD;
|
}
|
|
.el-pager li.active {
|
border-color: #25AECD;
|
background-color: rgba(38, 222, 253, 0.3);
|
color: #e4e8f1;
|
}
|
|
.el-pager li:hover {
|
border-color: #25AECD;
|
background-color: rgba(38, 222, 253, 0.3);
|
color: #34e0ff;
|
}
|
|
.btn-prev {
|
background-color: transparent;
|
// border: 1px solid #25AECD;
|
border-left: 1px solid #25AECD;
|
border-bottom: 1px solid #25AECD;
|
border-top: 1px solid #25AECD;
|
color: #e4e8f1;
|
}
|
|
.btn-next {
|
background-color: transparent;
|
border: 1px solid #25AECD;
|
color: #e4e8f1;
|
}
|
}
|
|
.elrow {
|
display: flex;
|
align-items: center;
|
justify-content: space-around;
|
}
|
|
.side-box {
|
min-width: 1.94532rem;
|
max-width: 1.94532rem;
|
}
|
|
.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>
|