|
@@ -198,7 +198,7 @@
|
|
import { EditTac, GetTacDetails, DeleteTac } from "@/api/systemConfiguration";
|
|
import { EditTac, GetTacDetails, DeleteTac } from "@/api/systemConfiguration";
|
|
import Dialog from "@/layout/components/Dialog";
|
|
import Dialog from "@/layout/components/Dialog";
|
|
import { findarrays } from "@/utils/validate";
|
|
import { findarrays } from "@/utils/validate";
|
|
-import { lengthValidator } from '@/utils/validate'
|
|
|
|
|
|
+import { lengthValidator } from "@/utils/validate";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -236,7 +236,12 @@ export default {
|
|
rules: {
|
|
rules: {
|
|
TacName: [
|
|
TacName: [
|
|
{ required: true, message: "请输入策略名称", trigger: "blur" },
|
|
{ required: true, message: "请输入策略名称", trigger: "blur" },
|
|
- { validator: lengthValidator, max: 16, message: "长度在 1 到 16 个字符", trigger: ['change', 'blur'] },
|
|
|
|
|
|
+ {
|
|
|
|
+ validator: lengthValidator,
|
|
|
|
+ max: 16,
|
|
|
|
+ message: "长度在 1 到 16 个字符",
|
|
|
|
+ trigger: ["change", "blur"],
|
|
|
|
+ },
|
|
],
|
|
],
|
|
Date: [
|
|
Date: [
|
|
{ required: true, message: "请选择登录日期", trigger: "change" },
|
|
{ required: true, message: "请选择登录日期", trigger: "change" },
|
|
@@ -245,7 +250,12 @@ export default {
|
|
{ required: true, message: "请选择登录时间", trigger: "change" },
|
|
{ required: true, message: "请选择登录时间", trigger: "change" },
|
|
],
|
|
],
|
|
TacDesc: [
|
|
TacDesc: [
|
|
- { validator: lengthValidator, max: 128, message: "长度在 1 到 128 个字符", trigger: ['change', 'blur'] },
|
|
|
|
|
|
+ {
|
|
|
|
+ validator: lengthValidator,
|
|
|
|
+ max: 128,
|
|
|
|
+ message: "长度在 1 到 128 个字符",
|
|
|
|
+ trigger: ["change", "blur"],
|
|
|
|
+ },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
editId: null,
|
|
editId: null,
|
|
@@ -303,7 +313,7 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- if (this.isValidIP(ipArr[0]) == false) {
|
|
|
|
|
|
+ if (this.isValidIP(ipArr[0]) == false && ipArr.length) {
|
|
this.$message.error("请输入正确IP段,并以;号隔开");
|
|
this.$message.error("请输入正确IP段,并以;号隔开");
|
|
isSave = false;
|
|
isSave = false;
|
|
}
|
|
}
|