From c7bcfe1ff0b33aea4701f64978075a5c5834c896 Mon Sep 17 00:00:00 2001 From: renpy Date: Fri, 4 Aug 2023 17:25:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B8=E7=B4=A0=E5=AD=97=E6=AE=B5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=81=94=E8=B0=83=20=E5=A4=84=E7=90=86=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E8=A7=84=E5=88=99=E5=90=8E=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=B6=E8=A1=A8=E5=8D=95=E4=B8=8D=E6=B8=85=E7=A9=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../analysisMonitor/alarmRules/index.vue | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/src/views/abnormalAlarm/analysisMonitor/alarmRules/index.vue b/src/views/abnormalAlarm/analysisMonitor/alarmRules/index.vue index 4536df8..cb76d60 100644 --- a/src/views/abnormalAlarm/analysisMonitor/alarmRules/index.vue +++ b/src/views/abnormalAlarm/analysisMonitor/alarmRules/index.vue @@ -11,7 +11,7 @@ - Station + Stations - Data Sources + Sources @@ -266,7 +267,7 @@ v-decorator="[ 'remark', { - initialVale: this.formVal.desc + initialVale: this.formVal.remark } ]" /> @@ -335,7 +336,7 @@ export default { qualifier: null, condition: null, contactGroup: undefined, - desc: "" + remark: "" }, monitorList: [], currId:"", @@ -343,6 +344,7 @@ export default { }, created () { this.getStationList(); + this.getNuclideList(); this.getAlarmGroup(); this.getAlarmRulesPage() }, @@ -354,11 +356,30 @@ export default { this.stationOptions = res.result.map(item => { return { label: item.stationCode, - value: item.stationId + value: `${item.stationId}` + } + }) + console.log(this.stationOptions); + } else { + this.stationOptions=[] + } + } else { + this.$message.warning("This operation fails. Contact your system administrator") + } + }) + }, + getNuclideList() { + getAction("/sys/defaultNuclide/allName",{useType:2}).then(res => { + if (res.success) { + if (res.result.length>0) { + this.nuclideOptions = res.result.map(item => { + return { + label: item, + value: item } }) } else { - this.stationOptions=[] + this.nuclideOptions=[] } } else { this.$message.warning("This operation fails. Contact your system administrator") @@ -388,10 +409,9 @@ export default { let params = { pageNo: this.ipagination.current, pageSize: this.ipagination.pageSize, - // stations: this.queryParams.station, - // source: this.queryParams.source, - source: [1,2], - stations: [101,102], + stations: this.queryParams.station, + source: this.queryParams.source, + nuclides: this.queryParams.nuclide } getAction("/alarmAnalysisRule/findPage", params).then(res => { this.spinning = false @@ -422,7 +442,7 @@ export default { qualifier: res.result.qualifierChecked.join(','), condition: res.result.conditionChecked.join(','), contactGroup: res.result.contactGroup, - desc: res.result.remark + remark: res.result.remark }); }) } else { @@ -489,7 +509,7 @@ export default { }, onSave() { this.form.validateFields((err, values) => { - // if (!err) { + if (!err) { let params = { conditions:values.condition, name:values.name, @@ -497,8 +517,7 @@ export default { stations:values.station.join(","), source: values.source, enabled: 1, - // nuclides:values.nuclide.join(","), - nuclides:"A406,Bu12", + nuclides:values.nuclide.join(","), contactGroup:values.contactGroup, spectralQualifier: values.qualifier, } @@ -506,6 +525,7 @@ export default { postAction("/alarmAnalysisRule/add", params).then(res => { if (res.success) { this.visible = false + this.form.resetFields() this.$message.success("success") this.getAlarmRulesPage() } else { @@ -516,6 +536,7 @@ export default { httpAction("/alarmAnalysisRule/edit", {...params,id: this.currId}, "put").then(res => { if (res.success) { this.visible = false + this.form.resetFields() this.$message.success("success") this.getAlarmRulesPage() } else { @@ -523,7 +544,7 @@ export default { } }) } - // } + } }) }, onCancel() {