btnPopous.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. <template>
  2. <view>
  3. <view class="cover"></view>
  4. <view class="jobAll" :class="topY == true ? 'end' : 'start'" @touchstart="start" @touchend="end"
  5. @touchmove.stop="move">
  6. <view class="header">
  7. <view class="shut"><u-icon name="minus" top="10rpx"></u-icon></view>
  8. <view class="headerTitle">所有职位<text>{{ total }}</text></view>
  9. <view class="jobAll-search">
  10. <view @click="searchResult" class="searchBox flex">
  11. <u-icon size="36rpx" color="#999" name="search"></u-icon>
  12. <u-input @confirm="searchResult" v-model="projectName" placeholder="搜索职位" type="text"
  13. input-align="left" confirm-type="search" :custom-style="{ marginLeft: '20rpx' }" />
  14. </view>
  15. <view class="searchBox nobg flex">
  16. <u-tag @click="changeClassify('')" class="tag" text="全部"
  17. :type="projectName != '' ? 'info' : 'primary'" mode="light" size="mini" />
  18. <u-tag @click="changeClassify(item.ruleClassifyName)" class="tag" :text="item.ruleClassifyName"
  19. :type="projectName != item.ruleClassifyName ? 'info' : 'primary'" mode="light" size="mini"
  20. v-for="item in classify" />
  21. </view>
  22. </view>
  23. </view>
  24. <!-- <view class="jobAll-search flex justify-center">
  25. <view class="jobAll-search-box">
  26. <u-dropdown :mask='false' active-color="#016BF6">
  27. <u-dropdown-item v-model="value1" title="岗位" @change="change1"
  28. :options="options1"></u-dropdown-item>
  29. <u-dropdown-item v-model="value2" title="经验" @change="change2"
  30. :options="options2"></u-dropdown-item>
  31. <u-dropdown-item v-model="value3" title="薪资" @change="change3"
  32. :options="options3"></u-dropdown-item>
  33. <u-dropdown-item v-model="value4" title="城市" @change="change4"
  34. :options="options4"></u-dropdown-item>
  35. </u-dropdown>
  36. </view>
  37. </view> -->
  38. <view class="jobAll-item flex justify-center">
  39. <view class="jobAll-item-box">
  40. <scroll-view scroll-y="true" v-if="list.length > 0" style="width: 100%;height: 100%;"
  41. :refresher-enabled="true" :refresher-triggered="refresher" @refresherpulling="scrolltoupper"
  42. @refresherrefresh="refresherrefresh" @scrolltolower="scrolltolower">
  43. <view class="jobAll-item-box-item" v-for="(item, index) in list" :key="index"
  44. @tap.native="gotos(item.postPushId)">
  45. <!-- 标题-薪资 -->
  46. <view class="jobAll-item-box-item-title flex justify-between align-center">
  47. <view class="title-left flex align-center">
  48. <view class="job-title-text">
  49. <!-- <block v-if="isSameName(item.ruleClassifyName,item.stationName)">
  50. {{item.ruleClassifyName}}-
  51. </block> -->
  52. <block>
  53. {{ item.ruleClassifyName }}
  54. </block>
  55. </view>
  56. <!-- <view class="salary-text-box">
  57. <image src="../../static/images/index/jipinIcom.svg" class="jipin-icon" />
  58. <text class="jipin-text">急聘</text>
  59. </view> -->
  60. </view>
  61. <text class="salary-text">{{ item.salaryRange }}</text>
  62. </view>
  63. <!-- 公司名称-公司人数 -->
  64. <view class="jobAll-item-box-item-name flex align-center">
  65. <text class="company-name"
  66. style="margin-right: 8rpx;">{{ item.company ? item.company.companyAllName : '' }}</text>
  67. <text class="company-people"
  68. v-if="item.company">{{ item.company ? item.company.companyPeople : '0人' }}</text>
  69. </view>
  70. <!-- 职位标签 -->
  71. <view class="jobAll-item-box-item-label flex align-center flex-wrap">
  72. <text class="job-tag">{{ item.education }}</text>
  73. <text class="job-tag">{{ item.experience }}</text>
  74. <text class="job-tag">{{ item.industry }}</text>
  75. </view>
  76. <!-- 公司简介-位置 -->
  77. <view class="jobAll-item-box-item-info flex justify-between align-center">
  78. <view class="jobAll-item-box-item-info-l flex align-center">
  79. <image
  80. :src="item.hr && item.hr.hrImg ? item.hr.hrImg : item.user ? item.user.avatar : '../../static/logo.png'"
  81. style="width: 58rpx;height: 58rpx;border-radius: 50%;" mode="aspectFill">
  82. </image>
  83. <view class="company-info-text" v-if="item.company">
  84. {{ item.user && item.user.userName ? item.user.userName : '未知' }}·{{ item.hr && item.hr.hrPosition || '人事总监' }}
  85. </view>
  86. <view v-if="item.respondTime" class="reply-time">{{ item.respondTime }}</view>
  87. </view>
  88. <view class="location-text">
  89. {{ item.distance }} {{ item.county }}
  90. </view>
  91. </view>
  92. <view class="jobAll-item-box-item-line" v-if="(index + 1) != list.length">
  93. </view>
  94. </view>
  95. </scroll-view>
  96. <empty v-else />
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </template>
  102. <script>
  103. import empty from '../empty.vue'
  104. export default {
  105. name: "btnPopous",
  106. components: {
  107. empty
  108. },
  109. props: {
  110. //公司id
  111. companyId: {
  112. type: String,
  113. default: ''
  114. },
  115. //城市数组
  116. cittArr: {
  117. type: Array,
  118. default: []
  119. },
  120. //薪资数组
  121. moneyArr: {
  122. type: Array,
  123. default: []
  124. },
  125. //经验数组
  126. jyArr: {
  127. type: Array,
  128. default: []
  129. },
  130. //岗位分类
  131. classify: {
  132. type: Array,
  133. default: []
  134. }
  135. },
  136. data() {
  137. return {
  138. refresher: false,
  139. list: [],
  140. clientX: '',
  141. clientY: '',
  142. topY: false,
  143. value1: 1,
  144. value2: 1,
  145. value3: 1,
  146. value4: 1,
  147. options1: [],
  148. options2: [],
  149. options3: [],
  150. options4: [],
  151. page: 1,
  152. pages: 1,
  153. limit: 10,
  154. projectName: '', //岗位名称
  155. address: '', //城市
  156. salaryRange: '', //薪资
  157. experience: '', //经验
  158. title: '',
  159. total: 0
  160. };
  161. },
  162. watch: {
  163. //城市
  164. cittArr(newArr, oldArr) {
  165. //拿到最新传递的城市数据,处理成需要的格式
  166. let arr = [{
  167. label: '全部',
  168. value: '',
  169. }]
  170. this.cittArr.map(item => {
  171. let obj = {
  172. label: item,
  173. value: item,
  174. }
  175. arr.push(obj)
  176. })
  177. this.options4 = arr
  178. },
  179. //岗位分类列表
  180. classify(newArr, oldArr) {
  181. //拿到最新传递的岗位数据,处理成需要的格式
  182. let arr = [{
  183. label: '全部',
  184. value: '',
  185. }]
  186. this.classify.map(item => {
  187. let obj = {
  188. label: item,
  189. value: item,
  190. }
  191. arr.push(obj)
  192. })
  193. this.options1 = arr
  194. },
  195. //经验
  196. jyArr(newArr, oldArr) {
  197. //拿到最新传递的经验数据,处理成需要的格式
  198. let arr = [{
  199. label: '全部',
  200. value: '',
  201. }]
  202. this.jyArr.map(item => {
  203. let obj = {
  204. label: item.value,
  205. value: item.value,
  206. }
  207. arr.push(obj)
  208. })
  209. this.options2 = arr
  210. },
  211. //薪资
  212. moneyArr(newArr, oldArr) {
  213. //拿到最新传递的薪资数据,处理成需要的格式
  214. let arr = [{
  215. label: '全部',
  216. value: '',
  217. }]
  218. this.moneyArr.map(item => {
  219. let obj = {
  220. label: item.value,
  221. value: item.value,
  222. }
  223. arr.push(obj)
  224. })
  225. this.options3 = arr
  226. },
  227. },
  228. created() {
  229. this.userGetPostPushList()
  230. },
  231. methods: {
  232. //判断岗位名称与职位名称是否相同(不区分大小写)
  233. isSameName(className, name) {
  234. let str1 = className.trim();
  235. let str2 = name ? name.trim() : '';
  236. if (str1.length !== str2.length) {
  237. return true;
  238. }
  239. return str1.toLowerCase() !== str2.toLowerCase();
  240. },
  241. change1(e) {
  242. this.projectName = e
  243. this.userGetPostPushList()
  244. },
  245. change2(e) {
  246. this.experience = e
  247. this.userGetPostPushList()
  248. },
  249. change3(e) {
  250. this.salaryRange = e
  251. this.userGetPostPushList()
  252. },
  253. change4(e) {
  254. this.address = e
  255. this.userGetPostPushList()
  256. },
  257. changeClassify(e) {
  258. console.log(e)
  259. this.page = 1
  260. this.projectName = e
  261. this.userGetPostPushList()
  262. },
  263. searchResult() {
  264. this.page = 1
  265. this.userGetPostPushList()
  266. },
  267. /**
  268. * 上拉加载更多
  269. */
  270. scrolltolower() {
  271. if (this.page < this.pages) {
  272. this.page += 1
  273. this.userGetPostPushList()
  274. }
  275. },
  276. /**
  277. * 获取岗位列表
  278. */
  279. userGetPostPushList() {
  280. let data = {
  281. companyId: this.companyId,
  282. page: this.page,
  283. limit: this.limit,
  284. ruleClassifyName: this.projectName, //岗位名称
  285. city: this.address, //城市
  286. salaryRange: this.salaryRange, //薪资
  287. experience: this.experience, //经验
  288. }
  289. this.$Request.getT("/app/postPush/userGetPostPushList", data).then(res => {
  290. if (res.code == 0) {
  291. this.pages = res.data.pages
  292. this.total = res.data.total
  293. if (this.page == 1) {
  294. this.list = res.data.records
  295. } else {
  296. this.list = [...this.list, ...res.data.records]
  297. }
  298. }
  299. })
  300. },
  301. gotos(postPushId) {
  302. console.log('rrrrrrrrrrrrrrrrrrrrrrrr')
  303. uni.navigateTo({
  304. url: '/pages/index/game/order?postPushId=' + postPushId
  305. })
  306. },
  307. refresherrefresh() {
  308. this.refresher = false
  309. },
  310. scrolltoupper(e) {
  311. // this.refresher = true
  312. this.refresher = true
  313. this.topY = false
  314. },
  315. start(e) {
  316. this.clientX = e.changedTouches[0].clientX
  317. this.clientY = e.changedTouches[0].clientY
  318. },
  319. end(e) {
  320. let subX = e.changedTouches[0].clientX - this.clientX
  321. let subY = e.changedTouches[0].clientY - this.clientY
  322. // 向下拉动超过150px时直接关闭弹窗
  323. if (subY > 150) {
  324. this.topY = false
  325. // 通知父组件关闭弹窗
  326. this.$emit('closePopup')
  327. } else if (subY < -50) {
  328. this.topY = true
  329. }
  330. },
  331. move(e) {
  332. },
  333. }
  334. }
  335. </script>
  336. <style lang="scss">
  337. .cover {
  338. width: 100%;
  339. height: 100%;
  340. background: rgba(0, 0, 0, .5);
  341. position: fixed;
  342. z-index: 99998;
  343. top: 0;
  344. left: 0
  345. }
  346. .jobAll {
  347. width: 100%;
  348. height: 90vh;
  349. background-color: #f4f3f3;
  350. border-radius: 60rpx 60rpx 0px 0px;
  351. position: fixed;
  352. z-index: 99999;
  353. box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
  354. overflow: hidden;
  355. .jobAll-search {
  356. width: 100%;
  357. margin-top: 20rpx;
  358. border-top: 1px solid #ebebeb;
  359. .jobAll-search-box {
  360. width: 686rpx;
  361. height: 100%;
  362. }
  363. }
  364. .jobAll-item {
  365. width: 100%;
  366. height: calc(90vh - 120rpx);
  367. margin-top: 20rpx;
  368. padding: 0 20rpx;
  369. .jobAll-item-box {
  370. width: 100%;
  371. height: 100%;
  372. .jobAll-item-box-item {
  373. width: 100%;
  374. background-color: #ffffff;
  375. border-radius: 12rpx;
  376. margin-bottom: 20rpx;
  377. padding: 20rpx;
  378. border: 0.5px solid rgba(227, 231, 236, 1);
  379. background: rgba(253, 253, 253, 1);
  380. .jobAll-item-box-item-name {
  381. margin-top: 14rpx;
  382. color: #999999;
  383. font-size: 28rpx;
  384. font-weight: 500;
  385. }
  386. .jobAll-item-box-item-label {
  387. margin-top: 14rpx;
  388. }
  389. .jobAll-item-box-item-info {
  390. font-size: 26rpx;
  391. margin-top: 20rpx;
  392. .jobAll-item-box-item-info-l {
  393. color: #1A1A1A;
  394. display: flex;
  395. align-items: center;
  396. gap: 12rpx;
  397. }
  398. }
  399. .jobAll-item-box-item-line {
  400. width: 100%;
  401. border-bottom: 1rpx solid #E6E6E6;
  402. margin-top: 30rpx;
  403. }
  404. }
  405. }
  406. }
  407. }
  408. .start {
  409. border-radius: 60rpx 60rpx 0px 0px !important;
  410. bottom: -70vh;
  411. transition-duration: .5s
  412. }
  413. .end {
  414. border-radius: 60rpx 60rpx 0px 0px !important;
  415. bottom: 0;
  416. transition-duration: .5s
  417. }
  418. // 首页样式
  419. .job-title-text {
  420. color: var(--Grayscale/Grayscale 100, rgba(23, 23, 37, 1));
  421. font-family: DM Sans;
  422. font-size: 38rpx;
  423. font-weight: 700;
  424. line-height: 24px;
  425. letter-spacing: undefined;
  426. text-align: left;
  427. }
  428. .salary-text-box {
  429. display: flex;
  430. align-items: center;
  431. margin-left: 16rpx;
  432. .jipin-icon {
  433. width: 32rpx;
  434. height: 32rpx;
  435. margin-right: 8rpx;
  436. }
  437. .jipin-text {
  438. color: #FF6B6B;
  439. font-size: 24rpx;
  440. font-weight: 600;
  441. }
  442. }
  443. .salary-text {
  444. color: rgba(1, 107, 246, 1);
  445. font-family: DM Sans;
  446. font-size: 28rpx;
  447. font-weight: 700;
  448. line-height: 20px;
  449. letter-spacing: 0.5%;
  450. text-align: right;
  451. }
  452. .company-name {
  453. color: var(--Grayscale/Grayscale 60, rgba(156, 164, 171, 1));
  454. font-family: DM Sans;
  455. font-size: 24rpx;
  456. font-weight: 400;
  457. line-height: 20px;
  458. letter-spacing: 0.5%;
  459. text-align: left;
  460. }
  461. .company-people {
  462. color: var(--Grayscale/Grayscale 60, rgba(156, 164, 171, 1));
  463. font-family: DM Sans;
  464. font-size: 24rpx;
  465. font-weight: 400;
  466. line-height: 20px;
  467. letter-spacing: 0.5%;
  468. text-align: left;
  469. }
  470. .job-tag {
  471. height: 42rpx;
  472. display: flex;
  473. flex-direction: row;
  474. justify-content: center;
  475. align-items: center;
  476. padding: 8rpx;
  477. border-radius: 8rpx;
  478. background: rgba(198, 198, 198, 0.1);
  479. margin-right: 16rpx;
  480. color: rgba(153, 153, 153, 1);
  481. font-size: 24rpx;
  482. }
  483. .company-info-text,
  484. .location-text {
  485. color: rgba(156, 164, 171, 1);
  486. font-family: DM Sans;
  487. font-size: 20rpx;
  488. font-weight: 400;
  489. line-height: 40rpx;
  490. letter-spacing: 0.5%;
  491. text-align: left;
  492. }
  493. .reply-time {
  494. display: flex;
  495. flex-direction: row;
  496. justify-content: center;
  497. align-items: center;
  498. padding: 8rpx;
  499. font-family: DM Sans;
  500. font-size: 20rpx;
  501. font-weight: 400;
  502. line-height: 40rpx;
  503. letter-spacing: 0.5%;
  504. text-align: left;
  505. border-radius: 12rpx;
  506. background: #ECE1FD;
  507. color: #8858C5;
  508. }
  509. .header {
  510. width: 100%;
  511. background: #fff;
  512. text-align: center;
  513. color: #111;
  514. padding-bottom: 1rpx;
  515. .headerTitle {
  516. font-size: 34rpx;
  517. text {
  518. font-size: 20rpx;
  519. vertical-align: top
  520. }
  521. }
  522. .shut {
  523. color: #bbb;
  524. font-size: 60rpx;
  525. transform: scaleX(1.6)
  526. }
  527. .searchBox {
  528. width: 92%;
  529. margin: 30rpx auto;
  530. border-radius: 70rpx;
  531. background: #f1f1f1;
  532. padding: 0 20rpx
  533. }
  534. .nobg {
  535. background: none;
  536. border-radius: 0;
  537. gap: 20rpx;
  538. margin-left: 10rpx;
  539. }
  540. }
  541. </style>