btnPopous.vue 13 KB

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