满分新增、布局修改、工程维度增加
This commit is contained in:
parent
afc2c36178
commit
a8d28e94e6
@ -750,6 +750,12 @@ const initCharts = () => {
|
|||||||
|
|
||||||
// 工程研究中心柱状图(调整为占满全部宽度)
|
// 工程研究中心柱状图(调整为占满全部宽度)
|
||||||
const labBarChart = echarts.init(labBarChartRef.value)
|
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({
|
labBarChart.setOption({
|
||||||
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
|
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
|
||||||
grid: {
|
grid: {
|
||||||
@ -780,9 +786,34 @@ const initCharts = () => {
|
|||||||
},
|
},
|
||||||
series: [
|
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',
|
type: 'bar',
|
||||||
data: labData.value.datay,
|
data: labData.value.datay,
|
||||||
itemStyle: { color: '#4080ff' },
|
itemStyle: { color: 'rgb(63, 196, 15)' },
|
||||||
barWidth: '15%',
|
barWidth: '15%',
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
|
@ -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;"> -->
|
||||||
<div v-for="(lab, index) in filteredLabs" :key="index" class="lab-card" style="height: 440px;" @click="openLabDetail(lab)">
|
<div v-for="(lab, index) in filteredLabs" :key="index" class="lab-card" style="height: 440px;" @click="openLabDetail(lab)">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span class="lab-id">ID: {{ lab.basicInformation.name0 || lab.id }}</span>
|
<span class="lab-id">ID: {{ lab.basicInformation.name1 || lab.id }}</span>
|
||||||
<!-- <span class="total-score">综合评估分数: <span class="score-value">{{ lab.score }}分</span></span> -->
|
<span class="total-score">时间: <span class="score-value">{{ lab.basicInformation.name0 }}</span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@ -60,19 +60,19 @@
|
|||||||
<div class="lab-info">
|
<div class="lab-info">
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">研究中心名称:</span>
|
<span class="info-label">研究中心名称:</span>
|
||||||
<span class="info-value">{{ lab.basicInformation.name1 }}</span>
|
<span class="info-value">{{ lab.basicInformation.name2 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">所属领域:</span>
|
<span class="info-label">所属领域:</span>
|
||||||
<span class="info-value">{{ lab.basicInformation.name2 }}</span>
|
<span class="info-value">{{ lab.basicInformation.name3 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">所属学校:</span>
|
<span class="info-label">所属学校:</span>
|
||||||
<span class="info-value">{{ lab.basicInformation.name3 }}</span>
|
<span class="info-value">{{ lab.basicInformation.name4 }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">主管部门:</span>
|
<span class="info-label">主管部门:</span>
|
||||||
<span class="info-value">{{ lab.basicInformation.name4 }}</span>
|
<span class="info-value">{{ lab.basicInformation.name5 }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -229,7 +229,7 @@ const updateAllRadarCharts = () => {
|
|||||||
|
|
||||||
// 从二级维度生成指标
|
// 从二级维度生成指标
|
||||||
// const indicators = lab.dimension;
|
// 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;
|
let radarData = lab.result;
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ const updateAllRadarCharts = () => {
|
|||||||
name: {
|
name: {
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontSize: 11
|
fontSize: 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -315,8 +315,8 @@ const handleSearch = () => {
|
|||||||
filteredLabs.value = labs.value;
|
filteredLabs.value = labs.value;
|
||||||
} else {
|
} else {
|
||||||
filteredLabs.value = labs.value.filter(lab =>
|
filteredLabs.value = labs.value.filter(lab =>
|
||||||
lab.basicInformation.name1 && lab.basicInformation.name1.includes(searchQuery.value) ||
|
lab.basicInformation.name2 && lab.basicInformation.name2.includes(searchQuery.value) ||
|
||||||
(lab.basicInformation.name0 && lab.basicInformation.name0.includes(searchQuery.value))
|
(lab.basicInformation.name1 && lab.basicInformation.name1.includes(searchQuery.value))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,14 @@
|
|||||||
|
|
||||||
<!-- 工程研究中心年度信息 - 合并成一个card -->
|
<!-- 工程研究中心年度信息 - 合并成一个card -->
|
||||||
<div class="detail-sections">
|
<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="year-content">
|
||||||
<div class="display-form">
|
<div class="display-form">
|
||||||
<!-- 工程研究中心概况 -->
|
<!-- 工程研究中心概况 -->
|
||||||
@ -50,7 +57,8 @@
|
|||||||
<!-- 遍历 labData.resultList -->
|
<!-- 遍历 labData.resultList -->
|
||||||
<div v-for="(categoryItem, index) in labData.resultList" :key="index" class="category-section">
|
<div v-for="(categoryItem, index) in labData.resultList" :key="index" class="category-section">
|
||||||
<h4 class="category-title">
|
<h4 class="category-title">
|
||||||
{{ categoryItem.category }} (总分: {{ calculateCategoryTotal(categoryItem.result) }})
|
{{ categoryItem.category }}
|
||||||
|
<span>总分: {{ calculateCategoryTotal(categoryItem.result) }} / 满分: {{ labData.scoreList[index] }}</span>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="category-content">
|
<div class="category-content">
|
||||||
<div v-for="(item, itemIndex) in categoryItem.result" :key="itemIndex" class="category-item">
|
<div v-for="(item, itemIndex) in categoryItem.result" :key="itemIndex" class="category-item">
|
||||||
@ -60,11 +68,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -350,9 +353,12 @@ const handleClose = () => {
|
|||||||
.category-title {
|
.category-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4986ff; /* 标题颜色 */
|
color: #d7fc33; /* 标题颜色 */
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-content {
|
.category-content {
|
||||||
@ -604,7 +610,6 @@ const handleClose = () => {
|
|||||||
|
|
||||||
/* 新增:总分显示样式 */
|
/* 新增:总分显示样式 */
|
||||||
.overall-score-section {
|
.overall-score-section {
|
||||||
margin-top: 20px; /* 与上方内容的间距 */
|
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: rgba(12, 22, 51, 0.3);
|
background-color: rgba(12, 22, 51, 0.3);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@ -615,8 +620,14 @@ const handleClose = () => {
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4986ff;
|
color: #4986ff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.overall-score-section h3{
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overall-score-label {
|
.overall-score-label {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
color: rgba(255,255,255,0.9);
|
color: rgba(255,255,255,0.9);
|
||||||
|
@ -218,7 +218,7 @@ const teacherLabs = async () => {
|
|||||||
teachers.value = response.data.data;
|
teachers.value = response.data.data;
|
||||||
handleSearch();
|
handleSearch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('获取工程研究中心数据失败');
|
ElMessage.error('获科研人才中心数据失败');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -317,7 +317,8 @@ const initRadarCharts = () => {
|
|||||||
|
|
||||||
// 生成雷达图所需的指标
|
// 生成雷达图所需的指标
|
||||||
const indicators = teacher.dimension.map(dim => ({
|
const indicators = teacher.dimension.map(dim => ({
|
||||||
name: dim
|
name: dim,
|
||||||
|
max: 50
|
||||||
}));
|
}));
|
||||||
|
|
||||||
chart.setOption({
|
chart.setOption({
|
||||||
|
@ -57,7 +57,15 @@
|
|||||||
|
|
||||||
<!-- 详细信息 - 工程研究中心年度信息 - 合并成一个card -->
|
<!-- 详细信息 - 工程研究中心年度信息 - 合并成一个card -->
|
||||||
<div class="detail-sections">
|
<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="year-content">
|
||||||
<div class="display-form">
|
<div class="display-form">
|
||||||
<!-- 工程研究中心概况 -->
|
<!-- 工程研究中心概况 -->
|
||||||
@ -66,7 +74,8 @@
|
|||||||
<!-- 遍历 teacherData.resultList -->
|
<!-- 遍历 teacherData.resultList -->
|
||||||
<div v-for="(categoryItem, index) in teacherData.resultList" :key="index" class="category-section">
|
<div v-for="(categoryItem, index) in teacherData.resultList" :key="index" class="category-section">
|
||||||
<h4 class="category-title">
|
<h4 class="category-title">
|
||||||
{{ categoryItem.category }} (总分: {{ calculateCategoryTotal(categoryItem.result) }})
|
{{ categoryItem.category }}
|
||||||
|
<span>总分: {{ calculateCategoryTotal(categoryItem.result) }} / 满分: {{ teacherData.scoreList[index] }}</span>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="category-content">
|
<div class="category-content">
|
||||||
<div v-for="(item, itemIndex) in categoryItem.result" :key="itemIndex" class="category-item">
|
<div v-for="(item, itemIndex) in categoryItem.result" :key="itemIndex" class="category-item">
|
||||||
@ -77,11 +86,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -266,6 +270,8 @@ const handleClose = () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
color: white;
|
color: white;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.display-textarea {
|
.display-textarea {
|
||||||
@ -296,9 +302,12 @@ const handleClose = () => {
|
|||||||
.category-title {
|
.category-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4986ff;
|
color: #d7fc33; /* 标题颜色 */
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-content {
|
.category-content {
|
||||||
@ -386,17 +395,23 @@ const handleClose = () => {
|
|||||||
|
|
||||||
/* 新增:总分显示样式 */
|
/* 新增:总分显示样式 */
|
||||||
.overall-score-section {
|
.overall-score-section {
|
||||||
margin-top: 20px;
|
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: rgba(12, 22, 51, 0.3);
|
background-color: rgba(12, 22, 51, 0.3);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid rgba(73, 134, 255, 0.3);
|
border: 1px solid rgba(73, 134, 255, 0.3);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end; /* 靠右对齐 */
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4986ff;
|
color: #4986ff;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.overall-score-section h3{
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overall-score-label {
|
.overall-score-label {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user