Compare commits

...

9 Commits

  1. 1
      Teaching_integration_platform_admin_template
  2. 1
      src/store/modules/type/types.ts
  3. 7
      src/store/modules/user.ts
  4. 17
      src/views/MyCourseStudy/ContainerCla.vue
  5. 23
      src/views/MyCourseStudy/ContainerKno.vue
  6. 86
      src/views/MyCourseStudy/courseCollections.vue
  7. 77
      src/views/course/CourseObjectives.vue
  8. 92
      src/views/course/CourseObjectives111.vue
  9. 1
      src/views/courseResources/index.vue
  10. 4
      src/views/home/components/Class1.vue
  11. 4
      src/views/home/components/Class2.vue
  12. 30
      src/views/home/components/ConHeader.vue
  13. 4
      src/views/home/components/Echart/Echarts.vue
  14. 4
      src/views/home/components/Echarts.vue
  15. 142
      src/views/home/components/Info.vue
  16. 20
      src/views/home/components/Status.vue
  17. 2
      src/views/home/components/Student1.vue
  18. 2
      src/views/home/components/Student2.vue
  19. 4
      src/views/home/components/Welcome.vue
  20. 67
      src/views/home/index.vue
  21. 7
      src/views/login/index.vue
  22. 397
      src/views/portal/LearningPathRecommendations.vue
  23. 85
      src/views/portal/components/KnowledgeGraph.vue
  24. 6
      src/views/portal/courseHomepage.vue
  25. 245
      src/views/portal/knowledgePointLearning.vue

@ -1 +0,0 @@
Subproject commit be31783972a0cdd8d1abfe03df8ef24a73854b0c

@ -7,4 +7,5 @@ export interface LoginStoreType {
routes: string
phone: string
userInfo: object
data: object
}

@ -32,12 +32,13 @@ const useUserStore = defineStore(
avatar: '', // 用户头像
routes: '',
userInfo: {}, // 当前用户相关信息
data: {},
}
},
actions: {
// 登录事件
async userLogin(data: loginType) {
console.log(data, 'pinia')
// console.log(data, 'pinia')
const res: loginResponseType = await userLoginService(data).catch(
(error) => {
ElMessage.error(error.response.data.message)
@ -94,8 +95,8 @@ const useUserStore = defineStore(
if (result.code === 200) {
const res = await userIdenService(result.data.id)
this.userInfo = res.data
console.log(this.userInfo, 'this.userInfo')
// console.log(this.userInfo, 'this.userInfo')
this.data = result.data
console.log(result, '123')
this.userName = result.data.username
// this.avatar = result.data.checkUser.avatar

@ -8,8 +8,8 @@
<!-- 更多图片盒子 -->
<div class="ClassGd">
<!-- <img src="../../assets/icons/更多.svg" width="100%" height="100%" /> -->
<p>查看课程</p>
<p>取消收藏</p>
<p>查看课程</p>
<p>取消收藏</p>
</div>
<!-- 课程图片 -->
<img :src="item_1.img" />
@ -42,7 +42,7 @@
</el-tab-pane>
</template>
<script lang="ts" setup>
import { ref, onMounted} from 'vue'
import { ref, onMounted } from 'vue'
import { SeCourseFavourControllerService } from '../../../generated/services/SeCourseFavourControllerService'
import { CourseFavourQueryRequest } from 'generated/models/CourseFavourQueryRequest'
// ===============================
@ -194,19 +194,19 @@ const handleCurrentChange = (page: any) => {
.ClassGd {
position: absolute;
background-color: rgb(217, 217, 217 ,.5);
background-color: rgb(217, 217, 217, 0.5);
display: none;
margin-left: 85%;
padding: 3px 5px ;
padding: 3px 5px;
cursor: pointer;
border-radius: 20%;
&>p{
margin-top: 3px ;
& > p {
margin-top: 3px;
margin-bottom: 3px;
font-size: 10px;
font-weight: 350;
color: black;
&:hover{
&:hover {
color: #2952f6;
font-weight: 35s0;
}
@ -262,5 +262,4 @@ const handleCurrentChange = (page: any) => {
width: 100%;
justify-content: center;
}
</style>

@ -26,7 +26,19 @@
</div>
</div>
</div>
</el-tab-pane>
<div class="Knowledge_point">
<ul>
<li v-for="(item, index) in 6" :key="index">
知识点知识点知识点{{ item }}
<span class="btn">×</span>
&nbsp;
</li>
</ul>
</div>
</div>
</div>
</div>
</el-tab-pane>
</template>
<script setup>
import {ref,reactive} from 'vue'
@ -39,7 +51,6 @@ this.classList.toggle('noUpd')
}
const arr = reactive([])
const a =[
{
id:1,
@ -67,14 +78,12 @@ const a =[
arr.length=0
arr.push(...a)
const ShowDel = ref(false)
function XsDel(id){
const item = arr.find(o=>o.a.id==id)
item.ShowDel = !item.ShowDel
}
</script>
<style lang="scss" scoped>
.btn{
@ -123,7 +132,7 @@ function XsDel(id){
justify-content: space-around;
}
.KnoBtn>img {
.KnoBtn > img {
padding-top: 20px;
cursor: pointer;
}
@ -151,7 +160,7 @@ function XsDel(id){
flex-direction: column;
}
.Knowledge_point>ul>li {
.Knowledge_point > ul > li {
display: inline-block;
margin-top: 3px;
margin-bottom: 3px;
@ -169,4 +178,4 @@ function XsDel(id){
cursor: pointer;
color: rgb(15, 57, 76);
}
</style>
</style>

@ -1,6 +1,12 @@
<template>
<div class="curse-collection">
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick" style="padding-top: 0">
<el-tabs
v-model="activeName"
type="card"
class="demo-tabs"
@tab-click="handleClick"
style="padding-top: 0"
>
<!-- 课程收藏页面 -->
<ContainerCla />
<!-- 资源收藏页面 -->
@ -10,7 +16,7 @@
<ul class="Container_Res_Tab">
<li class="img-svg" @click="hsndelShow(1)">
<img src="../../assets/icons/课程简介.svg" alt="简介" />
<br/>
<br />
<p>简介</p>
</li>
<li class="img-svg" @click="hsndelShow(2)">
@ -77,11 +83,18 @@
</div>
</div>
</div>
<el-dialog v-model="centerDialogVisible" title="视频播放中" width="1000" align-center>
<el-dialog
v-model="centerDialogVisible"
title="视频播放中"
width="1000"
align-center
>
<span>点击开了一个弹框</span>
<template #footer>
<div class="dialog-footer">
<video src="https://www.bilibili.com/video/BV1HV4y1a7n4?p=50&vd_source=9e99d3200788d6043e077de463ef019b"></video>
<video
src="https://www.bilibili.com/video/BV1HV4y1a7n4?p=50&vd_source=9e99d3200788d6043e077de463ef019b"
></video>
</div>
</template>
</el-dialog>
@ -116,9 +129,16 @@
</div>
</div>
<div class="Page-2">
<el-pagination v-model:current-page="currentPage1" v-model:page-size="pageSize1" :disabled="disabled"
:page-sizes="[6, 8, 12, 15]" layout="total, sizes, prev, pager, next, jumper" :total="10"
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
<el-pagination
v-model:current-page="currentPage1"
v-model:page-size="pageSize1"
:disabled="disabled"
:page-sizes="[6, 8, 12, 15]"
layout="total, sizes, prev, pager, next, jumper"
:total="10"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</el-tab-pane>
<!-- 知识点收藏页面 -->
@ -133,8 +153,8 @@ import { ref, watch } from 'vue'
import type { TabsPaneContext } from 'element-plus'
import ContainerCla from './ContainerCla.vue'
import ContainerKno from './ContainerKno.vue'
import { getAssApi } from "@/api/courseChaptersApi";
import { SeResourceFavourControllerService } from "../../../generated/services/SeResourceFavourControllerService";
import { getAssApi } from '@/api/courseChaptersApi'
import { SeResourceFavourControllerService } from '../../../generated/services/SeResourceFavourControllerService'
const centerDialogVisible = ref(false)
const activeIndex = ref(1)
@ -169,7 +189,6 @@ function initFenYie() {
pageSize1.value = 10
}
watch(activeIndex, (newVal) => {
initFenYie()
getDatalist()
@ -179,31 +198,31 @@ watch(activeIndex, (newVal) => {
// // handleApi(params)
// }
const params = {
current:currentPage1.value,
type: activeIndex.value,
pageSize: pageSize1.value,
sortField:'',
sortOrder:'',
userId:'3'
}
const params = {
current: currentPage1.value,
type: activeIndex.value,
pageSize: pageSize1.value,
sortField: '',
sortOrder: '',
userId: '3',
}
const datalist = ref([
const datalist = ref([
{
description:'',
description: '',
id: '',
img:'',
img: '',
name: '',
path:'',
status:'',
tags:'',
type: '',
path: '',
status: '',
tags: '',
type: '',
},
])
const getDatalist = async () => {
const res = await SeResourceFavourControllerService.listPostByPageUsingPost3(params)
const res =
await SeResourceFavourControllerService.listPostByPageUsingPost3(params)
datalist.value = res.data.records
total.value = res.data.total
console.log(datalist.value[0])
@ -225,7 +244,6 @@ const activeName = ref('first')
const handleClick = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event)
}
</script>
<style lang="scss" scoped>
@ -233,7 +251,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
justify-content: center;
}
.example-pagination-block+.example-pagination-block {
.example-pagination-block + .example-pagination-block {
margin-top: 10px;
}
@ -370,7 +388,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
align-items: center;
}
.ResClaDic>p {
.ResClaDic > p {
font-family: Inter, Inter;
font-weight: 500;
font-size: 20px;
@ -381,7 +399,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
}
.item_2-2,
.item_2-5{
.item_2-5 {
width: 100%;
height: 300px;
margin-top: 20px;
@ -393,7 +411,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
margin-bottom: 32px;
}
.item_2-3,
.item_2-4{
.item_2-4 {
width: 100%;
height: 300px;
margin-top: 20px;
@ -411,7 +429,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
position: flex;
justify-content: center;
background-color: #fff;
border-top: 1px solid rgb(229, 227, 227, .5);
border-bottom: 1px solid rgb(229, 227, 227, .5);
border-top: 1px solid rgb(229, 227, 227, 0.5);
border-bottom: 1px solid rgb(229, 227, 227, 0.5);
}
</style>

@ -4,7 +4,13 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { id } from 'element-plus/es/locales.mjs'
import * as echarts from 'echarts'
import { useRoute } from 'vue-router'
import { getCourseList, addCourse, editCourse, deleteCourse, getCourseInfo } from '@/api/courseChaptersApi'
import {
getCourseList,
addCourse,
editCourse,
deleteCourse,
getCourseInfo,
} from '@/api/courseChaptersApi'
const route = useRoute()
// id id
// targetId
@ -49,11 +55,16 @@ const handleClose = () => {
//
const submit = async () => {
if (flog.value) {
await editCourse({ id: activeIndex.value, content: formData.value.description })
await editCourse({
id: activeIndex.value,
content: formData.value.description,
})
} else {
await addCourse({ objectiveId: activeIndex.value, content: formData.value.description })
await addCourse({
objectiveId: activeIndex.value,
content: formData.value.description,
})
}
getList()
dialogVisible.value = false
formData.value.description = ''
@ -79,7 +90,6 @@ const submit = async () => {
// })
// close()
// flog.value = false
}
const close = () => {
formData.value = {
@ -117,7 +127,7 @@ const del = async (obj) => {
await ElMessageBox.confirm('你确认要删除该课程目标吗', '温馨提示', {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消'
cancelButtonText: '取消',
})
await deleteCourse({ id: obj.id })
ElMessage.success('删除成功')
@ -145,9 +155,9 @@ const data = ref({})
const courseId = ref(0)
onMounted(async () => {
courseId.value = route.query.id
console.log(courseId.value);
console.log(courseId.value)
getList()
console.log(data.value);
console.log(data.value)
let chartDom = document.getElementById('main')
let myChart = echarts.init(chartDom)
let option
@ -197,7 +207,9 @@ onMounted(async () => {
<div class="topContent">
<div class="title">| 课程总目标</div>
<div class="content1">
<textarea class="textarea" @change="textChange" v-model="text">文本内容</textarea>
<textarea class="textarea" @change="textChange" v-model="text">
文本内容</textarea
>
</div>
</div>
<div class="footContent">
@ -208,13 +220,17 @@ onMounted(async () => {
</div>
</div>
<div class="rightContent">
<div class="title" style="
<div
class="title"
style="
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
height: 60px;">
height: 60px;
"
>
<div class="left2">| 课程分目标</div>
<div class="right2">
<!-- <el-button type="primary" @click="addBook">新增</el-button> -->
@ -223,7 +239,10 @@ onMounted(async () => {
<div class="content2">
<el-scrollbar height="600px">
<ul class="objectLi">
<li v-for="(item, index) in data.courseObjectivesTrees" :key="item.id">
<li
v-for="(item, index) in data.courseObjectivesTrees"
:key="item.id"
>
<div class="courseObject">
<!-- {{ filterTarger(item.targetId) }} -->
<div class="courseObject1">{{ item.name }}</div>
@ -231,7 +250,9 @@ onMounted(async () => {
<!-- <el-button class="edit" type="text" @click="editBook(item)">
编辑
</el-button> -->
<el-button type="primary" @click="addBook(item.id)">新增</el-button>
<el-button type="primary" @click="addBook(item.id)">
新增
</el-button>
</div>
</div>
<div class="smallContent">
@ -246,10 +267,18 @@ onMounted(async () => {
<!-- {{ filterTarger(obj.targetId) }} -->
</div>
<div class="partObject2">
<el-button class="edit" type="text" @click="editBook(obj)">
<el-button
class="edit"
type="text"
@click="editBook(obj)"
>
编辑
</el-button>
<el-button class="destroy" type="text" @click="del(obj)">
<el-button
class="destroy"
type="text"
@click="del(obj)"
>
删除
</el-button>
</div>
@ -267,8 +296,13 @@ onMounted(async () => {
</div>
</div>
</div>
<el-dialog v-if="dialogVisible" v-model="dialogVisible" :title="flog ? '编辑' : '新增'" width="500"
:before-close="handleClose">
<el-dialog
v-if="dialogVisible"
v-model="dialogVisible"
:title="flog ? '编辑' : '新增'"
width="500"
:before-close="handleClose"
>
<el-form :model="formData" label-width="auto" style="max-width: 600px">
<!-- <el-form-item label="目标" prop="target">
<el-select v-model="formData.target" placeholder="Select" size="large" style="width: 240px">
@ -277,7 +311,10 @@ onMounted(async () => {
</el-select>
</el-form-item> -->
<el-form-item label="内容" prop="description">
<el-input v-model="formData.description" placeholder="请输入内容"></el-input>
<el-input
v-model="formData.description"
placeholder="请输入内容"
></el-input>
</el-form-item>
</el-form>
<template #footer>
@ -380,7 +417,7 @@ const li
background-color: #fff;
background-image: linear-gradient(#c7e3ff, #ffffff);
.objectLi>li {
.objectLi > li {
width: 845px;
height: 250px;
// margin: 40px;
@ -423,7 +460,7 @@ const li
background-image: linear-gradient(#c7e3ff, #ffffff);
}
.small>li {
.small > li {
// display: inline-flex;
width: 650px;
height: 150px;

@ -3,7 +3,7 @@ import { ref, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { id } from 'element-plus/es/locales.mjs'
import * as echarts from 'echarts'
import {useRoute } from 'vue-router'
import { useRoute } from 'vue-router'
import { getCourseList } from '@/api/courseChaptersApi'
const route = useRoute()
// id id
@ -15,10 +15,26 @@ const booksList = ref([
])
const courseList = ref([
{ id: 1, specific: '思政目标', booklist: [{ id: 1, targetId: 1, introduce: '内容111111' }] },
{ id: 2, specific: '知识目标', booklist: [{ id: 1, targetId: 1, introduce: '内容222222' }] },
{ id: 3, specific: '能力目标', booklist: [{ id: 1, targetId: 1, introduce: '内容333333' }] },
{ id: 4, specific: '素质目标', booklist: [{ id: 1, targetId: 1, introduce: '内容444444' }] },
{
id: 1,
specific: '思政目标',
booklist: [{ id: 1, targetId: 1, introduce: '内容111111' }],
},
{
id: 2,
specific: '知识目标',
booklist: [{ id: 1, targetId: 1, introduce: '内容222222' }],
},
{
id: 3,
specific: '能力目标',
booklist: [{ id: 1, targetId: 1, introduce: '内容333333' }],
},
{
id: 4,
specific: '素质目标',
booklist: [{ id: 1, targetId: 1, introduce: '内容444444' }],
},
])
const targetList = ref([
{
@ -115,7 +131,9 @@ const editBook = (obj) => {
}
const del = (id) => {
// console.log(id);
courseList.booksList.value = booksList.value.filter((item) => item.id !== id)
courseList.value.booksList.value = booksList.value.filter(
(item) => item.id !== id,
)
}
// const disableChange = (id) => {
@ -139,20 +157,19 @@ const updateDisabledStatus = () => {
}
})
}
const list=ref([])
const content88=ref()
const list = ref([])
const content88 = ref()
const courseId = ref(0)
onMounted(async() => {
onMounted(async () => {
courseId.value = route.query.id
console.log(courseId.value);
console.log(courseId.value)
const res = await getCourseList({ id: courseId.value })
console.log(res);
list.value=res.data
console.log(list.value);
console.log(res)
list.value = res.data
console.log(list.value)
content88.value = list.value[0].contents[0].content
console.log(list.value[0].contents[0].content);
console.log(content88.value);
console.log(list.value[0].contents[0].content)
console.log(content88.value)
let chartDom = document.getElementById('main')
let myChart = echarts.init(chartDom)
@ -203,7 +220,9 @@ onMounted(async() => {
<div class="topContent">
<div class="title">| 课程总目标</div>
<div class="content1">
<textarea class="textarea" @change="textChange">{{ content88 }}</textarea>
<textarea class="textarea" @change="textChange">{{
content88
}}</textarea>
</div>
</div>
<div class="footContent">
@ -214,13 +233,17 @@ onMounted(async() => {
</div>
</div>
<div class="rightContent">
<div class="title" style="
<div
class="title"
style="
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
height: 60px;">
height: 60px;
"
>
<div class="left2">| 课程分目标</div>
<div class="right2">
<!-- <el-button type="primary" @click="addBook">新增</el-button> -->
@ -237,7 +260,9 @@ onMounted(async() => {
<!-- <el-button class="edit" type="text" @click="editBook(item)">
编辑
</el-button> -->
<el-button type="primary" @click="addBook(index)">新增</el-button>
<el-button type="primary" @click="addBook(index)">
新增
</el-button>
</div>
</div>
<div class="smallContent">
@ -247,14 +272,22 @@ onMounted(async() => {
<div class="partObject">
<div class="partObject1">
<!-- {{ item.introduce }} -->
课程目标{{ i+1 }}
课程目标{{ i + 1 }}
<!-- {{ filterTarger(obj.targetId) }} -->
</div>
<div class="partObject2">
<el-button class="edit" type="text" @click="editBook(obj)">
<el-button
class="edit"
type="text"
@click="editBook(obj)"
>
编辑
</el-button>
<el-button class="destroy" type="text" @click="del(obj.id)">
<el-button
class="destroy"
type="text"
@click="del(obj.id)"
>
删除
</el-button>
</div>
@ -272,7 +305,13 @@ onMounted(async() => {
</div>
</div>
</div>
<el-dialog v-if="dialogVisible" v-model="dialogVisible" title="新增目标" width="500" :before-close="handleClose">
<el-dialog
v-if="dialogVisible"
v-model="dialogVisible"
title="新增目标"
width="500"
:before-close="handleClose"
>
<el-form :model="formData" label-width="auto" style="max-width: 600px">
<!-- <el-form-item label="目标" prop="target">
<el-select v-model="formData.target" placeholder="Select" size="large" style="width: 240px">
@ -281,7 +320,10 @@ onMounted(async() => {
</el-select>
</el-form-item> -->
<el-form-item label="内容" prop="description">
<el-input v-model="formData.description" placeholder="请输入内容"></el-input>
<el-input
v-model="formData.description"
placeholder="请输入内容"
></el-input>
</el-form-item>
</el-form>
<template #footer>

@ -272,7 +272,6 @@ li {
margin-bottom: 10px;
padding: 10px;
box-sizing: border-box;
transition: box-shadow 0.3s;
cursor: pointer;
}

@ -24,9 +24,9 @@ const courses = [
]
</script>
<template>
<div class="info_container" style="width: 214px; height: 326px">
<div class="info_container" style="width: 90%; height: 326px">
<conheader title="已开科目"></conheader>
<div class="info_content" style="width: 214px; height: 264px">
<div class="info_content" style="width: 100%; height: 264px">
<div class="course-list">
<div
v-for="(course, index) in courses"

@ -24,9 +24,9 @@ const courses = [
]
</script>
<template>
<div class="info_container" style="width: 214px; height: 326px">
<div class="info_container" style="width: 90%; height: 326px">
<conheader title="我的科目"></conheader>
<div class="info_content" style="width: 214px; height: 264px">
<div class="info_content" style="width: 100%; height: 264px">
<div class="course-list">
<div
v-for="(course, index) in courses"

@ -46,19 +46,19 @@ function handleClick() {
justify-content: center;
align-items: center;
}
.overlay {
position: absolute;
top: 181px;
left: 1278px;
width: 40px;
height: 30px;
// background-color: lightgray;
border: 1px solid black;
z-index: 1000;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
margin-bottom: 10px;
}
// .overlay {
// position: absolute;
// top: 181px;
// left: 1278px;
// width: 40px;
// height: 30px;
// // background-color: lightgray;
// border: 1px solid black;
// z-index: 1000;
// display: flex;
// justify-content: center;
// flex-direction: column;
// align-items: center;
// margin-bottom: 10px;
// }
</style>

@ -95,9 +95,9 @@ onMounted(() => {
<template>
<div ref="echarsDom" class="main"></div>
</template>
<style>
<style scoped>
.main {
width: 766px;
width: 100%;
height: 352px;
}
</style>

@ -3,9 +3,9 @@ import echarts from '@/views/home/components/Echart/Echarts.vue'
import conheader from '@/views/home/components/ConHeader.vue'
</script>
<template>
<div class="info_container" style="width: 1257px; height: 384px">
<div class="info_container" style="width: 95%; height: 384px">
<conheader title="主页访问数据(次)"></conheader>
<div class="info_content" style="width: 766px; height: 352px">
<div class="info_content" style="width: 75%; height: 100%">
<echarts></echarts>
</div>
</div>

@ -1,7 +1,7 @@
<script setup>
import conheader from '@/views/home/components/ConHeader.vue'
import { onMounted, ref, computed } from 'vue'
import { userIdenService, userIdenChangeService } from '@/api/user/user.js'
import { userIdenChangeService } from '@/api/user/user.js'
import { Edit } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
const props = defineProps({
@ -9,7 +9,7 @@ const props = defineProps({
type: Object,
},
})
const id = props.data.id
console.log(props.data, 'info')
const formModel = ref()
const loading = ref()
//true
@ -45,81 +45,65 @@ const cancelEdit = () => {
}
}
const identInfo = ref()
//
// const getInfo = async (id) => {
// const res = await userIdenService(id)
// identInfo.value = res
// return res
// }
console.log()
onMounted(() => {
// getInfo(id)
// getInfo(id)
// .then((res) => {
// // 访 getData
// console.log(res.data, '000000')
// identInfo.value = res.data
// //
// if (res.data.roleId === 1) {
// formModel.value = [
// { par: 'name', name: '', content: res.data.name },
// { par: 'sex', name: '', content: res.data.sex },
// { par: 'nationality', name: '', content: res.data.nationality },
// { par: 'profession', name: '', content: res.data.profession },
// { par: 'education', name: '', content: res.data.education },
// { par: 'degree', name: '', content: res.data.degree },
// {
// par: 'professionalTitle',
// name: '',
// content: res.data.professionalTitle,
// },
// {
// par: 'emergencyContact',
// name: '',
// content: res.data.emergencyContact,
// },
// {
// par: 'joinWorkTime',
// name: '',
// content: res.data.joinWorkTime,
// },
// {
// par: 'politicalStatus',
// name: '',
// content: res.data.politicalStatus,
// },
// ]
// } else if (res.data.roleId === 2) {
// formModel.value = [
// { par: 'name', name: '', content: res.data.name },
// { par: 'sex', name: '', content: res.data.sex },
// { par: 'nationality', name: '', content: res.data.nationality },
// { par: 'number', name: '', content: res.data.number },
// { par: 'birthday', name: '', content: res.data.birthday },
// { par: 'phone', name: '', content: res.data.phone },
// { par: 'faculty', name: '', content: res.data.faculty },
// { par: 'major', name: '', content: res.data.major },
// { par: 'year_age', name: '', content: res.data.year_age },
// { par: 'class_name', name: '', content: res.data.class_name },
// ]
// }
// // else {
// // formModel.value = [
// // { name: '', content: res.data.name },
// // { name: '', content: res.data.id },
// // { name: '', content: 9.9 },
// // { name: '', content: 9.9 },
// // { name: '', content: 9.9 },
// // { name: '', content: 9.9 },
// // { name: '', content: 9.9 },
// // { name: '', content: 9.9 },
// // { name: '', content: 9.9 },
// // ]
// // }
// })
// .catch((error) => {
// console.error(error)
// })
// console.log(props.data, 'res')
if (props.data.roleId === 1) {
formModel.value = [
{ par: 'name', name: '姓名', content: props.data.name },
{ par: 'sex', name: '性别', content: props.data.sex },
{ par: 'nationality', name: '民族', content: props.data.nationality },
{ par: 'profession', name: '专业', content: props.data.profession },
{ par: 'education', name: '学历', content: props.data.education },
{ par: 'degree', name: '学位', content: props.data.degree },
{
par: 'professionalTitle',
name: '职称',
content: props.data.professionalTitle,
},
{
par: 'emergencyContact',
name: '手机号',
content: props.data.emergencyContact,
},
{
par: 'joinWorkTime',
name: '参加工作时间',
content: props.data.joinWorkTime,
},
{
par: 'politicalStatus',
name: '政治面貌',
content: props.data.politicalStatus,
},
]
} else if (props.data.roleId === 2) {
formModel.value = [
{ par: 'name', name: '姓名', content: props.data.name },
{ par: 'sex', name: '性别', content: props.data.sex },
{ par: 'nationality', name: '民族', content: props.data.nationality },
{ par: 'number', name: '学号', content: props.data.number },
{ par: 'birthday', name: '生日', content: props.data.birthday },
{ par: 'phone', name: '手机号', content: props.data.phone },
{ par: 'faculty', name: '院系', content: props.data.faculty },
{ par: 'major', name: '专业', content: props.data.major },
{ par: 'year_age', name: '入学年份', content: props.data.year_age },
{ par: 'class_name', name: '班级', content: props.data.class_name },
]
}
// else {
// formModel.value = [
// { name: '', content: res.data.name },
// { name: '', content: res.data.id },
// { name: '', content: 9.9 },
// { name: '', content: 9.9 },
// { name: '', content: 9.9 },
// { name: '', content: 9.9 },
// { name: '', content: 9.9 },
// { name: '', content: 9.9 },
// { name: '', content: 9.9 },
// ]
// }
console.log(formModel.value)
})
// 1
const drawer2 = ref(false)
@ -144,7 +128,7 @@ const confirmClick = () => {
}
</script>
<template>
<div class="info_container" style="width: 1265px; height: 306px">
<div class="info_container" style="width: 95%; height: 306px">
<conheader title="个人信息" v-model="drawer2">
<template #drawer>
<el-drawer v-model="drawer2" :direction="direction" class="table">
@ -203,7 +187,7 @@ const confirmClick = () => {
</conheader>
<div
class="info_content"
style="width: 776px; height: 244px"
style="width: 60%; height: 244px"
v-loading="loading"
>
<div class="item" :key="item.name" v-for="item in formModel">
@ -226,7 +210,7 @@ const confirmClick = () => {
gap: 10px; /* 设置元素之间的间隔 */
}
.item {
width: 176px;
width: 100%;
height: 60px;
display: flex;
flex-direction: column;

@ -9,7 +9,8 @@ const props = defineProps({
type: Object,
},
})
// console.log(props.data.icon, 44444)
// const data = ref(props.data, 'dsfd')
console.log(props.data, 44444)
const imageUrl = ref('')
//
const form = ref()
@ -37,7 +38,7 @@ const form = ref()
// code: [{ message: '', trigger: 'blur' }],
// }
form.value = props.data
const formLabelWidth = '140px'
const formLabelWidth = '70px'
//
imageUrl.value = props.data.icon
//
@ -61,15 +62,10 @@ const openFileInput = () => {
input.click()
document.body.removeChild(input)
}
const upload = async (option) => {
const res = await tool.oss.upload(option.file)
imageUrl.value = res.url
console.log(imageUrl.value)
}
//
const changeInfo = async () => {
const userInfo = {
username: form.value.username,
// username: form.value.username,
phone: form.value.phone,
id: form.value.id,
nickName: form.value.nickName,
@ -82,7 +78,7 @@ const changeInfo = async () => {
}
</script>
<template>
<div class="ident" style="width: 278px; height: 274px; background: #375fff">
<div class="ident" style="width: 100%; height: 274px; background: #375fff">
<div class="info_container" style="width: 201px; height: 178px">
<div class="avater">
<img :src="imageUrl" alt="Uploaded" v-if="imageUrl" class="avater" />
@ -104,11 +100,10 @@ const changeInfo = async () => {
title="登录信息"
style="width: 800px; text-align: center"
>
<el-form :model="form" style="" :data="form" :rules="rules">
<el-form :model="form" :data="form" :rules="rules">
<el-form-item label="用户名" :label-width="formLabelWidth">
<el-input v-model="form.username" autocomplete="off" />
</el-form-item>
<el-form-item label="昵称" :label-width="formLabelWidth">
<el-input v-model="form.nickName" autocomplete="off" />
</el-form-item>
@ -187,8 +182,6 @@ span {
text-align: center;
font-style: normal;
text-transform: none;
grid-area: element1;
position: relative;
margin-left: 27px;
top: 18px;
@ -198,7 +191,6 @@ span {
height: 24px;
border-radius: 100px 100px 100px 100px;
border: 2px solid #ffffff;
grid-area: element2;
background: #0052d9;
border-radius: 32px 32px 32px 32px;
display: flex;

@ -16,7 +16,7 @@ function confirmClick() {
}
</script>
<template>
<div class="info_container" style="width: 222px; height: 174px">
<div class="info_container" style="width: 90%; height: 174px">
<conheader title="学生分组" v-model="drawer2">
<div>编辑</div>
<template #drawer>

@ -16,7 +16,7 @@ function confirmClick() {
}
</script>
<template>
<div class="info_container" style="width: 222px; height: 174px">
<div class="info_container" style="width: 90%; height: 174px">
<conheader title="已分组别" v-model="drawer2">
<div>编辑</div>
<template #drawer>

@ -13,7 +13,7 @@ const props = defineProps({
</template>
<style scoped>
.nav_info {
width: 1265px;
width: 95%;
height: 32px;
display: flex;
justify-content: start;
@ -32,7 +32,7 @@ const props = defineProps({
margin-right: 68px;
}
.intro {
width: 257px;
width: 50%;
height: 22px;
font-family: Inter, Inter;
font-weight: bold;

@ -9,38 +9,34 @@ import Class2 from './components/Class2.vue'
import Student2 from './components/Student2.vue'
import useUserStore from '@/store/modules/user'
import { ref, onMounted } from 'vue'
import { toRaw } from 'vue'
const userStore = useUserStore()
// const info = userStore.getUserInfo()
// console.log(info)
const username = ref()
const data = ref(null)
const data = ref({})
const infoData = ref()
const flag = ref(false)
const role = ref(null)
const rightVisible = ref(false)
const getData = async () => {
await userStore
.getUserInfo()
.then((response) => {
const res = toRaw(response.result.data)
username.value = res.username
data.value = res
flag.value = true
role.value = data.value.roles[0]
if (role.value === '老师') {
rightVisible.value = true
} else {
rightVisible.value = false
}
console.log(data.value, 333333)
})
.catch((error) => {
console.log(error)
})
await userStore.getUserInfo().catch((error) => {
console.log(error)
})
}
onMounted(() => {
getData()
// getData()
username.value = userStore.userName
data.value = userStore.data
infoData.value = userStore.userInfo
// console.log(data.value, '11111')
// console.log(userStore.userInfo, '22222')
// console.log(userStore, 'userStore')
username.value = data.value.username
flag.value = true
role.value = data.value.roles[0]
if (role.value === '老师') {
rightVisible.value = true
} else {
rightVisible.value = false
}
})
</script>
<template>
@ -49,28 +45,28 @@ onMounted(() => {
<div class="nav">
<welcome :username="username"></welcome>
</div>
<div class="info" style="width: 1321px; height: 368px">
<Info :data="data" v-if="flag"></Info>
<div class="info" style="width: 100%; height: 368px">
<Info :data="infoData" v-if="flag"></Info>
</div>
<div class="echarts" style="width: 1321px; height: 444px">
<div class="echarts" style="width: 100%; height: 444px">
<echarts></echarts>
</div>
</div>
<div v-if="rightVisible" class="right">
<status :data="data" v-if="flag"></status>
<div class="class" style="width: 278px; height: 388px">
<div class="class" style="width: 100%; height: 388px">
<Class1></Class1>
</div>
<div class="stu" style="width: 278px; height: 236px">
<div class="stu" style="width: 100%; height: 236px">
<Student1></Student1>
</div>
</div>
<div v-else class="right">
<status :data="data" v-if="flag"></status>
<div class="class" style="width: 278px; height: 388px">
<div class="class" style="width: 100%; height: 388px">
<Class2></Class2>
</div>
<div class="stu" style="width: 278px; height: 236px">
<div class="stu" style="width: 100%; height: 236px">
<Student2></Student2>
</div>
</div>
@ -79,15 +75,16 @@ onMounted(() => {
<style lang="scss" scoped>
.container {
display: flex;
width: 100%;
.left {
width: 1321px;
width: 80%;
height: 936px;
margin-right: 16px;
display: grid;
grid-template-rows: 1fr 1fr 1fr; /* 使用fr单位来平均分布 */
height: 300px; /* 设置容器高度 */
.nav {
width: 1321px;
width: 100%;
height: 92px;
background: #ffffff;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
@ -115,7 +112,7 @@ onMounted(() => {
}
}
.class {
width: 1321px;
width: 80%;
height: 444px;
background: #c57676;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
@ -127,7 +124,7 @@ onMounted(() => {
}
}
.right {
width: 278px;
width: 20%;
height: 930px;
display: flex;
flex-direction: column; //

@ -300,7 +300,7 @@ import {
userRegisterService,
userPhoneRegisterService,
userCodeRegisterService,
} from '@/api/user/user.js'
} from '@/api/user/user'
// let loginForm = reactive({ username: 'admin', password: '111111' })
//
let userStore = useUserStore()
@ -371,7 +371,7 @@ const rules = {
code: [{ message: '验证码不能为空', trigger: 'blur' }],
}
//--
//
const countdown = ref(0)
let timer
const updateCountdown = () => {
@ -414,6 +414,7 @@ const checkPasswordMatch = () => {
passwordMatchError.value = ''
}
}
//json
const handleSubmit = async () => {
//
@ -467,7 +468,7 @@ const phoneChange = () => {
console.log('开始手机号注册')
isinfo.value = false
}
//
//
const phoneReturn = () => {
isinfo.value = true
}

@ -10,7 +10,6 @@
<li>学生入口&nbsp;&nbsp;|</li>
<li>毕业生入口</li>
</ul>
</div>
<div class="nav2">
<ul>
@ -33,58 +32,67 @@
<!-- 内容学习路径推荐d3 -->
<div class="content">
<div class="subnav">
<h1>xxx课程</h1>
</div>
<div class="container"></div>
<h1>xxx课程</h1>
</div>
<div class="container"></div>
</div>
<!-- 底部 -->
<div class="footer">
<h3>软件工程专业</h3>
<h1>教学一体化平台</h1>
<p>关于我们&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; &nbsp;联系我们&nbsp; &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; 服务协议
<p>
关于我们&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; &nbsp;联系我们&nbsp;
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; 服务协议
</p>
<p style="font-size: 13px; margin-top: 70px">
黄淮学院版权所有@2023 湘豫CP备 19005950-1
<br />
违法和不良信息举报 举报电话0xxx-8xxxxxxx 举报邮箱xxxxxxxxx@qq.com
</p>
<p style="font-size: 13px;margin-top: 70px">黄淮学院版权所有@2023 湘豫CP备 19005950-1<br>
违法和不良信息举报 举报电话0xxx-8xxxxxxx 举报邮箱xxxxxxxxx@qq.com</p>
</div>
<div>
</div>
<div></div>
</template>
<script lang="ts" >
import * as d3 from 'd3';
<script lang="ts">
import * as d3 from 'd3'
// import { onMounted } from 'vue';
export default {
name: 'courseHomepage',
data() {
return {
svgArea:null,
links:[],
nodes:[],
nodesName:[],
linksName:[],
simulation:null,
scale:1,
width:800,
height:560,
colorList:['#FD7623','#3388B1','#D82952','#F3D737','#409071','#D64E52'],
svgArea: null,
links: [],
nodes: [],
nodesName: [],
linksName: [],
simulation: null,
scale: 1,
width: 800,
height: 560,
colorList: [
'#FD7623',
'#3388B1',
'#D82952',
'#F3D737',
'#409071',
'#D64E52',
],
testGraph: {
"nodes": [
{ "id": "Myriel", "group": 1 },
{ "id": "Napoleon", "group": 1 },
{ "id": "Mlle.Baptistine", "group": 1 },
{ "id": "Mme.Magloire", "group": 1 },
{ "id": "CountessdeLo", "group": 1 },
{ "id": "Geborand", "group": 1 },
{ "id": "Champtercier", "group": 1 },
{ "id": "Cravatte", "group": 1 },
{ "id": "Count", "group": 1 },
{ "id": "OldMan", "group": 1 },
{ "id": "Labarre", "group": 2 },
{ "id": "Valjean", "group": 2 },
nodes: [
{ id: 'Myriel', group: 1 },
{ id: 'Napoleon', group: 1 },
{ id: 'Mlle.Baptistine', group: 1 },
{ id: 'Mme.Magloire', group: 1 },
{ id: 'CountessdeLo', group: 1 },
{ id: 'Geborand', group: 1 },
{ id: 'Champtercier', group: 1 },
{ id: 'Cravatte', group: 1 },
{ id: 'Count', group: 1 },
{ id: 'OldMan', group: 1 },
{ id: 'Labarre', group: 2 },
{ id: 'Valjean', group: 2 },
// { "id": "Marguerite", "group": 3 },
// { "id": "Mme.deR", "group": 2 },
// { "id": "Isabeau", "group": 2 },
@ -151,8 +159,8 @@ export default {
// { "id": "Brujon", "group": 4 },
// { "id": "Mme.Hucheloup", "group": 8 }
],
"links": [
{ "source": "Napoleon", "target": "Myriel", "value": 1 },
links: [
{ source: 'Napoleon', target: 'Myriel', value: 1 },
// { "source": "Mlle.Baptistine", "target": "Myriel", "value": 8 },
// { "source": "Mme.Magloire", "target": "Myriel", "value": 10 },
// { "source": "Mme.Magloire", "target": "Mlle.Baptistine", "value": 6 },
@ -406,12 +414,10 @@ export default {
// { "source": "Mme.Hucheloup", "target": "Courfeyrac", "value": 1 },
// { "source": "Mme.Hucheloup", "target": "Gavroche", "value": 1 },
// { "source": "Mme.Hucheloup", "target": "Enjolras", "value": 1 }
]
],
// "links":[]
}
};
},
}
},
mounted() {
// .then(function(response){
@ -420,143 +426,161 @@ export default {
// .catch(function(error){
// console.log(error)
// })
this.initGraph(this.testGraph);
this.initGraph(this.testGraph)
},
methods: {
initGraph(data: {
nodes: { id: string; group: number; }[]; links: { // import { onMounted } from 'vue';
source: string; target: string; value: number;
}[];
nodes: { id: string; group: number }[]
links: {
// import { onMounted } from 'vue';
source: string
target: string
value: number
}[]
}) {
const _this = this;
const links = data.links;
const nodes = data.nodes;
const _this = this
const links = data.links
const nodes = data.nodes
// const links = data.links.map((d: object | null) => Object.create(d));
// const nodes = data.nodes.map((d: object | null) => Object.create(d));
const simulation = d3.forceSimulation(nodes)
.force("link", d3.forceLink(links).id((d: { id: any; }) => d.id))
.force("collide",d3.forceCollide().radius(()=> 30) )
.force("charge", d3.forceManyBody().strength(-30))
.force("center", d3.forceCenter(_this.width / 2, _this.height / 2));
const svg = d3.select(".container")
.append("svg")
.attr("viewBox", `0 0 ${_this.width} ${_this.height}`);
svg.call(d3.zoom().on("zoom",function(){
g.attr("transform",d3.event.transform)
}))
const g = svg.append("g")
const link = g.append("g")
.attr("stroke", "#999")
.attr("stroke-opacity", 0.6)
.selectAll("line")
const simulation = d3
.forceSimulation(nodes)
.force(
'link',
d3.forceLink(links).id((d: { id: any }) => d.id),
)
.force(
'collide',
d3.forceCollide().radius(() => 30),
)
.force('charge', d3.forceManyBody().strength(-30))
.force('center', d3.forceCenter(_this.width / 2, _this.height / 2))
const svg = d3
.select('.container')
.append('svg')
.attr('viewBox', `0 0 ${_this.width} ${_this.height}`)
svg.call(
d3.zoom().on('zoom', function () {
g.attr('transform', d3.event.transform)
}),
)
const g = svg.append('g')
const link = g
.append('g')
.attr('stroke', '#999')
.attr('stroke-opacity', 0.6)
.selectAll('line')
.data(links)
.join("line")
.attr("stroke-width", (d: { value: number; }) => Math.sqrt(d.value))
.attr("class", "link");
.join('line')
.attr('stroke-width', (d: { value: number }) => Math.sqrt(d.value))
.attr('class', 'link')
const node = g.append("g")
.selectAll("circle")
const node = g
.append('g')
.selectAll('circle')
.data(nodes)
.join("circle")
.attr("r", 40)
.attr("class","node")
.attr("fill", _this.color)
.on("click",_this.queryTest)
.call(_this.drag(simulation));
node.append("title")
.text((d: { id: any; }) => d.id);
const nodeNameText = g.append("g")
.selectAll("text")
.join('circle')
.attr('r', 40)
.attr('class', 'node')
.attr('fill', _this.color)
.on('click', _this.queryTest)
.call(_this.drag(simulation))
node.append('title').text((d: { id: any }) => d.id)
const nodeNameText = g
.append('g')
.selectAll('text')
.data(nodes)
.join("text")
.text(function(d: { id: any; }){
.join('text')
.text(function (d: { id: any }) {
return d.id
})
.attr("fill","white")
.attr("dx",function () {
return this.getBoundingClientRect().width/2*(-1)
})
.attr("dy",50)
.attr("class","node-name")
node.on("mouseover", function (d, i) {
d3.select(this)
.attr("stroke", "white") //
.attr("stroke-width", 5); //
})
.on("mouseout", function (d, i) {
.attr('fill', 'white')
.attr('dx', function () {
return (this.getBoundingClientRect().width / 2) * -1
})
.attr('dy', 50)
.attr('class', 'node-name')
node
.on('mouseover', function (d, i) {
d3.select(this)
.attr("stroke", "none"); //
});
.attr('stroke', 'white') //
.attr('stroke-width', 5) //
})
.on('mouseout', function (d, i) {
d3.select(this).attr('stroke', 'none') //
})
simulation.on("tick", () => {
simulation.on('tick', () => {
link
.attr("x1", (d: { source: { x: any; }; }) => d.source.x)
.attr("y1", (d: { source: { y: any; }; }) => d.source.y)
.attr("x2", (d: { target: { x: any; }; }) => d.target.x)
.attr("y2", (d: { target: { y: any; }; }) => d.target.y);
.attr('x1', (d: { source: { x: any } }) => d.source.x)
.attr('y1', (d: { source: { y: any } }) => d.source.y)
.attr('x2', (d: { target: { x: any } }) => d.target.x)
.attr('y2', (d: { target: { y: any } }) => d.target.y)
node
.attr("cx", (d: { x: any; }) => d.x)
.attr("cy", (d: { y: any; }) => d.y);
.attr('cx', (d: { x: any }) => d.x)
.attr('cy', (d: { y: any }) => d.y)
nodeNameText
.attr("x", (d: { x: any; }) => d.x)
.attr("y", (d: { y: any; })=> d.y);
});
nodeNameText
.attr('x', (d: { x: any }) => d.x)
.attr('y', (d: { y: any }) => d.y)
})
},
updateGraph(data: { links: any[]; }){
updateGraph(data: { links: any[] }) {
// var _this = this
const links = data.links.map((d: object | null)=>Object.create(d));
const nodes = data.nodes.map((d: object | null)=>Object.create(d));
const links = data.links.map((d: object | null) => Object.create(d))
const nodes = data.nodes.map((d: object | null) => Object.create(d))
},
color(d: { group: string | number; }) {
color(d: { group: string | number }) {
return this.colorList[d.group]
// const scale = d3.scaleOrdinal(d3.schemeCategory10);
// return (d: { group: any; }) => scale(d.group);
},
drag(simulation: { alphaTarget: (arg0: number) => { (): any; new(): any; restart: { (): void; new(): any; }; }; }) {
function dragstarted(event: { active: any; }) {
if (!event.active) simulation.alphaTarget(0.3).restart();
d3.event.subject.fx = d3.event.x;
d3.event.subject.fy = d3.event.y;
drag(simulation: {
alphaTarget: (arg0: number) => {
(): any
new (): any
restart: { (): void; new (): any }
}
}) {
function dragstarted(event: { active: any }) {
if (!event.active) simulation.alphaTarget(0.3).restart()
d3.event.subject.fx = d3.event.x
d3.event.subject.fy = d3.event.y
}
function dragged(event: any) {
d3.event.subject.fx = d3.event.x;
d3.event.subject.fy = d3.event.y;
d3.event.subject.fx = d3.event.x
d3.event.subject.fy = d3.event.y
}
function dragended(event: { active: any; }) {
if (!event.active) simulation.alphaTarget(0);
d3.event.subject.fx = null;
d3.event.subject.fy = null;
function dragended(event: { active: any }) {
if (!event.active) simulation.alphaTarget(0)
d3.event.subject.fx = null
d3.event.subject.fy = null
}
return d3.drag()
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended);
return d3
.drag()
.on('start', dragstarted)
.on('drag', dragged)
.on('end', dragended)
},
queryTest(d: { id: any; }){
queryTest(d: { id: any }) {
// var _this = this
console.log(d.id)
}
}
},
},
}
</script>
<style lang="scss" scoped>
* {
margin: 0;
@ -596,8 +620,6 @@ img {
background-image: url('/src/assets/images/top.png');
background-size: 100% 100%;
// background:linear-gradient(#74a5ff,#91b7ff,#A4c3ff);
}
//
@ -612,8 +634,7 @@ img {
width: 24%;
height: 10%;
margin-right: 20px;
// background-color: #6759ff;
// background-color: #6759ff;
}
.header .nav1 ul li {
@ -623,7 +644,7 @@ img {
color: white;
font-size: 12px;
text-align: center;
// border-right: 1px solid #FFFFFF;
// border-right: 1px solid #FFFFFF;
}
.header .nav2 {
@ -634,7 +655,7 @@ img {
height: 25%;
margin-top: 30px;
// margin-right: -260px;
// background-color: #6759ff;
// background-color: #6759ff;
}
.header .nav2 ul li {
@ -662,17 +683,17 @@ img {
font-size: 50px;
margin-top: 23px;
font-weight: bolder;
color: #FFFFFF;
color: #ffffff;
float: right;
margin-right: 173px // float: left;
// margin-left: 779px;
margin-right: 173px; // float: left;
// margin-left: 779px;
}
.header p {
font-size: 15px;
margin-top: 102px;
// font-weight:bolder;
color: #FFFFFF;
color: #ffffff;
float: right;
margin-right: -175px;
}
@ -684,11 +705,11 @@ img {
margin-left: 80px;
}
//
.content{
.content {
margin-top: 10;
width: 100%;
height: 900px;
background-color: #7F9EED;
background-color: #7f9eed;
}
.subnav {
width: 100%;
@ -699,44 +720,44 @@ img {
}
.subnav h1 {
border-bottom: 4px solid #0052FF;
border-bottom: 4px solid #0052ff;
font-size: 20px;
width: 10%;
height: 35px;
margin: auto;
font-weight: bolder;
color: #0052FF;
color: #0052ff;
text-align: center;
}
// d3
.container{
width: 1000px;
height: 700px;
// border: 1px solid #2c3e50;
border-radius:8px;
margin-top: 40px;
margin-left: auto;
// border-radius: 50%;
margin-right: auto;
border: #79c4f3;
background-color: #79c4f3 ;
// background: #79c4f3 repeating-linear-gradient(30deg,
// hsla(0, 0%, 100%, .1), hsla(0, 0%, 100%, .1) 15px,
// transparent 0, transparent 30px);
}
.node{
stroke:#fff;
stroke-width:1;
cursor: pointer;
}
.node:hover{
stroke-width:5;
}
.nodeName{
fill:white;
}
.container {
width: 1000px;
height: 700px;
// border: 1px solid #2c3e50;
border-radius: 8px;
margin-top: 40px;
margin-left: auto;
// border-radius: 50%;
margin-right: auto;
border: #79c4f3;
background-color: #79c4f3;
// background: #79c4f3 repeating-linear-gradient(30deg,
// hsla(0, 0%, 100%, .1), hsla(0, 0%, 100%, .1) 15px,
// transparent 0, transparent 30px);
}
.node {
stroke: #fff;
stroke-width: 1;
cursor: pointer;
}
.node:hover {
stroke-width: 5;
}
.nodeName {
fill: white;
}
//
.footer {
@ -755,17 +776,17 @@ img {
text-align: center;
font-size: 15px;
padding-top: 40px;
color: #7F9EED;
color: #7f9eed;
font-weight: bolder;
}
.footer h1 {
width: 100%;
// position: absolute;
font-family: "kaiti_gb2312";
font-family: 'kaiti_gb2312';
margin-top: 10px;
font-size: 25px;
color: #7F9EED;
color: #7f9eed;
font-weight: bolder;
}
@ -773,9 +794,9 @@ img {
width: 100%;
height: 20px;
// position: absolute;
font-family: "kaiti_gb2312";
font-family: 'kaiti_gb2312';
margin-top: 25px;
font-size: 17px;
color: #7F9EED;
color: #7f9eed;
}
</style>

@ -1,33 +1,40 @@
<template>
<div id="3d-graph"></div>
<div id="3d-graph"></div>
</template>
<script lang="ts" setup>
// import { useRouter } from 'vue-router'
import { onMounted, ref,reactive } from 'vue'
import { onMounted, ref, reactive } from 'vue'
import ForceGraph3D from '3d-force-graph'
//@ts-ignore
import { CSS2DRenderer, CSS2DObject,} from 'three/examples/jsm/renderers/CSS2DRenderer.js'
import {
CSS2DRenderer,
CSS2DObject,
} from 'three/examples/jsm/renderers/CSS2DRenderer.js'
//@ts-ignore
import SpriteText from '../spritetext.js'
import SpriteText from '../spritetext.js'
// const $router = useRouter()
// const jsonData = ref(null)
let Graph = reactive({})
let Graph = reactive({})
const props = defineProps({
width:{
type:Number,
default:window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
width: {
type: Number,
default:
window.innerWidth ||
document.documentElement.clientWidth ||
document.body.clientWidth,
},
height: {
type: Number,
default:
window.innerHeight ||
document.documentElement.clientHeight ||
document.body.clientHeight,
},
height:{
type:Number,
default:window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
}
})
const dom = ref(null)
onMounted(() => {
Graph = ForceGraph3D({
Graph = ForceGraph3D({
extraRenderers: [new CSS2DRenderer()],
})(document.getElementById('3d-graph') as HTMLElement)
.jsonUrl('../../../public/data.json')
@ -40,7 +47,7 @@ onMounted(() => {
// console.log(node, 111, Graph.graphData().nodes)
return new CSS2DObject(nodeEl)
})
.linkLabel((link:any) => link.label) //
.linkLabel((link: any) => link.label) //
.linkWidth(0.8)
.linkHoverPrecision(0.5) //
.linkColor(() => '#dd92fd') // 线
@ -101,7 +108,6 @@ onMounted(() => {
} else {
return '#dd92fd'
}
})
} else {
// Graph.linkColor(() => '#a4c7fe') // 线
@ -112,40 +118,39 @@ onMounted(() => {
//@ts-ignore
Graph.graphData(graphData)
})
dom.value = document.querySelector('canvas') as any
dom.value = document.querySelector('canvas') as any
})
const setLabel = () => {
//@ts-ignore
Graph.linkThreeObject((link:any) => {
// extend link with text sprite
const sprite = new SpriteText(`${link.label}`);
sprite.color = '#ccc';
sprite.textHeight = 1.5;
return sprite;
})
Graph.linkThreeObject((link: any) => {
// extend link with text sprite
const sprite = new SpriteText(`${link.label}`)
sprite.color = '#ccc'
sprite.textHeight = 1.5
return sprite
})
//@ts-ignore
Graph.linkPositionUpdate((sprite, { start, end }) => {
//@ts-ignore
const middlePos = Object.assign(
...['x', 'y', 'z'].map((c) => ({
//@ts-ignore
Graph.linkPositionUpdate((sprite, { start, end }) => {
//@ts-ignore
const middlePos = Object.assign(...['x', 'y', 'z'].map(c => ({
//@ts-ignore
[c]: start[c] + (end[c] - start[c]) / 2 // calc middle point
})));
[c]: start[c] + (end[c] - start[c]) / 2, // calc middle point
})),
)
// Position sprite
Object.assign(sprite.position, middlePos);
});
//@ts-ignore
Graph.d3Force('charge').strength(-120);
// Position sprite
Object.assign(sprite.position, middlePos)
})
//@ts-ignore
Graph.d3Force('charge').strength(-120)
}
// const goToEditAtlas = () => {
// console.log(jsonData.value)
// $router.push({ name: 'EditAtlas', params: { id: 123 } })
// }
</script>
<style lang='scss' scoped>
</style>
<style lang="scss" scoped></style>

@ -64,7 +64,9 @@
</div>
<div class="sidebar">
<div class="icon"><img src="/src/assets/images/rjgz.jpg" width="100%" height="100%"></div>
<div class="icon">
<img src="/src/assets/images/rjgz.jpg" width="100%" height="100%" />
</div>
<!-- <div class="content">
<h3>课程目标</h3>
<div class="btn">了解更多</div>
@ -387,7 +389,7 @@ body {
margin-left: 20px;
// background-color: rgb(84, 50, 9)
}
.sidebar .icon{
.sidebar .icon {
width: 100%;
height: 20%;
}

@ -39,8 +39,20 @@
<div class="sidebar">
<div class="sidebar-header">
<div class="sidebar-header-imag">
<div class="sidebar-header-imag1"><img src="/src/assets/images/gd (3).png" width="100%" height="100%"></div>
<div class="sidebar-header-imag2"><img src="/src/assets/images/sjx(1).png" width="100%" height="100%"></div>
<div class="sidebar-header-imag1">
<img
src="/src/assets/images/gd (3).png"
width="100%"
height="100%"
/>
</div>
<div class="sidebar-header-imag2">
<img
src="/src/assets/images/sjx(1).png"
width="100%"
height="100%"
/>
</div>
</div>
<h1>知识点</h1>
<p>共发布225个</p>
@ -51,11 +63,17 @@
<div class="content">
<div class="txt">
<div class="txt1">联试题数233 &nbsp;&nbsp;&nbsp;关联学习数22</div>
<div class="imag"><img src="/src/assets/images/sjx(1).png" width="100%" height="100%"></div>
<div class="imag">
<img
src="/src/assets/images/sjx(1).png"
width="100%"
height="100%"
/>
</div>
</div>
</div>
<div class="lina">
<e-charts style="height: 260px;" id="lina" />
<e-charts style="height: 260px" id="lina" />
</div>
<!-- <div id="staff_all_orderCount" style="width: 300px;height:300px;"></div> -->
<!-- <e-chars class="lina" option="option"/> -->
@ -64,16 +82,20 @@
<div class="completion">
<!-- <div class="echates-title">知识点掌握百分比</div> -->
<div class="box">
<div id="liquidfill" style="width: 65%; height: 65%; "></div>
<div id="liquidfill" style="width: 65%; height: 65%"></div>
<div class="percentage">
<h4>平均完成率:<p>80%</p>
<h4>
平均完成率:
<p>80%</p>
</h4>
</div>
</div>
<div class="box">
<div id="liquidfil" style="width: 65%; height: 65%; "></div>
<div id="liquidfil" style="width: 65%; height: 65%"></div>
<div class="percentage">
<h4>平均完成率:<p>60%</p>
<h4>
平均完成率:
<p>60%</p>
</h4>
</div>
</div>
@ -112,11 +134,11 @@
<h1>49</h1>
<p>80% ~ 100%</p>
</div>
<div class="libox" style="border-left: 2px solid #74a5ff;">
<div class="libox" style="border-left: 2px solid #74a5ff">
<h1>3</h1>
<p>60% ~ 79%</p>
</div>
<div class="libox" style="border-left: 2px solid #74a5ff;">
<div class="libox" style="border-left: 2px solid #74a5ff">
<h1>4</h1>
<p>59%以下</p>
</div>
@ -130,20 +152,22 @@
</div>
<div class="lin"></div>
</div>
</div>
</div>
<!-- 底部 -->
<div class="footer">
<h3>软件工程专业</h3>
<h1>教学一体化平台</h1>
<p>关于我们&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; &nbsp;联系我们&nbsp; &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; 服务协议
<p>
关于我们&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; &nbsp;联系我们&nbsp;
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; 服务协议
</p>
<p style="font-size: 13px; margin-top: 70px">
黄淮学院版权所有@2023 湘豫CP备 19005950-1
<br />
违法和不良信息举报 举报电话0xxx-8xxxxxxx 举报邮箱xxxxxxxxx@qq.com
</p>
<p style="font-size: 13px;margin-top: 70px">黄淮学院版权所有@2023 湘豫CP备 19005950-1<br>
违法和不良信息举报 举报电话0xxx-8xxxxxxx 举报邮箱xxxxxxxxx@qq.com</p>
</div>
<div></div>
</template>
@ -151,34 +175,34 @@
<script lang="ts" setup>
// import axios from 'axios';
import { ref, onMounted, markRaw } from 'vue'
import * as echarts from 'echarts';
import * as echarts from 'echarts'
import 'echarts-liquidfill'
// var ROOT_PATH = 'https://echarts.apache.org/examples';
// type EChartsOption = echarts.EChartsOption;
var option = null
let option = null
// dom dom
onMounted(() => {
const dom = document.getElementById('main')
// dom echarts
var myChart = echarts.init(dom);
let myChart = echarts.init(dom)
console.log(dom, 'dom')
// loading
myChart.showLoading();
myChart.showLoading()
// json
fetch('../../../public/nodeList.json').then((res) => {
res.json().then(graph => {
console.log(graph);
myChart.hideLoading();
res.json().then((graph) => {
console.log(graph)
myChart.hideLoading()
// node links
option = {
tooltip: {},
legend: [
{
data: graph.categories.map(function (a: { name: string }) {
return a.name;
})
}
return a.name
}),
},
],
series: [
@ -193,44 +217,35 @@ onMounted(() => {
label: {
show: true,
position: 'right',
formatter: '{b}'
formatter: '{b}',
},
labelLayout: {
hideOverlap: true
hideOverlap: true,
},
scaleLimit: {
min: 0.4,
max: 2
max: 2,
},
lineStyle: {
color: 'source',
curveness: 0.3
}
}
]
};
curveness: 0.3,
},
},
],
}
// echarts
myChart.setOption(option);
myChart.setOption(option)
})
})
// option && myChart.setOption(option);
})
onMounted(() => {
const chartInstance: any = ref(null)
const updateChart = () => {
chartInstance.value = markRaw(
echarts.init(document?.getElementById(`liquidfill`,)),
echarts.init(document?.getElementById(`liquidfill`)),
)
const option = {
series: [
@ -289,40 +304,38 @@ onMounted(() => {
onMounted(() => {
const dom = document.getElementById('lina')
// dom echarts
var myChart = echarts.init(dom);
let myChart = echarts.init(dom)
console.log(dom, 'dom')
// loading
myChart.showLoading();
myChart.showLoading()
// json
fetch('../../../public/nodeList.json').then((res) => {
res.json().then(graph => {
console.log(graph);
myChart.hideLoading();
res.json().then((graph) => {
console.log(graph)
myChart.hideLoading()
// node links
option = {
xAxis: {
type: 'category',
boundaryGap: false,
data: ['记忆', '理解', '应用', '分析', '评价'],
data: ['记忆', '理解', '应用', '分析', '评价'],
axisLine: {
lineStyle: {
color: '#5470C6' // X
}
}
lineStyle: {
color: '#5470C6', // X
},
},
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: '#5470C6' // Y
}
},
color: '#5470C6', // Y
},
},
// min:'700',
splitLine: {
show: false
}
show: false,
},
},
series: [
{
@ -330,28 +343,26 @@ onMounted(() => {
type: 'line',
areaStyle: {
color: '#76A6FF',
opacity: 0.5
opacity: 0.5,
},
}
]
};
},
],
}
// echarts
myChart.setOption(option);
myChart.setOption(option)
})
})
// option && myChart.setOption(option);
})
//
onMounted(() => {
const chartInstance: any = ref(null)
const updateChart = () => {
chartInstance.value = markRaw(
echarts.init(document?.getElementById(`liquidfil`,)),
echarts.init(document?.getElementById(`liquidfil`)),
)
const option = {
series: [
@ -428,7 +439,6 @@ onMounted(() => {
* {
margin: 0;
padding: 0;
}
ul {
@ -461,8 +471,6 @@ img {
background-image: url('/src/assets/images/top.png');
background-size: 100% 100%;
// background:linear-gradient(#74a5ff,#91b7ff,#A4c3ff);
}
//
@ -477,8 +485,7 @@ img {
width: 24%;
height: 10%;
margin-right: 20px;
// background-color: #6759ff;
// background-color: #6759ff;
}
.header .nav1 ul li {
@ -488,7 +495,7 @@ img {
color: white;
font-size: 12px;
text-align: center;
// border-right: 1px solid #FFFFFF;
// border-right: 1px solid #FFFFFF;
}
.header .nav2 {
@ -499,7 +506,7 @@ img {
height: 25%;
margin-top: 30px;
// margin-right: -260px;
// background-color: #6759ff;
// background-color: #6759ff;
}
.header .nav2 ul li {
@ -527,17 +534,17 @@ img {
font-size: 50px;
margin-top: 23px;
font-weight: bolder;
color: #FFFFFF;
color: #ffffff;
float: right;
margin-right: 173px // float: left;
// margin-left: 779px;
margin-right: 173px; // float: left;
// margin-left: 779px;
}
.header p {
font-size: 15px;
margin-top: 102px;
// font-weight:bolder;
color: #FFFFFF;
color: #ffffff;
float: right;
margin-right: -175px;
}
@ -558,13 +565,13 @@ img {
}
.subnav h1 {
border-bottom: 4px solid #0052FF;
border-bottom: 4px solid #0052ff;
font-size: 20px;
width: 10%;
height: 35px;
margin: auto;
font-weight: bolder;
color: #0052FF;
color: #0052ff;
text-align: center;
}
@ -578,7 +585,6 @@ img {
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-around;
}
.chart {
@ -605,8 +611,8 @@ img {
.sidebar .sidebar-header {
width: 100%;
height: 7%;
background: linear-gradient(#74a5ff, #91b7ff, #A4c3ff);
// transform: perspective(3em) rotateY(-6deg);
background: linear-gradient(#74a5ff, #91b7ff, #a4c3ff);
// transform: perspective(3em) rotateY(-6deg);
}
.sidebar .sidebar-header-imag {
@ -641,7 +647,7 @@ img {
font-size: 16px;
line-height: 30px;
// background-color: #728cc4;
// transform: perspective(3em) rotateY(-6deg);
// transform: perspective(3em) rotateY(-6deg);
}
.sidebar .sidebar-header p {
@ -653,7 +659,7 @@ img {
font-size: 13px;
line-height: 30px;
// background-color: #728cc4;
// transform: perspective(3em) rotateY(-6deg);
// transform: perspective(3em) rotateY(-6deg);
}
.sidebar .sidebar-header a {
@ -665,7 +671,7 @@ img {
font-size: 13px;
line-height: 30px;
// background-color: #728cc4;
// transform: perspective(3em) rotateY(-6deg);
// transform: perspective(3em) rotateY(-6deg);
}
.sidebar .sidebar-header-line {
@ -676,17 +682,16 @@ img {
float: left;
margin-top: 1.5%;
// box-shadow: 1.5px -2px #F0F4FA;
box-shadow: 0px -2px 3px 2px #F0F4FA;
box-shadow: 0px -2px 3px 2px #f0f4fa;
// box-shadow: 1.5px 1px #F0F4FA;
// transform: perspective(3em) rotateY(-6deg);
// transform: perspective(3em) rotateY(-6deg);
}
.sidebar .content {
width: 100%;
height: 6%;
background: linear-gradient(#74a5ff, #91b7ff, #A4c3ff);
background: linear-gradient(#74a5ff, #91b7ff, #a4c3ff);
margin-top: 10px;
}
.sidebar .content .txt {
@ -697,7 +702,6 @@ img {
justify-content: space-between;
flex-wrap: nowrap;
display: flex;
}
.sidebar .content .txt .imag {
@ -710,9 +714,8 @@ img {
height: 5%;
font-size: 14px;
margin-left: 4px;
color: #FFFFFF;
color: #ffffff;
margin-top: 15px;
}
.sidebar .lina {
@ -772,7 +775,7 @@ img {
display: flex;
flex-wrap: nowrap;
justify-content: space-evenly;
color: #F0F4FA;
color: #f0f4fa;
font-weight: bold;
// background-color: #5582dc;
}
@ -782,17 +785,20 @@ img {
height: 90%;
font-size: 15px;
line-height: 20px;
color: #5470C6;
color: #5470c6;
// background-color: #b3c8f2;
}
//
.header1 {
position: relative;
text-align: center;
border-radius: 100%;
background: linear-gradient(60deg, rgba(84, 58, 183, 1) 0%, rgba(0, 172, 193, 1) 100%);
background: linear-gradient(
60deg,
rgba(84, 58, 183, 1) 0%,
rgba(0, 172, 193, 1) 100%
);
// color: rgb(207, 59, 59);
}
@ -829,12 +835,12 @@ img {
// background-color: white;
// }
.parallax>use {
.parallax > use {
/* 使use元素执行move-forever动画 */
animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.parallax>use:nth-child(1) {
.parallax > use:nth-child(1) {
/* 延迟2秒启动动画 */
/* 设置动画持续时间为7秒 */
@ -845,7 +851,7 @@ img {
// animation-delay: -2s;
}
.parallax>use:nth-child(2) {
.parallax > use:nth-child(2) {
// background-color: #0052FF;
animation-delay: -3s;
animation-duration: 10s;
@ -888,7 +894,6 @@ img {
// }
}
//
.knowledge {
width: 100%;
@ -896,7 +901,7 @@ img {
display: flex;
flex-direction: row;
justify-content: center;
background-color: #A1C1FF;
background-color: #a1c1ff;
// background-color: #A4c3ff;
padding-top: 20px;
}
@ -912,7 +917,7 @@ img {
.knowledge .libox h1 {
width: 100%;
height: 50%;
color: #F0F4FA;
color: #f0f4fa;
line-height: 50px;
text-align: center;
margin: auto;
@ -924,7 +929,7 @@ img {
.knowledge .libox p {
width: 100%;
height: 50%;
color: #F0F4FA;
color: #f0f4fa;
line-height: 50px;
text-align: center;
margin: auto;
@ -937,7 +942,7 @@ img {
.box1 {
width: 100%;
height: 147px;
background-color: #A1C1FF;
background-color: #a1c1ff;
// height: 100%;
}
@ -947,11 +952,9 @@ img {
margin: auto;
border-radius: 15px 15px 15px 15px;
background-color: #74a5ff;
// background: linear-gradient(#74a5ff, #91b7ff, #A4c3ff);
}
.method li {
width: 90%;
height: 20%;
@ -960,18 +963,18 @@ img {
line-height: 35px;
margin-left: 10px;
padding-top: 10px;
color: #F0F4FA;
color: #f0f4fa;
// background-color: #74a5ff;
}
.box1 .lin{
width: 60%;
.box1 .lin {
width: 60%;
height: 3%;
border-radius: 2px 2px 2px 2px;
background-color: #74a5ff;
margin: auto;
margin-top: 5.5%;
// box-shadow: 1.5px -2px #F0F4FA;
box-shadow: 0px -2px 3px 2px #F0F4FA;
box-shadow: 0px -2px 3px 2px #f0f4fa;
}
//
@ -990,17 +993,17 @@ width: 60%;
text-align: center;
font-size: 15px;
padding-top: 40px;
color: #7F9EED;
color: #7f9eed;
font-weight: bolder;
}
.footer h1 {
width: 100%;
// position: absolute;
font-family: "kaiti_gb2312";
font-family: 'kaiti_gb2312';
margin-top: 10px;
font-size: 25px;
color: #7F9EED;
color: #7f9eed;
font-weight: bolder;
}
@ -1008,10 +1011,10 @@ width: 60%;
width: 100%;
height: 20px;
// position: absolute;
font-family: "kaiti_gb2312";
font-family: 'kaiti_gb2312';
margin-top: 25px;
font-size: 17px;
color: #7F9EED;
color: #7f9eed;
}
.echates-title {
@ -1023,6 +1026,6 @@ width: 60%;
.bo {
width: 100%;
background: linear-gradient(#74a5ff, #91b7ff, #A4c3ff);
background: linear-gradient(#74a5ff, #91b7ff, #a4c3ff);
}
</style>

Loading…
Cancel
Save