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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
| <template>
| <div class="pipeline-file map-background" v-show="pipelineFile">
| <el-row style="margin: 5px 15px">
| <el-form ref="form" :model="form" label-width="80px">
| <el-col :span="12">
| <el-form-item label="管线名称">
| <el-input v-model="form.pipeName">
| <el-button style="padding-right:10px;" slot="suffix" type="text">
| <img src="../../../../../public/assets/images/map/emergency/search.png" alt="">
| </el-button>
| </el-input>
| </el-form-item>
| </el-col>
| <el-col :span="12">
| <el-form-item label="管段编码">
| <el-input v-model="form.pipeCode">
| <el-button style="padding-right:10px;" slot="suffix" type="text">
| <img src="../../../../../public/assets/images/map/emergency/search.png" alt="">
| </el-button>
| </el-input>
| </el-form-item>
| </el-col>
| </el-form>
| </el-row>
| <div v-for="(item,index) in folderList" :key="index">
| <div class="fold-box">
| <img :src="item.fold" alt="" @click="fileAccord(item)"/>
| <span @click="fileAccord(item)">{{ item.introduce }}</span>
| </div>
| <div v-for="(ite,ind) in item.items" :key="ind" v-show="item.fileCode" class="file">
| <!-- <el-col :span="12">-->
| <div class="file-left">
| <img :src="ite.file" alt="" @click="codeAccord(ite)"/>
| <span @click="codeAccord(ite)">{{ite.introduce}}</span>
| </div>
| <div class="file-right">
| <span v-show="ite.fileCode">{{item.code}}</span>
| </div>
| <!-- </el-col>-->
| <!-- <el-col :span="12">-->
| <!-- </el-col>-->
| </div>
| </div>
| </div>
| </template>
|
| <script>
| import eventBus from '../../../../eventBus'
| import foldPng from '../../../../../public/assets/images/map/emergency/fold.png'
| import filePng from '../../../../../public/assets/images/map/emergency/file.png'
|
| export default {
| name: 'PipelineFile',
| data () {
| return {
| pipelineFile: false,
| form: {
| pipeName: '',
| pipeCode: ''
| },
| folderList: [
| {
| fold: foldPng,
| introduce: '生产一区',
| code: '400001',
| fileCode: false,
| items: [
| {
| file: filePng,
| introduce: '管线A',
| code: '1000001',
| fileCode: false
| },
| {
| file: filePng,
| introduce: '管线B',
| code: '2000002',
| fileCode: false
| }
| ]
| },
| {
| fold: foldPng,
| introduce: '生产二区',
| code: '400002',
| fileCode: false,
| items: [
| {
| file: filePng,
| introduce: '管线C',
| code: '3000003',
| fileCode: false
| },
| {
| file: filePng,
| introduce: '管线D',
| code: '4000004',
| fileCode: false
| }
| ]
| }
| ]
| }
| },
| mounted () {
| eventBus.$on('pipelineFile-choose', (obj) => {
| // console.log(obj)
| this.pipelineFile = obj
| })
| },
| methods: {
| fileAccord (item) {
| item.fileCode = !item.fileCode
| },
| codeAccord (item) {
| item.fileCode = !item.fileCode
| }
| }
| }
| </script>
|
| <style lang="less" scoped>
| .pipeline-file {
| min-width: 1.94532rem;
| max-width: 1.94532rem;
| }
|
| .file {
| display: flex;
| align-items: center;
| justify-content: space-evenly;
| }
| </style>
|
|