fix:解决报警规则表单 请求getItems接口的参数
This commit is contained in:
parent
82e8482275
commit
1b0b653ab1
|
@ -516,14 +516,14 @@ export default {
|
|||
onSourceChange(val, option) {
|
||||
if (val) {
|
||||
this.form.sourceId = val
|
||||
this.getItems(val.label)
|
||||
this.getItems(val.key)
|
||||
} else {
|
||||
this.form.sourceId = {}
|
||||
this.form.itemId = undefined
|
||||
}
|
||||
},
|
||||
getItems(val) {
|
||||
getAction("/alarmRule/getItems", {sourceName:val}).then(res => {
|
||||
getAction("/alarmRule/getItems", {sourceId:val}).then(res => {
|
||||
if (res.success) {
|
||||
this.itemOptions = res.result.map(item => {
|
||||
return {
|
||||
|
@ -640,7 +640,7 @@ export default {
|
|||
}).catch(err => {
|
||||
this.$message.warning("This operation fails. Contact your system administrator")
|
||||
})
|
||||
getAction("/alarmRule/getItems", { sourceName: res.result.sourceName }).then(res => {
|
||||
getAction("/alarmRule/getItems", { sourceId: res.result.sourceId }).then(res => {
|
||||
if (res.success) {
|
||||
this.itemOptions = res.result.map(item => {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user