diff --git a/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue b/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue index 72f987c..3e36916 100644 --- a/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue +++ b/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue @@ -524,6 +524,7 @@ export default { label: item.name, value: item.itemId, units: item.units, + valueType: item.valueType, } }) } else { @@ -556,6 +557,8 @@ export default { onSave() { this.$refs.al_ruleForm.validate((valid) => { if (valid) { + const find = this.itemOptions.find((item) => item.value == this.form.itemId.key) + let params = { silenceCycle: this.form.silenceCycle, contactId: this.form.contactId, @@ -570,6 +573,7 @@ export default { }, name: this.form.name, id: this.isAdd ? '' : this.currId, + itemType: find.valueType, } if (this.isAdd) { postAction('/alarmRule/create', params).then((res) => { @@ -644,6 +648,7 @@ export default { label: item.name, value: item.itemId, units: item.units, + valueType: item.valueType, } }) } else { @@ -783,6 +788,7 @@ export default { .ant-spin-nested-loading { width: 100%; height: calc(100% - 40px); + overflow: auto; } .monitor-list { height: 100%; diff --git a/src/views/abnormalAlarm/serverMonitor/instances/createRules.vue b/src/views/abnormalAlarm/serverMonitor/instances/createRules.vue index cb6e70c..d890a80 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/createRules.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/createRules.vue @@ -215,6 +215,9 @@ export default { }, } }, + created() { + this.getAlarmGroup() + }, mounted() { this.sourceOptions = this.serverList }, @@ -227,6 +230,25 @@ export default { }, }, methods: { + getAlarmGroup() { + let params = { + pageNo: 1, + pageSize: 9999, + } + getAction('/alarmContactGroup/findPage', params).then((res) => { + if (res.success) { + this.contactGroupOptions = res.result.records.map((item) => { + return { + label: item.name, + value: item.id, + } + }) + } else { + this.$message.warning('This operation fails. Contact your system administrator') + } + }) + }, + onCancel() { this.$emit('onCancel') this.resetForm() @@ -238,6 +260,8 @@ export default { onSave() { this.$refs.al_ruleForm.validate((valid) => { if (valid) { + const find = this.itemOptions.find((item) => item.value == this.form.itemId.key) + let params = { silenceCycle: this.form.silenceCycle, contactId: this.form.contactId, @@ -251,8 +275,9 @@ export default { units: this.units, }, name: this.form.name, + itemType: find.valueType, } - this.$emit('onCanonSavecel', params) + this.$emit('onOk', params) this.resetForm() } }) @@ -270,6 +295,7 @@ export default { label: item.name, value: item.itemId, units: item.units, + valueType: item.valueType, } }) } else {