Files
EdgeAdmin/web/views/@default/servers/components/waf/ipadmin/provinces.js

35 lines
852 B
JavaScript
Raw Normal View History

2020-11-06 11:30:35 +08:00
Tea.context(function () {
this.isCheckingAll = false
this.selectProvince = function (province) {
province.isChecked = !province.isChecked
}
this.deselectProvince = function (province) {
province.isChecked = false
}
this.checkAll = function () {
this.isCheckingAll = !this.isCheckingAll
this.provinces.forEach(function (province) {
province.isChecked = that.isCheckingAll
})
}
this.success = function () {
teaweb.successToast("保存成功")
}
2020-11-07 19:40:18 +08:00
/**
* 添加IP名单菜单
*/
this.createIP = function (type) {
teaweb.popup("/servers/components/waf/ipadmin/createIPPopup?firewallPolicyId=" + this.firewallPolicyId + '&type=' + type, {
height: "23em",
callback: function () {
window.location = "/servers/components/waf/ipadmin/lists?firewallPolicyId=" + this.firewallPolicyId + "&type=" + type
}
})
}
2020-11-06 11:30:35 +08:00
})