btnPopous.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. <template>
  2. <view>
  3. <view class="jobAll" :class="topY==true?'end':'start'" @touchstart="start" @touchend="end"
  4. @touchmove.stop="move">
  5. <view class="jobAll-search flex justify-center">
  6. <view class="jobAll-search-box">
  7. <u-dropdown :mask='false' active-color="#00B88F">
  8. <u-dropdown-item v-model="value1" title="岗位" @change="change1"
  9. :options="options1"></u-dropdown-item>
  10. <u-dropdown-item v-model="value2" title="经验" @change="change2"
  11. :options="options2"></u-dropdown-item>
  12. <u-dropdown-item v-model="value3" title="薪资" @change="change3"
  13. :options="options3"></u-dropdown-item>
  14. <u-dropdown-item v-model="value4" title="城市" @change="change4"
  15. :options="options4"></u-dropdown-item>
  16. </u-dropdown>
  17. </view>
  18. </view>
  19. <view class="jobAll-item flex justify-center">
  20. <view class="jobAll-item-box">
  21. <scroll-view scroll-y="true" v-if="list.length>0" style="width: 100%;height: 100%;"
  22. :refresher-enabled="true" :refresher-triggered="refresher" @refresherpulling="scrolltoupper"
  23. @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower">
  24. <view class="jobAll-item-box-item" v-for="(item,index) in list" :key="index"
  25. @tap.native="gotos(item.postPushId)">
  26. <view class="jobAll-item-box-item-title flex align-center justify-between">
  27. <text>{{item.ruleClassifyName}}</text>
  28. <text>{{item.salaryRange}}</text>
  29. </view>
  30. <view class="jobAll-item-box-item-label flex align-center flex-wrap">
  31. <view class="jobAll-item-box-item-labels">
  32. {{item.education}}
  33. </view>
  34. <view class="jobAll-item-box-item-labels">
  35. {{item.experience}}
  36. </view>
  37. <view class="jobAll-item-box-item-labels">
  38. {{item.industry}}
  39. </view>
  40. </view>
  41. <view class="jobAll-item-box-item-line" v-if="(index + 1) != list.length">
  42. </view>
  43. </view>
  44. </scroll-view>
  45. <empty v-else />
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import empty from '../empty.vue'
  53. export default {
  54. name: "btnPopous",
  55. components: {
  56. empty
  57. },
  58. props: {
  59. //公司id
  60. companyId: {
  61. type: String,
  62. default: ''
  63. },
  64. //城市数组
  65. cittArr: {
  66. type: Array,
  67. default: []
  68. },
  69. //薪资数组
  70. moneyArr: {
  71. type: Array,
  72. default: []
  73. },
  74. //经验数组
  75. jyArr: {
  76. type: Array,
  77. default: []
  78. },
  79. //岗位分类
  80. classify: {
  81. type: Array,
  82. default: []
  83. }
  84. },
  85. data() {
  86. return {
  87. refresher: false,
  88. list: [],
  89. clientX: '',
  90. clientY: '',
  91. topY: false,
  92. value1: 1,
  93. value2: 1,
  94. value3: 1,
  95. value4: 1,
  96. options1: [],
  97. options2: [],
  98. options3: [],
  99. options4: [],
  100. page: 1,
  101. pages: 1,
  102. limit: 10,
  103. projectName: '', //岗位名称
  104. address: '', //城市
  105. salaryRange: '', //薪资
  106. experience: '', //经验
  107. };
  108. },
  109. watch: {
  110. //城市
  111. cittArr(newArr, oldArr) {
  112. //拿到最新传递的城市数据,处理成需要的格式
  113. let arr = [{
  114. label: '全部',
  115. value: '',
  116. }]
  117. this.cittArr.map(item => {
  118. let obj = {
  119. label: item,
  120. value: item,
  121. }
  122. arr.push(obj)
  123. })
  124. this.options4 = arr
  125. },
  126. //岗位分类列表
  127. classify(newArr, oldArr) {
  128. //拿到最新传递的岗位数据,处理成需要的格式
  129. let arr = [{
  130. label: '全部',
  131. value: '',
  132. }]
  133. this.classify.map(item => {
  134. let obj = {
  135. label: item,
  136. value: item,
  137. }
  138. arr.push(obj)
  139. })
  140. this.options1 = arr
  141. },
  142. //经验
  143. jyArr(newArr, oldArr) {
  144. //拿到最新传递的经验数据,处理成需要的格式
  145. let arr = [{
  146. label: '全部',
  147. value: '',
  148. }]
  149. this.jyArr.map(item => {
  150. let obj = {
  151. label: item.value,
  152. value: item.value,
  153. }
  154. arr.push(obj)
  155. })
  156. this.options2 = arr
  157. },
  158. //薪资
  159. moneyArr(newArr, oldArr) {
  160. //拿到最新传递的薪资数据,处理成需要的格式
  161. let arr = [{
  162. label: '全部',
  163. value: '',
  164. }]
  165. this.moneyArr.map(item => {
  166. let obj = {
  167. label: item.value,
  168. value: item.value,
  169. }
  170. arr.push(obj)
  171. })
  172. this.options3 = arr
  173. },
  174. },
  175. created() {
  176. this.userGetPostPushList()
  177. },
  178. methods: {
  179. change1(e) {
  180. this.projectName = e
  181. this.userGetPostPushList()
  182. },
  183. change2(e) {
  184. this.experience = e
  185. this.userGetPostPushList()
  186. },
  187. change3(e) {
  188. this.salaryRange = e
  189. this.userGetPostPushList()
  190. },
  191. change4(e) {
  192. this.address = e
  193. this.userGetPostPushList()
  194. },
  195. /**
  196. * 上拉加载更多
  197. */
  198. scrolltolower() {
  199. if (this.page < this.pages) {
  200. this.page += 1
  201. this.userGetPostPushList()
  202. }
  203. },
  204. /**
  205. * 获取岗位列表
  206. */
  207. userGetPostPushList() {
  208. let data = {
  209. companyId: this.companyId,
  210. page: this.page,
  211. limit: this.limit,
  212. ruleClassifyName: this.projectName, //岗位名称
  213. city: this.address, //城市
  214. salaryRange: this.salaryRange, //薪资
  215. experience: this.experience, //经验
  216. }
  217. this.$Request.getT("/app/postPush/userGetPostPushList", data).then(res => {
  218. if (res.code == 0) {
  219. this.pages = res.data.pages
  220. if (this.page == 1) {
  221. this.list = res.data.records
  222. } else {
  223. this.list = [...this.list, ...res.data.records]
  224. }
  225. }
  226. })
  227. },
  228. gotos(postPushId) {
  229. console.log('rrrrrrrrrrrrrrrrrrrrrrrr')
  230. uni.navigateTo({
  231. url: '/pages/index/game/order?postPushId=' + postPushId
  232. })
  233. },
  234. refresherrefresh() {
  235. this.refresher = false
  236. },
  237. scrolltoupper(e) {
  238. // this.refresher = true
  239. this.refresher = true
  240. this.topY = false
  241. },
  242. start(e) {
  243. this.clientX = e.changedTouches[0].clientX
  244. this.clientY = e.changedTouches[0].clientY
  245. },
  246. end(e) {
  247. let subX = e.changedTouches[0].clientX - this.clientX
  248. let subY = e.changedTouches[0].clientY - this.clientY
  249. if (subY < -50) {
  250. this.topY = true
  251. } else if (subY > 200) {
  252. this.topY = false
  253. }
  254. },
  255. move(e) {
  256. },
  257. }
  258. }
  259. </script>
  260. <style lang="scss">
  261. .jobAll {
  262. width: 100%;
  263. height: 100vh;
  264. background-color: #FFFFFF;
  265. border-radius: 30px 30px 0px 0px;
  266. position: fixed;
  267. z-index: 99999;
  268. .jobAll-search {
  269. width: 100%;
  270. margin-top: 20rpx;
  271. .jobAll-search-box {
  272. width: 686rpx;
  273. height: 100%;
  274. }
  275. }
  276. .jobAll-item {
  277. width: 100%;
  278. height: 80vh;
  279. margin-top: 60rpx;
  280. .jobAll-item-box {
  281. width: 686rpx;
  282. height: 100%;
  283. .jobAll-item-box-item {
  284. width: 100%;
  285. margin-bottom: 20rpx;
  286. .jobAll-item-box-item-title {
  287. width: 100%;
  288. text:nth-of-type(1) {
  289. color: #1F1F1F;
  290. font-size: 38rpx;
  291. font-weight: 800;
  292. }
  293. text:nth-of-type(2) {
  294. color: #00B88F;
  295. font-size: 38rpx;
  296. font-weight: bold;
  297. }
  298. }
  299. .jobAll-item-box-item-label {
  300. width: 100%;
  301. margin-top: 30rpx;
  302. .jobAll-item-box-item-labels {
  303. color: #666666;
  304. font-size: 26rpx;
  305. font-weight: 500;
  306. padding: 10rpx 15rpx;
  307. border-radius: 8rpx;
  308. background-color: #F6F6F6;
  309. margin-right: 20rpx;
  310. margin-bottom: 20rpx;
  311. }
  312. }
  313. .jobAll-item-box-item-line {
  314. width: 100%;
  315. border-bottom: 1rpx solid #E6E6E6;
  316. margin-top: 40rpx;
  317. }
  318. }
  319. }
  320. }
  321. }
  322. .start {
  323. border-radius: 30px 30px 0px 0px !important;
  324. bottom: -80vh;
  325. transition-duration: .5s
  326. }
  327. .end {
  328. border-radius: 0 !important;
  329. bottom: 0;
  330. transition-duration: .5s
  331. }
  332. </style>