From ed8ce81cb82c873a18f7d9c219a17d0c5207d9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czhuzihan=E2=80=9D=E2=80=83?= <“772644120@qq.com”> Date: Sat, 12 Jul 2025 15:13:51 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __unconfig_vite.config.js | 21 --------------------- src/components/LabDetail.vue | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 __unconfig_vite.config.js diff --git a/__unconfig_vite.config.js b/__unconfig_vite.config.js deleted file mode 100644 index 090c0b2..0000000 --- a/__unconfig_vite.config.js +++ /dev/null @@ -1,21 +0,0 @@ - -let __unconfig_data; -let __unconfig_stub = function (data = {}) { __unconfig_data = data }; -__unconfig_stub.default = (data = {}) => { __unconfig_data = data }; -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' - -// https://vite.dev/config/ -const __unconfig_default = defineConfig({ - plugins: [vue()], - define: { - 'import.meta.env.MODE': JSON.stringify(process.env.NODE_ENV || 'development') - }, - server: { - host: '0.0.0.0', // 允许从任何IP访问 - port: 5173, // 前端端口 - strictPort: true - } -}) - -if (typeof __unconfig_default === "function") __unconfig_default(...[{"command":"serve","mode":"development"}]);export default __unconfig_data; \ No newline at end of file diff --git a/src/components/LabDetail.vue b/src/components/LabDetail.vue index 12433c7..7984f40 100644 --- a/src/components/LabDetail.vue +++ b/src/components/LabDetail.vue @@ -152,7 +152,7 @@ class="default-table score-comparison-table" :row-class-name="tableRowClassName" > - + Date: Mon, 14 Jul 2025 13:16:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dashboard.vue | 4 ++-- src/config.js | 2 +- upload.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Dashboard.vue b/src/components/Dashboard.vue index 8e0120c..42b4ec0 100644 --- a/src/components/Dashboard.vue +++ b/src/components/Dashboard.vue @@ -872,7 +872,7 @@ const initCharts = () => { tooltip: { trigger: 'axis' }, grid: { left: '3%', - right: '4%', + right: '4%', top: '10%', bottom: '15%', // 为标题留出空间 containLabel: true @@ -892,7 +892,7 @@ const initCharts = () => { show: true, lineStyle: { type: 'dashed', - color: 'rgba(255, 255, 255, 0.2)' + color: 'rgba(255, 255, 255, 0.2)' }, interval: 1 } diff --git a/src/config.js b/src/config.js index 49a221e..8619386 100644 --- a/src/config.js +++ b/src/config.js @@ -6,7 +6,7 @@ const config = { apiBaseUrl: 'http://192.168.18.9:48080', }, production: { - apiBaseUrl: 'http://36.103.203.89:48089', + apiBaseUrl: 'http://36.103.203.89:48088', } }; diff --git a/upload.js b/upload.js index f964bf7..6559cb2 100644 --- a/upload.js +++ b/upload.js @@ -29,7 +29,7 @@ const config = { const localDir = path.join(__dirname, 'dist'); // 服务器目标目录 // 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() { const sftp = new SftpClient(); From 8ecaf99a9ad2ace1a05207ec7f737dacd5aa9962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czhuzihan=E2=80=9D=E2=80=83?= <“772644120@qq.com”> Date: Mon, 14 Jul 2025 16:55:43 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TalentDetail.vue | 2 +- src/components/TalentDrawerDetail.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TalentDetail.vue b/src/components/TalentDetail.vue index f6badfc..3381b3c 100644 --- a/src/components/TalentDetail.vue +++ b/src/components/TalentDetail.vue @@ -86,7 +86,7 @@ {{ teacher.basicInformation.name2 }}{{ teacher.basicInformation.name3 ? ' / ' + teacher.basicInformation.name3 : '' }}
- 所属院校: + 所属学院: {{ teacher.basicInformation.name4 }}
diff --git a/src/components/TalentDrawerDetail.vue b/src/components/TalentDrawerDetail.vue index db59bf8..8d771f4 100644 --- a/src/components/TalentDrawerDetail.vue +++ b/src/components/TalentDrawerDetail.vue @@ -40,7 +40,7 @@ {{ teacherData.basicInformation.name3 }}
- 所属院校: + 所属学院: {{ teacherData.basicInformation.name4 }}
From b87baf1e6b161e5355ea5618cd26e46ae41f7fd9 Mon Sep 17 00:00:00 2001 From: liuzhiyuan <> Date: Thu, 17 Jul 2025 15:32:42 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=201=20=E4=BF=AE=E6=94=B9=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E6=A0=87=E9=A2=98=20=E4=B8=8D=E5=90=8C=E5=88=86?= =?UTF-8?q?=E8=BE=A8=E7=8E=87=E4=B8=8B=E9=81=BF=E5=85=8D=E9=81=AE=E6=8C=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=202=E3=80=81=E6=99=BA=E6=85=A7=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E5=A2=9E=E5=8A=A0=E5=8F=AF=E4=BB=A5=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E8=B0=83=E8=8A=82=E5=B0=BA=E5=AF=B8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dashboard.vue | 136 ++++++++++++++++++++++++++------ src/components/LabDetail.vue | 17 ++-- src/components/TalentDetail.vue | 17 ++-- src/components/common.css | 105 ++++++++++++++++++++++++ 4 files changed, 232 insertions(+), 43 deletions(-) diff --git a/src/components/Dashboard.vue b/src/components/Dashboard.vue index 42b4ec0..4e87b28 100644 --- a/src/components/Dashboard.vue +++ b/src/components/Dashboard.vue @@ -4,28 +4,13 @@
- +

+ 智慧科研评估系统 +

+
@@ -126,10 +111,21 @@
- -
-

智能助手

+
+
+
+ + + + + + + + +
+

智能助手

+
@@ -141,7 +137,7 @@
+ :class="['message', message.role === 'user' ? 'user-message' : 'assistant-message']">
@@ -213,6 +209,65 @@ const awardsChartRef = ref(null) const fundingChartRef = ref(null) const teacherServiceChartRef = ref(null) // 新增教师服务图表DOM引用 +// 添加ref和响应式数据 +const assistantPanel = ref(null) +const isResizing = ref(false) +const startY = ref(0) +const startHeight = ref(0) +// 开始调整大小 +// 保持原有的resize逻辑不变,但修改触发方式 +const startResize = (e) => { + // 阻止事件冒泡,避免与面板内部交互冲突 + e.stopPropagation() + + isResizing.value = true + startY.value = e.clientY + startHeight.value = parseInt(document.defaultView.getComputedStyle(assistantPanel.value).height, 10) + + // 添加鼠标移动和释放事件监听 + document.addEventListener('mousemove', handleResize) + document.addEventListener('mouseup', stopResize) + + // 设置光标样式 + document.body.style.cursor = 'row-resize' + document.body.style.userSelect = 'none' +} + +// 其他resize相关函数保持不变 +const handleResize = (e) => { + if (!isResizing.value) return + + const dy = e.clientY - startY.value + const newHeight = startHeight.value - dy + + // 限制最小和最大高度 + const minHeight = 200 // 最小高度 + const maxHeight = window.innerHeight - 100 // 最大高度 + + if (newHeight > minHeight && newHeight < maxHeight) { + assistantPanel.value.style.flex = 'none' + assistantPanel.value.style.height = `${newHeight}px` + + // 调整后立即重新计算工程研究中心图表 + nextTick(() => { + const labBarChart = echarts.getInstanceByDom(labBarChartRef.value) + const labLineChart = echarts.getInstanceByDom(labLineChartRef.value) + if (labBarChart) labBarChart.resize() + if (labLineChart) labLineChart.resize() + }) + } +} + +const stopResize = () => { + isResizing.value = false + document.removeEventListener('mousemove', handleResize) + document.removeEventListener('mouseup', stopResize) + document.body.style.cursor = '' + document.body.style.userSelect = '' +} + + + // 教研人才图表数据 const researcherData = ref({ datax: [], @@ -1583,4 +1638,35 @@ onUnmounted(() => { padding: 15px 0; } } + + \ No newline at end of file diff --git a/src/components/LabDetail.vue b/src/components/LabDetail.vue index d7305e2..8fdd2f3 100644 --- a/src/components/LabDetail.vue +++ b/src/components/LabDetail.vue @@ -3,14 +3,13 @@
+

+ 智慧科研评估系统 +

+
@@ -664,7 +663,7 @@ watch(filteredLabs, () => { border: 2px solid rgba(38,47,80,0.3); } -.dashboard-header { +/* .dashboard-header { height: 60px; padding: 0 20px; display: flex; @@ -702,7 +701,7 @@ watch(filteredLabs, () => { .title-text { margin: 0 30px; -} +} */ .content-container { display: flex; diff --git a/src/components/TalentDetail.vue b/src/components/TalentDetail.vue index 3381b3c..21f2dbb 100644 --- a/src/components/TalentDetail.vue +++ b/src/components/TalentDetail.vue @@ -3,14 +3,13 @@
+

+ 智慧科研评估系统 +

+
@@ -418,7 +417,7 @@ const openTeacherDetail = (teacher) => { /* 防止页面整体出现滚动条 */ } -.dashboard-header { +/* .dashboard-header { height: 60px; padding: 0 20px; display: flex; @@ -456,7 +455,7 @@ const openTeacherDetail = (teacher) => { .title-text { margin: 0 30px; -} +} */ .content-container { display: flex; diff --git a/src/components/common.css b/src/components/common.css index 3fbeca2..4052199 100644 --- a/src/components/common.css +++ b/src/components/common.css @@ -306,4 +306,109 @@ h2{ .teacher-card { min-height: 400px; } +} + + +.dashboard-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; + height: 80px; + background-color: rgba(12, 22, 51, 0.8); + position: relative; +} + +.logo { + display: flex; + align-items: center; + gap: 10px; + flex: 1; /* 占据可用空间 */ +} + +.logo img { + height: 40px; + object-fit: contain; + cursor: pointer; +} + +.main-title { + position: absolute; + left: 50%; + transform: translateX(-50%); + margin: 0; + font-size: 32px; + font-weight: bold; + color: white; + white-space: nowrap; + /* background: linear-gradient(90deg, transparent, rgba(73, 134, 255, 0.3), transparent); */ + padding: 0 200px; +} + +.main-title::before, +.main-title::after { + content: ""; + position: absolute; + top: 50%; + width: 200px; + height: 4px; + background: linear-gradient(90deg, transparent, rgba(73, 134, 255, 0.8)); +} + +.main-title::before { + left: 0; +} + +.main-title::after { + right: 0; + transform: scaleX(-1); +} + +.header-placeholder { + flex: 1; /* 与logo对称的占位元素 */ +} + +/* 响应式调整 */ +@media (max-width: 1200px) { + .dashboard-header { + height: 60px; + padding: 0 10px; + } + + .logo img { + height: 30px; + } + + .main-title { + font-size: 28px; + padding: 0 150px; + } + + .main-title::before, + .main-title::after { + width: 150px; + height: 3px; + } +} +/* 响应式调整 */ +@media (max-width: 768px) { + .dashboard-header { + height: 60px; + padding: 0 10px; + } + + .logo img { + height: 30px; + } + + .main-title { + font-size: 24px; + padding: 0 30px; + } + + .main-title::before, + .main-title::after { + width: 30px; + height: 2px; + } } \ No newline at end of file