diff --git a/enlish-vue/src/layouts/components/Header.vue b/enlish-vue/src/layouts/components/Header.vue
index 7b7733d..27a7a44 100644
--- a/enlish-vue/src/layouts/components/Header.vue
+++ b/enlish-vue/src/layouts/components/Header.vue
@@ -51,18 +51,6 @@
学案
-
-
- Features
-
-
-
-
- Team
-
-
-
+
+ 详情
删除
@@ -167,6 +168,7 @@ import AddStudentDialog from '@/layouts/components/AddStudentDialog.vue'
import LessonPlanDialog from '@/layouts/components/LessonPlanDialog.vue'
import { getUnitList, deleteUnit } from '@/api/unit'
import AddUnitDialog from '@/layouts/components/AddUnitDialog.vue'
+import { useRouter } from 'vue-router'
const classes = ref([])
const pageNo = ref(1)
@@ -207,6 +209,7 @@ const unitTotalCount = ref(0)
const unitLoading = ref(false)
const unitTableRef = ref(null)
const showAddUnitDialog = ref(false)
+const router = useRouter()
async function fetchClasses() {
loading.value = true
@@ -289,6 +292,9 @@ function handleStudentSizeChange(s) {
function onStudentSelectionChange(rows) {
selectedStudentIds.value = rows.map(r => r.id)
}
+function onViewStudent(row) {
+ router.push(`/student/${row.id}`)
+}
function onClassRowClick(row) {
selectedClassId.value = row.id
selectedClassTitle.value = row.title
diff --git a/enlish-vue/src/pages/student.vue b/enlish-vue/src/pages/student.vue
new file mode 100644
index 0000000..72ce05d
--- /dev/null
+++ b/enlish-vue/src/pages/student.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
学生详情
+
+
+ {{ detail.id }}
+ {{ detail.name }}
+ {{ detail.className }}
+ {{ detail.gradeName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/enlish-vue/src/router/index.js b/enlish-vue/src/router/index.js
index 1215653..6a39d5f 100644
--- a/enlish-vue/src/router/index.js
+++ b/enlish-vue/src/router/index.js
@@ -3,6 +3,7 @@ import Uploadpng from '@/pages/uploadpng.vue'
import LearningPlan from '@/pages/LearningPlan.vue'
import Class from '@/pages/class.vue'
import { createRouter, createWebHashHistory } from 'vue-router'
+import Student from '@/pages/student.vue'
// 统一在这里声明所有路由
const routes = [
@@ -26,6 +27,13 @@ const routes = [
meta: { // meta 信息
title: '学案' // 页面标题
}
+ },
+ {
+ path: '/student/:id', // 路由地址
+ component: Student, // 对应组件
+ meta: { // meta 信息
+ title: '学生详情' // 页面标题
+ }
}
]