foodScreen.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <div id="menuScreen">
  3. <div class="title">今日食材</div>
  4. <div class="title2">
  5. <span>食材</span>
  6. <span>地址</span>
  7. <span>日期</span>
  8. </div>
  9. <div class="tables">
  10. <div class="gun">
  11. <el-table :cell-style="{ color: '#fff' }" :header-cell-style="{ color: '#fff' }" :data="tableData"
  12. style="width: 100%;height:100%;font-size: 2.4vh;">
  13. <el-table-column prop="product" align="center" label="">
  14. </el-table-column>
  15. <el-table-column prop="address" label="" align="center">
  16. </el-table-column>
  17. <el-table-column prop="billDate" label="" align="center">
  18. </el-table-column>
  19. </el-table>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import { foodList } from '@/api/canteen/basic.js'
  26. export default {
  27. data() {
  28. return {
  29. tableData: [],
  30. nowDate: ''
  31. }
  32. },
  33. created() {
  34. this.getList()
  35. },
  36. methods: {
  37. getList() {
  38. this.getNow()
  39. // {billDate: this.nowDate}
  40. foodList().then(res => {
  41. if (res.code === 200) {
  42. this.tableData = res.rows
  43. }
  44. })
  45. },
  46. getNow() {
  47. var date = new Date();
  48. var year = date.getFullYear();
  49. var month = date.getMonth() + 1;
  50. var day = date.getDate();
  51. if (month < 10) {
  52. month = "0" + month;
  53. }
  54. if (day < 10) {
  55. day = "0" + day;
  56. }
  57. const nowDate = year + "-" + month + "-" + day;
  58. this.nowDate = nowDate
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. #menuScreen {
  65. width: 100%;
  66. height: 100%;
  67. // overflow: hidden;
  68. background-image: url('../../assets/images/background.png');
  69. background-repeat: no-repeat;
  70. background-size: cover;
  71. }
  72. .title {
  73. text-align: center;
  74. font-size: 8vh;
  75. color: #fff;
  76. font-weight: 600;
  77. // text-shadow: 0 0 5px #fff,
  78. // 0 0 10px #fff,
  79. // 0 0 15px #fff,
  80. // 0 0 20px #00a67c,
  81. // 0 0 35px #00a67c,
  82. // 0 0 40px #00a67c,
  83. // 0 0 50px #00a67c,
  84. // 0 0 75px #00a67c;
  85. }
  86. .title2 {
  87. text-align: center;
  88. font-size: 3vh;
  89. color: #fff;
  90. font-weight: 600;
  91. width: 80%;
  92. color: #FFF;
  93. margin: 2% auto;
  94. display: flex;
  95. justify-content: space-around;
  96. // text-shadow: 0 0 5px #fff,
  97. // 0 0 10px #fff,
  98. // 0 0 15px #fff,
  99. // 0 0 20px #00a67c,
  100. // 0 0 35px #00a67c,
  101. // 0 0 40px #00a67c,
  102. // 0 0 50px #00a67c,
  103. // 0 0 75px #00a67c;
  104. // }
  105. }
  106. .gun {
  107. animation: tables 12s linear infinite;
  108. }
  109. .tables {
  110. width: 80%;
  111. height: 680px;
  112. margin: 0 auto;
  113. overflow: hidden;
  114. }
  115. @keyframes tables {
  116. 0% {
  117. transform: translateY(0px)
  118. }
  119. 100% {
  120. transform: translateY(calc(-100% + 680px));
  121. }
  122. }
  123. /*最外层透明*/
  124. ::v-deep .el-table,
  125. ::v-deep .el-table__expanded-cell {
  126. // font-size: 18px;
  127. background-color: transparent !important;
  128. }
  129. /* 表格内背景颜色 */
  130. ::v-deep .el-table th,
  131. ::v-deep .el-table tr,
  132. ::v-deep .el-table td {
  133. background-color: transparent !important;
  134. border-top: 1px solid #808DA6;
  135. border-bottom: none;
  136. }
  137. ::v-deep .el-table .el-table__header-wrapper {
  138. display: none;
  139. }
  140. ::v-deep .el-table .cell {
  141. line-height: normal;
  142. }
  143. </style>