Commit ab9848abdd6bcec72e0725bd76854db28ba47c8b
1 parent
4ebb3d66
简历界面
Showing
3 changed files
with
321 additions
and
55 deletions
src/api/user.js
| ... | ... | @@ -132,9 +132,9 @@ export function GetCompanyInvitation(data) { |
| 132 | 132 | //删除面试邀请 |
| 133 | 133 | export function InvitationCompanyDelete(ids) { |
| 134 | 134 | return request({ |
| 135 | - url: '/InvitationCompany/Delete' , | |
| 135 | + url: '/InvitationCompany/Delete', | |
| 136 | 136 | method: 'post', |
| 137 | - params:ids | |
| 137 | + params: ids | |
| 138 | 138 | }); |
| 139 | 139 | } |
| 140 | 140 | |
| ... | ... | @@ -174,18 +174,18 @@ export function UserInfo_List(params) { |
| 174 | 174 | url: `/UserInfo/List`, |
| 175 | 175 | method: 'get', |
| 176 | 176 | params |
| 177 | - }) | |
| 178 | -} | |
| 177 | + }) | |
| 178 | +} | |
| 179 | 179 | |
| 180 | -export function GetTypeSetting(params={}) { | |
| 180 | +export function GetTypeSetting(params = {}) { | |
| 181 | 181 | return request({ |
| 182 | 182 | url: `/userType/GetTypeSetting`, |
| 183 | 183 | method: 'get', |
| 184 | 184 | params |
| 185 | - }) | |
| 186 | -} | |
| 185 | + }) | |
| 186 | +} | |
| 187 | 187 | //设置标签 |
| 188 | - export function ChangeTags(params) { | |
| 188 | +export function ChangeTags(params) { | |
| 189 | 189 | return request({ |
| 190 | 190 | url: `/Users/ChangeTags`, |
| 191 | 191 | method: 'post', |
| ... | ... | @@ -200,19 +200,19 @@ export function UserTypeSettings(params) { |
| 200 | 200 | url: `/userType/GetSettings`, |
| 201 | 201 | method: 'post', |
| 202 | 202 | params |
| 203 | - }) | |
| 204 | -} | |
| 203 | + }) | |
| 204 | +} | |
| 205 | 205 | |
| 206 | 206 | export function saveTypeSetting(data) { |
| 207 | 207 | return request({ |
| 208 | 208 | url: `/userType/saveTypeSetting`, |
| 209 | 209 | method: 'post', |
| 210 | 210 | data |
| 211 | - }) | |
| 212 | -} | |
| 211 | + }) | |
| 212 | +} | |
| 213 | 213 | |
| 214 | 214 | //设置标签 |
| 215 | - export function SelectPhoneBool(id,phone) { | |
| 215 | +export function SelectPhoneBool(id, phone) { | |
| 216 | 216 | return request({ |
| 217 | 217 | url: `/Users/SelectPhoneBool?id=${id}&phone=${phone}`, |
| 218 | 218 | method: 'get', |
| ... | ... | @@ -220,9 +220,16 @@ export function saveTypeSetting(data) { |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | |
| 223 | -export function ChangeClass(id,type) { | |
| 223 | +export function ChangeClass(id, type) { | |
| 224 | 224 | return request({ |
| 225 | 225 | url: `/Users/ChangeClass?id=${id}&type=${type}`, |
| 226 | 226 | method: 'post', |
| 227 | 227 | }) |
| 228 | +} | |
| 229 | + | |
| 230 | +export function getOuterUserInfo(id) { | |
| 231 | + return request({ | |
| 232 | + url: `/UserInfo/GetOuterUserInfo?id=${id}`, | |
| 233 | + method: 'get' | |
| 234 | + }); | |
| 228 | 235 | } |
| 229 | 236 | \ No newline at end of file | ... | ... |
src/views/resume/malestaff.vue
| ... | ... | @@ -5,10 +5,14 @@ |
| 5 | 5 | <img class="user-head" src="/static/resume/head.png" alt="" /> |
| 6 | 6 | <div> |
| 7 | 7 | <div class="user-info"> |
| 8 | - <h2>张三</h2> | |
| 9 | - <img style="height:30px;margin:0 20px;" src="/static/resume/male/resume13.png" alt="" /> | |
| 8 | + <h2>{{ userDetail.fullName }}</h2> | |
| 9 | + <img | |
| 10 | + style="height: 30px; margin: 0 20px" | |
| 11 | + src="/static/resume/male/resume13.png" | |
| 12 | + alt="" | |
| 13 | + /> | |
| 10 | 14 | <div class="star-progress"> |
| 11 | - <div style="width:50%" class="star-progress-bar"></div> | |
| 15 | + <div style="width: 50%" class="star-progress-bar"></div> | |
| 12 | 16 | </div> |
| 13 | 17 | </div> |
| 14 | 18 | <ul class="user-items"> |
| ... | ... | @@ -19,8 +23,8 @@ |
| 19 | 23 | </ul> |
| 20 | 24 | </div> |
| 21 | 25 | </div> |
| 22 | - <div style="display: flex;"> | |
| 23 | - <div style="flex:1;margin-right: 30px;"> | |
| 26 | + <div style="display: flex"> | |
| 27 | + <div style="flex: 1; margin-right: 30px"> | |
| 24 | 28 | <div class="info-panel"> |
| 25 | 29 | <div class="info-title"> |
| 26 | 30 | <span>技能优势</span> |
| ... | ... | @@ -43,9 +47,9 @@ |
| 43 | 47 | <li> |
| 44 | 48 | <h3 class="flex flex-between"> |
| 45 | 49 | <span>西南石油大学</span> |
| 46 | - <span style="font-size:16px;">2014.06-2017.06</span> | |
| 50 | + <span style="font-size: 16px">2014.06-2017.06</span> | |
| 47 | 51 | </h3> |
| 48 | - <p class="flex flex-between"> | |
| 52 | + <p class="flex flex-between"> | |
| 49 | 53 | <span>计算机科学与技术</span> |
| 50 | 54 | <span>本科</span> |
| 51 | 55 | </p> |
| ... | ... | @@ -54,35 +58,37 @@ |
| 54 | 58 | </div> |
| 55 | 59 | </div> |
| 56 | 60 | </div> |
| 57 | - <div class="info-panel" style="flex:1;"> | |
| 58 | - <div class="info-title"> | |
| 59 | - <span>工作经历</span> | |
| 60 | - </div> | |
| 61 | - <div class="info-content"> | |
| 62 | - <ul> | |
| 63 | - <li> | |
| 64 | - <h3 class="flex flex-between"> | |
| 65 | - <span>腾讯</span> | |
| 66 | - <span>前端工程师</span> | |
| 67 | - <span style="font-size:16px;">2014.06-2017.06</span> | |
| 68 | - </h3> | |
| 69 | - <p class="flex flex-between"> | |
| 70 | - 负责公司xxxxxx的工作,这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他 内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其 | |
| 71 | - </p> | |
| 72 | - </li> | |
| 73 | - <li> | |
| 74 | - <h3 class="flex flex-between"> | |
| 75 | - <span>腾讯</span> | |
| 76 | - <span>前端工程师</span> | |
| 77 | - <span style="font-size:16px;">2014.06-2017.06</span> | |
| 78 | - </h3> | |
| 79 | - <p class="flex flex-between"> | |
| 80 | - 负责公司xxxxxx的工作,这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他 内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其 | |
| 81 | - </p> | |
| 82 | - </li> | |
| 83 | - </ul> | |
| 84 | - </div> | |
| 61 | + <div class="info-panel" style="flex: 1"> | |
| 62 | + <div class="info-title"> | |
| 63 | + <span>工作经历</span> | |
| 64 | + </div> | |
| 65 | + <div class="info-content"> | |
| 66 | + <ul> | |
| 67 | + <li> | |
| 68 | + <h3 class="flex flex-between"> | |
| 69 | + <span>腾讯</span> | |
| 70 | + <span>前端工程师</span> | |
| 71 | + <span style="font-size: 16px">2014.06-2017.06</span> | |
| 72 | + </h3> | |
| 73 | + <p class="text-overflow2"> | |
| 74 | + 负责公司xxxxxx的工作,这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他 | |
| 75 | + 内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其 | |
| 76 | + </p> | |
| 77 | + </li> | |
| 78 | + <li> | |
| 79 | + <h3 class="flex flex-between"> | |
| 80 | + <span>腾讯</span> | |
| 81 | + <span>前端工程师</span> | |
| 82 | + <span style="font-size: 16px">2014.06-2017.06</span> | |
| 83 | + </h3> | |
| 84 | + <p class="text-overflow2"> | |
| 85 | + 负责公司xxxxxx的工作,这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他 | |
| 86 | + 内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其他内容这里有其 | |
| 87 | + </p> | |
| 88 | + </li> | |
| 89 | + </ul> | |
| 85 | 90 | </div> |
| 91 | + </div> | |
| 86 | 92 | </div> |
| 87 | 93 | </div> |
| 88 | 94 | <div class="bottom-panel flex1"> |
| ... | ... | @@ -117,9 +123,12 @@ |
| 117 | 123 | </div> |
| 118 | 124 | </template> |
| 119 | 125 | <script> |
| 126 | +import * as echarts from "echarts"; | |
| 127 | +import { getOuterUserInfo } from "@/api/user"; | |
| 120 | 128 | export default { |
| 121 | 129 | data() { |
| 122 | 130 | return { |
| 131 | + id: "", | |
| 123 | 132 | infoList: [ |
| 124 | 133 | { title: "性别", value: "男", icon: "resume17.png" }, |
| 125 | 134 | { title: "体重", value: "76KG", icon: "resume1.png" }, |
| ... | ... | @@ -131,11 +140,250 @@ export default { |
| 131 | 140 | { title: "政治面貌", value: "党员", icon: "resume5.png" }, |
| 132 | 141 | { title: "户籍所在地", value: "四川成都", icon: "resume9.png" }, |
| 133 | 142 | ], |
| 143 | + echartOption1: { | |
| 144 | + grid: { | |
| 145 | + top: 30, | |
| 146 | + bottom: 20, | |
| 147 | + right: 20, | |
| 148 | + left: 20, | |
| 149 | + }, | |
| 150 | + yAxis: { | |
| 151 | + type: "value", | |
| 152 | + splitLine: { | |
| 153 | + lineStyle: { | |
| 154 | + type: "dashed", | |
| 155 | + }, | |
| 156 | + }, | |
| 157 | + axisLabel: { | |
| 158 | + show: false, | |
| 159 | + color: "#EAEBEB", | |
| 160 | + }, | |
| 161 | + }, | |
| 162 | + xAxis: [ | |
| 163 | + { | |
| 164 | + type: "category", | |
| 165 | + axisLabel: { | |
| 166 | + color: "#9FA9BD", | |
| 167 | + interval: 0, | |
| 168 | + fontSize: 14, | |
| 169 | + }, | |
| 170 | + data: [], | |
| 171 | + }, | |
| 172 | + ], | |
| 173 | + series: [ | |
| 174 | + { | |
| 175 | + type: "bar", | |
| 176 | + barWidth: 25, | |
| 177 | + label: { | |
| 178 | + show: true, | |
| 179 | + color: "#65EFFDFF", | |
| 180 | + position: "top", | |
| 181 | + }, | |
| 182 | + itemStyle: { | |
| 183 | + normal: { | |
| 184 | + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ | |
| 185 | + { offset: 0, color: "#65EFFDFF" }, | |
| 186 | + { offset: 1, color: "#65EFFD00" }, | |
| 187 | + ]), | |
| 188 | + barBorderRadius: [10, 10, 0, 0], | |
| 189 | + }, | |
| 190 | + }, | |
| 191 | + data: [], | |
| 192 | + }, | |
| 193 | + { | |
| 194 | + type: "line", | |
| 195 | + color: "#65EFFD", | |
| 196 | + data: [], | |
| 197 | + }, | |
| 198 | + ], | |
| 199 | + }, | |
| 200 | + echartOption2: { | |
| 201 | + grid: { | |
| 202 | + top: 30, | |
| 203 | + bottom: 20, | |
| 204 | + right: 20, | |
| 205 | + left: 20, | |
| 206 | + }, | |
| 207 | + yAxis: { | |
| 208 | + type: "value", | |
| 209 | + splitLine: { | |
| 210 | + lineStyle: { | |
| 211 | + type: "dashed", | |
| 212 | + }, | |
| 213 | + }, | |
| 214 | + axisLabel: { | |
| 215 | + show: false, | |
| 216 | + color: "#EAEBEB", | |
| 217 | + }, | |
| 218 | + }, | |
| 219 | + xAxis: [ | |
| 220 | + { | |
| 221 | + type: "category", | |
| 222 | + axisLabel: { | |
| 223 | + color: "#9FA9BD", | |
| 224 | + interval: 0, | |
| 225 | + fontSize: 14, | |
| 226 | + }, | |
| 227 | + data: [], | |
| 228 | + }, | |
| 229 | + ], | |
| 230 | + series: [ | |
| 231 | + { | |
| 232 | + type: "bar", | |
| 233 | + barWidth: 25, | |
| 234 | + label: { | |
| 235 | + show: true, | |
| 236 | + color: "#65EFFDFF", | |
| 237 | + position: "top", | |
| 238 | + }, | |
| 239 | + itemStyle: { | |
| 240 | + normal: { | |
| 241 | + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ | |
| 242 | + { offset: 0, color: "#65EFFDFF" }, | |
| 243 | + { offset: 1, color: "#65EFFD00" }, | |
| 244 | + ]), | |
| 245 | + barBorderRadius: [10, 10, 0, 0], | |
| 246 | + }, | |
| 247 | + }, | |
| 248 | + data: [], | |
| 249 | + }, | |
| 250 | + { | |
| 251 | + type: "line", | |
| 252 | + color: "#65EFFD", | |
| 253 | + data: [], | |
| 254 | + }, | |
| 255 | + ], | |
| 256 | + }, | |
| 257 | + echartOption3: { | |
| 258 | + radar: { | |
| 259 | + indicator: [ | |
| 260 | + { name: "Sales", max: 6500 }, | |
| 261 | + { name: "Administration", max: 16000 }, | |
| 262 | + { name: "Information Technology", max: 30000 }, | |
| 263 | + { name: "Customer Support", max: 38000 }, | |
| 264 | + { name: "Development", max: 52000 }, | |
| 265 | + { name: "Marketing", max: 25000 }, | |
| 266 | + ], | |
| 267 | + }, | |
| 268 | + series: [ | |
| 269 | + { | |
| 270 | + type: "radar", | |
| 271 | + data: [ | |
| 272 | + { | |
| 273 | + name: "", | |
| 274 | + value: [], | |
| 275 | + label: { | |
| 276 | + show: true, | |
| 277 | + formatter: function (params) { | |
| 278 | + return params.value; | |
| 279 | + }, | |
| 280 | + }, | |
| 281 | + areaStyle: { | |
| 282 | + color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [ | |
| 283 | + { | |
| 284 | + color: "#6551FF52", | |
| 285 | + offset: 0, | |
| 286 | + }, | |
| 287 | + { | |
| 288 | + color: "#6551FF00", | |
| 289 | + offset: 1, | |
| 290 | + }, | |
| 291 | + ]), | |
| 292 | + }, | |
| 293 | + }, | |
| 294 | + ], | |
| 295 | + }, | |
| 296 | + ], | |
| 297 | + }, | |
| 298 | + natureList: {}, | |
| 299 | + abilityList: [], | |
| 300 | + user: {}, | |
| 134 | 301 | }; |
| 135 | 302 | }, |
| 136 | - methods: {}, | |
| 303 | + computed: { | |
| 304 | + userDetail(){ | |
| 305 | + return this.user; | |
| 306 | + }, | |
| 307 | + infoListComputed(){ | |
| 308 | + let user = {...this.user}; | |
| 309 | + let infoList = [...this.infoList]; | |
| 310 | + infoList.find(t=>t.title == '民族').value = user.minzu; | |
| 311 | + } | |
| 312 | + }, | |
| 313 | + created() { | |
| 314 | + this.id = this.$route.query.id; | |
| 315 | + }, | |
| 316 | + mounted() { | |
| 317 | + this.init(); | |
| 318 | + }, | |
| 319 | + methods: { | |
| 320 | + init() { | |
| 321 | + getOuterUserInfo(this.id).then((res) => { | |
| 322 | + let { nature, ability, user } = res.data; | |
| 323 | + let natureList = []; | |
| 324 | + | |
| 325 | + nature = nature[0]; | |
| 326 | + ability = ability[0]; | |
| 327 | + | |
| 328 | + for (const key in nature) { | |
| 329 | + const val = nature[key]; | |
| 330 | + natureList.push({ | |
| 331 | + title: key, | |
| 332 | + value: val, | |
| 333 | + }); | |
| 334 | + } | |
| 335 | + let abilityList = []; | |
| 336 | + for (const key in ability) { | |
| 337 | + const val = ability[key]; | |
| 338 | + abilityList.push({ | |
| 339 | + title: key, | |
| 340 | + value: val, | |
| 341 | + }); | |
| 342 | + } | |
| 343 | + | |
| 344 | + this.natureList = natureList; | |
| 345 | + this.abilityList = this.abilityList; | |
| 346 | + this.user = user; | |
| 347 | + this.$nextTick(() => { | |
| 348 | + this.initNengliEchart(natureList); | |
| 349 | + this.initXinggeEchart(abilityList); | |
| 350 | + }); | |
| 351 | + }); | |
| 352 | + }, | |
| 353 | + initEchart() { | |
| 354 | + this.initNengliEchart(); | |
| 355 | + }, | |
| 356 | + initXinggeEchart(list) { | |
| 357 | + let myChart = echarts.init(document.getElementById("echarts3")); | |
| 358 | + this.echartOption3.radar.indicator = list.map((t) => { | |
| 359 | + return { name: t.title, max: 100 }; | |
| 360 | + }); | |
| 361 | + this.echartOption3.series[0].data[0].value = list.map((t) => t.value); | |
| 362 | + myChart.setOption(this.echartOption3); | |
| 363 | + console.log("this.echartOption3", this.echartOption3); | |
| 364 | + }, | |
| 365 | + initNengliEchart(list) { | |
| 366 | + //第一个echart图 | |
| 367 | + let myChart = echarts.init(document.getElementById("echarts1")); | |
| 368 | + let list1 = list.slice(0, 6); | |
| 369 | + this.echartOption1.xAxis[0].data = list1.map((t) => t.title); | |
| 370 | + this.echartOption1.series[0].data = list1.map((t) => t.value); | |
| 371 | + this.echartOption1.series[1].data = list1.map((t) => t.value); | |
| 372 | + myChart.setOption(this.echartOption1); | |
| 373 | + | |
| 374 | + //第二个图 | |
| 375 | + if (list.length > 6) { | |
| 376 | + let myChart2 = echarts.init(document.getElementById("echarts2")); | |
| 377 | + let list2 = list.slice(6); | |
| 378 | + this.echartOption2.xAxis[0].data = list2.map((t) => t.title); | |
| 379 | + this.echartOption2.series[0].data = list2.map((t) => t.value); | |
| 380 | + this.echartOption2.series[1].data = list2.map((t) => t.value); | |
| 381 | + myChart2.setOption(this.echartOption2); | |
| 382 | + } | |
| 383 | + }, | |
| 384 | + }, | |
| 137 | 385 | }; |
| 138 | 386 | </script> |
| 139 | 387 | <style lang="scss" scoped> |
| 140 | -@import 'style/style.scss'; | |
| 388 | +@import "style/style.scss"; | |
| 141 | 389 | </style> |
| 142 | 390 | \ No newline at end of file | ... | ... |
src/views/resume/style/style.scss
| ... | ... | @@ -22,6 +22,13 @@ li { |
| 22 | 22 | align-items: center; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | +.text-overflow2 { | |
| 26 | + display: -webkit-box; | |
| 27 | + -webkit-box-orient: vertical; | |
| 28 | + -webkit-line-clamp: 2; | |
| 29 | + overflow: hidden; | |
| 30 | +} | |
| 31 | + | |
| 25 | 32 | .page { |
| 26 | 33 | height: 100vh; |
| 27 | 34 | background-image: url(/static/resume/male/page_bg.png); |
| ... | ... | @@ -128,10 +135,6 @@ li { |
| 128 | 135 | } |
| 129 | 136 | p { |
| 130 | 137 | color: #ccc; |
| 131 | - display: -webkit-box; | |
| 132 | - -webkit-box-orient: vertical; | |
| 133 | - -webkit-line-clamp: 2; | |
| 134 | - overflow: hidden; | |
| 135 | 138 | line-height: 1.5em; |
| 136 | 139 | } |
| 137 | 140 | } |
| ... | ... | @@ -148,6 +151,8 @@ li { |
| 148 | 151 | border: 1px solid #51D2FF; |
| 149 | 152 | margin-right: 20px; |
| 150 | 153 | padding: 15px; |
| 154 | + display: flex; | |
| 155 | + flex-direction: column; | |
| 151 | 156 | &:last-child { |
| 152 | 157 | margin-right: 0; |
| 153 | 158 | } |
| ... | ... | @@ -160,5 +165,11 @@ li { |
| 160 | 165 | margin-left: 10px; |
| 161 | 166 | } |
| 162 | 167 | } |
| 168 | + .panel-body { | |
| 169 | + flex: 1; | |
| 170 | + } | |
| 171 | + [id^=echarts] { | |
| 172 | + height: 100%; | |
| 173 | + } | |
| 163 | 174 | } |
| 164 | 175 | } |
| 165 | 176 | \ No newline at end of file | ... | ... |