editor.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999
  1. <template>
  2. <view class="page-box">
  3. <!-- 顶部占位区域 -->
  4. <navBar title="我的简历" color="#000" />
  5. <view class="page-content">
  6. <!-- <view class="text-white padding margin bg" v-if="form.isRecommend==2">
  7. <view class="flex align-center justify-between" style="color: red;">
  8. <view class=" text-bold">已录入人才库</view>
  9. </view>
  10. </view> -->
  11. <view class="text-white padding margin bg" v-if="form.status == 3">
  12. <view class="flex align-center justify-between" style="color: red">
  13. <view class="text-bold">拒绝理由</view>
  14. <view class="text-right">
  15. {{ form.auditContent }}
  16. </view>
  17. </view>
  18. </view>
  19. <view class="text-white padding margin bg">
  20. <u-form label-width="150" :label-style="labelStyle" :model="form" ref="uForm">
  21. <u-form-item label="姓名">
  22. <u-input height="200rpx" v-model="form.resumesName" placeholder="请输入姓名" />
  23. </u-form-item>
  24. <u-form-item label="年龄">
  25. <u-input v-model="form.resumesAge" type="number" placeholder="请输入年龄" />
  26. </u-form-item>
  27. <u-form-item label="家庭住址" placeholder="请输入家庭住址">
  28. <u-input v-model="form.address" />
  29. </u-form-item>
  30. <u-form-item label="性别" right-icon="arrow-right">
  31. <u-input
  32. v-model="resumesSex"
  33. placeholder="请选择性别"
  34. :disabled="true"
  35. @click="SexChen()"
  36. />
  37. </u-form-item>
  38. <u-form-item label="手机号">
  39. <u-input
  40. v-model="form.resumesPhone"
  41. type="number"
  42. maxlength="11"
  43. placeholder="请输入手机号"
  44. />
  45. </u-form-item>
  46. <u-form-item label="学历" right-icon="arrow-right">
  47. <u-input
  48. v-model="form.resumesEducation"
  49. placeholder="请选择学历"
  50. :disabled="true"
  51. @click="learnChen()"
  52. />
  53. </u-form-item>
  54. <u-form-item label="婚姻状况" right-icon="arrow-right">
  55. <u-input
  56. v-model="form.resumesMarriage"
  57. placeholder="请选择婚姻状况"
  58. :disabled="true"
  59. @click="MarriageChen()"
  60. />
  61. </u-form-item>
  62. <u-form-item label="期望薪资" right-icon="arrow-right">
  63. <u-input
  64. v-model="form.resumesCompensation"
  65. placeholder="请选择期望薪资"
  66. :disabled="true"
  67. @click="getMonyList()"
  68. />
  69. </u-form-item>
  70. <u-form-item label="电子邮箱">
  71. <u-input v-model="form.resumesEmail" placeholder="请输入电子邮箱" />
  72. </u-form-item>
  73. <u-form-item label="工作经验" right-icon="arrow-right">
  74. <u-input
  75. v-model="form.resumesWorkExperience"
  76. placeholder="请选择工作经验"
  77. :disabled="true"
  78. @click="IntentionChen()"
  79. />
  80. </u-form-item>
  81. <u-form-item label="毕业院校">
  82. <u-input v-model="form.school" placeholder="请输入毕业院校" />
  83. </u-form-item>
  84. <u-form-item label="所学专业">
  85. <u-input v-model="form.major" placeholder="请输入所学专业" />
  86. </u-form-item>
  87. <u-form-item label="毕业时间" right-icon="arrow-right">
  88. <u-input
  89. v-model="form.graduationTime"
  90. :disabled="true"
  91. @click="showGraduationTime = true"
  92. placeholder="请选择毕业时间"
  93. />
  94. </u-form-item>
  95. <u-form-item label="行业" right-icon="arrow-right">
  96. <u-input
  97. v-model="form.industryName"
  98. :disabled="true"
  99. @click="gotoHy('/package/jobIntention/industry')"
  100. placeholder="请选择行业"
  101. />
  102. </u-form-item>
  103. <u-form-item label="意向城市" right-icon="arrow-right">
  104. <u-input
  105. v-model="form.city"
  106. :disabled="true"
  107. @click="cityShow = true"
  108. placeholder="请选择意向城市"
  109. />
  110. </u-form-item>
  111. </u-form>
  112. </view>
  113. <view class="text-white padding margin bg radius">
  114. <view>
  115. <view class="flex align-center justify-between">
  116. <view class="text-bold">求职岗位</view>
  117. <view @click="PostChen()">
  118. <image src="../static/add.png" style="width: 54upx; height: 54upx"></image>
  119. </view>
  120. </view>
  121. <view class="flex align-center label" v-if="form.resumesPost">
  122. <view v-if="form.resumesPost">{{ form.resumesPost }}</view>
  123. <!-- <view v-if="form.rulePostName">-</view>
  124. <view v-if="form.rulePostName" class="">{{form.rulePostName}}</view> -->
  125. </view>
  126. <view class="margin-top-sm text-sm" style="color: #999999" v-else
  127. >添加岗位会根据你的岗位需求为你推荐</view
  128. >
  129. </view>
  130. <view
  131. class="margin-tb-sm"
  132. style="width: 100%; height: 1rpx; background: #f2f2f2"
  133. ></view>
  134. <view>
  135. <view class="flex align-center justify-between">
  136. <view class="text-bold">工作经历</view>
  137. <view @click="gowork(1)">
  138. <image src="../static/add.png" style="width: 54upx; height: 54upx"></image>
  139. </view>
  140. </view>
  141. <view
  142. class="margin-top-sm text-sm"
  143. style="color: #999999"
  144. v-if="form.resumesCompanyList.length == 0"
  145. >
  146. 添加工作经历向企业全面展示你的能力</view
  147. >
  148. <view
  149. v-for="(item, index) in form.resumesCompanyList"
  150. class="gzjl"
  151. :key="index"
  152. v-else
  153. >
  154. <view class="flex justify-between" style="color: #121212">
  155. <view class="text-bold">
  156. {{ item.resumesTitle }}
  157. </view>
  158. <view class="">
  159. <u-icon
  160. name="trash"
  161. color="rgb(146,146,146)"
  162. @click="deleteList(form.resumesCompanyList, index)"
  163. size="38"
  164. ></u-icon>
  165. <u-icon
  166. style="margin-left: 20rpx"
  167. name="edit-pen"
  168. @click="updataLists(item, index, 1)"
  169. color="rgb(146,146,146)"
  170. size="38"
  171. ></u-icon>
  172. </view>
  173. </view>
  174. <view v-if="item.resumesProject">
  175. {{ item.resumesProject }}
  176. </view>
  177. <view class="flex align-center margin-tb-xs" style="color: #999999">
  178. <view>{{ item.resumesTime }}</view>
  179. <view class="margin-left">{{ item.resumesPost }}</view>
  180. </view>
  181. <view>{{ item.resumesContent }}</view>
  182. </view>
  183. </view>
  184. <view
  185. class="margin-tb-sm"
  186. style="width: 100%; height: 1rpx; background: #f2f2f2"
  187. ></view>
  188. <view>
  189. <view class="flex align-center justify-between">
  190. <view class="text-bold">项目经验</view>
  191. <view @click="gowork(2)">
  192. <image src="../static/add.png" style="width: 54upx; height: 54upx"></image>
  193. </view>
  194. </view>
  195. <view
  196. class="margin-top-sm text-sm"
  197. style="color: #999999"
  198. v-if="form.resumesWorkList.length == 0"
  199. >
  200. 添加工作经历向企业全面展示你的能力</view
  201. >
  202. <view
  203. v-for="(item, index) in form.resumesWorkList"
  204. class="gzjl"
  205. :key="index"
  206. v-else
  207. >
  208. <view class="flex justify-between" style="color: #121212">
  209. <view class="text-bold">
  210. {{ item.resumesTitle }}
  211. </view>
  212. <view class="">
  213. <u-icon
  214. name="trash"
  215. color="rgb(146,146,146)"
  216. @click="deleteList(form.resumesWorkList, index)"
  217. size="38"
  218. ></u-icon>
  219. <u-icon
  220. style="margin-left: 20rpx"
  221. name="edit-pen"
  222. @click="updataLists(item, index, 2)"
  223. color="rgb(146,146,146)"
  224. size="38"
  225. ></u-icon>
  226. </view>
  227. </view>
  228. <view class="flex align-center margin-tb-xs" style="color: #999999">
  229. <view>{{ item.resumesTime }}</view>
  230. <view class="margin-left">{{ item.resumesPost }}</view>
  231. </view>
  232. <view>{{ item.resumesContent }}</view>
  233. </view>
  234. </view>
  235. <view
  236. class="margin-tb-sm"
  237. style="width: 100%; height: 1rpx; background: #f2f2f2"
  238. ></view>
  239. <view>
  240. <view class="flex align-center justify-between">
  241. <view class="text-bold">个人优势</view>
  242. </view>
  243. <view class="padding-xs radius margin-top-sm" style="background: #f5f5f5">
  244. <u-input
  245. v-model="form.resumesDetails"
  246. type="textarea"
  247. height="300"
  248. placeholder="详细的个人信息与工作经历会让企业更加感兴趣"
  249. inputAlign="text-alight:left"
  250. />
  251. </view>
  252. </view>
  253. <!-- <view style="margin-top: 20rpx;">
  254. <view class="flex align-center justify-between">
  255. <view class=" text-bold">资格证书</view>
  256. </view>
  257. <view class="flex justify-between flex-wrap" style="margin-top: 10rpx;">
  258. <u-checkbox activeColor="#016BF6" v-model="item.checked" style="width: 50%;" v-for="(item, index) in nameList"
  259. :key="index" :name="item.name">{{item.name}}</u-checkbox>
  260. </view>
  261. </view> -->
  262. <!-- <view class="margin-top">
  263. <view class=" text-bold">资格证书上传
  264. </view>
  265. <view class="flex" style="overflow: hidden;flex-direction: initial;flex-wrap: wrap;">
  266. <view v-if="resumesImage.length">
  267. <view class="margin-top flex margin-right-sm flex-wrap">
  268. <view class="flex"
  269. style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;margin-bottom: 5rpx;"
  270. v-for="(image,index) in resumesImage" :key="index">
  271. <image :src="image" style="width: 100%;height: 100%;"></image>
  272. <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
  273. @click="removeImg(index)">
  274. <u-icon name="close-circle-fill" color="#016BF6" size="50rpx"></u-icon>
  275. </view>
  276. </view>
  277. </view>
  278. </view>
  279. <view class="margin-top" @click="addImages(2)">
  280. <view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
  281. class="flex justify-center align-center">
  282. <view>
  283. <u-icon name="plus" color="#000000" size="40"></u-icon>
  284. </view>
  285. </view>
  286. </view>
  287. </view>
  288. </view> -->
  289. </view>
  290. <view class="margin-lr">
  291. <!-- <u-button v-if="id" @click="update" class="margin-top" :custom-style="customStyle" shape="square"
  292. :hair-line="false">提交审核</u-button> -->
  293. <u-button
  294. @click="submit"
  295. class="margin-top"
  296. :custom-style="customStyle"
  297. shape="square"
  298. :hair-line="false"
  299. >
  300. 提交审核</u-button
  301. >
  302. </view>
  303. <!-- 选择学历 -->
  304. <u-select v-model="learnShow" :list="learnList" @confirm="learnConfirm"></u-select>
  305. <!-- 专业-->
  306. <u-select v-model="sexShow" :list="Sexlist" @confirm="sexConfirm"></u-select>
  307. <!-- 婚姻状况 -->
  308. <u-select
  309. v-model="MarriageShow"
  310. :list="Marriagelist"
  311. @confirm="MarriageConfirm"
  312. ></u-select>
  313. <!-- 工作经验 -->
  314. <u-select
  315. v-model="IntentionShow"
  316. :list="Intentionlist"
  317. @confirm="IntentionConfirm"
  318. ></u-select>
  319. <!-- 薪资 -->
  320. <u-select v-model="monyShow" :list="monyList" @confirm="moneyConfirm"></u-select>
  321. </view>
  322. <u-picker
  323. v-model="showGraduationTime"
  324. mode="time"
  325. @confirm="setGraduationTime"
  326. ></u-picker>
  327. <!-- 意向城市 -->
  328. <u-picker v-model="cityShow" mode="region" @confirm="cityConfirm"></u-picker>
  329. </view>
  330. </template>
  331. <script>
  332. import config from "../../common/config.js";
  333. import navBar from "@/components/nav-bar/index.vue";
  334. export default {
  335. data() {
  336. return {
  337. statusBarHeight: 0,
  338. showGraduationTime: false,
  339. nameList: [],
  340. labelStyle: {
  341. fontWeight: "bold",
  342. },
  343. resumesImage: [],
  344. customStyle: {
  345. backgroundColor: "#016BF6",
  346. color: "#FFFFFF",
  347. border: 0,
  348. },
  349. cityShow: false,
  350. form: {
  351. address: "", //家庭住址
  352. ruleClassifyId: "",
  353. resumesName: "", //姓名
  354. resumesAge: "", //年龄
  355. resumesPhone: "", //电话
  356. resumesEducation: "", //学历
  357. resumesMarriage: "", //婚姻状态
  358. resumesCompensation: "", //期望薪资
  359. resumesEmail: "", //电子邮箱
  360. resumesWorkExperience: "", //工作经验
  361. // resumesMajor: '', //专业
  362. resumesPost: "", //求职岗位
  363. resumesDetails: "", //自我介绍
  364. resumesCompanyList: [], //工作经历
  365. resumesWorkList: [], //项目经验
  366. // resumesImage: [], //证书
  367. school: "",
  368. major: "", //所学专业
  369. // rulePostId: '',
  370. // rulePostName: '',
  371. resumesSex: "", //性别
  372. // resumesImageName:'',//证书名称
  373. graduationTime: "", //毕业时间
  374. industryName: "", //行业
  375. city: "", //意向城市
  376. },
  377. resumesImage: [],
  378. learnShow: false,
  379. learnList: [], //学历列表
  380. MarriageShow: false, //婚姻状况
  381. Marriagelist: [],
  382. //求职岗位
  383. IntentionShow: false,
  384. Intentionlist: [],
  385. //岗位
  386. postlist: [],
  387. resumesId: "",
  388. resumes: {},
  389. sexShow: false, //性别
  390. resumesSex: "",
  391. Sexlist: [
  392. {
  393. value: "1",
  394. label: "男",
  395. },
  396. {
  397. value: "2",
  398. label: "女",
  399. },
  400. ],
  401. type: 1, // 1:新增/2:修改
  402. monyShow: false,
  403. monyList: [],
  404. };
  405. },
  406. components: {
  407. navBar,
  408. },
  409. onLoad(option) {
  410. // 获取状态栏高度
  411. const systemInfo = uni.getSystemInfoSync();
  412. this.statusBarHeight = systemInfo.statusBarHeight || 0;
  413. this.getbookName();
  414. if (option.resumesId) {
  415. this.type = 2;
  416. this.resumesId = option.resumesId;
  417. uni.setStorageSync("resumesId", option.resumesId);
  418. this.getDetails();
  419. }
  420. },
  421. // onHide() {
  422. // uni.removeStorageSync('resumesCompanyList')
  423. // uni.removeStorageSync('resumesWorkList')
  424. // },
  425. onUnload() {
  426. uni.removeStorageSync("resumesCompanyList");
  427. uni.removeStorageSync("resumesWorkList");
  428. },
  429. onShow() {
  430. let that = this;
  431. uni.$on("jobs", (info) => {
  432. that.form.resumesPost = info.ruleClassifyName;
  433. that.form.ruleClassifyId = info.ruleClassifyId;
  434. });
  435. if (uni.getStorageSync("resumesCompanyList")) {
  436. this.form.resumesCompanyList = uni.getStorageSync("resumesCompanyList");
  437. uni.setStorageSync("resumesCompanyList", this.form.resumesCompanyList);
  438. }
  439. if (uni.getStorageSync("resumesWorkList")) {
  440. this.form.resumesWorkList = uni.getStorageSync("resumesWorkList");
  441. uni.setStorageSync("resumesWorkList", this.form.resumesWorkList);
  442. }
  443. if (uni.getStorageSync("resumesId")) {
  444. this.resumesId = uni.getStorageSync("resumesId");
  445. }
  446. // if (uni.getStorageSync("resumes")) {
  447. // this.resumes = uni.getStorageSync("resumes")
  448. // this.form.rulePostId = this.resumes.rulePostId
  449. // this.form.rulePostName = this.resumes.rulePostName
  450. // this.form.resumesPost = this.resumes.resumesPost
  451. // this.form.ruleClassifyId = this.resumes.ruleClassifyId
  452. // }
  453. //选择的行业
  454. uni.$on("industry", (info) => {
  455. that.form.industryName = info.industry;
  456. });
  457. },
  458. methods: {
  459. /**
  460. * @param {Object} e
  461. * 地区选择回调
  462. */
  463. cityConfirm(e) {
  464. this.form.city = e.city.label;
  465. },
  466. //去选择行业
  467. gotoHy(url) {
  468. uni.navigateTo({
  469. url: url,
  470. });
  471. },
  472. //设置毕业时间
  473. setGraduationTime(e) {
  474. this.form.graduationTime = e.year + "-" + e.month + "-" + e.day;
  475. },
  476. //证书名称
  477. getbookName() {
  478. this.$Request
  479. .get("/app/dict/list", {
  480. type: "证书名称",
  481. })
  482. .then((res) => {
  483. if (res.code == 0) {
  484. let arr = [];
  485. res.data.map((item) => {
  486. let obj = {
  487. name: item.code,
  488. checked: false,
  489. disabled: false,
  490. };
  491. arr.push(obj);
  492. });
  493. this.nameList = arr;
  494. }
  495. });
  496. },
  497. //修改
  498. updataLists(list, index, state) {
  499. uni.navigateTo({
  500. url:
  501. "/my/publish/workhistory?index=" +
  502. index +
  503. "&state=" +
  504. state +
  505. "&list=" +
  506. JSON.stringify(list),
  507. });
  508. },
  509. //删除制定工作经验
  510. deleteList(list, index) {
  511. list.splice(index, 1);
  512. uni.removeStorageSync("resumesCompanyList");
  513. uni.removeStorageSync("resumesWorkList");
  514. // uni.setStorageSync("resumesCompanyList", this.form.resumesCompanyList)
  515. // uni.setStorageSync("resumesWorkList", this.form.resumesWorkList)
  516. },
  517. moneyConfirm(e) {
  518. this.form.resumesCompensation = e[0].value;
  519. },
  520. //薪资列表
  521. getMonyList() {
  522. this.$Request
  523. .get("/app/dict/list", {
  524. type: "薪资",
  525. })
  526. .then((res) => {
  527. if (res.code == 0) {
  528. let arr = res.data;
  529. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, "label"));
  530. this.monyList = arr;
  531. this.monyShow = true;
  532. }
  533. });
  534. },
  535. removeImg(index) {
  536. this.resumesImage.splice(index, 1);
  537. },
  538. sexConfirm(e) {
  539. console.log(e);
  540. this.form.resumesSex = e[0].value;
  541. this.resumesSex = e[0].label;
  542. },
  543. SexChen() {
  544. console.log("11111111111111");
  545. this.sexShow = true;
  546. },
  547. //获取 学历 婚姻状况 工作经验 专业
  548. getType(index) {
  549. let type = "";
  550. if (index == "学历") {
  551. type = index;
  552. } else if (index == "婚姻状况") {
  553. type = index;
  554. } else if (index == "工作经验") {
  555. type = index;
  556. } else if (index == "专业") {
  557. type = index;
  558. }
  559. let data = {
  560. type: type,
  561. };
  562. this.$Request.get("/app/dict/list", data).then((res) => {
  563. if (res.code == 0) {
  564. if (res.data.length > 0) {
  565. var arr = [];
  566. res.data.forEach((d, index) => {
  567. var data = {};
  568. data.label = d.value;
  569. data.value = index;
  570. arr.push(data);
  571. });
  572. if (index == "学历") {
  573. this.learnList = arr;
  574. this.learnShow = true;
  575. } else if (index == "婚姻状况") {
  576. this.Marriagelist = arr;
  577. this.MarriageShow = true;
  578. } else if (index == "工作经验") {
  579. this.Intentionlist = arr;
  580. this.IntentionShow = true;
  581. } else if (index == "专业") {
  582. this.Majorlist = arr;
  583. this.MajorShow = true;
  584. }
  585. console.log(arr);
  586. } else {
  587. uni.showToast({
  588. title: "暂无可选",
  589. icon: "none",
  590. });
  591. }
  592. }
  593. });
  594. },
  595. // 工作经验
  596. IntentionChen() {
  597. this.list = [];
  598. this.getType("工作经验");
  599. },
  600. IntentionConfirm(e) {
  601. this.form.resumesWorkExperience = e[0].label;
  602. },
  603. MarriageChen() {
  604. this.list = [];
  605. this.getType("婚姻状况");
  606. },
  607. //婚姻状况
  608. MarriageConfirm(e) {
  609. this.form.resumesMarriage = e[0].label;
  610. },
  611. learnChen() {
  612. this.list = [];
  613. this.getType("学历");
  614. },
  615. //选择学历
  616. learnConfirm(e) {
  617. this.form.resumesEducation = e[0].label;
  618. },
  619. PostChen() {
  620. // uni.navigateTo({
  621. // url: '/my/publish/resumesPost'
  622. // })
  623. uni.navigateTo({
  624. url: "/package/jobIntention/jobList",
  625. });
  626. },
  627. gowork(state) {
  628. uni.navigateTo({
  629. url: "/my/publish/workhistory?state=" + state,
  630. });
  631. },
  632. // 发布
  633. submit() {
  634. this.form.resumesImage = this.resumesImage;
  635. this.form.resumesImage = this.form.resumesImage.toString();
  636. let arr = this.nameList.filter((item) => item.checked === true);
  637. let arr2 = [];
  638. arr.map((item) => {
  639. arr2.push(item.name);
  640. });
  641. this.form.resumesImageName = arr2.join(",");
  642. // if(){}
  643. // this.form.resumesSex = this.resumesSex
  644. if (!this.form.resumesName) {
  645. uni.showToast({
  646. title: "请输入真实姓名",
  647. icon: "none",
  648. duration: 1000,
  649. });
  650. return;
  651. }
  652. if (!this.form.resumesAge) {
  653. uni.showToast({
  654. title: "请输入年龄",
  655. icon: "none",
  656. duration: 1000,
  657. });
  658. return;
  659. }
  660. if (!this.form.address) {
  661. uni.showToast({
  662. title: "请输入家庭住址",
  663. icon: "none",
  664. duration: 1000,
  665. });
  666. return;
  667. }
  668. if (!this.form.resumesSex) {
  669. uni.showToast({
  670. title: "请选择性别 ",
  671. icon: "none",
  672. duration: 1000,
  673. });
  674. return;
  675. }
  676. if (!this.form.resumesPhone) {
  677. uni.showToast({
  678. title: "请输入手机号",
  679. icon: "none",
  680. duration: 1000,
  681. });
  682. return;
  683. }
  684. if (!this.form.resumesEducation) {
  685. uni.showToast({
  686. title: "请选择学历",
  687. icon: "none",
  688. duration: 1000,
  689. });
  690. return;
  691. }
  692. if (!this.form.resumesMarriage) {
  693. uni.showToast({
  694. title: "请输入婚姻状况",
  695. icon: "none",
  696. duration: 1000,
  697. });
  698. return;
  699. }
  700. if (!this.form.resumesCompensation) {
  701. uni.showToast({
  702. title: "请选择期望薪资",
  703. icon: "none",
  704. duration: 1000,
  705. });
  706. return;
  707. }
  708. // if (!this.form.resumesEmail) {
  709. // uni.showToast({
  710. // title: '请输入电子邮箱',
  711. // icon: 'none',
  712. // duration: 1000
  713. // })
  714. // return
  715. // }
  716. if (!this.form.resumesWorkExperience) {
  717. uni.showToast({
  718. title: "请选择工作经验",
  719. icon: "none",
  720. duration: 1000,
  721. });
  722. return;
  723. }
  724. if (!this.form.school) {
  725. uni.showToast({
  726. title: "请填写毕业院校",
  727. icon: "none",
  728. duration: 1000,
  729. });
  730. return;
  731. }
  732. if (!this.form.major) {
  733. uni.showToast({
  734. title: "请填写所学专业",
  735. icon: "none",
  736. duration: 1000,
  737. });
  738. return;
  739. }
  740. if (!this.form.graduationTime) {
  741. uni.showToast({
  742. title: "请选择毕业时间",
  743. icon: "none",
  744. duration: 1000,
  745. });
  746. return;
  747. }
  748. if (!this.form.industryName) {
  749. uni.showToast({
  750. title: "请选择行业",
  751. icon: "none",
  752. duration: 1000,
  753. });
  754. return;
  755. }
  756. if (!this.form.city) {
  757. uni.showToast({
  758. title: "请选择意向城市",
  759. icon: "none",
  760. duration: 1000,
  761. });
  762. return;
  763. }
  764. if (!this.form.resumesPost) {
  765. uni.showToast({
  766. title: "请添加求职岗位",
  767. icon: "none",
  768. duration: 1000,
  769. });
  770. return;
  771. }
  772. // if (this.form.resumesWorkExperience != '无经验') {
  773. // if (this.form.resumesCompanyList.length == 0) {
  774. // uni.showToast({
  775. // title: '请添加工作经历',
  776. // icon: 'none',
  777. // duration: 1000
  778. // })
  779. // return
  780. // }
  781. // if (this.form.resumesWorkList.length == 0) {
  782. // uni.showToast({
  783. // title: '请添加项目经验',
  784. // icon: 'none',
  785. // duration: 1000
  786. // })
  787. // return
  788. // }
  789. // }
  790. if (!this.form.resumesDetails) {
  791. uni.showToast({
  792. title: "个人优势可以让你的简历眼前一亮,请填写个人优势",
  793. icon: "none",
  794. duration: 1000,
  795. });
  796. return;
  797. }
  798. // else{
  799. // this.form.resumesCompanyList = []
  800. // this.form.resumesWorkList = []
  801. // }
  802. // if (!this.form.resumesDetails) {
  803. // uni.showToast({
  804. // title: '请添加个人优势',
  805. // icon: 'none',
  806. // duration: 1000
  807. // })
  808. // return
  809. // }
  810. if (this.type == 2) {
  811. this.$Request.postJson("/app/resumes/updateResumes", this.form).then((res) => {
  812. if (res.code == 0) {
  813. // uni.removeStorageSync('resumesWorkList')
  814. uni.removeStorageSync("resumesCompanyList");
  815. // uni.removeStorageSync('resumes')
  816. uni.removeStorageSync("resumesId");
  817. uni.showToast({
  818. title: "修改成功",
  819. icon: "none",
  820. });
  821. setTimeout(function () {
  822. uni.navigateBack();
  823. }, 1000);
  824. } else {
  825. uni.showToast({
  826. title: res.msg,
  827. icon: "none",
  828. });
  829. }
  830. });
  831. } else {
  832. this.$Request.postJson("/app/resumes/insertResumes", this.form).then((res) => {
  833. if (res.code == 0) {
  834. // uni.removeStorageSync('resumesWorkList')
  835. uni.removeStorageSync("resumesCompanyList");
  836. // uni.removeStorageSync('resumes')
  837. uni.showToast({
  838. title: "提交成功",
  839. icon: "none",
  840. });
  841. setTimeout(function () {
  842. uni.navigateBack();
  843. }, 1000);
  844. } else {
  845. uni.showToast({
  846. title: res.msg,
  847. icon: "none",
  848. });
  849. }
  850. });
  851. }
  852. },
  853. getDetails() {
  854. this.$Request.get("/app/resumes/selectResumesByUserId").then((res) => {
  855. if (res.code == 0) {
  856. this.form = res.data;
  857. if (this.form.resumesSex == 1) {
  858. this.form.resumesSex = 1;
  859. this.resumesSex = "男";
  860. } else {
  861. this.form.resumesSex = 2;
  862. this.resumesSex = "女";
  863. }
  864. if (res.data.resumesImage && res.data.resumesImage != "") {
  865. this.resumesImage = res.data.resumesImage.split(",");
  866. }
  867. //初始化为对象否则会出现无法在字符串上创建属性的错误(原因是在onshow中有赋值)
  868. // this.resumes = {}
  869. // this.resumes.rulePostId = res.data.rulePostId
  870. // this.resumes.resumesPost = res.data.resumesPost
  871. // this.resumes.rulePostName = res.data.rulePostName
  872. this.form.resumesPost = res.data.resumesPost;
  873. this.form.ruleClassifyId = res.data.ruleClassifyId;
  874. uni.setStorageSync("resumesWorkList", this.form.resumesWorkList);
  875. uni.setStorageSync("resumesCompanyList", this.form.resumesCompanyList);
  876. //证书名称回显
  877. if (res.data.resumesImageName) {
  878. res.data.resumesImageName.split(",").map((item) => {
  879. this.nameList.map((re) => {
  880. if (item === re.name) {
  881. re.checked = true;
  882. }
  883. });
  884. });
  885. }
  886. }
  887. });
  888. },
  889. // 图片上传
  890. addImages(e) {
  891. let that = this;
  892. uni.chooseImage({
  893. count: 99,
  894. sourceType: ["album", "camera"],
  895. success: (res) => {
  896. for (let i = 0; i < res.tempFilePaths.length; i++) {
  897. that.$queue.showLoading("上传中...");
  898. uni.uploadFile({
  899. // 上传接口
  900. url: config.APIHOST + "/alioss/upload",
  901. filePath: res.tempFilePaths[i],
  902. name: "file",
  903. success: (uploadFileRes) => {
  904. if (e == 2) {
  905. that.resumesImage.push(JSON.parse(uploadFileRes.data).data);
  906. }
  907. uni.hideLoading();
  908. },
  909. });
  910. }
  911. },
  912. });
  913. },
  914. config: function (name) {
  915. var info = null;
  916. if (name) {
  917. var name2 = name.split("."); //字符分割
  918. if (name2.length > 1) {
  919. info = configdata[name2[0]][name2[1]] || null;
  920. } else {
  921. info = configdata[name] || null;
  922. }
  923. if (info == null) {
  924. let web_config = cache.get("web_config");
  925. if (web_config) {
  926. if (name2.length > 1) {
  927. info = web_config[name2[0]][name2[1]] || null;
  928. } else {
  929. info = web_config[name] || null;
  930. }
  931. }
  932. }
  933. }
  934. return info;
  935. },
  936. },
  937. };
  938. </script>
  939. <style scoped lang="scss">
  940. .page-box {
  941. position: absolute;
  942. left: 0;
  943. bottom: 0;
  944. right: 0;
  945. top: 0;
  946. overflow: hidden;
  947. display: flex;
  948. flex-direction: column;
  949. .page-content{
  950. flex: 1;
  951. width: 100%;
  952. overflow: hidden;
  953. overflow-y: auto;
  954. padding-bottom: 40rpx;
  955. box-sizing: border-box;
  956. }
  957. }
  958. page {
  959. background-color: #f5f5f5;
  960. }
  961. .gzjl {
  962. width: 100%;
  963. background-color: rgb(247, 247, 247);
  964. border-radius: 10rpx;
  965. margin-top: 10rpx;
  966. padding: 25rpx;
  967. }
  968. .bg {
  969. background-color: #ffffff;
  970. border-radius: 24upx;
  971. }
  972. /deep/ .u-form-item {
  973. padding: 20rpx 0 20rpx 0;
  974. }
  975. .label {
  976. background: #ddfff7;
  977. border-radius: 4upx;
  978. color: #016bf6;
  979. display: inline-flex;
  980. padding: 14upx 23upx;
  981. }
  982. </style>