|
@@ -76,8 +76,8 @@ export default {
|
|
|
{value: '1', label: '告警'}
|
|
|
],
|
|
|
excLevelOptions: [
|
|
|
- {value: 'A', label: 'A'},
|
|
|
- {value: 'B', label: 'B'}
|
|
|
+ {value: '0', label: 'A'},
|
|
|
+ {value: '1', label: 'B'}
|
|
|
],
|
|
|
form: {
|
|
|
loginFails: '',
|
|
@@ -133,19 +133,23 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
onSubmit:debounce(function(){
|
|
|
- this.loading = true
|
|
|
- this.$axios.put('/sysPolicyController', this.form).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.$message.success('策略配置保存成功')
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.loading = true
|
|
|
+ this.$axios.put('/sysPolicyController', this.form).then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.$message.success('策略配置保存成功')
|
|
|
+ }
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.$message.error(res.data)
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
+ }).catch((error) => {
|
|
|
+ this.$message.error(error)
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
}
|
|
|
- if (res.code == 1) {
|
|
|
- this.$message.error(res.data)
|
|
|
- }
|
|
|
- this.loading = false
|
|
|
- }).catch((error) => {
|
|
|
- this.$message.error(error)
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ });
|
|
|
},1000)
|
|
|
}
|
|
|
}
|