尝试规格型号回显

This commit is contained in:
hongchao 2025-04-01 21:10:00 +08:00
parent 4dd2027580
commit c683e68829
1 changed files with 19 additions and 10 deletions

View File

@ -602,9 +602,7 @@ export default {
// }) // })
// console.log("1111111111111",this.deviceType) // console.log("1111111111111",this.deviceType)
// }) // })
await this.GetDeviceTypeTree().then(() => { await this.GetTaskDetail(this.taskId)
this.GetTaskDetail(this.taskId)
})
} else { } else {
await this.GetDeviceTypeTree() await this.GetDeviceTypeTree()
@ -717,9 +715,10 @@ export default {
// //
async GetTaskDetail(taskId) { async GetTaskDetail(taskId) {
const res = await getLeaseApplyListAll({ taskId }) await this.GetDeviceTypeTree()
await getLeaseApplyListAll({ taskId }).then((res) => {
const data = res.rows[0]
const data = res.rows[0]
// unitId:null, // unitId:null,
// proId:null, // proId:null,
@ -747,16 +746,26 @@ export default {
return this.handelEchoData(item) return this.handelEchoData(item)
}) })
let selectList = [] let selectList = []
this.leaseApplyDetails.forEach((e) => { for (let i = 0; i < this.leaseApplyDetails.length; i++) {
selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId)) selectList.push(this.getParentsById(this.deviceTypeTree, this.leaseApplyDetails[i].typeId))
}
// this.leaseApplyDetails.forEach((e) => {
// selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
// })
this.$nextTick(() => {
this.deviceType = selectList
this.propsKey++
// 1
setTimeout(() => {
// 1
}, 1000);
}) })
this.deviceType = selectList
this.propsKey++
await this.$nextTick();
if (data.ctLeaseApplyDetails) { if (data.ctLeaseApplyDetails) {
this.getCtFileList(data.ctLeaseApplyDetails) this.getCtFileList(data.ctLeaseApplyDetails)
} }
})
}, },
// //
async GetTaskDetail2(taskId) { async GetTaskDetail2(taskId) {