| | |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :rowClassName="tableRowClass" |
| | | > |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> |
| | | <span |
| | |
| | | // //清空列表选中 |
| | | // this.onClearSelected() |
| | | // }, |
| | | |
| | | //预警颜色 |
| | | tableRowClass(record, index) { |
| | | if ("1" == record.status || "2" == record.status) { |
| | | if (record.yellowWarningTime < record.currentDateTime && record.currentDateTime < record.redWarningTime) { |
| | | return 'yellow' |
| | | } else if (record.redWarningTime < record.currentDateTime && record.currentDateTime < record.planStartTime) { |
| | | return 'error' |
| | | } else if (record.planStartTime < record.currentDateTime) { |
| | | return 'frozenRowClass' |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | <style > |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | font-weight: bold; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | .yellow { |
| | | color: yellow; |
| | | font-weight: bold; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .ant-table-tbody .red { |
| | | background-color: red !important; |
| | | } |
| | | </style> |