From d2f6374d7f460911a7ac489c6cb884799b16a7da Mon Sep 17 00:00:00 2001 From: yzw <2431960323@qq.com> Date: Tue, 27 Dec 2022 16:45:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=91=98=E5=B7=A5=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E8=8D=A3=E8=AA=89=E4=BB=A5=E5=8F=8A=E5=85=88?= =?UTF-8?q?=E8=BF=9B=E6=A8=A1=E5=9D=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/person.js | 15 ++ src/icons/svg/先进.svg | 1 + src/icons/svg/橙色勋章.svg | 1 + src/icons/svg/红色勋章.svg | 1 + src/icons/svg/绿色勋章.svg | 1 + src/icons/svg/蓝色勋章.svg | 1 + src/views/person/components/PersonPicture.vue | 173 +++++++++++++----- 7 files changed, 146 insertions(+), 47 deletions(-) create mode 100644 src/icons/svg/先进.svg create mode 100644 src/icons/svg/橙色勋章.svg create mode 100644 src/icons/svg/红色勋章.svg create mode 100644 src/icons/svg/绿色勋章.svg create mode 100644 src/icons/svg/蓝色勋章.svg diff --git a/src/api/person.js b/src/api/person.js index bf156d6..05c4de2 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -88,3 +88,18 @@ export function getAppraise(params) { }) } +export function getHonor(params) { + return request({ + url: '/person/honor', + method: 'get', + params + }) +} + +export function getAdvance(params) { + return request({ + url: '/person/advance', + method: 'get', + params + }) +} \ No newline at end of file diff --git a/src/icons/svg/先进.svg b/src/icons/svg/先进.svg new file mode 100644 index 0000000..44eff49 --- /dev/null +++ b/src/icons/svg/先进.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/橙色勋章.svg b/src/icons/svg/橙色勋章.svg new file mode 100644 index 0000000..6e35b79 --- /dev/null +++ b/src/icons/svg/橙色勋章.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/红色勋章.svg b/src/icons/svg/红色勋章.svg new file mode 100644 index 0000000..da14d89 --- /dev/null +++ b/src/icons/svg/红色勋章.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/绿色勋章.svg b/src/icons/svg/绿色勋章.svg new file mode 100644 index 0000000..3ead8a1 --- /dev/null +++ b/src/icons/svg/绿色勋章.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/蓝色勋章.svg b/src/icons/svg/蓝色勋章.svg new file mode 100644 index 0000000..42515f0 --- /dev/null +++ b/src/icons/svg/蓝色勋章.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/person/components/PersonPicture.vue b/src/views/person/components/PersonPicture.vue index 095ab5a..16373f7 100644 --- a/src/views/person/components/PersonPicture.vue +++ b/src/views/person/components/PersonPicture.vue @@ -3,26 +3,15 @@
培训推荐
-
-
- - 关键词云 -
+
+
关键词云
人才评价

个人经历

-
+
工作经历
教育经历 - {{ - personData["全日制毕(肄)业学校(单位)名称"] - }} - {{ - personData["全日制毕(肄)业专业名称"] - }} - {{ - personData["在职毕(肄)业学校(单位)名称"] - }} - {{ - personData["在职毕(肄)业专业名称"] - }} + 全日制 + {{ personData["全日制毕(肄)业学校(单位)名称"] }} + 全日制 {{ personData["全日制毕(肄)业专业名称"] }} + 在职 {{ personData["在职毕(肄)业学校(单位)名称"] }} + 在职 {{ personData["在职毕(肄)业专业名称"] }}
知识技能 @@ -68,21 +58,10 @@
-
-
-

州级以上荣誉

-
-
-
-

年度先进

-
-
-
-

创新

-
+

活动

@@ -93,13 +72,43 @@

事务

-
+

党务

+ +
+
+

荣誉

+
+
+ + {{ value }} +
+
+
+
+

年度先进

+
+
+ + {{ value }} +
+
+
+
+
@@ -147,6 +156,8 @@ export default { }, ], appraiseData: {}, + honorData: [], + advanceData: [], }; }, mounted() { @@ -213,6 +224,34 @@ export default { console.log("err", err); } ); + + // 发送荣誉请求 + personApi.getHonor({ id_card: this.$store.state.user.id_card }).then( + (res) => { + this.honorData = res.data; + }, + (err) => { + console.log("err", err); + } + ); + + // 发送先进请求 + personApi.getAdvance({ id_card: this.$store.state.user.id_card }).then( + (res) => { + let advanceData = res.data; + // 按时间降序排列 + function sortByTime(x, y) { + let numX = parseInt(x), + numY = parseInt(y); + return numY - numX; + } + advanceData.sort(sortByTime); + this.advanceData = advanceData; + }, + (err) => { + console.log("err", err); + } + ); }, computed: { industryExperience() { @@ -359,6 +398,40 @@ export default { }; myChart.setOption(option); }, + getHonorTagType(value) { + if (value.includes("全国")) { + // 红色 + return "danger"; + } + if (value.includes("省级")) { + // 橙色 + return "warning"; + } + if (value.includes("州级")) { + // 蓝色 + return ""; + } + if (value.includes("厂级")) { + // 绿色 + return "success"; + } + return ""; + }, + getHonorIconName(value) { + if (value.includes("全国")) { + return "红色勋章"; + } + if (value.includes("省级")) { + return "橙色勋章"; + } + if (value.includes("州级")) { + return "蓝色勋章"; + } + if (value.includes("厂级")) { + return "绿色勋章"; + } + return "蓝色勋章"; + }, }, }; @@ -382,6 +455,10 @@ export default { float: right; } +.pp-block1 { + overflow: hidden; +} + .pp-block1-left { float: left; margin-right: 1%; @@ -399,6 +476,7 @@ export default { .pp-block2 { margin-top: 0px; + /* overflow: hidden; */ } .pp-block2-left { @@ -416,14 +494,6 @@ export default { width: 50%; } -.pp-half-block2 { - display: inline-block; - /* border: 1px #e4e7ed solid; */ - /* box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); */ - height: 200px; - width: 50%; -} - .item-title-p { border-left: 4px solid #000; padding-left: 10px; @@ -434,15 +504,24 @@ export default { width: 100%; height: 80%; border: 1px #e4e7ed solid; + margin-right: 10px; } .tag-bar { margin: 10px 0px 0px 10px; } + +.honor-bar { + margin: 10px 0px 0px 10px; +} \ No newline at end of file