处理表单联动问题
This commit is contained in:
parent
21ab95cf6d
commit
04250adcb1
|
@ -402,7 +402,21 @@ export default {
|
||||||
getAlarmSources(val) {
|
getAlarmSources(val) {
|
||||||
getAction("/alarmRule/getSources", {souceType:val}).then(res => {
|
getAction("/alarmRule/getSources", {souceType:val}).then(res => {
|
||||||
if (res.success) {
|
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 {
|
return {
|
||||||
label: item.sourceName,
|
label: item.sourceName,
|
||||||
value: item.sourceId
|
value: item.sourceId
|
||||||
|
@ -474,7 +488,7 @@ export default {
|
||||||
this.form.sourceType = val
|
this.form.sourceType = val
|
||||||
this.form.sourceId = undefined
|
this.form.sourceId = undefined
|
||||||
this.form.itemId = undefined
|
this.form.itemId = undefined
|
||||||
this.getAlarmSources(val)
|
this.getSourcesOptions(val)
|
||||||
},
|
},
|
||||||
onSourceChange(val,option) {
|
onSourceChange(val,option) {
|
||||||
this.form.sourceId = val
|
this.form.sourceId = val
|
||||||
|
|
Loading…
Reference in New Issue
Block a user