addJob.vue 31 KB

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