records.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. <template>
  2. <view>
  3. <view class="qz-record">
  4. <view class="qz-title">求职记录</view>
  5. <view class="qz-desc"
  6. >当前记录仅自己可见,招聘者无法看到你所浏览过或投递过的
  7. 其他岗位,当前数据仅保留半年的记录。</view
  8. >
  9. </view>
  10. <u-tabs :list="list" @change="tabClick" :current="tabIndex" class="tab-list"></u-tabs>
  11. <view class="gwList flex justify-center" v-if="dataList.length > 0">
  12. <view class="gwList-box">
  13. <view
  14. class="gwList-box-item flex justify-center"
  15. @click="gotoInfo(item.postPushId)"
  16. v-for="(item, index) in dataList"
  17. :key="index"
  18. >
  19. <view class="gwList-box-item-box">
  20. <view
  21. v-if="item"
  22. class="gwList-box-item-box-title flex justify-between align-center"
  23. >
  24. <text>{{ item.stationName }}</text>
  25. <text>{{ item.salaryRange }}</text>
  26. </view>
  27. <block v-if="title == '我的收藏'">
  28. <view class="gwList-box-item-box-name">
  29. <text>{{ item.companyName ? item.companyName : "匿名公司" }}</text>
  30. <text v-if="item.companyPeople">{{ item.companyPeople }}</text>
  31. </view>
  32. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  33. <view
  34. class="gw-tag"
  35. v-for="(ite, ind) in item.positionWelfare"
  36. :key="ind"
  37. >{{ ite }}</view
  38. >
  39. </view>
  40. <view class="gwList-box-item-box-info flex justify-between align-center">
  41. <view class="gwList-box-item-box-info-l flex align-center">
  42. <image
  43. :src="item.companyLogo ? item.companyLogo : '../../static/logo.png'"
  44. class="user-info-img"
  45. mode=""
  46. ></image>
  47. <text v-if="item.companyLegalPerson"
  48. >{{ item.companyLegalPerson }}·创始人</text
  49. >
  50. <view class="info-tag">3分钟前回复</view>
  51. </view>
  52. <view class="gwList-box-item-box-info-r">
  53. {{ item.county }}
  54. {{ item.address }}
  55. </view>
  56. </view>
  57. </block>
  58. <block v-else-if="title == '浏览记录'">
  59. <view class="gwList-box-item-box-name">
  60. <text>{{ item.companyName ? item.companyName : "匿名公司" }}</text>
  61. <text>{{ item.companyPeople ? item.companyPeople : 0 }}</text>
  62. </view>
  63. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  64. <view
  65. class="gw-tag"
  66. v-for="(ite, ind) in item.positionWelfare"
  67. :key="ind"
  68. >{{ ite }}</view
  69. >
  70. </view>
  71. <view class="gwList-box-item-box-info flex justify-between align-center">
  72. <view class="gwList-box-item-box-info-l flex align-center">
  73. <image
  74. :src="item.companyLogo ? item.companyLogo : '../../static/logo.png'"
  75. class="user-info-img"
  76. mode=""
  77. ></image>
  78. <text v-if="item.companyLegalPerson"
  79. >{{ item.companyLegalPerson }}·创始人</text
  80. >
  81. <view class="info-tag">3分钟前回复</view>
  82. </view>
  83. <view class="gwList-box-item-box-info-r">
  84. {{ item.county }}
  85. {{ item.address }}
  86. </view>
  87. </view>
  88. </block>
  89. <block v-else>
  90. <view class="gwList-box-item-box-name">
  91. <text>{{ item.companyName ? item.companyName : "匿名公司" }}</text>
  92. <text v-if="item.companyPeople">{{ item.companyPeople }}</text>
  93. </view>
  94. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  95. <view
  96. class="gw-tag"
  97. v-for="(ite, ind) in item.positionWelfare"
  98. :key="ind"
  99. >{{ ite }}</view
  100. >
  101. </view>
  102. <view class="gwList-box-item-box-info flex justify-between align-center">
  103. <view class="gwList-box-item-box-info-l flex align-center">
  104. <image
  105. :src="item.companyLogo ? item.companyLogo : '../../static/logo.png'"
  106. class="user-info-img"
  107. mode=""
  108. ></image>
  109. <text v-if="item.companyLegalPerson"
  110. >{{ item.companyLegalPerson }}·创始人</text
  111. >
  112. <view class="info-tag">3分钟前回复</view>
  113. </view>
  114. <view class="gwList-box-item-box-info-r">
  115. {{ item.county }}
  116. {{ item.address }}
  117. </view>
  118. </view>
  119. </block>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. <!-- 暂无数据 -->
  125. <view class="gwList" v-else>
  126. <empty />
  127. </view>
  128. <!-- 筛选悬浮 -->
  129. <view class="filterSe" @click="goScreen()">
  130. <image src="../../static/images/my/filterSe.png" mode=""></image>
  131. </view>
  132. </view>
  133. </template>
  134. <script>
  135. import empty from "../../components/empty.vue";
  136. export default {
  137. components: {
  138. empty,
  139. },
  140. data() {
  141. return {
  142. dataList: [],
  143. page: 1,
  144. limit: 10,
  145. pages: "",
  146. title: "",
  147. tabIndex: 0, //tab选中的索引
  148. filter: {
  149. education: "", //学历
  150. salaryRange: "", //薪资
  151. experience: "", //经验
  152. companyPeople: "", //公司规模
  153. industry: "", //行业
  154. },
  155. list: [
  156. {
  157. name: "我看过",
  158. },
  159. {
  160. name: "沟通过",
  161. },
  162. {
  163. name: "面试过",
  164. },
  165. {
  166. name: "收藏职位",
  167. },
  168. ],
  169. };
  170. },
  171. onLoad(option) {
  172. uni.setNavigationBarTitle({
  173. title: option.title,
  174. });
  175. uni.showLoading({
  176. title: "加载中",
  177. });
  178. this.title = option.title;
  179. if (option.title == "我的收藏") {
  180. this.getMyCollectionList();
  181. } else if (option.title == "浏览记录") {
  182. this.getDataList();
  183. } else {
  184. this.getDataLists();
  185. }
  186. },
  187. onUnload() {
  188. uni.removeStorageSync("browse");
  189. },
  190. watch: {
  191. filter: {
  192. handler() {
  193. this.page = 1;
  194. if (this.title == "我的收藏") {
  195. this.getMyCollectionList();
  196. } else if (this.title == "浏览记录") {
  197. this.getDataList();
  198. } else {
  199. this.getDataLists();
  200. }
  201. },
  202. deep: true,
  203. immediate: true,
  204. },
  205. },
  206. onShow() {
  207. if (uni.getStorageSync("browse") && uni.getStorageSync("browse").length > 0) {
  208. let browse = uni.getStorageSync("browse");
  209. console.log(browse, "2222222222");
  210. browse.map((item) => {
  211. let arr = [];
  212. item.list.map((ite) => {
  213. if (ite.value != "不限") {
  214. arr.push(ite.value);
  215. }
  216. });
  217. switch (item.name) {
  218. case "学历":
  219. this.filter.education = arr.join(",");
  220. break;
  221. case "薪资":
  222. this.filter.salaryRange = arr.join(",");
  223. break;
  224. case "经验":
  225. this.filter.experience = arr.join(",");
  226. break;
  227. case "公司规模":
  228. this.filter.companyPeople = arr.join(",");
  229. break;
  230. case "行业":
  231. this.filter.industry = arr.join(",");
  232. break;
  233. }
  234. });
  235. } else {
  236. this.filter.education = ""; //学历
  237. this.filter.experience = ""; //经验
  238. this.filter.industry = ""; //行业
  239. this.filter.salaryRange = ""; //薪资
  240. this.filter.companyPeople = ""; //公司规模
  241. }
  242. },
  243. onReachBottom() {
  244. if (this.page < this.pages) {
  245. this.page += 1;
  246. if (this.title == "我的收藏") {
  247. this.getMyCollectionList();
  248. } else if (this.title == "浏览记录") {
  249. this.getDataList();
  250. } else {
  251. this.getDataLists();
  252. }
  253. }
  254. },
  255. onPullDownRefresh() {
  256. this.page = 1;
  257. if (this.title == "我的收藏") {
  258. this.getMyCollectionList();
  259. } else if (this.title == "浏览记录") {
  260. this.getDataList();
  261. } else {
  262. this.getDataLists();
  263. }
  264. },
  265. methods: {
  266. // 去筛选
  267. goScreen() {
  268. uni.navigateTo({
  269. url: "/package/screen/screen?isBrowse=1",
  270. });
  271. },
  272. tabClick(e) {
  273. this.tabIndex = e;
  274. if (e == 2) {
  275. uni.navigateTo({
  276. url: "/my/jilu/mianshiDetail",
  277. });
  278. }
  279. },
  280. /**
  281. * 我的收藏记录列表
  282. */
  283. getMyCollectionList() {
  284. let data = {
  285. page: this.page,
  286. limit: this.limit,
  287. education: this.filter.education, //学历
  288. salaryRange: this.filter.salaryRange, //薪资
  289. experience: this.filter.experience, //经验
  290. companyPeople: this.filter.companyPeople, //公司规模
  291. industry: this.filter.industry, //行业
  292. };
  293. this.$Request.getT("/app/myCollection/getMyCollectionListV2", data).then((res) => {
  294. uni.stopPullDownRefresh();
  295. uni.hideLoading();
  296. if (res.code == 0) {
  297. res.data.records.map((item) => {
  298. if (item.positionWelfare) {
  299. item.positionWelfare = item.positionWelfare.split(",");
  300. }
  301. });
  302. this.pages = res.data.pages;
  303. if (this.page == 1) {
  304. this.dataList = res.data.records;
  305. } else {
  306. this.dataList = [...this.dataList, ...res.data.records];
  307. }
  308. }
  309. });
  310. },
  311. gotoInfo(postPushId) {
  312. if (!postPushId) {
  313. uni.showToast({
  314. title: "岗位不存在",
  315. icon: "none",
  316. });
  317. return;
  318. }
  319. uni.navigateTo({
  320. url: "/pages/index/game/order?postPushId=" + postPushId,
  321. });
  322. },
  323. getDataLists() {
  324. let data = {
  325. page: this.page,
  326. limit: this.limit,
  327. userId: uni.getStorageSync("userId"),
  328. education: this.filter.education, //学历
  329. salaryRange: this.filter.salaryRange, //薪资
  330. experience: this.filter.experience, //经验
  331. companyPeople: this.filter.companyPeople, //公司规模
  332. industry: this.filter.industry, //行业
  333. };
  334. this.$Request.getT("/app/sendRecord/getMyRecordListV2", data).then((res) => {
  335. uni.stopPullDownRefresh();
  336. uni.hideLoading();
  337. if (res.code == 0) {
  338. res.data.records.map((item) => {
  339. if (item.positionWelfare) {
  340. item.positionWelfare = item.positionWelfare.split(",");
  341. }
  342. });
  343. this.pages = res.data.pages;
  344. if (this.page == 1) {
  345. this.dataList = res.data.records;
  346. } else {
  347. this.dataList = [...this.dataList, ...res.data.records];
  348. }
  349. }
  350. });
  351. },
  352. getDataList() {
  353. let data = {
  354. page: this.page,
  355. limit: this.limit,
  356. education: this.filter.education, //学历
  357. salaryRange: this.filter.salaryRange, //薪资
  358. experience: this.filter.experience, //经验
  359. companyPeople: this.filter.companyPeople, //公司规模
  360. industry: this.filter.industry, //行业
  361. // browseType:1
  362. };
  363. this.$Request.getT("/app/userBrowse/selectMyBrowseV2", data).then((res) => {
  364. uni.stopPullDownRefresh();
  365. uni.hideLoading();
  366. if (res.code == 0) {
  367. res.data.records.map((item) => {
  368. if (item.positionWelfare) {
  369. item.positionWelfare = item.positionWelfare.split(",");
  370. } else {
  371. item.positionWelfare = [];
  372. }
  373. });
  374. this.pages = res.data.pages;
  375. if (this.page == 1) {
  376. this.dataList = res.data.records;
  377. } else {
  378. this.dataList = [...this.dataList, ...res.data.records];
  379. }
  380. }
  381. });
  382. },
  383. },
  384. };
  385. </script>
  386. <style lang="scss" scoped>
  387. page {
  388. background: #fff;
  389. }
  390. .filterSe {
  391. position: fixed;
  392. bottom: 10vh;
  393. right: 30rpx;
  394. image {
  395. width: 100rpx;
  396. height: 100rpx;
  397. // border-radius: 50%;
  398. }
  399. }
  400. .tab-list {
  401. margin-bottom: 20rpx;
  402. }
  403. .gwList {
  404. width: 100%;
  405. .gwList-box {
  406. width: 686rpx;
  407. height: 100%;
  408. .gwList-box-item {
  409. width: 100%;
  410. box-sizing: border-box;
  411. border: 1rpx solid rgba(227, 231, 236, 1);
  412. border-radius: 12rpx;
  413. background: #fdfdfd;
  414. padding: 36rpx;
  415. margin-bottom: 20rpx;
  416. }
  417. .gwList-box-item-box {
  418. width: 623rpx;
  419. height: 100%;
  420. .gwList-box-item-box-title {
  421. text:nth-of-type(1) {
  422. color: #171725;
  423. font-family: DM Sans;
  424. font-size: 32rpx;
  425. font-weight: 700;
  426. line-height: 48rpx;
  427. }
  428. text:nth-of-type(2) {
  429. color: #016bf6;
  430. font-family: DM Sans;
  431. font-size: 24rpx;
  432. font-weight: 700;
  433. line-height: 40rpx;
  434. }
  435. }
  436. .gwList-box-item-box-label {
  437. display: flex;
  438. align-items: center;
  439. gap: 8rpx;
  440. .gw-tag {
  441. /* 自动布局 */
  442. display: flex;
  443. justify-content: center;
  444. align-items: center;
  445. padding: 8rpx;
  446. border-radius: 8rpx;
  447. box-sizing: border-box;
  448. background: #c6c6c61a;
  449. color: rgba(153, 153, 153, 1);
  450. font-family: DM Sans;
  451. font-size: 20rpx;
  452. font-weight: 400;
  453. line-height: 20rpx;
  454. }
  455. }
  456. .gwList-box-item-box-name {
  457. color: #9ca4ab;
  458. font-family: DM Sans;
  459. font-size: 24rpx;
  460. font-weight: 400;
  461. line-height: 40rpx;
  462. padding: 6rpx 0;
  463. box-sizing: border-box;
  464. text {
  465. margin-right: 8rpx;
  466. }
  467. // text:nth-of-type(1) {
  468. // width: 450rpx;
  469. // }
  470. }
  471. .gwList-box-item-box-info {
  472. font-size: 26rpx;
  473. padding-top: 20rpx;
  474. box-sizing: border-box;
  475. color: #9ca4ab;
  476. font-family: DM Sans;
  477. font-size: 16rpx;
  478. font-weight: 400;
  479. line-height: 40rpx;
  480. text-align: left;
  481. .gwList-box-item-box-info-l {
  482. .info-tag {
  483. border-radius: 8rpx;
  484. background: rgba(236, 225, 253, 1);
  485. padding: 8rpx;
  486. box-sizing: border-box;
  487. font-family: DM Sans;
  488. color: #7659d2;
  489. font-size: 16rpx;
  490. font-weight: 400;
  491. line-height: 20rpx;
  492. margin-left: 8rpx;
  493. }
  494. .user-info-img {
  495. width: 40rpx;
  496. height: 40rpx;
  497. border: 1rpx solid rgba(240, 240, 240, 1);
  498. border-radius: 50%;
  499. margin-right: 8.62rpx;
  500. }
  501. }
  502. .gwList-box-item-box-info-r {
  503. max-width: 340rpx;
  504. }
  505. }
  506. }
  507. }
  508. }
  509. .qz-record {
  510. padding: 20rpx 40rpx;
  511. box-sizing: border-box;
  512. .qz-title {
  513. font-family: DM Sans;
  514. font-size: 60rpx;
  515. color: rgba(51, 51, 51, 1);
  516. font-weight: 800;
  517. }
  518. .qz-desc {
  519. color: rgba(102, 102, 102, 1);
  520. font-family: DM Sans;
  521. font-size: 24rpx;
  522. font-weight: 400;
  523. line-height: 32rpx;
  524. margin-top: 20rpx;
  525. }
  526. }
  527. </style>