listItem.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="item">
  3. <view class="item-img">
  4. <img src="/static/img/dd.png" alt="" />
  5. </view>
  6. <view class="item-info">
  7. <view class="item-title-box">
  8. <view class="item-title">
  9. <view class="item-name">
  10. <!-- <dict-tag :options="lrr_service_category" :value="data.serviceCategory" /> -->
  11. 姓名: {{ }}
  12. <view v-if="data.serviceType">
  13. -
  14. <dict-tag :options="lrr_study" :value="data.serviceType" v-if="data.serviceCategory === 2" />
  15. <dict-tag :options="lrr_chitchat" :value="data.serviceType" v-if="data.serviceCategory === 1" />
  16. </view>
  17. </view>
  18. <dict-tag :options="order_status" :value="data.orderStatus" />
  19. </view>
  20. <view class="item-de">
  21. 服务地址:{{ data.address }}
  22. </view>
  23. </view>
  24. <view class="item-box">
  25. <view class="item-price"><span class="item-price-yuan">¥</span> {{ data.serviceOnePrice || 0 }}</view>
  26. <view class="item-btns">
  27. <up-button type="error" text="查看" size="mini" :custom-style="btn_style"
  28. @click="onClick(1)"></up-button>
  29. <!-- <up-button type="error" text="沟通" size="mini" :custom-style="btn_style" @click="onClick(2)"></up-button>
  30. <up-button type="error" text="上传照片" size="mini" :custom-style="btn_style" @click="onClick(3)"></up-button> -->
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script setup>
  37. import { inject } from 'vue';
  38. import DictTag from '@/components/DictTag/index.vue'
  39. import { computed } from 'vue';
  40. const props = defineProps({
  41. data: {
  42. type: Object,
  43. default: () => {
  44. return {}
  45. }
  46. }
  47. });
  48. const inject_click = inject('onClick');
  49. const lrr_service_category = inject('lrr_service_category');
  50. const lrr_chitchat = inject('lrr_chitchat');
  51. const lrr_study = inject('lrr_study');
  52. const order_status = inject('order_status');
  53. const status_map = {
  54. 1: '待服务',
  55. 2: '已取消',
  56. 3: '进行中',
  57. 4: '已完成',
  58. 5: '申请退款中',
  59. 6: '已退款',
  60. 7: '部分退款',
  61. 8: '待确认'
  62. }
  63. const status_color_map = {
  64. 1: '#3c9cff',
  65. 2: '#f56c6c',
  66. 3: '#3c9cff',
  67. 4: 'rgba(56, 148, 254, 1)',
  68. 5: 'orange',
  69. 6: '#3c9cff',
  70. 7: 'orange',
  71. 8: '#3c9cff'
  72. }
  73. const statysColor = computed(() => {
  74. return {
  75. color: status_color_map[props.data.orderStatus]
  76. }
  77. });
  78. const btn_style = ` width: 120rpx; height: 50rpx; font-size: 24rpx;border-radius: 25rpx;margin-left: 12rpx;`;
  79. /**
  80. * 1: 查看
  81. * 2:沟通
  82. * 3:上传照片
  83. */
  84. function onClick() {
  85. inject_click(props.data, 1);
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .item {
  90. height: 120px;
  91. border-radius: 10px;
  92. background: rgba(255, 255, 255, 1);
  93. padding: 12px;
  94. margin-bottom: 12px;
  95. display: flex;
  96. .item-img {
  97. width: 96px;
  98. height: 96px;
  99. margin-right: 12px;
  100. image {
  101. height: 100%;
  102. width: 100%;
  103. }
  104. }
  105. .item-info {
  106. flex: 1;
  107. display: flex;
  108. flex-direction: column;
  109. justify-content: space-between;
  110. .item-title-box {
  111. .item-title {
  112. font-size: 14px;
  113. font-weight: 700;
  114. letter-spacing: 0px;
  115. line-height: 20.27px;
  116. color: rgba(51, 51, 51, 1);
  117. text-align: left;
  118. vertical-align: top;
  119. margin-bottom: 10px;
  120. display: flex;
  121. align-content: center;
  122. justify-content: space-between;
  123. .item-name {
  124. flex: 1;
  125. display: flex;
  126. // display: -webkit-box;
  127. // -webkit-box-orient: vertical;
  128. // -webkit-line-clamp: 1;
  129. // overflow: hidden;
  130. // text-overflow: ellipsis;
  131. // word-break: break-all;
  132. }
  133. .item-tag {
  134. // color: #3c9cff;
  135. }
  136. }
  137. .item-de {
  138. font-size: 12px;
  139. font-weight: 500;
  140. letter-spacing: 0px;
  141. line-height: 17.38px;
  142. color: rgba(153, 153, 153, 1);
  143. text-align: left;
  144. vertical-align: top;
  145. display: -webkit-box;
  146. -webkit-box-orient: vertical;
  147. -webkit-line-clamp: 2;
  148. overflow: hidden;
  149. text-overflow: ellipsis;
  150. word-break: break-all;
  151. }
  152. }
  153. .item-box {
  154. display: flex;
  155. align-content: flex-end;
  156. justify-content: space-between;
  157. .item-price {
  158. font-size: 18px;
  159. font-weight: 500;
  160. letter-spacing: 0px;
  161. line-height: 21.09px;
  162. color: rgba(246, 74, 31, 1);
  163. text-align: center;
  164. vertical-align: top;
  165. .item-price-yuan {
  166. font-size: 13px;
  167. font-weight: 700;
  168. letter-spacing: 0px;
  169. line-height: 21.09px;
  170. color: rgba(246, 74, 31, 1);
  171. }
  172. }
  173. .item-btns {
  174. display: flex;
  175. }
  176. }
  177. }
  178. }
  179. </style>