listItem.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view class="item">
  3. <view class="item-img">
  4. <img :src="baseUrl + data.avatar" alt="" style="width: 112rpx; height: 112rpx;">
  5. </view>
  6. <view class="item-info">
  7. <view class="item-title-box">
  8. <view class="item-title">
  9. <view class="item-name">
  10. {{ data.name }}
  11. </view>
  12. <view v-if="data.score || ['0','1'].includes(String(data.orderStatus))">
  13. <dict-tag :options="lrr_service_status" :value="String(data.orderStatus)" />
  14. </view>
  15. <text v-else class="color-blue ">
  16. 待评价
  17. </text>
  18. </view>
  19. <view class="item-de">
  20. <img src="/static/serverImg/list/ad2.png" alt="" style="width: 28rpx;height: 28rpx;">
  21. {{ data.address }}
  22. </view>
  23. <view class="item-time">
  24. {{ data.createTime }}
  25. </view>
  26. </view>
  27. <view class="item-box">
  28. <view class="item-price"><span class="item-price-yuan">¥</span> {{ data.serviceOnePrice || 0 }}</view>
  29. <view class="item-btns">
  30. <view class="btn-s" @click="onClick(1)">查看</view>
  31. <view class="btn-m" @click="onClick(2)">
  32. <up-icon name="chat" color="#ffffff" size="20" ></up-icon>
  33. <!-- <img src="/static/serverImg/list/mess.png" alt=""
  34. style="width: 28rpx;height: 28rpx;margin-right: 8rpx;margin-top: 6rpx;"> -->
  35. <text style="margin-left: 8rpx;">沟通</text></view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script setup>
  42. import { inject } from 'vue';
  43. import DictTag from '@/components/DictTag/index.vue'
  44. import config from '@/config'
  45. const baseUrl = config.baseUrl
  46. const props = defineProps({
  47. data: {
  48. type: Object,
  49. default: () => {
  50. return {}
  51. }
  52. },
  53. });
  54. const inject_click = inject('onClick');
  55. const lrr_service_status = inject('lrr_service_status');
  56. const btn_style = ` width: 120rpx; height: 50rpx; font-size: 24rpx;border-radius: 25rpx;margin-left: 12rpx;`;
  57. /**
  58. * 1: 查看
  59. * 2:沟通
  60. */
  61. function onClick(type) {
  62. inject_click(props.data, type);
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .item {
  67. height: 294rpx;
  68. opacity: 1;
  69. border-radius: 24rpx;
  70. background: rgba(255, 255, 255, 1);
  71. margin-bottom: 24rpx;
  72. padding: 32rpx;
  73. display: flex;
  74. align-items: flex-start;
  75. .item-img {
  76. margin-right: 32rpx;
  77. }
  78. .item-info {
  79. display: flex;
  80. flex-direction: column;
  81. flex: 1;
  82. justify-content: space-between;
  83. height: 100%;
  84. .item-title-box {
  85. .item-title {
  86. font-size: 30rpx;
  87. font-weight: 400;
  88. line-height: 45rpx;
  89. color: rgba(26, 26, 26, 1);
  90. display: flex;
  91. align-items: center;
  92. justify-content: space-between;
  93. margin-bottom: 15rpx;
  94. }
  95. }
  96. .item-de {
  97. display: flex;
  98. font-size: 26rpx;
  99. font-weight: 400;
  100. line-height: 39rpx;
  101. color: rgba(153, 153, 153, 1);
  102. display: flex;
  103. align-items: center;
  104. justify-content: flex-start;
  105. }
  106. .item-time {
  107. font-size: 26rpx;
  108. font-weight: 400;
  109. letter-spacing: 0rpx;
  110. line-height: 39rpx;
  111. color: rgba(153, 153, 153, 1);
  112. margin-bottom: 40rpx;
  113. }
  114. .item-box {
  115. display: flex;
  116. align-items: center;
  117. justify-content: space-between;
  118. .item-price {
  119. font-size: 30rpx;
  120. font-weight: 400;
  121. letter-spacing: 0rpx;
  122. line-height: 45rpx;
  123. color: rgba(203, 26, 28, 1);
  124. }
  125. .item-btns {
  126. display: flex;
  127. align-items: center;
  128. justify-content: center;
  129. .btn-s {
  130. font-size: 26rpx;
  131. font-weight: 400;
  132. line-height: 39rpx;
  133. color: rgba(221, 94, 69, 1);
  134. text-align: center;
  135. padding: 16rpx 0;
  136. width: 156.03rpx;
  137. border-radius: 8rpx;
  138. background: rgba(0, 0, 0, 0);
  139. display: flex;
  140. justify-content: center;
  141. border: 0rpx solid rgba(221, 94, 69, 1);
  142. }
  143. .btn-m {
  144. width: 188.03rpx;
  145. border-radius: 8rpx;
  146. font-size: 26rpx;
  147. background: rgba(221, 94, 69, 1);
  148. text-align: left;
  149. margin-left: 24rpx;
  150. display: flex;
  151. justify-content: center;
  152. color: rgba(255, 255, 255, 1);
  153. padding: 16rpx 0;
  154. width: 188.03rpx;
  155. }
  156. }
  157. }
  158. }
  159. }
  160. </style>