records.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  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-if="title == '面试记录'">
  90. <view class="gwList-box-item-box-info flex justify-between align-center padding0">
  91. <view class="gwList-box-item-box-info-l flex align-center">
  92. <image
  93. :src="item.company&&item.company.companyLogo ? item.company.companyLogo : '../../static/logo.png'"
  94. class="company-info-img"
  95. mode=""
  96. ></image>
  97. </view>
  98. <view class="companyRight">
  99. <view class="gwList-box-item-box-info-l flex justify-between align-center">
  100. <text class="companyName">{{ item.company&&item.company.companyName||'匿名公司' }}</text>
  101. <view class="info-tag">待面试</view>
  102. </view>
  103. <view class="gwList-box-item-box-name">
  104. <text>{{ item.postPush&&item.postPush.ruleClassifyName ? item.postPush.ruleClassifyName : "匿名" }}</text>·<text>{{ item.postPush&&item.postPush.salaryRange }}</text>
  105. </view>
  106. <view class="gwList-box-item-box-info-r">
  107. {{ item.interviewDateTime }}
  108. </view>
  109. </view>
  110. </view>
  111. </block>
  112. <block v-else>
  113. <view class="gwList-box-item-box-name">
  114. <text>{{ item.companyName ? item.companyName : "匿名公司" }}</text>
  115. <text v-if="item.companyPeople">{{ item.companyPeople }}</text>
  116. </view>
  117. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  118. <view
  119. class="gw-tag"
  120. v-for="(ite, ind) in item.positionWelfare"
  121. :key="ind"
  122. >{{ ite }}</view
  123. >
  124. </view>
  125. <view class="gwList-box-item-box-info flex justify-between align-center">
  126. <view class="gwList-box-item-box-info-l flex align-center">
  127. <image
  128. :src="item.companyLogo ? item.companyLogo : '../../static/logo.png'"
  129. class="user-info-img"
  130. mode=""
  131. ></image>
  132. <text
  133. >{{item.user&&item.user.userName?item.user.userName:'未知'}}·{{item.hr&&item.hr.hrPosition?item.hr.hrPosition:'未知'}}</text
  134. >
  135. <view class="info-tag">3分钟前回复</view>
  136. </view>
  137. <view class="gwList-box-item-box-info-r">
  138. {{ item.county }}
  139. {{ item.address }}
  140. </view>
  141. </view>
  142. </block>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 暂无数据 -->
  148. <view class="gwList" v-else>
  149. <empty />
  150. </view>
  151. <!-- 筛选悬浮 -->
  152. <view hidden class="filterSe" @click="goScreen()">
  153. <image src="../../static/images/my/filterSe.png" mode=""></image>
  154. </view>
  155. </view>
  156. </template>
  157. <script>
  158. import empty from "../../components/empty.vue";
  159. export default {
  160. components: {
  161. empty,
  162. },
  163. data() {
  164. return {
  165. dataList: [],
  166. page: 1,
  167. limit: 10,
  168. pages: "",
  169. title: "",
  170. tabIndex: 0, //tab选中的索引
  171. filter: {
  172. education: "", //学历
  173. salaryRange: "", //薪资
  174. experience: "", //经验
  175. companyPeople: "", //公司规模
  176. industry: "", //行业
  177. },
  178. list: [
  179. {
  180. name: "我看过",
  181. },
  182. {
  183. name: "沟通过",
  184. },
  185. {
  186. name: "投递过",
  187. },
  188. {
  189. name: "面试",
  190. },
  191. {
  192. name: "收藏职位",
  193. },
  194. ],
  195. };
  196. },
  197. onLoad(option) {
  198. /* uni.setNavigationBarTitle({
  199. title: option.title,
  200. }); */
  201. uni.showLoading({
  202. title: "加载中",
  203. });
  204. this.title = option.title;
  205. var that=this
  206. that.getFilter()
  207. uni.$on('updateRecord',function(){
  208. that.page = 1;
  209. that.getFilter()
  210. })
  211. },
  212. onUnload() {
  213. uni.removeStorageSync("browse");
  214. uni.$off('updateRecord')
  215. },
  216. onReachBottom() {
  217. if (this.page < this.pages) {
  218. this.page += 1;
  219. if (this.title == "我的收藏") {
  220. this.getMyCollectionList();
  221. } else if (this.title == "浏览记录") {
  222. this.getDataList();
  223. } else if(this.title == "投递记录") {
  224. this.getDataLists();
  225. }else if (this.title == "沟通记录") {
  226. this.getDataLists(1);
  227. }else if (this.title == "面试记录") {
  228. this.getDataLists(3);
  229. }
  230. }
  231. },
  232. onPullDownRefresh() {
  233. this.page = 1;
  234. if (this.title == "我的收藏") {
  235. this.getMyCollectionList();
  236. } else if (this.title == "浏览记录") {
  237. this.getDataList();
  238. } else if (this.title == "投递记录") {
  239. this.getDataLists();
  240. }else if (this.title == "沟通记录") {
  241. this.getDataLists(1);
  242. }else if (this.title == "面试记录") {
  243. this.getDataLists(3);
  244. }
  245. },
  246. methods: {
  247. // 去筛选
  248. goScreen() {
  249. uni.navigateTo({
  250. url: "/package/screen/screen?isBrowse=1",
  251. });
  252. },
  253. tabClick(e) {
  254. this.tabIndex = e;
  255. if (this.tabIndex==4) {
  256. this.title = "我的收藏"
  257. this.getMyCollectionList();
  258. } else if (this.tabIndex==0) {
  259. this.title = "浏览记录"
  260. this.getDataList();
  261. } else if(this.tabIndex==2) {
  262. this.title = "投递记录"
  263. this.getDataLists();
  264. }else if(this.tabIndex==1) {
  265. this.title = "沟通记录"
  266. this.getDataLists(1);
  267. }else if(this.tabIndex==3) {
  268. this.title = "面试记录"
  269. this.getDataLists(3);
  270. }
  271. /* if (e == 2) {
  272. uni.navigateTo({
  273. url: "/my/jilu/mianshiDetail",
  274. });
  275. } */
  276. },
  277. getFilter() {
  278. if (uni.getStorageSync("browse") && uni.getStorageSync("browse").length > 0) {
  279. let browse = uni.getStorageSync("browse");
  280. console.log(browse, "2222222222");
  281. browse.map((item) => {
  282. let arr = [];
  283. item.list.map((ite) => {
  284. if (ite.value != "不限") {
  285. arr.push(ite.value);
  286. }
  287. });
  288. switch (item.name) {
  289. case "学历要求":
  290. this.filter.education = arr.join(",");
  291. break;
  292. case "薪资范围(单选)":
  293. this.filter.salaryRange = arr.join(",");
  294. break;
  295. case "经验要求":
  296. this.filter.experience = arr.join(",");
  297. break;
  298. case "公司规模":
  299. this.filter.companyPeople = arr.join(",");
  300. break;
  301. case "行业":
  302. this.filter.industry = arr.join(",");
  303. break;
  304. }
  305. });
  306. } else {
  307. this.filter.education = ""; //学历
  308. this.filter.experience = ""; //经验
  309. this.filter.industry = ""; //行业
  310. this.filter.salaryRange = ""; //薪资
  311. this.filter.companyPeople = ""; //公司规模
  312. }
  313. if (this.title == "我的收藏") {
  314. this.tabIndex=4
  315. this.getMyCollectionList();
  316. } else if (this.title == "浏览记录") {
  317. this.tabIndex=0
  318. this.getDataList();
  319. } else if (this.title == "投递记录"){
  320. this.tabIndex=2
  321. this.getDataLists();
  322. }else if (this.title == "沟通记录"){
  323. this.tabIndex=1
  324. this.getDataLists(1);
  325. }else if (this.title == "面试记录"){
  326. this.tabIndex=3
  327. this.getDataLists(3);
  328. }
  329. },
  330. /**
  331. * 我的收藏记录列表
  332. */
  333. getMyCollectionList() {
  334. let data = {
  335. page: this.page,
  336. limit: this.limit,
  337. education: this.filter.education, //学历
  338. salaryRange: this.filter.salaryRange, //薪资
  339. experience: this.filter.experience, //经验
  340. companyPeople: this.filter.companyPeople, //公司规模
  341. industry: this.filter.industry, //行业
  342. };
  343. this.$Request.getT("/app/myCollection/getMyCollectionListV2", data).then((res) => {
  344. uni.stopPullDownRefresh();
  345. uni.hideLoading();
  346. if (res.code == 0) {
  347. res.data.records.map((item) => {
  348. if (item.positionWelfare) {
  349. item.positionWelfare = item.positionWelfare.split(",");
  350. }
  351. });
  352. this.pages = res.data.pages;
  353. if (this.page == 1) {
  354. this.dataList = res.data.records;
  355. } else {
  356. this.dataList = [...this.dataList, ...res.data.records];
  357. }
  358. }
  359. });
  360. },
  361. gotoInfo(postPushId) {
  362. if (!postPushId) {
  363. uni.showToast({
  364. title: "岗位不存在",
  365. icon: "none",
  366. });
  367. return;
  368. }
  369. uni.navigateTo({
  370. url: "/pages/index/game/order?postPushId=" + postPushId,
  371. });
  372. },
  373. getDataLists(types=0) {
  374. let data = {
  375. page: this.page,
  376. limit: this.limit,
  377. userId: uni.getStorageSync("userId"),
  378. education: this.filter.education, //学历
  379. salaryRange: this.filter.salaryRange, //薪资
  380. experience: this.filter.experience, //经验
  381. companyPeople: this.filter.companyPeople, //公司规模
  382. industry: this.filter.industry, //行业
  383. };
  384. let action='/app/sendRecord/getMyRecordListV2'
  385. switch (types){
  386. case 0:
  387. break;
  388. case 1:
  389. action='/admin/userBrowse/getConversationList'
  390. break;
  391. case 3:
  392. action='/app/interviewRecord/interviewList'
  393. break;
  394. }
  395. this.$Request.getT(action, data).then((res) => {
  396. uni.stopPullDownRefresh();
  397. uni.hideLoading();
  398. if (res.code == 0) {
  399. res.data.records.map((item) => {
  400. if (item.positionWelfare) {
  401. item.positionWelfare = item.positionWelfare.split(",");
  402. }
  403. });
  404. this.pages = res.data.pages;
  405. if (this.page == 1) {
  406. this.dataList = res.data.records;
  407. } else {
  408. this.dataList = [...this.dataList, ...res.data.records];
  409. }
  410. }
  411. });
  412. },
  413. getDataList() {
  414. let data = {
  415. page: this.page,
  416. limit: this.limit,
  417. education: this.filter.education, //学历
  418. salaryRange: this.filter.salaryRange, //薪资
  419. experience: this.filter.experience, //经验
  420. companyPeople: this.filter.companyPeople, //公司规模
  421. industry: this.filter.industry, //行业
  422. // browseType:1
  423. };
  424. this.$Request.getT("/app/userBrowse/selectMyBrowseV2", data).then((res) => {
  425. uni.stopPullDownRefresh();
  426. uni.hideLoading();
  427. if (res.code == 0) {
  428. res.data.records.map((item) => {
  429. if (item.positionWelfare) {
  430. item.positionWelfare = item.positionWelfare.split(",");
  431. } else {
  432. item.positionWelfare = [];
  433. }
  434. });
  435. this.pages = res.data.pages;
  436. if (this.page == 1) {
  437. this.dataList = res.data.records;
  438. } else {
  439. this.dataList = [...this.dataList, ...res.data.records];
  440. }
  441. }
  442. });
  443. },
  444. },
  445. };
  446. </script>
  447. <style lang="scss" scoped>
  448. page {
  449. background: #fff;
  450. }
  451. .filterSe {
  452. position: fixed;
  453. bottom: 10vh;
  454. right: 30rpx;
  455. image {
  456. width: 100rpx;
  457. height: 100rpx;
  458. // border-radius: 50%;
  459. }
  460. }
  461. .tab-list {
  462. margin-bottom: 20rpx;
  463. }
  464. .gwList {
  465. width: 100%;
  466. .gwList-box {
  467. width: 686rpx;
  468. height: 100%;
  469. .gwList-box-item {
  470. width: 100%;
  471. box-sizing: border-box;
  472. border: 1rpx solid rgba(227, 231, 236, 1);
  473. border-radius: 12rpx;
  474. background: #fdfdfd;
  475. padding: 36rpx;
  476. margin-bottom: 20rpx;
  477. }
  478. .gwList-box-item-box {
  479. width: 623rpx;
  480. height: 100%;
  481. .gwList-box-item-box-title {
  482. text:nth-of-type(1) {
  483. color: #171725;
  484. font-family: DM Sans;
  485. font-size: 32rpx;
  486. font-weight: 700;
  487. line-height: 48rpx;
  488. }
  489. text:nth-of-type(2) {
  490. color: #016bf6;
  491. font-family: DM Sans;
  492. font-size: 24rpx;
  493. font-weight: 700;
  494. line-height: 40rpx;
  495. }
  496. }
  497. .gwList-box-item-box-label {
  498. display: flex;
  499. align-items: center;
  500. gap: 8rpx;
  501. .gw-tag {
  502. /* 自动布局 */
  503. display: flex;
  504. justify-content: center;
  505. align-items: center;
  506. padding: 8rpx;
  507. border-radius: 8rpx;
  508. box-sizing: border-box;
  509. background: #c6c6c61a;
  510. color: rgba(153, 153, 153, 1);
  511. font-family: DM Sans;
  512. font-size: 20rpx;
  513. font-weight: 400;
  514. line-height: 20rpx;
  515. }
  516. }
  517. .gwList-box-item-box-name {
  518. color: #9ca4ab;
  519. font-family: DM Sans;
  520. font-size: 24rpx;
  521. font-weight: 400;
  522. line-height: 40rpx;
  523. padding: 6rpx 0;
  524. box-sizing: border-box;
  525. text {
  526. margin-right: 8rpx;
  527. }
  528. // text:nth-of-type(1) {
  529. // width: 450rpx;
  530. // }
  531. }
  532. .gwList-box-item-box-info {
  533. font-size: 26rpx;
  534. padding-top: 20rpx;
  535. box-sizing: border-box;
  536. color: #9ca4ab;
  537. font-family: DM Sans;
  538. font-size: 16rpx;
  539. font-weight: 400;
  540. line-height: 40rpx;
  541. text-align: left;
  542. .gwList-box-item-box-info-l {
  543. .info-tag {
  544. border-radius: 8rpx;
  545. background: rgba(236, 225, 253, 1);
  546. padding: 8rpx;
  547. box-sizing: border-box;
  548. font-family: DM Sans;
  549. color: #7659d2;
  550. font-size: 16rpx;
  551. font-weight: 400;
  552. line-height: 20rpx;
  553. margin-left: 8rpx;
  554. }
  555. .user-info-img {
  556. width: 40rpx;
  557. height: 40rpx;
  558. border: 1rpx solid rgba(240, 240, 240, 1);
  559. border-radius: 50%;
  560. margin-right: 8.62rpx;
  561. }
  562. .company-info-img{
  563. width: 100rpx;
  564. height: 100rpx;
  565. border: 1rpx solid rgba(240, 240, 240, 1);
  566. border-radius: 50%;
  567. margin-right: 30rpx;
  568. }
  569. }
  570. .gwList-box-item-box-info-r {
  571. max-width: 340rpx;
  572. }
  573. .companyRight{
  574. width: 100%;
  575. .companyName{
  576. font-size: 26rpx;
  577. color: #353535;
  578. margin-right: 20rpx;
  579. }
  580. }
  581. }
  582. .padding0{
  583. padding-top:0
  584. }
  585. }
  586. }
  587. }
  588. .qz-record {
  589. padding: 20rpx 40rpx;
  590. box-sizing: border-box;
  591. .qz-title {
  592. font-family: DM Sans;
  593. font-size: 60rpx;
  594. color: rgba(51, 51, 51, 1);
  595. font-weight: 800;
  596. }
  597. .qz-desc {
  598. color: rgba(102, 102, 102, 1);
  599. font-family: DM Sans;
  600. font-size: 24rpx;
  601. font-weight: 400;
  602. line-height: 32rpx;
  603. margin-top: 20rpx;
  604. }
  605. }
  606. </style>