index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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="../../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.title}}</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. auth: true,
  38. schedulingDate: null,
  39. periodId: null,
  40. organization: null, // 所属门店
  41. },
  42. workPersonList: []
  43. }
  44. },
  45. onLoad(option) {
  46. this.reqParm.schedulingDate = option.schedulingDate;
  47. this.reqParm.periodId = option.periodId;
  48. this.reqParm.organization = option.organization;
  49. // 查询服务工作人员列表
  50. this.serviceWorkPersonList();
  51. },
  52. methods: {
  53. // 查询服务工作人员列表
  54. serviceWorkPersonList() {
  55. this.$api.serviceWorkPersonList(this.reqParm).then((res) => {
  56. console.log(res)
  57. this.workPersonList = res.data.rows;
  58. this.getImgUrlByOssId(res.data.rows)
  59. }).catch((err) => {
  60. console.log('+++++++++++++err++++++++++++++',err)
  61. uni.showToast({
  62. title: "操作失败"
  63. })
  64. });
  65. },
  66. // 获取图片
  67. getImgUrlByOssId(data){
  68. for (let i = 0; i < data.length; i++) {
  69. if (data[i].facePhoto){
  70. this.$api.getImgUrlByOssId(data[i].facePhoto).then(res=>{
  71. data[i].imgUrl = res.data.data[0].url.replace(/^http:/, "https:")
  72. });
  73. }
  74. }
  75. },
  76. // 选择服务老师
  77. chooseServiceTeacher(item) {
  78. console.log('+++++++++++++chooseServiceTeacher++++++++++++++',item)
  79. // 选择完成后返回上一页
  80. uni.navigateBack({
  81. delta: 1,
  82. });
  83. uni.$emit('selectedServiceTeacher', item);
  84. }
  85. },
  86. };
  87. </script>
  88. <style scoped lang="scss">
  89. .h-item-row {
  90. display: flex;
  91. font-family: PingFangSC-Medium, PingFang SC;
  92. margin: 12px;
  93. background: #fff;
  94. padding: 12px;
  95. .h-img {
  96. margin-right: 8px;
  97. image {
  98. height: 80px;
  99. width: 80px;
  100. }
  101. }
  102. .h-item-content {
  103. .h-title {
  104. font-size: 16px;
  105. font-weight: 500;
  106. line-height: 30px;
  107. display: flex;
  108. .name {
  109. padding-right: 6px;
  110. color: #111111;
  111. }
  112. .btn text {
  113. background: #fff5d0;
  114. color: #333333;
  115. font-size: 12px;
  116. border: 1px solid #FFE05C;
  117. padding-left: 10px;
  118. padding-right: 10px;
  119. }
  120. }
  121. .h-desc {
  122. font-size: 12px;
  123. font-weight: 400;
  124. color: #999999;
  125. line-height: 25px;
  126. }
  127. .h-content {
  128. display: flex;
  129. align-items: center;
  130. font-size: 12px;
  131. font-weight: 400;
  132. line-height: 25px;
  133. .h-text {
  134. color: #999999;
  135. }
  136. .h-text1 {
  137. color: #ED569F;
  138. }
  139. }
  140. }
  141. }
  142. </style>