| | |
| | | :data="tableList.tableInfomation" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | :height="'calc(100% - 0px)'" |
| | | :max-height="tableList.maxHeight" |
| | | :lazy="tableList.lazy" |
| | | :show-summary="showSummary.show" |
| | | :summary-method="getSummaries" |
| | | :span-method="arraySpanMethod" |
| | | size="mini" |
| | | @selection-change="handleSelectionChange" |
| | | :header-cell-style="{ background: '#ECF4FF', color: '#666' }" |
| | | :header-cell-style="{ background: '#f1f3f8', color: '#000009' , 'font-size': '14px'}" |
| | | :highlight-current-row="tableList.highlight" |
| | | :row-class-name="tableRowClassName" |
| | | @row-click="tableRowClick" |
| | | :row-key="tableList.key" |
| | | :default-expand-all="tableList.isDefaultExpandAll" |
| | | :tree-props="{ children: 'child', hasChildren: 'hasChildren' }" |
| | | > |
| | | <el-table-column v-if="tableList.selectBox" type="selection" width="40"> </el-table-column> |
| | | <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column> |
| | | <el-table-column |
| | | <el-table-column align="center" v-if="tableList.selectBox" type="selection" width="40"> </el-table-column> |
| | | <el-table-column align="center" v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column> |
| | | <el-table-column align="center" |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | | :prop="item.prop" |
| | |
| | | totalName: "本页总计" |
| | | } |
| | | } |
| | | }, |
| | | // 选中的样式 |
| | | selectClassRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | computed: {}, |
| | | mounted() {}, |
| | | methods: { |
| | | tableRowClick(row) { |
| | | console.log(row) |
| | | this.$emit("tableRowClick", row) |
| | | }, |
| | | handleReserve(row) { |
| | | return row._id ? row._id : row.id |
| | | }, |
| | |
| | | // 公共详情 |
| | | selCommonClick(row) { |
| | | this.$emit("selCommonClick", row) |
| | | }, |
| | | // 单选行相关 |
| | | tableRowClassName({ row }) { |
| | | if (Object.keys(this.selectClassRow).length > 0) { |
| | | if (row.id == this.selectClassRow.id) { |
| | | return "onSelect" |
| | | } |
| | | } |
| | | this.$emit("tableRowClassName", row) |
| | | }, |
| | | tableRowClick(row) { |
| | | this.$emit("tableRowClick", row) |
| | | } |
| | | } |
| | | } |
| | |
| | | <style lang="scss" scoped> |
| | | .table-view { |
| | | // margin-top: 20px; |
| | | margin-right: 10px; |
| | | // margin-right: 10px; |
| | | // margin-bottom: 40px; |
| | | height: 100%; |
| | | .blue { |
| | | width: 70px; |
| | | text-align: center; |
| | |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-table__footer-wrapper { |
| | | tbody td.el-table__cell{ |
| | | .el-table__footer-wrapper { |
| | | tbody td.el-table__cell { |
| | | background-color: #fff; |
| | | font-weight: bold; |
| | | } |
| | | // .cell{ |
| | | // &:nth-last-child(3){ |
| | | // text-align:right; |
| | | // } |
| | | // } |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-table .cell { |
| | | font-size: 12px; |
| | | line-height: 17px; |
| | | font-family: PingFangSC; |
| | | color: rgba(0, 0, 0, 0.9); |
| | | .el-button--text { |
| | | width: auto; |
| | | height: auto; |
| | | font-family: PingFangSC-Medium, sans-serif; |
| | | } |
| | | } |
| | | ::v-deep .el-table .el-table__cell { |
| | | padding: 6px 0 !important; |
| | | height: 35px; |
| | | text-align: center; |
| | | } |
| | | |
| | | ::v-deep{ |
| | | .el-table .cell .el-button--text.el-button--small{ |
| | | padding: 4px 0; |
| | | } |
| | | } |
| | | </style> |