btnPopous.vue 13 KB

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