index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view>
  3. <view class="jiazheng-uni-list">
  4. <view class="icon-title-navBar-box">
  5. <view @click="goUpPage" class="nav-bar-icon"></view>
  6. <text class="nav-bar-title">家政人员</text>
  7. <text class="nav-bar-title">+</text>
  8. <uni-icons type="search" size="16" color="#000" @click="toggle('top')"></uni-icons>
  9. </view>
  10. <view class="jiazheng-search-box">
  11. <view @click="clickAlltype" class="select-item-box">
  12. <text>全部类型</text>
  13. <icon :class="allJtClass" />
  14. </view>
  15. <view class="all-type-list">
  16. <view v-if="isOpen" v-for="(item,index) in allType" :key="index" @click="onSelectCell(item,index)"
  17. class="all-type-item all-type-active">
  18. <view class="le-dropdown-cell-active-text">{{item.label}}</view>
  19. <view v-show="item.value==typeChecked"></view>
  20. </view>
  21. </view>
  22. <view class="jiazheng-search-right">
  23. <!-- 当前点击 增加 saixuan-active-->
  24. <view class="saixuan-item-box saixuan-active">
  25. <text @click="timeClick">更新时间</text>
  26. <icon :class="updataJtClass" />
  27. </view>
  28. <view class="saixuan-item-box">
  29. <!-- class切换 saixuan-jt-default saixuan-jt-click-->
  30. <text>录入时间</text>
  31. <icon :class="luruJtClass" />
  32. </view>
  33. </view>
  34. </view>
  35. <view class="wgy" @click="lookUserInfo">
  36. <view>
  37. <view>王一一123</view>
  38. <view>分享阿斯蒂芬</view>
  39. <view>打电话</view>
  40. </view>
  41. <view>
  42. <image src="" mode=""></image>
  43. <view>
  44. <p> 1000岁|3年经验</p>
  45. <p>四川成都人</p>
  46. </view>
  47. <view>
  48. 待岗
  49. </view>
  50. </view>
  51. </view>
  52. <view>
  53. <!-- 普通弹窗 -->
  54. <uni-popup ref="popup" background-color="#fff">
  55. <view>
  56. <view>
  57. <uni-section title="全部" type="line">
  58. <view class="uni-px-5 uni-pb-5">
  59. <uni-data-select v-model="value" :localdata="range"
  60. @change="change"></uni-data-select>
  61. </view>
  62. <view class="phone-search-box">
  63. <input class="search-input" placeholder="请输入职业名称" v-model="zyName" />
  64. <view class="search-icon" @click="handleSearch">
  65. <uni-icons type="search" size="24" color="#fff"></uni-icons>
  66. </view>
  67. </view>
  68. </uni-section>
  69. </view>
  70. </view>
  71. </uni-popup>
  72. </view>
  73. </view>
  74. </view>
  75. </template>
  76. <script setup>
  77. import {
  78. ref
  79. } from "vue";
  80. import {
  81. onLoad
  82. } from "@dcloudio/uni-app";
  83. import {
  84. getJiazhengList
  85. } from "@/api/jiazheng.js"
  86. // import {
  87. // DropdownList
  88. // } from "./data.js";
  89. // const menuList = ref(DropdownList)
  90. const allType = [{
  91. label: "由近到远",
  92. value: 0
  93. },
  94. {
  95. label: "由远到近",
  96. value: 1
  97. },
  98. {
  99. label: "由远到近",
  100. value: 2
  101. },
  102. {
  103. label: "由远到近",
  104. value: 3
  105. },
  106. ]
  107. let range = ref([{
  108. "value": 0,
  109. "text": "篮球",
  110. "disable": true
  111. },
  112. {
  113. "value": 1,
  114. "text": "足球"
  115. },
  116. {
  117. "value": 2,
  118. "text": "游泳"
  119. }
  120. ])
  121. let zyName = ref('')
  122. let value = ref(0)
  123. let isOpen = ref(false)
  124. let typeChecked = ref(1)
  125. const popup = ref(null);
  126. const allJtClass = 'select-jt-default';
  127. const updataJtClass = 'saixuan-jt-default';
  128. const luruJtClass = 'saixuan-jt-click';
  129. const clickAlltype = (data) => {
  130. isOpen.value = true
  131. }
  132. const onSelectCell = (data, index) => {
  133. console.log('data', data);
  134. console.log('index', index);
  135. // isOpen.value = false;
  136. // allJtClass = 'select-jt-click'
  137. }
  138. const toggle = (data, index) => {
  139. popup.value.open('top')
  140. }
  141. const lookUserInfo = (data, index) => {
  142. uni.redirectTo({
  143. url: `/pages/admin/Jiazheng/jiazhengUserInfo`
  144. })
  145. }
  146. function goUpPage(){
  147. uni.redirectTo({
  148. url: `/pages/admin/ShouYe/shouye`
  149. })
  150. }
  151. function timeClick(){
  152. }
  153. function change(){
  154. }
  155. function handleSearch(){
  156. }
  157. function getDataList() {
  158. let req = {
  159. "leixing": "",
  160. "page": 1,
  161. "realName": "",
  162. "size": 10,
  163. "sortRule": 0,
  164. "sortType": 0,
  165. "userName": ""
  166. }
  167. getJiazhengList(req).then(res => {
  168. console.log('res', res);
  169. })
  170. }
  171. onLoad(() => {
  172. getDataList()
  173. })
  174. </script>
  175. <style>
  176. .jiazheng-uni-list {
  177. display: flex;
  178. width: 100%;
  179. flex-direction: column;
  180. }
  181. .jiazheng-uni-list-left {
  182. position: relative;
  183. display: flex;
  184. flex-direction: row;
  185. justify-content: space-between;
  186. align-items: center;
  187. }
  188. </style>