Commit 277b8c70 authored by derong.zhang's avatar derong.zhang

优化ipset修改逻辑

parent 0183bdf0
......@@ -1661,24 +1661,23 @@ export default {
});
return
}
let keys = this.ipsetData.some(item => {
return item.name === this.ipsetName
})
if (keys) {
this.$Notice.error({
title: '提示',
desc: '不能添加重复的内容',
});
return
}
if (this.updataIpsetSta) {
this.ipsetData[this.updateconfigindex].ip_list = this.ipsetContent
} else {
let str = this.ipsetContent;
let keys = this.ipsetData.some(item => {
return item.name === this.ipsetName
})
if (keys) {
this.$Notice.error({
title: '提示',
desc: '不能添加重复的内容',
});
return
}
this.ipsetData.push(
{
name: this.ipsetName,
ip_list: str,
ip_list: this.ipsetContent,
}
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment