ke_junjie
2025-06-04 bb6e2230bb8ded3c5546bc4e4c282ee343754475
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
<template>
  <div id="statisticstable" class="scrollCss" :key="number">
    <el-table
      :data="tableData"
      class="borderR8"
      element-loading-text="拼命加载中"
      element-loading-spinner="el-icon-loading"
      highlight-current-row
      stripe
      height="100%"
      style="height: 100% !important"
      :header-cell-style="headercellstyle"
    >
      <eltablecolumn v-for="(item, index) in containHead" :itemcolumn="item" :key="index" />
    </el-table>
  </div>
</template>
 
<script>
import eltablecolumn from './eltablecolumn.vue';
export default {
  data() {
    return {
      number: Math.random() * 100
    };
  },
  props: {
    containHead: {
      type: Array,
      default: () => []
    },
    tableData: {
      type: Array,
      default: () => []
    }
  },
  components: { eltablecolumn },
  methods: {
    headercellstyle({ row, column, rowIndex, columnIndex }) {
      // if (rowIndex == 0 && columnIndex == 1) {
      //   return 'color:red';
      // }
    }
  }
};
</script>
<style lang="scss" scoped>
#statisticstable {
  position: relative;
  z-index: 6;
  height: 100%;
  .widthscope {
    width: 200px;
  }
  .elbuttonsize {
    font-size: 0.8rem;
  }
  .set {
    color: #0465a8;
    cursor: pointer;
    display: inline-block;
    margin-left: 20px;
  }
  .modal-title {
    background-color: #f0f9eb;
    color: #67c23a;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 4px;
  }
  .modal-item {
    border: 1px solid #f8f8f8;
    padding: 4px 10px;
    background-color: #f3f3f3;
    font-size: 14px;
  }
  .draggable-main {
    margin: 0;
    padding: 0;
    cursor: pointer;
    .drag {
      border: 1px dotted rgb(44, 104, 163);
      background-color: #409eff;
    }
 
    .chosen {
      background-color: #409eff;
      color: #fff;
    }
 
    .ghost {
      background-color: #409eff;
    }
  }
  ::v-deep {
    .el-table__fixed-right {
      right: 1px !important;
    }
    .el-table--border td {
      // border-right: none !important;
    }
  }
  ::v-deep .el-table {
    // height: calc(100% - 35px) !important;
  }
 
  ::v-deep .el-button + .el-button {
    margin-left: 5px;
  }
  ::v-deep .el-table__empty-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  ::v-deep .el-table td,
  .el-table th {
    padding: 4px 0;
  }
}
</style>