From db068acb6a75b29013d8c8469a0f52a348de42d2 Mon Sep 17 00:00:00 2001 From: ww Date: Sun, 11 Aug 2024 20:51:20 +0800 Subject: [PATCH] 1 --- src/api/stu.js | 2 +- src/router/routers.ts | 62 ++++++---- src/views/home/components/Echarts.vue | 31 ++++- src/views/home/components/Lessonlist.vue | 12 +- src/views/home/components/Welcome.vue | 145 +++++++++++++++++++---- src/views/login/index.vue | 10 +- src/views/message/index.vue | 43 ++++++- 7 files changed, 237 insertions(+), 68 deletions(-) diff --git a/src/api/stu.js b/src/api/stu.js index 89953f6..909bc98 100644 --- a/src/api/stu.js +++ b/src/api/stu.js @@ -1,3 +1,3 @@ -export const userStudentListService = (id) => { +export const getStuService = (id) => { return request.post('/api/coursesteacher/studentList?userId=' + id) } diff --git a/src/router/routers.ts b/src/router/routers.ts index 5b1123a..0352627 100644 --- a/src/router/routers.ts +++ b/src/router/routers.ts @@ -8,7 +8,20 @@ export const constantRoute: any = [ hidden: false, icon: 'HomeFilled', // 菜单图标 }, - redirect: '/home', + // redirect: '/home', + // children: [ + // { + // path: '/home', + // component: () => import('@/views/home/index.vue'), + // name: 'Home', + // meta: { + // title: '个人中心', + // hidden: false, + // icon: 'HomeFilled', + // }, + // }, + // ], + redirect: '/curriculumCenter/basicCourseInformation', children: [ { path: '/home', @@ -127,28 +140,28 @@ export const constantRoute: any = [ }, ], }, - { - path: '/groupManagement', - component: () => import('@/layout/index.vue'), - name: 'GroupManagement', - meta: { - title: '', - hidden: false, - icon: 'HomeFilled', // 菜单图标 - }, - children: [ - { - path: '/groupManagement/group', - component: () => import('@/views/group/index.vue'), - name: 'Group', - meta: { - title: '分组', - hidden: false, - icon: 'Operation', - }, - }, - ], - }, + // { + // path: '/groupManagement', + // component: () => import('@/layout/index.vue'), + // name: 'GroupManagement', + // meta: { + // title: '', + // hidden: false, + // icon: 'HomeFilled', // 菜单图标 + // }, + // children: [ + // { + // path: '/groupManagement/group', + // component: () => import('@/views/group/index.vue'), + // name: 'Group', + // meta: { + // title: '分组', + // hidden: false, + // icon: 'Operation', + // }, + // }, + // ], + // }, { path: '/mssageManagement', component: () => import('@/layout/index.vue'), @@ -194,7 +207,8 @@ export const constantRoute: any = [ }, { path: '/myCourseStudyManagement/learningProcess1', - component: () => import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'), + component: () => + import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'), name: 'LearningProcess1', meta: { title: '知识点学习记录', diff --git a/src/views/home/components/Echarts.vue b/src/views/home/components/Echarts.vue index d08a437..9986d04 100644 --- a/src/views/home/components/Echarts.vue +++ b/src/views/home/components/Echarts.vue @@ -26,7 +26,9 @@ onMounted(() => { class="info_container" style="width: 95%; height: 85%; background: #fff; align-items: center" > - +
+
主页访问数据
+
{ align-items: bottom; background: #fff; } +.info_title { + display: flex; + justify-content: space-between; + width: 100%; + height: 32px; + text-decoration: none; +} +.title_name { + font-family: Inter, Inter; + font-weight: 400; + font-size: 20px; + color: rgba(0, 0, 0, 0.9); + line-height: 30px; + text-align: left; + font-style: normal; + text-transform: none; +} +.icon { + height: 32px; + border-radius: 3px 3px 3px 3px; + display: flex; + text-decoration: none; + font-size: small; + justify-content: center; + align-items: center; + cursor: pointer; +} diff --git a/src/views/home/components/Lessonlist.vue b/src/views/home/components/Lessonlist.vue index 8824686..28e5303 100644 --- a/src/views/home/components/Lessonlist.vue +++ b/src/views/home/components/Lessonlist.vue @@ -3,7 +3,7 @@ import conheader from '@/views/home/components/ConHeader.vue' import courseedit from '@/views/course/components/courseEdit.vue' import { ref, onMounted } from 'vue' import useUserStore from '@/store/modules/user' -import { userLessonListService, userMaxKnowService } from '@/api/user/user.js' +import { userLessonListService } from '@/api/user/user.js' const userStore = useUserStore() // console.log(userStore.data.id, 'sfa') const loading = ref(false) @@ -15,17 +15,9 @@ const getLesList = async () => { loading.value = false // console.log(res.data, 'less') } -//学习最多的知识点 -const maxKnow = ref('') -const getmaxKnow = async () => { - const res = await userMaxKnowService(userStore.data.id) - maxKnow.value = res.data - // console.log(res.data.label, 'max') -} -getmaxKnow() + onMounted(() => { getLesList() - getmaxKnow() })