myJobInformation.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  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">女</text>|
  20. <text class="text">28</text>
  21. </view>
  22. </view>
  23. <view class="photo" @click="uploadPhoto">
  24. <u-avatar :src="src" size="120" mode="circle"></u-avatar>
  25. <img class="camera" src="@/assets/img/riFill-camera-fill Copy@1x.png" alt="">
  26. </view>
  27. </view>
  28. <u-select v-model="show" value-name="value" label-name="name"
  29. :list="list" @confirm="confirm"></u-select>
  30. <!-- 信息填写 -->
  31. <view class="information-group">
  32. <!-- 联系电话 -->
  33. <view class="item">
  34. <view class="title">
  35. 联系电话
  36. </view>
  37. <view class="input">
  38. {{tel}}
  39. </view>
  40. </view>
  41. <!-- 意向行业 -->
  42. <view class="item">
  43. <view class="title">
  44. 意向行业
  45. </view>
  46. <view class="input">
  47. <u-input type="select" v-model="intendedIndustries" @click="showselect(0)" placeholder="请选择意向行业"></u-input>
  48. </view>
  49. </view>
  50. <!--意向岗位 -->
  51. <view class="item">
  52. <view class="title">
  53. 意向岗位
  54. </view>
  55. <view class="input">
  56. <u-input type="text" v-model="formData.intendedPosition"
  57. placeholder="请填写想找的工作岗位"></u-input>
  58. </view>
  59. </view>
  60. <!-- 期望薪资 -->
  61. <view class="item">
  62. <view class="title">
  63. 期望薪资
  64. </view>
  65. <view class="input2">
  66. <u-input type="number" v-model="formData.hopeSalary"
  67. placeholder="请填写期望薪资"></u-input>
  68. </view>
  69. <view class="unit">
  70. 元/天
  71. </view>
  72. </view>
  73. <!-- 结算方式 -->
  74. <view class="item">
  75. <view class="title">
  76. 结算方式
  77. </view>
  78. <view class="input">
  79. <u-input type="select" v-model="method"
  80. @click="showselect(1)" placeholder="请选择结算方式"></u-input>
  81. </view>
  82. </view>
  83. <!-- 工作经验 -->
  84. <view class="item">
  85. <view class="title">
  86. 工作经验
  87. </view>
  88. <view class="input">
  89. <u-input type="select" v-model="workExperience"
  90. @click="showselect(2)" placeholder="请选择工作经验"></u-input>
  91. </view>
  92. </view>
  93. <!-- 学历 -->
  94. <view class="item">
  95. <view class="title">
  96. 学历
  97. </view>
  98. <view class="input">
  99. <u-input type="select" v-model="education"
  100. @click="showselect(3)" placeholder="请选择学历"></u-input>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="service-description">
  106. <view class="title">
  107. <text>*</text>服务描述
  108. </view>
  109. <textarea class="textarea" v-model="formData.serviceDesc"
  110. placeholder="请描述您能提供哪些服务,或者是您擅长的,有助于您更快、更准确的找到工作。"></textarea>
  111. </view>
  112. <button class="save" @click="submit"
  113. type="default">保存</button>
  114. </view>
  115. </template>
  116. <script>
  117. import * as API_weixin from '@/apis/weixin.js'
  118. import * as API from '@/apis/pagejs/packages.js'
  119. export default {
  120. data() {
  121. return {
  122. src: '',
  123. tel: '15011110000',
  124. show: false,
  125. list: [],
  126. formData:{
  127. id:"",
  128. intendedIndustries:"",
  129. intendedPosition:"",
  130. hopeSalary:"",
  131. method:"",
  132. workExperience:"",
  133. education:"",
  134. serviceDesc:"",
  135. photo:"",
  136. },
  137. intendedIndustries:"",
  138. method:"",
  139. workExperience:"",
  140. education:"",
  141. sqlList:[[],[],[],[],[],[],[]],
  142. valueList:[-1,-1,-1,-1,-1,-1],
  143. selectIndex:0,
  144. form: {},
  145. userInfo:{}
  146. }
  147. },
  148. onLoad(){
  149. this.userInfo=this.carhelp.getPersonInfo()
  150. this.tel=this.userInfo.phone
  151. this.myJobHunt()
  152. },
  153. methods: {
  154. myJobHunt(){
  155. uni.showLoading({
  156. title: "加载中",
  157. mask: true,
  158. })
  159. API.myJobHunt().then((res) => {
  160. uni.hideLoading()
  161. if(res.data.jobInformationInfo){
  162. this.formData = res.data.jobInformationInfo;
  163. var name=["intendedIndustries","method",
  164. "workExperience","education",]
  165. for(var i in name){
  166. console.log(name[i]+'N')
  167. this[name[i]]=this.formData[(name[i]+'N')]
  168. }
  169. this.src= this.formData.photo
  170. }
  171. }).catch(error => {
  172. uni.showToast({
  173. title: error,
  174. icon: "none"
  175. })
  176. })
  177. },
  178. submit(){
  179. uni.showLoading({
  180. title: "加载中",
  181. mask: true,
  182. })
  183. this.formData.photo=this.src
  184. API.createJobHunt(this.formData).then((res) => {
  185. uni.hideLoading();
  186. uni.showModal({
  187. title: '提示',
  188. content: '操作成功',
  189. showCancel:false,
  190. success: function (res) {
  191. if (res.confirm) {
  192. uni.navigateBack()
  193. } else if (res.cancel) {
  194. console.log('用户点击取消');
  195. }
  196. }
  197. });
  198. }).catch(error => {
  199. uni.showToast({
  200. title: error
  201. })
  202. //this.getPhone()
  203. })
  204. },
  205. showselect(k){
  206. this.selectIndex=k;
  207. if(this.sqlList[k].length==0){
  208. var name=['意向行业','结算方式','工作经验','学历']
  209. uni.showLoading({
  210. title: "加载中",
  211. mask: true,
  212. })
  213. API_weixin.findListByCatalogName({
  214. name:name[k],
  215. }).then((res) => {
  216. uni.hideLoading();
  217. this.sqlList[k]=res.data.dictionaryList
  218. this.list=this.sqlList[k];
  219. this.show= true
  220. }).catch(error => {
  221. uni.showToast({
  222. title: error
  223. })
  224. //this.getPhone()
  225. })
  226. }else{
  227. this.list=this.sqlList[k];
  228. this.show= true
  229. }
  230. },
  231. saveRecordConfirmMethod(fileData) {
  232. var token = this.carhelp.getToken()
  233. uni.uploadFile({
  234. url: process.car.BASE_URL + "uploadPicture", //仅为示例,非真实的接口地址
  235. filePath:fileData,
  236. header: {
  237. 'Authorization': token,
  238. //'Content-Type': 'multipart/form-data',
  239. 'X-Requested-With': 'XMLHttpRequest',
  240. // 'content-type': 'multipart/form-data'
  241. },
  242. name: 'photoFile',
  243. formData: {
  244. subFolder: "headimg"
  245. },
  246. success: (uploadFileRes) => {
  247. var obj = JSON.parse(uploadFileRes.data)
  248. console.log(obj);
  249. this.src = obj.data;
  250. // uni.hideLoading();
  251. }
  252. });
  253. },
  254. confirm(e) {
  255. this.show = false;
  256. var name=["intendedIndustries","method",
  257. "workExperience","education",]
  258. this[name[this.selectIndex]]=e[0].label
  259. this.formData[name[this.selectIndex]]=e[0].value
  260. console.log(e)
  261. },
  262. uploadPhoto() {
  263. let _self = this;
  264. const crop = {
  265. quality: 100,
  266. width: 600,
  267. height: 600,
  268. resize: true
  269. };
  270. // 上传图片
  271. uni.chooseImage({
  272. count: 1,
  273. crop,
  274. success: async (res) => {
  275. //(res);
  276. let tempFile = res.tempFiles[0];
  277. var filePath = res.tempFilePaths[0]
  278. let fileData = await new Promise((callback) => {
  279. uni.navigateTo({
  280. url: './cropImage?path=' + filePath +
  281. `&options=${JSON.stringify(crop)}`,
  282. animationType: "fade-in",
  283. events: {
  284. success: url => {
  285. callback(url)
  286. }
  287. }
  288. });
  289. })
  290. this.saveRecordConfirmMethod(fileData);
  291. }
  292. });
  293. },
  294. }
  295. }
  296. </script>
  297. <style>
  298. page {
  299. background: #F0F0F2;
  300. padding-bottom: 150px;
  301. }
  302. </style>
  303. <style lang="scss" scoped>
  304. .main {
  305. margin: 24rpx 32rpx;
  306. background-color: #fff;
  307. padding: 40rpx 32rpx 0;
  308. border-radius: 12px;
  309. .person-infos {
  310. display: flex;
  311. justify-content: space-between;
  312. .infos {
  313. .name {
  314. color: rgba(51, 51, 51, 1);
  315. font-size: 20px;
  316. font-family: 'PingFangSC-medium';
  317. }
  318. .gender-age {
  319. color: rgba(119, 119, 119, 1);
  320. margin-top: 8rpx;
  321. .text {
  322. margin: 0 8rpx;
  323. }
  324. .text:nth-of-type(1) {
  325. margin-left: 0;
  326. }
  327. }
  328. }
  329. .photo {
  330. position: relative;
  331. img {
  332. width: 60px;
  333. height: 60px;
  334. }
  335. .camera {
  336. width: 48rpx;
  337. height: 48rpx;
  338. position: absolute;
  339. top: 36rpx;
  340. left: 36rpx;
  341. z-index: 999;
  342. }
  343. }
  344. }
  345. .information-group {
  346. .item {
  347. display: flex;
  348. align-items: center;
  349. padding: 12rpx 0;
  350. border-bottom: 1px solid #f1f1f1;
  351. .title {
  352. color: rgba(51, 51, 51, 1);
  353. font-size: 32rpx;
  354. width: 140rpx;
  355. }
  356. .input2 {
  357. width: 360rpx;
  358. margin-left: 24rpx;
  359. /deep/.uni-input-input {
  360. color: rgba(51, 51, 51, 1);
  361. }
  362. }
  363. .input {
  364. width: 460rpx;
  365. margin-left: 24rpx;
  366. /deep/.uni-input-input {
  367. color: rgba(51, 51, 51, 1);
  368. }
  369. }
  370. .icon {
  371. margin-left: auto;
  372. }
  373. .unit {
  374. margin-left: auto;
  375. color: #333333;
  376. font-size: 24rpx;
  377. }
  378. }
  379. }
  380. }
  381. // 服务描述
  382. .service-description {
  383. margin: 24rpx 32rpx;
  384. background-color: #fff;
  385. border-radius: 12px;
  386. padding: 24rpx 32rpx;
  387. .title {
  388. color: #333333;
  389. font-size: 18px;
  390. font-family: 'PingFangSC-medium';
  391. }
  392. text {
  393. color: #FF0000;
  394. }
  395. .textarea {
  396. margin-top: 24rpx;
  397. line-height: 40rpx;
  398. width: 100%;
  399. height: 240rpx;
  400. }
  401. }
  402. .save {
  403. background-color: rgba(34, 149, 255, 1);
  404. color: rgba(241, 241, 241, 1);
  405. font-size: 18px;
  406. height: 96rpx;
  407. line-height: 96rpx;
  408. border-radius: 50px;
  409. position: fixed;
  410. left: 32rpx;
  411. right: 32rpx;
  412. bottom: 20rpx;
  413. z-index: 999;
  414. }
  415. </style>