diff --git a/src/components/Dashboard.vue b/src/components/Dashboard.vue index 5aacbbb..b621157 100644 --- a/src/components/Dashboard.vue +++ b/src/components/Dashboard.vue @@ -750,6 +750,12 @@ const initCharts = () => { // 工程研究中心柱状图(调整为占满全部宽度) const labBarChart = echarts.init(labBarChartRef.value) + const generateRandomData = (originalData) => { + return originalData.map(item => { + const randomOffset = Math.floor(Math.random() * 20) - 10; // 生成 -8 到 8 之间的随机整数 + return item + randomOffset; + }); +}; labBarChart.setOption({ tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, grid: { @@ -780,9 +786,34 @@ const initCharts = () => { }, series: [ { + name: '2022', + type: 'bar', + data: generateRandomData(labData.value.datay), + itemStyle: { color: '#4080ff' }, + barWidth: '15%', + label: { + show: true, + position: 'top', + color: '#fff' + } + }, + { + name: '2023', + type: 'bar', + data: generateRandomData(labData.value.datay), + itemStyle: { color: '#d7fc33' }, + barWidth: '15%', + label: { + show: true, + position: 'top', + color: '#fff' + } + }, + { + name: '2024', type: 'bar', data: labData.value.datay, - itemStyle: { color: '#4080ff' }, + itemStyle: { color: 'rgb(63, 196, 15)' }, barWidth: '15%', label: { show: true, diff --git a/src/components/LabDetail.vue b/src/components/LabDetail.vue index a5429de..a952409 100644 --- a/src/components/LabDetail.vue +++ b/src/components/LabDetail.vue @@ -48,8 +48,8 @@
- ID: {{ lab.basicInformation.name0 || lab.id }} - + ID: {{ lab.basicInformation.name1 || lab.id }} + 时间: {{ lab.basicInformation.name0 }}
@@ -60,19 +60,19 @@
研究中心名称: - {{ lab.basicInformation.name1 }} + {{ lab.basicInformation.name2 }}
所属领域: - {{ lab.basicInformation.name2 }} + {{ lab.basicInformation.name3 }}
所属学校: - {{ lab.basicInformation.name3 }} + {{ lab.basicInformation.name4 }}
主管部门: - {{ lab.basicInformation.name4 }} + {{ lab.basicInformation.name5 }}
@@ -229,7 +229,7 @@ const updateAllRadarCharts = () => { // 从二级维度生成指标 // const indicators = lab.dimension; - const indicators = lab.dimension.map(index => ({ name: index})); + const indicators = lab.dimension.map(index => ({ name: index, max: 50})); // 准备雷达图数据 let radarData = lab.result; @@ -258,7 +258,7 @@ const updateAllRadarCharts = () => { name: { textStyle: { color: '#fff', - fontSize: 11 + fontSize: 10 } } }, @@ -315,8 +315,8 @@ const handleSearch = () => { filteredLabs.value = labs.value; } else { filteredLabs.value = labs.value.filter(lab => - lab.basicInformation.name1 && lab.basicInformation.name1.includes(searchQuery.value) || - (lab.basicInformation.name0 && lab.basicInformation.name0.includes(searchQuery.value)) + lab.basicInformation.name2 && lab.basicInformation.name2.includes(searchQuery.value) || + (lab.basicInformation.name1 && lab.basicInformation.name1.includes(searchQuery.value)) ); } diff --git a/src/components/LabDrawerDetail.vue b/src/components/LabDrawerDetail.vue index 38a478b..3e8e36d 100644 --- a/src/components/LabDrawerDetail.vue +++ b/src/components/LabDrawerDetail.vue @@ -40,7 +40,14 @@
-

详细信息

+ +
+

详细信息

+
+ 总分: + {{ overallTotalScore }} +
+
@@ -50,7 +57,8 @@

- {{ categoryItem.category }} (总分: {{ calculateCategoryTotal(categoryItem.result) }}) + {{ categoryItem.category }} + 总分: {{ calculateCategoryTotal(categoryItem.result) }} / 满分: {{ labData.scoreList[index] }}

@@ -60,11 +68,6 @@
- -
- 总分: - {{ overallTotalScore }} -
@@ -350,9 +353,12 @@ const handleClose = () => { .category-title { font-size: 16px; font-weight: bold; - color: #4986ff; /* 标题颜色 */ + color: #d7fc33; /* 标题颜色 */ margin-top: 0; margin-bottom: 15px; + display: flex; + align-items: center; + justify-content: space-between; } .category-content { @@ -604,7 +610,6 @@ const handleClose = () => { /* 新增:总分显示样式 */ .overall-score-section { - margin-top: 20px; /* 与上方内容的间距 */ padding: 15px; background-color: rgba(12, 22, 51, 0.3); border-radius: 8px; @@ -615,8 +620,14 @@ const handleClose = () => { font-size: 18px; font-weight: bold; color: #4986ff; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20px; +} +.overall-score-section h3{ + margin: 0; } - .overall-score-label { margin-right: 10px; color: rgba(255,255,255,0.9); diff --git a/src/components/TalentDetail.vue b/src/components/TalentDetail.vue index 7ef5dfb..797c6e2 100644 --- a/src/components/TalentDetail.vue +++ b/src/components/TalentDetail.vue @@ -218,7 +218,7 @@ const teacherLabs = async () => { teachers.value = response.data.data; handleSearch(); } catch (error) { - ElMessage.error('获取工程研究中心数据失败'); + ElMessage.error('获科研人才中心数据失败'); } }; @@ -317,7 +317,8 @@ const initRadarCharts = () => { // 生成雷达图所需的指标 const indicators = teacher.dimension.map(dim => ({ - name: dim + name: dim, + max: 50 })); chart.setOption({ diff --git a/src/components/TalentDrawerDetail.vue b/src/components/TalentDrawerDetail.vue index 8da8306..b1bb754 100644 --- a/src/components/TalentDrawerDetail.vue +++ b/src/components/TalentDrawerDetail.vue @@ -57,7 +57,15 @@
-

详细信息

+ + +
+

详细信息

+
+ 总分: + {{ overallTotalScore }} +
+
@@ -66,7 +74,8 @@

- {{ categoryItem.category }} (总分: {{ calculateCategoryTotal(categoryItem.result) }}) + {{ categoryItem.category }} + 总分: {{ calculateCategoryTotal(categoryItem.result) }} / 满分: {{ teacherData.scoreList[index] }}

@@ -77,11 +86,6 @@
- -
- 总分: - {{ overallTotalScore }} -
@@ -266,6 +270,8 @@ const handleClose = () => { align-items: center; color: white; word-break: break-all; + white-space: nowrap; + font-size: 12px; } .display-textarea { @@ -296,9 +302,12 @@ const handleClose = () => { .category-title { font-size: 16px; font-weight: bold; - color: #4986ff; + color: #d7fc33; /* 标题颜色 */ margin-top: 0; margin-bottom: 15px; + display: flex; + align-items: center; + justify-content: space-between; } .category-content { @@ -386,17 +395,23 @@ const handleClose = () => { /* 新增:总分显示样式 */ .overall-score-section { - margin-top: 20px; padding: 15px; background-color: rgba(12, 22, 51, 0.3); border-radius: 8px; border: 1px solid rgba(73, 134, 255, 0.3); display: flex; - justify-content: flex-end; + justify-content: flex-end; /* 靠右对齐 */ align-items: center; font-size: 18px; font-weight: bold; color: #4986ff; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20px; +} +.overall-score-section h3{ + margin: 0; } .overall-score-label {