Browse Source

修改异常率推送配置单位为小时

dev
CODE 2 years ago
parent
commit
9a4f8e746c
  1. 11
      web/client/src/sections/service/components/pushModal.jsx

11
web/client/src/sections/service/components/pushModal.jsx

@ -130,9 +130,16 @@ function pushModal (props) {
function caution (tactics, interval, deviceProportion, data) {
let regu = /^[0-9]*[1-9][0-9]*$/;
let title = tactics == 'immediately' ? '即时' : tactics == 'continue' ? '持续时长' : '异常率'
if (!regu.test(interval) || (tactics == 'abnormal_rate' && interval > 720) || interval > 1440) {
let isAbnormal = tactics == 'abnormal_rate'
if (!regu.test(interval)) {
Notification.error({
content: title + (interval ? `推送时间不能大于${tactics == 'abnormal_rate' ? 720 : 1440}分钟` : '推送时间应为正整数'),
content: title + '推送时间应为正整数',
duration: 2,
})
}
if (!regu.test(interval) || (isAbnormal && interval > 720) || interval > 1440) {
Notification.error({
content: title + (interval ? `推送时间不能大于${isAbnormal ? 720 : 1440}${isAbnormal ? '小时' : '分钟'}` : '推送时间应为正整数'),
duration: 2,
})
return false

Loading…
Cancel
Save