mt-ck-wms-ui/src/views/report-manage/ReportSortChoise.vue
2021-09-13 14:56:28 +08:00

145 lines
3.4 KiB
Vue

<!--
* @Author: gtz
* @Date: 2021-04-16 10:57:43
* @LastEditors: gtz
* @LastEditTime: 2021-04-23 14:13:48
* @Description: file content
-->
<template>
<div :class="$style.container" class="container">
<el-row class="sort-box" :gutter="20">
<el-col class="sort-item" :span="4" @click.native="handleClick('')">
<div class="sort-item-box">
<div class="sort-item-box-top">
<p>{{ $t('module.report.reportSort.all') }}</p>
</div>
<div class="sort-item-box-bottom">
{{ allNum }} {{ allNum > 1 ? 'Reports' : 'Report' }}
</div>
</div>
</el-col>
<el-col v-for="item in sortList" :key="item.id" class="sort-item" @click.native="handleClick(item.id)">
<div class="sort-item-box">
<div class="sort-item-box-top">
<p>{{ item.name }}</p>
</div>
<div class="sort-item-box-bottom">
{{ item.quantity }} {{ item.quantity > 1 ? 'Reports' : 'Report' }}
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import { list } from '@/api/report-manage/formSort'
export default {
data() {
return {
sortList: [],
allNum: 0
}
},
created() {
this.init()
},
methods: {
init() {
list({}).then(res => {
this.allNum = 0
this.sortList = res.data
res.data.forEach(item => {
this.allNum += item.quantity
})
})
},
handleClick(id) {
this.$router.push({
name: 'ReportSortList',
query: {
sortId: id
}
})
}
}
}
</script>
<style lang="scss" module>
.container {}
</style>
<style lang="scss">
.container {
padding: 20px;
.sort-box {
.sort-item {
height: 400px;
width: 280px;
margin-bottom: 20px;
.sort-item-box{
width: 100%;
height: 400px;
background: #faefc2;
border-radius: 10px;
box-shadow: 0px 3px 3px rgba(0, 0, 0, .5);
cursor: pointer;
position: relative;
overflow: hidden;
.sort-item-box-top {
margin: 0 10%;
width: 80%;
height: 199px;
border-bottom: 1px solid #e3d47d;
color: #b3a995;
position: relative;
p {
width: 100%;
position: absolute;
bottom: 0px;
line-height: 50px;
font-size: 24px;
letter-spacing: 5px;
text-align: center;
}
}
.sort-item-box-bottom {
width: 100%;
height: 200px;
line-height: 200px;
font-size: 24px;
font-weight: bold;
text-align: center;
letter-spacing: 5px;
color: #6e7680;
}
}
.sort-item-box::before{
content: '';
position: absolute;
right: 0;
width: 4px;
height: 400px;
background: #f8e69b;
}
.sort-item-box::after{
content: '';
position: absolute;
right: 0;
top: 70px;
width: 18px;
height: 60px;
background: #f8e69b;
border-radius: 5px;
}
.sort-item-box:hover{
transition:border linear .2s,
box-shadow linear .2s;
border-color:rgba(141,39,142,.75);
box-shadow:0 0 5px rgba(111,1,32,3);
// border: 2px solid #fff;
}
}
}
}
</style>