myJobInformation.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  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: 420rpx;">
  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. this[name[i]]=this.formData[(name[i]+'N')]
  278. }
  279. this.src= this.formData.photo
  280. }
  281. }).catch(error => {
  282. uni.showToast({icon: 'none',
  283. title: error,
  284. icon: "none"
  285. })
  286. })
  287. },
  288. submit(){
  289. if(!this.formData.intendedIndustries){
  290. uni.showToast({icon: 'none',
  291. title: "请选择意向行业"
  292. })
  293. return
  294. }
  295. if(!this.formData.intendedPosition){
  296. uni.showToast({icon: 'none',
  297. title: "请填写想找的工作岗位"
  298. })
  299. return
  300. }
  301. if(!this.formData.method){
  302. uni.showToast({icon: 'none',
  303. title: "请选择结算方式"
  304. })
  305. return
  306. }
  307. if(!this.formData.hopeSalary){
  308. uni.showToast({icon: 'none',
  309. title: "请填写期望薪资"
  310. })
  311. return
  312. }
  313. if(!this.formData.serviceDesc){
  314. uni.showToast({icon: 'none',
  315. title: "请描述您能提供哪些服务"
  316. })
  317. return
  318. }
  319. uni.showLoading({
  320. title: "加载中",
  321. mask: true,
  322. })
  323. this.formData.photo=this.src
  324. API.createJobHunt(this.formData).then((res) => {
  325. uni.hideLoading();
  326. uni.showModal({
  327. title: '提示',
  328. content: '简历审批中,请耐心等待',
  329. showCancel:false,
  330. success: function (res) {
  331. if (res.confirm) {
  332. uni.navigateBack()
  333. } else if (res.cancel) {
  334. //.log('用户点击取消');
  335. }
  336. }
  337. });
  338. }).catch(error => {
  339. uni.showToast({icon: 'none',
  340. title: error
  341. })
  342. //this.getPhone()
  343. })
  344. },
  345. showselect(k){
  346. this.selectIndex=k;
  347. if(this.sqlList[k].length==0){
  348. var name=['意向行业','结算方式','工作经验','学历']
  349. uni.showLoading({
  350. title: "加载中",
  351. mask: true,
  352. })
  353. API_weixin.findListByCatalogName({
  354. name:name[k],
  355. }).then((res) => {
  356. uni.hideLoading();
  357. this.sqlList[k]=res.data.dictionaryList
  358. this.list=this.sqlList[k];
  359. this.show= true
  360. }).catch(error => {
  361. uni.showToast({icon: 'none',
  362. title: error
  363. })
  364. //this.getPhone()
  365. })
  366. }else{
  367. this.list=this.sqlList[k];
  368. this.show= true
  369. }
  370. },
  371. saveRecordConfirmMethod(fileData) {
  372. var token = this.carhelp.getToken()
  373. uni.uploadFile({
  374. url: process.car.BASE_URL + "uploadPicture", //仅为示例,非真实的接口地址
  375. filePath:fileData,
  376. header: {
  377. 'Authorization': token,
  378. //'Content-Type': 'multipart/form-data',
  379. 'X-Requested-With': 'XMLHttpRequest',
  380. // 'content-type': 'multipart/form-data'
  381. },
  382. name: 'photoFile',
  383. formData: {
  384. subFolder: "headimg"
  385. },
  386. success: (uploadFileRes) => {
  387. var obj = JSON.parse(uploadFileRes.data)
  388. //.log(obj);
  389. this.src = obj.data;
  390. // uni.hideLoading();
  391. }
  392. });
  393. },
  394. confirm(e) {
  395. this.show = false;
  396. var name=["intendedIndustries","method",
  397. "workExperience","education",]
  398. this[name[this.selectIndex]]=e[0].label
  399. this.formData[name[this.selectIndex]]=e[0].value
  400. //.log(e)
  401. },
  402. uploadPhoto() {
  403. let _self = this;
  404. const crop = {
  405. quality: 100,
  406. width: 600,
  407. height: 600,
  408. resize: true
  409. };
  410. // 上传图片
  411. uni.chooseImage({
  412. count: 1,
  413. crop,
  414. success: async (res) => {
  415. //(res);
  416. let tempFile = res.tempFiles[0];
  417. var filePath = res.tempFilePaths[0]
  418. let fileData = await new Promise((callback) => {
  419. uni.navigateTo({
  420. url: './cropImage?path=' + filePath +
  421. `&options=${JSON.stringify(crop)}`,
  422. animationType: "fade-in",
  423. events: {
  424. success: url => {
  425. callback(url)
  426. }
  427. }
  428. });
  429. })
  430. this.saveRecordConfirmMethod(fileData);
  431. }
  432. });
  433. },
  434. }
  435. }
  436. </script>
  437. <style>
  438. page {
  439. background: #F0F0F2;
  440. padding-bottom: 150px;
  441. }
  442. </style>
  443. <style lang="scss" scoped>
  444. .main {
  445. margin: 24rpx 32rpx;
  446. background-color: #fff;
  447. padding: 40rpx 32rpx 0;
  448. border-radius: 12px;
  449. .person-infos {
  450. display: flex;
  451. justify-content: space-between;
  452. .infos {
  453. .name {
  454. color: rgba(51, 51, 51, 1);
  455. font-size: 20px;
  456. font-family: 'PingFangSC-medium';
  457. }
  458. .gender-age {
  459. color: rgba(119, 119, 119, 1);
  460. margin-top: 8rpx;
  461. .text {
  462. margin: 0 8rpx;
  463. }
  464. .text:nth-of-type(1) {
  465. margin-left: 0;
  466. }
  467. }
  468. }
  469. .photo {
  470. position: relative;
  471. img {
  472. width: 60px;
  473. height: 60px;
  474. }
  475. .camera {
  476. width: 48rpx;
  477. height: 48rpx;
  478. position: absolute;
  479. top: 36rpx;
  480. left: 36rpx;
  481. z-index: 999;
  482. }
  483. }
  484. }
  485. .information-group {
  486. .item {
  487. display: flex;
  488. align-items: center;
  489. padding: 12rpx 0;
  490. border-bottom: 1px solid #f1f1f1;
  491. .title {
  492. color: rgba(51, 51, 51, 1);
  493. font-size: 32rpx;
  494. width: 150rpx;
  495. text {
  496. color: #FF0000;
  497. }
  498. }
  499. .input2 {
  500. width: 360rpx;
  501. margin-left: 24rpx;
  502. /deep/.uni-input-input {
  503. color: rgba(51, 51, 51, 1);
  504. }
  505. }
  506. .input {
  507. width: 460rpx;
  508. margin-left: 24rpx;
  509. /deep/.uni-input-input {
  510. color: rgba(51, 51, 51, 1);
  511. }
  512. }
  513. .icon {
  514. margin-left: auto;
  515. }
  516. .unit {
  517. margin-left: auto;
  518. color: #333333;
  519. font-size: 24rpx;
  520. }
  521. }
  522. }
  523. }
  524. // 服务描述
  525. .service-description {
  526. margin: 24rpx 32rpx;
  527. background-color: #fff;
  528. border-radius: 12px;
  529. padding: 24rpx 32rpx;
  530. .title {
  531. color: #333333;
  532. font-size: 18px;
  533. font-family: 'PingFangSC-medium';
  534. }
  535. text {
  536. color: #FF0000;
  537. }
  538. .textarea {
  539. margin-top: 24rpx;
  540. line-height: 40rpx;
  541. width: 100%;
  542. height: 240rpx;
  543. }
  544. }
  545. .save {
  546. background-color: rgba(34, 149, 255, 1);
  547. color: rgba(241, 241, 241, 1);
  548. font-size: 18px;
  549. height: 96rpx;
  550. line-height: 96rpx;
  551. border-radius: 50px;
  552. position: fixed;
  553. left: 32rpx;
  554. right: 32rpx;
  555. bottom: 20rpx;
  556. z-index: 999;
  557. }
  558. // 筛选框
  559. .popup-content {
  560. padding: 32rpx;
  561. .headline {
  562. color: #101010;
  563. font-size: 40rpx;
  564. text-align: center;
  565. }
  566. //行业
  567. .industry,
  568. .clearing-form,
  569. .salary-form {
  570. margin-top: 16rpx;
  571. .title {
  572. font-size: 32rpx;
  573. color: #111111;
  574. }
  575. // 选项
  576. .options {
  577. display: flex;
  578. justify-content: space-between;
  579. flex-wrap: wrap;
  580. margin-top: 24rpx;
  581. .item {
  582. height: 56rpx;
  583. line-height: 56rpx;
  584. min-width: 210rpx;
  585. text-align: center;
  586. margin-bottom: 16rpx;
  587. margin-right: 16rpx;
  588. color: #999999;
  589. background-color: #F3F3F4;
  590. border-radius: 4px;
  591. }
  592. .checked {
  593. background-color: #2795FD;
  594. color: #fff;
  595. }
  596. }
  597. }
  598. .button {
  599. display: flex;
  600. margin-top: 8rpx;
  601. .reset:after{
  602. border:0
  603. }
  604. .reset {
  605. color: #999999;
  606. background-color: #F3F3F4;
  607. width: 200rpx;
  608. height: 72rpx;
  609. line-height: 72rpx;
  610. border-radius: 8px;
  611. }
  612. .confirm {
  613. width: 440rpx;
  614. background-color: #2795FD;
  615. color: #fff;
  616. height: 72rpx;
  617. line-height: 72rpx;
  618. border-radius: 8px;
  619. }
  620. }
  621. }
  622. .salary-form,
  623. .clearing-form {
  624. .options {
  625. justify-content: start !important;
  626. }
  627. .item {
  628. margin-right: 24rpx;
  629. }
  630. }
  631. .scrollview{
  632. border: 1px #101010 dashed;
  633. }
  634. </style>