diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue index 515fde2..43dc16c 100644 --- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue +++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue @@ -602,9 +602,7 @@ export default { // }) // console.log("1111111111111",this.deviceType) // }) - await this.GetDeviceTypeTree().then(() => { - this.GetTaskDetail(this.taskId) - }) + await this.GetTaskDetail(this.taskId) } else { await this.GetDeviceTypeTree() @@ -717,9 +715,10 @@ export default { // 获取 任务详情数据 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, // proId:null, @@ -747,16 +746,26 @@ export default { return this.handelEchoData(item) }) let selectList = [] - this.leaseApplyDetails.forEach((e) => { - selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId)) + for (let i = 0; i < this.leaseApplyDetails.length; i++) { + 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) { this.getCtFileList(data.ctLeaseApplyDetails) } + }) }, // 驳回提交 任务详情数据 async GetTaskDetail2(taskId) {