Commit 709bad864df519fe1269eb9b10df5539010f295a

Authored by yangzhi
1 parent 7183a03c

兼容工作经历的数据

src/views/resume/femalestaff.vue
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 alt="" 12 alt=""
13 /> 13 />
14 <div class="star-progress"> 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 </div> 16 </div>
17 </div> 17 </div>
18 <ul class="user-items"> 18 <ul class="user-items">
@@ -54,10 +54,10 @@ @@ -54,10 +54,10 @@
54 <div class="info-content"> 54 <div class="info-content">
55 <ul 55 <ul
56 v-if=" 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 <h3 class="flex flex-between"> 61 <h3 class="flex flex-between">
62 <span>{{ item.school }}</span> 62 <span>{{ item.school }}</span>
63 <span style="font-size: 16px">{{ item.date }}</span> 63 <span style="font-size: 16px">{{ item.date }}</span>
@@ -79,12 +79,12 @@ @@ -79,12 +79,12 @@
79 <div class="info-content"> 79 <div class="info-content">
80 <ul 80 <ul
81 v-if=" 81 v-if="
82 - userDetail.educationalExperience &&  
83 - userDetail.educationalExperience.length 82 + userDetail.workExperience &&
  83 + userDetail.workExperience.length
84 " 84 "
85 > 85 >
86 <li 86 <li
87 - v-for="item in userDetail.educationalExperience" 87 + v-for="item in userDetail.workExperience"
88 :key="item.date" 88 :key="item.date"
89 > 89 >
90 <h3 class="flex flex-between"> 90 <h3 class="flex flex-between">
@@ -313,7 +313,11 @@ export default { @@ -313,7 +313,11 @@ export default {
313 }, 313 },
314 computed: { 314 computed: {
315 userDetail() { 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 infoListComputed() { 322 infoListComputed() {
319 let user = { ...this.user }; 323 let user = { ...this.user };
src/views/resume/malestaff.vue
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 alt="" 12 alt=""
13 /> 13 />
14 <div class="star-progress"> 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 </div> 16 </div>
17 </div> 17 </div>
18 <ul class="user-items"> 18 <ul class="user-items">
@@ -44,8 +44,8 @@ @@ -44,8 +44,8 @@
44 <span>教育经历</span> 44 <span>教育经历</span>
45 </div> 45 </div>
46 <div class="info-content"> 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 <h3 class="flex flex-between"> 49 <h3 class="flex flex-between">
50 <span>{{ item.school }}</span> 50 <span>{{ item.school }}</span>
51 <span style="font-size: 16px">{{item.date}}</span> 51 <span style="font-size: 16px">{{item.date}}</span>
@@ -65,8 +65,8 @@ @@ -65,8 +65,8 @@
65 <span>工作经历</span> 65 <span>工作经历</span>
66 </div> 66 </div>
67 <div class="info-content"> 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 <h3 class="flex flex-between"> 70 <h3 class="flex flex-between">
71 <span>{{item.company}}</span> 71 <span>{{item.company}}</span>
72 <span>{{item.position}}</span> 72 <span>{{item.position}}</span>
@@ -293,7 +293,11 @@ export default { @@ -293,7 +293,11 @@ export default {
293 }, 293 },
294 computed: { 294 computed: {
295 userDetail() { 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 infoListComputed() { 302 infoListComputed() {
299 let user = { ...this.user }; 303 let user = { ...this.user };
src/views/resume/style/style.scss
@@ -62,7 +62,7 @@ li { @@ -62,7 +62,7 @@ li {
62 .top-panel { 62 .top-panel {
63 background-image: url(/static/resume/male/resume6.png); 63 background-image: url(/static/resume/male/resume6.png);
64 background-size: 100% 100%; 64 background-size: 100% 100%;
65 - padding: 30px; 65 + padding: 30px 30px 10px;
66 .top-panel-content { 66 .top-panel-content {
67 display: flex; 67 display: flex;
68 align-items: center; 68 align-items: center;
@@ -126,7 +126,7 @@ li { @@ -126,7 +126,7 @@ li {
126 } 126 }
127 } 127 }
128 .info-content { 128 .info-content {
129 - padding: 20px 0; 129 + padding: 20px 0 10px;
130 ul { 130 ul {
131 li { 131 li {
132 margin-bottom: 10px; 132 margin-bottom: 10px;
vue.config.js
@@ -38,8 +38,8 @@ module.exports = { @@ -38,8 +38,8 @@ module.exports = {
38 }, 38 },
39 proxy: { 39 proxy: {
40 '/development': { 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 // target:'http://localhost:8009', 43 // target:'http://localhost:8009',
44 changeOrigin: true, 44 changeOrigin: true,
45 pathRewrite: { 45 pathRewrite: {