btnPopous.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  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" v-if="!userId">
  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.stop="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, Number],
  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. // HRId
  136. userId:{
  137. type: [String, Number],
  138. default: ''
  139. }
  140. },
  141. data() {
  142. return {
  143. refresher: false,
  144. list: [],
  145. clientX: '',
  146. clientY: '',
  147. topY: false,
  148. value1: 1,
  149. value2: 1,
  150. value3: 1,
  151. value4: 1,
  152. options1: [],
  153. options2: [],
  154. options3: [],
  155. options4: [],
  156. page: 1,
  157. pages: 1,
  158. limit: 10,
  159. projectName: '', //岗位名称
  160. address: '', //城市
  161. salaryRange: '', //薪资
  162. experience: '', //经验
  163. title: '',
  164. total: 0
  165. };
  166. },
  167. watch: {
  168. //城市
  169. cittArr(newArr, oldArr) {
  170. //拿到最新传递的城市数据,处理成需要的格式
  171. let arr = [{
  172. label: '全部',
  173. value: '',
  174. }]
  175. this.cittArr.map(item => {
  176. let obj = {
  177. label: item,
  178. value: item,
  179. }
  180. arr.push(obj)
  181. })
  182. this.options4 = arr
  183. },
  184. //岗位分类列表
  185. classify(newArr, oldArr) {
  186. //拿到最新传递的岗位数据,处理成需要的格式
  187. let arr = [{
  188. label: '全部',
  189. value: '',
  190. }]
  191. this.classify.map(item => {
  192. let obj = {
  193. label: item,
  194. value: item,
  195. }
  196. arr.push(obj)
  197. })
  198. this.options1 = arr
  199. },
  200. //经验
  201. jyArr(newArr, oldArr) {
  202. //拿到最新传递的经验数据,处理成需要的格式
  203. let arr = [{
  204. label: '全部',
  205. value: '',
  206. }]
  207. this.jyArr.map(item => {
  208. let obj = {
  209. label: item.value,
  210. value: item.value,
  211. }
  212. arr.push(obj)
  213. })
  214. this.options2 = arr
  215. },
  216. //薪资
  217. moneyArr(newArr, oldArr) {
  218. //拿到最新传递的薪资数据,处理成需要的格式
  219. let arr = [{
  220. label: '全部',
  221. value: '',
  222. }]
  223. this.moneyArr.map(item => {
  224. let obj = {
  225. label: item.value,
  226. value: item.value,
  227. }
  228. arr.push(obj)
  229. })
  230. this.options3 = arr
  231. },
  232. },
  233. created() {
  234. this.userGetPostPushList()
  235. },
  236. methods: {
  237. //判断岗位名称与职位名称是否相同(不区分大小写)
  238. isSameName(className, name) {
  239. let str1 = className.trim();
  240. let str2 = name ? name.trim() : '';
  241. if (str1.length !== str2.length) {
  242. return true;
  243. }
  244. return str1.toLowerCase() !== str2.toLowerCase();
  245. },
  246. change1(e) {
  247. this.projectName = e
  248. this.userGetPostPushList()
  249. },
  250. change2(e) {
  251. this.experience = e
  252. this.userGetPostPushList()
  253. },
  254. change3(e) {
  255. this.salaryRange = e
  256. this.userGetPostPushList()
  257. },
  258. change4(e) {
  259. this.address = e
  260. this.userGetPostPushList()
  261. },
  262. changeClassify(e) {
  263. console.log(e)
  264. this.page = 1
  265. this.projectName = e
  266. this.userGetPostPushList()
  267. },
  268. searchResult() {
  269. this.page = 1
  270. this.userGetPostPushList()
  271. },
  272. /**
  273. * 上拉加载更多
  274. */
  275. scrolltolower() {
  276. if (this.page < this.pages) {
  277. this.page += 1
  278. this.userGetPostPushList()
  279. }
  280. },
  281. /**
  282. * 获取岗位列表
  283. */
  284. userGetPostPushList() {
  285. let data = {
  286. companyId: this.companyId,
  287. page: this.page,
  288. limit: this.limit,
  289. ruleClassifyName: this.projectName, //岗位名称
  290. city: this.address, //城市
  291. salaryRange: this.salaryRange, //薪资
  292. experience: this.experience, //经验
  293. }
  294. if(this.userId){
  295. data = {
  296. ...data,
  297. userId:this.userId
  298. }
  299. }
  300. this.$Request.getT("/app/postPush/userGetPostPushList", data).then(res => {
  301. if (res.code == 0) {
  302. this.pages = res.data.pages
  303. this.total = res.data.total
  304. if (this.page == 1) {
  305. this.list = res.data.records
  306. } else {
  307. this.list = [...this.list, ...res.data.records]
  308. }
  309. }
  310. })
  311. },
  312. gotos(postPushId) {
  313. console.log('rrrrrrrrrrrrrrrrrrrrrrrr')
  314. uni.navigateTo({
  315. url: '/pages/index/game/order?postPushId=' + postPushId
  316. })
  317. },
  318. refresherrefresh() {
  319. this.refresher = false
  320. },
  321. scrolltoupper(e) {
  322. // this.refresher = true
  323. this.refresher = true
  324. this.topY = false
  325. },
  326. start(e) {
  327. this.clientX = e.changedTouches[0].clientX
  328. this.clientY = e.changedTouches[0].clientY
  329. },
  330. end(e) {
  331. let subX = e.changedTouches[0].clientX - this.clientX
  332. let subY = e.changedTouches[0].clientY - this.clientY
  333. // 向下拉动超过150px时直接关闭弹窗
  334. if (subY > 150) {
  335. this.topY = false
  336. // 通知父组件关闭弹窗
  337. this.$emit('closePopup')
  338. } else if (subY < -50) {
  339. this.topY = true
  340. }
  341. },
  342. move(e) {
  343. },
  344. }
  345. }
  346. </script>
  347. <style lang="scss">
  348. .cover {
  349. width: 100%;
  350. height: 100%;
  351. background: rgba(0, 0, 0, .5);
  352. position: fixed;
  353. z-index: 99998;
  354. top: 0;
  355. left: 0
  356. }
  357. .jobAll {
  358. width: 100%;
  359. height: 90vh;
  360. background-color: #f4f3f3;
  361. border-radius: 60rpx 60rpx 0px 0px;
  362. position: fixed;
  363. z-index: 99999;
  364. box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
  365. overflow: hidden;
  366. .jobAll-search {
  367. width: 100%;
  368. margin-top: 20rpx;
  369. border-top: 1px solid #ebebeb;
  370. .jobAll-search-box {
  371. width: 686rpx;
  372. height: 100%;
  373. }
  374. }
  375. .jobAll-item {
  376. width: 100%;
  377. height: calc(90vh - 120rpx);
  378. margin-top: 20rpx;
  379. padding: 0 20rpx;
  380. .jobAll-item-box {
  381. width: 100%;
  382. height: 100%;
  383. .jobAll-item-box-item {
  384. width: 100%;
  385. background-color: #ffffff;
  386. border-radius: 12rpx;
  387. margin-bottom: 20rpx;
  388. padding: 20rpx;
  389. border: 0.5px solid rgba(227, 231, 236, 1);
  390. background: rgba(253, 253, 253, 1);
  391. .jobAll-item-box-item-name {
  392. margin-top: 14rpx;
  393. color: #999999;
  394. font-size: 28rpx;
  395. font-weight: 500;
  396. }
  397. .jobAll-item-box-item-label {
  398. margin-top: 14rpx;
  399. }
  400. .jobAll-item-box-item-info {
  401. font-size: 26rpx;
  402. margin-top: 20rpx;
  403. .jobAll-item-box-item-info-l {
  404. color: #1A1A1A;
  405. display: flex;
  406. align-items: center;
  407. gap: 12rpx;
  408. }
  409. }
  410. .jobAll-item-box-item-line {
  411. width: 100%;
  412. border-bottom: 1rpx solid #E6E6E6;
  413. margin-top: 30rpx;
  414. }
  415. }
  416. }
  417. }
  418. }
  419. .start {
  420. border-radius: 60rpx 60rpx 0px 0px !important;
  421. bottom: -70vh;
  422. transition-duration: .5s
  423. }
  424. .end {
  425. border-radius: 60rpx 60rpx 0px 0px !important;
  426. bottom: 0;
  427. transition-duration: .5s
  428. }
  429. // 首页样式
  430. .job-title-text {
  431. color: var(--Grayscale/Grayscale 100, rgba(23, 23, 37, 1));
  432. font-family: DM Sans;
  433. font-size: 38rpx;
  434. font-weight: 700;
  435. line-height: 24px;
  436. letter-spacing: undefined;
  437. text-align: left;
  438. }
  439. .salary-text-box {
  440. display: flex;
  441. align-items: center;
  442. margin-left: 16rpx;
  443. .jipin-icon {
  444. width: 32rpx;
  445. height: 32rpx;
  446. margin-right: 8rpx;
  447. }
  448. .jipin-text {
  449. color: #FF6B6B;
  450. font-size: 24rpx;
  451. font-weight: 600;
  452. }
  453. }
  454. .salary-text {
  455. color: rgba(1, 107, 246, 1);
  456. font-family: DM Sans;
  457. font-size: 28rpx;
  458. font-weight: 700;
  459. line-height: 20px;
  460. letter-spacing: 0.5%;
  461. text-align: right;
  462. }
  463. .company-name {
  464. color: var(--Grayscale/Grayscale 60, rgba(156, 164, 171, 1));
  465. font-family: DM Sans;
  466. font-size: 24rpx;
  467. font-weight: 400;
  468. line-height: 20px;
  469. letter-spacing: 0.5%;
  470. text-align: left;
  471. }
  472. .company-people {
  473. color: var(--Grayscale/Grayscale 60, rgba(156, 164, 171, 1));
  474. font-family: DM Sans;
  475. font-size: 24rpx;
  476. font-weight: 400;
  477. line-height: 20px;
  478. letter-spacing: 0.5%;
  479. text-align: left;
  480. }
  481. .job-tag {
  482. height: 42rpx;
  483. display: flex;
  484. flex-direction: row;
  485. justify-content: center;
  486. align-items: center;
  487. padding: 8rpx;
  488. border-radius: 8rpx;
  489. background: rgba(198, 198, 198, 0.1);
  490. margin-right: 16rpx;
  491. color: rgba(153, 153, 153, 1);
  492. font-size: 24rpx;
  493. }
  494. .company-info-text,
  495. .location-text {
  496. color: rgba(156, 164, 171, 1);
  497. font-family: DM Sans;
  498. font-size: 20rpx;
  499. font-weight: 400;
  500. line-height: 40rpx;
  501. letter-spacing: 0.5%;
  502. text-align: left;
  503. }
  504. .reply-time {
  505. display: flex;
  506. flex-direction: row;
  507. justify-content: center;
  508. align-items: center;
  509. padding: 8rpx;
  510. font-family: DM Sans;
  511. font-size: 20rpx;
  512. font-weight: 400;
  513. line-height: 40rpx;
  514. letter-spacing: 0.5%;
  515. text-align: left;
  516. border-radius: 12rpx;
  517. background: #ECE1FD;
  518. color: #8858C5;
  519. }
  520. .header {
  521. width: 100%;
  522. background: #fff;
  523. text-align: center;
  524. color: #111;
  525. padding-bottom: 1rpx;
  526. .headerTitle {
  527. font-size: 34rpx;
  528. text {
  529. font-size: 20rpx;
  530. vertical-align: top
  531. }
  532. }
  533. .shut {
  534. color: #bbb;
  535. font-size: 60rpx;
  536. transform: scaleX(1.6)
  537. }
  538. .searchBox {
  539. width: 92%;
  540. margin: 30rpx auto;
  541. border-radius: 70rpx;
  542. background: #f1f1f1;
  543. padding: 0 20rpx
  544. }
  545. .nobg {
  546. width: initial;
  547. overflow-x: auto;
  548. background: none;
  549. border-radius: 0;
  550. gap: 20rpx;
  551. margin-left: 10rpx;
  552. }
  553. .tag{
  554. flex-shrink: 0;
  555. }
  556. }
  557. </style>