myJobInformation.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  1. <template>
  2. <view>
  3. <u-navbar back-text="求职信息" back-icon-size="28" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <view class="main">
  6. <!-- 个人信息 -->
  7. <view class="person-infos">
  8. <view class="infos">
  9. <view class="name" v-if="userInfo.status==1">
  10. {{userInfo.realName?userInfo.realName:'实名认证后生效'}}
  11. </view>
  12. <view class="name" v-if="userInfo.status==0" style=" font-size: 36rpx;color: #4CAF50;">
  13. 实名认证后生效
  14. <view style=" font-size: 24rpx;color: #4CAF50;" >
  15. 生效后可以进行简历投递,可以被企业邀请等
  16. </view>
  17. </view>
  18. <view class="gender-age" v-if="userInfo.status==1">
  19. <text class="text">{{userInfo.gender==1?'男':'女'}}</text>|
  20. <text class="text">{{userInfo.age}}岁</text>|
  21. <text class="text">简历状态</text>
  22. <text style="color:chocolate" v-if="formData.status==0">[审批中]</text>
  23. <text style="color: #4CAF50;" v-else-if="formData.status==1">[生效]</text>
  24. <text v-else >[未创建]</text>
  25. </view>
  26. </view>
  27. <view class="photo" @click="uploadPhoto">
  28. <u-avatar :src="src" size="120" mode="circle"></u-avatar>
  29. <img class="camera" src="@/assets/img/riFill-camera-fill Copy@1x.png" alt="">
  30. </view>
  31. </view>
  32. <u-select v-model="show" value-name="value" label-name="name"
  33. :list="list" @confirm="confirm"></u-select>
  34. <!-- 信息填写 -->
  35. <view class="information-group">
  36. <!-- 联系电话 -->
  37. <view class="item">
  38. <view class="title">
  39. 联系电话
  40. </view>
  41. <view class="input">
  42. {{tel}}
  43. </view>
  44. </view>
  45. <!-- 意向行业 -->
  46. <view class="item">
  47. <view class="title">
  48. 意向行业<text>*</text>
  49. </view>
  50. <view class="input" >
  51. <u-input type="select" v-model="intendedIndustries" @click="popupShow=true" readonly placeholder="请选择意向行业"></u-input>
  52. </view>
  53. </view>
  54. <!--意向岗位 -->
  55. <view class="item">
  56. <view class="title">
  57. 意向岗位<text>*</text>
  58. </view>
  59. <view class="input">
  60. <u-input type="text" v-model="formData.intendedPosition"
  61. placeholder="请填写想找的工作岗位"></u-input>
  62. </view>
  63. </view>
  64. <!-- 结算方式 -->
  65. <view class="item">
  66. <view class="title">
  67. 结算方式<text>*</text>
  68. </view>
  69. <view class="input">
  70. <u-input type="select" v-model="method"
  71. @click="showselect(1)" placeholder="请选择结算方式"></u-input>
  72. </view>
  73. </view>
  74. <!-- 期望薪资 -->
  75. <view class="item">
  76. <view class="title">
  77. 期望薪资<text>*</text>
  78. </view>
  79. <view class="input2">
  80. <u-input type="number" v-model="formData.hopeSalary"
  81. placeholder="请填写期望薪资"></u-input>
  82. </view>
  83. <view class="unit">
  84. {{getUnit(formData)}}
  85. </view>
  86. </view>
  87. <!-- 工作经验 -->
  88. <view class="item" v-if="false">
  89. <view class="title">
  90. 工作经验
  91. </view>
  92. <view class="input">
  93. <u-input type="select" v-model="workExperience"
  94. @click="showselect(2)" placeholder="请选择工作经验"></u-input>
  95. </view>
  96. </view>
  97. <!-- 学历 -->
  98. <view class="item">
  99. <view class="title">
  100. 学历
  101. </view>
  102. <view class="input">
  103. <u-input type="select" v-model="education"
  104. @click="showselect(3)" placeholder="请选择学历"></u-input>
  105. </view>
  106. </view>
  107. <!--意向岗位 -->
  108. <view class="item">
  109. <view class="title">
  110. 现居住地
  111. </view>
  112. <view class="input">
  113. <u-input type="text" v-model="formData.address"
  114. placeholder="请填写您的现居住地"></u-input>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="service-description">
  120. <view class="title">
  121. <text>*</text>个人简介
  122. </view>
  123. <textarea class="textarea" v-model="formData.serviceDesc"
  124. placeholder="请填写您的个人简历,如工作年限/工作经历/擅长技能等,有助于您更快、更准确的找到工作。"></textarea>
  125. </view>
  126. <button class="save" @click="submit"
  127. type="default">
  128. <span v-if="formData.status==0">提交修改</span>
  129. <span v-else-if="formData.status==1">提交修改</span>
  130. <span v-else >提交审批</span>
  131. </button>
  132. <!-- 筛选框 -->
  133. <u-popup v-model="popupShow" @open="popupShowOpen" mode="bottom" border-radius="20" :closeable="true">
  134. <view class="popup-content">
  135. <view class="headline">
  136. 筛选
  137. </view>
  138. <!-- 行业 -->
  139. <view class="industry">
  140. <view class="title">
  141. <u-search v-model="querypop"></u-search>
  142. <view>意向行业 <span style="color: #4696f6;">{{isChecked!=-1?'已选中:'+industryList[isChecked].name:''}}</span> (向下拉可滑动)</view>
  143. </view>
  144. <!-- 选项 -->
  145. <scroll-view class="scrollview" scroll-y="true" style="height: 620rpx;">
  146. <view class="options">
  147. <view
  148. :class="{item,checked:isChecked==index}" v-for="(item,index) in industryList"
  149. v-show="item.name.indexOf(querypop)!=-1"
  150. :key="index"
  151. @click="changeChecked(index)">
  152. <!-- 快递跑腿/配送/分拣 -->{{item.name}}
  153. </view>
  154. </view>
  155. </scroll-view>
  156. </view>
  157. <!-- 结算方式 -->
  158. <view class="clearing-form" v-if="false">
  159. <view class="title">
  160. 结算方式
  161. </view>
  162. <!-- 选项 -->
  163. <view class="options">
  164. <view :class="{item,checked:wayChecked==index}" v-for="(item,index) in wayList" :key="index"
  165. @click="changeWayChecked(index)">
  166. {{item.name}}
  167. </view>
  168. </view>
  169. </view>
  170. <!-- 薪资形式 -->
  171. <view class="salary-form" v-if="false">
  172. <view class="title">
  173. 薪资形式
  174. </view>
  175. <!-- 选项 -->
  176. <view class="options ">
  177. <view :class="{item,checked:saralyChecked==index}" v-for="(item,index) in salaryList"
  178. :key="index" @click="changeSaralyChecked(index)">
  179. {{item.name}}
  180. </view>
  181. </view>
  182. </view>
  183. <view class="button">
  184. <button class="reset" @click="reset()">重置</button>
  185. <button class="confirm" @click="queryBtn()" >确认</button>
  186. </view>
  187. </view>
  188. </u-popup>
  189. </view>
  190. </template>
  191. <script>
  192. import * as API_weixin from '@/apis/weixin.js'
  193. import * as API from '@/apis/pagejs/packages.js'
  194. export default {
  195. data() {
  196. return {
  197. querypop:"",
  198. popupShow: false,
  199. isChecked: -1,
  200. industryList: [
  201. ],
  202. src: '',
  203. tel: '15011110000',
  204. show: false,
  205. list: [],
  206. formData:{
  207. id:"",
  208. intendedIndustries:"",
  209. intendedPosition:"",
  210. hopeSalary:"",
  211. method:"",
  212. workExperience:"",
  213. education:"",
  214. serviceDesc:"",
  215. photo:"",
  216. },
  217. intendedIndustries:"",
  218. method:"",
  219. workExperience:"",
  220. education:"",
  221. sqlList:[[],[],[],[],[],[],[]],
  222. valueList:[-1,-1,-1,-1,-1,-1],
  223. selectIndex:0,
  224. form: {},
  225. userInfo:{}
  226. }
  227. },
  228. onLoad(){
  229. this.userInfo=this.carhelp.getPersonInfo()
  230. this.tel=this.userInfo.phone
  231. this.myJobHunt()
  232. },
  233. methods: {
  234. reset() {
  235. this.isChecked = -1;
  236. },
  237. queryBtn(){
  238. this.formData.intendedIndustries=this.industryList[this.isChecked].value
  239. this.intendedIndustries=this.industryList[this.isChecked].name
  240. this.popupShow=false;
  241. },
  242. changeChecked(index) {
  243. this.isChecked = index;
  244. },
  245. popupShowOpen(){
  246. if(this.industryList.length==0){
  247. uni.showLoading({
  248. title: "加载中",
  249. mask: true,
  250. })
  251. API_weixin.findListByCatalogName({
  252. name:'意向行业',
  253. }).then((res) => {
  254. uni.hideLoading();
  255. this.industryList=res.data.dictionaryList
  256. }).catch(error => {
  257. uni.showToast({icon: 'none',
  258. title: error
  259. })
  260. //this.getPhone()
  261. })
  262. }
  263. },
  264. myJobHunt(){
  265. uni.showLoading({
  266. title: "加载中",
  267. mask: true,
  268. })
  269. API.myJobHunt().then((res) => {
  270. uni.hideLoading()
  271. if(res.data.jobInformationInfo){
  272. this.formData = res.data.jobInformationInfo;
  273. var name=["intendedIndustries","method",
  274. "workExperience","education",]
  275. for(var i in name){
  276. //.log(name[i]+'N')
  277. var test=this.formData[(name[i]+'N')]
  278. this[name[i]]=test?test:''
  279. }
  280. this.src= this.formData.photo
  281. }
  282. }).catch(error => {
  283. uni.showToast({icon: 'none',
  284. title: error,
  285. icon: "none"
  286. })
  287. })
  288. },
  289. submit(){
  290. if(!this.formData.intendedIndustries){
  291. uni.showToast({icon: 'none',
  292. title: "请选择意向行业"
  293. })
  294. return
  295. }
  296. if(!this.formData.intendedPosition){
  297. uni.showToast({icon: 'none',
  298. title: "请填写想找的工作岗位"
  299. })
  300. return
  301. }
  302. if(!this.formData.method){
  303. uni.showToast({icon: 'none',
  304. title: "请选择结算方式"
  305. })
  306. return
  307. }
  308. if(!this.formData.hopeSalary){
  309. uni.showToast({icon: 'none',
  310. title: "请填写期望薪资"
  311. })
  312. return
  313. }
  314. if(!this.formData.serviceDesc){
  315. uni.showToast({icon: 'none',
  316. title: "请描述您能提供哪些服务"
  317. })
  318. return
  319. }
  320. uni.showLoading({
  321. title: "加载中",
  322. mask: true,
  323. })
  324. this.formData.photo=this.src
  325. API.createJobHunt(this.formData).then((res) => {
  326. uni.hideLoading();
  327. uni.showModal({
  328. title: '提示',
  329. content: '简历审批中,请耐心等待',
  330. showCancel:false,
  331. success: function (res) {
  332. if (res.confirm) {
  333. uni.navigateBack()
  334. } else if (res.cancel) {
  335. //.log('用户点击取消');
  336. }
  337. }
  338. });
  339. }).catch(error => {
  340. uni.showToast({icon: 'none',
  341. title: error
  342. })
  343. //this.getPhone()
  344. })
  345. },
  346. showselect(k){
  347. this.selectIndex=k;
  348. if(this.sqlList[k].length==0){
  349. var name=['意向行业','结算方式','工作经验','学历']
  350. uni.showLoading({
  351. title: "加载中",
  352. mask: true,
  353. })
  354. API_weixin.findListByCatalogName({
  355. name:name[k],
  356. }).then((res) => {
  357. uni.hideLoading();
  358. this.sqlList[k]=res.data.dictionaryList
  359. this.list=this.sqlList[k];
  360. this.show= true
  361. }).catch(error => {
  362. uni.showToast({icon: 'none',
  363. title: error
  364. })
  365. //this.getPhone()
  366. })
  367. }else{
  368. this.list=this.sqlList[k];
  369. this.show= true
  370. }
  371. },
  372. saveRecordConfirmMethod(fileData) {
  373. var token = this.carhelp.getToken()
  374. uni.uploadFile({
  375. url: process.car.BASE_URL + "uploadPicture", //仅为示例,非真实的接口地址
  376. filePath:fileData,
  377. header: {
  378. 'Authorization': token,
  379. //'Content-Type': 'multipart/form-data',
  380. 'X-Requested-With': 'XMLHttpRequest',
  381. // 'content-type': 'multipart/form-data'
  382. },
  383. name: 'photoFile',
  384. formData: {
  385. subFolder: "headimg"
  386. },
  387. success: (uploadFileRes) => {
  388. var obj = JSON.parse(uploadFileRes.data)
  389. //.log(obj);
  390. this.src = obj.data;
  391. // uni.hideLoading();
  392. }
  393. });
  394. },
  395. confirm(e) {
  396. this.show = false;
  397. var name=["intendedIndustries","method",
  398. "workExperience","education",]
  399. this[name[this.selectIndex]]=e[0].label
  400. this.formData[name[this.selectIndex]]=e[0].value
  401. //.log(e)
  402. },
  403. uploadPhoto() {
  404. let _self = this;
  405. const crop = {
  406. quality: 100,
  407. width: 600,
  408. height: 600,
  409. resize: true
  410. };
  411. // 上传图片
  412. uni.chooseImage({
  413. count: 1,
  414. crop,
  415. success: async (res) => {
  416. //(res);
  417. let tempFile = res.tempFiles[0];
  418. var filePath = res.tempFilePaths[0]
  419. let fileData = await new Promise((callback) => {
  420. uni.navigateTo({
  421. url: './cropImage?path=' + filePath +
  422. `&options=${JSON.stringify(crop)}`,
  423. animationType: "fade-in",
  424. events: {
  425. success: url => {
  426. callback(url)
  427. }
  428. }
  429. });
  430. })
  431. this.saveRecordConfirmMethod(fileData);
  432. }
  433. });
  434. },
  435. }
  436. }
  437. </script>
  438. <style>
  439. page {
  440. background: #F0F0F2;
  441. padding-bottom: 150px;
  442. }
  443. </style>
  444. <style lang="scss" scoped>
  445. .main {
  446. margin: 24rpx 32rpx;
  447. background-color: #fff;
  448. padding: 40rpx 32rpx 0;
  449. border-radius: 12px;
  450. .person-infos {
  451. display: flex;
  452. justify-content: space-between;
  453. .infos {
  454. .name {
  455. color: rgba(51, 51, 51, 1);
  456. font-size: 20px;
  457. font-family: 'PingFangSC-medium';
  458. }
  459. .gender-age {
  460. color: rgba(119, 119, 119, 1);
  461. margin-top: 8rpx;
  462. .text {
  463. margin: 0 8rpx;
  464. }
  465. .text:nth-of-type(1) {
  466. margin-left: 0;
  467. }
  468. }
  469. }
  470. .photo {
  471. position: relative;
  472. img {
  473. width: 60px;
  474. height: 60px;
  475. }
  476. .camera {
  477. width: 48rpx;
  478. height: 48rpx;
  479. position: absolute;
  480. top: 36rpx;
  481. left: 36rpx;
  482. z-index: 999;
  483. }
  484. }
  485. }
  486. .information-group {
  487. .item {
  488. display: flex;
  489. align-items: center;
  490. padding: 12rpx 0;
  491. border-bottom: 1px solid #f1f1f1;
  492. .title {
  493. color: rgba(51, 51, 51, 1);
  494. font-size: 32rpx;
  495. width: 150rpx;
  496. text {
  497. color: #FF0000;
  498. }
  499. }
  500. .input2 {
  501. width: 360rpx;
  502. margin-left: 24rpx;
  503. /deep/.uni-input-input {
  504. color: rgba(51, 51, 51, 1);
  505. }
  506. }
  507. .input {
  508. width: 460rpx;
  509. margin-left: 24rpx;
  510. /deep/.uni-input-input {
  511. color: rgba(51, 51, 51, 1);
  512. }
  513. }
  514. .icon {
  515. margin-left: auto;
  516. }
  517. .unit {
  518. margin-left: auto;
  519. color: #333333;
  520. font-size: 24rpx;
  521. }
  522. }
  523. }
  524. }
  525. // 服务描述
  526. .service-description {
  527. margin: 24rpx 32rpx;
  528. background-color: #fff;
  529. border-radius: 12px;
  530. padding: 24rpx 32rpx;
  531. .title {
  532. color: #333333;
  533. font-size: 18px;
  534. font-family: 'PingFangSC-medium';
  535. }
  536. text {
  537. color: #FF0000;
  538. }
  539. .textarea {
  540. margin-top: 24rpx;
  541. line-height: 40rpx;
  542. width: 100%;
  543. height: 240rpx;
  544. }
  545. }
  546. .save {
  547. background-color: rgba(34, 149, 255, 1);
  548. color: rgba(241, 241, 241, 1);
  549. font-size: 18px;
  550. height: 96rpx;
  551. line-height: 96rpx;
  552. border-radius: 50px;
  553. position: fixed;
  554. left: 32rpx;
  555. right: 32rpx;
  556. bottom: 20rpx;
  557. z-index: 999;
  558. }
  559. // 筛选框
  560. .popup-content {
  561. padding: 32rpx;
  562. .headline {
  563. color: #101010;
  564. font-size: 40rpx;
  565. text-align: center;
  566. }
  567. //行业
  568. .industry,
  569. .clearing-form,
  570. .salary-form {
  571. margin-top: 16rpx;
  572. .title {
  573. font-size: 32rpx;
  574. color: #111111;
  575. }
  576. // 选项
  577. .options {
  578. display: flex;
  579. justify-content: space-between;
  580. flex-wrap: wrap;
  581. margin-top: 24rpx;
  582. .item {
  583. height: 56rpx;
  584. line-height: 56rpx;
  585. min-width: 210rpx;
  586. text-align: center;
  587. margin-bottom: 16rpx;
  588. margin-right: 16rpx;
  589. color: #999999;
  590. background-color: #F3F3F4;
  591. border-radius: 4px;
  592. }
  593. .checked {
  594. background-color: #2795FD;
  595. color: #fff;
  596. }
  597. }
  598. }
  599. .button {
  600. display: flex;
  601. margin-top: 8rpx;
  602. .reset:after{
  603. border:0
  604. }
  605. .reset {
  606. color: #999999;
  607. background-color: #F3F3F4;
  608. width: 200rpx;
  609. height: 72rpx;
  610. line-height: 72rpx;
  611. border-radius: 8px;
  612. }
  613. .confirm {
  614. width: 440rpx;
  615. background-color: #2795FD;
  616. color: #fff;
  617. height: 72rpx;
  618. line-height: 72rpx;
  619. border-radius: 8px;
  620. }
  621. }
  622. }
  623. .salary-form,
  624. .clearing-form {
  625. .options {
  626. justify-content: start !important;
  627. }
  628. .item {
  629. margin-right: 24rpx;
  630. }
  631. }
  632. .scrollview{
  633. border: 1px #101010 dashed;
  634. }
  635. </style>