fuliqi
2024-12-12 89373b8431f8bf4b88288b1dd9de342aab8c468f
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
<template>
  <div class="data-table-container">
 
    <el-card class="data-card" :body-style="{ height: '100%' }">
      <div class="card-content">
        <div class="title-container">
          <h1>运维到期预警</h1>
          <div class="more-button" @click="$router.push({ path: '/point-manage' })">
            <span>更多</span>
            <i class="el-icon-arrow-right"></i>
          </div>
        </div>
 
        <el-table :data="tableData" height="400">
          <el-table-column prop="pointName" label="点位信息" align="center" show-overflow-tooltip>
          </el-table-column>
          <el-table-column prop="remark" label="运维单位" align="center" show-overflow-tooltip>
          </el-table-column>
          <el-table-column prop="startTime" label="运维开始时间" align="center">
          </el-table-column>
          <el-table-column prop="endTime" label="运维截止时间" align="center">
          </el-table-column>
          <el-table-column prop="status" label="状态" align="center">
            <template slot-scope="scope">
              <el-tag type="warning" disable-transitions v-if="scope.row.status">{{ scope.row.status }}</el-tag>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
</template>
 
<script>
 
import { ywPoint } from "@/api/platform/home";
export default {
  name: 'DataTable',
  data() {
    return {
      tableData: []
    }
  },
  mounted() {
    ywPoint().then(res => {
      this.tableData = res.data;
    })
  }
}
</script>
 
<style lang="scss" scoped>
.data-table-container {
  height: 450px;
  margin-bottom: 20px;
 
  .data-card {
    height: 100%;
 
    .card-content {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
    }
  }
}
 
.title-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
 
  .more-button {
    cursor: pointer;
    font-size: 16px;
    padding: 0 10px;
  }
}
</style>