提交一下

This commit is contained in:
aixianling
2024-06-24 11:10:40 +08:00
parent a55715f620
commit c868d651d2

View File

@@ -39,7 +39,7 @@ export default {
return { return {
height: '600px', height: '600px',
search: { search: {
type: '', type: '1',
categoryId: '', categoryId: '',
hourNum: "" hourNum: ""
}, },
@@ -87,15 +87,16 @@ export default {
methods: { methods: {
getData() { getData() {
const {$http, $waitFor} = window const {$http, $waitFor} = window
console.log("筛选条件:", this.search)
$waitFor($http).then(() => this.getStores()) $waitFor($http).then(() => this.getStores())
.then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()])) .then(() => Promise.all([this.getCameras(), this.getStoreKeyGoods(), this.getCategorySales()]))
.then(() => { .then(() => {
this.stores = this.stores.map(({storeName, storeCode}) => { this.stores = this.stores?.map(storeCode => {
const {storeCameraVOList} = this.cameras.find(e => e.storeCode == storeCode) || {} const {storeCameraVOList, storeName} = this.cameras.find(e => e.storeCode == storeCode) || {}
const keyGoods = this.storeKeyGoods.filter(e => e.storeCode == storeCode) || [] const keyGoods = this.storeKeyGoods.filter(e => e.storeCode == storeCode) || []
const categorySale = this.categorySales.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() { getStores() {