2023西安数博会CIM演示-【前端】-Web
AdaKing88
2023-08-21 bc03b832caa49bbcd2674fe4cae3701b5059bf95
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<template>
  <div class="WarnListContainer">
    <div class="listWrap">
      <el-table
          height="100%"
          :data="listDatas"
          :header-cell-class-name="headerBg"
          :header-cell-style="{color:'#dce9f6',border:'0',}"
          :cell-style="{color:'#dce9f6',height:'44px'}"
      >
        <el-table-column align="center" prop="type" width="80px" label="类型"/>
        <el-table-column align="center" prop="level" width="80px" label="级别">
          <template slot-scope="scope">
            <span
                :style="{color: scope.row.level === 3 ? '#df3747' : scope.row.level === 2 ? '#FAB353' : '#F2EC13'}">{{
                scope.row.level === 3 ? '重大风险' : scope.row.level === 2 ? '较大风险' : '一般风险'
              }}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" prop="addr" label="位置" :show-overflow-tooltip="true"/>
      </el-table>
      <!--    <table-scroll :listDatas="listDatas" :stepNum="stepNum" :className="className" :tableClass="tableClass">-->
      <!--      <el-table-column :prop="column.fieldName" :show-overflow-tooltip="true" :label="column.name" v-for="column in titleDatas" :key="column.fieldName" :width="column.width" align="center">-->
      <!--        <template slot-scope="scope">-->
      <!--          <template v-if="column.fieldName == 'isStart'">-->
      <!--            <span :style="{color: scope.row[column.fieldName] ? '#00c6ff' : ''}">{{scope.row[column.fieldName] ? '是' : '否'}}</span>-->
      <!--          </template>-->
      <!--          <template v-else-if="column.fieldName == 'level'">-->
      <!--            <span :style="{color: scope.row[column.fieldName] === 3 ? '#df3747' : scope.row[column.fieldName] === 2 ? '#FAB353' : '#F2EC13'}">{{scope.row[column.fieldName] === 3 ? '重大风险' : scope.row[column.fieldName] === 2 ? '较大风险' : '一般风险'}}</span>-->
      <!--          </template>-->
      <!--          <template v-else>-->
      <!--            <span>{{ scope.row[column.fieldName] }}</span>-->
      <!--          </template>-->
      <!--        </template>-->
      <!--      </el-table-column>-->
      <!--    </table-scroll>-->
    </div>
  </div>
</template>
 
<script>
export default {
  name: 'WarnList',
  components: {},
  data() {
    return {
      listDatas: [
        {
          id: 1,
          type: '燃气泄漏',
          level: 3,
          unit: '高新燃气公司',
          des: '气体探测器指标升高',
          time: '2022-12-15 13:32:38',
          addr: '朱雀大街与青松路 交叉口向东500米',
          tel: '15893242146',
          isStart: 1
        },
        {
          id: 2,
          type: '桥梁',
          level: 2,
          unit: '高新市政公司',
          des: '桥梁位移监测数据异常',
          time: '2022-10-21 10:46:37',
          addr: '雁塔西路与长安南路 交叉口向西100米',
          tel: '13946521496',
          isStart: 0
        },
        {
          id: 3,
          type: '供水',
          level: 1,
          unit: '高新供水公司',
          des: '水位采集器指标升高',
          time: '2022-8-22 17:12:46',
          addr: '雁塔西路与长安南路 交叉口向西100米',
          tel: '18634961568',
          isStart: 0
        },
        {
          id: 4,
          type: '燃气泄漏',
          level: 1,
          unit: '高新燃气公司',
          des: '气体探测器指标升高',
          time: '2022-12-15 15:14:21',
          addr: '朱雀大街与青松路 交叉口向东500米',
          tel: '15893242146',
          isStart: 1
        },
        // {
        //   id: 5,
        //   type: '桥梁',
        //   level: 2,
        //   unit: '高新市政公司',
        //   des: '桥梁位移监测数据异常',
        //   time: '2022-10-21 16:40:32',
        //   addr: '雁塔西路与长安南路 交叉口向西100米',
        //   tel: '13946521496',
        //   isStart: 1
        // }, {
        //   id: 6,
        //   type: '供水',
        //   level: 1,
        //   unit: '高新供水公司',
        //   des: '水位采集器指标升高',
        //   time: '2022-8-22 14:05:25',
        //   addr: '雁塔西路与长安南路 交叉口向西100米',
        //   tel: '18634961568',
        //   isStart: 1
        // }, {
        //   id: 7,
        //   type: '燃气泄漏',
        //   level: 2,
        //   unit: '高新燃气公司',
        //   des: '气体探测器指标升高',
        //   time: '2022-12-15 18:39:27',
        //   addr: '朱雀大街与青松路 交叉口向东500米',
        //   tel: '15893242146',
        //   isStart: 1
        // }, {
        //   id: 8,
        //   type: '供水',
        //   level: 1,
        //   unit: '高新供水公司',
        //   des: '水位采集器指标升高',
        //   time: '2022-8-22 18:19:44',
        //   addr: '雁塔西路与长安南路 交叉口向西100米',
        //   tel: '18634961568',
        //   isStart: 0
        // }, {
        //   id: 9,
        //   type: '供水',
        //   level: 3,
        //   unit: '高新供水公司',
        //   des: '水位采集器指标升高',
        //   time: '2022-9-05 18:21:35',
        //   addr: '雁塔西路与长安南路 交叉口向西100米',
        //   tel: '18634961568',
        //   isStart: 1
        // }, {
        //   id: 10,
        //   type: '供水',
        //   level: 1,
        //   unit: '高新供水公司',
        //   des: '水位采集器指标升高',
        //   time: '2022-7-27 08:45:33',
        //   addr: '雁塔西路与长安南路 交叉口向西100米',
        //   tel: '18634961568',
        //   isStart: 1
        // }
      ],
      titleDatas: [{
        name: '类型',
        fieldName: 'type'
      }, {
        name: '预警级别',
        fieldName: 'level'
      }, {
        name: '业务单位',
        fieldName: 'unit'
      }, {
        name: '摘要',
        fieldName: 'des'
      }, {
        name: '预警时间',
        fieldName: 'time'
      }, {
        name: '预警地址',
        fieldName: 'addr'
      }, {
        name: '联系方式',
        fieldName: 'tel'
      }, {
        name: '启动预案',
        fieldName: 'isStart'
      }],
      stepNum: 0.5,
      className: 'setClass',
      tableClass: 'tableAll',
      total: '010'
    }
  },
  computed: {
    totalArr() {
      return this.total.split('')
    }
  },
  created() {
    // setTimeout(() => {
    //   this.total = '005'
    // }, 5000)
  },
  methods: {
    headerBg() {
      return 'headerBg'
    }
  }
}
</script>
 
<style lang="scss" scoped>
.WarnListContainer {
  width: 100%;
  height: 100%;
 
  .listWrap {
    width: 100%;
    height: calc(100% - 20px);
    margin-top: 20px;
    box-sizing: border-box;
    z-index: 999;
  }
 
  ::v-deep .el-table, .el-table__expanded-cell {
    background-color: transparent;
  }
 
  ::v-deep .el-table tr {
    background-color: transparent !important;
  }
 
  ::v-deep .el-table--enable-row-transition .el-table__body td, .el-table .cell {
    border: none;
    background-color: transparent !important;
  }
 
  ::v-deep .el-table::before {
    height: 0px;
  }
}
::v-deep .el-table th.el-table__cell{
  background: transparent;
}
::v-deep .el-table .el-table__cell{
  padding: 0;
}
::v-deep .el-table {
  thead {
    color: #fff;
    font-weight: 500;
    background-image: url(~@/assets/img/lifeline/header_bg.png) !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    & th {
      background-color: transparent;
    }
    & tr {
      background-color: transparent;
    }
  }
}
</style>