jobInformation.vue 8.9 KB

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