HonorTimeLine.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <div class="timeline_component">
  3. <el-timeline v-if="honorList?.length > 0" class="timeline" v-for="(honorItm) in honorList" :key="honorItm.id">
  4. <el-timeline-item
  5. placement="top"
  6. center="true"
  7. :timestamp="honorItm.awardDatetime"
  8. :hide-timestamp="true"
  9. >
  10. <div class="timeline_item">
  11. <div class="base_summarize">
  12. <!-- <span class="timestamp">{{ honorItm.awardDatetime }}</span> -->
  13. <!-- <span class="honor_type one_line_ellipsis" :title="honorItm.honorTypeName">{{ honorItm.honorTypeName }}</span> -->
  14. </div>
  15. <div class="honoor_introduce">
  16. <!-- <img :src="honorItm.certPicUrl" alt=""> -->
  17. <div class="honor_msg">
  18. <div class="base_msg">
  19. <div class="title one_line_ellipsis" :title="honorItm.honorName">{{ honorItm.honorName }}</div>
  20. <div class="honor_people">访问ip:{{ honorItm.teacherName }}</div>
  21. <!-- <div v-if="honorItm.inputData?.length > 0" class="introduce_list one_line_ellipsis">
  22. {{
  23. honorItm.inputData?.map(item=>{
  24. return item
  25. }).join('&nbsp; &nbsp;')
  26. }}
  27. </div> -->
  28. <!-- <ul v-if="honorItm.radioData?.length > 0" class="tag_list one_line_ellipsis" >
  29. <li v-for="tag in honorItm.radioData">{{ tag}}</li>
  30. </ul> -->
  31. </div>
  32. <div class="operation">
  33. <div class="honor_status">
  34. <span class="upload_time">{{ honorItm.awardDatetime }}</span>
  35. <slot name="status" :honorItm="honorItm">
  36. <!-- <span class="status">{{ honorItm.reviewStatus }}</span> -->
  37. </slot>
  38. </div>
  39. <div class="table_row_option">
  40. <slot name="operation" :honorItm="honorItm"></slot>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </el-timeline-item>
  47. <el-timeline-item placement="top" />
  48. </el-timeline>
  49. <div class="no_data_bg" v-else>
  50. <span>暂无数据</span>
  51. </div>
  52. </div>
  53. </template>
  54. <script setup lang="ts">
  55. interface HonorItem {
  56. id:String,
  57. awardDatetime: String,
  58. certPicUrl:String,
  59. honorTypeName: String,
  60. honorName:String,
  61. teacherName:String,
  62. radioData:Array<String>,
  63. inputData:Array<Object>
  64. createdAt:String,
  65. reviewStatus:String,
  66. }
  67. const props = defineProps({
  68. honorList:{
  69. type:Array<HonorItem>,
  70. default:()=>[]
  71. }
  72. })
  73. </script>
  74. <style lang="scss" scoped>
  75. .timeline{
  76. padding:0;
  77. }
  78. :deep(.el-timeline){
  79. .el-timeline-item:last-child{
  80. padding-bottom: 10px;
  81. }
  82. .el-timeline-item{
  83. justify-content: flex-start;
  84. .el-timeline-item__wrapper{
  85. padding:0px;
  86. }
  87. .el-timeline-item__node{
  88. width: 5px;
  89. height: 5px;
  90. }
  91. .el-timeline-item__tail{
  92. left:1px
  93. }
  94. }
  95. }
  96. .timeline_item{
  97. position: relative;
  98. width: 100%;
  99. display: flex;
  100. align-items: flex-start;
  101. .base_summarize{
  102. flex-grow: 0;
  103. flex-shrink: 0;
  104. display: flex;
  105. flex-direction: column;
  106. // width: 94px;
  107. width: 24px;
  108. .honor_type{
  109. font-size: 14px;
  110. color:#999;
  111. cursor: pointer;
  112. }
  113. .timestamp{
  114. font-weight: 600;
  115. font-size: 16px;
  116. color:#333;
  117. }
  118. }
  119. .honoor_introduce{
  120. flex:1 1;
  121. display: flex;
  122. gap:16px;
  123. background-color: #F8FAFE;
  124. border:solid #EBEEF5 1px;
  125. border-radius: 8px;
  126. position: relative;
  127. overflow: auto;
  128. padding:10px 20px 10px 10px;
  129. &:hover{
  130. background-color: rgba(46, 100, 250,0.1);
  131. border:solid #2E64FA 1px;
  132. }
  133. img{
  134. width: 200px;
  135. height: 117px;
  136. }
  137. .honor_msg{
  138. flex:1 1;
  139. position: relative;
  140. overflow: auto;
  141. display: flex;
  142. justify-content: space-between;
  143. gap:20px;
  144. .base_msg{
  145. overflow: auto;
  146. flex:1 1;
  147. display: flex;
  148. flex-direction: column;
  149. gap:8px;
  150. .title{
  151. font-weight: 600;
  152. font-size: 16px;
  153. color:#333;
  154. line-height: 22px;
  155. }
  156. .honor_people{
  157. font-size: 14px;
  158. }
  159. .introduce_list{
  160. font-size: 14px;
  161. color:#999;
  162. }
  163. .tag_list{
  164. display: flex;
  165. gap:10px;
  166. font-size: 12px;
  167. color:#2E64FA;
  168. li{
  169. padding:3px 8px;
  170. background-color: rgba(46, 100, 249,0.1);
  171. }
  172. }
  173. }
  174. .operation{
  175. display: flex;
  176. flex-direction: column;
  177. justify-content: space-between;
  178. .honor_status{
  179. justify-content: flex-end;
  180. display: flex;
  181. gap:20px;
  182. .upload_time{
  183. color:#999;
  184. }
  185. }
  186. .table_row_option{
  187. justify-content: flex-end;
  188. gap:20px;
  189. }
  190. }
  191. }
  192. }
  193. }
  194. </style>