addJob.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173
  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. }
  991. }
  992. .myText {
  993. color: #c0c4cc;
  994. }
  995. .tagTitle {
  996. width: 100%;
  997. margin-top: 30rpx;
  998. text-align: center;
  999. }
  1000. .tagCont {
  1001. width: 100%;
  1002. margin-top: 50rpx;
  1003. .tagCont-box {
  1004. width: 80%;
  1005. }
  1006. .tagCont-boxs {
  1007. width: 80%;
  1008. height: 80rpx;
  1009. background-color: #016bf6;
  1010. color: #ffffff;
  1011. border-radius: 14rpx;
  1012. }
  1013. }
  1014. .flActive {
  1015. color: #016bf6 !important;
  1016. background-color: #ddfff7 !important;
  1017. }
  1018. .fl {
  1019. width: 100%;
  1020. height: 100%;
  1021. .fl-box {
  1022. width: 686rpx;
  1023. height: 100%;
  1024. .fl-box-title {
  1025. width: 100%;
  1026. text-align: center;
  1027. margin-top: 30rpx;
  1028. }
  1029. .fl-box-con {
  1030. width: 100%;
  1031. margin-top: 20rpx;
  1032. .fl-box-con-item {
  1033. padding: 15rpx;
  1034. background-color: #f2f2f7;
  1035. color: #121212;
  1036. margin-right: 15rpx;
  1037. margin-bottom: 20rpx;
  1038. border-radius: 8rpx;
  1039. }
  1040. }
  1041. .fl-box-sub {
  1042. width: 100%;
  1043. height: 70rpx;
  1044. border-radius: 16rpx;
  1045. background-color: #016bf6;
  1046. color: #ffffff;
  1047. margin-top: 20rpx;
  1048. margin-bottom: 40rpx;
  1049. }
  1050. }
  1051. }
  1052. .line {
  1053. width: 626rpx;
  1054. border: 1rpx solid #f2f2f2;
  1055. }
  1056. .zpType {
  1057. width: 100%;
  1058. margin-top: 30rpx;
  1059. .zpType-boxs {
  1060. width: 100%;
  1061. padding: 20rpx 30rpx;
  1062. text {
  1063. color: #333333;
  1064. font-size: 28rpx;
  1065. font-weight: 800;
  1066. }
  1067. }
  1068. .zpType-box {
  1069. width: 686rpx;
  1070. height: 100%;
  1071. background-color: #ffffff;
  1072. border-radius: 24rpx;
  1073. }
  1074. }
  1075. .xt {
  1076. width: 100%;
  1077. // height: 675rpx;
  1078. margin-top: 20rpx;
  1079. .xt-box {
  1080. width: 686rpx;
  1081. height: 100%;
  1082. background-color: #ffffff;
  1083. border-radius: 24rpx;
  1084. .xt-box-c {
  1085. width: 626rpx;
  1086. height: 100%;
  1087. padding-bottom: 30rpx;
  1088. }
  1089. .xt-box-c-item {
  1090. width: 100%;
  1091. margin-top: 30rpx;
  1092. .xt-box-c-item-title {
  1093. width: 100%;
  1094. color: #333333;
  1095. font-size: 28rpx;
  1096. font-weight: 800;
  1097. }
  1098. .xt-box-c-item-text {
  1099. width: 100%;
  1100. .tagItm {
  1101. margin-right: 10rpx;
  1102. margin-bottom: 10rpx;
  1103. padding: 15rpx;
  1104. border-radius: 8rpx;
  1105. background-color: #ddfff7;
  1106. color: #016bf6;
  1107. position: relative;
  1108. .tagItmIcon {
  1109. position: absolute;
  1110. right: -6rpx;
  1111. top: -6rpx;
  1112. }
  1113. }
  1114. }
  1115. }
  1116. }
  1117. }
  1118. .xieyi {
  1119. width: 100%;
  1120. margin-top: 30rpx;
  1121. .xieyi-box {
  1122. width: 686rpx;
  1123. }
  1124. }
  1125. .btn {
  1126. width: 100%;
  1127. height: 88rpx;
  1128. margin-top: 54rpx;
  1129. .btn-box {
  1130. width: 686rpx;
  1131. height: 100%;
  1132. background-color: #016bf6;
  1133. border-radius: 16rpx;
  1134. color: #ffffff;
  1135. font-size: 28rpx;
  1136. font-weight: bold;
  1137. }
  1138. }
  1139. </style>