|
@@ -1,152 +1,123 @@
|
|
|
-<template>
|
|
|
- <div>
|
|
|
- <div class="left_004">
|
|
|
- <div class="left_003" style="font-weight: 800;font-size: 20px;">区域隐患</div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <table width="90%" border="1" class="t1">
|
|
|
- <thead>
|
|
|
- <th width="20%">隐患名称</th>
|
|
|
- <th width="20%">发生时间</th>
|
|
|
- <th width="20%">级别</th>
|
|
|
- <th width="20%">处理结果</th>
|
|
|
- <th width="20%">完成时间</th>
|
|
|
- </thead>
|
|
|
- <tr v-for="(item,index) in tableData" :key="index">
|
|
|
- <td>{{ item.description }}</td>
|
|
|
- <td>{{item.addTime}}</td>
|
|
|
- <td>{{item.level}}</td>
|
|
|
- <td>{{item.handleState?'已处理':'未处理'}}</td>
|
|
|
- <td>{{item.handleTime}}</td>
|
|
|
- </tr>
|
|
|
-
|
|
|
- </table>
|
|
|
-
|
|
|
+ <template>
|
|
|
+ <!-- 采煤工作面设备 的 故障记录 -->
|
|
|
+ <div class="table-wrapper main">
|
|
|
+ <span class="title">区域隐患</span>
|
|
|
+ <el-table :data="tableData">
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="隐患名称"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="time"
|
|
|
+ label="发生时间"
|
|
|
+ width="150"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="rank"
|
|
|
+ label="级别"
|
|
|
+ width="70"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="result"
|
|
|
+ label="处理结果"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
export default {
|
|
|
- name: "rightTable",
|
|
|
data() {
|
|
|
return {
|
|
|
- viewData: {
|
|
|
- areaId: '',// string 区域ID
|
|
|
- description: '',// string 隐患描述
|
|
|
- level: '',// string 隐患级别
|
|
|
- addTime: '',// string 添加时间
|
|
|
- addUserName: '',// string 添加人
|
|
|
- handleState: '',// boolean 处理状态
|
|
|
- handleTime: '',//string 处理时间
|
|
|
- handleUserName: '',// string 处理人
|
|
|
- handleMethod: '',//string 处理方式
|
|
|
- },
|
|
|
- tableData: [],
|
|
|
- statusValue: 'a',
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- // this.getTableData();
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ name: "瓦斯报警",
|
|
|
+ time: "2021-1-14 17:04:36",
|
|
|
+ rank:"一级",
|
|
|
+ result:'未处理'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "设备过热",
|
|
|
+ time: "2021-1-14 17:12:26",
|
|
|
+ rank:"二级",
|
|
|
+ result:'未处理'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "烟雾报警",
|
|
|
+ time: "2021-1-14 17:23:11",
|
|
|
+ rank:"二级",
|
|
|
+ result:'未处理'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
},
|
|
|
methods: {
|
|
|
- //初始化数据
|
|
|
- getTableData() {
|
|
|
- let _data = {
|
|
|
- areaId: sessionStorage.getItem("areaId"),
|
|
|
- handleState: true
|
|
|
- };
|
|
|
- this.$get("index/areas/"+sessionStorage.getItem('areaId')+"/risks", _data).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.tableData = res.data || [];
|
|
|
- } else {
|
|
|
- console.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- parentHandleclick(areaId){
|
|
|
- let _data = {
|
|
|
- areaId: areaId,
|
|
|
- handleState: true
|
|
|
- };
|
|
|
- this.$get("index/areas/"+areaId+"/risks", _data).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.tableData = res.data || [];
|
|
|
- } else {
|
|
|
- console.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- changeProduct(event) {
|
|
|
- this.statusValue = event.target.value; //获取测点ID,即option对应的ID值
|
|
|
- let _data = {
|
|
|
- areaId: sessionStorage.getItem("areaId"),
|
|
|
- handleState: event.target.value
|
|
|
- };
|
|
|
- this.$get("index/areas/"+sessionStorage.getItem('areaId')+"/risks", _data).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.tableData = res.data || [];
|
|
|
- } else {
|
|
|
- console.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
+ dataChange(tableData) {
|
|
|
+ this.tableData = tableData;
|
|
|
}
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
-
|
|
|
-<style scoped>
|
|
|
-.left_003 {
|
|
|
- text-align: left;
|
|
|
- font-size: 16px;
|
|
|
- padding: 10px;
|
|
|
+<style lang='scss' scoped>
|
|
|
+.main {
|
|
|
+ padding: 6px;
|
|
|
+ // border:3px solid #96c2f1;
|
|
|
+ height: 400px;
|
|
|
+ // margin-top: -20px;
|
|
|
+ padding-left: 40px;
|
|
|
+ background: url(../../assets/img/tunneling/dataBg.png) no-repeat;
|
|
|
+ background-size: 100%;
|
|
|
}
|
|
|
-
|
|
|
-.left_004 {
|
|
|
- display: grid;
|
|
|
- grid-template-columns: 1fr 1fr;
|
|
|
- border-bottom: white 1px solid;
|
|
|
- margin-bottom: 15px;
|
|
|
- color: #4ADEFE;
|
|
|
+.table-wrapper {
|
|
|
+ height: 80%;
|
|
|
+ // margin-top: 10px;
|
|
|
+ ::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
|
|
|
+ background-color: rgba(9, 12, 14, 0.2);
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+} /* 删除表格下横线 */
|
|
|
+.table-wrapper ::v-deep .el-table::before {
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 0px;
|
|
|
+ border: none;
|
|
|
}
|
|
|
-
|
|
|
-table {
|
|
|
- table-layout: fixed;
|
|
|
- empty-cells: show;
|
|
|
- border-collapse: collapse;
|
|
|
- margin: 0 auto;
|
|
|
+.table-wrapper ::v-deep .el-table,
|
|
|
+.el-table__expanded-cell {
|
|
|
+ background-color: transparent;
|
|
|
+ border: none;
|
|
|
}
|
|
|
-
|
|
|
-table.hovertable tr {
|
|
|
- background-color: #d4e3e5;
|
|
|
+.table-wrapper ::v-deep .el-table tr {
|
|
|
+ background-color: transparent !important;
|
|
|
+ border: none;
|
|
|
}
|
|
|
-
|
|
|
-td {
|
|
|
- border: 0px;
|
|
|
- height: 30px;
|
|
|
- text-align: center;
|
|
|
+.table-wrapper ::v-deep .el-table th {
|
|
|
+ background-color: transparent !important;
|
|
|
+ border: none;
|
|
|
+ color: #4ADEFE;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
-
|
|
|
-table.t1 {
|
|
|
- color: white;
|
|
|
+.table-wrapper ::v-deep .el-table td,
|
|
|
+.el-table th.is-leaf {
|
|
|
+ background-color: transparent !important;
|
|
|
+ color: #F3DB5C;
|
|
|
+ font-size: 13px;
|
|
|
+ border: none;
|
|
|
}
|
|
|
-
|
|
|
-table.t1 th {
|
|
|
- border: 0px;
|
|
|
- height: 30px;
|
|
|
- padding: 0 2px 0;
|
|
|
- font-size: 16px;
|
|
|
+.title {
|
|
|
+ border-bottom: #5ddcf8 1px solid;
|
|
|
+ height: 40px;
|
|
|
+ width: 100%;;
|
|
|
+ font-size: 18px;
|
|
|
+ line-height: 2;
|
|
|
+ padding: 5px;
|
|
|
font-weight: 500;
|
|
|
+ color: #4ADEFE;
|
|
|
}
|
|
|
-
|
|
|
-table.t1 td, table.t1 th {
|
|
|
- border: 0px;
|
|
|
- padding: 0 1em 0;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-table.t1 tr.a1 {
|
|
|
- background-color: #f5fafe;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
</style>
|