editor.vue 29 KB

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