From 04250adcb1bd70bec471158255c83e2ec37cff19 Mon Sep 17 00:00:00 2001 From: renpy Date: Wed, 26 Jul 2023 18:31:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=A1=A8=E5=8D=95=E8=81=94?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alarmCenter/alarmRules/index.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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