1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
| <template>
| <div id="popup" class="s-map-popup-panel" style="min-width: 280px;max-width: 280px;padding: 0 10px">
| <el-tabs type="card" v-model="tabIndex" @tab-click="handleClick">
| <el-tab-pane
| :key="index"
| v-for="(item,index) in datas"
| :label="item.title"
| :name="index.toString()"
| >
| <el-row v-for="(item,key) in item.content" :key="key">
| <el-col :span="12"><B>{{key}}:</B></el-col>
| <el-col :span="12">{{item}}</el-col>
| </el-row>
| <el-table v-if="item.tableList"
| :data="item.tableList"
| style="width: 100%">
| <el-table-column
| prop="pipesegcode"
| label="管段编码">
| </el-table-column>
| <el-table-column
| prop="startpointdepth"
| label="起点埋深(m)">
| </el-table-column>
| <el-table-column
| prop="startpointz"
| label="起点高程(m)">
| </el-table-column>
| </el-table>
| </el-tab-pane>
| </el-tabs>
| </div>
| </template>
|
| <script>
| // import '@/assets/css/map/map-popup.scss'
|
| import { highlight } from '../../components/helpers/LocateHelper'
|
| export default {
| name: 'Popup',
| props: ['datas'],
| data () {
| return {
| tabsValue: '',
| tabIndex: 0,
| isShow: false,
| properties: {}
| }
| },
| computed: {
| },
| methods: {
| filter (content) {
| var obj = {}
| for (const key in content) {
| if (this.props[key]) {
| obj[this.props[key]] = content[key]
| }
| }
| // console.log(obj)
| return obj
| },
| setShow () {
| // this.style.display='auto'
| this.isShow = true
| },
| handleClick (tab, event) {
| const data = this.datas[this.tabIndex]
| const feature = data.feature
| highlight(feature)
| }
| },
| watch: {
| datas (newVal) {
| if (newVal != null) {
| this.tabsValue = newVal[0].name
| }
| }
| }
| }
| </script>
|
| <style lang="less" >
| @import '../../assets/css/map/map-popup.less';
| #popup{
| .el-tabs__content{
| max-height: 240px;
| overflow-y: scroll;
| }
| }
| </style>
|
|