index.vue 4.1 KB

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