addressBook.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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. <view class="title">外部维修成员({{ list.length }})</view>
  9. <!-- 每一个外部维修成员区域 -->
  10. <view class="box" v-for="item in list" :key="item.id" @click="handleEdit(item)">
  11. <img src="../../static/images/repairsImg/photo.png" />
  12. <view class="item_info">
  13. <view class="info_msg">
  14. {{ item.name }}
  15. <view class="msg_work">{{ item.work }}</view>
  16. </view>
  17. <view class="info_phone">{{ item.phone }}</view>
  18. </view>
  19. <view class="item_type color_type" v-if="item.type === 1">接单中</view>
  20. <view class="item_type color_type2" v-if="item.type === 2">订单饱和</view>
  21. <view class="item_type color_type3" v-if="item.type === 3">停止接单</view>
  22. </view>
  23. <view class="title">内部维修成员({{ list2.length }})</view>
  24. <!-- 每一个内部维修成员区域 -->
  25. <view class="box" v-for="item in list2" :key="item.id" @click="handleEdit(item)">
  26. <img src="../../static/images/repairsImg/photo.png" />
  27. <view class="item_info">
  28. <view class="info_msg">
  29. {{ item.name }}
  30. <view class="msg_work">{{ item.work }}</view>
  31. </view>
  32. <view class="info_phone">{{ item.phone }}</view>
  33. </view>
  34. <view class="item_type color_type" v-if="item.type === 1">接单中</view>
  35. <view class="item_type color_type2" v-if="item.type === 2">订单饱和</view>
  36. <view class="item_type color_type3" v-if="item.type === 3">停止接单</view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. export default {
  42. data() {
  43. return {
  44. list: [
  45. {
  46. id: 1,
  47. name: '张三',
  48. phone: '13659856958',
  49. type: 1,
  50. work: '电工'
  51. },
  52. {
  53. id: 2,
  54. name: '李四',
  55. phone: '13659856958',
  56. type: 2,
  57. work: '电工'
  58. },
  59. {
  60. id: 3,
  61. name: '张三',
  62. phone: '13659856958',
  63. type: 3,
  64. work: '电工'
  65. },
  66. {
  67. id: 4,
  68. name: '张三',
  69. phone: '13659856958',
  70. type: 1,
  71. work: '电工'
  72. },
  73. {
  74. id: 5,
  75. name: '李四',
  76. phone: '13659856958',
  77. type: 1,
  78. work: '电工'
  79. },
  80. {
  81. id: 6,
  82. name: '张三',
  83. phone: '13659856958',
  84. type: 1,
  85. work: '电工'
  86. }
  87. ],
  88. list2: [
  89. {
  90. id: 1,
  91. name: '张三',
  92. phone: '13659856958',
  93. type: 1,
  94. work: '电工'
  95. },
  96. {
  97. id: 2,
  98. name: '李四',
  99. phone: '13659856958',
  100. type: 3,
  101. work: '电工'
  102. },
  103. {
  104. id: 3,
  105. name: '张三',
  106. phone: '13659856958',
  107. type: 2,
  108. work: '电工'
  109. },
  110. {
  111. id: 4,
  112. name: '张三',
  113. phone: '13659856958',
  114. type: 1,
  115. work: '电工'
  116. }
  117. ]
  118. }
  119. },
  120. mounted() {
  121. console.log(666)
  122. },
  123. methods: {
  124. handleEdit(item) {
  125. // console.log(item.id)
  126. uni.showActionSheet({
  127. itemList: ['编辑', '删除'],
  128. success: (res) => {
  129. if (res.tapIndex === 0) {
  130. uni.navigateTo({
  131. url: '/pagesRepairs/edit/edit'
  132. })
  133. } else if (res.tapIndex === 1) {
  134. console.log('删除')
  135. }
  136. },
  137. fail: (res) => {}
  138. })
  139. }
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .container {
  145. width: 100vw;
  146. height: calc(100vh - 152rpx);
  147. overflow-y: auto;
  148. .search {
  149. display: flex;
  150. align-items: center;
  151. margin: 30rpx auto 30rpx;
  152. width: 690rpx;
  153. height: 80rpx;
  154. border-radius: 4rpx;
  155. background-color: #f2f2f2;
  156. img {
  157. margin: 0 20rpx;
  158. width: 40rpx;
  159. height: 40rpx;
  160. }
  161. input {
  162. flex: 1;
  163. padding: 10rpx;
  164. }
  165. }
  166. .title {
  167. display: flex;
  168. align-items: flex-end;
  169. box-sizing: border-box;
  170. padding: 0 30rpx;
  171. height: 80rpx;
  172. font-size: 36rpx;
  173. font-weight: bold;
  174. border-top: 1rpx solid #e5e5e5;
  175. }
  176. .box {
  177. display: flex;
  178. align-items: center;
  179. padding-right: 30rpx;
  180. height: 160rpx;
  181. border-bottom: 1rpx solid #e5e5e5;
  182. img {
  183. margin: 0 24rpx 0 27rpx;
  184. width: 82rpx;
  185. height: 82rpx;
  186. border-radius: 50%;
  187. }
  188. .item_info {
  189. display: flex;
  190. flex-direction: column;
  191. .info_msg {
  192. display: flex;
  193. align-items: center;
  194. font-size: 32rpx;
  195. font-weight: bold;
  196. .msg_work {
  197. display: flex;
  198. justify-content: center;
  199. align-items: center;
  200. margin-left: 13rpx;
  201. padding: 0 10rpx;
  202. height: 32rpx;
  203. color: #6fb6b8;
  204. font-size: 24rpx;
  205. font-weight: 400;
  206. border-radius: 7rpx;
  207. border: 1rpx solid #6fb6b8;
  208. }
  209. }
  210. .info_phone {
  211. margin-top: 10rpx;
  212. color: #808080;
  213. font-size: 28rpx;
  214. }
  215. }
  216. .item_type {
  217. margin-left: auto;
  218. font-size: 24rpx;
  219. }
  220. .color_type {
  221. color: #6fb6b8;
  222. }
  223. .color_type2 {
  224. color: #1e7dfb;
  225. }
  226. .color_type3 {
  227. color: #ff5733;
  228. }
  229. }
  230. }
  231. </style>