mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 23:30:26 +08:00
WAF规则中国家/地区、省份、城市、ISP增加候选项检索和选择
This commit is contained in:
@@ -121,4 +121,68 @@ Tea.context(function () {
|
||||
this.regexpTestResult = resp.data.result
|
||||
})
|
||||
}
|
||||
|
||||
// isp
|
||||
this.selectISPName = function (isp) {
|
||||
if (isp == null) {
|
||||
return
|
||||
}
|
||||
|
||||
let ispName = isp.name
|
||||
this.$refs.ispComboBox.clear()
|
||||
|
||||
if (this.rule.value.length == 0) {
|
||||
this.rule.value = ispName
|
||||
} else {
|
||||
this.rule.value += "|" + ispName
|
||||
}
|
||||
}
|
||||
|
||||
// country
|
||||
this.selectGeoCountryName = function (country) {
|
||||
if (country == null) {
|
||||
return
|
||||
}
|
||||
|
||||
let countryName = country.name
|
||||
this.$refs.countryComboBox.clear()
|
||||
|
||||
if (this.rule.value.length == 0) {
|
||||
this.rule.value = countryName
|
||||
} else {
|
||||
this.rule.value += "|" + countryName
|
||||
}
|
||||
}
|
||||
|
||||
// province
|
||||
this.selectGeoProvinceName = function (province) {
|
||||
if (province == null) {
|
||||
return
|
||||
}
|
||||
|
||||
let provinceName = province.name
|
||||
this.$refs.provinceComboBox.clear()
|
||||
|
||||
if (this.rule.value.length == 0) {
|
||||
this.rule.value = provinceName
|
||||
} else {
|
||||
this.rule.value += "|" + provinceName
|
||||
}
|
||||
}
|
||||
|
||||
// city
|
||||
this.selectGeoCityName = function (city) {
|
||||
if (city == null) {
|
||||
return
|
||||
}
|
||||
|
||||
let cityName = city.name
|
||||
this.$refs.cityComboBox.clear()
|
||||
|
||||
if (this.rule.value.length == 0) {
|
||||
this.rule.value = cityName
|
||||
} else {
|
||||
this.rule.value += "|" + cityName
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user