<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>
|