fix:修复告警设置表格内数据验证异常

This commit is contained in:
23357 2022-12-13 11:25:53 +08:00
parent d1bd9f7ef6
commit 852fe4eac2
1 changed files with 3 additions and 3 deletions

View File

@ -312,7 +312,7 @@ export default {
}
const isExp =
/^((\-)*([1-9][0-9]*)|(\-)*(([0]\.\d{1,}|[1-9][0-9]*\.\d{1,})))$/;
/^((\-)*([1-9][0-9]*)|(\-)*([0-9]*)|(\-)*(([0]\.\d{1,}|[1-9][0-9]*\.\d{1,})))$/;
if (row.alarmValue && !isExp.test(row.alarmValue)) {
callback("只可以输入数字类型!");
@ -356,7 +356,7 @@ export default {
}
const isExp =
/^((\-)*([1-9][0-9]*)|(\-)*(([0]\.\d{1,}|[1-9][0-9]*\.\d{1,})))$/;
/^((\-)*([1-9][0-9]*)|(\-)*([0-9]*)|(\-)*(([0]\.\d{1,}|[1-9][0-9]*\.\d{1,})))$/;
if (row.warnValueMax && !isExp.test(row.warnValueMax)) {
callback("只可以输入数字类型!");
@ -385,7 +385,7 @@ export default {
}
const isExp =
/^((\-)*([1-9][0-9]*)|(\-)*(([0]\.\d{1,}|[1-9][0-9]*\.\d{1,})))$/;
/^((\-)*([1-9][0-9]*)|(\-)*([0-9]*)|(\-)*(([0]\.\d{1,}|[1-9][0-9]*\.\d{1,})))$/;
if (row.warnValueMin && !isExp.test(row.warnValueMin)) {
callback("只可以输入数字类型!");
return