diff --git a/src/views/AppStoresTable.vue b/src/views/AppStoresTable.vue index f5df050..9c45e30 100644 --- a/src/views/AppStoresTable.vue +++ b/src/views/AppStoresTable.vue @@ -39,7 +39,7 @@ export default { return { height: '600px', search: { - type: '', + type: '1', categoryId: '', hourNum: "" }, @@ -87,15 +87,16 @@ export default { methods: { getData() { const {$http, $waitFor} = window + console.log("筛选条件:", this.search) $waitFor($http).then(() => this.getStores()) .then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()])) .then(() => { - this.stores = this.stores.map(({storeName, storeCode}) => { - const {storeCameraVOList} = this.cameras.find(e => e.storeCode == storeCode) || {} + this.stores = this.stores?.map(storeCode => { + const {storeCameraVOList, storeName} = this.cameras.find(e => e.storeCode == storeCode) || {} 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} - }) + return {storeCode, storeName, camera: storeCameraVOList.map(e => e.cameraUrl), keyGoods, categorySale} + }) || [] }) }, getStores() {