| | |
| | | </div> |
| | | <div class="table" v-show="!showData"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 300px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | :page="page" @pagination="pagination" :row-class-name="tableRowClassName"></lims-table> |
| | | </div> |
| | | <el-dialog :title="isUp ? '设备详情' : '档案修订'" :visible.sync="dialogVisible" width="70%" top="5vh" |
| | | :before-close="handleClose"> |
| | |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | const today = new Date(); |
| | | const targetDate = new Date(row.activationDate); |
| | | const fiveDaysBeforeTarget = new Date(targetDate); |
| | | // 计算前五天的日期 |
| | | fiveDaysBeforeTarget.setDate(targetDate.getDate() - 5); |
| | | // 比较时需要确保比较的是完整的日期时间,包含时分秒 |
| | | if (today > fiveDaysBeforeTarget) { |
| | | return 'red-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |