diff --git a/src/api/stu.js b/src/api/stu.js
index 89953f6..909bc98 100644
--- a/src/api/stu.js
+++ b/src/api/stu.js
@@ -1,3 +1,3 @@
-export const userStudentListService = (id) => {
+export const getStuService = (id) => {
return request.post('/api/coursesteacher/studentList?userId=' + id)
}
diff --git a/src/api/user/stud.js b/src/api/user/stud.js
new file mode 100644
index 0000000..b3d38b1
--- /dev/null
+++ b/src/api/user/stud.js
@@ -0,0 +1,24 @@
+import request from '@/utils/request'
+//分页查询
+export const stuPageService = (params) => {
+ // console.log(params, 'params')
+ return request.get(
+ `/api/studentManage/page?name=${params.name}&number=${params.number}&page=${params.page}&pageSize=${params.pagesize}&userId=${params.id}`,
+ )
+}
+//获取学生
+export const stuListService = (id) => {
+ return request.get(`/api/studentManage/${id}`)
+}
+//删除和批量删除学生
+export const delStuListService = (ids) => {
+ return request.delete(`/api/studentManage/batchDelete?ids=${ids}`)
+}
+//重置学生密码
+export const reStuPassService = (ids) => {
+ return request.put(`/api/studentManage/initialPassword?ids=${ids}`)
+}
+//重置学生密码
+export const changeStaService = (status, id) => {
+ return request.post(`/api/studentManage/status/${status}?id=${id}`)
+}
diff --git a/src/api/user/user.js b/src/api/user/user.js
index ca3abff..4064558 100644
--- a/src/api/user/user.js
+++ b/src/api/user/user.js
@@ -32,10 +32,11 @@ export const userGetInfoService = (token) =>
headers: { Authorization: `Bearer ${token}` },
})
//修改用户信息
-export const userChangeService = (jsonData) => {
- return request.post('/api/user/update', jsonData, {
- headers: { 'Content-Type': 'application/json;charset=UTF-8' },
- })
+export const userChangeService = (params) => {
+ // return request.post('/api/user/update', jsonData, {
+ // headers: { 'Content-Type': 'application/json;charset=UTF-8' },
+ // })
+ return request.post(`/api/user/update/PersonalInfo`, params)
}
//获取个人信息
export const userIdenService = (id) => {
diff --git a/src/layout/tabbar/setting/index.vue b/src/layout/tabbar/setting/index.vue
index a6182ff..22360a1 100644
--- a/src/layout/tabbar/setting/index.vue
+++ b/src/layout/tabbar/setting/index.vue
@@ -16,7 +16,7 @@
size="small"
icon="Link"
circle
- @click="openWeb('http://www.baidu.com/', 'baidu')"
+ @click="openWeb('https://www.baidu.com', 'baidu')"
/>
import('@/views/home/index.vue'),
+ // name: 'Home',
+ // meta: {
+ // title: '个人中心',
+ // hidden: false,
+ // icon: 'HomeFilled',
+ // },
+ // },
+ // ],
+ redirect: '/curriculumCenter/basicCourseInformation',
children: [
{
path: '/home',
@@ -127,28 +140,28 @@ export const constantRoute: any = [
},
],
},
- {
- path: '/groupManagement',
- component: () => import('@/layout/index.vue'),
- name: 'GroupManagement',
- meta: {
- title: '',
- hidden: false,
- icon: 'HomeFilled', // 菜单图标
- },
- children: [
- {
- path: '/groupManagement/group',
- component: () => import('@/views/group/index.vue'),
- name: 'Group',
- meta: {
- title: '分组',
- hidden: false,
- icon: 'Operation',
- },
- },
- ],
- },
+ // {
+ // path: '/groupManagement',
+ // component: () => import('@/layout/index.vue'),
+ // name: 'GroupManagement',
+ // meta: {
+ // title: '',
+ // hidden: false,
+ // icon: 'HomeFilled', // 菜单图标
+ // },
+ // children: [
+ // {
+ // path: '/groupManagement/group',
+ // component: () => import('@/views/group/index.vue'),
+ // name: 'Group',
+ // meta: {
+ // title: '分组',
+ // hidden: false,
+ // icon: 'Operation',
+ // },
+ // },
+ // ],
+ // },
{
path: '/mssageManagement',
component: () => import('@/layout/index.vue'),
@@ -194,7 +207,8 @@ export const constantRoute: any = [
},
{
path: '/myCourseStudyManagement/learningProcess1',
- component: () => import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'),
+ component: () =>
+ import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'),
name: 'LearningProcess1',
meta: {
title: '知识点学习记录',
diff --git a/src/views/course/basicCourseInformation.vue b/src/views/course/basicCourseInformation.vue
index 0493ede..3b5b9d5 100644
--- a/src/views/course/basicCourseInformation.vue
+++ b/src/views/course/basicCourseInformation.vue
@@ -97,6 +97,7 @@ const onAddCourse = () => {
flog.value = false
drawer.value.open({})
}
+
const flog = ref(false)
// 编辑时传递数据给子组件
const onEditCourse = (item: any) => {
@@ -208,7 +209,11 @@ const CloseCouresNameChangeEvent = () => {
- -
+
-
@@ -217,8 +222,17 @@ const CloseCouresNameChangeEvent = () => {
{{ course_name }}
-
-
-
+
+
{{ item.name }}
讲师:{{ item.teacher }}
@@ -231,19 +245,36 @@ const CloseCouresNameChangeEvent = () => {
-
+
查看课程详情
-
+
-
+
@@ -289,7 +320,6 @@ const CloseCouresNameChangeEvent = () => {
}
.course {
-
// display: flex;
// flex: 0 0 25%;
// justify-content: space-between;
diff --git a/src/views/course/components/courseEdit.vue b/src/views/course/components/courseEdit.vue
index d7fc6d3..71b25d7 100644
--- a/src/views/course/components/courseEdit.vue
+++ b/src/views/course/components/courseEdit.vue
@@ -243,11 +243,20 @@ const upload = async (option: any) => {
-
+
-
+
@@ -286,8 +295,12 @@ const upload = async (option: any) => {
-->
-
+
@@ -303,13 +316,20 @@ const upload = async (option: any) => {
-
+
-
+
diff --git a/src/views/home/components/Echarts.vue b/src/views/home/components/Echarts.vue
index d08a437..0b730d6 100644
--- a/src/views/home/components/Echarts.vue
+++ b/src/views/home/components/Echarts.vue
@@ -16,8 +16,8 @@ onMounted(() => {
// lastMonthBrowseList.value = res.data.lastMonthBrowseList
// thisMonthBrowseList.value = res.data.thisMonthBrowseList
count.value = res.data
- console.log(res.data, 'echart11')
- console.log(count.value, 'echart')
+ // console.log(res.data, 'echart11')
+ // console.log(count.value, 'echart')
})
})
@@ -26,7 +26,9 @@ onMounted(() => {
class="info_container"
style="width: 95%; height: 85%; background: #fff; align-items: center"
>
-
+
{
align-items: bottom;
background: #fff;
}
+.info_title {
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ height: 32px;
+ text-decoration: none;
+}
+.title_name {
+ font-family: Inter, Inter;
+ font-weight: 400;
+ font-size: 20px;
+ color: rgba(0, 0, 0, 0.9);
+ line-height: 30px;
+ text-align: left;
+ font-style: normal;
+ text-transform: none;
+}
+.icon {
+ height: 32px;
+ border-radius: 3px 3px 3px 3px;
+ display: flex;
+ text-decoration: none;
+ font-size: small;
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
+}
diff --git a/src/views/home/components/Lessonlist.vue b/src/views/home/components/Lessonlist.vue
index 8824686..97f5c30 100644
--- a/src/views/home/components/Lessonlist.vue
+++ b/src/views/home/components/Lessonlist.vue
@@ -3,7 +3,10 @@ import conheader from '@/views/home/components/ConHeader.vue'
import courseedit from '@/views/course/components/courseEdit.vue'
import { ref, onMounted } from 'vue'
import useUserStore from '@/store/modules/user'
-import { userLessonListService, userMaxKnowService } from '@/api/user/user.js'
+import { useRouter } from 'vue-router'
+import { userLessonListService } from '@/api/user/user.js'
+import courseEdit from '@/views/course/components/courseEdit.vue'
+const router = useRouter()
const userStore = useUserStore()
// console.log(userStore.data.id, 'sfa')
const loading = ref(false)
@@ -15,17 +18,28 @@ const getLesList = async () => {
loading.value = false
// console.log(res.data, 'less')
}
-//学习最多的知识点
-const maxKnow = ref('')
-const getmaxKnow = async () => {
- const res = await userMaxKnowService(userStore.data.id)
- maxKnow.value = res.data
- // console.log(res.data.label, 'max')
+const onGetCourseObject = async (id) => {
+ router.push({
+ path: '/curriculumCenter/courseDetails',
+ query: {
+ id: id,
+ },
+ })
+}
+const drawer = ref()
+const flog = ref(false)
+const onEditCourse = (item) => {
+ flog.value = true
+ console.log(item, 'item')
+ drawer.value.open(item)
+}
+const onSuccess = () => {
+ loading.value = true
+ getLesList()
+ loading.value = false
}
-getmaxKnow()
onMounted(() => {
getLesList()
- getmaxKnow()
})
@@ -44,14 +58,22 @@ onMounted(() => {
-
{{ item.name }}
-
+
{{ item.name }}
+
+
@@ -102,6 +124,7 @@ onMounted(() => {
font-size: 16px;
font-weight: bold;
margin-bottom: 5px;
+ cursor: pointer;
}
.lessonlist-item-info .p {
/* font-size: 14px;
diff --git a/src/views/home/components/Status.vue b/src/views/home/components/Status.vue
index bdeea9b..3817738 100644
--- a/src/views/home/components/Status.vue
+++ b/src/views/home/components/Status.vue
@@ -2,7 +2,7 @@
import add from '@/assets/images/add.png'
// import tool from '@/utils/oss.js'
import { userChangeService } from '@/api/user/user.js'
-import { ref, defineEmits, onMounted } from 'vue'
+import { ref, defineEmits, onMounted, reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { Edit } from '@element-plus/icons-vue'
import { tool, client } from '@/utils/alioss.js'
@@ -19,7 +19,16 @@ const props = defineProps({
const imageUrl = ref()
//设置头像显示
imageUrl.value = props.data.icon
-// console.log(props.data.username, 'img')
+// console.log(props.userData, 'img')
+const beforeUpload = (file) => {
+ const validImageTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp']
+ if (!validImageTypes.includes(file.type)) {
+ ElMessage.error('请上传图片')
+ return false
+ }
+ return true
+}
+
//设置头像更换
const upload = async (option) => {
const res = await tool.oss.upload(option.file)
@@ -28,10 +37,9 @@ const upload = async (option) => {
// console.log(imageUrl.value, 'img')
}
//修改用户头像
-const emit = defineEmits(['get-avater'])
+const emit = defineEmits(['get-avater', 'getInfo'])
let isUploading = ref(false)
const changeInfo = async () => {
- // console.log('向后端服务器发起请求,修改用户头像信息', imageUrl.value)
if (!isUploading.value) {
isUploading.value = true
const userInfo = {
@@ -49,23 +57,48 @@ const changeInfo = async () => {
isUploading.value = false
}
}
-// onMounted(() => {
-// console.log(props.data.icon, 'props.icon')
-// })
+
//用户基本信息的显示与编辑
+
const dialog = ref(false)
-const radio = ref(3)
-const form = ref({})
+
+const formLabelWidth = '68px'
+const form = ref({
+ name: '',
+ sex: '',
+ emergencyContact: '',
+ nationality: '',
+ professionalTitle: '',
+ politicalStatus: '',
+ profession: '',
+ education: '',
+ academicDegree: '',
+})
form.value = { ...props.userData }
+// console.log(props.userData, '传入的值')
+// console.log(form.value, '表单的值')
+form.value.sex === '男' ? 0 : 1
+const value = ref('')
+value.value = form.value.politicalStatus
const openInfo = () => {
dialog.value = true
}
const onCancel = () => {
dialog.value = false
}
-const onsubmit = async () => {}
-const formLabelWidth = '60px'
-const loading = ref(false)
+//编辑表单提交
+const onSubmit = async () => {
+ // const jsonData = JSON.stringify(form.value)
+ console.log(form.value, 'jj')
+ await userChangeService(form).then(() => {
+ ElMessage.success('修改成功')
+ console.log(form.value, 'aaaa')
+
+ emit('getInfo', form.value)
+
+ dialog.value = false
+ })
+}
@@ -81,9 +114,10 @@ const loading = ref(false)
@@ -101,25 +135,88 @@ const loading = ref(false)
-
+
-
-
- 男
- 女
+
+
+ 男
+ 女
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -179,7 +276,7 @@ const loading = ref(false)
}
.footer {
display: flex;
- justify-content: space-around;
+ justify-content: space-between;
align-items: center;
margin-top: 20px;
}
@@ -230,4 +327,7 @@ span {
margin-left: 65px;
margin-top: -50px;
}
+/* .el-form el-form--default el-form--label-right {
+ height: 500px;
+} */
diff --git a/src/views/home/components/Student1.vue b/src/views/home/components/Student1.vue
index f538d09..f227dd5 100644
--- a/src/views/home/components/Student1.vue
+++ b/src/views/home/components/Student1.vue
@@ -34,7 +34,7 @@ getStuList()
-
{{ item.name }}
+ {{ item.name }}
{{ item.number }}
@@ -95,7 +95,7 @@ getStuList()
}
h4 {
margin-left: 15px;
- font-weight: bold;
+ /* font-weight: bold; */
font-size: 14px;
font-family: Inter, Inter;
/* font-weight: 400; */
diff --git a/src/views/home/components/Welcome.vue b/src/views/home/components/Welcome.vue
index 5527d7c..2d1a493 100644
--- a/src/views/home/components/Welcome.vue
+++ b/src/views/home/components/Welcome.vue
@@ -1,14 +1,15 @@
@@ -205,14 +319,21 @@ onMounted(() => {
修改密码
- {{ formattedDate }}
+ {{ currentTime }}
-
+
+
@@ -220,9 +341,60 @@ onMounted(() => {
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发送验证码
+
+
@@ -113,6 +127,7 @@ onMounted(() => {
:data="data"
:userData="infoData"
@get-avater="getAvater"
+ @getInfo="getInfo"
v-if="flag"
>
@@ -165,12 +180,12 @@ onMounted(() => {
- -
-
+
-
+
+
{{ index + 1 }}
课程名称
-
教师
@@ -178,7 +193,7 @@ onMounted(() => {
-
+
{
-
-
+
-
{{ item.name }}
-
{{ item.teacher }}
+
{{ index + 1 }}
+
{{ item.name || '暂无' }}
+
@@ -250,9 +267,9 @@ onMounted(() => {
background-color: pink;
padding-top: 30px;
// padding-bottom: 30px;
- padding: 30px 10px 0px 10px;
+ padding: 25px 10px 0px 10px;
margin-bottom: 16px;
- height: 317px;
+ height: 312px;
background: #ffffff;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
border-radius: 6px 6px 6px 6px;
@@ -282,8 +299,17 @@ onMounted(() => {
text-align: center;
line-height: 30px;
margin: 5px 10px;
- border: 2px solid #ccc;
+ // border: 2px solid #ccc;
+ box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
width: 40%;
+ padding: 0px 15px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.button :hover {
+ overflow: visible;
+ white-space: normal;
}
a {
text-decoration: none;
@@ -341,14 +367,17 @@ ul {
height: 40px;
background-color: #ffffff;
display: flex;
- flex-direction: column;
+ // flex-direction: column;
justify-content: space-between;
- // align-items: flex-start;
- h3 {
- font-weight: bold;
+ align-items: center;
+ h5 {
+ // font-weight: bold;
+ width: 80%;
+ text-align: center;
}
p {
font-size: small;
+ width: 20%;
color: #a0a5ab;
}
}
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index bb60908..be167ec 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -324,9 +324,9 @@ const rules = {
username: [
{ required: true, message: '用户名不能为空', trigger: 'blur' },
{
- max: 10,
+ max: 30,
min: 5,
- message: '用户名长度最小五位最大十位',
+ message: '用户名长度最小五位最大三十位',
trigger: ['change', 'blur'],
},
],
@@ -440,7 +440,7 @@ const handleSubmit = async () => {
const codecode = ref()
const codeSubmit = async () => {
await form.value.validate()
- console.log('开始发起注册验证码')
+ // console.log('开始发起注册验证码')
const phoness = formModel.value.phone
userCodeRegisterService(phoness)
.then((response) => {
@@ -491,7 +491,7 @@ const login = async () => {
try {
await userStore.userLogin(formModel.value).then(() => {
isBtnLoading.value = false
- $router.push('/home')
+ $router.push('/curriculumCenter/basicCourseInformation')
if ($route.query.redirect) {
$router.push($route.query.redirect as string)
} else {
@@ -515,7 +515,7 @@ const phoneLogin = async () => {
.userPhoneLogin(phones)
.then(() => {
isBtnLoading.value = false
- $router.push('/home')
+ $router.push('/curriculumCenter/basicCourseInformation')
if ($route.query.redirect) {
$router.push($route.query.redirect as string)
} else {
diff --git a/src/views/student/index.vue b/src/views/student/index.vue
index 431a09d..ca20c58 100644
--- a/src/views/student/index.vue
+++ b/src/views/student/index.vue
@@ -1,63 +1,184 @@
@@ -65,21 +186,43 @@ const loading = ref(false)
-
+
+
+
+
+
+
+ 学号搜索
+
+
+
- 搜索
+ 搜索
+ 重置
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -132,47 +302,82 @@ const loading = ref(false)
-
-
+
+
+
+
+
+
+
+
+ 图片文件要为jpg/png格式,小于500kb
+
+
+
+
+
+
+
+
+
+
+
+
+ 男
+ 女
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -223,6 +428,9 @@ const loading = ref(false)
font-weight: bold;
color: #af4141;
}
+.rounded-circle {
+ border-radius: 50%;
+}
::v-deep.el-table td.el-table__cell div {
// margin-left: -6px;
// width: 170px;
@@ -238,4 +446,31 @@ const loading = ref(false)
justify-content: end;
font-size: 12px;
}
+.avatar-uploader {
+ :deep() {
+ .avatar {
+ width: 178px;
+ height: 178px;
+ display: block;
+ }
+ .el-upload {
+ border: 1px dashed var(--el-border-color);
+ border-radius: 6px;
+ cursor: pointer;
+ position: relative;
+ overflow: hidden;
+ transition: var(--el-transition-duration-fast);
+ }
+ .el-upload:hover {
+ border-color: var(--el-color-primary);
+ }
+ .el-icon.avatar-uploader-icon {
+ font-size: 28px;
+ color: #8c939d;
+ width: 178px;
+ height: 178px;
+ text-align: center;
+ }
+ }
+}