From cb965ce550557cc7c1c435e38246f2da409073b5 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Thu, 10 Apr 2025 10:32:16 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../picking/apply/component/AddPicking1.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue index af23910..511ea82 100644 --- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue +++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue @@ -577,6 +577,9 @@ export default { wholeTypeItemsList: [], } }, + created() { + this.GetDeviceTypeTree() + }, async mounted() { await this.GetUserInfo() @@ -620,7 +623,7 @@ export default { await this.GetTaskDetail(this.taskId) } else { - await this.GetDeviceTypeTree() + // await this.GetDeviceTypeTree() } // console.log(typeof(this.isEdit)) @@ -669,6 +672,7 @@ export default { } getDeviceTypeTree(params).then((res) => { this.deviceTypeTree = res.data + console.log('🚀 ~ getDeviceTypeTree ~ this.deviceTypeTree:', this.deviceTypeTree) }) }, getParentsById(list, id) { @@ -730,7 +734,7 @@ export default { // 获取 任务详情数据 async GetTaskDetail(taskId) { - await this.GetDeviceTypeTree() + // await this.GetDeviceTypeTree() await getLeaseApplyListAll({ taskId }).then((res) => { const data = res.rows[0] @@ -764,9 +768,12 @@ export default { // selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId)) // }) this.$nextTick(() => { + console.log('🚀 ~ this.$nextTick ~ this.deviceTypeTree:', this.deviceTypeTree) let selectList = [] for (let i = 0; i < this.leaseApplyDetails.length; i++) { - selectList.push(this.getParentsById(this.deviceTypeTree, this.leaseApplyDetails[i].typeId)) + const node = this.getParentsById(this.deviceTypeTree, this.leaseApplyDetails[i].typeId) + console.log('🚀 ~ this.$nextTick ~ node:', node) + selectList.push(node) } this.deviceType = selectList @@ -780,7 +787,7 @@ export default { }, // 驳回提交 任务详情数据 async GetTaskDetail2(taskId) { - await this.GetDeviceTypeTree() + // await this.GetDeviceTypeTree() const res = await getLeaseApplyAuditListAll({ taskId }) const data = res.rows[0]