records.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  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. },
  275. /**
  276. * 我的收藏记录列表
  277. */
  278. getMyCollectionList() {
  279. let data = {
  280. page: this.page,
  281. limit: this.limit,
  282. education: this.filter.education, //学历
  283. salaryRange: this.filter.salaryRange, //薪资
  284. experience: this.filter.experience, //经验
  285. companyPeople: this.filter.companyPeople, //公司规模
  286. industry: this.filter.industry, //行业
  287. };
  288. this.$Request.getT("/app/myCollection/getMyCollectionListV2", data).then((res) => {
  289. uni.stopPullDownRefresh();
  290. uni.hideLoading();
  291. if (res.code == 0) {
  292. res.data.records.map((item) => {
  293. if (item.positionWelfare) {
  294. item.positionWelfare = item.positionWelfare.split(",");
  295. }
  296. });
  297. this.pages = res.data.pages;
  298. if (this.page == 1) {
  299. this.dataList = res.data.records;
  300. } else {
  301. this.dataList = [...this.dataList, ...res.data.records];
  302. }
  303. }
  304. });
  305. },
  306. gotoInfo(postPushId) {
  307. if (!postPushId) {
  308. uni.showToast({
  309. title: "岗位不存在",
  310. icon: "none",
  311. });
  312. return;
  313. }
  314. uni.navigateTo({
  315. url: "/pages/index/game/order?postPushId=" + postPushId,
  316. });
  317. },
  318. getDataLists() {
  319. let data = {
  320. page: this.page,
  321. limit: this.limit,
  322. userId: uni.getStorageSync("userId"),
  323. education: this.filter.education, //学历
  324. salaryRange: this.filter.salaryRange, //薪资
  325. experience: this.filter.experience, //经验
  326. companyPeople: this.filter.companyPeople, //公司规模
  327. industry: this.filter.industry, //行业
  328. };
  329. this.$Request.getT("/app/sendRecord/getMyRecordListV2", data).then((res) => {
  330. uni.stopPullDownRefresh();
  331. uni.hideLoading();
  332. if (res.code == 0) {
  333. res.data.records.map((item) => {
  334. if (item.positionWelfare) {
  335. item.positionWelfare = item.positionWelfare.split(",");
  336. }
  337. });
  338. this.pages = res.data.pages;
  339. if (this.page == 1) {
  340. this.dataList = res.data.records;
  341. } else {
  342. this.dataList = [...this.dataList, ...res.data.records];
  343. }
  344. }
  345. });
  346. },
  347. getDataList() {
  348. let data = {
  349. page: this.page,
  350. limit: this.limit,
  351. education: this.filter.education, //学历
  352. salaryRange: this.filter.salaryRange, //薪资
  353. experience: this.filter.experience, //经验
  354. companyPeople: this.filter.companyPeople, //公司规模
  355. industry: this.filter.industry, //行业
  356. // browseType:1
  357. };
  358. this.$Request.getT("/app/userBrowse/selectMyBrowseV2", data).then((res) => {
  359. uni.stopPullDownRefresh();
  360. uni.hideLoading();
  361. if (res.code == 0) {
  362. res.data.records.map((item) => {
  363. if (item.positionWelfare) {
  364. item.positionWelfare = item.positionWelfare.split(",");
  365. } else {
  366. item.positionWelfare = [];
  367. }
  368. });
  369. this.pages = res.data.pages;
  370. if (this.page == 1) {
  371. this.dataList = res.data.records;
  372. } else {
  373. this.dataList = [...this.dataList, ...res.data.records];
  374. }
  375. }
  376. });
  377. },
  378. },
  379. };
  380. </script>
  381. <style lang="scss" scoped>
  382. page {
  383. background: #fff;
  384. }
  385. .filterSe {
  386. position: fixed;
  387. bottom: 10vh;
  388. right: 30rpx;
  389. image {
  390. width: 100rpx;
  391. height: 100rpx;
  392. // border-radius: 50%;
  393. }
  394. }
  395. .tab-list {
  396. margin-bottom: 20rpx;
  397. }
  398. .gwList {
  399. width: 100%;
  400. .gwList-box {
  401. width: 686rpx;
  402. height: 100%;
  403. .gwList-box-item {
  404. width: 100%;
  405. box-sizing: border-box;
  406. border: 1rpx solid rgba(227, 231, 236, 1);
  407. border-radius: 12rpx;
  408. background: #fdfdfd;
  409. padding: 36rpx;
  410. margin-bottom: 20rpx;
  411. }
  412. .gwList-box-item-box {
  413. width: 623rpx;
  414. height: 100%;
  415. .gwList-box-item-box-title {
  416. text:nth-of-type(1) {
  417. color: #171725;
  418. font-family: DM Sans;
  419. font-size: 32rpx;
  420. font-weight: 700;
  421. line-height: 48rpx;
  422. }
  423. text:nth-of-type(2) {
  424. color: #016bf6;
  425. font-family: DM Sans;
  426. font-size: 24rpx;
  427. font-weight: 700;
  428. line-height: 40rpx;
  429. }
  430. }
  431. .gwList-box-item-box-label {
  432. display: flex;
  433. align-items: center;
  434. gap: 8rpx;
  435. .gw-tag {
  436. /* 自动布局 */
  437. display: flex;
  438. justify-content: center;
  439. align-items: center;
  440. padding: 8rpx;
  441. border-radius: 8rpx;
  442. box-sizing: border-box;
  443. background: #c6c6c61a;
  444. color: rgba(153, 153, 153, 1);
  445. font-family: DM Sans;
  446. font-size: 20rpx;
  447. font-weight: 400;
  448. line-height: 20rpx;
  449. }
  450. }
  451. .gwList-box-item-box-name {
  452. color: #9ca4ab;
  453. font-family: DM Sans;
  454. font-size: 24rpx;
  455. font-weight: 400;
  456. line-height: 40rpx;
  457. padding: 6rpx 0;
  458. box-sizing: border-box;
  459. text {
  460. margin-right: 8rpx;
  461. }
  462. // text:nth-of-type(1) {
  463. // width: 450rpx;
  464. // }
  465. }
  466. .gwList-box-item-box-info {
  467. font-size: 26rpx;
  468. padding-top: 20rpx;
  469. box-sizing: border-box;
  470. color: #9ca4ab;
  471. font-family: DM Sans;
  472. font-size: 16rpx;
  473. font-weight: 400;
  474. line-height: 40rpx;
  475. text-align: left;
  476. .gwList-box-item-box-info-l {
  477. .info-tag {
  478. border-radius: 8rpx;
  479. background: rgba(236, 225, 253, 1);
  480. padding: 8rpx;
  481. box-sizing: border-box;
  482. font-family: DM Sans;
  483. color: #7659d2;
  484. font-size: 16rpx;
  485. font-weight: 400;
  486. line-height: 20rpx;
  487. margin-left: 8rpx;
  488. }
  489. .user-info-img {
  490. width: 40rpx;
  491. height: 40rpx;
  492. border: 1rpx solid rgba(240, 240, 240, 1);
  493. border-radius: 50%;
  494. margin-right: 8.62rpx;
  495. }
  496. }
  497. .gwList-box-item-box-info-r {
  498. max-width: 340rpx;
  499. }
  500. }
  501. }
  502. }
  503. }
  504. .qz-record {
  505. padding: 20rpx 40rpx;
  506. box-sizing: border-box;
  507. .qz-title {
  508. font-family: DM Sans;
  509. font-size: 60rpx;
  510. color: rgba(51, 51, 51, 1);
  511. font-weight: 800;
  512. }
  513. .qz-desc {
  514. color: rgba(102, 102, 102, 1);
  515. font-family: DM Sans;
  516. font-size: 24rpx;
  517. font-weight: 400;
  518. line-height: 32rpx;
  519. margin-top: 20rpx;
  520. }
  521. }
  522. </style>