index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view>
  3. <view class="jiazheng-uni-list">
  4. <view class="jiazheng-search-box">
  5. <view @click="clickAlltype" class="select-item-box">
  6. <text>全部类型</text>
  7. <icon :class="allJtClass" />
  8. </view>
  9. <view class="all-type-list">
  10. <view v-if="isOpen" v-for="(item,index) in allType" :key="index" @click="onSelectCell(item,index)"
  11. class="all-type-item all-type-active">
  12. <view class="le-dropdown-cell-active-text">{{item.label}}</view>
  13. <view v-show="item.value==typeChecked"></view>
  14. </view>
  15. </view>
  16. <view class="jiazheng-search-right">
  17. <!-- 当前点击 增加 saixuan-active-->
  18. <view class="saixuan-item-box saixuan-active">
  19. <text>更新时间</text>
  20. <icon :class="updataJtClass" />
  21. </view>
  22. <view class="saixuan-item-box">
  23. <!-- class切换 saixuan-jt-default saixuan-jt-click-->
  24. <text>录入时间</text>
  25. <icon :class="luruJtClass" />
  26. </view>
  27. <uni-icons type="search" size="16" color="#000" @click="toggle('top')"></uni-icons>
  28. </view>
  29. </view>
  30. <view class="wgy" @click="lookUserInfo" >
  31. <view>
  32. <view>王一一123</view>
  33. <view>分享阿斯蒂芬</view>
  34. <view>打电话</view>
  35. </view>
  36. <view>
  37. <image src="" mode=""></image>
  38. <view>
  39. <p> 1000岁|3年经验</p>
  40. <p>四川成都人</p>
  41. </view>
  42. <view>
  43. 待岗
  44. </view>
  45. </view>
  46. </view>
  47. <view>
  48. <!-- 普通弹窗 -->
  49. <uni-popup ref="popup" background-color="#fff">
  50. <view>
  51. asdfdsfadsf阿萨德发生的发的顺丰
  52. </view>
  53. </uni-popup>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script setup>
  59. import {
  60. ref
  61. } from "vue";
  62. import {
  63. onLoad
  64. } from "@dcloudio/uni-app";
  65. import{getJiazhengList} from "@/api/jiazheng.js"
  66. // import {
  67. // DropdownList
  68. // } from "./data.js";
  69. // const menuList = ref(DropdownList)
  70. const allType = [{
  71. label: "由近到远",
  72. value: 0
  73. },
  74. {
  75. label: "由远到近",
  76. value: 1
  77. },
  78. {
  79. label: "由远到近",
  80. value: 2
  81. },
  82. {
  83. label: "由远到近",
  84. value: 3
  85. },
  86. ]
  87. let isOpen = ref(false)
  88. let typeChecked = ref(1)
  89. const popup = ref(null);
  90. const allJtClass = 'select-jt-default';
  91. const updataJtClass = 'saixuan-jt-default';
  92. const luruJtClass = 'saixuan-jt-click';
  93. const clickAlltype = (data) => {
  94. isOpen.value = true
  95. }
  96. const onSelectCell = (data, index) => {
  97. console.log('data', data);
  98. console.log('index', index);
  99. // isOpen.value = false;
  100. // allJtClass = 'select-jt-click'
  101. }
  102. const toggle = (data, index) => {
  103. popup.value.open('top')
  104. }
  105. const lookUserInfo = (data, index) => {
  106. uni.redirectTo({
  107. url: `/pages/admin/Jiazheng/jiazhengUserInfo`
  108. })
  109. }
  110. function getDataList(){
  111. let req ={
  112. "leixing": "",
  113. "page": 1,
  114. "realName": "",
  115. "size": 10,
  116. "sortRule": 0,
  117. "sortType": 0,
  118. "userName": ""
  119. }
  120. getJiazhengList(req).then(res=>{
  121. console.log('res',res);
  122. })
  123. }
  124. onLoad(() => {
  125. getDataList()
  126. })
  127. </script>
  128. <style>
  129. .jiazheng-uni-list {
  130. display: flex;
  131. width: 100%;
  132. flex-direction: column;
  133. }
  134. .jiazheng-uni-list-left {
  135. position: relative;
  136. display: flex;
  137. flex-direction: row;
  138. justify-content: space-between;
  139. align-items: center;
  140. }
  141. </style>