gongsi-info.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. <template>
  2. <view class="gongsi-info">
  3. <image src="../static/images/gongsi-bg.png" class="gongsi-bg" mode=""></image>
  4. <u-navbar :fixed="false" bgColor='rgba(0,0,0,0)' placeholder :safeAreaInsetTop="true"
  5. @leftClick="return1"></u-navbar>
  6. <view class="" style="padding: 0 24rpx 0;box-sizing: border-box;">
  7. <view class="gongsi-header">
  8. <view class="header-top u-flex">
  9. <image :src="detail.logo" class="gongsi-logo" mode="aspectFill"></image>
  10. <view class="top-right u-flex-col u-flex-1">
  11. <text>{{detail.name || ''}}</text>
  12. <text>{{detail.category_name || ''}}|{{detail.stage_name || ''}}·{{detail.scale_name || ''}}</text>
  13. </view>
  14. </view>
  15. <view class="gongso-label u-flex u-flex-wrap">
  16. <text v-for="(a,b) in detail.tag_text" :key="b">{{a}}</text>
  17. </view>
  18. </view>
  19. <view class="gongsi-address">
  20. <view class="address-title">
  21. 公司地址
  22. </view>
  23. <view class="address-down u-flex u-row-between">
  24. <text>{{detail.province || ''}}{{detail.city || ''}}{{detail.address || ''}}</text>
  25. <image src="@/static/images/address1.png" style="width: 68rpx;height: 68rpx;" mode=""
  26. @click="openlocation"></image>
  27. </view>
  28. </view>
  29. <view class="gongsi-text">
  30. <view class="text-title">
  31. 公司介绍
  32. </view>
  33. <view class="text-body">
  34. {{detail.introduce || ''}}
  35. </view>
  36. </view>
  37. <view class="gongsi-text">
  38. <view class="text-title">
  39. 公司优势
  40. </view>
  41. <view class="text-body">
  42. {{detail.welfare_tag_text ? detail.welfare_tag_text.join(',') : ''}}
  43. </view>
  44. </view>
  45. </view>
  46. <view class="" style="height: 220rpx;"></view>
  47. <!-- <u-mask :show="showzhiwei" z-index="990" @click="closeshaixuan"></u-mask> -->
  48. <u-overlay :show="showzhiwei" z-index="990" @click="closeshaixuan"></u-overlay>
  49. <view class="gongsi-zhiwei u-flex-col" :style="{bottom:showzhiwei ? '0' : 'calc(210rpx - 90vh)'}">
  50. <view class="zhiwei-header">
  51. <view class="header-top" v-if="showsearch">
  52. <u-search placeholder="搜索职位" @search="tosearch(1)" action-text="取消" @custom="chongzhi"
  53. v-model="keyword1"></u-search>
  54. </view>
  55. <view class="header-top u-flex u-row-between" v-else @click="openzhiwei">
  56. <text class="text1">招聘职位({{total}})</text>
  57. <view @click.stop="opensearch">
  58. <u-icon name="search" size="32"></u-icon>
  59. </view>
  60. </view>
  61. <view class="header-shaixuan u-flex u-row-between">
  62. <view class="shaixuan-item u-flex u-row-center"
  63. :class="{shaixuanItemActive:(showshaixuan == 1 || zhiwei > 0)}" @click="openshaixuan(1)">
  64. <text class="text u-line-1">{{zhiwei == 0 ? '职位' : zhiweilist[zhiwei].name}}</text>
  65. <u-icon name="arrow-down-fill" size="8"></u-icon>
  66. </view>
  67. <view class="shaixuan-item u-flex u-row-center"
  68. :class="{shaixuanItemActive:showshaixuan == 2 || jingyan > -1}" @click="openshaixuan(2)">
  69. <text class="text u-line-1">{{jingyan == -1 ? '经验' : jingyanlist[jingyan].name}}</text>
  70. <u-icon name="arrow-down-fill" size="8"></u-icon>
  71. </view>
  72. <view class="shaixuan-item u-flex u-row-center"
  73. :class="{shaixuanItemActive:(showshaixuan == 3 || city1.id)}" @click="openshaixuan(3)">
  74. <text class="text u-line-1">{{city1.name || '城市'}}</text>
  75. <u-icon name="arrow-down-fill" size="8"></u-icon>
  76. </view>
  77. <view class="shaixuan-item u-flex u-row-center"
  78. :class="{shaixuanItemActive:showshaixuan == 4 || xinzi.name}" @click="openshaixuan(4)">
  79. <text class="text u-line-1">{{xinzi.name || '薪资'}}</text>
  80. <u-icon name="arrow-down-fill" size="8"></u-icon>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="zhiwei-list u-flex-1">
  85. <scroll-view v-if="showshaixuan == 1" scroll-y="true" class="zhiwei-shaixuan">
  86. <view class="shaixuan1-item" v-for="(a,b) in zhiweilist" :key="b" :class="{shaixuan1:zhiwei == b}"
  87. @click="changeshaixuan(1,b)">
  88. {{a.name}}
  89. </view>
  90. </scroll-view>
  91. <scroll-view v-if="showshaixuan == 2" scroll-y="true" class="zhiwei-shaixuan">
  92. <view class="shaixuan1-item" :class="{shaixuan1:jingyan == -1}" @click="changeshaixuan(2,-1)">
  93. 全部
  94. </view>
  95. <view class="shaixuan1-item" v-for="(a,b) in jingyanlist" :key="b" :class="{shaixuan1:jingyan == b}"
  96. @click="changeshaixuan(2,b)">
  97. {{a.name}}
  98. </view>
  99. </scroll-view>
  100. <scroll-view scroll-y="true" class="zhiwei-scroll">
  101. <view class="zhiwei-item" v-for="(item,index) in list" :key="index" @click="toinfo(item)">
  102. <view class="item-top u-flex u-row-between">
  103. <text class="text1">{{item.job_name}}</text>
  104. <!-- <text class="text2">3天内反馈</text> -->
  105. <text class="text3 u-flex-1">{{item.salary_min}}-{{item.salary_max}}K</text>
  106. </view>
  107. <view class="item-label u-flex">
  108. <text>{{item.education_name}}</text>
  109. <text>{{item.experience_name}}</text>
  110. </view>
  111. <view class="item-down u-flex u-row-between">
  112. <text>{{item.audit_time}}发布</text>
  113. <text>{{item.work_province}} {{item.work_city}}</text>
  114. </view>
  115. </view>
  116. </scroll-view>
  117. </view>
  118. <view class="safe-area-inset-bottom"></view>
  119. </view>
  120. <u-picker :columns="cityList" ref="uPicker" :show="showcity" keyName="name" @confirm="changecity"
  121. @change="changeHandler" @cancel="confirm1"></u-picker>
  122. <!-- <u-picker :columns="cityList" ref="uPicker" :show="showcity" @confirm="changecity" @change="changeHandler" @cancel="confirm1"></u-picker> -->
  123. <u-picker keyName="label" :columns="xinzilist" :show="showxinzi" @confirm="changexinzi"
  124. @cancel="confirm1"></u-picker>
  125. </view>
  126. </template>
  127. <script>
  128. import {
  129. companydetail,
  130. getjoblist,
  131. jobdata,
  132. getexperience,
  133. getareacity,
  134. getAllArea
  135. } from "@/units/inquire.js"
  136. export default {
  137. data() {
  138. return {
  139. showzhiwei: false,
  140. showsearch: false,
  141. showshaixuan: 0,
  142. zhiweilist: [],
  143. zhiwei: 0,
  144. jingyanlist: [],
  145. jingyan: -1,
  146. showcity: false,
  147. cityList: [],
  148. province: [], //省份
  149. city: [],
  150. area: [], //区域
  151. provinceid: "", //省数据
  152. cityid: "", //市数据
  153. areaid: "", //区数据
  154. indexs: [], //默认地区下标
  155. city1: {
  156. id: '',
  157. name: ''
  158. },
  159. showxinzi: false,
  160. xinzilist: [],
  161. xinzi: {
  162. max: '',
  163. min: '',
  164. name: ''
  165. },
  166. keyword1: '',
  167. keyword: '',
  168. page: 1,
  169. total: 0,
  170. list: [],
  171. detail: {}
  172. }
  173. },
  174. onLoad(option) {
  175. this.id = option.id
  176. this.getdata()
  177. this.getlist()
  178. this.getconfig()
  179. },
  180. methods: {
  181. changeHandler(e) {
  182. const {
  183. columnIndex, //当前改变值的列下标
  184. value,
  185. values, // values为当前变化列的数组内容
  186. indexs, //当前地区值下标
  187. picker = this.$refs.uPicker
  188. } = e
  189. //columnIndex代表第几列,意思是下标为0的列发生变化
  190. if (columnIndex === 0) {
  191. picker.setColumnValues(1, this.city[indexs[0]].map(v => {
  192. return {
  193. name: v.name,
  194. id: v.id
  195. }
  196. }))
  197. // picker.setColumnValues(2, this.area[indexs[0]][0].map(v => {
  198. // return {
  199. // name: v.name,
  200. // id: v.id
  201. // }
  202. // }))
  203. }
  204. // if (columnIndex === 1) {
  205. // picker.setColumnValues(2, this.area[indexs[0]][indexs[1]].map(v => {
  206. // return {
  207. // name: v.name,
  208. // id: v.id
  209. // }
  210. // }))
  211. // }
  212. },
  213. confirm1() {
  214. this.showxinzi = false,
  215. this.showcity = false
  216. },
  217. return1() {
  218. uni.navigateBack()
  219. },
  220. toinfo(item) {
  221. uni.navigateTo({
  222. url: "/pagesB/details?id=" + item.id
  223. })
  224. },
  225. openlocation() {
  226. uni.openLocation({
  227. longitude: Number(this.detail.lng),
  228. latitude: Number(this.detail.lat)
  229. })
  230. },
  231. getdata() {
  232. companydetail({
  233. id: this.id
  234. }).then((res) => {
  235. this.detail = res.data
  236. })
  237. },
  238. chongzhi() {
  239. this.keyword1 = ''
  240. this.showsearch = false
  241. this.tosearch()
  242. },
  243. opensearch() {
  244. if (this.showzhiwei) {
  245. this.showsearch = true
  246. } else {
  247. this.showzhiwei = true
  248. }
  249. },
  250. changexinzi(e) {
  251. if (e.value[0].value > e.value[1].value) {
  252. this.xinzi.min = e.value[1].value
  253. this.xinzi.max = e.value[0].value
  254. this.xinzi.name = e.value[1].label + "-" + e.value[0].label
  255. } else {
  256. this.xinzi.min = e.value[0].value
  257. this.xinzi.max = e.value[1].value
  258. this.xinzi.name = e.value[0].label + "-" + e.value[1].label
  259. }
  260. this.showxinzi = false
  261. this.tosearch()
  262. },
  263. changeshaixuan(type, index) {
  264. if (type == 1) {
  265. this.zhiwei = index
  266. }
  267. if (type == 2) {
  268. this.jingyan = index
  269. }
  270. this.showshaixuan = 0
  271. this.tosearch()
  272. },
  273. closeshaixuan() {
  274. this.showzhiwei = false;
  275. this.showsearch = false
  276. this.showshaixuan1 = false
  277. },
  278. openshaixuan(type) {
  279. if (!this.showzhiwei) {
  280. this.showzhiwei = true
  281. return
  282. }
  283. if (this.showshaixuan == type) {
  284. this.showshaixuan = 0
  285. } else {
  286. this.showshaixuan = type
  287. }
  288. if (type == 3) {
  289. this.showcity = true
  290. }
  291. if (type == 4) {
  292. this.showxinzi = true
  293. }
  294. },
  295. tosearch(type) {
  296. if (type == 1) {
  297. this.keyword = this.keyword1
  298. }
  299. this.page = 1
  300. this.total = 0
  301. this.list = []
  302. this.getlist()
  303. },
  304. openzhiwei() {
  305. if (this.showzhiwei) {
  306. this.showzhiwei = false
  307. this.showsearch = false
  308. } else {
  309. this.showzhiwei = true
  310. }
  311. },
  312. changecity(e) {
  313. console.log(e);
  314. // let a = e.value[0].name + e.value[1].name + e.value[2].name
  315. let a = e.value[0].name + e.value[1].name
  316. // let ids = String(e.value[0].id) + String(e.value[1].id) + String(e.value[2].id)
  317. let ids = String(e.value[0].id) + String(e.value[1].id)
  318. this.showcity = false
  319. this.city1.id = e.value[1].id
  320. this.city1.name = e.value[1].name
  321. console.log(this.city.name);
  322. this.tosearch()
  323. },
  324. getlist() {
  325. getjoblist({
  326. id: this.id,
  327. group_id: 3,
  328. category_job_id: this.zhiwei > 0 ? this.zhiweilist[this.zhiwei].id : '',
  329. city_id: this.city1.id,
  330. search:this.keyword,
  331. experience_id: this.jingyan == -1 ? '' : this.jingyanlist[this.jingyan].id,
  332. salary_min: this.xinzi.min,
  333. salary_max: this.xinzi.max
  334. }).then(res => {
  335. this.total = res.data.length
  336. this.list = res.data
  337. })
  338. },
  339. getconfig() {
  340. jobdata({
  341. id: this.id
  342. }).then(res => {
  343. this.zhiweilist = res.data
  344. })
  345. getexperience().then(res => {
  346. this.jingyanlist = res.data
  347. })
  348. getAllArea().then(res => {
  349. this.province = res.data.map(t => {
  350. return {
  351. name: t.name,
  352. id: t.id
  353. }
  354. })
  355. this.city = res.data.map(t => t.children.map(v => {
  356. return {
  357. name: v.name,
  358. id: v.id
  359. }
  360. }))
  361. this.area = res.data.map(t => t.children.map(v => v.children.map(i => {
  362. return {
  363. name: i.name,
  364. id: i.id
  365. }
  366. })))
  367. let a = []
  368. let b = []
  369. let c = []
  370. this.province.map(res => {
  371. a.push({
  372. name: res.name,
  373. id: res.id,
  374. })
  375. })
  376. this.city[0].map(res => {
  377. b.push({
  378. name: res.name,
  379. id: res.id,
  380. })
  381. })
  382. this.area[0][0].map(res => {
  383. c.push({
  384. name: res.name,
  385. id: res.id,
  386. })
  387. })
  388. this.cityList = [a, b]
  389. console.log(996, this.cityList);
  390. })
  391. var xinzilist = []
  392. for (var i = 1; i <= 100; i++) {
  393. xinzilist.push({
  394. label: `${i}K`,
  395. value: i
  396. })
  397. }
  398. this.xinzilist.push(xinzilist)
  399. this.xinzilist.push(xinzilist)
  400. }
  401. }
  402. }
  403. </script>
  404. <style lang="scss">
  405. page {
  406. background-color: #F3F3F3;
  407. }
  408. .gongsi-info {
  409. position: relative;
  410. z-index: 1;
  411. .zhiwei-list {
  412. min-height: 1rpx;
  413. position: relative;
  414. .zhiwei-shaixuan {
  415. position: absolute;
  416. top: 0;
  417. left: 0;
  418. z-index: 1;
  419. background-color: #fff;
  420. width: 750rpx;
  421. height: 100%;
  422. padding: 16rpx 0;
  423. box-sizing: border-box;
  424. .shaixuan1-item {
  425. padding: 16rpx 66rpx;
  426. font-size: 28rpx;
  427. font-family: PingFangSC-Regular, PingFang SC;
  428. font-weight: 400;
  429. color: #444444;
  430. }
  431. .shaixuan1 {
  432. font-size: 28rpx;
  433. font-family: PingFangSC-Medium, PingFang SC;
  434. font-weight: 500;
  435. color: #0C66C2;
  436. }
  437. }
  438. .zhiwei-scroll {
  439. height: 100%;
  440. padding: 0 20rpx;
  441. box-sizing: border-box;
  442. .zhiwei-item {
  443. // width: 702rpx;
  444. background: #FFFFFF;
  445. border-radius: 20rpx;
  446. margin: 20rpx auto;
  447. padding: 0 20rpx 24rpx 20rpx;
  448. .item-down {
  449. text:first-child {
  450. font-size: 24rpx;
  451. font-family: SFPro-Regular, SFPro;
  452. font-weight: 400;
  453. color: #666666;
  454. }
  455. text:last-child {
  456. font-size: 24rpx;
  457. font-family: PingFangSC-Regular, PingFang SC;
  458. font-weight: 400;
  459. color: #979797;
  460. }
  461. }
  462. .item-label {
  463. margin-bottom: 24rpx;
  464. text {
  465. line-height: 46rpx;
  466. background: #F3F3F3;
  467. border-radius: 4rpx;
  468. padding: 0 14rpx;
  469. font-size: 24rpx;
  470. font-family: PingFangSC-Regular, PingFang SC;
  471. font-weight: 400;
  472. color: #5F5F5F;
  473. margin-right: 12rpx;
  474. }
  475. }
  476. .item-top {
  477. padding: 24rpx 0 20rpx 0;
  478. .text1 {
  479. font-size: 32rpx;
  480. font-family: PingFangSC-Medium, PingFang SC;
  481. font-weight: 500;
  482. color: #222222;
  483. }
  484. .text2 {
  485. margin: 0 16rpx;
  486. line-height: 32rpx;
  487. background: #E6EFF8;
  488. border-radius: 6rpx;
  489. padding: 0 4rpx;
  490. font-size: 20rpx;
  491. font-family: SFPro-Regular, SFPro;
  492. font-weight: 400;
  493. color: #0C66C2;
  494. }
  495. .text3 {
  496. text-align: right;
  497. font-size: 32rpx;
  498. font-family: JDZhengHT-Regular, JDZhengHT;
  499. font-weight: 400;
  500. color: #0C66C2;
  501. }
  502. }
  503. }
  504. }
  505. }
  506. .gongsi-zhiwei {
  507. position: fixed;
  508. left: 0;
  509. bottom: 0;
  510. width: 750rpx;
  511. height: 90vh;
  512. background: #F3F3F3;
  513. box-shadow: 0rpx -8rpx 48rpx 0rpx rgba(0, 0, 0, 0.2);
  514. border-radius: 28rpx 28rpx 0rpx 0rpx;
  515. z-index: 999;
  516. transition: all 0.3s;
  517. border-radius: 28rpx 28rpx 0 0;
  518. overflow: hidden;
  519. .zhiwei-header {
  520. border-bottom: 2rpx solid #F3F3F3;
  521. background-color: #fff;
  522. padding: 0 32rpx;
  523. .header-shaixuan {
  524. padding-bottom: 28rpx;
  525. .shaixuan-item {
  526. width: 150rpx;
  527. height: 60rpx;
  528. background: #F3F3F3;
  529. border-radius: 6rpx;
  530. .text {
  531. font-size: 26rpx;
  532. font-family: PingFangSC-Regular, PingFang SC;
  533. font-weight: 400;
  534. color: #333333;
  535. margin-right: 16rpx;
  536. max-width: 80rpx;
  537. }
  538. }
  539. .shaixuanItemActive {
  540. background-color: #E6EFF8;
  541. color: #0C66C2;
  542. .text {
  543. color: #0C66C2;
  544. }
  545. }
  546. }
  547. .header-top {
  548. padding: 32rpx 0;
  549. .text1 {
  550. font-size: 40rpx;
  551. font-family: PingFangSC-Medium, PingFang SC;
  552. font-weight: 500;
  553. color: #222222;
  554. }
  555. }
  556. }
  557. }
  558. .gongsi-text {
  559. // width: 702rpx;
  560. background: #FFFFFF;
  561. border-radius: 16rpx;
  562. padding: 0 20rpx 24rpx 20rpx;
  563. margin: 20rpx auto;
  564. .text-body {
  565. font-size: 28rpx;
  566. font-family: PingFangSC-Regular, PingFang SC;
  567. font-weight: 400;
  568. color: #555555;
  569. }
  570. .text-title {
  571. font-size: 32rpx;
  572. font-family: PingFangSC-Medium, PingFang SC;
  573. font-weight: 500;
  574. color: #222222;
  575. padding: 24rpx 0;
  576. }
  577. }
  578. .gongsi-address {
  579. // width: 702rpx;
  580. background: #FFFFFF;
  581. border-radius: 16rpx;
  582. margin: 20rpx auto;
  583. padding: 0 20rpx 24rpx 20rpx;
  584. .address-down {
  585. text {
  586. flex: 1;
  587. margin-right: 20rpx;
  588. font-size: 28rpx;
  589. font-family: PingFangSC-Regular, PingFang SC;
  590. font-weight: 400;
  591. color: #666666;
  592. }
  593. image {
  594. width: 70rpx;
  595. height: 70rpx;
  596. }
  597. }
  598. .address-title {
  599. padding: 24rpx 0;
  600. font-size: 32rpx;
  601. font-family: PingFangSC-Medium, PingFang SC;
  602. font-weight: 500;
  603. color: #222222;
  604. }
  605. }
  606. .gongsi-header {
  607. // width: 702rpx;
  608. background: #FFFFFF;
  609. border-radius: 20rpx;
  610. margin: 20rpx auto;
  611. padding: 0 24rpx;
  612. .gongso-label {
  613. text {
  614. font-size: 24rpx;
  615. font-family: PingFangSC-Regular, PingFang SC;
  616. font-weight: 400;
  617. color: #444444;
  618. padding: 0 12rpx;
  619. line-height: 50rpx;
  620. background: #F3F3F3;
  621. border-radius: 6rpx;
  622. margin-right: 16rpx;
  623. margin-bottom: 20rpx;
  624. }
  625. }
  626. .header-top {
  627. padding: 28rpx 0;
  628. .top-right {
  629. text:first-child {
  630. font-size: 40rpx;
  631. font-family: PingFangSC-Medium, PingFang SC;
  632. font-weight: 500;
  633. color: #222222;
  634. margin-bottom: 12rpx;
  635. }
  636. text:nth-child(2) {
  637. font-size: 26rpx;
  638. font-family: SFPro-Regular, SFPro;
  639. font-weight: 400;
  640. color: #555555;
  641. }
  642. }
  643. .gongsi-logo {
  644. width: 120rpx;
  645. height: 120rpx;
  646. border-radius: 12rpx;
  647. border: 2rpx solid rgba(151, 151, 151, 0.7);
  648. margin-right: 20rpx;
  649. }
  650. }
  651. }
  652. .gongsi-bg {
  653. position: absolute;
  654. top: 0;
  655. left: 0;
  656. width: 750rpx;
  657. height: 396rpx;
  658. z-index: -1;
  659. }
  660. }
  661. </style>