提交一下

This commit is contained in:
aixianling
2024-06-21 16:42:57 +08:00
parent bdff7b020f
commit 2ca226af90
2 changed files with 47 additions and 19 deletions

View File

@@ -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()
}
}
</script>