editor.vue 25 KB

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