123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <template>
- <div id="menuScreen">
- <div class="title">今日食材</div>
- <div class="title2">
- <span>食材</span>
- <span>地址</span>
- <span>日期</span>
- </div>
- <div class="tables">
- <div class="gun">
- <el-table :cell-style="{ color: '#fff' }" :header-cell-style="{ color: '#fff' }" :data="tableData"
- style="width: 100%;height:100%;font-size: 2.4vh;">
- <el-table-column prop="product" align="center" label="">
- </el-table-column>
- <el-table-column prop="address" label="" align="center">
- </el-table-column>
- <el-table-column prop="billDate" label="" align="center">
- </el-table-column>
- </el-table>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { foodList } from '@/api/canteen/basic.js'
- export default {
- data() {
- return {
- tableData: [],
- nowDate: ''
- }
- },
- created() {
- this.getList()
- },
- methods: {
- getList() {
- this.getNow()
- // {billDate: this.nowDate}
- foodList().then(res => {
- if (res.code === 200) {
- this.tableData = res.rows
- }
- })
- },
- getNow() {
- var date = new Date();
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- const nowDate = year + "-" + month + "-" + day;
- this.nowDate = nowDate
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- #menuScreen {
- width: 100%;
- height: 100%;
- // overflow: hidden;
- background-image: url('../../assets/images/background.png');
- background-repeat: no-repeat;
- background-size: cover;
- }
- .title {
- text-align: center;
- font-size: 8vh;
- color: #fff;
- font-weight: 600;
- // text-shadow: 0 0 5px #fff,
- // 0 0 10px #fff,
- // 0 0 15px #fff,
- // 0 0 20px #00a67c,
- // 0 0 35px #00a67c,
- // 0 0 40px #00a67c,
- // 0 0 50px #00a67c,
- // 0 0 75px #00a67c;
- }
- .title2 {
- text-align: center;
- font-size: 3vh;
- color: #fff;
- font-weight: 600;
- width: 80%;
- color: #FFF;
- margin: 2% auto;
- display: flex;
- justify-content: space-around;
- // text-shadow: 0 0 5px #fff,
- // 0 0 10px #fff,
- // 0 0 15px #fff,
- // 0 0 20px #00a67c,
- // 0 0 35px #00a67c,
- // 0 0 40px #00a67c,
- // 0 0 50px #00a67c,
- // 0 0 75px #00a67c;
- // }
- }
- .gun {
- animation: tables 12s linear infinite;
- }
- .tables {
- width: 80%;
- height: 680px;
- margin: 0 auto;
- overflow: hidden;
- }
- @keyframes tables {
- 0% {
- transform: translateY(0px)
- }
- 100% {
- transform: translateY(calc(-100% + 680px));
- }
- }
- /*最外层透明*/
- ::v-deep .el-table,
- ::v-deep .el-table__expanded-cell {
- // font-size: 18px;
- background-color: transparent !important;
- }
- /* 表格内背景颜色 */
- ::v-deep .el-table th,
- ::v-deep .el-table tr,
- ::v-deep .el-table td {
- background-color: transparent !important;
- border-top: 1px solid #808DA6;
- border-bottom: none;
- }
- ::v-deep .el-table .el-table__header-wrapper {
- display: none;
- }
- ::v-deep .el-table .cell {
- line-height: normal;
- }
- </style>
|