index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="">
  3. <view v-for="(item,index) in workPersonList" @click="chooseServiceTeacher(item)" class="h-item-row">
  4. <view class="h-img">
  5. <image :src="item.imgUrl || '/static/logo.png'" mode=""></image>
  6. </view>
  7. <view class="h-item-content">
  8. <view class="h-title">
  9. <view class="name">
  10. <text>{{item.personName}}</text>
  11. </view>
  12. <!-- <view class="btn">
  13. <text>包房</text>
  14. </view> -->
  15. </view>
  16. <view class="h-desc">
  17. <text>优质服务,从我做起</text>
  18. </view>
  19. <view class="h-content">
  20. <u-icon name="thumb-up" color="#333" size="16"></u-icon>
  21. <view class="h-text">
  22. <text>好评率:</text>
  23. </view>
  24. <view class="h-text1">
  25. <text>{{item.goodRate}}%</text>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data() {
  35. return {
  36. reqParm: {
  37. date: '',
  38. time: '',
  39. storeId: '',
  40. serviceTypeId:''
  41. },
  42. workPersonList: []
  43. }
  44. },
  45. onLoad(option) {
  46. this.reqParm.date = option.schedulingDate;
  47. this.reqParm.time = option.time;
  48. this.reqParm.storeId = option.organization;
  49. this.reqParm.serviceTypeId = option.serviceTypeId;
  50. // 查询服务工作人员列表
  51. // this.serviceWorkPersonList();
  52. this.getServicePerson();
  53. },
  54. methods: {
  55. // 查询服务工作人员列表
  56. serviceWorkPersonList() {
  57. this.$api.serviceWorkPersonList(this.reqParm).then((res) => {
  58. console.log(res)
  59. this.workPersonList = res.data.rows;
  60. this.getImgUrlByOssId(res.data.rows)
  61. })
  62. },
  63. // 查询服务工作人员列表
  64. getServicePerson() {
  65. this.$api.getServicePerson(this.reqParm).then((res) => {
  66. console.log(res)
  67. this.workPersonList = res.data.data;
  68. this.getImgUrlByOssId(res.data.data)
  69. })
  70. },
  71. // 获取图片
  72. getImgUrlByOssId(data){
  73. for (let i = 0; i < data.length; i++) {
  74. if (data[i].facePhoto){
  75. this.$api.getImage(data[i].facePhoto).then(res=>{
  76. data[i].imgUrl = res.data.data[0].url.replace(/^http:/, "https:")
  77. this.$set(this.workPersonList,i,data[i])
  78. });
  79. }
  80. }
  81. },
  82. // 选择服务老师
  83. chooseServiceTeacher(item) {
  84. console.log('+++++++++++++chooseServiceTeacher++++++++++++++',item)
  85. // 选择完成后返回上一页
  86. uni.navigateBack({
  87. delta: 1,
  88. });
  89. uni.$emit('selectedServiceTeacher', item);
  90. }
  91. },
  92. };
  93. </script>
  94. <style scoped lang="scss">
  95. .h-item-row {
  96. display: flex;
  97. font-family: PingFangSC-Medium, PingFang SC;
  98. margin: 12px;
  99. background: #fff;
  100. padding: 12px;
  101. .h-img {
  102. margin-right: 8px;
  103. border-radius: 10rpx;
  104. image {
  105. height: 80px;
  106. width: 80px;
  107. border-radius: 10rpx;
  108. }
  109. }
  110. .h-item-content {
  111. .h-title {
  112. font-size: 16px;
  113. font-weight: 500;
  114. line-height: 30px;
  115. display: flex;
  116. .name {
  117. padding-right: 6px;
  118. color: #111111;
  119. }
  120. .btn text {
  121. background: #fff5d0;
  122. color: #333333;
  123. font-size: 12px;
  124. border: 1px solid #FFE05C;
  125. padding-left: 10px;
  126. padding-right: 10px;
  127. }
  128. }
  129. .h-desc {
  130. font-size: 12px;
  131. font-weight: 400;
  132. color: #999999;
  133. line-height: 25px;
  134. }
  135. .h-content {
  136. display: flex;
  137. align-items: center;
  138. font-size: 12px;
  139. font-weight: 400;
  140. line-height: 25px;
  141. .h-text {
  142. color: #999999;
  143. }
  144. .h-text1 {
  145. color: #ED569F;
  146. }
  147. }
  148. }
  149. }
  150. </style>