foodScreen.vue 2.8 KB

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