diff --git a/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue b/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue index cc33d2e..a4d8adb 100644 --- a/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue +++ b/src/views/abnormalAlarm/alarmCenter/alarmRules/index.vue @@ -402,7 +402,21 @@ export default { getAlarmSources(val) { getAction("/alarmRule/getSources", {souceType:val}).then(res => { if (res.success) { - this.nameOptions = this.sourceOptions = res.result.map(item => { + this.nameOptions = res.result.map(item => { + return { + label: item.sourceName, + value: item.sourceId + } + }) + } else { + this.$message.warning("This operation fails. Contact your system administrator") + } + }) + }, + getSourcesOptions(val) { + getAction("/alarmRule/getSources", {souceType:val}).then(res => { + if (res.success) { + this.sourceOptions = res.result.map(item => { return { label: item.sourceName, value: item.sourceId @@ -474,7 +488,7 @@ export default { this.form.sourceType = val this.form.sourceId = undefined this.form.itemId = undefined - this.getAlarmSources(val) + this.getSourcesOptions(val) }, onSourceChange(val,option) { this.form.sourceId = val