From c683e68829e94e3cc78139556094cdb0f19ca71c Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Tue, 1 Apr 2025 21:10:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E8=A7=84=E6=A0=BC=E5=9E=8B?= =?UTF-8?q?=E5=8F=B7=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../picking/apply/component/AddPicking1.vue | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) 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) {