alarm 模块 serverMonitor/instances 页面中 /alarmRule/getItems 接口参数调整
This commit is contained in:
parent
aabd5c8827
commit
03f85b098c
|
@ -263,19 +263,21 @@ export default {
|
||||||
this.units = option.data.props.units
|
this.units = option.data.props.units
|
||||||
},
|
},
|
||||||
getItems(val) {
|
getItems(val) {
|
||||||
getAction('/alarmRule/getItems', { sourceName: val }).then((res) => {
|
getAction('/alarmRule/getItems', { sourceType: this.form.sourceType, sourceId: this.form.sourceId }).then(
|
||||||
if (res.success) {
|
(res) => {
|
||||||
this.itemOptions = res.result.map((item) => {
|
if (res.success) {
|
||||||
return {
|
this.itemOptions = res.result.map((item) => {
|
||||||
label: item.name,
|
return {
|
||||||
value: item.itemId,
|
label: item.name,
|
||||||
units: item.units,
|
value: item.itemId,
|
||||||
}
|
units: item.units,
|
||||||
})
|
}
|
||||||
} else {
|
})
|
||||||
this.$message.warning('This operation fails. Contact your system administrator')
|
} else {
|
||||||
|
this.$message.warning('This operation fails. Contact your system administrator')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.$refs.al_ruleForm.resetFields()
|
this.$refs.al_ruleForm.resetFields()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user