Compare commits

..

No commits in common. "535042b67be77134737743f6936b8c7640ff4aba" and "e09641d7a40627b9dc3545dbdf1451a0f357bd94" have entirely different histories.

7 changed files with 138 additions and 291 deletions

View File

@ -50,7 +50,7 @@ import axios from 'axios'
import { getApiBaseUrl } from './config' import { getApiBaseUrl } from './config'
// //
const isLoggedIn = ref(true) const isLoggedIn = ref(false)
// //
const currentPage = ref('dashboard') const currentPage = ref('dashboard')

View File

@ -22,25 +22,24 @@
<div class="panel-header"> <div class="panel-header">
<h2>科研成果</h2> <h2>科研成果</h2>
<button class="panel-link" @click="redirectToResearchEvaluation">进入评估 >></button> <button class="panel-link" @click="redirectToResearchEvaluation">进入评估 >></button>
<button class="panel-link" @click="redirectToResearchEvaluation2">进入管理端 >></button>
</div> </div>
<div class="research-stats"> <div class="research-stats">
<div class="stat-card"> <div class="stat-card">
<h3>论文</h3> <h3>论文</h3>
<div class="stat-value"><span class="stat-prefix">累计</span>0</div> <div class="stat-value"><span class="stat-prefix">累计</span>0</div>
</div> </div>
<div class="stat-card"> <div class="stat-card">
<h3>博士论文</h3> <h3>专利数量</h3>
<div class="stat-value"><span class="stat-prefix">本年</span>0</div>
</div>
<div class="stat-card">
<h3>高影响力论文</h3>
<div class="stat-value"><span class="stat-prefix">累计</span>0</div> <div class="stat-value"><span class="stat-prefix">累计</span>0</div>
</div> </div>
<div class="stat-card"> <div class="stat-card">
<h3>硕士论文</h3> <h3>科研项目数量</h3>
<div class="stat-value"><span class="stat-prefix">累计</span>0</div> <div class="stat-value"><span class="stat-prefix">国家重点</span>0<span></span></div>
</div>
<div class="stat-card">
<h3>学士论文</h3>
<div class="stat-value"><span class="stat-prefix">累计</span>0</div>
</div> </div>
</div> </div>
</div> </div>
@ -50,7 +49,7 @@
<h2>学术产出</h2> <h2>学术产出</h2>
<div class="output-content"> <div class="output-content">
<div ref="outputChartRef" class="chart-container-65"></div> <div ref="outputChartRef" class="chart-container-65"></div>
<!-- <div class="international-impact"> <div class="international-impact">
<h3 style="font-size:25px;border-bottom: 5px solid rgb(73,134,255);text-align: left;padding-bottom:5px ">国际影响力</h3> <h3 style="font-size:25px;border-bottom: 5px solid rgb(73,134,255);text-align: left;padding-bottom:5px ">国际影响力</h3>
<div class="journal-stat"> <div class="journal-stat">
<span class="journal-name">Nature</span> <span class="journal-name">Nature</span>
@ -62,13 +61,13 @@
<span class="journal-count">8</span> <span class="journal-count">8</span>
<span class="journal-name2"></span> <span class="journal-name2"></span>
</div> </div>
</div> --> </div>
</div> </div>
</div> </div>
<!-- 研究经费 --> <!-- 研究经费 -->
<div class="dashboard-panel" style="flex: 1 1 0;"> <div class="dashboard-panel" style="flex: 1 1 0;">
<h2>学术详情</h2> <h2>研究经费: 500万元</h2>
<div ref="fundingChartRef" class="chart-container-funding"></div> <div ref="fundingChartRef" class="chart-container-funding"></div>
</div> </div>
</div> </div>
@ -172,7 +171,6 @@ import {
import { CanvasRenderer } from 'echarts/renderers' import { CanvasRenderer } from 'echarts/renderers'
import MarkdownIt from 'markdown-it'; import MarkdownIt from 'markdown-it';
const md = new MarkdownIt(); const md = new MarkdownIt();
// //
const emit = defineEmits(['navigate', 'logout']) const emit = defineEmits(['navigate', 'logout'])
const navigate = (page) => { const navigate = (page) => {
@ -185,54 +183,8 @@ const handleLogoClick = () => {
} }
// //
const redirectToResearchEvaluation = async () => { const redirectToResearchEvaluation = () => {
try { window.open('http://82.156.236.221:10004/login', '_blank');
const response = await fetch(`${getApiBaseUrl()}/admin-api/pg/paper/refresh`, {
method: 'get',
credentials: 'include' // cookie
});
const result = await response.json();
if (result.code === 0) {
//
await localStorage.setItem('access_token', result.data.access);
await localStorage.setItem('refresh_token', result.data.refresh);
await localStorage.setItem('user_info', JSON.stringify({
user_id: result.data.user_id,
username: result.data.username,
permission: '2'
}));
window.location.href = 'http://82.156.236.221:10004/user/file'
} else {
console.error('代理登录失败:', result.error);
}
} catch (error) {
console.error('请求失败:', error);
}
};
const redirectToResearchEvaluation2 = async () => {
try {
const response = await fetch(`${getApiBaseUrl()}/admin-api/pg/paper/adminLogin`, {
method: 'get',
credentials: 'include' // cookie
});
const result = await response.json();
if (result.code === 0) {
//
await localStorage.setItem('access_token', result.data.access);
await localStorage.setItem('refresh_token', result.data.refresh);
await localStorage.setItem('user_info', JSON.stringify({
user_id: result.data.user_id,
username: result.data.username,
permission: '1'
}))
return
window.location.href = 'http://82.156.236.221:10004/admin/manage'
} else {
console.error('代理登录失败:', result.error);
}
} catch (error) {
console.error('请求失败:', error);
}
}; };
// echarts // echarts
@ -262,7 +214,6 @@ const assistantPanel = ref(null)
const isResizing = ref(false) const isResizing = ref(false)
const startY = ref(0) const startY = ref(0)
const startHeight = ref(0) const startHeight = ref(0)
// //
// resize // resize
const startResize = (e) => { const startResize = (e) => {
@ -315,6 +266,8 @@ const stopResize = () => {
document.body.style.userSelect = '' document.body.style.userSelect = ''
} }
// //
const researcherData = ref({ const researcherData = ref({
datax: [], datax: [],
@ -322,51 +275,33 @@ const researcherData = ref({
history: [], history: [],
ishistory: false ishistory: false
}) })
// //
const studyData = ref({ const studyData = ref({
datax: [], datax: [],
datay: [] datay: []
}) })
// //
const teacherServiceData = ref({ const teacherServiceData = ref({
datax: [], datax: [],
datay: [] datay: []
}) })
// //
const labData = ref({ const labData = ref({
datax: [], datax: [], // fieldName
series: [], series: [], // ECharts series
years: [] years: [] //
}) })
const labLineData = ref({ const labLineData = ref({
datax: [], datax: [],
datay: [] datay: []
}) })
//
const outputData = ref({
months: [],
doctor: [],
master: [],
bachelor: []
})
//
const fundingData = ref({
doctor: 0,
master: 0,
bachelor: 0
})
// DeepSeek // DeepSeek
const chatMessagesRef = ref(null) const chatMessagesRef = ref(null)
const userInput = ref('') const userInput = ref('')
const isLoading = ref(false) const isLoading = ref(false)
const chatMessages = ref([]) const chatMessages = ref([
])
// DeepSeek API // DeepSeek API
const sendMessage = async () => { const sendMessage = async () => {
@ -455,12 +390,11 @@ const scrollToBottom = () => {
} }
}); });
}; };
// //
const fundingLegendStatus = ref([true, true, true]) const fundingLegendStatus = ref([true, true, true])
// //
const outputLegendStatus = ref([true, true, true]) const outputLegendStatus = ref([true, true])
// //
const toggleFundingLegend = (index) => { const toggleFundingLegend = (index) => {
@ -482,9 +416,9 @@ const updateFundingChart = () => {
fundingChart.setOption({ fundingChart.setOption({
legend: { legend: {
selected: { selected: {
'博士': fundingLegendStatus.value[0], '政府 50%': fundingLegendStatus.value[0],
'硕士': fundingLegendStatus.value[1], '企业 25%': fundingLegendStatus.value[1],
'学士': fundingLegendStatus.value[2] '其他 25%': fundingLegendStatus.value[2]
} }
} }
}) })
@ -498,9 +432,8 @@ const updateOutputChart = () => {
outputChart.setOption({ outputChart.setOption({
legend: { legend: {
selected: { selected: {
'博士': outputLegendStatus.value[0], '论文总数': outputLegendStatus.value[0],
'硕士': outputLegendStatus.value[1], '专利总数': outputLegendStatus.value[1]
'学士': outputLegendStatus.value[1]
} }
} }
}) })
@ -518,10 +451,12 @@ import { getApiBaseUrl } from '../config';
const fetchDashboardData = async () => { const fetchDashboardData = async () => {
try { try {
const response = await fetch(`${getApiBaseUrl()}/admin-api/pg/J-dashboard/dashboard`); const response = await fetch(`${getApiBaseUrl()}/admin-api/pg/J-dashboard/dashboard`);
if (response.ok) { if (response.ok) {
const data = await response.json(); const data = await response.json();
console.log("仪表盘数据:", data); console.log("仪表盘数据:", data);
dashboardData.value = data.data; dashboardData.value = data.data;
// UI
if (data) { if (data) {
updateChartsWithDashboardData(); updateChartsWithDashboardData();
} }
@ -534,15 +469,14 @@ const fetchDashboardData = async () => {
loading.value = false; loading.value = false;
} }
}; };
const fetchDashboardData2 = async () => { const fetchDashboardData2 = async () => {
try { try {
const response = await fetch(`${getApiBaseUrl()}/admin-api/pg/intelligent-assistant/get-release`); const response = await fetch(`${getApiBaseUrl()}/admin-api/pg/intelligent-assistant/get-release`);
const data = await response.json(); const data = await response.json();
dashboardData2.value = data.data; dashboardData2.value = data.data;
if (data) { if (data) {
updateChartsWithDashboardData(); updateChartsWithDashboardData();
} }
} catch (error) { } catch (error) {
console.error('获取仪表盘数据出错:', error); console.error('获取仪表盘数据出错:', error);
} finally { } finally {
@ -618,7 +552,6 @@ const updateStudyChart = () => {
}); });
} }
} }
const updateResearcherChart = () => { const updateResearcherChart = () => {
const researcherChart = echarts.getInstanceByDom(researcherChartRef.value); const researcherChart = echarts.getInstanceByDom(researcherChartRef.value);
if (researcherChart) { if (researcherChart) {
@ -726,59 +659,6 @@ const initEngineeringKeyFields = (data) => {
console.log("Processed labData.value:", labData.value); console.log("Processed labData.value:", labData.value);
}; };
const fetchPaperData = async () => {
try {
const res = await fetch('http://82.156.236.221:10005/api/v1/review/show/details/');
if (res.ok) {
const data = await res.json();
if (data.code === 200) {
//
const paperCountEl = document.querySelector('.stat-card:nth-child(1) .stat-value');
const paperCountEl2 = document.querySelector('.stat-card:nth-child(2) .stat-value');
const paperCountEl3 = document.querySelector('.stat-card:nth-child(3) .stat-value');
const paperCountEl4 = document.querySelector('.stat-card:nth-child(4) .stat-value');
if (paperCountEl) {
paperCountEl.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">累计</span>${data.data.total.sum || 0}`;
paperCountEl2.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">累计</span>${data.data.total.doctor || 0}`;
paperCountEl3.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">累计</span>${data.data.total.master || 0}`;
paperCountEl4.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">累计</span>${data.data.total.bachelor || 0}`;
}
// 6
const currentDate = new Date();
const monthNames = [];
for (let i = 5; i >= 0; i--) {
const date = new Date(currentDate.getFullYear(), currentDate.getMonth() - i, 1);
monthNames.push(`${date.getMonth() + 1}`);
}
//
outputData.value = {
months: monthNames,
doctor: data.data.time.map(item => item[0]).reverse(), // reverse()
master: data.data.time.map(item => item[1]).reverse(), // reverse()
bachelor: data.data.time.map(item => item[2]).reverse() // reverse()
};
updateOutputChart();
//
fundingData.value = {
doctor: data.data.total.doctor,
master: data.data.total.master,
bachelor: data.data.total.bachelor
};
updateFundingChart();
}
} else {
console.error('获取论文数据失败:', res.statusText);
}
} catch (error) {
console.error('获取论文数据出错:', error);
} finally {
loading.value = false;
}
};
const fetchLabData = async () => { const fetchLabData = async () => {
try { try {
const res = await fetch(`${getApiBaseUrl()}/admin-api/pg/research-data-dashboard/get-release`); const res = await fetch(`${getApiBaseUrl()}/admin-api/pg/research-data-dashboard/get-release`);
@ -852,7 +732,6 @@ const updateLabBarChart = () => {
}, true); }, true);
} }
} }
const updateLabLineChart = () => { const updateLabLineChart = () => {
const labLineChart = echarts.getInstanceByDom(labLineChartRef.value); const labLineChart = echarts.getInstanceByDom(labLineChartRef.value);
if (labLineChart) { if (labLineChart) {
@ -868,16 +747,16 @@ const updateLabLineChart = () => {
}); });
} }
}; };
// 使 // 使
const updateChartsWithDashboardData = () => { const updateChartsWithDashboardData = () => {
if (!dashboardData.value) return; if (!dashboardData.value) return;
if (!dashboardData2.value) return; if (!dashboardData2.value) return;
}; };
// //
const initCharts = () => { const initCharts = () => {
// // -
const researcherChart = echarts.init(researcherChartRef.value) const researcherChart = echarts.init(researcherChartRef.value)
researcherChart.setOption({ researcherChart.setOption({
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
@ -1084,27 +963,26 @@ const initCharts = () => {
] ]
}) })
// - 使API // -
const outputChart = echarts.init(outputChartRef.value) const outputChart = echarts.init(outputChartRef.value)
outputChart.setOption({ outputChart.setOption({
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
legend: { legend: {
data: ['博士', '硕士', '学士'], data: ['论文总数', '专利总数'],
textStyle: { color: '#fff' }, textStyle: { color: '#fff' },
selected: { selected: {
'博士': outputLegendStatus.value[0], '论文总数': outputLegendStatus.value[0],
'硕士': outputLegendStatus.value[1], '专利总数': outputLegendStatus.value[1]
'学士': outputLegendStatus.value[1],
} }
}, },
grid: { left: '3%', right: '12%', bottom: '3%', containLabel: true }, grid: { left: '3%', right: '12%', bottom: '3%', containLabel: true },
yAxis: { yAxis: { // xAxis yAxis
type: 'category', type: 'category',
data: outputData.value.months, data: ['1月', '2月', '3月', '4月', '5月'],
axisLine: { lineStyle: { color: '#fff' } }, axisLine: { lineStyle: { color: '#fff' } },
axisLabel: { color: '#fff' } axisLabel: { color: '#fff' }
}, },
xAxis: { xAxis: { // xAxis yAxis
type: 'value', type: 'value',
axisLine: { lineStyle: { color: '#fff' } }, axisLine: { lineStyle: { color: '#fff' } },
axisLabel: { color: '#fff' }, axisLabel: { color: '#fff' },
@ -1118,9 +996,9 @@ const initCharts = () => {
}, },
series: [ series: [
{ {
name: '博士', name: '论文总数',
type: 'bar', type: 'bar',
data: outputData.value.doctor, data: [140, 160, 180, 190, 210],
itemStyle: { color: '#4080ff' }, itemStyle: { color: '#4080ff' },
barWidth: '20%', barWidth: '20%',
barGap: '20%', barGap: '20%',
@ -1132,9 +1010,9 @@ const initCharts = () => {
} }
}, },
{ {
name: '硕士', name: '专利总数',
type: 'bar', type: 'bar',
data: outputData.value.master, data: [100, 110, 120, 130, 150],
itemStyle: { color: 'rgb(107,187,196)' }, itemStyle: { color: 'rgb(107,187,196)' },
barWidth: '20%', barWidth: '20%',
barGap: '20%', barGap: '20%',
@ -1144,20 +1022,6 @@ const initCharts = () => {
color: '#fff', color: '#fff',
formatter: '{c}' formatter: '{c}'
} }
},
{
name: '学士',
type: 'bar',
data: outputData.value.bachelor,
itemStyle: { color: 'rgb(107,187,19)' },
barWidth: '20%',
barGap: '20%',
label: {
show: true,
position: 'right',
color: '#fff',
formatter: '{c}'
}
} }
] ]
}) })
@ -1180,29 +1044,29 @@ const initCharts = () => {
{ {
value: studyData.value.datay, value: studyData.value.datay,
name: '奖项分布', name: '奖项分布',
areaStyle: { opacity: 0 }, areaStyle: { opacity: 0 }, //
lineStyle: { color: '#ffd700', width: 2 }, lineStyle: { color: '#ffd700', width: 2 },
itemStyle: { color: '#ffd700' } itemStyle: { color: '#ffd700' }
} }
], ],
label: { label: {
show: true, show: true, //
position: 'top', position: 'top', //
color: '#fff', color: '#fff', //
fontSize: 10 fontSize: 10 //
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: true, //
fontSize: 12, fontSize: 12, //
fontWeight: 'bold' fontWeight: 'bold' //
} }
} }
} }
] ]
}) })
// - 使API // -
const fundingChart = echarts.init(fundingChartRef.value) const fundingChart = echarts.init(fundingChartRef.value)
fundingChart.setOption({ fundingChart.setOption({
tooltip: { trigger: 'item' }, tooltip: { trigger: 'item' },
@ -1211,25 +1075,26 @@ const initCharts = () => {
left: '5%', left: '5%',
top: 'center', top: 'center',
textStyle: { color: '#fff' }, textStyle: { color: '#fff' },
data: ['博士', '硕士', '学士'], data: ['政府 50%', '企业 25%', '其他 25%'],
selected: { selected: {
'博士': fundingLegendStatus.value[0], '政府 50%': fundingLegendStatus.value[0],
'硕士': fundingLegendStatus.value[1], '企业 25%': fundingLegendStatus.value[1],
'学士': fundingLegendStatus.value[2] '其他 25%': fundingLegendStatus.value[2]
} }
}, },
series: [ series: [
{ {
type: 'pie', type: 'pie',
radius: ['30%', '70%'], radius: ['30%', '70%'],
center: ['60%', '50%'], center: ['60%', '50%'], //
roseType: 'area', roseType: 'area',
label: { label: {
show: true, show: true,
formatter: '{b}: {d}%', formatter: '{b}',
position: 'outside', position: 'outside',
color: '#fff', color: '#fff',
distanceToLabelLine: 1 alignTo: 'labelLine',
distanceToLabelLine: 5
}, },
labelLine: { labelLine: {
show: true, show: true,
@ -1247,21 +1112,9 @@ const initCharts = () => {
} }
}, },
data: [ data: [
{ { value: 50, name: '政府 50%', itemStyle: { color: '#9966ff' } },
value: fundingData.value.doctor, { value: 25, name: '企业 25%', itemStyle: { color: '#ff9933' } },
name: '博士', { value: 25, name: '其他 25%', itemStyle: { color: '#3399ff' } }
itemStyle: { color: '#9966ff' }
},
{
value: fundingData.value.master,
name: '硕士',
itemStyle: { color: '#ff9933' }
},
{
value: fundingData.value.bachelor,
name: '学士',
itemStyle: { color: '#3399ff' }
}
] ]
} }
] ]
@ -1281,12 +1134,10 @@ const initCharts = () => {
// - // -
onMounted(async() => { onMounted(async() => {
//
await fetchPaperData();
// //
await fetchTeacherbData1(); await fetchTeacherbData1();
await fetchTeacherbData2(); await fetchTeacherbData2();
await fetchTeacherbData3(); await fetchTeacherbData3(); //
// //
await fetchLabData(); await fetchLabData();
await fetchLabData2(); await fetchLabData2();
@ -1306,22 +1157,63 @@ watch(dashboardData, () => {
updateChartsWithData(); updateChartsWithData();
} }
}, { deep: true }); }, { deep: true });
//
// const updateChartsWithData = () => {
const updateChartsWithData = () => { if (!dashboardData.value) return;
if (!dashboardData.value) return; //
// const paperCountEl = document.querySelector('.stat-card:nth-child(1) .stat-value');
const patentCountEl = document.querySelector('.stat-card:nth-child(2) .stat-value'); const patentCountEl = document.querySelector('.stat-card:nth-child(2) .stat-value');
const highImpactPapersEl = document.querySelector('.stat-card:nth-child(3) .stat-value'); const highImpactPapersEl = document.querySelector('.stat-card:nth-child(3) .stat-value');
const keyProjectsEl = document.querySelector('.stat-card:nth-child(4) .stat-value'); const keyProjectsEl = document.querySelector('.stat-card:nth-child(4) .stat-value');
};
if (paperCountEl) {
// newsDataref使 paperCountEl.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">累计</span>${dashboardData.value.paperCount || 0}`;
const newsData = ref([]); }
if (patentCountEl) {
patentCountEl.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">本年</span>${dashboardData.value.patentCount || 0}`;
}
if (highImpactPapersEl) {
highImpactPapersEl.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">累计</span>${dashboardData.value.highImpactPapers || 0}`;
}
if (keyProjectsEl) {
keyProjectsEl.innerHTML = `<span class="stat-prefix" style="font-size: 12px;">国家重点</span>${dashboardData.value.keyProjects || 0}<span>项</span>`;
}
//
const fundingTitle = document.querySelector('.dashboard-panel:nth-child(3) h2');
if (fundingTitle && dashboardData.value.fundingAmount) {
fundingTitle.textContent = `研究经费: ${dashboardData.value.fundingAmount}`;
}
};
// newsDataref使
const newsData = ref([]);
//
let scrollInterval
const startNewsScroll = () => {
if (!newsListRef.value) return
scrollInterval = setInterval(() => {
if (newsListRef.value.scrollTop + newsListRef.value.clientHeight >= newsListRef.value.scrollHeight) {
//
newsListRef.value.scrollTop = 0
} else {
//
newsListRef.value.scrollTop += 1
}
}, 50)
}
// //
onUnmounted(() => { onUnmounted(() => {
window.removeEventListener('resize', () => {}); // resize
window.removeEventListener('resize', () => {
//
});
}) })
</script> </script>
@ -1466,7 +1358,7 @@ onUnmounted(() => {
} }
.chart-container-65 { .chart-container-65 {
width: 100%; width: 65%;
height: 100%; height: 100%;
} }

View File

@ -145,7 +145,7 @@
<el-dialog <el-dialog
v-model="scoreComparisonDialogVisible" v-model="scoreComparisonDialogVisible"
title="得分比较" title="得分比较"
width="80%" width="70%"
center center
:append-to-body="true" :append-to-body="true"
class="score-comparison-dialog" class="score-comparison-dialog"
@ -158,7 +158,7 @@
class="default-table score-comparison-table" class="default-table score-comparison-table"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
> >
<el-table-column prop="category" label=""></el-table-column> <el-table-column prop="category" label="" width="180"></el-table-column>
<el-table-column <el-table-column
v-for="(header) in scoreComparisonHeaders" v-for="(header) in scoreComparisonHeaders"
:key="header.prop" :key="header.prop"
@ -175,19 +175,6 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="totalScore"
label="总分"
align="center">
<template #default="{ row }">
<span :class="{
'max-score-in-column': Number(row.totalScore) === columnStats.totalScore?.max,
'min-score-in-column': Number(row.totalScore) === columnStats.totalScore?.min
}">
{{ row.totalScore }}
</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
</template> </template>
@ -527,23 +514,12 @@ const scoreComparisonTableData = computed(() => {
return selectedLabs.value.map(lab => { return selectedLabs.value.map(lab => {
const row = { const row = {
category: `${lab.basicInformation.name0}-${lab.basicInformation.name4}-${lab.basicInformation.name2}` category: `${lab.basicInformation.name0}-${lab.basicInformation.name2}` // -
}; };
// radarData row
if (Array.isArray(lab.result)) { lab.result.forEach((score, index) => {
let total = 0; row[`score${index + 1}`] = score;
lab.result.forEach((score, index) => { });
const numericScore = Number(score) || 0;
row[`score${index + 1}`] = numericScore;
total += numericScore;
});
// 使Math.round()
row.totalScore = Math.round(total);
} else {
row.totalScore = 0; // 0
}
return row; return row;
}); });
}); });
@ -566,14 +542,6 @@ const columnStats = computed(() => {
}; };
} }
}); });
//
const totalScores = scoreComparisonTableData.value.map(row => Number(row.totalScore));
if (totalScores.length > 0) {
stats.totalScore = {
max: Math.max(...totalScores),
min: Math.min(...totalScores)
};
}
// console.log("Calculated columnStats:", stats); // // console.log("Calculated columnStats:", stats); //
return stats; return stats;
}); });

View File

@ -66,8 +66,7 @@
<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">
<span class="item-label">{{ item.label }}:</span> <span class="item-label">{{ item.label }}:</span>
<span class="item-score">{{ labData.assessmentScore[item.prop] || '0' }} / {{ labData.maximum[item.prop] || '0' }}</span> <span class="item-score">{{ labData.assessmentScore[item.prop] || '0' }}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -78,35 +78,24 @@
<div class="teacher-info"> <div class="teacher-info">
<div class="info-row"> <div class="info-row">
<span class="info-label">姓名:</span> <span class="info-label">姓名:</span>
<el-tooltip effect="dark" :content="teacher.basicInformation.name0" placement="top"> <span class="info-value">{{ teacher.basicInformation.name0 }}</span>
<span class="info-value">{{ teacher.basicInformation.name0 }}</span>
</el-tooltip>
</div> </div>
<div class="info-row"> <div class="info-row">
<span class="info-label">职称 / 职务:</span> <span class="info-label">职称 / 职务:</span>
<el-tooltip effect="dark" :content="teacher.basicInformation.name2 + (teacher.basicInformation.name3 ? ' / ' + teacher.basicInformation.name3 : '')" placement="top"> <span class="info-value">{{ teacher.basicInformation.name2 }}{{ teacher.basicInformation.name3 ? ' / ' + teacher.basicInformation.name3 : '' }}</span>
<span class="info-value">
{{ teacher.basicInformation.name2 }}{{ teacher.basicInformation.name3 ? ' / ' + teacher.basicInformation.name3 : '' }}
</span>
</el-tooltip>
</div> </div>
<div class="info-row"> <div class="info-row">
<span class="info-label">所属学院:</span> <span class="info-label">所属学院:</span>
<el-tooltip effect="dark" :content="teacher.basicInformation.name4" placement="top">
<span class="info-value">{{ teacher.basicInformation.name4 }}</span> <span class="info-value">{{ teacher.basicInformation.name4 }}</span>
</el-tooltip>
</div> </div>
<div class="info-row"> <div class="info-row">
<span class="info-label">最高学历:</span> <span class="info-label">最高学历:</span>
<el-tooltip effect="dark" :content="teacher.basicInformation.name5" placement="top"> <span class="info-value">{{ teacher.basicInformation.name5 }}</span>
<span class="info-value">{{ teacher.basicInformation.name5 }}</span>
</el-tooltip>
</div> </div>
<div class="info-row"> <div class="info-row">
<span class="info-label">学科方向:</span> <span class="info-label">学科方向:</span>
<el-tooltip effect="dark" :content="teacher.basicInformation.name6" placement="top"> <span class="info-value">{{ teacher.basicInformation.name6 }}</span>
<span class="info-value">{{ teacher.basicInformation.name6 }}</span>
</el-tooltip>
</div> </div>
</div> </div>
</div> </div>
@ -129,7 +118,6 @@
import { ref, onMounted, watch, nextTick } from 'vue'; import { ref, onMounted, watch, nextTick } from 'vue';
import * as echarts from 'echarts/core'; import * as echarts from 'echarts/core';
import { RadarChart } from 'echarts/charts'; import { RadarChart } from 'echarts/charts';
import { ElTooltip } from 'element-plus';
// //
import TalentDrawerDetail from './TalentDrawerDetail.vue'; import TalentDrawerDetail from './TalentDrawerDetail.vue';
import { import {

View File

@ -3,10 +3,10 @@ const env = import.meta.env.MODE || 'development';
const config = { const config = {
development: { development: {
apiBaseUrl: 'http://192.168.5.49:48080', apiBaseUrl: 'http://192.168.18.9:48080',
}, },
production: { production: {
apiBaseUrl: 'http://36.103.203.89:48089', apiBaseUrl: 'http://36.103.203.89:48088',
} }
}; };

View File

@ -29,7 +29,7 @@ const config = {
const localDir = path.join(__dirname, 'dist'); const localDir = path.join(__dirname, 'dist');
// 服务器目标目录 // 服务器目标目录
// const remoteDir = process.env.SFTP_REMOTE_DIR; // 如果使用环境变量 // const remoteDir = process.env.SFTP_REMOTE_DIR; // 如果使用环境变量
const remoteDir = '/home/ubuntu/mnt/Teacher_Evaluation/nginx/dist'; const remoteDir = '/home/ubuntu/mnt/teacher_test/nginx-1/dist';
async function uploadToServer() { async function uploadToServer() {
const sftp = new SftpClient(); const sftp = new SftpClient();