diff --git a/script/3.1/schema/3.updata_struc_off .sql b/script/3.1/schema/3.updata_struc_off .sql new file mode 100644 index 0000000..8f61563 --- /dev/null +++ b/script/3.1/schema/3.updata_struc_off .sql @@ -0,0 +1,11 @@ + + alter table t_structure_off + add totnum integer; + +comment on column t_structure_off.totnum is '测点总数'; + +alter table t_structure_off + add offnum integer; + +comment on column t_structure_off.offnum is '离线个数'; + diff --git a/web/client/src/sections/projectGroup/containers/bigscreen.jsx b/web/client/src/sections/projectGroup/containers/bigscreen.jsx index 14d5e4b..8790292 100644 --- a/web/client/src/sections/projectGroup/containers/bigscreen.jsx +++ b/web/client/src/sections/projectGroup/containers/bigscreen.jsx @@ -94,12 +94,17 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou return combinedMax; } return max; - }, -Infinity) - const bigD = Math.ceil(maxCombinedValue / 50) * 50 - 50, 40, 30, 20, 10, 0 - 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) - }, []) + }, -Infinity) + console.log('setAlarmData4',maxCombinedValue) + const bigD= Math.ceil(maxCombinedValue/50)*50 + if(bigD==0){ + setXData([5,4,3,2,1,0,1,2,3,4,5])//最大值为0,默认横坐标 + }else{ + 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) + },[]) + // const mockData=[ // {id: 1,name: '测试结构物测试结构物',alarmCount: 200,dealAlarmCount: 23}, // {id: 2,name: '测试结构物2',alarmCount: 300,dealAlarmCount: 22}, @@ -180,6 +185,7 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou + function formatDate (date) { var year = date.getFullYear(); var month = String(date.getMonth() + 1).padStart(2, '0'); @@ -241,6 +247,8 @@ const Bigscreen = ({ dispatch, actions, user, match, history, clientHeight, grou }, [proportion]); +console.log('setAlarmData3',alarmData) + console.log(groupStatisticOnline); return (