FollowCard.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <ul class="follow_card">
  3. <li
  4. v-for="(item, index) in cardList"
  5. :key="item.id"
  6. class="audit_card"
  7. >
  8. <!-- 头部内容 -->
  9. <div class="card_header">
  10. <!-- 左侧基本信息 -->
  11. <div class="header_left">
  12. <span v-for="(titleItm,index) in item.headerTitleList" :key="index">{{ titleItm }}</span>
  13. <template v-if="item.headerTags?.length > 0">
  14. <el-tag v-for="(tag,index) in item.headerTags"
  15. :key="index"
  16. type="success" effect="light" size="small"
  17. class="status_tag">
  18. {{ tag }}
  19. </el-tag>
  20. </template>
  21. <span v-if="item.taskType" class="task_type">{{item.taskType}}</span>
  22. </div>
  23. <!-- 右侧操作信息 -->
  24. <div class="header_right">
  25. <slot name="operation" :row="item">
  26. <el-button class="delete_button_border_no_bg">驳回赢单</el-button>
  27. <el-button class="button_border">通过赢单</el-button>
  28. </slot>
  29. </div>
  30. </div>
  31. <!-- 2. 中部描述信息-->
  32. <div v-if="item.middleDesc?.length > 0" class="card_info">
  33. <span v-for="(desc,index) in item.middleDesc" :key="index">{{ desc }}</span>
  34. </div>
  35. <!-- 3. 底部内容 -->
  36. <div class="card_content">
  37. {{ item.bottomDesc }}
  38. </div>
  39. </li>
  40. </ul>
  41. </template>
  42. <script setup lang="ts">
  43. interface AuditItm {
  44. id:string | number,
  45. headerTitleList:Array<string>,
  46. headerTags:Array<string>,
  47. taskType:string,
  48. middleDesc:Array<string>,
  49. bottomDesc:string,
  50. }
  51. const props = defineProps({
  52. cardList:{
  53. type:Array<AuditItm>,
  54. required:true
  55. },
  56. })
  57. </script>
  58. <style lang="scss" scoped>
  59. .follow_card {
  60. display: flex;
  61. flex-direction: column;
  62. gap: 16px;
  63. .audit_card {
  64. border-radius: 8px 8px 8px 8px;
  65. border: 1px solid #EBEEF5;
  66. display: flex;
  67. flex-direction: column;
  68. gap:8px;
  69. /* 顶部布局 */
  70. .card_header{
  71. display: flex;
  72. justify-content: space-between;
  73. align-items: center;
  74. gap:10px;
  75. .header_left {
  76. display: flex;
  77. align-items: center;
  78. gap:8px;
  79. font-weight: 600;
  80. color: #333333;
  81. .status_tag {
  82. height: 25px;
  83. padding:0 8px;
  84. font-weight: 400;
  85. font-size: 12px;
  86. background: rgba(46,100,250,0.1);
  87. border-radius: 4px;
  88. color: #2E64FA;
  89. }
  90. .task_type{
  91. font-size: 12px;
  92. font-weight: 400;
  93. color:#fff;
  94. line-height: 17px;
  95. padding:4px 8px;
  96. background: #2E64FA;
  97. border-radius: 4px;
  98. }
  99. }
  100. .header_right{
  101. display: flex;
  102. gap:16px;
  103. .el-button{
  104. margin:0 !important;
  105. }
  106. }
  107. }
  108. /* 中部布局 */
  109. .card_info {
  110. display: flex;
  111. align-items: center;
  112. gap:11px;
  113. font-weight: 400;
  114. font-size: 12px;
  115. color: #333333;
  116. }
  117. /* 底部内容布局 */
  118. .card_content {
  119. font-weight: 400;
  120. font-size: 12px;
  121. color: #999999;
  122. }
  123. }
  124. }
  125. .follow_card{
  126. .audit_card{
  127. padding: 12px 16px;
  128. .header_left {
  129. font-size: 14px;
  130. }
  131. }
  132. }
  133. </style>