addJob.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
  1. <template>
  2. <view>
  3. <view class="zpType flex justify-center">
  4. <view class="zpType-box flex align-center" @click="getPostType()">
  5. <view class="zpType-boxs flex justify-between align-center">
  6. <text>招聘类型</text>
  7. <view class="flex align-center">
  8. <u-input v-model="postType" disabled :clearable="false" placeholder="请选择招聘类型"
  9. @click="getPostType()" type="text" />
  10. <u-icon name="arrow-right" color="#999999" @click="getPostType()" style="margin-left: 20rpx;"
  11. size="28"></u-icon>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="zpType flex justify-center flex-wrap">
  17. <view class="zpType-box flex flex-wrap justify-center">
  18. <view class="zpType-boxs flex justify-between align-center">
  19. <text>岗位名称</text>
  20. <view class="flex align-center">
  21. <u-input v-model="stationName" placeholder="请输入岗位名称" type="text" />
  22. <!-- <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon> -->
  23. </view>
  24. </view>
  25. <view class="line"></view>
  26. <view class="zpType-boxs flex justify-between align-center" @click="goJob">
  27. <text>岗位类型</text>
  28. <view class="flex align-center">
  29. <u-input disabled v-model="ruleClassifyName"
  30. :style="type=='updata' && status!=3?'color:#cccccc':''" @click="goJob" placeholder="请选择岗位类型"
  31. type="text" />
  32. <u-icon name="arrow-right" :color="type=='updata' && status!=3?'#cccccc':'#999999'"
  33. style="margin-left: 20rpx;" size="28"></u-icon>
  34. </view>
  35. </view>
  36. <view class="line"></view>
  37. <view class="zpType-boxs flex justify-between align-center" @click="goMap()">
  38. <text>工作地址</text>
  39. <view class="flex align-center" @click="goMap()">
  40. <u-input disabled v-model="address" @click="goMap()" type="text" placeholder="请选择工作地址" />
  41. <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon>
  42. </view>
  43. </view>
  44. <view class="line"></view>
  45. <view class="zpType-boxs flex justify-between align-center" @click="IntentionChen()">
  46. <text>经验要求</text>
  47. <view class="flex align-center">
  48. <u-input disabled v-model="experience" @click="IntentionChen()" type="text"
  49. placeholder="请选择经验要求" />
  50. <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon>
  51. </view>
  52. </view>
  53. <view class="line"></view>
  54. <view class="zpType-boxs flex justify-between align-center" @click="getSchoolList()">
  55. <text>学历要求</text>
  56. <view class="flex align-center">
  57. <u-input disabled v-model="education" type="text" @click="getSchoolList()"
  58. placeholder="请选择学历要求" />
  59. <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon>
  60. </view>
  61. </view>
  62. <view class="line"></view>
  63. <view class="zpType-boxs flex justify-between align-center" @click="getPriceList()">
  64. <text>薪资范围</text>
  65. <view class="flex align-center">
  66. <u-input disabled v-model="salaryRange" @click="getPriceList()" type="text"
  67. placeholder="请选择薪资范围" />
  68. <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="xt flex justify-center">
  74. <view class="xt-box flex justify-center">
  75. <view class="xt-box-c">
  76. <view class="xt-box-c-item">
  77. <view class="xt-box-c-item-title flex justify-between align-center">
  78. 岗位关键词
  79. <u-icon class="tagItmIcon" @click="showTag = true" name="plus-circle-fill" color="#cccccc"
  80. size="42"></u-icon>
  81. </view>
  82. <view class="xt-box-c-item-text flex justify-between align-center">
  83. <!-- <u-input style="width: 90%;" input-align="left" v-model="tag" type="text"
  84. placeholder="将优先推荐符合关键词的人才" /> -->
  85. <view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;color: rgb(192, 196, 207);"
  86. v-if="tag.length==0">
  87. 将优先推荐符合关键词的人才
  88. </view>
  89. <view class="flex flex-wrap" style="margin-top: 20rpx; margin-bottom: 20rpx;" v-else>
  90. <view class="tagItm" v-for="(item,index) in tag" :key="index">
  91. {{item}}
  92. <u-icon class="tagItmIcon" @click="deleteTag(item,index)" name="close-circle-fill"
  93. color="#cccccc" size="28"></u-icon>
  94. </view>
  95. </view>
  96. <!-- <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon> -->
  97. </view>
  98. <view class="line margin-top-sm"></view>
  99. </view>
  100. <view class="xt-box-c-item" @click="gotoHy">
  101. <view class="xt-box-c-item-title">
  102. 行业要求
  103. </view>
  104. <view class="xt-box-c-item-text flex justify-between align-center">
  105. <u-input @click="gotoHy" disabled style="width: 90%;" input-align="left" v-model="industry"
  106. type="text" placeholder="对人才行业背景的要求" />
  107. <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon>
  108. </view>
  109. <view class="line margin-top-sm"></view>
  110. </view>
  111. <view class="xt-box-c-item" @click="setFuLi">
  112. <view class="xt-box-c-item-title">
  113. 岗位福利
  114. </view>
  115. <view class="xt-box-c-item-text flex justify-between align-center">
  116. <u-input @click="setFuLi" disabled style="width: 90%;" input-align="left"
  117. v-model="positionWelfare" type="text" placeholder="请选择岗位福利" />
  118. <u-icon name="arrow-right" color="#999999" style="margin-left: 20rpx;" size="28"></u-icon>
  119. </view>
  120. <view class="line margin-top-sm"></view>
  121. </view>
  122. <view class="xt-box-c-item">
  123. <view class="xt-box-c-item-title">
  124. 岗位介绍
  125. </view>
  126. <view class="xt-box-c-item-text flex justify-between align-center">
  127. <!-- <u-input style="width: 100%;" input-align="left" v-model="positionDetails" type="text"
  128. placeholder="请输入岗位介绍信息内容" /> -->
  129. <!-- <textarea placeholder-class="myText"
  130. style="width: 100%;height: 300rpx;background-color: #f5f5f5;border-radius: 24rpx;padding: 20rpx;margin-top: 20rpx;"
  131. v-model="positionDetails" placeholder="请输入岗位介绍信息内容"></textarea> -->
  132. <editor id="editor"
  133. style="width: 100%;height: 300rpx;background-color: #f5f5f5;border-radius: 24rpx;padding: 20rpx;margin-top: 20rpx;"
  134. placeholder="请输入岗位介绍信息内容" @ready="onEditorReady">
  135. </editor>
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="xieyi flex justify-center align-center">
  142. <view class="xieyi-box">
  143. <u-checkbox @change="checkboxChange" v-model="selectShow" shape="circle" active-color="#00B88F"
  144. label-size="24rpx">
  145. 我已同意<text style="color: #00B88F;" @click.stop="gotoXieyi()">
  146. 《岗位发布协议》
  147. </text>
  148. </u-checkbox>
  149. </view>
  150. </view>
  151. <view class="btn flex justify-center align-center">
  152. <view class="btn-box flex justify-center align-center" @click="submitJob()">
  153. 确认发布
  154. </view>
  155. </view>
  156. <!-- 工作性质 -->
  157. <u-select v-model="workShow" :list="workTypes" @confirm="workConfirm"></u-select>
  158. <!-- 工作经验 -->
  159. <u-select v-model="workShow2" :list="workList" @confirm="workConfirm2"></u-select>
  160. <!-- 学历 -->
  161. <u-select v-model="schoolShow" :list="schoolList" @confirm="workConfirm3"></u-select>
  162. <!-- 薪资 -->
  163. <u-select v-model="priceShow" :list="priceList" @confirm="workConfirm4"></u-select>
  164. <!-- 岗位福利 -->
  165. <u-popup v-model="showFl" mode="bottom" border-radius="24" :mask-close-able="false" :closeable="true">
  166. <view class="fl flex justify-center">
  167. <view class="fl-box">
  168. <view class="fl-box-title">
  169. 岗位福利
  170. </view>
  171. <view class="fl-box-con flex flex-wrap">
  172. <view class="fl-box-con-item" :class="item.select==true?'flActive':''" @click="selectFl(item)"
  173. v-for="(item,index) in flList" :key="index">
  174. {{item.value}}
  175. </view>
  176. </view>
  177. <view class="fl-box-sub flex justify-center align-center" @click="subFl()">
  178. 确认
  179. </view>
  180. </view>
  181. </view>
  182. </u-popup>
  183. <!-- 岗位关键词 -->
  184. <u-popup v-model="showTag" mode="center" width="600rpx" :closeable="true" height="400rpx" border-radius="24">
  185. <view class="tagTitle">岗位关键词</view>
  186. <view class="tagCont flex justify-center">
  187. <view class="tagCont-box">
  188. <u-input v-model="tagValue" type="text" placeholder="请输入岗位关键词" input-align="left" :border="true" />
  189. </view>
  190. </view>
  191. <view class="tagCont flex justify-center">
  192. <view class="tagCont-boxs flex align-center justify-center" @click="addTag">
  193. 确认
  194. </view>
  195. </view>
  196. </u-popup>
  197. </view>
  198. </template>
  199. <script>
  200. export default {
  201. data() {
  202. return {
  203. selectShow: false,
  204. tagValue: '',
  205. showTag: false,
  206. flList: [],
  207. showFl: false,
  208. postType: '',
  209. stationName: '',
  210. projectName: '',
  211. experience: '',
  212. education: '',
  213. salaryRange: '',
  214. tag: [],
  215. industry: '',
  216. positionWelfare: '',
  217. positionDetails: '',
  218. workTypes: [],
  219. workShow: false,
  220. lat: '',
  221. lng: '',
  222. address: '',
  223. province: '',
  224. city: '',
  225. county: '',
  226. workList: [],
  227. workShow2: false,
  228. schoolList: [],
  229. schoolShow: false,
  230. priceList: [],
  231. priceShow: false,
  232. ruleClassifyId: '',
  233. ruleClassifyName: '',
  234. classifyOneId: '',
  235. classifyTwoId: '',
  236. price: 0,
  237. postPushId: '',
  238. type: '',
  239. status: '',
  240. editorCtx: '', //富文本输入框的上下文
  241. };
  242. },
  243. onLoad(option) {
  244. if (option.type) {
  245. this.type = option.type
  246. }
  247. if (option.postPushId) {
  248. this.postPushId = option.postPushId
  249. // this.getJobInfo()
  250. }
  251. //项目福利
  252. this.getFlList()
  253. },
  254. onShow() {
  255. let that = this
  256. //选择的岗位
  257. uni.$on('jobs', (info) => {
  258. that.ruleClassifyId = info.ruleClassifyId
  259. that.ruleClassifyName = info.ruleClassifyName
  260. that.price = info.price
  261. // that.classifyOneId = info.ruleClassifyId1
  262. // that.classifyTwoId = info.ruleClassifyId2
  263. })
  264. //选择的行业
  265. uni.$on('industry', (info) => {
  266. that.industry = info.industry
  267. })
  268. },
  269. methods: {
  270. //给富文本插入
  271. insertText(formatDate) {
  272. this.editorCtx.setContents({
  273. html: formatDate
  274. })
  275. },
  276. //editor初始化的时候
  277. onEditorReady() {
  278. let that = this
  279. console.log(uni.createSelectorQuery().select('#editor').context, '99999999')
  280. uni.createSelectorQuery().select('#editor').context((res) => {
  281. console.log(res, '88888888')
  282. this.editorCtx = res.context
  283. if (this.postPushId) {
  284. this.getJobInfo()
  285. }
  286. }).exec()
  287. // setTimeout(() => {
  288. // this.insertText(this.positionDetails)
  289. // }, 500)
  290. },
  291. //岗位发布协议
  292. gotoXieyi() {
  293. uni.navigateTo({
  294. url: '/my/setting/jobXy'
  295. })
  296. },
  297. //判断是否可以更改岗位
  298. goJob() {
  299. if (this.type == 'save' || !this.type || this.status == 3) {
  300. this.goNav('/package/jobIntention/jobList')
  301. } else {
  302. uni.showModal({
  303. title: '提示',
  304. content: '当前无法修改为其他岗位,若有需要请重新发布',
  305. confirmText: '去发布',
  306. complete(ret) {
  307. if (ret.confirm) {
  308. uni.navigateTo({
  309. url: '/package/addJob/addJob'
  310. })
  311. }
  312. }
  313. })
  314. }
  315. },
  316. //获取岗位价格
  317. getJobPrice(ruleClassifyId) {
  318. this.$Request.getT('/app/rule/ruleClassifyId', {
  319. ruleClassifyId: ruleClassifyId
  320. }).then(res => {
  321. if (res.code == 0) {
  322. this.price = res.data.price
  323. } else {
  324. uni.showToast({
  325. title: res.msg,
  326. icon: 'none'
  327. })
  328. }
  329. })
  330. },
  331. //获取岗位详情
  332. getJobInfo() {
  333. let data = {
  334. postPushId: this.postPushId
  335. }
  336. this.$Request.getT('/app/postPush/selectPostPushDetails', data).then(res => {
  337. if (res.code == 0) {
  338. let obj = res.data
  339. this.postType = obj.postType
  340. this.stationName = obj.stationName
  341. this.ruleClassifyName = obj.ruleClassifyName
  342. this.ruleClassifyId = obj.ruleClassifyId
  343. this.address = obj.address
  344. this.experience = obj.experience
  345. this.education = obj.education
  346. this.salaryRange = obj.salaryRange
  347. this.tag = obj.tag.split(',')
  348. this.industry = obj.industry
  349. this.positionWelfare = obj.positionWelfare
  350. this.positionDetails = obj.positionDetails
  351. this.insertText(this.positionDetails)
  352. this.province = obj.province
  353. this.city = obj.city
  354. this.county = obj.county
  355. this.lng = obj.lng
  356. this.lat = obj.lat
  357. this.status = obj.status
  358. if (this.type == 'save') {
  359. this.getJobPrice(obj.ruleClassifyId)
  360. } else if (this.status == 3) {
  361. this.getJobPrice(obj.ruleClassifyId)
  362. }
  363. }
  364. })
  365. },
  366. submitJobs() {
  367. let that = this
  368. if (this.postType == '') {
  369. uni.showToast({
  370. title: '请选择招聘类型',
  371. icon: 'none'
  372. })
  373. return
  374. }
  375. if (this.stationName == '') {
  376. uni.showToast({
  377. title: '请输入岗位名称',
  378. icon: 'none'
  379. })
  380. return
  381. }
  382. if (this.ruleClassifyName == '') {
  383. uni.showToast({
  384. title: '请选择岗位类型',
  385. icon: 'none'
  386. })
  387. return
  388. }
  389. if (this.address == '') {
  390. uni.showToast({
  391. title: '请选择工作地址',
  392. icon: 'none'
  393. })
  394. return
  395. }
  396. if (this.experience == '') {
  397. uni.showToast({
  398. title: '请选择经验要求',
  399. icon: 'none'
  400. })
  401. return
  402. }
  403. if (this.education == '') {
  404. uni.showToast({
  405. title: '请选择学历要求',
  406. icon: 'none'
  407. })
  408. return
  409. }
  410. if (this.salaryRange == '') {
  411. uni.showToast({
  412. title: '请选择薪资范围',
  413. icon: 'none'
  414. })
  415. return
  416. }
  417. if (this.tag.length == 0) {
  418. uni.showToast({
  419. title: '请添加岗位关键词',
  420. icon: 'none'
  421. })
  422. return
  423. }
  424. if (this.industry == '') {
  425. uni.showToast({
  426. title: '请选择行业要求',
  427. icon: 'none'
  428. })
  429. return
  430. }
  431. if (this.positionWelfare == '') {
  432. uni.showToast({
  433. title: '请选择岗位福利',
  434. icon: 'none'
  435. })
  436. return
  437. }
  438. if (this.positionDetails == '' || this.positionDetails == '<p><br></p>') {
  439. uni.showToast({
  440. title: '请输入岗位介绍',
  441. icon: 'none'
  442. })
  443. return
  444. }
  445. if (this.selectShow == false) {
  446. uni.showToast({
  447. title: '请查看并同意《岗位发布协议》',
  448. icon: 'none'
  449. })
  450. return
  451. }
  452. if (this.type == 'save') {
  453. if (Number(this.price) == 0) {
  454. uni.showModal({
  455. title: '提示',
  456. content: '该岗位可免费发布,确认发布吗?',
  457. complete(ret) {
  458. if (ret.confirm) {
  459. // console.log(1)
  460. that.pay()
  461. }
  462. }
  463. })
  464. } else {
  465. uni.showModal({
  466. title: '提示',
  467. content: '发布该岗位需支付' + this.price + '钻石,确认发布吗?',
  468. complete(ret) {
  469. if (ret.confirm) {
  470. // console.log(1)
  471. that.pay()
  472. }
  473. }
  474. })
  475. }
  476. } else if (this.type == 'updata') { //修改
  477. if (this.status == 3) { //拒绝重新发布
  478. if (Number(this.price) == 0) {
  479. uni.showModal({
  480. title: '提示',
  481. content: '该岗位可免费发布,确认发布吗?',
  482. complete(ret) {
  483. if (ret.confirm) {
  484. // console.log(1)
  485. that.pay()
  486. }
  487. }
  488. })
  489. } else {
  490. uni.showModal({
  491. title: '提示',
  492. content: '发布该岗位为热门岗位,需支付' + this.price + '钻石,确认发布吗?',
  493. complete(ret) {
  494. if (ret.confirm) {
  495. // console.log(1)
  496. that.pay()
  497. }
  498. }
  499. })
  500. }
  501. } else { //时效期内修改
  502. uni.showModal({
  503. title: '提示',
  504. content: '本次修改岗位信息免费,确认发布吗?',
  505. complete(ret) {
  506. if (ret.confirm) {
  507. // console.log(1)
  508. that.pay(that.postPushId)
  509. }
  510. }
  511. })
  512. }
  513. } else {
  514. uni.showModal({
  515. title: '提示',
  516. content: '发布该岗位为热门岗位,需支付' + this.price + '钻石,确认发布吗?',
  517. complete(ret) {
  518. if (ret.confirm) {
  519. // console.log(1)
  520. that.pay()
  521. }
  522. }
  523. })
  524. }
  525. },
  526. //发布岗位
  527. submitJob() {
  528. let that = this
  529. //获取富文本中的内容
  530. this.editorCtx.getContents({
  531. success(res) {
  532. that.positionDetails = res.html
  533. },
  534. complete() { //成功/或者失败都调用发布
  535. that.submitJobs()
  536. },
  537. })
  538. },
  539. //支付
  540. pay(postPushId) {
  541. let data = {
  542. postType: this.postType,
  543. stationName: this.stationName,
  544. ruleClassifyName: this.ruleClassifyName,
  545. ruleClassifyId: this.ruleClassifyId,
  546. address: this.address,
  547. experience: this.experience,
  548. education: this.education,
  549. salaryRange: this.salaryRange,
  550. tag: this.tag.join(','),
  551. industry: this.industry,
  552. positionWelfare: this.positionWelfare,
  553. positionDetails: this.positionDetails,
  554. province: this.province,
  555. city: this.city,
  556. county: this.county,
  557. lng: this.lng,
  558. lat: this.lat,
  559. companyId: uni.getStorageSync('companyId')
  560. };
  561. if (postPushId) {
  562. data.postPushId = postPushId
  563. }
  564. this.$Request.postJson('/app/postPush/savePostPush', data).then(res => {
  565. if (res.code == 0) {
  566. uni.showToast({
  567. title: '发布成功'
  568. })
  569. this.postType = ''
  570. this.stationName = ''
  571. this.ruleClassifyName = ''
  572. this.ruleClassifyId = ''
  573. this.address = ''
  574. this.experience = ''
  575. this.education = ''
  576. this.salaryRange = ''
  577. this.tag = []
  578. this.industry = ''
  579. this.positionWelfare = ''
  580. this.positionDetails = ''
  581. this.province = ''
  582. this.city = ''
  583. this.county = ''
  584. this.lng = ''
  585. this.lat = ''
  586. this.postPushId = ''
  587. setTimeout(() => {
  588. if (this.type) {
  589. uni.navigateBack()
  590. } else {
  591. uni.navigateTo({
  592. url: '/my/order/index'
  593. })
  594. }
  595. }, 1000)
  596. } else {
  597. uni.showToast({
  598. title: res.msg,
  599. icon: 'none'
  600. })
  601. }
  602. })
  603. },
  604. //新增关键词
  605. addTag() {
  606. // this.tag.push('关键词');
  607. if (this.tagValue == '') {
  608. uni.showToast({
  609. title: '请输入关键词',
  610. icon: 'none'
  611. })
  612. } else {
  613. this.tag.push(this.tagValue)
  614. this.showTag = false
  615. this.tagValue = ''
  616. }
  617. },
  618. //删除输入的关键词
  619. deleteTag(item, index) {
  620. let that = this
  621. uni.showModal({
  622. title: '提示',
  623. content: '确定删除关键词“' + item + '”吗?',
  624. complete(ret) {
  625. if (ret.confirm) {
  626. that.tag.splice(index, 1)
  627. }
  628. }
  629. })
  630. },
  631. //行业选择页
  632. gotoHy() {
  633. uni.navigateTo({
  634. url: '/package/jobIntention/industry?type=2'
  635. })
  636. },
  637. //确认选择的福利
  638. subFl() {
  639. let arr = []
  640. this.flList.map(item => {
  641. if (item.select === true) {
  642. arr.push(item.value)
  643. }
  644. })
  645. this.positionWelfare = arr.join(',')
  646. this.showFl = false
  647. },
  648. setFuLi() {
  649. if (this.flList.length > 0) {
  650. this.showFl = true
  651. } else {
  652. this.showFl = false
  653. uni.showToast({
  654. title: '暂无岗位福利可选择',
  655. icon: 'none'
  656. })
  657. }
  658. },
  659. //选中/取消选中福利
  660. selectFl(item) {
  661. item.select = !item.select
  662. console.log(item)
  663. this.$forceUpdate()
  664. },
  665. // 获取项目福利列表
  666. getFlList() {
  667. let data = {
  668. type: '项目福利'
  669. }
  670. this.$Request.get('/app/dict/list', data).then(res => {
  671. if (res.code == 0) {
  672. if (res.data.length > 0) {
  673. res.data.map(item => {
  674. item.select = false
  675. })
  676. if (this.postPushId) {
  677. res.data.map(item => {
  678. this.positionWelfare.split(',').map(ite => {
  679. if (item.value === ite) {
  680. item.select = true
  681. }
  682. })
  683. })
  684. }
  685. this.flList = res.data
  686. } else {
  687. this.flList = []
  688. }
  689. }
  690. })
  691. },
  692. goNav(url) {
  693. uni.navigateTo({
  694. url: url
  695. })
  696. },
  697. workConfirm4(e) {
  698. this.salaryRange = e[0].value
  699. },
  700. //薪资
  701. getPriceList() {
  702. this.$Request.get('/app/dict/list', {
  703. type: '薪资'
  704. }).then(res => {
  705. if (res.code == 0) {
  706. let arr = res.data
  707. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  708. this.priceList = arr
  709. this.priceShow = true
  710. }
  711. })
  712. },
  713. workConfirm3(e) {
  714. this.education = e[0].value
  715. },
  716. //学历
  717. getSchoolList() {
  718. this.$Request.get('/app/dict/list', {
  719. type: '学历'
  720. }).then(res => {
  721. if (res.code == 0) {
  722. let arr = res.data
  723. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  724. this.schoolList = arr
  725. this.schoolShow = true
  726. }
  727. })
  728. },
  729. // 工作经验
  730. IntentionChen() {
  731. this.$Request.get('/app/dict/list', {
  732. type: '工作经验'
  733. }).then(res => {
  734. if (res.code == 0) {
  735. let arr = res.data
  736. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  737. this.workList = arr
  738. this.workShow2 = true
  739. }
  740. })
  741. },
  742. // 点击调起地图选择位置
  743. goMap() {
  744. let that = this
  745. uni.chooseLocation({
  746. success: function(res) {
  747. console.log(res)
  748. that.address = res.name
  749. that.lat = res.latitude
  750. that.lng = res.longitude
  751. that.shengcheng(res.longitude, res.latitude)
  752. }
  753. });
  754. },
  755. shengcheng(longitude, latitude) {
  756. this.$Request.getT('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
  757. // console.log(res)
  758. if (res.code === 0) {
  759. this.province = res.data.province
  760. if (res.data.city) {
  761. this.city = res.data.city
  762. } else {
  763. this.city = res.data.province
  764. }
  765. this.county = res.data.district
  766. }
  767. });
  768. },
  769. workConfirm2(e) {
  770. this.experience = e[0].value
  771. },
  772. //选择类型
  773. workConfirm(e) {
  774. this.postType = e[0].value
  775. },
  776. /**
  777. * 工作性质
  778. */
  779. getPostType() {
  780. this.$Request.get('/app/dict/list', {
  781. type: '工作性质'
  782. }).then(res => {
  783. if (res.code == 0) {
  784. let arr = res.data
  785. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  786. this.workTypes = arr
  787. this.workShow = true
  788. }
  789. })
  790. },
  791. }
  792. }
  793. </script>
  794. <style lang="scss">
  795. page {
  796. background-color: #F2F2F2;
  797. padding-bottom: 100rpx;
  798. }
  799. .myText {
  800. color: #C0C4CC;
  801. }
  802. .tagTitle {
  803. width: 100%;
  804. margin-top: 30rpx;
  805. text-align: center;
  806. }
  807. .tagCont {
  808. width: 100%;
  809. margin-top: 50rpx;
  810. .tagCont-box {
  811. width: 80%;
  812. }
  813. .tagCont-boxs {
  814. width: 80%;
  815. height: 80rpx;
  816. background-color: #00B88F;
  817. color: #ffffff;
  818. border-radius: 14rpx;
  819. }
  820. }
  821. .flActive {
  822. color: #00B88F !important;
  823. background-color: #DDFFF7 !important;
  824. }
  825. .fl {
  826. width: 100%;
  827. height: 100%;
  828. .fl-box {
  829. width: 686rpx;
  830. height: 100%;
  831. .fl-box-title {
  832. width: 100%;
  833. text-align: center;
  834. margin-top: 30rpx;
  835. }
  836. .fl-box-con {
  837. width: 100%;
  838. margin-top: 20rpx;
  839. .fl-box-con-item {
  840. padding: 15rpx;
  841. background-color: #F2F2F7;
  842. color: #121212;
  843. margin-right: 15rpx;
  844. margin-bottom: 20rpx;
  845. border-radius: 8rpx;
  846. }
  847. }
  848. .fl-box-sub {
  849. width: 100%;
  850. height: 70rpx;
  851. border-radius: 16rpx;
  852. background-color: #00B88F;
  853. color: #ffffff;
  854. margin-top: 20rpx;
  855. margin-bottom: 40rpx;
  856. }
  857. }
  858. }
  859. .line {
  860. width: 626rpx;
  861. border: 1rpx solid #F2F2F2;
  862. }
  863. .zpType {
  864. width: 100%;
  865. margin-top: 30rpx;
  866. .zpType-boxs {
  867. width: 100%;
  868. padding: 20rpx 30rpx;
  869. text {
  870. color: #333333;
  871. font-size: 28rpx;
  872. font-weight: 800;
  873. }
  874. }
  875. .zpType-box {
  876. width: 686rpx;
  877. height: 100%;
  878. background-color: #ffffff;
  879. border-radius: 24rpx;
  880. }
  881. }
  882. .xt {
  883. width: 100%;
  884. // height: 675rpx;
  885. margin-top: 20rpx;
  886. .xt-box {
  887. width: 686rpx;
  888. height: 100%;
  889. background-color: #ffffff;
  890. border-radius: 24rpx;
  891. .xt-box-c {
  892. width: 626rpx;
  893. height: 100%;
  894. padding-bottom: 30rpx;
  895. }
  896. .xt-box-c-item {
  897. width: 100%;
  898. margin-top: 30rpx;
  899. .xt-box-c-item-title {
  900. width: 100%;
  901. color: #333333;
  902. font-size: 28rpx;
  903. font-weight: 800;
  904. }
  905. .xt-box-c-item-text {
  906. width: 100%;
  907. .tagItm {
  908. margin-right: 10rpx;
  909. margin-bottom: 10rpx;
  910. padding: 15rpx;
  911. border-radius: 8rpx;
  912. background-color: #DDFFF7;
  913. color: #00B88F;
  914. position: relative;
  915. .tagItmIcon {
  916. position: absolute;
  917. right: -6rpx;
  918. top: -6rpx;
  919. }
  920. }
  921. }
  922. }
  923. }
  924. }
  925. .xieyi {
  926. width: 100%;
  927. margin-top: 30rpx;
  928. .xieyi-box {
  929. width: 686rpx;
  930. }
  931. }
  932. .btn {
  933. width: 100%;
  934. height: 88rpx;
  935. margin-top: 54rpx;
  936. .btn-box {
  937. width: 686rpx;
  938. height: 100%;
  939. background-color: #00B88F;
  940. border-radius: 16rpx;
  941. color: #ffffff;
  942. font-size: 28rpx;
  943. font-weight: bold;
  944. }
  945. }
  946. </style>