This commit is contained in:
parent
ba942dfd8f
commit
24bc952231
|
|
@ -389,7 +389,12 @@ export default {
|
||||||
projectId: this.maForm.projectId
|
projectId: this.maForm.projectId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('🚀 ~ getAgreementId ~ res:', res)
|
console.log('🚀 ~ getAgreementId ~ res:', res)
|
||||||
this.agreementId = res.data.agreementId
|
if (!res.data || !Array.isArray(res.data)) {
|
||||||
|
this.agreementId = []
|
||||||
|
this.equipmentTypeList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.agreementId = res.data
|
||||||
this.equipmentType()
|
this.equipmentType()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -441,7 +446,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 机具类型 */
|
/** 机具类型 */
|
||||||
equipmentType() {
|
equipmentType() {
|
||||||
equipmentTypeTree({ agreementId: this.agreementId }).then(response => {
|
equipmentTypeTree({ agreementIdList: this.agreementId }).then(response => {
|
||||||
this.equipmentTypeList = response.data
|
this.equipmentTypeList = response.data
|
||||||
// 处理并扁平化所有类型数据
|
// 处理并扁平化所有类型数据
|
||||||
this.flattenTypeOptions = this.processTypeData(response.data)
|
this.flattenTypeOptions = this.processTypeData(response.data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue