| | |
| | | :label="item.label" |
| | | :width="item.width" |
| | | :min-width="item.min" |
| | | show-overflow-tooltip="true" |
| | | sortable |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span v-if="item.price">{{ "¥" + number_format(scope.row[item.prop], 2, ".", ",") }}</span> |
| | | <span v-else-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</span> |
| | | <span v-else>{{ scope.row[item.prop] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | getSummaries(param) { |
| | | if (this.showSummary.show) { |
| | | const { columns, data } = param |
| | | console.log(param) |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | if (index === this.showSummary.mergeNumber) { |
| | |
| | | return sums |
| | | } |
| | | }, |
| | | //定义number_format方法 |
| | | // 数字换行为金额显示格式 |
| | | number_format(number, decimals, dec_point, thousands_sep) { |
| | | decimals = 2 //这里默认设置保留两位小数,也可以注释这句采用传入的参数 |
| | | /* |
| | |
| | | margin-top: 20px; |
| | | margin-right: 10px; |
| | | margin-bottom: 40px; |
| | | .blue { |
| | | padding: 10px; |
| | | color: #fff; |
| | | background-color: blue; |
| | | border-radius: 4px; |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-table__footer-wrapper tbody td.el-table__cell { |