index.vue 4.6 KB

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