time-list.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <ul class="time-list">
  3. <li v-for="(i, index) in value" :key="index">
  4. <template v-if="!(index % 2)">
  5. <!-- {{index}} -->
  6. <div class="info animated fadeInLeft">
  7. <p>
  8. <span>{{[i.processTime,1] | time}}</span>
  9. /{{[i.processTime,2] | time}}
  10. </p>
  11. <p>执行项: {{i.processItem}}</p>
  12. <p>负责人: {{i.processUser}}</p>
  13. <p>执行描述: {{i.processDesc}}</p>
  14. </div>
  15. <i class="point"></i>
  16. <el-image
  17. :src="i.processImgs | host"
  18. :preview-src-list="[i.processImgs] | hostList"
  19. class="animated fadeInRight"
  20. >
  21. <div slot="placeholder" class="img-loading">
  22. <i class="el-icon-loading"></i>
  23. </div>
  24. <div slot="error" class="image-slot">
  25. <i class="el-icon-picture-outline"></i>
  26. </div>
  27. </el-image>
  28. </template>
  29. <template v-else>
  30. <el-image
  31. :src="i.processImgs | host"
  32. :preview-src-list="[i.processImgs] | hostList"
  33. class="animated fadeInLeft"
  34. >
  35. <!-- <div slot="error" class="image-slot"><i class="el-icon-picture-outline"></i></div>
  36. <div slot="placeholder" class="img-loading"><i class="el-icon-loading"></i></div>-->
  37. <div slot="placeholder" class="img-loading">
  38. <i class="el-icon-loading"></i>
  39. </div>
  40. <div slot="error" class="image-slot">
  41. <i class="el-icon-picture-outline"></i>
  42. </div>
  43. </el-image>
  44. <i class="point"></i>
  45. <div class="info animated fadeInRight">
  46. <p>
  47. <span>{{[i.processTime,1] | time}}</span>
  48. /{{[i.processTime,2] | time}}
  49. </p>
  50. <p>执行项: {{i.processItem}}</p>
  51. <p>负责人: {{i.processUser}}</p>
  52. <p>执行描述: {{i.processDesc}}</p>
  53. </div>
  54. </template>
  55. </li>
  56. </ul>
  57. </template>
  58. <script>
  59. export default {
  60. props: {
  61. value: {
  62. type: Array,
  63. default() {
  64. return [];
  65. }
  66. }
  67. },
  68. filters: {
  69. time([value, index]) {
  70. return ((value + "").split(" ")[0] || "").split("-")[index] || "";
  71. }
  72. },
  73. data() {
  74. return {
  75. src: 'https://icweiliimg9.pstatp.com/weili/l/79052111505202081.webp'
  76. };
  77. }
  78. };
  79. </script>
  80. <style lang="less">
  81. .time-list {
  82. display: flex;
  83. flex-direction: column;
  84. overflow: hidden;
  85. position: relative;
  86. &::before {
  87. content: '';
  88. position: absolute;
  89. top: 0.2rem;
  90. bottom: 0;
  91. left: 50%;
  92. width: 1px;
  93. background: #20374d;
  94. }
  95. > li {
  96. display: flex;
  97. justify-content: space-between;
  98. margin: 0.2rem 0;
  99. .info,
  100. .el-image {
  101. width: 42%;
  102. border-radius: 0.08rem;
  103. overflow: hidden;
  104. height: 2rem;
  105. img {
  106. width: 100%;
  107. height: 100%;
  108. }
  109. }
  110. .info {
  111. padding-left: 0.3rem;
  112. width: calc(42% - 0.3rem);
  113. p {
  114. font-size: 0.2rem;
  115. span {
  116. font-size: 1.4em;
  117. }
  118. }
  119. }
  120. .el-image {
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. }
  125. &:nth-child(even) {
  126. // transform: rotateY(180deg);
  127. .info,
  128. .el-image {
  129. // transform: rotateY(-180deg);
  130. }
  131. }
  132. .point {
  133. transform: rotateY(-180deg) translateY(0.3rem);
  134. width: 0.28rem;
  135. height: 0.28rem;
  136. border-radius: 50%;
  137. background: #397c53;
  138. border: 0.06rem solid #fff;
  139. box-shadow: 0 0 0 0.02rem #20374d;
  140. }
  141. }
  142. }
  143. </style>