|
|
@ -103,16 +103,13 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou |
|
|
|
setXData([bigD, (bigD - bigD / 5), (bigD - bigD * 2 / 5), (bigD - bigD * 3 / 5), (bigD - bigD * 4 / 5), 0, (bigD - bigD * 4 / 5), (bigD - bigD * 3 / 5), (bigD - bigD * 2 / 5), (bigD - bigD / 5), bigD]) |
|
|
|
} |
|
|
|
setBiggest(bigD) |
|
|
|
if (mockData && mockData.length > 3 && mockData.length < 21) { |
|
|
|
const newArray = mockData.slice(3) |
|
|
|
setAlarmData(newArray) |
|
|
|
} |
|
|
|
if (mockData && mockData.length > 21) { |
|
|
|
//数据大于20的话,取前20 |
|
|
|
const newArray = mockData.slice(0, 20) |
|
|
|
console.log('newArray',newArray) |
|
|
|
setAlarmData(newArray) |
|
|
|
|
|
|
|
}else{ |
|
|
|
setAlarmData(mockData) |
|
|
|
} |
|
|
|
}, [mockData]) |
|
|
|
|
|
|
|