develoop
ww 4 months ago
commit f77b4afe40
  1. 12712
      pnpm-lock.yaml
  2. 8
      src/api/user/user.js
  3. 11
      src/views/MyCourseStudy/learningProcess.vue
  4. 160
      src/views/course/components/KnowledgeGraphUi/foldInfoUi.vue
  5. 53
      src/views/course/courseChapters.vue
  6. 28
      src/views/courseResources/componse/resourceAdd.vue
  7. 14
      src/views/courseResources/index.vue
  8. 24
      src/views/home/components/ConHeader.vue
  9. 2
      src/views/home/components/Echart/Echarts.vue
  10. 24
      src/views/home/components/Echarts.vue
  11. 72
      src/views/home/components/Lessonlist.vue
  12. 34
      src/views/home/components/Status.vue
  13. 120
      src/views/home/components/Student1.vue
  14. 106
      src/views/home/components/Welcome.vue
  15. 312
      src/views/home/index.vue
  16. 1
      src/views/login/index.vue

File diff suppressed because it is too large Load Diff

@ -58,3 +58,11 @@ export const userToplessonService = () => request.get('#')
export const userNewLikeService = (id) => {
return request.post('/api/course_favour/newCollect?userId=' + id)
}
//获取学生列表
export const userStudentListService = (id) => {
return request.post('/api/coursesteacher/studentList?userId=' + id)
}
//获取课程列表
export const userLessonListService = (id) => {
return request.post('/api/coursesteacher/studentList?userId=' + id)
}

@ -4,19 +4,26 @@ import { ref } from 'vue'
import { ElMessageBox, ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
import useUserStore from '@/store/modules/user'
import { onMounted } from 'vue'
//
import { LearningRecordsControllerService } from '../../../generated/services/LearningRecordsControllerService'
const total = ref(0)
const userStore = useUserStore()
const recordList = ref([])
const selectedIds = ref([])
const loading = ref(false)
const showCheckbox = ref(false)
onMounted(()=>{
userStore.getUserInfo()
})
const params = ref({
// pagesize: '10',
// pagenum: '1',
userId: '1',
userId: userStore.data.id,
})
console.log(userStore.data.id);
//
const getrecordList = async () => {
//console.log(1111111)

@ -2,46 +2,89 @@
<div class="fold-info-ui">
<div class="demo-collapse">
<el-collapse class="collapse">
<button class="my-button" style="position: absolute;left: 0;top: 0;" @click.stop="emits('add')">新增</button>
<button
class="my-button"
style="position: absolute; left: 0; top: 0"
@click.stop="emits('add')"
>
新增
</button>
<el-collapse-item v-for="item in foldInfoData" :key="item.id">
<template #title>
<div class="title">
<div class="icon">
<img src="@/assets/images/minus-circle-filled.png" alt="">
<img src="@/assets/images/minus-circle-filled.png" alt="" />
</div>
<div class="index" v-if="String(item.numshow).length == 1">
0{{ item.numshow }} /
</div>
<div class="index" v-if="String(item.numshow).length == 1"> 0{{ item.numshow }} /</div>
<div class="index" v-else>{{ item.numshow }} /</div>
<div class="text">{{ item.name }}</div>
<div class="title-tag-box">
<div class="my-tag" type="warning">{{ item.totalclasshours }}学时</div>
<div class="my-tag" type="warning">
{{ item.totalclasshours }}学时
</div>
<div class="my-tag">本章资源</div>
</div>
<button class="my-button" @click.stop="emits('edit', item)" style="margin-right: 10px;">编辑</button>
<el-button type="danger" class="is-el-button" :loading="loading&&item.id===activeData.id" @click.stop="hanDel(item)" style="margin-right: 10px;">删除</el-button>
<button
class="my-button"
@click.stop="emits('edit', item)"
style="margin-right: 10px"
>
编辑
</button>
<my-btn
:id="item.id"
type="danger"
class="is-el-button"
style="margin-right: 10px"
>
删除
</my-btn>
</div>
</template>
<template #default>
<div class="titile-box-knowledge chapter-knowledge">
<div class="my-tag">知识点1</div>
<div class="my-tag">知识点1</div>
</div>
<div class="main-box">
<div class="left"></div>
<div class="right">
<div class="structure-item">
<div class="structure-item-titile-box" v-for="obj, ind in item.chapterSection" :key="item.id">
<div
class="structure-item-titile-box"
v-for="(obj, ind) in item.chapterSection"
:key="item.id"
>
<div class="titile-box-titile">
<div class="sequence">{{ ind + 1 }}</div>
<div class="tit-box">
<div class="tit-box-left">{{ obj.numshow }} {{ obj.name }}</div>
<div class="tit-box-left">
{{ obj.numshow }} {{ obj.name }}
</div>
<div class="tit-box-right my-tag">资源</div>
<div class="title-tag-box">
<div class="my-tag" type="warning">{{ obj.totalclasshours }}学时</div>
<div class="my-tag" type="warning">
{{ obj.totalclasshours }}学时
</div>
</div>
<div class="tit-box-edit">
<button class="my-button" @click.stop="emits('edit', obj)" style="margin-right: 10px;">编辑</button>
<el-button type="danger" class="is-el-button" :loading="loading&&obj.id==activeData.id" my-type="error" @click.stop="hanDel(obj)">删除</el-button>
<button
class="my-button"
@click.stop="emits('edit', obj)"
style="margin-right: 10px"
>
编辑
</button>
<my-btn
:id="obj.id"
type="danger"
class="is-el-button"
style="margin-right: 10px"
>
删除
</my-btn>
</div>
</div>
</div>
@ -54,7 +97,6 @@
</div>
</div>
</template>
</el-collapse-item>
</el-collapse>
</div>
@ -62,17 +104,35 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
defineProps(['foldInfoData','loading'])
import { ElButton } from 'element-plus'
import { ref, h, type SetupContext, withModifiers } from 'vue'
defineProps(['foldInfoData'])
const emits = defineEmits(['add', 'del', 'edit'])
const activeData = ref({id:undefined})
function hanDel(o:any){
activeData.value = o
emits('del', o.id)
const MyBtn = {
props: ['id'],
setup(props: { id: string }, context: SetupContext) {
const loading = ref(false)
const setLoading = (bool: boolean) => (loading.value = bool)
return () =>
h(
ElButton,
{
loading: loading.value,
onClick: withModifiers(
function () {
emits('del', props.id, setLoading)
},
['stop'],
),
...context.attrs,
},
context.slots,
)
},
}
</script>
<style lang="scss" scoped>
::v-deep .collapse {
border-top: none;
@ -90,13 +150,11 @@ function hanDel(o:any){
background: #fff;
position: relative;
.demo-collapse {
$title-icon-width: 15px;
$title--icon-m-r: 34px;
$title-index-width: 60px;
.title {
display: flex;
height: 22px;
@ -112,7 +170,6 @@ function hanDel(o:any){
& img {
width: 100%;
height: 100%;
}
}
@ -138,17 +195,17 @@ function hanDel(o:any){
display: flex;
column-gap: 16px;
}
}
.main-box {
width: 100%;
display: flex;
$line: 1px dashed #D9D9D9;
$line: 1px dashed #d9d9d9;
.left {
width: calc($title-icon-width + $title--icon-m-r + $title-index-width / 2);
width: calc(
$title-icon-width + $title--icon-m-r + $title-index-width / 2
);
border-right: $line;
}
@ -159,7 +216,7 @@ function hanDel(o:any){
width: 100%;
.structure-item-titile-box {
&>* {
& > * {
padding-left: 42px;
}
@ -190,7 +247,7 @@ function hanDel(o:any){
top: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
background: #FFB21E;
background: #ffb21e;
text-align: center;
line-height: $height;
font-weight: 400;
@ -217,9 +274,7 @@ function hanDel(o:any){
}
}
}
}
}
}
}
@ -231,11 +286,11 @@ function hanDel(o:any){
gap: 38px;
flex-wrap: wrap;
&>* {
border: 1px solid #0052D9;
& > * {
border: 1px solid #0052d9;
font-weight: bold;
font-size: 12px;
color: #0052D9;
color: #0052d9;
}
}
@ -249,9 +304,9 @@ function hanDel(o:any){
padding: 2px 8px;
font-weight: 400;
font-size: 12px;
color: #0052D9;
color: #0052d9;
line-height: 20px;
background: #F2F3FF;
background: #f2f3ff;
cursor: pointer;
border-radius: 3px;
}
@ -260,17 +315,16 @@ function hanDel(o:any){
white-space: nowrap;
}
[type=warning].my-tag {
color: #E37318;
background: #FFF1E9;
[type='warning'].my-tag {
color: #e37318;
background: #fff1e9;
}
}
.my-button {
all: initial;
$color-start: #52A1FF;
$color-end: #4255FF;
$color-start: #52a1ff;
$color-end: #4255ff;
padding: 8px 24px;
background: linear-gradient(128deg, $color-start 0%, $color-end 100%);
box-shadow: 0px 4px 7px 0px rgba(0, 82, 255, 0.27);
@ -283,15 +337,27 @@ function hanDel(o:any){
cursor: pointer;
&:hover {
background: linear-gradient(128deg, lighten($color-start, 5%) 0%, lighten($color-end, 5%) 100%);
background: linear-gradient(
128deg,
lighten($color-start, 5%) 0%,
lighten($color-end, 5%) 100%
);
}
&:active {
background: linear-gradient(128deg, darken($color-start, 10%) 0%, darken($color-end, 10%) 100%);
background: linear-gradient(
128deg,
darken($color-start, 10%) 0%,
darken($color-end, 10%) 100%
);
}
&:disabled {
background: linear-gradient(128deg, lighten($color-start, 20%) 0%, lighten($color-end, 20%) 100%);
background: linear-gradient(
128deg,
lighten($color-start, 20%) 0%,
lighten($color-end, 20%) 100%
);
}
}
@ -306,7 +372,5 @@ function hanDel(o:any){
line-height: 24px;
text-align: center;
cursor: pointer;
}
</style>
</style>

@ -1,10 +1,46 @@
<template>
<<<<<<< HEAD
<div class="course-chapters">
<div class="flex-layout">
<div class="flex-left">
<div class="left" ref="atlasCon">
<!-- 知识图谱 -->
<atlas-ui @hadRouter="handle" />
=======
<div class="course-chapters">
<div class="flex-layout">
<div class="flex-left">
<div class="left" ref="atlasCon">
<!-- 知识图谱 -->
<atlas-ui @hadRouter="handle" />
</div>
<div class="right-top radius-10 vertical-line">
<!-- 计算机导论 -->
<theory-ui :learnInfo="learnInfo" />
</div>
<div class="right-bottom radius-10 vertical-line">
<!-- 课程目标 -->
<objective-ui :orogramObjective="orogramObjective" />
</div>
<div class="bottom">
<!-- 可折叠基本概念 -->
<fold-info-ui :foldInfoData="foldInfoData" @add="showHide = true" @edit="hanEdit" @del="flodDel" />
<FoldAdd v-model:is-d="showHide" v-if="showHide" :data="foldInfoData" @submit="foldAddSubmit" />
<FoldEdit v-model:is-d="showHide1" v-if="showHide1" :editData="activeEditData" :data="foldInfoData"
@submit="foldEditSubmit" />
</div>
</div>
<div class="flex_right">
<div class="top-container">
<img src="" alt="">
</div>
<div class="bottom-container radius-10">
<!-- 查看资源 -->
<look-resource-ui :lookResource="lookResource" />
</div>
</div>
>>>>>>> d7b4e7a9c5db447232028c52d0cc49bb8a28830e
</div>
<div class="right-top radius-10 vertical-line">
<!-- 计算机导论 -->
@ -123,6 +159,7 @@ function foldAddSubmit(data: any, updLoading: Function) {
.finally(() => updLoading(false))
}
//
<<<<<<< HEAD
const foldDelLoading = ref(false)
function flodDel(id: string) {
foldDelLoading.value = true
@ -141,6 +178,22 @@ function flodDel(id: string) {
})
})
.finally(() => (foldDelLoading.value = false))
=======
function flodDel(id: string,setLoading:Function) {
setLoading(true)
deleteSectionApi(id).then(() => {
ElMessage({
message: `删除成功`,
type: 'success'
})
getFold()
}).catch(() => {
ElMessage({
message: `删除失败`,
type: 'error'
})
}).finally(() =>setLoading(false))
>>>>>>> d7b4e7a9c5db447232028c52d0cc49bb8a28830e
}
//
const showHide1 = ref(false)

@ -3,23 +3,37 @@ import { ref } from 'vue'
const visibilerDrawer = ref(false)
import { ElMessage } from 'element-plus'
import { CourseResourceControllerService } from '../../../../generated/services/CourseResourceControllerService'
import tool from '@/utils/oss.js'
import { id } from 'element-plus/es/locales.mjs';
//
const defaultForm = {
description: '',
id: '',
id:'',
img: '', //
name: '',
type: '', //
path: '',
}
const imageUrl = ref('')
const onSelectFile = (uploadFile) => {
// console.log(uploadFile)
//oss
const upload = async (option) =>{
//
imageUrl.value = URL.createObjectURL(uploadFile.raw)
//
formModel.value.img = uploadFile.raw
imageUrl.value = URL.createObjectURL(option.raw)
const res = await tool.oss.upload(option.raw);//
const url = "https://wenyu132.oss-cn-beijing.aliyuncs.com/" + res.name;//url
console.log(url);
//url
formModel.value.img = url
}
// const onSelectFile = (uploadFile) => {
// // console.log(uploadFile)
// //
// imageUrl.value = URL.createObjectURL(uploadFile.raw)
// //
// formModel.value.img = uploadFile.raw
// }
//
const formModel = ref({
@ -184,7 +198,7 @@ defineExpose({
:show-file-list="false"
:auto-upload="false"
:before-upload="beforeAvatarUpload"
:on-change="onSelectFile"
:on-change="upload"
>
<img v-if="imageUrl" :src="imageUrl" class="avatar" />
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>

@ -14,6 +14,9 @@ import { LearningRecordsControllerService } from '../../../generated/services/Le
import { CourseResourceControllerService } from '../../../generated/services/CourseResourceControllerService'
import resourceAdd from './componse/resourceAdd.vue'
import useUserStore from '@/store/modules/user'
import { onMounted } from 'vue'
const total = ref(0)
const pptresourceList = ref([])
@ -77,20 +80,25 @@ const onDeleteResource = async (ids) => {
ElMessage({ type: 'success', message: '删除成功' })
getpptresourceList()
}
const userStore = useUserStore()
onMounted(()=>{
userStore.getUserInfo()
})
const param = ref({
coursesId: '',
userId: '1',
coursesName: '',
userId: userStore.data.id,
open: '1',
download: '0',
content: '',
address: '/portal',
type: '1',
type: '4',
})
//
const generateRecords = async (rescource) => {
param.value.content = rescource.img
param.value.coursesId = rescource.id.toString()
param.value.coursesName = rescource.name
await LearningRecordsControllerService.saveRecordsUsingPost1(param.value)
// console.log(param)
}

@ -1,9 +1,13 @@
<template>
<div class="info_title">
<div class="title_name">{{ props.title }}</div>
<!-- <router-link to="`${props.router}`"> -->
<div class="icon">
<img :src="ellipsis" @click="handleClick" />
<img :src="ellipsis" @click="router.push(urouter)" />
<!-- <p style="text-decoration: none">查看更多</p> -->
</div>
<!-- </router-link> -->
</div>
<slot name="drawer"></slot>
</template>
@ -14,18 +18,21 @@ import ellipsis from '@/assets/images/ellipsis.png'
const props = defineProps({
title: String,
modelValue: Boolean,
urouter: String,
})
const emit = defineEmits(['update:modelValue'])
function handleClick() {
emit('update:modelValue', true)
}
console.log(props.urouter, 'router111')
import { useRouter } from 'vue-router'
const router = useRouter()
</script>
<style lang="scss" scoped>
.info_title {
display: flex;
justify-content: space-between;
width: 98%;
width: 100%;
height: 32px;
text-decoration: none;
// background-color: blue;
.title_name {
font-family: Inter, Inter;
font-weight: 400;
@ -39,10 +46,13 @@ function handleClick() {
}
.icon {
width: 32px;
height: 32px;
border-radius: 3px 3px 3px 3px;
display: flex;
text-decoration: none;
// color: rgba(0, 0, 0, 0.9);
// background-color: #f5f5f5;
font-size: small;
justify-content: center;
align-items: center;
}

@ -115,6 +115,6 @@ onMounted(() => {
<style scoped>
.main {
width: 100%;
height: 352px;
height: 335px;
}
</style>

@ -4,9 +4,15 @@ import conheader from '@/views/home/components/ConHeader.vue'
defineProps(['sum'])
</script>
<template>
<div class="info_container" style="width: 95%; height: 384px">
<div
class="info_container"
style="width: 95%; height: 85%; background: #fff; align-items: center"
>
<conheader :title="`主页访问数据(${sum}次)`"></conheader>
<div class="info_content" style="width: 75%; height: 100%">
<div
class="info_content"
style="width: 95%; margin-top: 10px; height: 90%; margin-left: -30px"
>
<echarts></echarts>
</div>
</div>
@ -16,14 +22,22 @@ defineProps(['sum'])
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 20px;
/* justify-content: flex-start; */
}
.echarts {
/* .echarts {
background: #ffffff;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
border-radius: 6px 6px 6px 6px;
margin-bottom: 16px;
display: flex;
justify-content: center;
justify-content: start;
align-items: center;
} */
.info_content {
display: flex;
justify-content: start;
align-items: bottom;
background: #fff;
}
</style>

@ -1,17 +1,30 @@
<script setup>
import conheader from '@/views/home/components/ConHeader.vue'
import fe from '@/assets/images/fe.jpg'
import { userLessonListService } from '@/api/user/user.js'
const getLesList = async () => {
const res = await userLessonListService()
console.log(res)
}
getLesList()
</script>
<template>
<div class="lesson_container" style="width: 95%">
<conheader :title="`课程列表`"></conheader>
<div class="lesson_container" style="width: 95%; height: 90%">
<conheader
:title="`课程列表`"
:urouter="'/curriculumCenter/basicCourseInformation'"
></conheader>
<div class="lessonlist-content">
<div class="lessonlist-item" v-for="item in 3" :key="item">
<div class="lessonlist-item" v-for="item in 4" :key="item">
<div class="lessonlist-item-img">
<img :src="fe" alt="" style="width: 100%; height: 140px" />
<img
src="https://wenyu132.oss-cn-beijing.aliyuncs.com/wenyu/UyiQwGiIAHT_3D6dBcGhf.png"
alt=""
style="width: 100%; height: 125px; border-radius: 10px 10px 0px 0px"
/>
</div>
<div class="lessonlist-item-info">
<h3>课程名称</h3>
<h3>软件构造</h3>
<div class="p"><p>编辑</p></div>
</div>
</div>
@ -21,42 +34,44 @@ import fe from '@/assets/images/fe.jpg'
<style scoped>
.lesson_container {
/* background-color: purple; */
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 0 auto;
padding: 20px 0;
padding: 5px 0;
}
.lessonlist-content {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 10px 0;
margin: 10px 0px;
}
.lesson_container {
.lessonlist-item {
width: 23%;
height: 175px;
border-radius: 10px 10px 0px 0px;
background-color: #fff;
/* background-color: #aeb1b5; */
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 0 auto;
padding: 5px 0;
}
.lessonlist-item {
width: 270px;
height: 200px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.lessonlist-item-img {
width: 100%;
height: 140px;
border: 1px solid #e8e8f2;
/* border-radius: 6px 6px 6px 6px; */
/* box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */
}
.lessonlist-item-info {
padding: 10px;
display: flex;
box-sizing: border-box;
padding: 6px 5px;
/* background-color: pink; */
/* padding: 10px; */
/* display: flex;
flex-direction: column;
justify-content: space-between;
border: 1px solid #e8e8f2; */
/* border: 1px solid #e8e8f2; */
}
.lessonlist-item-info h3 {
font-size: 16px;
@ -64,21 +79,24 @@ import fe from '@/assets/images/fe.jpg'
margin-bottom: 5px;
}
.lessonlist-item-info .p {
width: 100%;
/* font-size: 14px;
color: #858689; */
/* width: 100%; */
display: flex;
justify-content: end;
}
.lessonlist-item-info p {
font-size: 12px;
color: #a7c4f7;
line-height: 1.5;
/* line-height: 1.5; */
box-sizing: border-box;
border: 2px solid #a7c4f7;
border-radius: 10px;
margin-bottom: 5px;
/* margin-bottom: 5px; */
width: 50px;
margin: 5px;
/* margin: 5px; */
text-align: center;
cursor: pointer;
/* cursor: pointer; */
}
</style>

@ -14,10 +14,11 @@ const props = defineProps({
},
})
console.log(props.userData, 'props.infoData')
// console.log(props.userData.professionalTitle, 'props.infoData')
const imageUrl = ref()
//
imageUrl.value = props.data.icon
console.log(imageUrl.value, 'img')
//
const upload = async (option) => {
const res = await tool.oss.upload(option.file)
@ -61,8 +62,8 @@ const formLabelWidth = '60px'
const loading = ref(false)
</script>
<template>
<div class="ident" style="width: 100%; height: 274px; background: #375fff">
<div class="info_container" style="width: 201px; height: 178px">
<div class="ident" style="width: 100%; height: 100%; background: #375fff">
<div class="info_container" style="width: 60%; height: 65%">
<div class="avater">
<img
:src="imageUrl"
@ -83,7 +84,7 @@ const loading = ref(false)
</el-upload>
<div class="info_content" style="height: 58px" @click="openInfo">
<div class="name">{{ props.data.username }}</div>
<!-- <div class="na">{{ props.data.professionalTitle }}</div> -->
<div class="na">{{ props.userData.professionalTitle }}</div>
</div>
</div>
</div>
@ -145,6 +146,17 @@ const loading = ref(false)
font-style: normal;
text-transform: none;
}
.na {
/* height: 28px; */
font-family: Inter, Inter;
font-weight: normal;
font-size: 18px;
color: rgba(255, 255, 255, 0.9);
line-height: 24px;
text-align: left;
font-style: normal;
text-transform: none;
}
.iden {
width: 126px;
height: 22px;
@ -158,10 +170,10 @@ const loading = ref(false)
text-transform: none;
}
.avater {
width: 80px;
height: 80px;
width: 90px;
height: 90px;
background: #b5c7ff;
border-radius: 40px 40px 40px 40px;
border-radius: 50px 50px 50px 50px;
display: flex;
}
span {
@ -180,8 +192,8 @@ span {
top: 18px;
}
.click {
width: 24px;
height: 24px;
width: 13%;
height: 13%;
border-radius: 100px 100px 100px 100px;
border: 2px solid #ffffff;
background: #0052d9;
@ -189,7 +201,7 @@ span {
display: flex;
justify-content: center;
align-items: center;
margin-left: 60px;
margin-top: -60px;
margin-left: 65px;
margin-top: -50px;
}
</style>

@ -1,23 +1,35 @@
<script setup>
import conheader from '@/views/home/components/ConHeader.vue'
import { ref } from 'vue'
const name = ['Aa', 'Bb', 'Cc', 'Dd']
const getRandomColor = () => {
//
return '#' + Math.floor(Math.random() * 16777215).toString(16)
}
const drawer2 = ref(false)
const direction = ref('rtl')
function cancelClick() {
drawer2.value = false
}
function confirmClick() {
drawer2.value = false
import { ref, computed } from 'vue'
import { useRouter } from 'vue-router'
import { userStudentListService } from '@/api/user/user'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const router = useRouter()
// const router1 = '/studentManagement/student'
const loading = ref(false)
const stuList = ref([])
const img = ref()
const getStuList = async () => {
loading.value = true
const res = await userStudentListService(userStore.data.id)
// console.log(res, 'userRes')
stuList.value = res.data
console.log(stuList.value[0].icon, 'rrr')
loading.value = false
}
getStuList()
</script>
<template>
<div class="info_container" style="width: 90%">
<conheader :title="`学生分组`"></conheader>
<div
class="info_container"
style="width: 85%; height: 90%; background: #fff; align-items: center"
>
<conheader
:title="`学生`"
:urouter="'/studentManagement/student'"
></conheader>
<!-- <div>编辑</div>
<template #drawer>
<el-drawer v-model="drawer2" :direction="direction">
@ -38,21 +50,17 @@ function confirmClick() {
</el-drawer>
</template> -->
<div class="stu_content">
<div class="stu_content" v-loading="loading">
<ul>
<li v-for="item in 10" :key="item"></li>
<li class="stu-item" v-for="(item, index) in stuList" :key="index">
<img :src="item.icon" class="stu-item-img" />
<div class="stu-item-info">
<h4>{{ item.name }}</h4>
<h4 style="color: #a7a9aa">{{ item.number }}</h4>
</div>
</li>
</ul>
</div>
<!-- <div class="info_content" style="width: 194px; height: 112px">
<div
v-for="(item, index) in name"
:key="index"
class="stu_color"
:style="{ backgroundColor: getRandomColor() }"
>
{{ item }}
</div>
</div> -->
</div>
</template>
<style scoped>
@ -65,22 +73,56 @@ function confirmClick() {
align-items: center;
} */
.info_container {
/* display: flex;
justify-content: space-between; */
}
.stu_content {
height: 86%;
overflow: hidden;
text-overflow: ellipsis;
font-family: 'Microsoft YaHei';
/* background-color: rgb(100, 100, 64); */
}
.stu-item {
margin-top: 20px;
/* height: 100%; */
/* border-radius: 10px; */
/* background-color: #0080ff; */
border-bottom: 1px solid #ededed;
/* border-radius: 10px; */
/* box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); */
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.07);
display: flex;
padding: 5px;
/* margin: 10px; */
justify-content: space-between;
}
.stu_content {
height: 200px;
.stu-item-img {
background-color: yellow;
border-radius: 50%;
width: 40px;
height: 40px;
justify-content: center;
align-items: center;
}
.info_content {
width: 194px;
height: 112px;
flex-wrap: wrap;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px; /* 设置元素之间的间隔 */
grid-row-gap: 16px;
.stu-item-info {
/* margin-left: 15px; */
width: 80%;
height: 40px;
background-color: #ffffff;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.stu_color {
h4 {
margin-left: 15px;
font-weight: bold;
font-size: 14px;
/* font-family: 'soft'; */
/* color: #000000 */
}
/* */
/* .stu_color {
display: flex;
justify-content: center;
align-items: center;
@ -96,7 +138,7 @@ function confirmClick() {
font-style: normal;
text-transform: none;
transition: background-color 0.3s;
}
} */
.stu_color:hover {
background-color: #f2f2f2; /* 鼠标移入时的背景色变化 */
filter: brightness(1.1);

@ -35,22 +35,35 @@ const dialogFormVisible = ref(false)
const passFormVisible = ref(false)
//dialog
const form = ref()
// {
// username: '',
// nickName: '',
// phone: '',
// }
form.value = { ...props.userData }
const formLabelWidth = '70px'
const form = ref({})
const formLabelWidth = '80px'
//dialog
const openInfo = () => {
dialogFormVisible.value = true
form.value = { ...props.userData }
}
const openPass = () => {
passFormVisible.value = true
}
//
const infoRules = {
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{
pattern: /^1[3-9]\d{9}$/,
message: '手机号格式不正确',
trigger: 'blur',
},
],
nickName: [
{ required: true, message: '请输入昵称', trigger: 'blur' },
{
pattern: /^[\u4e00-\u9fa5a-zA-Z0-9_]{1,10}$/,
message: '昵称格式不正确',
trigger: 'blur',
},
],
}
//
const rules = {
//
@ -83,6 +96,8 @@ const rules = {
// { validator: checkNewSame, trigger: 'blur' },
],
}
const infoRef = ref()
//
const emit = defineEmits(['get-message'])
const changeInfo = async () => {
@ -92,13 +107,17 @@ const changeInfo = async () => {
nickName: form.value.nickName,
}
const jsonData = JSON.stringify(userInfo)
// const valid = await infoRef.value.validate()
await userChangeService(jsonData).then(() => {
ElMessage.success('修改成功')
// console.log(form.value.nickName, 'nickN')
// emit('get-message', form.value.nickName)
emit('get-message', form.value.nickName)
})
dialogFormVisible.value = false
}
const cancleInfo = () => {
dialogFormVisible.value = false
}
//
const userStore = useUserStore()
const onSubmit = async () => {
@ -109,21 +128,35 @@ const onSubmit = async () => {
username: props.userData.username,
})
await userChangePasswordService(passData.value)
ElMessage.success('密码修改成功')
.then(() => {
ElMessage.success('密码修改成功')
passFormVisible.value = false
})
.catch((error) => {
console.log(error, 'error')
ElMessage.error(error.response.data.message)
})
pwdForm.value = {}
passFormVisible.value = false
}
//
const onReset = () => {
pwdForm.value = {}
}
const cancleInfo = () => {
dialogFormVisible.value = false
form.value = {
...props.data,
//
const checkOldSame = (rule, value, callback) => {
if (value === props.userData.password) {
callback(new Error('新密码不能与旧密码相同'))
} else {
callback()
}
}
const checkNewSame = (rule, value, cb) => {
if (value !== pwdForm.value.new_pwd) {
cb(new Error('新密码和确认再次输入的新密码不一样!'))
} else {
cb()
}
}
const username = computed(() => {
if (props.userData.nickName) {
return props.userData.nickName
@ -148,7 +181,6 @@ onMounted(() => {
const millisecondsPerDay = 1000 * 60 * 60 * 24
daysOnJob.value = Math.floor((currentDate - hireDate) / millisecondsPerDay)
})
//
</script>
<template>
<div class="nav_info">
@ -178,14 +210,18 @@ onMounted(() => {
title="登录信息"
style="width: 800px; text-align: center"
>
<el-form :model="form" :data="form" :rules="rules">
<el-form-item label="用户名" :label-width="formLabelWidth">
<el-form :rules="infoRules" ref="infoRef" :model="form">
<el-form-item
label="用户名"
:label-width="formLabelWidth"
prop="username"
>
<el-input :disabled="true" v-model="form.username" autocomplete="off" />
</el-form-item>
<el-form-item label="昵称" :label-width="formLabelWidth">
<el-form-item label="昵称" :label-width="formLabelWidth" porp="nickName">
<el-input v-model="form.nickName" autocomplete="off" />
</el-form-item>
<el-form-item label="手机" :label-width="formLabelWidth">
<el-form-item label="手机" :label-width="formLabelWidth" porp="phone">
<el-input v-model="form.phone" autocomplete="off" />
</el-form-item>
</el-form>
@ -199,16 +235,28 @@ onMounted(() => {
<el-dialog
v-model="passFormVisible"
title="修改密码"
style="width: 700px; text-align: center"
style="width: 800px; text-align: center"
>
<el-form :rules="rules" ref="formRef" :data="pwdForm">
<el-form-item label="原密码">
<el-input type="password" v-model="pwdForm.old_pwd"></el-input>
<el-form-item label="原密码" prop="old_pwd" :label-width="formLabelWidth">
<el-input
type="password"
v-model="pwdForm.old_pwd"
show-password
></el-input>
</el-form-item>
<el-form-item label="新密码" prop="new_pwd">
<el-input type="password" v-model="pwdForm.new_pwd"></el-input>
<el-form-item label="新密码" prop="new_pwd" :label-width="formLabelWidth">
<el-input
type="password"
v-model="pwdForm.new_pwd"
show-password
></el-input>
</el-form-item>
<el-form-item label="确认新密码" prop="re_pwd">
<el-form-item
label="确认密码"
prop="re_pwd"
:label-width="formLabelWidth"
>
<el-input type="password" v-model="pwdForm.re_pwd"></el-input>
</el-form-item>
</el-form>

@ -13,12 +13,15 @@ import { userNewLikeService } from '@/api/user/user'
import useUserStore from '@/store/modules/user'
import fe from '@/assets/images/fe.jpg'
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()
const userStore = useUserStore()
const username = ref()
const data = ref({})
const infoData = ref()
const flag = ref(false)
const role = ref(null)
const loading = ref(false)
const rightVisible = ref(false)
userStore.getUserInfo().catch((error) => {
console.log(error)
@ -34,8 +37,10 @@ const getAvater = (avater) => {
userStore.data.icon = avater
// console.log(data.value.icon, 'icon')
}
const courselist = ref([])
const img = ref()
const courseName = ref()
const courseTea = ref()
onMounted(() => {
// getData()
sum = parseInt(sum) + 1
@ -60,19 +65,13 @@ onMounted(() => {
// // console.log(res, '')
// })
//
// const courselist = ref({ img: '', name: '' })
// const img = ref()
// const courseName = ref()
userNewLikeService(userStore.data.id).then((res) => {
console.log(res.data, '最新收藏的课程')
// courselist.value = res.data
// courselist.value.img = res.data.img
// courselist.value.name = res.data.name
const res = userNewLikeService(userStore.data.id).then((res) => {
console.log(res.data.id, '最新收藏的课程')
courselist.value = res.data
// console.log(courselist.value.id, 'course')
img.value = res.data.img
courseName.value = res.data.name
console.log(img.value, 'img')
console.log(courseName.value, 'courseName')
courseTea.value = res.data.teacher
})
})
</script>
@ -112,11 +111,23 @@ onMounted(() => {
<div class="lesson">
<a
href="#"
style="width: 90%; font-size: 14px; display: flex; margin: 0 auto"
style="
font-size: 14px;
display: flex;
margin: 0px auto;
margin: 0px 30px;
"
>
<conheader :title="`最多收藏知识点`"></conheader>
<conheader
:title="`学习最多知识点`"
:urouter="'/curriculumCenter/knowledgePoints'"
></conheader>
</a>
<p class="button" round v-for="item in 10" :key="item">Ro</p>
<div class="con">
<p class="button" round v-for="item in 30" :key="item">
Spring clould
</p>
</div>
</div>
</el-col>
<el-col :span="6">
@ -127,7 +138,9 @@ onMounted(() => {
>
<conheader :title="`推荐知识点`"></conheader>
</a>
<p class="button" round v-for="item in 20" :key="item">Round</p>
<div class="con">
<p class="button" round v-for="item in 30" :key="item">Roshabei</p>
</div>
</div>
</el-col>
<el-col :span="6">
@ -138,36 +151,37 @@ onMounted(() => {
>
<conheader :title="`推荐课程`"></conheader>
</a>
<div class="lessonlist-content">
<div class="lessonlist-item">
<div class="lessonlist-item-img">
<img :src="fe" alt="" style="width: 100%; height: 140px" />
</div>
<div class="lessonlist-item-info">
<h3>课程名称</h3>
</div>
</div>
<div class="con">
<ul>
<li class="lessonlist-item" v-for="item in 4" :key="item">
<img :src="img" class="lessonlist-item-img" />
<div class="lessonlist-item-info">
<h5>{{ courseName }}</h5>
<p>{{ courseTea }}</p>
</div>
</li>
</ul>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="lesson">
<div class="lesson" v-loading="loading">
<a
href="#"
style="width: 90%; font-size: 14px; display: flex; margin: 0 auto"
style="width: 90%; font-size: 12px; display: flex; margin: 0 auto"
>
<conheader :title="`最新收藏课程`"></conheader>
</a>
<div class="lessonlist-content">
<div class="lessonlist-item">
<div class="lessonlist-item-img">
<img :src="img" alt="" style="width: 100%; height: 140px" />
</div>
<div class="lessonlist-item-info">
<h3>{{ courseName }}</h3>
</div>
</div>
<div class="con">
<ul>
<li class="lessonlist-item" v-for="item in courselist" :key="item">
<img :src="img" class="lessonlist-item-img" />
<div class="lessonlist-item-info">
<h5>{{ courseName }}</h5>
<p>{{ courseTea }}</p>
</div>
</li>
</ul>
</div>
</div>
</el-col>
@ -184,42 +198,11 @@ onMounted(() => {
</div>
</el-col>
</el-row>
<!-- <div class="left">
<div class="nav">
<welcome
:data="infoData"
:userData="data"
:name="name"
v-if="flag"
></welcome>
</div>
<div class="info" style="width: 100%; height: 368px">
<Info :data="infoData" v-if="flag"></Info>
</div>
<div class="echarts" style="width: 100%; height: 444px">
<echarts :sum="sum"></echarts>
</div>
</div>
<div v-if="rightVisible" class="right">
<status :data="data" @get-message="getMessage" v-if="flag"></status>
<div class="class" style="width: 100%; height: 388px">
<Class1></Class1>
</div>
<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: 100%; height: 388px">
<Class2></Class2>
</div>
<div class="stu" style="width: 100%; height: 236px">
<Student2></Student2>
</div>
</div> -->
</template>
<style lang="scss" scoped>
* {
box-sizing: border-box;
}
.nav {
height: 92px;
background: #ffffff;
@ -233,11 +216,13 @@ onMounted(() => {
}
.classList,
.info {
// background-color: yellow;
height: 270px;
background: #ffffff;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
border-radius: 6px 6px 6px 6px;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.classList {
@ -245,106 +230,155 @@ onMounted(() => {
justify-content: space-between;
}
.lesson {
// background-color: pink;
padding-top: 5px;
margin-bottom: 16px;
height: 280px;
height: 290px;
background: #ffffff;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
border-radius: 6px 6px 6px 6px;
overflow: hidden;
text-overflow: ellipsis;
// flex-direction: column;
}
.con {
display: flex;
// justify-content: center;
align-items: center;
// justify-content: space-between;
// height: 100%;
// align-items: center;
// margin: 0 auto;
// background-color: yellow;
padding: 5px;
margin-top: 5px;
flex-wrap: wrap;
// flex-direction: column;
.button {
margin-top: 10px;
height: 30px;
border-radius: 10px;
color: #0080ff;
text-align: center;
line-height: 30px;
margin: 0 10px;
border: 2px solid #ccc;
}
a {
text-decoration: none;
}
justify-content: space-evenly;
padding-bottom: 30px;
}
.button {
justify-content: space-between;
margin-bottom: 5px;
height: 30px;
border-radius: 10px;
// color: #0080ff;
text-align: center;
line-height: 30px;
margin: 5px 10px;
border: 2px solid #ccc;
}
a {
text-decoration: none;
}
.some,
.stu {
height: 384px;
padding-top: 5px;
height: 380px;
// background: #9f7b7b;
background: #ffffff;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
border-radius: 6px 6px 6px 6px;
justify-content: space-between;
display: flex;
justify-content: center;
align-items: center;
}
.lessonlist-content {
// .lessonlist-content {
// display: flex;
// justify-content: center;
// align-items: center;
// margin: 0 auto;
// flex-direction: column;
// }
ul {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto;
flex-direction: column;
// justify-content: center;
// align-items: center;
}
.lessonlist-item {
width: 270px;
height: 180px;
height: 50px;
// margin: 0 auto;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
// background-color: #0080ff;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
display: flex;
padding: 5px;
margin: 5px;
justify-content: space-between;
// align-items: center;
}
.lessonlist-item-img {
width: 100%;
height: 140px;
// justify-content: center;
width: 17%;
height: 40px;
justify-content: center;
align-items: center;
margin: 0 auto;
}
.lessonlist-item-info {
padding: 10px;
display: flex;
justify-content: space-between;
}
.lesson_container {
margin-left: 5px;
width: 80%;
height: 40px;
background-color: #ffffff;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 0 auto;
padding: 5px 0;
justify-content: space-evenly;
h3 {
font-weight: bold;
}
p {
// display: flex;
// justify-content: end;
font-size: small;
color: #a0a5ab;
}
}
.lessonlist-item-info {
padding: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.lessonlist-item-info h3 {
font-size: 16px;
font-weight: bold;
margin-bottom: 5px;
}
.lessonlist-item-info .p {
width: 100%;
display: flex;
justify-content: end;
}
.lessonlist-item-info p {
font-size: 12px;
color: #a7c4f7;
line-height: 1.5;
box-sizing: border-box;
border: 2px solid #a7c4f7;
border-radius: 10px;
margin-bottom: 5px;
width: 50px;
margin: 5px;
text-align: center;
cursor: pointer;
}
// .lesson_container {
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// margin: 0 auto;
// padding: 5px 0;
//
// .lesson_container {
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// margin: 0 auto;
// padding: 5px 0;
// }
// .lessonlist-item-info {
// padding: 10px;
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// }
// .lessonlist-item-info h3 {
// font-size: 16px;
// font-weight: bold;
// margin-bottom: 5px;
// }
// .lessonlist-item-info .p {
// width: 100%;
// display: flex;
// justify-content: end;
// }
// .lessonlist-item-info p {
// font-size: 12px;
// color: #a7c4f7;
// line-height: 1.5;
// box-sizing: border-box;
// border: 2px solid #a7c4f7;
// border-radius: 10px;
// margin-bottom: 5px;
// width: 50px;
// margin: 5px;
// text-align: center;
// cursor: pointer;
// }
// .container {
// display: flex;

@ -399,7 +399,6 @@ watch(isToggle, () => {
const passwordMatchError = ref('')
const checkPasswordMatch = () => {
if (formModel.value.password !== formModel.value.repassword) {
// passwordMatchError.value = ''
ElMessage('两次输入的密码不一致')
} else {
passwordMatchError.value = ''

Loading…
Cancel
Save