Commit 3ee39c22 authored by derong.zhang's avatar derong.zhang

限制时间为0

parent 4f7a7c67
......@@ -149,10 +149,10 @@
<Input v-model="limitPath" type="text" placeholder="请输入路径" style="width: 70%" />
</FormItem>
<FormItem prop="alladdcontent" label="单位时间:">
<Input v-model="limitTime" type="text" placeholder="请输入单位时间" style="width: 70%" />
<Input v-model="limitTime" type="number" placeholder="请输入单位时间" style="width: 70%" />
</FormItem>
<FormItem prop="alladdcontent" label="速率:">
<Input v-model="limitRate" type="text" placeholder="请输入速率" style="width: 70%" />
<Input v-model="limitRate" type="number" placeholder="请输入速率" style="width: 70%" />
</FormItem>
</Form>
<div class="alladdbtn">
......@@ -408,8 +408,8 @@ export default {
}
],
limitPath: '',
limitRate: null,
limitTime: null,
limitRate: 0,
limitTime: 1,
tageList: [],
ipsetList: [],
ipsetData: [],
......@@ -1029,6 +1029,7 @@ export default {
this.specifiedData = []
}
}
this.newIpsetData = []
this.colorupdatacolor = true
this.colorupdata = true
this.origenselectserver = this.server
......@@ -1615,8 +1616,8 @@ export default {
},
addLimit() {
this.limitPath = '';
this.limitTime = null;
this.limitRate = null;
this.limitTime = '';
this.limitRate = '';
this.addLimitModal = true;
},
addSpecified () {
......@@ -1685,6 +1686,20 @@ export default {
this.origenselectserver = this.server
},
confireLimit() {
if (this.limitRate === '' || this.limitTime === '') {
this.$Notice.error({
title: '提示',
desc: '请输入速率及时间',
});
return
}
if (this.limitTime <= 0) {
this.$Notice.error({
title: '提示',
desc: '时间不能为0',
});
return
}
let keys = this.urlIpSetData.some(item => {
return item.path === this.limitPath
})
......
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