helpPeople.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <view class="container">
  3. <!-- 输入框区域 -->
  4. <view class="search">
  5. <img src="../../static/images/repairsImg/search.png" />
  6. <input type="text" placeholder="请输入搜索内容" />
  7. </view>
  8. <!-- 协作人区域 -->
  9. <view class="body">
  10. <!-- 每一个协作人区域 -->
  11. <view class="body_item" v-for="item in list" :key="item.id" @click="change(item)">
  12. <radio color="#6FB6B8" :checked="item.checked" />
  13. <img src="../../static/images/repairsImg/photo.png" />
  14. <view class="item_info">
  15. <view class="info_msg">
  16. {{ item.name }}
  17. <view class="msg_work">{{ item.work }}</view>
  18. </view>
  19. <view class="info_phone">{{ item.phone }}</view>
  20. </view>
  21. <view class="item_type color_type" v-if="item.type === 1">接单中</view>
  22. <view class="item_type color_type2" v-if="item.type === 2">订单饱和</view>
  23. <view class="item_type color_type3" v-if="item.type === 3">停止接单</view>
  24. </view>
  25. </view>
  26. <view class="btn" v-if="checkList.length">确认派单</view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. list: [
  34. {
  35. id: 1,
  36. name: '张三',
  37. phone: '13659856958',
  38. work: '电工',
  39. type: 1,
  40. checked: false
  41. },
  42. {
  43. id: 2,
  44. name: '李四',
  45. phone: '13659856958',
  46. work: '电工',
  47. type: 2,
  48. checked: false
  49. },
  50. {
  51. id: 3,
  52. name: '张三',
  53. phone: '13659856958',
  54. work: '电工',
  55. type: 3,
  56. checked: false
  57. },
  58. {
  59. id: 4,
  60. name: '张三',
  61. phone: '13659856958',
  62. work: '电工',
  63. type: 1,
  64. checked: false
  65. },
  66. {
  67. id: 5,
  68. name: '李四',
  69. phone: '13659856958',
  70. work: '电工',
  71. type: 2,
  72. checked: false
  73. },
  74. {
  75. id: 6,
  76. name: '张三',
  77. phone: '13659856958',
  78. work: '电工',
  79. type: 3,
  80. checked: false
  81. }
  82. ],
  83. checkList: []
  84. }
  85. },
  86. onLoad(options) {
  87. console.log(options)
  88. if (options.type) {
  89. uni.setNavigationBarTitle({
  90. title: '派单'
  91. })
  92. }
  93. },
  94. methods: {
  95. change(item) {
  96. item.checked = !item.checked
  97. let temList = []
  98. this.list.forEach((item) => {
  99. if (item.checked) {
  100. temList.push(item.id)
  101. }
  102. })
  103. // console.log(temList)
  104. this.checkList = temList
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. .container {
  111. .search {
  112. display: flex;
  113. align-items: center;
  114. margin: 30rpx auto 30rpx;
  115. width: 690rpx;
  116. height: 80rpx;
  117. border-radius: 4rpx;
  118. background-color: #f2f2f2;
  119. img {
  120. margin: 0 20rpx;
  121. width: 40rpx;
  122. height: 40rpx;
  123. }
  124. input {
  125. flex: 1;
  126. padding: 10rpx;
  127. }
  128. }
  129. .body {
  130. height: 810rpx;
  131. border-top: 1rpx solid #e5e5e5;
  132. overflow-y: auto;
  133. .body_item {
  134. display: flex;
  135. align-items: center;
  136. padding: 0 30rpx;
  137. height: 162rpx;
  138. border-bottom: 1rpx solid #e5e5e5;
  139. img {
  140. margin: 0 24rpx 0 27rpx;
  141. width: 82rpx;
  142. height: 82rpx;
  143. border-radius: 50%;
  144. }
  145. .item_info {
  146. display: flex;
  147. flex-direction: column;
  148. .info_msg {
  149. display: flex;
  150. align-items: center;
  151. font-size: 32rpx;
  152. font-weight: bold;
  153. .msg_work {
  154. display: flex;
  155. justify-content: center;
  156. align-items: center;
  157. margin-left: 13rpx;
  158. padding: 0 10rpx;
  159. height: 32rpx;
  160. color: #6fb6b8;
  161. font-size: 24rpx;
  162. font-weight: 400;
  163. border-radius: 7rpx;
  164. border: 1rpx solid #6fb6b8;
  165. }
  166. }
  167. .info_phone {
  168. margin-top: 10rpx;
  169. color: #808080;
  170. font-size: 28rpx;
  171. }
  172. }
  173. .item_type {
  174. margin-left: auto;
  175. font-size: 24rpx;
  176. }
  177. .color_type {
  178. color: #6fb6b8;
  179. }
  180. .color_type2 {
  181. color: #1e7dfb;
  182. }
  183. .color_type3 {
  184. color: #ff5733;
  185. }
  186. }
  187. }
  188. .btn {
  189. position: absolute;
  190. bottom: 66rpx;
  191. display: flex;
  192. justify-content: center;
  193. align-items: center;
  194. margin: 0 30rpx;
  195. width: 690rpx;
  196. height: 100rpx;
  197. color: #fff;
  198. font-size: 32rpx;
  199. border-radius: 12rpx;
  200. background-color: #6fb6b8;
  201. }
  202. }
  203. </style>