From 2ca226af907cfbfc10f3b1a3b2566001e98878d0 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 21 Jun 2024 16:42:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AppSelect.vue | 46 ++++++++++++++++++++++++++++-------- src/views/AppStoresTable.vue | 20 +++++++++------- 2 files changed, 47 insertions(+), 19 deletions(-) diff --git a/src/views/AppSelect.vue b/src/views/AppSelect.vue index 114159a..b55e47d 100644 --- a/src/views/AppSelect.vue +++ b/src/views/AppSelect.vue @@ -1,12 +1,15 @@ diff --git a/src/views/AppStoresTable.vue b/src/views/AppStoresTable.vue index 842f628..a208453 100644 --- a/src/views/AppStoresTable.vue +++ b/src/views/AppStoresTable.vue @@ -87,10 +87,13 @@ export default { }, methods: { getData() { - this.stores = this.stores.map(({storeName, storeCode, storeCameraVOList = []}) => { - const keyGoods = this.storeKeyGoods.filter(e => e.storeCode == storeCode) - const categorySale = this.categorySales.filter(e => e.storeCode == storeCode) - return {storeCode, storeName, camera: storeCameraVOList.map(e => e.url), keyGoods, categorySale} + const {$http, $waitFor} = window + $waitFor($http).then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()])).then(() => { + this.stores = this.stores.map(({storeName, storeCode, storeCameraVOList = []}) => { + const keyGoods = this.storeKeyGoods.filter(e => e.storeCode == storeCode) + const categorySale = this.categorySales.filter(e => e.storeCode == storeCode) + return {storeCode, storeName, camera: storeCameraVOList.map(e => e.url), keyGoods, categorySale} + }) }) }, getCameras() { @@ -122,15 +125,14 @@ export default { }, gotoDetail(store) { $glob.query = {storeCode: store.storeCode} - $glob.group = "9f299712-5549-413b-a93b-7c3e3b5bfadb" + const sid = "9f299712-5549-413b-a93b-7c3e3b5bfadb" + $glob.group = sid + this.refs["ff6a5ca5-8cca-4fad-8058-a2ab2388236c"].$refs.main.groupId = sid }, }, mounted() { this.height = `${this.$el.clientHeight}px` - setTimeout(() => { - const {$http, $waitFor} = window - $waitFor($http).then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()])).then(() => this.getData()) - }, 2000) + this.getData() } }