ZhangXianQiang
2024-03-06 c0ec39cf3b2e92d64cd4056938ea6e282fcc021a
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
<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">
            <span>更多</span>
            <i class="el-icon-arrow-right"></i>
          </div>
        </div>
        <div class="table-container">
          <div class="table-content">
            <el-table :data="tableData" :show-header="false" class="data-table">
              <el-table-column>
                <template slot-scope="scope">
                  <p>{{ scope.row.name }}</p>
                  <p>{{ scope.row.date }}</p>
                </template>
              </el-table-column>
              <el-table-column align="center" width="80px">
 
                <template slot-scope="scope">
                  <div class="more-info">
                    <span>详情</span>
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
    </el-card>
  </div>
</template>
 
<script>
export default {
  name: 'DataCheck',
 
  data() {
    return {
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄',
        num: 111,
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄',
        num: 111,
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄',
        num: 111,
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄',
        num: 111,
      },
      {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄',
        num: 111,
      },
      {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄',
        num: 111,
      }
      ]
    }
  }
}
</script>
 
<style lang="scss" scoped>
.data-table-container {
  height: 420px;
 
  .data-card {
    height: 100%;
 
    .card-content {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
    }
  }
}
 
.table-container {
  position: relative;
  flex: 1;
 
  .table-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow-y: scroll;
  }
}
 
.title-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
 
  .more-button {
    cursor: pointer;
    font-size: 16px;
    padding: 0 10px;
  }
}
 
.more-info {
  cursor: pointer;
  font-size: 16px;
  padding: 0 10px;
}
 
.data-table {
  width: 100%;
}
 
::v-deep .data-table>>>.el-table__row>td {
  /* 去除表格线 */
  border: none;
}
 
::v-deep .data-table th {
  border: none;
}
 
::v-deep .data-table td,
::v-deep .data-table th.is-leaf {
  border: none;
}
 
// 表格最外边框
::v-deep .el-table--border,
::v-deep .el-table--group {
  border: none;
 
}
 
::v-deep .el-table--border::after,
::v-deep .el-table--group::after,
::v-deep .el-table::before {
  background-color: transparent;
}
</style>