editor.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  1. <template>
  2. <view class="padding-bottom-xl">
  3. <!-- <view class="text-white padding margin bg" v-if="form.isRecommend==2">
  4. <view class="flex align-center justify-between" style="color: red;">
  5. <view class=" text-bold">已录入人才库</view>
  6. </view>
  7. </view> -->
  8. <view class="text-white padding margin bg" v-if="form.status==3">
  9. <view class="flex align-center justify-between" style="color: red;">
  10. <view class=" text-bold">拒绝理由</view>
  11. <view class="text-right ">
  12. {{form.auditContent}}
  13. </view>
  14. </view>
  15. </view>
  16. <view class="text-white padding margin bg">
  17. <u-form label-width="150" :label-style="labelStyle" :model="form" ref="uForm">
  18. <u-form-item label="姓名">
  19. <u-input height="200rpx" v-model="form.resumesName" placeholder="请输入姓名" />
  20. </u-form-item>
  21. <u-form-item label="年龄">
  22. <u-input v-model="form.resumesAge" type="number" placeholder="请输入年龄" />
  23. </u-form-item>
  24. <u-form-item label="家庭住址" placeholder="请输入家庭住址">
  25. <u-input v-model="form.address" />
  26. </u-form-item>
  27. <u-form-item label="性别" right-icon="arrow-right">
  28. <u-input v-model="resumesSex" placeholder="请选择性别" :disabled="true" @click="SexChen()" />
  29. </u-form-item>
  30. <u-form-item label="手机号">
  31. <u-input v-model="form.resumesPhone" type="number" maxlength="11" placeholder="请输入手机号" />
  32. </u-form-item>
  33. <u-form-item label="学历" right-icon="arrow-right">
  34. <u-input v-model="form.resumesEducation" placeholder="请选择学历" :disabled="true"
  35. @click="learnChen()" />
  36. </u-form-item>
  37. <u-form-item label="婚姻状况" right-icon="arrow-right">
  38. <u-input v-model="form.resumesMarriage" placeholder="请选择婚姻状况" :disabled="true"
  39. @click="MarriageChen()" />
  40. </u-form-item>
  41. <u-form-item label="期望薪资" right-icon="arrow-right">
  42. <u-input v-model="form.resumesCompensation" placeholder="请选择期望薪资" :disabled="true"
  43. @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"
  64. @click="gotoHy('/package/jobIntention/industry')" 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)"
  103. @click="deleteList(form.resumesCompanyList,index)" 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)"
  135. @click="deleteList(form.resumesWorkList,index)" 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"
  154. placeholder="详细的个人信息与工作经历会让企业更加感兴趣" 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="#00B88F" 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="#00B88F" 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. <u-picker v-model="showGraduationTime" mode="time" @confirm="setGraduationTime"></u-picker>
  211. <!-- 意向城市 -->
  212. <u-picker v-model="cityShow" mode="region" @confirm="cityConfirm"></u-picker>
  213. </view>
  214. </template>
  215. <script>
  216. import config from '../../common/config.js'
  217. export default {
  218. data() {
  219. return {
  220. showGraduationTime: false,
  221. nameList: [],
  222. labelStyle: {
  223. fontWeight: 'bold'
  224. },
  225. resumesImage: [],
  226. customStyle: {
  227. backgroundColor: '#00B88F',
  228. color: '#FFFFFF',
  229. border: 0
  230. },
  231. cityShow: false,
  232. form: {
  233. address: '', //家庭住址
  234. ruleClassifyId: '',
  235. resumesName: '', //姓名
  236. resumesAge: '', //年龄
  237. resumesPhone: '', //电话
  238. resumesEducation: '', //学历
  239. resumesMarriage: '', //婚姻状态
  240. resumesCompensation: '', //期望薪资
  241. resumesEmail: '', //电子邮箱
  242. resumesWorkExperience: '', //工作经验
  243. // resumesMajor: '', //专业
  244. resumesPost: '', //求职岗位
  245. resumesDetails: '', //自我介绍
  246. resumesCompanyList: [], //工作经历
  247. resumesWorkList: [], //项目经验
  248. // resumesImage: [], //证书
  249. school: '',
  250. major: '', //所学专业
  251. // rulePostId: '',
  252. // rulePostName: '',
  253. resumesSex: '', //性别
  254. // resumesImageName:'',//证书名称
  255. graduationTime: '', //毕业时间
  256. industryName: '', //行业
  257. city: '', //意向城市
  258. },
  259. resumesImage: [],
  260. learnShow: false,
  261. learnList: [], //学历列表
  262. MarriageShow: false, //婚姻状况
  263. Marriagelist: [],
  264. //求职岗位
  265. IntentionShow: false,
  266. Intentionlist: [],
  267. //岗位
  268. postlist: [],
  269. resumesId: '',
  270. resumes: {},
  271. sexShow: false, //性别
  272. resumesSex: '',
  273. Sexlist: [{
  274. value: '1',
  275. label: '男'
  276. },
  277. {
  278. value: '2',
  279. label: '女'
  280. }
  281. ],
  282. type: 1, // 1:新增/2:修改
  283. monyShow: false,
  284. monyList: [],
  285. }
  286. },
  287. onLoad(option) {
  288. this.getbookName();
  289. if (option.resumesId) {
  290. this.type = 2
  291. this.resumesId = option.resumesId
  292. uni.setStorageSync("resumesId", option.resumesId)
  293. this.getDetails()
  294. }
  295. },
  296. // onHide() {
  297. // uni.removeStorageSync('resumesCompanyList')
  298. // uni.removeStorageSync('resumesWorkList')
  299. // },
  300. onUnload() {
  301. uni.removeStorageSync('resumesCompanyList')
  302. uni.removeStorageSync('resumesWorkList')
  303. },
  304. onShow() {
  305. let that = this
  306. uni.$on('jobs', (info) => {
  307. that.form.resumesPost = info.ruleClassifyName
  308. that.form.ruleClassifyId = info.ruleClassifyId
  309. })
  310. if (uni.getStorageSync("resumesCompanyList")) {
  311. this.form.resumesCompanyList = uni.getStorageSync("resumesCompanyList")
  312. uni.setStorageSync("resumesCompanyList", this.form.resumesCompanyList)
  313. }
  314. if (uni.getStorageSync("resumesWorkList")) {
  315. this.form.resumesWorkList = uni.getStorageSync("resumesWorkList")
  316. uni.setStorageSync("resumesWorkList", this.form.resumesWorkList)
  317. }
  318. if (uni.getStorageSync("resumesId")) {
  319. this.resumesId = uni.getStorageSync("resumesId")
  320. }
  321. // if (uni.getStorageSync("resumes")) {
  322. // this.resumes = uni.getStorageSync("resumes")
  323. // this.form.rulePostId = this.resumes.rulePostId
  324. // this.form.rulePostName = this.resumes.rulePostName
  325. // this.form.resumesPost = this.resumes.resumesPost
  326. // this.form.ruleClassifyId = this.resumes.ruleClassifyId
  327. // }
  328. //选择的行业
  329. uni.$on('industry', (info) => {
  330. that.form.industryName = info.industry
  331. })
  332. },
  333. methods: {
  334. /**
  335. * @param {Object} e
  336. * 地区选择回调
  337. */
  338. cityConfirm(e) {
  339. this.form.city = e.city.label
  340. },
  341. //去选择行业
  342. gotoHy(url) {
  343. uni.navigateTo({
  344. url: url
  345. })
  346. },
  347. //设置毕业时间
  348. setGraduationTime(e) {
  349. this.form.graduationTime = e.year + '-' + e.month + '-' + e.day
  350. },
  351. //证书名称
  352. getbookName() {
  353. this.$Request.get('/app/dict/list', {
  354. type: '证书名称'
  355. }).then(res => {
  356. if (res.code == 0) {
  357. let arr = []
  358. res.data.map(item => {
  359. let obj = {
  360. name: item.code,
  361. checked: false,
  362. disabled: false
  363. }
  364. arr.push(obj)
  365. })
  366. this.nameList = arr
  367. }
  368. })
  369. },
  370. //修改
  371. updataLists(list, index, state) {
  372. uni.navigateTo({
  373. url: '/my/publish/workhistory?index=' + index + '&state=' + state + '&list=' + JSON.stringify(
  374. list)
  375. })
  376. },
  377. //删除制定工作经验
  378. deleteList(list, index) {
  379. list.splice(index, 1)
  380. uni.removeStorageSync('resumesCompanyList')
  381. uni.removeStorageSync('resumesWorkList')
  382. // uni.setStorageSync("resumesCompanyList", this.form.resumesCompanyList)
  383. // uni.setStorageSync("resumesWorkList", this.form.resumesWorkList)
  384. },
  385. moneyConfirm(e) {
  386. this.form.resumesCompensation = e[0].value
  387. },
  388. //薪资列表
  389. getMonyList() {
  390. this.$Request.get('/app/dict/list', {
  391. type: '薪资'
  392. }).then(res => {
  393. if (res.code == 0) {
  394. let arr = res.data
  395. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  396. this.monyList = arr
  397. this.monyShow = true
  398. }
  399. })
  400. },
  401. removeImg(index) {
  402. this.resumesImage.splice(index, 1)
  403. },
  404. sexConfirm(e) {
  405. console.log(e)
  406. this.form.resumesSex = e[0].value
  407. this.resumesSex = e[0].label
  408. },
  409. SexChen() {
  410. console.log('11111111111111')
  411. this.sexShow = true
  412. },
  413. //获取 学历 婚姻状况 工作经验 专业
  414. getType(index) {
  415. let type = ''
  416. if (index == '学历') {
  417. type = index
  418. } else if (index == '婚姻状况') {
  419. type = index
  420. } else if (index == '工作经验') {
  421. type = index
  422. } else if (index == '专业') {
  423. type = index
  424. }
  425. let data = {
  426. type: type
  427. }
  428. this.$Request.get('/app/dict/list', data).then(res => {
  429. if (res.code == 0) {
  430. if (res.data.length > 0) {
  431. var arr = []
  432. res.data.forEach((d, index) => {
  433. var data = {}
  434. data.label = d.value
  435. data.value = index
  436. arr.push(data)
  437. })
  438. if (index == '学历') {
  439. this.learnList = arr
  440. this.learnShow = true
  441. } else if (index == '婚姻状况') {
  442. this.Marriagelist = arr
  443. this.MarriageShow = true
  444. } else if (index == '工作经验') {
  445. this.Intentionlist = arr
  446. this.IntentionShow = true
  447. } else if (index == '专业') {
  448. this.Majorlist = arr
  449. this.MajorShow = true
  450. }
  451. console.log(arr)
  452. } else {
  453. uni.showToast({
  454. title: '暂无可选',
  455. icon: 'none'
  456. })
  457. }
  458. }
  459. })
  460. },
  461. // 工作经验
  462. IntentionChen() {
  463. this.list = []
  464. this.getType('工作经验')
  465. },
  466. IntentionConfirm(e) {
  467. this.form.resumesWorkExperience = e[0].label
  468. },
  469. MarriageChen() {
  470. this.list = []
  471. this.getType('婚姻状况')
  472. },
  473. //婚姻状况
  474. MarriageConfirm(e) {
  475. this.form.resumesMarriage = e[0].label
  476. },
  477. learnChen() {
  478. this.list = []
  479. this.getType('学历')
  480. },
  481. //选择学历
  482. learnConfirm(e) {
  483. this.form.resumesEducation = e[0].label
  484. },
  485. PostChen() {
  486. // uni.navigateTo({
  487. // url: '/my/publish/resumesPost'
  488. // })
  489. uni.navigateTo({
  490. url: '/package/jobIntention/jobList'
  491. })
  492. },
  493. gowork(state) {
  494. uni.navigateTo({
  495. url: '/my/publish/workhistory?state=' + state
  496. })
  497. },
  498. // 发布
  499. submit() {
  500. this.form.resumesImage = this.resumesImage
  501. this.form.resumesImage = this.form.resumesImage.toString();
  502. let arr = this.nameList.filter(item => item.checked === true)
  503. let arr2 = []
  504. arr.map(item => {
  505. arr2.push(item.name)
  506. })
  507. this.form.resumesImageName = arr2.join(',')
  508. // if(){}
  509. // this.form.resumesSex = this.resumesSex
  510. if (!this.form.resumesName) {
  511. uni.showToast({
  512. title: '请输入真实姓名',
  513. icon: 'none',
  514. duration: 1000
  515. })
  516. return
  517. }
  518. if (!this.form.resumesAge) {
  519. uni.showToast({
  520. title: '请输入年龄',
  521. icon: 'none',
  522. duration: 1000
  523. })
  524. return
  525. }
  526. if (!this.form.address) {
  527. uni.showToast({
  528. title: '请输入家庭住址',
  529. icon: 'none',
  530. duration: 1000
  531. })
  532. return
  533. }
  534. if (!this.form.resumesSex) {
  535. uni.showToast({
  536. title: '请选择性别 ',
  537. icon: 'none',
  538. duration: 1000
  539. })
  540. return
  541. }
  542. if (!this.form.resumesPhone) {
  543. uni.showToast({
  544. title: '请输入手机号',
  545. icon: 'none',
  546. duration: 1000
  547. })
  548. return
  549. }
  550. if (!this.form.resumesEducation) {
  551. uni.showToast({
  552. title: '请选择学历',
  553. icon: 'none',
  554. duration: 1000
  555. })
  556. return
  557. }
  558. if (!this.form.resumesMarriage) {
  559. uni.showToast({
  560. title: '请输入婚姻状况',
  561. icon: 'none',
  562. duration: 1000
  563. })
  564. return
  565. }
  566. if (!this.form.resumesCompensation) {
  567. uni.showToast({
  568. title: '请选择期望薪资',
  569. icon: 'none',
  570. duration: 1000
  571. })
  572. return
  573. }
  574. // if (!this.form.resumesEmail) {
  575. // uni.showToast({
  576. // title: '请输入电子邮箱',
  577. // icon: 'none',
  578. // duration: 1000
  579. // })
  580. // return
  581. // }
  582. if (!this.form.resumesWorkExperience) {
  583. uni.showToast({
  584. title: '请选择工作经验',
  585. icon: 'none',
  586. duration: 1000
  587. })
  588. return
  589. }
  590. if (!this.form.school) {
  591. uni.showToast({
  592. title: '请填写毕业院校',
  593. icon: 'none',
  594. duration: 1000
  595. })
  596. return
  597. }
  598. if (!this.form.major) {
  599. uni.showToast({
  600. title: '请填写所学专业',
  601. icon: 'none',
  602. duration: 1000
  603. })
  604. return
  605. }
  606. if (!this.form.graduationTime) {
  607. uni.showToast({
  608. title: '请选择毕业时间',
  609. icon: 'none',
  610. duration: 1000
  611. })
  612. return
  613. }
  614. if (!this.form.industryName) {
  615. uni.showToast({
  616. title: '请选择行业',
  617. icon: 'none',
  618. duration: 1000
  619. })
  620. return
  621. }
  622. if (!this.form.city) {
  623. uni.showToast({
  624. title: '请选择意向城市',
  625. icon: 'none',
  626. duration: 1000
  627. })
  628. return
  629. }
  630. if (!this.form.resumesPost) {
  631. uni.showToast({
  632. title: '请添加求职岗位',
  633. icon: 'none',
  634. duration: 1000
  635. })
  636. return
  637. }
  638. // if (this.form.resumesWorkExperience != '无经验') {
  639. // if (this.form.resumesCompanyList.length == 0) {
  640. // uni.showToast({
  641. // title: '请添加工作经历',
  642. // icon: 'none',
  643. // duration: 1000
  644. // })
  645. // return
  646. // }
  647. // if (this.form.resumesWorkList.length == 0) {
  648. // uni.showToast({
  649. // title: '请添加项目经验',
  650. // icon: 'none',
  651. // duration: 1000
  652. // })
  653. // return
  654. // }
  655. // }
  656. if (!this.form.resumesDetails) {
  657. uni.showToast({
  658. title: '个人优势可以让你的简历眼前一亮,请填写个人优势',
  659. icon: 'none',
  660. duration: 1000
  661. })
  662. return
  663. }
  664. // else{
  665. // this.form.resumesCompanyList = []
  666. // this.form.resumesWorkList = []
  667. // }
  668. // if (!this.form.resumesDetails) {
  669. // uni.showToast({
  670. // title: '请添加个人优势',
  671. // icon: 'none',
  672. // duration: 1000
  673. // })
  674. // return
  675. // }
  676. if (this.type == 2) {
  677. this.$Request.postJson("/app/resumes/updateResumes", this.form).then(res => {
  678. if (res.code == 0) {
  679. // uni.removeStorageSync('resumesWorkList')
  680. uni.removeStorageSync('resumesCompanyList')
  681. // uni.removeStorageSync('resumes')
  682. uni.removeStorageSync('resumesId')
  683. uni.showToast({
  684. title: '修改成功',
  685. icon: 'none'
  686. })
  687. setTimeout(function() {
  688. uni.navigateBack()
  689. }, 1000)
  690. } else {
  691. uni.showToast({
  692. title: res.msg,
  693. icon: 'none'
  694. })
  695. }
  696. });
  697. } else {
  698. this.$Request.postJson("/app/resumes/insertResumes", this.form).then(res => {
  699. if (res.code == 0) {
  700. // uni.removeStorageSync('resumesWorkList')
  701. uni.removeStorageSync('resumesCompanyList')
  702. // uni.removeStorageSync('resumes')
  703. uni.showToast({
  704. title: '提交成功',
  705. icon: 'none'
  706. })
  707. setTimeout(function() {
  708. uni.navigateBack()
  709. }, 1000)
  710. } else {
  711. uni.showToast({
  712. title: res.msg,
  713. icon: 'none'
  714. })
  715. }
  716. });
  717. }
  718. },
  719. getDetails() {
  720. this.$Request.get('/app/resumes/selectResumesByUserId').then(res => {
  721. if (res.code == 0) {
  722. this.form = res.data
  723. if (this.form.resumesSex == 1) {
  724. this.form.resumesSex = 1
  725. this.resumesSex = '男'
  726. } else {
  727. this.form.resumesSex = 2
  728. this.resumesSex = '女'
  729. }
  730. if (res.data.resumesImage && res.data.resumesImage != '') {
  731. this.resumesImage = res.data.resumesImage.split(',')
  732. }
  733. //初始化为对象否则会出现无法在字符串上创建属性的错误(原因是在onshow中有赋值)
  734. // this.resumes = {}
  735. // this.resumes.rulePostId = res.data.rulePostId
  736. // this.resumes.resumesPost = res.data.resumesPost
  737. // this.resumes.rulePostName = res.data.rulePostName
  738. this.form.resumesPost = res.data.resumesPost
  739. this.form.ruleClassifyId = res.data.ruleClassifyId
  740. uni.setStorageSync("resumesWorkList", this.form.resumesWorkList)
  741. uni.setStorageSync("resumesCompanyList", this.form.resumesCompanyList)
  742. //证书名称回显
  743. if (res.data.resumesImageName) {
  744. res.data.resumesImageName.split(',').map(item => {
  745. this.nameList.map(re => {
  746. if (item === re.name) {
  747. re.checked = true
  748. }
  749. })
  750. })
  751. }
  752. }
  753. })
  754. },
  755. // 图片上传
  756. addImages(e) {
  757. let that = this
  758. uni.chooseImage({
  759. count: 99,
  760. sourceType: ['album', 'camera'],
  761. success: res => {
  762. for (let i = 0; i < res.tempFilePaths.length; i++) {
  763. that.$queue.showLoading("上传中...");
  764. uni.uploadFile({ // 上传接口
  765. url: config.APIHOST + '/alioss/upload',
  766. filePath: res.tempFilePaths[i],
  767. name: 'file',
  768. success: (uploadFileRes) => {
  769. if (e == 2) {
  770. that.resumesImage.push(JSON.parse(uploadFileRes.data).data)
  771. }
  772. uni.hideLoading();
  773. }
  774. });
  775. }
  776. }
  777. })
  778. },
  779. config: function(name) {
  780. var info = null;
  781. if (name) {
  782. var name2 = name.split("."); //字符分割
  783. if (name2.length > 1) {
  784. info = configdata[name2[0]][name2[1]] || null;
  785. } else {
  786. info = configdata[name] || null;
  787. }
  788. if (info == null) {
  789. let web_config = cache.get("web_config");
  790. if (web_config) {
  791. if (name2.length > 1) {
  792. info = web_config[name2[0]][name2[1]] || null;
  793. } else {
  794. info = web_config[name] || null;
  795. }
  796. }
  797. }
  798. }
  799. return info;
  800. }
  801. }
  802. }
  803. </script>
  804. <style>
  805. page {
  806. background-color: #F5F5F5;
  807. }
  808. .gzjl {
  809. width: 100%;
  810. background-color: rgb(247, 247, 247);
  811. border-radius: 10rpx;
  812. margin-top: 10rpx;
  813. padding: 25rpx;
  814. }
  815. .bg {
  816. background-color: #FFFFFF;
  817. border-radius: 24upx;
  818. }
  819. /deep/ .u-form-item {
  820. padding: 20rpx 0 20rpx 0;
  821. }
  822. .label {
  823. background: #DDFFF7;
  824. border-radius: 4upx;
  825. color: #00B88F;
  826. display: inline-flex;
  827. padding: 14upx 23upx;
  828. }
  829. </style>