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

限制时间为0

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