gongsi-info.vue 17 KB

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