Commit 709bad864df519fe1269eb9b10df5539010f295a
1 parent
7183a03c
兼容工作经历的数据
Showing
4 changed files
with
25 additions
and
17 deletions
src/views/resume/femalestaff.vue
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | alt="" |
| 13 | 13 | /> |
| 14 | 14 | <div class="star-progress"> |
| 15 | - <div style="width: 50%" class="star-progress-bar"></div> | |
| 15 | + <div :style="{'width':'calc(140px / 7 * '+(userDetail.stars||0)+')'}" class="star-progress-bar"></div> | |
| 16 | 16 | </div> |
| 17 | 17 | </div> |
| 18 | 18 | <ul class="user-items"> |
| ... | ... | @@ -54,10 +54,10 @@ |
| 54 | 54 | <div class="info-content"> |
| 55 | 55 | <ul |
| 56 | 56 | v-if=" |
| 57 | - userDetail.workExperience && userDetail.workExperience.length | |
| 57 | + userDetail.educationalExperience && userDetail.educationalExperience.length | |
| 58 | 58 | " |
| 59 | 59 | > |
| 60 | - <li v-for="item in userDetail.workExperience" :key="item.date"> | |
| 60 | + <li v-for="item in userDetail.educationalExperience" :key="item.date"> | |
| 61 | 61 | <h3 class="flex flex-between"> |
| 62 | 62 | <span>{{ item.school }}</span> |
| 63 | 63 | <span style="font-size: 16px">{{ item.date }}</span> |
| ... | ... | @@ -79,12 +79,12 @@ |
| 79 | 79 | <div class="info-content"> |
| 80 | 80 | <ul |
| 81 | 81 | v-if=" |
| 82 | - userDetail.educationalExperience && | |
| 83 | - userDetail.educationalExperience.length | |
| 82 | + userDetail.workExperience && | |
| 83 | + userDetail.workExperience.length | |
| 84 | 84 | " |
| 85 | 85 | > |
| 86 | 86 | <li |
| 87 | - v-for="item in userDetail.educationalExperience" | |
| 87 | + v-for="item in userDetail.workExperience" | |
| 88 | 88 | :key="item.date" |
| 89 | 89 | > |
| 90 | 90 | <h3 class="flex flex-between"> |
| ... | ... | @@ -313,7 +313,11 @@ export default { |
| 313 | 313 | }, |
| 314 | 314 | computed: { |
| 315 | 315 | userDetail() { |
| 316 | - return this.user; | |
| 316 | + let user = {...this.user}; | |
| 317 | + user.educationalExperience = JSON.parse(user.educationalExperience || '[]'); | |
| 318 | + user.skillAdvantages = JSON.parse(user.skillAdvantages || '[]') | |
| 319 | + user.workExperience = JSON.parse(user.workExperience || '[]') | |
| 320 | + return user; | |
| 317 | 321 | }, |
| 318 | 322 | infoListComputed() { |
| 319 | 323 | let user = { ...this.user }; | ... | ... |
src/views/resume/malestaff.vue
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | alt="" |
| 13 | 13 | /> |
| 14 | 14 | <div class="star-progress"> |
| 15 | - <div style="width: 50%" class="star-progress-bar"></div> | |
| 15 | + <div :style="{'width':'calc(140px / 7 * '+(userDetail.stars||0)+')'}" class="star-progress-bar"></div> | |
| 16 | 16 | </div> |
| 17 | 17 | </div> |
| 18 | 18 | <ul class="user-items"> |
| ... | ... | @@ -44,8 +44,8 @@ |
| 44 | 44 | <span>教育经历</span> |
| 45 | 45 | </div> |
| 46 | 46 | <div class="info-content"> |
| 47 | - <ul v-if="userDetail.workExperience && userDetail.workExperience.length"> | |
| 48 | - <li v-for="item in userDetail.workExperience" :key="item.date"> | |
| 47 | + <ul v-if="userDetail.educationalExperience && userDetail.educationalExperience.length"> | |
| 48 | + <li v-for="item in userDetail.educationalExperience" :key="item.date"> | |
| 49 | 49 | <h3 class="flex flex-between"> |
| 50 | 50 | <span>{{ item.school }}</span> |
| 51 | 51 | <span style="font-size: 16px">{{item.date}}</span> |
| ... | ... | @@ -65,8 +65,8 @@ |
| 65 | 65 | <span>工作经历</span> |
| 66 | 66 | </div> |
| 67 | 67 | <div class="info-content"> |
| 68 | - <ul v-if="userDetail.educationalExperience && userDetail.educationalExperience.length"> | |
| 69 | - <li v-for="item in userDetail.educationalExperience" :key="item.date"> | |
| 68 | + <ul v-if="userDetail.workExperience && userDetail.workExperience.length"> | |
| 69 | + <li v-for="item in userDetail.workExperience" :key="item.date"> | |
| 70 | 70 | <h3 class="flex flex-between"> |
| 71 | 71 | <span>{{item.company}}</span> |
| 72 | 72 | <span>{{item.position}}</span> |
| ... | ... | @@ -293,7 +293,11 @@ export default { |
| 293 | 293 | }, |
| 294 | 294 | computed: { |
| 295 | 295 | userDetail() { |
| 296 | - return this.user; | |
| 296 | + let user = {...this.user}; | |
| 297 | + user.educationalExperience = JSON.parse(user.educationalExperience || '[]'); | |
| 298 | + user.skillAdvantages = JSON.parse(user.skillAdvantages || '[]') | |
| 299 | + user.workExperience = JSON.parse(user.workExperience || '[]') | |
| 300 | + return user; | |
| 297 | 301 | }, |
| 298 | 302 | infoListComputed() { |
| 299 | 303 | let user = { ...this.user }; | ... | ... |
src/views/resume/style/style.scss
| ... | ... | @@ -62,7 +62,7 @@ li { |
| 62 | 62 | .top-panel { |
| 63 | 63 | background-image: url(/static/resume/male/resume6.png); |
| 64 | 64 | background-size: 100% 100%; |
| 65 | - padding: 30px; | |
| 65 | + padding: 30px 30px 10px; | |
| 66 | 66 | .top-panel-content { |
| 67 | 67 | display: flex; |
| 68 | 68 | align-items: center; |
| ... | ... | @@ -126,7 +126,7 @@ li { |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | .info-content { |
| 129 | - padding: 20px 0; | |
| 129 | + padding: 20px 0 10px; | |
| 130 | 130 | ul { |
| 131 | 131 | li { |
| 132 | 132 | margin-bottom: 10px; | ... | ... |
vue.config.js
| ... | ... | @@ -38,8 +38,8 @@ module.exports = { |
| 38 | 38 | }, |
| 39 | 39 | proxy: { |
| 40 | 40 | '/development': { |
| 41 | - // target: `http://admin.7-stars.com.cn/`, //后台服务地址 | |
| 42 | - target:'http://localhost:8877', | |
| 41 | + target: `http://admin.7-stars.com.cn/`, //后台服务地址 | |
| 42 | + // target:'http://localhost:8877', | |
| 43 | 43 | // target:'http://localhost:8009', |
| 44 | 44 | changeOrigin: true, |
| 45 | 45 | pathRewrite: { | ... | ... |