|
@@ -0,0 +1,158 @@
|
|
|
+import { Component } from '@angular/core';
|
|
|
+import { CommonModule } from '@angular/common';
|
|
|
+import { RouterModule } from '@angular/router';
|
|
|
+import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
|
|
+import {
|
|
|
+ faArrowLeft,
|
|
|
+ faChartLine,
|
|
|
+ faLightbulb,
|
|
|
+ faCode,
|
|
|
+ faComments,
|
|
|
+ faUsers,
|
|
|
+ faClock
|
|
|
+} from '@fortawesome/free-solid-svg-icons';
|
|
|
+import { ChartConfiguration, ChartType } from 'chart.js';
|
|
|
+import { BaseChartDirective } from 'ng2-charts';
|
|
|
+import { Location } from '@angular/common';
|
|
|
+
|
|
|
+@Component({
|
|
|
+ selector: 'app-page-ability-analysis',
|
|
|
+ standalone: true,
|
|
|
+ imports: [CommonModule, FaIconComponent, RouterModule , BaseChartDirective],
|
|
|
+ templateUrl: './page-ability-analysis.html',
|
|
|
+ styleUrls: ['./page-ability-analysis.scss'],
|
|
|
+
|
|
|
+})
|
|
|
+export class PageAbilityAnalysis {
|
|
|
+ icons = {
|
|
|
+ arrowLeft: faArrowLeft,
|
|
|
+ chart: faChartLine,
|
|
|
+ knowledge: faLightbulb,
|
|
|
+ coding: faCode,
|
|
|
+ communication: faComments,
|
|
|
+ teamwork: faUsers,
|
|
|
+ efficiency: faClock
|
|
|
+ };
|
|
|
+
|
|
|
+ constructor(private location: Location) {}
|
|
|
+
|
|
|
+ goBack() {
|
|
|
+ this.location.back();
|
|
|
+ }
|
|
|
+
|
|
|
+ public radarChartOptions: ChartConfiguration<'radar'>['options'] = {
|
|
|
+ responsive: true,
|
|
|
+ scales: {
|
|
|
+ r: {
|
|
|
+ angleLines: { display: true },
|
|
|
+ suggestedMin: 0,
|
|
|
+ suggestedMax: 100,
|
|
|
+ ticks: { stepSize: 20 }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+public radarChartLabels = ['专业知识', '编码能力', '沟通表达', '团队协作', '工作效率', '学习能力'];
|
|
|
+
|
|
|
+public radarChartData: ChartConfiguration<'radar'>['data'] = {
|
|
|
+ labels: this.radarChartLabels,
|
|
|
+ datasets: [
|
|
|
+ {
|
|
|
+ label: '当前能力',
|
|
|
+ data: [85, 78, 90, 82, 88, 92],
|
|
|
+ backgroundColor: 'rgba(42, 92, 170, 0.2)',
|
|
|
+ borderColor: 'rgba(42, 92, 170, 1)',
|
|
|
+ pointBackgroundColor: 'rgba(42, 92, 170, 1)',
|
|
|
+ pointBorderColor: '#fff',
|
|
|
+ pointHoverBackgroundColor: '#fff',
|
|
|
+ pointHoverBorderColor: 'rgba(42, 92, 170, 1)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '岗位要求',
|
|
|
+ data: [90, 85, 85, 80, 85, 88],
|
|
|
+ backgroundColor: 'rgba(255, 107, 53, 0.2)',
|
|
|
+ borderColor: 'rgba(255, 107, 53, 1)',
|
|
|
+ pointBackgroundColor: 'rgba(255, 107, 53, 1)',
|
|
|
+ pointBorderColor: '#fff',
|
|
|
+ pointHoverBackgroundColor: '#fff',
|
|
|
+ pointHoverBorderColor: 'rgba(255, 107, 53, 1)'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+};
|
|
|
+
|
|
|
+ // 能力详情
|
|
|
+ abilityDetails = [
|
|
|
+ {
|
|
|
+ title: '专业知识',
|
|
|
+ icon: this.icons.knowledge,
|
|
|
+ score: 85,
|
|
|
+ description: '掌握前端开发核心知识体系'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '编码能力',
|
|
|
+ icon: this.icons.coding,
|
|
|
+ score: 78,
|
|
|
+ description: '熟练使用多种编程语言和框架'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '沟通表达',
|
|
|
+ icon: this.icons.communication,
|
|
|
+ score: 90,
|
|
|
+ description: '能够清晰表达技术观点'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '团队协作',
|
|
|
+ icon: this.icons.teamwork,
|
|
|
+ score: 82,
|
|
|
+ description: '良好的团队合作意识'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '工作效率',
|
|
|
+ icon: this.icons.efficiency,
|
|
|
+ score: 88,
|
|
|
+ description: '高效完成任务的能力'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '学习能力',
|
|
|
+ icon: this.icons.chart,
|
|
|
+ score: 92,
|
|
|
+ description: '快速学习新技术的能力'
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 历史趋势图数据
|
|
|
+ historyChartLabels = ['2023-01', '2023-04', '2023-07'];
|
|
|
+ historyChartOptions = {
|
|
|
+ responsive: true,
|
|
|
+ scales: {
|
|
|
+ y: {
|
|
|
+ min: 60,
|
|
|
+ max: 100
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ historyChartData = {
|
|
|
+ labels: this.historyChartLabels,
|
|
|
+ datasets: [
|
|
|
+ {
|
|
|
+ label: '专业知识',
|
|
|
+ data: [70, 75, 80],
|
|
|
+ borderColor: '#4BC0C0',
|
|
|
+ backgroundColor: 'rgba(75, 192, 192, 0.2)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '编码能力',
|
|
|
+ data: [65, 70, 75],
|
|
|
+ borderColor: '#FF9F40',
|
|
|
+ backgroundColor: 'rgba(255, 159, 64, 0.2)'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '沟通表达',
|
|
|
+ data: [75, 80, 85],
|
|
|
+ borderColor: '#9966FF',
|
|
|
+ backgroundColor: 'rgba(153, 102, 255, 0.2)'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+}
|