满分新增、布局修改、工程维度增加

This commit is contained in:
“zhuzihan”  2025-07-04 16:52:29 +08:00
parent afc2c36178
commit a8d28e94e6
5 changed files with 91 additions and 33 deletions

View File

@ -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,

View File

@ -48,8 +48,8 @@
<!-- <div v-for="(lab, index) in filteredLabs" :key="index" class="lab-card" style="height: 440px;"> -->
<div v-for="(lab, index) in filteredLabs" :key="index" class="lab-card" style="height: 440px;" @click="openLabDetail(lab)">
<div class="card-header">
<span class="lab-id">ID: {{ lab.basicInformation.name0 || lab.id }}</span>
<!-- <span class="total-score">综合评估分数: <span class="score-value">{{ lab.score }}</span></span> -->
<span class="lab-id">ID: {{ lab.basicInformation.name1 || lab.id }}</span>
<span class="total-score">时间: <span class="score-value">{{ lab.basicInformation.name0 }}</span></span>
</div>
<div class="card-content">
@ -60,20 +60,20 @@
<div class="lab-info">
<div class="info-item">
<span class="info-label">研究中心名称:</span>
<span class="info-value">{{ lab.basicInformation.name1 }}</span>
</div>
<div class="info-item">
<span class="info-label">所属领域:</span>
<span class="info-value">{{ lab.basicInformation.name2 }}</span>
</div>
<div class="info-item">
<span class="info-label">所属学校:</span>
<span class="info-label">所属领域:</span>
<span class="info-value">{{ lab.basicInformation.name3 }}</span>
</div>
<div class="info-item">
<span class="info-label">主管部门:</span>
<span class="info-label">所属学校:</span>
<span class="info-value">{{ lab.basicInformation.name4 }}</span>
</div>
<div class="info-item">
<span class="info-label">主管部门:</span>
<span class="info-value">{{ lab.basicInformation.name5 }}</span>
</div>
</div>
</div>
@ -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))
);
}

View File

@ -40,7 +40,14 @@
<!-- 工程研究中心年度信息 - 合并成一个card -->
<div class="detail-sections">
<h3 class="section-title">详细信息</h3>
<!-- 新增总分显示 -->
<div class="overall-score-section">
<h3 class="section-title">详细信息</h3>
<div>
<span class="overall-score-label">总分:</span>
<span class="overall-score-value">{{ overallTotalScore }}</span>
</div>
</div>
<div class="year-content">
<div class="display-form">
<!-- 工程研究中心概况 -->
@ -50,7 +57,8 @@
<!-- 遍历 labData.resultList -->
<div v-for="(categoryItem, index) in labData.resultList" :key="index" class="category-section">
<h4 class="category-title">
{{ categoryItem.category }} (总分: {{ calculateCategoryTotal(categoryItem.result) }})
{{ categoryItem.category }}
<span>总分: {{ calculateCategoryTotal(categoryItem.result) }} / 满分: {{ labData.scoreList[index] }}</span>
</h4>
<div class="category-content">
<div v-for="(item, itemIndex) in categoryItem.result" :key="itemIndex" class="category-item">
@ -60,11 +68,6 @@
</div>
</div>
</div>
<!-- 新增总分显示 -->
<div class="overall-score-section">
<span class="overall-score-label">总分:</span>
<span class="overall-score-value">{{ overallTotalScore }}</span>
</div>
</div>
</div>
</div>
@ -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);

View File

@ -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({

View File

@ -57,7 +57,15 @@
<!-- 详细信息 - 工程研究中心年度信息 - 合并成一个card -->
<div class="detail-sections">
<h3 class="section-title">详细信息</h3>
<!-- 新增总分显示 -->
<div class="overall-score-section">
<h3 class="section-title">详细信息</h3>
<div>
<span class="overall-score-label">总分:</span>
<span class="overall-score-value">{{ overallTotalScore }}</span>
</div>
</div>
<div class="year-content">
<div class="display-form">
<!-- 工程研究中心概况 -->
@ -66,7 +74,8 @@
<!-- 遍历 teacherData.resultList -->
<div v-for="(categoryItem, index) in teacherData.resultList" :key="index" class="category-section">
<h4 class="category-title">
{{ categoryItem.category }} (总分: {{ calculateCategoryTotal(categoryItem.result) }})
{{ categoryItem.category }}
<span>总分: {{ calculateCategoryTotal(categoryItem.result) }} / 满分: {{ teacherData.scoreList[index] }}</span>
</h4>
<div class="category-content">
<div v-for="(item, itemIndex) in categoryItem.result" :key="itemIndex" class="category-item">
@ -77,11 +86,6 @@
</div>
</div>
</div>
<!-- 总分显示 -->
<div class="overall-score-section">
<span class="overall-score-label">总分:</span>
<span class="overall-score-value">{{ overallTotalScore }}</span>
</div>
</div>
</div>
</div>
@ -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 {