From da5dd1e76ec15a2598d9f1ee8d2aef2b093edf29 Mon Sep 17 00:00:00 2001 From: bb_pan Date: Thu, 10 Apr 2025 10:46:01 +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 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue index 511ea82..573414d 100644 --- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue +++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue @@ -577,9 +577,6 @@ export default { wholeTypeItemsList: [], } }, - created() { - this.GetDeviceTypeTree() - }, async mounted() { await this.GetUserInfo() @@ -591,7 +588,7 @@ export default { await this.getHoldingPoleSelListData() - // this.GetDeviceTypeTree() + await this.GetDeviceTypeTree() // this.getList(); if (this.$route.query.taskId && !this.$route.query.isBack) { console.log('ζŸ₯ηœ‹') @@ -670,10 +667,18 @@ export default { const params = { level: 4, } - getDeviceTypeTree(params).then((res) => { - this.deviceTypeTree = res.data - console.log('πŸš€ ~ getDeviceTypeTree ~ this.deviceTypeTree:', this.deviceTypeTree) + const loading = this.$loading({ + lock: true, + text: '加载中...', }) + try { + const res = await getDeviceTypeTree(params) + this.deviceTypeTree = res.data + loading.close() + } catch (error) { + console.log('πŸš€ ~ GetDeviceTypeTree ~ error:', error) + loading.close() + } }, getParentsById(list, id) { for (let i in list) {