| | |
| | | //legend-liu数据 |
| | | datalistLIU:[ |
| | | { |
| | | color: 'rgb(236, 83, 37)', |
| | | color: "#DFDFDF", |
| | | text: '掉线' |
| | | }, |
| | | { |
| | | color: 'rgb(49, 49, 49)', |
| | | text: '在线' |
| | | color: "#29C093", |
| | | text: '正常' |
| | | }, |
| | | { |
| | | color: "#F34A4A", |
| | | text: '预警' |
| | | }, |
| | | { |
| | | color: "#F48F57", |
| | | text: '故障' |
| | | } |
| | | ], |
| | | ], |
| | | form: {}, |
| | | query: {}, |
| | | showMap: false, |
| | |
| | | } |
| | | } |
| | | |
| | | data.records.sort((a, b) => { |
| | | return a.dxzt - b.dxzt; |
| | | }); |
| | | // data.records.sort((a, b) => { |
| | | // return a.dxzt - b.dxzt; |
| | | // }); |
| | | |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, rowStyle({row, column, rowIndex}) { |
| | | if (row.heartbeat != null && row.heartbeat != "") { |
| | | var date = new Date(row.heartbeat).getTime(); |
| | | var Dqdate = new Date().getTime(); |
| | | if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) { |
| | | // if (row.heartbeat != null && row.heartbeat != "") { |
| | | // var date = new Date(row.heartbeat).getTime(); |
| | | // var Dqdate = new Date().getTime(); |
| | | // if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) { |
| | | // return { |
| | | // color: "#fe1515" |
| | | // }; |
| | | // } |
| | | |
| | | // } else if (row.heartbeat == "") { |
| | | // return { |
| | | // color: "#fe1515" |
| | | // }; |
| | | // } |
| | | |
| | | if(row.dtype!=null && row.dtype!=""){ |
| | | if(row.dtype=='0'){ |
| | | return { |
| | | color: "#fe1515" |
| | | color: "#DFDFDF" |
| | | }; |
| | | } |
| | | |
| | | } else if (row.heartbeat == "") { |
| | | return { |
| | | color: "#fe1515" |
| | | }; |
| | | if(row.dtype=='1'){ |
| | | return { |
| | | color: "#29C093" |
| | | }; |
| | | } |
| | | if(row.dtype=='2'){ |
| | | return { |
| | | color: "#F34A4A" |
| | | }; |
| | | } |
| | | if(row.dtype=='3'){ |
| | | return { |
| | | color: "#F48F57" |
| | | }; |
| | | } |
| | | } |
| | | }, |
| | | handleManage(row) { |