jobInformation.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. <template>
  2. <view>
  3. <u-navbar back-text="用工信息" back-icon-size="0" :customBack="customBack" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <!-- 搜索框 -->
  6. <view class="search">
  7. <view class="search-box">
  8. <view class="option">
  9. <nxsearch :selectList="selectList" button="inside" @search="doSearch" @confirm="doSearc"
  10. :setIsFocus="false" @focus="gotoUrl('pages/packages/search/search?type=1')"
  11. v-model="searchQuery.keyword" placeholder="输入关键字找工作" />
  12. </view>
  13. </view>
  14. </view>
  15. <!-- 搜索结果 -->
  16. <view class="result">
  17. <view class="tabs">
  18. <view class="left">
  19. <u-tabs bg-color="#F0F0F2" :list="tabList" :is-scroll="false" :current="current"
  20. @change="change"></u-tabs>
  21. </view>
  22. <view class="screen" @click="popupShowtrue">
  23. <view class="icon">
  24. <img src="@/assets/img/riLine-filter-line@1x.png" alt="">
  25. </view>
  26. <view>筛选</view>
  27. </view>
  28. </view>
  29. <view class="result-item" v-for="(item,i) in tabList[current].list" :key="i"
  30. @click="gotoUrl('pages/packages/jobInformation/jobDetails?id='+item.id)">
  31. <view class="content-1">
  32. <!-- 职位 -->
  33. <view class="position">
  34. <span class="tophot" v-if="false" >置顶</span> {{item.positionName}}
  35. </view>
  36. <!-- 薪水 -->
  37. <view class="salary">
  38. {{item.salary}}{{getUnit(item)}}
  39. </view>
  40. </view>
  41. <view class="content-2">
  42. <!-- 标签 -->
  43. <view class="tag">
  44. <view class="tag-item tag-item2" v-if="getLastTime(item.lastLoginTime)">
  45. 活跃
  46. </view>
  47. <view class="tag-item">
  48. {{item.workArea}}
  49. </view>
  50. <view class="tag-item">
  51. {{item.settlementMethodN}}
  52. </view>
  53. <view class="tag-item">
  54. {{item.industryN}}
  55. </view>
  56. </view>
  57. <!-- 日期 -->
  58. <view class="date">
  59. {{getTime(item)}}
  60. </view>
  61. </view>
  62. <view class="content-3">
  63. <view class="issuer">
  64. {{item.contacts}}
  65. </view>
  66. <view class="address">
  67. {{item.address}}
  68. </view>
  69. </view>
  70. </view>
  71. <u-divider style="background: #F0F0F2;" bgNoneColor="#F0F0F2"
  72. v-if="tabList[current].recordsTotal==tabList[current].list.length"
  73. :isnone="tabList[current].recordsTotal==0" nonetext="没有找到相关内容"
  74. border-color="#CFD2D5">已经到底了</u-divider>
  75. </view>
  76. <tabbar :current="1"></tabbar>
  77. <jkpop ref="pop" ptype="job" @reset="reset" @queryBtn="queryBtn" ></jkpop>
  78. </view>
  79. </template>
  80. <script>
  81. import * as API from '@/apis/pagejs/tab.js'
  82. import tabbar from "@/components/Tabbar.vue"
  83. import * as API_weixin from '@/apis/weixin.js'
  84. import jkpop from "@/pages/tab/as-components/jk-popup.vue"
  85. import nxsearch from "@/components/nx-search.vue"
  86. export default {
  87. components: {
  88. nxsearch,jkpop,
  89. tabbar
  90. },
  91. data() {
  92. return {
  93. keyword: '',
  94. searchQuery: {
  95. keyword: '',
  96. selectIndex: 0
  97. },
  98. tabList: [{
  99. name: '最新',
  100. pageIndex: 1,
  101. pageSize: 20,
  102. statusType:"",
  103. list:[],
  104. recordsTotal:0
  105. }, {
  106. name: '日结',
  107. unit:"日",
  108. statusType:"1",
  109. pageIndex: 1,
  110. pageSize: 20,
  111. list:[],
  112. recordsTotal:0
  113. }, {
  114. name: '周结',
  115. unit:"周",
  116. pageIndex: 1,
  117. pageSize: 20,
  118. statusType:"2",
  119. list:[],
  120. recordsTotal:0
  121. }, {
  122. name: '月结',
  123. unit:"月",
  124. pageIndex: 1,
  125. pageSize: 20,
  126. statusType:"3",
  127. list:[],
  128. recordsTotal:0
  129. }],
  130. industryList: [
  131. ],
  132. selectList: [{
  133. id: 0,
  134. name: '找工作'
  135. },
  136. ],
  137. current: 0,
  138. queryForm:{
  139. status:0
  140. }
  141. }
  142. },
  143. onLoad(op) {
  144. this.findRecruitSearch();
  145. },
  146. onReachBottom() {
  147. var obj = this.tabList[this.current]
  148. if (obj.list.length < obj.recordsTotal) {
  149. this.myLoadmore();
  150. }
  151. },
  152. methods: {
  153. popupShowtrue(){
  154. this.$refs.pop.show();
  155. },
  156. queryBtn(queryForm){
  157. this.$refs.pop.hide();
  158. this.current = 0;
  159. this.tabList[this.current].list=[]
  160. this.tabList[this.current].pageIndex = 1;
  161. queryForm.status=0
  162. this.queryForm=queryForm
  163. this.findRecruitSearch()
  164. },
  165. myLoadmore() {
  166. this.tabList[this.current].pageIndex += 1;
  167. this.findRecruitSearch();
  168. },
  169. findRecruitSearch(){
  170. uni.showLoading({
  171. title: "加载中",
  172. mask: true,
  173. })
  174. var list = this.tabList[this.current].list
  175. var obj = this.tabList[this.current]
  176. var listForm = {
  177. ...obj,
  178. ...this.queryForm
  179. }
  180. delete listForm.list
  181. API.findRecruitSearch(listForm).then((res) => {
  182. if (listForm.pageIndex == 1) {
  183. list = res.data.data;
  184. } else {
  185. list = [
  186. ...list,
  187. ...res.data.data
  188. ];
  189. }
  190. this.tabList[this.current].list = list
  191. this.tabList[this.current].recordsTotal = res.data.recordsTotal;
  192. uni.hideLoading();
  193. }).catch(error => {
  194. uni.showToast({icon: 'none',
  195. title: error,
  196. icon: "none"
  197. })
  198. })
  199. },
  200. customBack() {
  201. },
  202. // 执行搜索
  203. doSearch(searchQuery) {
  204. //.log('searchQuery', searchQuery);
  205. this.searchQuery=searchQuery;
  206. },
  207. change(index) {
  208. this.current = index;
  209. var list = this.tabList[this.current].list
  210. if (list.length == 0) {
  211. this.findRecruitSearch();
  212. }
  213. },
  214. reset(queryForm) {
  215. this.queryBtn(queryForm)
  216. }
  217. }
  218. }
  219. </script>
  220. <style>
  221. page {
  222. background: #F0F0F2;
  223. padding-bottom: 50px;
  224. }
  225. </style>
  226. <style lang="scss" scoped>
  227. .tophot{
  228. padding:2rpx 6rpx;
  229. border: 1px solid #2795FD ;
  230. border-radius: 8rpx;
  231. color:#2795FD ;
  232. line-height: 24rpx;
  233. font-size: 24rpx;
  234. margin-right: 12rpx;
  235. }
  236. .search {
  237. background-color: #fff;
  238. padding: 16rpx 32rpx;
  239. .search-box {
  240. border-radius: 50px;
  241. height: 72rpx;
  242. line-height: 72rpx;
  243. }
  244. }
  245. // 搜索结果
  246. .result {
  247. background-color: #fff;
  248. .tabs {
  249. padding-right: 32rpx;
  250. display: flex;
  251. justify-content: space-between;
  252. align-items: center;
  253. border-bottom: 1px solid #f1f1f1;
  254. .left {
  255. width: 68%;
  256. /deep/.u-tabs {
  257. background-color: #fff !important;
  258. }
  259. }
  260. .screen {
  261. display: flex;
  262. align-items: center;
  263. color: rgba(39, 149, 253, 1);
  264. font-size: 16px;
  265. img {
  266. width: 16px;
  267. height: 16px;
  268. vertical-align: middle;
  269. margin-right: 4rpx;
  270. }
  271. }
  272. }
  273. .result-item {
  274. padding: 24rpx 0;
  275. margin: 0 32rpx;
  276. border-bottom: 1px solid #F0F0F2;
  277. .content-1 {
  278. display: flex;
  279. justify-content: space-between;
  280. align-items: center;
  281. // 职位
  282. .position {
  283. display: flex;
  284. align-items: center;
  285. color: rgba(16, 16, 16, 1);
  286. font-size: 36rpx;
  287. font-family: 'PingFang Medium';
  288. }
  289. // 薪水
  290. .salary {
  291. color: rgba(255, 61, 0, 1);
  292. font-size: 32rpx;
  293. font-family: 'PingFang Medium';
  294. }
  295. }
  296. .content-2 {
  297. margin-top: 12rpx;
  298. display: flex;
  299. justify-content: space-between;
  300. // 标签
  301. .tag {
  302. display: flex;
  303. flex-wrap: wrap;
  304. .tag-item {
  305. min-width: 64rpx;
  306. height: 36rpx;
  307. line-height: 36rpx;
  308. border-radius: 8rpx;
  309. background-color: rgba(241, 241, 247, 1);
  310. color: rgba(129, 127, 153, 1);
  311. font-size: 24rpx;
  312. text-align: center;
  313. margin-right: 12rpx;
  314. padding: 0 8rpx;
  315. overflow: hidden;
  316. }
  317. .tag-item2 {
  318. background-color:rgb(70, 150, 246);
  319. color: #fff;
  320. }
  321. }
  322. // 日期
  323. .date {
  324. color: rgba(153, 153, 153, 1);
  325. font-size: 24rpx;
  326. min-width: 160rpx;
  327. }
  328. }
  329. .content-3 {
  330. margin-top: 20rpx;
  331. display: flex;
  332. justify-content: space-between;
  333. align-items: center;
  334. .issuer {
  335. color: rgba(51, 51, 51, 1);
  336. font-size: 24rpx;
  337. min-width: 160rpx;
  338. }
  339. .address {
  340. color: rgba(51, 51, 51, 1);
  341. font-size: 24rpx;
  342. }
  343. }
  344. }
  345. }
  346. // 筛选框
  347. .popup-content {
  348. padding: 32rpx;
  349. .headline {
  350. color: #101010;
  351. font-size: 40rpx;
  352. text-align: center;
  353. }
  354. //行业
  355. .industry,
  356. .clearing-form,
  357. .salary-form {
  358. margin-top: 16rpx;
  359. .title {
  360. font-size: 32rpx;
  361. color: #111111;
  362. }
  363. // 选项
  364. .options {
  365. display: flex;
  366. justify-content: space-between;
  367. flex-wrap: wrap;
  368. margin-top: 24rpx;
  369. .item {
  370. height: 56rpx;
  371. line-height: 56rpx;
  372. padding: 0 28rpx;
  373. margin-bottom: 16rpx;
  374. color: #999999;
  375. background-color: #F3F3F4;
  376. border-radius: 4px;
  377. }
  378. .checked {
  379. background-color: #2795FD;
  380. color: #fff;
  381. }
  382. }
  383. }
  384. .button {
  385. display: flex;
  386. margin-top: 8rpx;
  387. .reset:after{
  388. border:0
  389. }
  390. .reset {
  391. color: #999999;
  392. background-color: #F3F3F4;
  393. width: 200rpx;
  394. height: 72rpx;
  395. line-height: 72rpx;
  396. border-radius: 8px;
  397. }
  398. .confirm {
  399. width: 440rpx;
  400. background-color: #2795FD;
  401. color: #fff;
  402. height: 72rpx;
  403. line-height: 72rpx;
  404. border-radius: 8px;
  405. }
  406. }
  407. }
  408. .salary-form,
  409. .clearing-form {
  410. .options {
  411. justify-content: start !important;
  412. }
  413. .item {
  414. margin-right: 24rpx;
  415. }
  416. }
  417. /deep/.u-close--top-right {
  418. top: 44rpx;
  419. }
  420. .scrollview{
  421. border: 1px #101010 dashed;
  422. }
  423. </style>