修改轮播

This commit is contained in:
艾贤凌
2024-06-18 18:03:52 +08:00
parent ff19c1ea7f
commit 707e771053

View File

@@ -4,6 +4,7 @@ export default {
label: "多店监控",
data() {
return {
height: '600px',
stores: [
{}, {}, {}, {}, {}
],
@@ -26,28 +27,54 @@ export default {
]
},
}
},
computed: {
storeList: v => {
const list = []
let group = []
v.stores.map((e, i) => {
if (group.length < 4) {
group.push(e)
if (i + 1 == v.stores.length) {
list.push(group)
}
} else {
list.push(group)
group = [e]
}
})
return list
}
},
mounted() {
this.height = `${this.$el.clientHeight}px`
}
}
</script>
<template>
<section class="AppStoresTable">
<div class="layout">
<div class="store" v-for="store in stores" :key="store.id">
<div class="header" v-text="'郑州朗程康桥店'"/>
<el-carousel indicator-position="none" height="250px">
<el-carousel-item></el-carousel-item>
</el-carousel>
<div class="title" v-text="'品类销售情况'"/>
<el-table size="mini" header-cell-class-name="tableHeader" cell-class-name="tableCell" max-height="275px">
<el-table-column v-for="column in columns.品类销售情况" v-bind="column" :key="column.prop"/>
</el-table>
<div class="title" v-text="'重点单品情况'"/>
<el-table size="mini" header-cell-class-name="tableHeader" cell-class-name="tableCell" max-height="275px">
<el-table-column v-for="column in columns.重点单品情况" v-bind="column" :key="column.prop"/>
</el-table>
</div>
</div>
<el-carousel indicator-position="none" :height="height">
<el-carousel-item v-for="(group,i) in storeList" :key="i">
<div class="layout">
<div class="store" v-for="store in group" :key="store.id">
<div class="header" v-text="'郑州朗程康桥店'"/>
<el-carousel indicator-position="none" height="250px">
<el-carousel-item></el-carousel-item>
</el-carousel>
<div class="title" v-text="'品类销售情况'"/>
<el-table size="mini" header-cell-class-name="tableHeader" cell-class-name="tableCell" max-height="275px">
<el-table-column v-for="column in columns.品类销售情况" v-bind="column" :key="column.prop"/>
</el-table>
<div class="title" v-text="'重点单品情况'"/>
<el-table size="mini" header-cell-class-name="tableHeader" cell-class-name="tableCell" max-height="275px">
<el-table-column v-for="column in columns.重点单品情况" v-bind="column" :key="column.prop"/>
</el-table>
</div>
</div>
</el-carousel-item>
</el-carousel>
</section>
</template>