提交组件
This commit is contained in:
74
src/views/AppKgTable.vue
Normal file
74
src/views/AppKgTable.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "AppKgTable",
|
||||
label: "表格",
|
||||
data(){
|
||||
return{
|
||||
tableData:[],
|
||||
columns:[
|
||||
{label: "重点单品", prop: "name"},
|
||||
{label: "当日目标", prop: "targetNum", width: "70px"},
|
||||
{label: "销售数量", prop: "saleNum", width: "70px"},
|
||||
{label: "库存数量", prop: "stockNum", width: "70px"},
|
||||
{label: "预计销售数量", prop: "preSaleNum"},
|
||||
{label: "提醒", custom: 1, width: 70, align: 'center', prop: "remind"},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="AppKgTable">
|
||||
<div class="subTiltle" v-text="'表格标题'"/>
|
||||
<el-table :data="tableData" size="mini" header-cell-class-name="tableHeader" cell-class-name="tableCell" max-height="440px">
|
||||
<el-table-column v-for="column in columns" v-bind="column" :key="column.prop">
|
||||
<template v-slot="{row}">
|
||||
<div v-if="column.custom" :style="{color: row.preSaleNum > row.stockNum ? 'red' : '#fff'}" v-text="'周边库存情况'"/>
|
||||
<span v-else v-text="row[column.prop] || ''"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.AppKgTable {
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.AppKgTable .tableHeader {
|
||||
background: rgba(13, 48, 99, 0.6) !important;
|
||||
color: #fff;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
|
||||
.AppKgTable .el-table tr {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.AppKgTable .el-table {
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.AppKgTable .el-table:before {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.AppKgTable .tableCell {
|
||||
color: #fff;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
|
||||
.AppKgTable .subTiltle {
|
||||
line-height: 20px;
|
||||
width: fit-content;
|
||||
margin: 24px auto 12px;
|
||||
background-image: url("http://10.0.97.209/img/kengee/kengee5.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 2px;
|
||||
background-position: center bottom;
|
||||
}
|
||||
</style>
|
||||
57
src/views/AppRealtimePanel.vue
Normal file
57
src/views/AppRealtimePanel.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "AppRealtimePanel",
|
||||
label: "实况面板",
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{label: "总销售", prop: "a"},
|
||||
{label: "常规销售", prop: "a1"},
|
||||
{label: "节令销售", prop: "a2"},
|
||||
{label: "有效订单数", prop: "a3"},
|
||||
{label: "常规客单数", prop: "a4"},
|
||||
{label: "会员有效订单占比", prop: "a5"},
|
||||
{label: "报损率", prop: "a6"},
|
||||
{label: "报损金额", prop: "a7"},
|
||||
{label: "外卖销售占比", prop: "a8"},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="AppRealtimePanel">
|
||||
<div v-for="item in list" :key="item.prop" class="item">
|
||||
<div v-text="item.label"/>
|
||||
<div class="value" v-text="item.prop"/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.AppRealtimePanel {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px 16px;
|
||||
}
|
||||
|
||||
.AppRealtimePanel .item {
|
||||
background: url("http://10.0.97.209/img/kengee/kengee14.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.AppRealtimePanel .item .value {
|
||||
font-family: Helvetica;
|
||||
font-size: 20px;
|
||||
color: #66FFFF;
|
||||
line-height: 38px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user