派生自 wuyushui/SewerAndRainNetwork

徐旺旺
2021-05-30 a312e0dd96d8f7e96fb3341f1a55561b12394405
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<template>
  <el-dialog :visible.sync="isShow" class="res-info-container" title="周边资源信息" :modal="false" v-dialog-drag
           width="400"  >
<el-row>
  <el-col :span="3" style="text-align: center;">
    <el-row v-for="(item,index) in menuList" :key="index">
      <el-button type="primary" size="mini" :class="index===btnActive?'hover':''" @click="menuClickHandle(item,index)">{{ item.name }}</el-button>
    </el-row>
<!--<el-row>    <el-button type="primary" size="mini" @click="menuClickHandle">在线监测</el-button></el-row>-->
<!--<el-row>    <el-button type="primary" size="mini" @click="menuClickHandle">应急资源</el-button></el-row>-->
<!--<el-row>    <el-button type="primary" size="mini" @click="menuClickHandle">周边环境</el-button></el-row>-->
<!--<el-row>   <el-button type="primary" size="mini" @click="menuClickHandle">管道信息</el-button></el-row>-->
  </el-col>
  <el-col :span="21">
<el-row>
  <el-button v-for="(item,index) in subMenuList" :class="index===subBtnActive?'hover':''" :key="item.name" type="primary" size="mini" @click="subMenuClickHandle(item,index)">{{ item.name }}</el-button>
<!--  <el-button type="primary" size="mini" @click="subMenuClickHandle">外排口(1)</el-button>-->
<!--  <el-button type="primary" size="mini" @click="subMenuClickHandle">隔油池(1)</el-button>-->
<!--  <el-button type="primary" size="mini" @click="subMenuClickHandle">节流阀(1)</el-button>-->
<!--  <el-button type="primary" size="mini" @click="subMenuClickHandle">阀门(1)</el-button>-->
<!--  <el-button type="primary" size="mini" @click="subMenuClickHandle">集水池(1)</el-button>-->
<!--  <el-button type="primary" size="mini" @click="subMenuClickHandle">事故水管线(1)</el-button>-->
<!--  <el-button type="primary" size="mini" @click="subMenuClickHandle">雨水管线(1)</el-button>-->
</el-row>
    <el-row>
      <el-table
          :data="currentTableData.data"
          style="width: 100%">
        <el-table-column v-for="item in currentTableData.column"
            :prop="item.prop"
            :label="item.label" :width="item.width" :key="item.label"
            >
        </el-table-column>
 
      </el-table>
    </el-row>
  </el-col>
</el-row>
  </el-dialog>
</template>
 
<script>
import ResInfo from '@components/base-page/enterprise-emergency/event-handling/ResInfo'
export default {
  name: 'ResInfo',
  data () {
    return {
      isShow: false,
      btnActive: 0,
      subBtnActive: 0,
      menuList: ResInfo.data,
      subMenuList: ResInfo.data[0].child,
      tableData: [
        {
          id: 1,
          name: '应急基础',
          child: [{
            name: '内排口',
            column: [{
              label: '序号',
              prop: 'no',
              width: 'auto'
            },
            {
              label: '存放点名称',
              prop: 'name',
              width: 'auto'
            },
            {
              label: '存放点类型',
              prop: 'type',
              width: 'auto'
            },
            {
              label: '负责人',
              prop: 'master',
              width: 'auto'
            },
            {
              label: '联系电话',
              prop: 'phone',
              width: 'auto'
            },
            {
              label: '物资名称(汇总)',
              prop: 'total',
              width: '200'
            },
            {
              label: '距离',
              prop: 'distance',
              width: 'auto'
            }]
          }]
        }
      ],
      currentTableData: {
        column: [
          {
            label: '序号',
            prop: 'no',
            width: 'auto'
          },
          {
            label: '存放点名称',
            prop: 'name',
            width: 'auto'
          },
          {
            label: '存放点类型',
            prop: 'type',
            width: 'auto'
          },
          {
            label: '负责人',
            prop: 'master',
            width: 'auto'
          },
          {
            label: '联系电话',
            prop: 'phone',
            width: 'auto'
          },
          {
            label: '物资名称(汇总)',
            prop: 'total',
            width: '200'
          },
          {
            label: '距离',
            prop: 'distance',
            width: 'auto'
          }],
        data: [
          {
            no: '1',
            name: '金陵时候应急物资存放点',
            type: '库房存放点',
            master: '张三',
            phone: '1333333333',
            total: '清水泵;编织袋;铁镐;铁锹;雨衣;雨鞋;防水手电;探照灯;麻绳',
            distance: '900m'
          }, {
            no: '2',
            name: '金陵时候应急物资存放点',
            type: '库房存放点',
            master: '张三三',
            phone: '1333333333',
            total: '清水泵;编织袋;铁镐;铁锹;雨衣;雨鞋;防水手电;探照灯;麻绳',
            distance: '900m'
          }]
      }
    }
  },
  methods: {
    handleClose (done) {
      this.isShow = false
    },
    setVisible (s) {
      this.isShow = s
    },
    getVisible () {
      return this.isShow
    },
    menuClickHandle (item, index) {
      this.btnActive = index
      this.subBtnActive = 0
      this.subMenuList = item.child
    },
    subMenuClickHandle (subItem, index) {
      this.subBtnActive = index
      this.currentTableData.column = subItem.column
    }
  }
}
</script>
 
<style lang="less">
.res-info-container{
  /deep/ .el-dialog {
    left: 810px;
  }
 
  .el-dialog__header {
    padding: 4px 10px;
  }
 
  .el-dialog__headerbtn {
    top: 10px;
  }
  .hover{
    color: @color-highlight;
    border-color:@color-highlight;
  }
 .el-button:active .el-button--primary.is-active, .el-button--primary:active ,.el-button--primary:focus, .el-button--primary:hover{
    background: @background-color;
    color: @color-highlight;
    border-color:@color-highlight;
  }
}
 
</style>