recruiting.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. <template>
  2. <div class="peripheral">
  3. <van-tabs
  4. v-model="active"
  5. @click="tabOnClick"
  6. title-active-color="#6600FF"
  7. color="#6600FF"
  8. title-inactive-color="#666666"
  9. line-width="120px"
  10. >
  11. <van-tab title="最新招募">
  12. <div class="tabs-box">
  13. <div class="white-box part-1">
  14. <div class="search-box">
  15. <div class="search-input-box">
  16. <input type="text" v-model="requestData.positionName" placeholder="意向职位模糊" />
  17. </div>
  18. <div class="search-icon-box">
  19. <i class="iconfont icon-sousuo" @click="zpSeach"></i>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="part-2">
  24. <van-pull-refresh v-model="zpRefreshing" @refresh="onZpRefresh" style="min-height: 60vh;">
  25. <van-list
  26. v-model="zpLoading"
  27. :finished="zpFinished"
  28. finished-text="没有更多了"
  29. :immediate-check="false"
  30. @load="onZpLoad"
  31. >
  32. <div
  33. class="card-item white-card"
  34. v-for="item in dataList"
  35. :key="item.id"
  36. @click="goNavigator('talentService-recruitDetial', item)"
  37. >
  38. <div class="card-left">
  39. <p class="tit">{{ item.position }}</p>
  40. <p class="txt">{{ item.enterpriseId }}</p>
  41. <p class="date">发布日期:{{ item.createdAt }}</p>
  42. </div>
  43. <div class="card-right">
  44. <span class="normal-tip yd z-bg" v-if="compareDate(item.validityDate)">有效</span>
  45. <span class="normal-tip yd y-bg" v-else>到期</span>
  46. </div>
  47. </div>
  48. </van-list>
  49. </van-pull-refresh>
  50. </div>
  51. </div>
  52. </van-tab>
  53. <van-tab title="专业人才库">
  54. <div class="tabs-box">
  55. <div class="white-box part-3">
  56. <div class="search-box">
  57. <div class="search-input-box">
  58. <input type="text" v-model="paramRequest.followPosition" placeholder="意向职位模糊" />
  59. </div>
  60. <div class="search-icon-box">
  61. <i class="iconfont icon-sousuo" @click="rcSeach"></i>
  62. </div>
  63. </div>
  64. <div class="tips-list-box">
  65. <span
  66. @click="getTips(item)"
  67. :class="tip == item.value && 'active'"
  68. v-for="item in dc_data.specialty"
  69. :key="item.label"
  70. >{{ item.label }}</span
  71. >
  72. </div>
  73. </div>
  74. <div class="white-box part-4">
  75. <van-pull-refresh v-model="rcRefreshing" @refresh="onRcRefresh" style="min-height: 60vh;">
  76. <van-list
  77. v-model="rcLoading"
  78. :finished="rcFinished"
  79. finished-text="没有更多了"
  80. :immediate-check="false"
  81. @load="onRcLoad"
  82. >
  83. <div class="figure-card" v-for="item in personnelList" :key="item.id">
  84. <div class="card-left">
  85. <img :src="'[]'==item.photo?'':JSON.parse(item.photo)[0].url" v-if="item.photo" alt="" />
  86. </div>
  87. <div class="card-right">
  88. <div class="top">
  89. <span class="name">{{ item.realName.slice(0, 1) }}{{ item.gender=='女'?'女士':'先生' }}</span>
  90. <span class="tips-detail" @click="resumeDetial(item.id)">履历详情</span>
  91. </div>
  92. <div class="bottom">
  93. <p class="text">意向职位:{{ item.followPosition }}</p>
  94. <p class="text">特长:{{ item.labelSpecialty }}</p>
  95. <p class="text">工作年限:{{ item.workYears }}</p>
  96. </div>
  97. </div>
  98. </div>
  99. </van-list>
  100. </van-pull-refresh>
  101. </div>
  102. </div>
  103. </van-tab>
  104. </van-tabs>
  105. </div>
  106. </template>
  107. <script>
  108. import Base from '@/pages/base/base'
  109. import PositionNav from "@/components/position-nav";
  110. import { getRecruitListOder } from "@/service/api_recruit";
  111. import { getPersonnelList } from "@/service/api_personnel";
  112. export default {
  113. mixins: [Base],
  114. components: {
  115. PositionNav,
  116. },
  117. data() {
  118. return {
  119. active: 0,
  120. dc_key: ['specialty'],
  121. zpLoading: false,
  122. zpFinished: false,
  123. zpRefreshing: false,
  124. requestData: {
  125. positionName: "",
  126. pageNum: 1,
  127. pageSize: 10
  128. },
  129. dataList: [],
  130. zpTotal: 0,
  131. rcLoading: false,
  132. rcFinished: false,
  133. rcRefreshing: false,
  134. paramRequest: {
  135. followPosition: "",
  136. pageNum: 1,
  137. pageSize: 5
  138. },
  139. personnelList: [],
  140. rcTotal: 0,
  141. list1: [],
  142. tipsList: [],
  143. tip: "",
  144. list2: [],
  145. };
  146. },
  147. mounted() {
  148. this.getList();
  149. this.initDict(this.dc_key).then((res) => {});
  150. },
  151. methods: {
  152. zpSeach(){
  153. this.requestData.pageNum = 1;
  154. this.getList();
  155. },
  156. onZpRefresh() {
  157. this.requestData.pageNum = 1;
  158. this.getList();
  159. },
  160. onZpLoad(){
  161. if (this.zpRefreshing) {
  162. this.dataList = [];
  163. this.zpRefreshing = false;
  164. }
  165. if (this.dataList.length >= this.zpTotal) {
  166. this.zpFinished = true;
  167. }else{
  168. this.requestData.pageNum++;
  169. list(this.requestData).then((res) => {
  170. res.rows.forEach(element => {
  171. this.dataList.push(element);
  172. });
  173. this.zpTotal = res.total;
  174. this.zpLoading = false;
  175. })
  176. }
  177. },
  178. //获取招聘列表
  179. getList(){
  180. getRecruitListOder(this.requestData).then((res) => {
  181. this.dataList = res.rows;
  182. this.zpTotal = res.total;
  183. this.zpRefreshing = false;
  184. console.log("接口数据——:", this.zpTotal);
  185. console.log("接口数据——:", this.dataList);
  186. this.zpFinished = false;
  187. })
  188. },
  189. rcSeach(){
  190. this.paramRequest.pageNum = 1;
  191. this.getPersonnelList();
  192. },
  193. onRcRefresh() {
  194. this.paramRequest.pageNum = 1;
  195. this.getPersonnelList();
  196. },
  197. onRcLoad(){
  198. if (this.rcRefreshing) {
  199. this.dataList = [];
  200. this.rcRefreshing = false;
  201. }
  202. if (this.personnelList.length >= this.rcTotal) {
  203. this.rcFinished = true;
  204. }else{
  205. this.paramRequest.pageNum++;
  206. this.paramRequest.specialty = this.tip;
  207. list(this.paramRequest).then((res) => {
  208. res.rows.forEach(element => {
  209. this.personnelList.push(element);
  210. });
  211. this.rcTotal = res.total;
  212. })
  213. }
  214. this.rcLoading = false;
  215. },
  216. //获取人才列表
  217. getPersonnelList(){
  218. this.paramRequest.specialty = this.tip;
  219. getPersonnelList(this.paramRequest).then((res) => {
  220. this.personnelList = res.rows;
  221. this.rcTotal = res.total;
  222. this.rcRefreshing = false;
  223. })
  224. },
  225. tabOnClick(){
  226. if(0 == this.active){
  227. this.getList();
  228. }else{
  229. this.getPersonnelList();
  230. }
  231. },
  232. getTips(item) {
  233. this.tip = item.value;
  234. // this.getPersonnelList();
  235. this.rcSeach();
  236. },
  237. resumeDetial(id){
  238. this.goNavigator("talentService-iAmATalentShow", {id: id});
  239. },
  240. compareDate(dd){
  241. return new Date(dd).getTime() > new Date().getTime();
  242. }
  243. },
  244. };
  245. </script>
  246. <style lang="scss" type="text/scss" scoped>
  247. .peripheral {
  248. /deep/.van-tabs__wrap {
  249. height: 100px;
  250. background: #ffffff;
  251. box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
  252. margin-bottom: 10px;
  253. }
  254. .tabs-box {
  255. margin: 20px 0;
  256. .part-1 {
  257. padding: 30px;
  258. box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
  259. }
  260. .part-2 {
  261. overflow-y: auto;
  262. height: calc(100vh - 320px);
  263. box-sizing: border-box;
  264. .card-item {
  265. @include flex;
  266. margin: 0 30px 30px;
  267. .card-left {
  268. display: flex;
  269. justify-content: space-between;
  270. flex-direction: column;
  271. height: 140px;
  272. .tit {
  273. width: 500px;
  274. font-size: 32px;
  275. color: #333;
  276. @include line-over;
  277. }
  278. .txt {
  279. width: 500px;
  280. font-size: 28px;
  281. color: #999;
  282. @include line-over;
  283. }
  284. .date {
  285. font-size: 28px;
  286. color: #999;
  287. }
  288. }
  289. .card-right {
  290. align-self: flex-start;
  291. }
  292. }
  293. }
  294. .part-3 {
  295. padding: 30px 30px 10px;
  296. box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
  297. margin-bottom: 20px;
  298. }
  299. .part-4 {
  300. padding: 0;
  301. overflow-y: auto;
  302. height: calc(100vh - 450px);
  303. }
  304. }
  305. }
  306. .search-box {
  307. @include flex;
  308. box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1);
  309. border-radius: 35px;
  310. height: 70px;
  311. padding: 0 40px;
  312. .search-input-box {
  313. input {
  314. height: 70px;
  315. line-height: 70px;
  316. font-size: 30px;
  317. color: #b7b7b7;
  318. &::placeholder {
  319. line-height: 70px;
  320. font-size: 30px;
  321. color: #b7b7b7;
  322. }
  323. }
  324. }
  325. .search-icon-box {
  326. width: 100px;
  327. text-align: center;
  328. i {
  329. line-height: 70px;
  330. font-size: 36px;
  331. color: $text5;
  332. }
  333. }
  334. }
  335. .tips-list-box {
  336. margin-top: 20px;
  337. display: flex;
  338. align-items: center;
  339. flex-wrap: wrap;
  340. span {
  341. width: 160px;
  342. height: 70px;
  343. line-height: 70px;
  344. border-radius: 10px;
  345. font-size: 28px;
  346. color: #333;
  347. text-align: center;
  348. margin-right: 16px;
  349. margin-bottom: 20px;
  350. background: $color5;
  351. &:nth-child(4n) {
  352. margin-right: 0;
  353. }
  354. &.active {
  355. background: #f7f3ff;
  356. color: #874cfe;
  357. }
  358. }
  359. }
  360. .figure-card {
  361. padding: 30px;
  362. display: flex;
  363. border-bottom: 1px solid #e3e3e3;
  364. .card-left {
  365. width: 160px;
  366. height: 200px;
  367. overflow: hidden;
  368. margin-right: 30px;
  369. img {
  370. width: 100%;
  371. }
  372. }
  373. .card-right {
  374. flex: 1;
  375. .top {
  376. @include flex;
  377. margin-bottom: 20px;
  378. .name {
  379. font-size: 32px;
  380. color: #333;
  381. font-weight: bold;
  382. }
  383. .tips-detail {
  384. width: 160px;
  385. height: 70px;
  386. line-height: 70px;
  387. background: #f2ebff;
  388. border: 1px solid #6600ff;
  389. border-radius: 10px;
  390. font-size: 28px;
  391. font-weight: 400;
  392. color: #6600ff;
  393. text-align: center;
  394. }
  395. }
  396. .bottom {
  397. .text {
  398. font-size: 28px;
  399. font-weight: 400;
  400. color: #999999;
  401. line-height: 40px;
  402. }
  403. }
  404. }
  405. }
  406. </style>