index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. serviceWorkPersonList({
  56. data: this.reqParm
  57. }).then((res) => {
  58. this.workPersonList = res.rows;
  59. }).catch(() => {
  60. uni.showToast({
  61. title: "操作失败"
  62. })
  63. });
  64. },
  65. // 获取图片
  66. async getImgUrlByOssId(data) {
  67. for (let i = 0; i < data.length; i++) {
  68. const item = data[i];
  69. let url = await this.$getImgUrlByOssId(item.facePhoto);
  70. item.imgUrl = url;
  71. }
  72. this.serviceObjectList = data
  73. return data;
  74. },
  75. // 选择服务老师
  76. chooseServiceTeacher(item) {
  77. // 选择完成后返回上一页
  78. uni.navigateBack({
  79. delta: 1,
  80. });
  81. uni.$emit('selectedDataFromChild', item);
  82. }
  83. },
  84. };
  85. </script>
  86. <style scoped lang="scss">
  87. .h-item-row {
  88. display: flex;
  89. font-family: PingFangSC-Medium, PingFang SC;
  90. margin: 12px;
  91. background: #fff;
  92. padding: 12px;
  93. .h-img {
  94. margin-right: 8px;
  95. image {
  96. height: 80px;
  97. width: 80px;
  98. }
  99. }
  100. .h-item-content {
  101. .h-title {
  102. font-size: 16px;
  103. font-weight: 500;
  104. line-height: 30px;
  105. display: flex;
  106. .name {
  107. padding-right: 6px;
  108. color: #111111;
  109. }
  110. .btn text {
  111. background: #fff5d0;
  112. color: #333333;
  113. font-size: 12px;
  114. border: 1px solid #FFE05C;
  115. padding-left: 10px;
  116. padding-right: 10px;
  117. }
  118. }
  119. .h-desc {
  120. font-size: 12px;
  121. font-weight: 400;
  122. color: #999999;
  123. line-height: 25px;
  124. }
  125. .h-content {
  126. display: flex;
  127. align-items: center;
  128. font-size: 12px;
  129. font-weight: 400;
  130. line-height: 25px;
  131. .h-text {
  132. color: #999999;
  133. }
  134. .h-text1 {
  135. color: #ED569F;
  136. }
  137. }
  138. }
  139. }
  140. </style>