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) {