perfect.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. <template>
  2. <view class="content vflex jbetween">
  3. <view >
  4. <view class="box" v-show="index == '1'">
  5. <view class="hflex acenter jbetween cell">
  6. <view class="label">头像</view>
  7. <u-avatar :src="base_info.avatar" @click="uploadAvatar"></u-avatar>
  8. </view>
  9. <view class="cell">
  10. <view class="label">真实姓名</view>
  11. <u-input v-model="base_info.name" border="none" placeholder="请填写你的真实姓名"></u-input>
  12. </view>
  13. <view class="cell">
  14. <view class="label">性别</view>
  15. <view class="hflex">
  16. <view v-for="(item,index) in sexList" :key="index" style="padding-right: 52rpx;">
  17. <radio :value="item.value" :checked="base_info.sex == item.name?true:false" color="#506dff" @click="selectSex(item.value)" />{{item.name}}
  18. </view>
  19. </view>
  20. </view>
  21. <view class="cell">
  22. <view class="label">出生年月</view>
  23. <view @click="open('birthday')">
  24. <u-input v-model="base_info.date_birth" disabled disabledColor="#fff" border="none" placeholder="请选择你的出生年月" suffixIcon="arrow-right"></u-input>
  25. </view>
  26. <u-datetime-picker :minDate="minDate" title="生日" :show="birthday_show" v-model="newDate" ref="datetimePicker" @confirm="confirmAge" @cancel="cancel" :formatter="formatter" mode="date"></u-datetime-picker>
  27. </view>
  28. <view class="cell">
  29. <view class="label">学历</view>
  30. <view @click="open('education')">
  31. <u-input v-model="base_info.edu" disabled disabledColor="#fff" border="none" placeholder="如:本科" suffixIcon="arrow-right"></u-input>
  32. </view>
  33. <u-picker title="学历" :show="education_show" :columns="educationList" ref="uPicker" @confirm="confirmEdu" @cancel="cancel" ></u-picker>
  34. </view>
  35. <view class="cell">
  36. <view class="label">参加工作时间</view>
  37. <view @click="open('work_date')">
  38. <u-input v-model="base_info.start_working_time" disabled disabledColor="#fff" border="none" placeholder="请选择参加工作的时间" suffixIcon="arrow-right"></u-input>
  39. </view>
  40. <u-datetime-picker :minDate="minDate" title="参加工作时间" :show="work_show" v-model="newDate" ref="datetimePicker" @confirm="confirmWork" @cancel="cancel" :formatter="formatter" mode="year-month"></u-datetime-picker>
  41. </view>
  42. <view class="cell">
  43. <view class="label">手机号码</view>
  44. <u-input v-model="base_info.phone" border="none" placeholder="请填写你的手机号码"></u-input>
  45. </view>
  46. <view class="cell">
  47. <view class="label">邮箱</view>
  48. <u-input v-model="base_info.email" border="none" placeholder="用于接收面试邮件"></u-input>
  49. </view>
  50. </view>
  51. <view class="box" v-if="index == '2'">
  52. <view class="cell">
  53. <view class="label">应聘岗位</view>
  54. <u-input v-model="job_inte.post" border="none" placeholder="请填写你应聘的岗位"></u-input>
  55. </view>
  56. <view class="cell">
  57. <view class="label">可工作地区范围</view>
  58. <u-input v-model="job_inte.work_address" border="none" placeholder="请填写工作地区范围"></u-input>
  59. </view>
  60. <view class="cell">
  61. <view class="label">期望薪资</view>
  62. <view @click="open('salary')">
  63. <u-input v-model="job_inte.salary" disabled disabledColor="#fff" border="none" placeholder="请选择期望薪资" suffixIcon="arrow-right"></u-input>
  64. </view>
  65. <u-picker :show="salary_show" title="期望薪资" ref="uPicker" :columns="salaryList" @confirm="confirmSalary" @cancel="cancel"></u-picker>
  66. </view>
  67. <view class="cell">
  68. <view class="label">可工作时间</view>
  69. <u-input v-model="job_inte.work_time" border="none" placeholder="请输入工作时间比如12小时/天"></u-input>
  70. </view>
  71. <view class="cell">
  72. <view class="label">工作性质</view>
  73. <view @click="open('work_nature')">
  74. <u-input v-model="job_inte.work_nature" disabled disabledColor="#fff" border="none" placeholder="请选择用工性质" suffixIcon="arrow-right"></u-input>
  75. </view>
  76. <u-picker :show="nature_show" title="工作性质" ref="uPicker" :columns="natureList" @confirm="confirmNature" @cancel="cancel"></u-picker>
  77. </view>
  78. </view>
  79. <view class="box" v-if="index == '3'">
  80. <view class="cell">
  81. <view class="label">公司名称</view>
  82. <u-input v-model="experience.content.company_name" border="none" placeholder="请输入"></u-input>
  83. </view>
  84. <view class="cell">
  85. <view class="label">职位名称</view>
  86. <u-input v-model="experience.content.position_name" border="none" placeholder="请输入"></u-input>
  87. </view>
  88. <view class="cell">
  89. <view class="label">在职时间</view>
  90. <view class="hflex acenter jbetween">
  91. <view @click="open('time1')">
  92. <u-input v-model="experience.content.on_job_start" disabled disabledColor="#fff" border="none" placeholder="入职时间"></u-input>
  93. </view>
  94. <u-datetime-picker :minDate="minDate" title="入职时间" :show="show_time1" v-model="newDate" ref="datetimePicker" @confirm="confirmTime1" @cancel="cancel" :formatter="formatter" mode="year-month"></u-datetime-picker>
  95. <view style="margin: 0 20rpx;">-</view>
  96. <view @click="open('time2')">
  97. <u-input v-model="experience.content.on_job_end" disabled disabledColor="#fff" border="none" placeholder="离职时间"></u-input>
  98. </view>
  99. <u-datetime-picker :minDate="minDate" title="离职时间" :show="show_time2" v-model="newDate" ref="datetimePicker" @confirm="confirmTime2" @cancel="cancel" :formatter="formatter" mode="year-month"></u-datetime-picker>
  100. </view>
  101. </view>
  102. <view class="cell">
  103. <view class="label">工作内容</view>
  104. <u-input v-model="experience.content.job_description" border="none" placeholder="请详细描述你在公司的主要工作内容以及…" suffixIcon="arrow-right"></u-input>
  105. </view>
  106. </view>
  107. <view class="box" v-if="index == '4'">
  108. <view class="cell">
  109. <view class="label">技能名称</view>
  110. <u-input v-model="skills.skills_name" border="none" placeholder="掌握的技能名称"></u-input>
  111. </view>
  112. <view class="cell">
  113. <view class="label">掌握程度</view>
  114. <view @click="open('skills_degree')">
  115. <u-input v-model="skills.skills_degree" disabled disabledColor="#fff" border="none" placeholder="如:精通" suffixIcon="arrow-right"></u-input>
  116. </view>
  117. <u-picker :show="degree_show" title="掌握程度" ref="uPicker" :columns="degreeList" @confirm="confirmSkill" @cancel="cancel"></u-picker>
  118. </view>
  119. </view>
  120. <view class="box" v-if="index == '5'">
  121. <view class="cell">
  122. <view class="label">证书名称</view>
  123. <u-input v-model="certificate.certificate_name" border="none" placeholder="获得的证书名称"></u-input>
  124. </view>
  125. <view class="cell">
  126. <view class="label">获得时间</view>
  127. <view @click="open('certificate_date')">
  128. <u-input v-model="certificate.certificate_date" disabled disabledColor="#fff" border="none" placeholder="年/月" suffixIcon="arrow-right"></u-input>
  129. </view>
  130. <u-datetime-picker :minDate="minDate" title="获得时间" :show="certificate_show" v-model="newDate" ref="datetimePicker" @confirm="confirmDate" @cancel="cancel" :formatter="formatter" mode="year-month"></u-datetime-picker>
  131. </view>
  132. <view class="cell">
  133. <view class="hflex acenter">
  134. <view class="label">上传图片</view>
  135. <view class="hflex acenter" style="padding-bottom: 20rpx;">
  136. <u-icon name="info-circle-fill" color="#FFA446" size="10"></u-icon>
  137. <view class="label2">只能上传一张</view>
  138. </view>
  139. </view>
  140. <u-upload :fileList="certificate.certificate_img" @afterRead="afterRead" @delete="deletePic" :maxCount="1" name="1" multiple :previewFullImage="true" width="100" height="100">
  141. <image src="https://ship-expert.zhousi.hdlkeji.com/common/upload.png" style="width: 200rpx;height: 200rpx;"></image>
  142. </u-upload>
  143. <!-- <view class="upload vflex acenter jcenter" @click="uploadImg" v-if="certificate.certificate_img == ''">
  144. <u-icon name="plus" color="#CACACA" size="25"></u-icon>
  145. <view class="text_style1">添加图片</view>
  146. </view>
  147. <view v-else>
  148. <image :src="certificate.certificate_img" mode="aspectFill" class="upload"></image>
  149. </view> -->
  150. </view>
  151. </view>
  152. </view>
  153. <view class="save" @click="save">保存</view>
  154. </view>
  155. </template>
  156. <script>
  157. import $api from '@/static/js/api.js'
  158. var that = ''
  159. export default {
  160. data() {
  161. return {
  162. index: '0',
  163. base_info: {
  164. avatar: '',
  165. name: '',
  166. sex: '',
  167. date_birth: '',
  168. start_working_time: '',
  169. phone: '',
  170. email: '',
  171. edu: '',
  172. },
  173. educationList: [
  174. ['初中及以下','中专/中技','高中','大专','本科','硕士','博士']
  175. ],
  176. sexList: [
  177. {
  178. value: '0',
  179. name: '男',
  180. },
  181. {
  182. value: '1',
  183. name: '女'
  184. }
  185. ],
  186. job_inte: {
  187. post: '',
  188. work_address: '',
  189. salary: '',
  190. work_time: '',
  191. work_nature: '',
  192. },
  193. salaryList: [
  194. ['1k','2k','3k','4k','5k','6k','7k','8k'],
  195. ['3k','4k','5k','6k','7k','8k','9k','10k']
  196. ],
  197. natureList: [
  198. ['兼职','全职']
  199. ],
  200. experience: {
  201. content: {
  202. company_name: '',
  203. position_name: '',
  204. on_job_start: '',
  205. on_job_end: '',
  206. job_description: '',
  207. }
  208. },
  209. certificate: {
  210. certificate_name: '',
  211. certificate_date: '',
  212. certificate_img: [],
  213. },
  214. skills: {
  215. skills_name: '',
  216. skills_degree:'',
  217. },
  218. degreeList: [
  219. ['熟悉','掌握','精通']
  220. ],
  221. salary_show: false,
  222. birthday_show: false,
  223. work_show: false,
  224. nature_show: false,
  225. show_time1: false,
  226. show_time2: false,
  227. degree_show: false,
  228. education_show: false,
  229. certificate_show: false,
  230. newDate: Number(new Date()),
  231. minDate: new Date('1980-01-01'),
  232. id: ''
  233. }
  234. },
  235. onLoad(options) {
  236. that = this
  237. if(options.id) {
  238. that.id = options.id
  239. }
  240. console.log(that.id);
  241. that.index = options.index
  242. that.isInfo(options.index)
  243. that.getData()
  244. },
  245. onReady() {
  246. // 微信小程序需要用此写法
  247. this.$refs.datetimePicker.setFormatter(this.formatter)
  248. },
  249. methods: {
  250. // 判断要修改的信息
  251. isInfo(index) {
  252. var text = ''
  253. switch(index) {
  254. case '1' :
  255. text = '基本信息';
  256. break;
  257. case '2' :
  258. text = '求职意向';
  259. break;
  260. case '3' :
  261. text = '工作经历';
  262. break;
  263. case '4' :
  264. text = '专业技能';
  265. break;
  266. case '5' :
  267. text = '资质证书';
  268. break;
  269. }
  270. uni.setNavigationBarTitle({
  271. title: text
  272. })
  273. },
  274. getData() {
  275. var pages = getCurrentPages()
  276. var prePage = pages[pages.length - 2]
  277. that.base_info = prePage.$vm.base_info
  278. if(!that.base_info.sex) {
  279. that.base_info.sex = "女"
  280. }
  281. that.job_inte = prePage.$vm.job_inte
  282. var experienceList = prePage.$vm.experience
  283. for(var i=0;i<experienceList.length;i++) {
  284. if(that.id == experienceList[i].id) {
  285. that.experience =experienceList[i]
  286. }
  287. }
  288. console.log(that.experience);
  289. var skills = prePage.$vm.skills
  290. var certificate = prePage.$vm.certificate
  291. },
  292. // 保存
  293. save() {
  294. uni.showLoading({
  295. title: '保存中',
  296. mask:true
  297. })
  298. if(that.index == '1') {
  299. if($api.formCheck(that.base_info.avatar,"required") && $api.formCheck(that.base_info.name,"truename") && $api.formCheck(that.base_info.date_birth,"required") && $api.formCheck(that.base_info.edu,"required")
  300. && $api.formCheck(that.base_info.start_working_time,"required") && $api.formCheck(that.base_info.phone,"mobile")&& $api.formCheck(that.base_info.email,"email")) {
  301. $api.req({
  302. url: '/data/api.auth.DemandLabor/applyjob',
  303. method: 'POST',
  304. data: {
  305. type: that.index,
  306. head_img: that.base_info.avatar,
  307. real_name: that.base_info.name,
  308. sex: that.base_info.sex,
  309. date_birth: that.base_info.date_birth,
  310. schooling: that.base_info.edu,
  311. start_working_time: that.base_info.start_working_time,
  312. phone: that.base_info.phone,
  313. email: that.base_info.email
  314. }
  315. }, function(res) {
  316. uni.hideLoading()
  317. if(res.code == 1) {
  318. $api.info(res.info)
  319. $api.jump(-1)
  320. }
  321. })
  322. }
  323. }
  324. if(that.index == '2') {
  325. if($api.formCheck(that.job_inte.post,"required") && $api.formCheck(that.job_inte.work_address,"required") && $api.formCheck(that.job_inte.salary,"required")
  326. && $api.formCheck(that.job_inte.work_time,"required") && $api.formCheck(that.job_inte.work_nature,"required")) {
  327. $api.req({
  328. url: '/data/api.auth.DemandLabor/applyjob',
  329. method: 'POST',
  330. data: {
  331. type: that.index,
  332. job_application: that.job_inte.post,
  333. scope_work_area: that.job_inte.work_address,
  334. monthly_salary: that.job_inte.salary,
  335. working_time: that.job_inte.work_time,
  336. work_nature: that.job_inte.work_nature,
  337. }
  338. }, function(res) {
  339. uni.hideLoading()
  340. if(res.code == 1) {
  341. $api.info(res.info)
  342. $api.jump(-1)
  343. }
  344. })
  345. }
  346. }
  347. if(that.index == '3') {
  348. if($api.formCheck(that.experience.content.company_name,"required") && $api.formCheck(that.experience.content.position_name,"required") && $api.formCheck(that.experience.content.on_job_start,"required")
  349. && $api.formCheck(that.experience.content.on_job_end,"required") && $api.formCheck(that.experience.content.job_description,"required")) {
  350. var work_experience = {
  351. company_name: that.experience.content.company_name,
  352. position_name: that.experience.content.position_name,
  353. on_job_start: that.experience.content.on_job_start,
  354. on_job_end: that.experience.content.on_job_end,
  355. job_description: that.experience.content.job_description
  356. }
  357. work_experience = JSON.stringify(work_experience)
  358. console.log(that.id);
  359. $api.req({
  360. url: '/data/api.auth.DemandLabor/applyjob',
  361. method: 'POST',
  362. data: {
  363. type: that.index,
  364. child_id: that.id,
  365. work_experience: work_experience
  366. }
  367. }, function(res) {
  368. uni.hideLoading()
  369. if(res.code == 1) {
  370. $api.info(res.info)
  371. $api.jump(-1)
  372. }
  373. })
  374. }
  375. }
  376. if(that.index == '4') {
  377. if($api.formCheck(that.skills.skills_name,"required") && $api.formCheck(that.skills.skills_degree,"required")) {
  378. var professional_skills = {
  379. skill_name: that.skills.skills_name,
  380. degree: that.skills.skills_degree
  381. }
  382. professional_skills = JSON.stringify(professional_skills)
  383. $api.req({
  384. url: '/data/api.auth.DemandLabor/applyjob',
  385. method: 'POST',
  386. data: {
  387. type: that.index,
  388. child_id: that.id,
  389. professional_skills: professional_skills
  390. }
  391. }, function(res) {
  392. uni.hideLoading()
  393. if(res.code == 1) {
  394. $api.info(res.info)
  395. $api.jump(-1)
  396. }
  397. })
  398. }
  399. }
  400. if(that.index == '5') {
  401. if($api.formCheck(that.certificate.certificate_name,"required") && $api.formCheck(that.certificate.certificate_date,"required")) {
  402. var certificate = {
  403. certificate_name: that.certificate.certificate_name,
  404. gain_time: that.certificate.certificate_date,
  405. img: that.certificate.certificate_img[0].url
  406. }
  407. certificate = JSON.stringify(certificate)
  408. $api.req({
  409. url: '/data/api.auth.DemandLabor/applyjob',
  410. method: 'POST',
  411. data: {
  412. type: that.index,
  413. child_id: that.id,
  414. certificate: certificate
  415. }
  416. }, function(res) {
  417. uni.hideLoading()
  418. if(res.code == 1) {
  419. $api.info(res.info)
  420. $api.jump(-1)
  421. }
  422. })
  423. }
  424. }
  425. // $api.jump(-1)
  426. },
  427. // 上传头像
  428. uploadAvatar() {
  429. uni.showLoading({
  430. title: '加载中'
  431. })
  432. uni.chooseImage({
  433. count: 1, //默认9
  434. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  435. sourceType: ['album'], //从相册选择
  436. success: function (res) {
  437. console.log(res.tempFilePaths);
  438. // that.base_info.avatar = res.tempFilePaths[0]
  439. const tempFilePaths = res.tempFilePaths
  440. uni.uploadFile({
  441. url: $api.config.baseUrl + '/data/api.auth.Center/upload',
  442. filePath: tempFilePaths[0],
  443. name: 'file',
  444. header: {
  445. 'content-type': 'application/x-www-form-urlencoded',
  446. 'api-token': uni.getStorageSync('token').token?uni.getStorageSync('token').token:'',
  447. 'api-name': 'wxapp'
  448. },
  449. formData: {
  450. 'user': 'test'
  451. },
  452. success: (res) => {
  453. const data = JSON.parse(res.data)
  454. if (data.code == 1) {
  455. that.$set(that.base_info,'avatar',data.data.url)
  456. // that.base_info.avatar = data.data.url
  457. uni.hideLoading()
  458. }
  459. }
  460. });
  461. }
  462. });
  463. },
  464. // 删除图片
  465. deletePic(event) {
  466. that.certificate.certificate_img.splice(event.index, 1)
  467. },
  468. // 新增图片
  469. async afterRead(event) {
  470. uni.showLoading({
  471. title: '上传中',
  472. mask: true
  473. })
  474. // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
  475. let lists = [].concat(event.file)
  476. let imgListLen = that.certificate.certificate_img.length
  477. lists.map((item) => {
  478. that.certificate.certificate_img.push({
  479. ...item,
  480. status: 'uploading',
  481. message: '上传中'
  482. })
  483. })
  484. for (let i = 0; i < lists.length; i++) {
  485. const result = await that.uploadFilePromise(lists[i].url)
  486. let item = that.certificate.certificate_img[imgListLen]
  487. that.certificate.certificate_img.splice(imgListLen, 1, Object.assign(item, {
  488. status: 'success',
  489. message: '',
  490. url: result.url
  491. }))
  492. imgListLen++
  493. if(lists.length - 1 == i) {
  494. uni.hideLoading()
  495. }
  496. }
  497. },
  498. // 上传图片
  499. uploadFilePromise(url) {
  500. return new Promise((resolve, reject) => {
  501. let a = uni.uploadFile({
  502. url: $api.config.baseUrl + '/data/api.auth.Center/upload',
  503. filePath: url,
  504. name: 'file',
  505. header: {
  506. 'content-type': 'application/x-www-form-urlencoded',
  507. 'api-token': uni.getStorageSync('token').token?uni.getStorageSync('token').token:'',
  508. 'api-name': 'wxapp'
  509. },
  510. formData: {
  511. user: 'test'
  512. },
  513. success: (res) => {
  514. setTimeout(() => {
  515. var data = JSON.parse(res.data)
  516. resolve(data.data)
  517. }, 1000)
  518. }
  519. });
  520. })
  521. },
  522. /* // 上传图书照片
  523. uploadImg() {
  524. uni.chooseImage({
  525. count: 1, //默认9
  526. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  527. sourceType: ['album'], //从相册选择
  528. success: function (res) {
  529. console.log(res.tempFilePaths);
  530. that.certificate.certificate_img = res.tempFilePaths[0]
  531. },
  532. })
  533. }, */
  534. // 选择性别
  535. selectSex(value) {
  536. that.base_info.sex = that.sexList[value].name
  537. console.log(value);
  538. },
  539. // 打开
  540. open(e) {
  541. console.log(e);
  542. switch(e) {
  543. case 'birthday' :
  544. that.birthday_show = true;
  545. break;
  546. case 'work_date' :
  547. that.work_show = true;
  548. break;
  549. case 'salary' :
  550. that.salary_show = true;
  551. break;
  552. case 'work_nature' :
  553. that.nature_show = true;
  554. break;
  555. case 'time1' :
  556. that.show_time1 = true;
  557. break;
  558. case 'time2' :
  559. that.show_time2 = true;
  560. break;
  561. case 'skills_degree' :
  562. that.degree_show = true;
  563. break;
  564. case 'certificate_date' :
  565. that.certificate_show = true;
  566. break;
  567. case 'education' :
  568. that.education_show = true;
  569. break;
  570. }
  571. },
  572. // 格式化日期
  573. formatter(type, value) {
  574. if (type === 'year') {
  575. return `${value}年`
  576. }
  577. if (type === 'month') {
  578. return `${value}月`
  579. }
  580. if (type === 'day') {
  581. return `${value}日`
  582. }
  583. return value
  584. },
  585. // 确定选择生日
  586. confirmAge(e) {
  587. that.base_info.date_birth = $api.formatDate(e)
  588. that.cancel()
  589. },
  590. // 确定选择参加工作时间
  591. confirmWork(e) {
  592. that.base_info.start_working_time = $api.formatDate(e)
  593. that.cancel()
  594. },
  595. confirmSalary(e) {
  596. console.log(e);
  597. var index1 = e.indexs[0]
  598. var index2 = e.indexs[1]
  599. if (index1 - index2 > 2) {
  600. $api.info('请选择正确的薪资范围')
  601. } else {
  602. that.job_inte.salary = e.value[0] + '-' + e.value[1]
  603. that.cancel()
  604. }
  605. },
  606. // 选择工作性质
  607. confirmNature(e) {
  608. console.log(e);
  609. that.job_inte.work_nature = e.value[0]
  610. that.cancel()
  611. },
  612. // 选择在职时间1
  613. confirmTime1(e) {
  614. that.experience.content.on_job_start = $api.formatDate(e)
  615. that.cancel()
  616. },
  617. // 选择在职时间2
  618. confirmTime2(e) {
  619. that.experience.content.on_job_end = $api.formatDate(e)
  620. that.cancel()
  621. },
  622. // 选择技能掌握程度
  623. confirmSkill(e) {
  624. that.skills.skills_degree = e.value[0]
  625. that.cancel()
  626. },
  627. // 选择证书获得时间
  628. confirmDate(e) {
  629. that.certificate.certificate_date = $api.formatDate(e)
  630. that.cancel()
  631. },
  632. /* // 选择学历
  633. changeHandler(e) {
  634. const {
  635. columnIndex,
  636. value,
  637. values, // values为当前变化列的数组内容
  638. index,
  639. // 微信小程序无法将picker实例传出来,只能通过ref操作
  640. picker = this.$refs.uPicker
  641. } = e
  642. console.log(e);
  643. // 当第一列值发生变化时,变化第二列(后一列)对应的选项
  644. if (e.index == 3 || e.index == 4) {
  645. // picker为选择器this实例,变化第二列对应的选项
  646. console.log(this.educationList2);
  647. picker.setColumnValues(1, this.educationList2[0])
  648. }
  649. }, */
  650. // 选择学历
  651. confirmEdu(e) {
  652. console.log(e);
  653. if(e.indexs.length > 1) {
  654. that.base_info.edu = e.value[0]
  655. } else {
  656. that.base_info.edu = e.value[0]
  657. }
  658. that.cancel()
  659. },
  660. // 关闭选择器
  661. cancel() {
  662. that.birthday_show = false
  663. that.work_show = false
  664. that.salary_show = false
  665. that.nature_show = false
  666. that.show_time1 = false
  667. that.show_time2 = false
  668. that.degree_show = false
  669. that.certificate_show = false
  670. that.education_show = false
  671. },
  672. },
  673. }
  674. </script>
  675. <style lang="scss" scoped>
  676. .content {
  677. background: #F4F4F4;
  678. padding: 20rpx 30rpx 0;
  679. .box {
  680. width: 100%;
  681. background: #FFFFFF;
  682. border-radius: 20rpx;
  683. box-sizing: border-box;
  684. padding: 30rpx 20rpx;
  685. .cell {
  686. width: 100%;
  687. padding: 28rpx 0;
  688. border-bottom: 1rpx solid #F4F4F4;
  689. .label {
  690. font-size: 26rpx;
  691. font-weight: 400;
  692. color: #888888;
  693. padding-bottom: 28rpx;
  694. margin-right: 14rpx;
  695. }
  696. .label_img {
  697. width: 20rpx;
  698. height: 20rpx;
  699. margin: 0 4rpx 0 14rpx;
  700. }
  701. .label2 {
  702. font-size: 20rpx;
  703. font-weight: 400;
  704. color: #B1B1B1;
  705. }
  706. .upload {
  707. width: 200rpx;
  708. height: 200rpx;
  709. background: #F5F5F5;
  710. border-radius: 20rpx;
  711. .text_style1 {
  712. margin-top: 18rpx;
  713. font-size: 24rpx;
  714. font-weight: 400;
  715. color: #ADADAD;
  716. }
  717. }
  718. }
  719. .cell:nth-last-child(1) {
  720. border: none;
  721. }
  722. }
  723. .save {
  724. width: 100%;
  725. height: 84rpx;
  726. background: #506DFF;
  727. border-radius: 42rpx;
  728. font-size: 36rpx;
  729. text-align: center;
  730. margin: 56rpx auto;
  731. font-weight: 500;
  732. color: #FFFFFF;
  733. line-height: 84rpx;
  734. }
  735. }
  736. </style>