btnPopous.vue 11 KB

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