intelligentHint.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <div class="intelligentHint">
  3. <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">智能提醒</h2>
  4. <header class="header">
  5. <div class="left">
  6. <E-Cold-Store class="chart_a"></E-Cold-Store>
  7. </div>
  8. <div class="right">
  9. <div class="cell" v-for="item in tableData" :key="item.id">
  10. <h3 class="h3">
  11. <span class="title">无害化处理编号:</span>
  12. <span class="content">{{ item.id }}</span>
  13. </h3>
  14. <el-steps :active="C_a(item.status)">
  15. <el-step title="无害化申请"></el-step>
  16. <el-step title="无害化确认"></el-step>
  17. <el-step title="无害化处理"></el-step>
  18. <el-step title="生产无害化处理单"></el-step>
  19. </el-steps>
  20. </div>
  21. </div>
  22. </header>
  23. <footer class="footer">
  24. <el-carousel
  25. height="150px"
  26. :interval="5000"
  27. direction="vertical"
  28. indicator-position="none"
  29. >
  30. <el-carousel-item v-for="item in tableData" :key="item.id">
  31. <div :class="['item', 'item_'+ item.id%3]">
  32. <div class="left el-icon-mobile-phone"></div>
  33. <div class="right">
  34. <p class="top">帮助提示</p>
  35. <p class="middle">{{`无害化处理 ${item.id} ${item.status==0?'未确认,请及时确认':'已确认'}`}}</p>
  36. <span class="bottom">查看详情</span>
  37. </div>
  38. </div>
  39. </el-carousel-item>
  40. </el-carousel>
  41. </footer>
  42. </div>
  43. </template>
  44. <script>
  45. import EColdStore from "./charts/EColdStore";
  46. import {
  47. reqHarmlessList,
  48. } from "@/api/harmless.js";
  49. const pageSize = 3
  50. export default {
  51. name: "intelligentHint",
  52. components: {
  53. "E-Cold-Store": EColdStore
  54. },
  55. data() {
  56. return {
  57. tableData: []
  58. };
  59. },
  60. created() {
  61. this.getHarmlessList()
  62. },
  63. methods: {
  64. // 智能提醒列表
  65. getHarmlessList() {
  66. reqHarmlessList({
  67. searchStr: '',
  68. pageSize,
  69. pageNum: 1
  70. })
  71. .then(res => {
  72. this.tableData = res.content;
  73. this.totalPages = res.totalPages;
  74. })
  75. .catch(err => {
  76. console.log(err);
  77. });
  78. },
  79. // 计算步骤条的active (因为现在只有两个状态,要显示四个状态)
  80. C_a(v) {
  81. return v == 0 ? 1 : 4
  82. }
  83. }
  84. };
  85. </script>
  86. <style lang="scss" scoped>
  87. .intelligentHint {
  88. .header {
  89. display: flex;
  90. padding-right: 11%;
  91. .left {
  92. width: 50%;
  93. height: 400px;
  94. }
  95. .right {
  96. width: 50%;
  97. height: 400px;
  98. display: flex;
  99. flex-direction: column;
  100. justify-content: space-around;
  101. .cell{
  102. .h3{
  103. margin: 35px 0 10px 0;
  104. .title{
  105. font-size: 18px;
  106. margin-right: 10px;
  107. color: #383838;
  108. }
  109. .content{
  110. color: #555;
  111. font-size: 20px;
  112. }
  113. }
  114. }
  115. }
  116. }
  117. .footer {
  118. margin-top: 120px;
  119. .item {
  120. height: 100%;
  121. display: flex;
  122. box-sizing: border-box;
  123. border-radius: 10px;
  124. align-items: center;
  125. .left {
  126. font-size: 30px;
  127. margin-left: 20px;
  128. margin-right: 20px;
  129. }
  130. .right {
  131. display: flex;
  132. flex-direction: column;
  133. justify-content: space-around;
  134. .top {
  135. font-size: 20px;
  136. font-weight: 600;
  137. color: #746363;
  138. }
  139. .middle {
  140. font-size: 16px;
  141. margin: 10px 0;
  142. color: #999;
  143. }
  144. .bottom {
  145. font-size: 16px;
  146. color: rgb(48, 115, 240);
  147. }
  148. }
  149. }
  150. .item_0 {
  151. background-color: #ebf5ff;
  152. .left {
  153. color: #0079fe;
  154. }
  155. }
  156. .item_1 {
  157. background-color: #e6faf0;
  158. .left {
  159. color: #4bd863;
  160. }
  161. }
  162. .item_2 {
  163. background-color: #ffeee6;
  164. .left {
  165. color: #ff3b30;
  166. }
  167. }
  168. }
  169. }
  170. </style>