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