From 97c13b13947807dda920991467dc34affd3e5824 Mon Sep 17 00:00:00 2001 From: yangzhi <765157588@qq.com> Date: Thu, 29 Dec 2022 18:03:54 +0800 Subject: [PATCH] 简历分析样式修改 --- src/common/mixins.js | 26 ++++++++++++++++++++++++++ src/views/resume/femalestaff.vue | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------- src/views/resume/malestaff.vue | 3 ++- src/views/resume/style/style.scss | 19 ++++++++++--------- 4 files changed, 108 insertions(+), 41 deletions(-) diff --git a/src/common/mixins.js b/src/common/mixins.js index 81ffd4b..3ababc3 100644 --- a/src/common/mixins.js +++ b/src/common/mixins.js @@ -20,6 +20,32 @@ export default { }, }, methods: { + initRem() { + var html = document.documentElement; + var w = html.getBoundingClientRect().width; + var fontSize = w / 1000; + html.style.fontSize = fontSize + "px"; + if (this.echartOption1) { + this.echartOption1.textStyle = { + fontSize: fontSize * 9 + }; + } + if (this.echartOption2) { + this.echartOption2.textStyle = { + fontSize: fontSize * 9 + }; + } + if (this.echartOption3) { + this.echartOption3.textStyle = { + fontSize: fontSize * 9 + }; + } + if (this.resetChart) { + setTimeout(() => { + this.resetChart() + }, 2000) + } + }, } } \ No newline at end of file diff --git a/src/views/resume/femalestaff.vue b/src/views/resume/femalestaff.vue index 5d569c8..943b532 100644 --- a/src/views/resume/femalestaff.vue +++ b/src/views/resume/femalestaff.vue @@ -7,12 +7,17 @@
@@ -121,7 +133,7 @@
@@ -152,6 +164,9 @@ export default {
{ title: "户籍所在地", value: "", icon: "resume9.png" },
],
echartOption1: {
+ textStyle:{
+ fontSize:'8rem'
+ },
grid: {
top: 30,
bottom: 20,
@@ -312,26 +327,35 @@ export default {
};
},
computed: {
- abilityEchart1VisibleComputed(){
- return this.natureList.reduce((total,item)=>{
- return total + item.value;
- },0)>0;
+ abilityEchart1VisibleComputed() {
+ return (
+ this.natureList.reduce((total, item) => {
+ return total + item.value;
+ }, 0) > 0
+ );
},
- abilityEchart2VisibleComputed(){
- return this.natureList.length>6 && this.natureList.slice(6).reduce((total,item)=>{
- return total + item.value;
- },0)>0;
+ abilityEchart2VisibleComputed() {
+ return (
+ this.natureList.length > 6 &&
+ this.natureList.slice(6).reduce((total, item) => {
+ return total + item.value;
+ }, 0) > 0
+ );
},
- natureEchartVisibleComputed(){
- return this.abilityList.reduce((total,item)=>{
- return total + item.value;
- },0)>0;
+ natureEchartVisibleComputed() {
+ return (
+ this.abilityList.reduce((total, item) => {
+ return total + item.value;
+ }, 0) > 0
+ );
},
userDetail() {
- let user = {...this.user};
- user.educationalExperience = JSON.parse(user.educationalExperience || '[]');
- user.skillAdvantages = JSON.parse(user.skillAdvantages || '[]')
- user.workExperience = JSON.parse(user.workExperience || '[]')
+ let user = { ...this.user };
+ user.educationalExperience = JSON.parse(
+ user.educationalExperience || "[]"
+ );
+ user.skillAdvantages = JSON.parse(user.skillAdvantages || "[]");
+ user.workExperience = JSON.parse(user.workExperience || "[]");
return user;
},
infoListComputed() {
@@ -354,8 +378,10 @@ export default {
},
mounted() {
this.init();
+ this.initRem();
},
methods: {
+
init() {
getOuterUserInfo(this.id).then((res) => {
let { nature, ability, user } = res.data;
@@ -389,12 +415,24 @@ export default {
});
});
},
+ resetChart(){
+ console.log('resetChart');
+ console.log('this.echartOption1',this.echartOption1);
+ console.log('this.echartOption2',this.echartOption2);
+ console.log('this.echartOption3',this.echartOption3);
+ this.$nextTick(()=>{
+ echarts.init(document.getElementById("echarts1")).setOption(this.echartOption1);
+ echarts.init(document.getElementById("echarts2")).setOption(this.echartOption2);
+ echarts.init(document.getElementById("echarts3")).setOption(this.echartOption3);
+ })
+
+ },
initEchart() {
this.initNengliEchart();
},
initXinggeEchart(list) {
let dom = document.getElementById("echarts3");
- if(!dom){
+ if (!dom) {
return;
}
let myChart = echarts.init(dom);
@@ -407,7 +445,7 @@ export default {
},
initNengliEchart(list) {
let dom = document.getElementById("echarts1");
- if(!dom){
+ if (!dom) {
return;
}
//第一个echart图
@@ -432,6 +470,7 @@ export default {
};
\ No newline at end of file
diff --git a/src/views/resume/malestaff.vue b/src/views/resume/malestaff.vue
index c7d3463..6cb8d21 100644
--- a/src/views/resume/malestaff.vue
+++ b/src/views/resume/malestaff.vue
@@ -7,7 +7,7 @@