fix:修复告警设置表格内数据验证异常
This commit is contained in:
parent
d1bd9f7ef6
commit
852fe4eac2
|
@ -312,7 +312,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isExp =
|
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)) {
|
if (row.alarmValue && !isExp.test(row.alarmValue)) {
|
||||||
callback("只可以输入数字类型!");
|
callback("只可以输入数字类型!");
|
||||||
|
@ -356,7 +356,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isExp =
|
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)) {
|
if (row.warnValueMax && !isExp.test(row.warnValueMax)) {
|
||||||
callback("只可以输入数字类型!");
|
callback("只可以输入数字类型!");
|
||||||
|
@ -385,7 +385,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isExp =
|
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)) {
|
if (row.warnValueMin && !isExp.test(row.warnValueMin)) {
|
||||||
callback("只可以输入数字类型!");
|
callback("只可以输入数字类型!");
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue