Compare commits

..

16 Commits
dev1 ... master

Author SHA1 Message Date
pyia8e6p9 44e9d70373 数据库
2 years ago
pyia8e6p9 1d574851f8 成绩管理功能
2 years ago
lyn df379e0f67 开发课程前后太数据对接
2 years ago
whozo 2bd89e34df 修改redirect: '/home', => redirect: '/login',
2 years ago
whozo cf4a62f23b 添加 { path: 'person', name: 'Person', component: () => import('@/views/manager/Person.vue')},
2 years ago
root ad43980ff1 学生选课功能
2 years ago
root 8f2eea69f8 select
2 years ago
pyia8e6p9 f26240f0fc 添加import request from “@/utils/request”;
2 years ago
whozo f0ad61ec5c 添加import request from "@/utils/request";
2 years ago
pyia8e6p9 a25d1cb14b 学生管理功能、后台文件上传下载、个人资料页面合并
2 years ago
whozo 1eac91da81 学生管理功能,后台文件上传下载,学生个人资料页面
2 years ago
p89sifnku 56e2658f2c 开发课程分页查询接口,课程前后段数据对接,课程新增和编辑功能,课程删除功能
2 years ago
pyia8e6p9 15f4e8a8b0 登录和请求功能
2 years ago
tqf 723c2e0a8f 增加学生注册功能
2 years ago
tqf da30898a43 增加学生类以及登录功能
2 years ago
p89sifnku ad3aca7bbb 开发课程管理页面功能合并到master
2 years ago

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@ -0,0 +1,6 @@
package com.example.common;
public enum RoleEnum {
ADMIN, // 管理员
STUDENT // 学生
}

@ -0,0 +1,60 @@
package com.example.controller;
import cn.hutool.core.io.FileUtil;
import com.example.common.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.net.URLEncoder;
@RestController
@RequestMapping("/files")
//上传
public class FileController {
@Value("${ip}")
private String ip;
@Value("${server.port}")
private String port;
private static final String ROOT_PATH =System.getProperty("user.dir")+"/files";
@PostMapping("/upload")
public Result upload(MultipartFile file) throws IOException {
String originalFilename=file.getOriginalFilename();//文件名
long flag=System.currentTimeMillis();
String fileName=flag+"_"+originalFilename;
File finalFile = new File(ROOT_PATH + "/" + fileName);
if (!finalFile.getParentFile().exists()){
finalFile.getParentFile().mkdirs();
}
file.transferTo(finalFile);
//返回url
String url ="http://" + ip +":" + port +"/files/download?fileName=" + fileName;
return Result.success(url);
}
@GetMapping("/download")
public void download(String fileName, HttpServletResponse response) throws IOException {
File file = new File(ROOT_PATH + "/" + fileName); // 文件在存盘存储的对象
ServletOutputStream os = response.getOutputStream();
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setContentType("application/octet-stream");
// os.write(FileUtil.readBytes(file));
FileUtil.writeToStream(file, os);
os.flush();
os.close();
}
}

@ -0,0 +1,54 @@
package com.example.controller;
import com.example.common.Result;
import com.example.entity.Grade;
import com.example.service.GradeService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
*
*/
@RestController
@RequestMapping("/grade")
public class GradeController {
@Resource
GradeService gradeService;
@PostMapping("/add")
public Result add(@RequestBody Grade grade) {
gradeService.add(grade);
return Result.success();
}
@PutMapping("/update")
public Result update(@RequestBody Grade grade) {
gradeService.update(grade);
return Result.success();
}
/**
*
*/
@DeleteMapping("/delete/{id}")
public Result delete(@PathVariable Integer id) {
gradeService.deleteById(id);
return Result.success();
}
/**
*
*/
@GetMapping("/selectPage")
public Result selectPage(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "5") Integer pageSize,
Grade grade) { // ?name=xx&no=xx
PageInfo<Grade> pageInfo = gradeService.selectPage(pageNum, pageSize, grade);
return Result.success(pageInfo);
}
}

@ -0,0 +1,43 @@
package com.example.controller;
import com.example.common.Result;
import com.example.entity.Student;
import com.example.service.StudentService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/student")
public class StudentController {
@Resource
StudentService studentService;
@PostMapping("/add")
public Result add(@RequestBody Student student) {
studentService.add(student);
return Result.success();
}
@DeleteMapping("/delete/{id}")
public Result delete(@PathVariable Integer id) {
studentService.deleteById(id);
return Result.success();
}
@PutMapping ("/update")
public Result update(@RequestBody Student student) {
studentService.updateById(student);
return Result.success();
}
@GetMapping ("/selectPage")
public Result selectPage(@RequestParam(defaultValue = "1")Integer pageNum,
@RequestParam(defaultValue = "10")Integer pageSize,
Student student) {
PageInfo<Student>pageInfo = studentService.selectPage(pageNum,pageSize,student);
return Result.success(pageInfo);
}
}

@ -0,0 +1,50 @@
package com.example.controller;
import com.example.common.Result;
import com.example.entity.Course;
import com.example.entity.StudentCourse;
import com.example.service.StudentCourseService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/studentCourse")
public class StudentCourseController {
@Resource
StudentCourseService studentCourseService;
/**
*
*/
@PostMapping("/add")
public Result add(@RequestBody StudentCourse studentCourse) {
studentCourseService.add(studentCourse);
return Result.success();
}
/**
*
*/
@DeleteMapping("/delete/{id}")
public Result delete(@PathVariable Integer id){
studentCourseService.deleteById(id);
return Result.success();
}
/**
*
*/
@GetMapping("/selectPage")
public Result selectPage(@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "5") Integer pageSize,
StudentCourse studentCourse){
PageInfo<StudentCourse> pageInfo = studentCourseService.selectPage(pageNum, pageSize,studentCourse);
return Result.success(pageInfo);
}
}

@ -3,10 +3,12 @@ package com.example.controller;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.example.common.Result; import com.example.common.Result;
import com.example.common.RoleEnum;
import com.example.entity.Account; import com.example.entity.Account;
import com.example.entity.Admin; import com.example.entity.Admin;
import com.example.service.AdminService; import com.example.service.AdminService;
import com.example.service.StudentService;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -20,7 +22,8 @@ public class WebController {
@Resource @Resource
private AdminService adminService; private AdminService adminService;
@Resource
private StudentService studentService;
/** /**
* *
@ -34,15 +37,26 @@ public class WebController {
* *
*/ */
@PostMapping("/login") @PostMapping("/login")
public Result login(@RequestBody Admin admin) { public Result login(@RequestBody Account account) {
Admin dbAdmin= adminService.login(admin); Account dbAccount;
if (RoleEnum.ADMIN.name().equals(account.getRole())) { // 管理员登录
return Result.success(dbAdmin); dbAccount = adminService.login(account);
} else if (RoleEnum.STUDENT.name().equals(account.getRole())) { // 学生登录
dbAccount = studentService.login(account);
} else {
return Result.error("角色错误");
}
return Result.success(dbAccount);
} }
/** @PostMapping("/register")
* public Result register(@RequestBody Account account) {
*/ if (ObjectUtil.isEmpty(account.getUsername()) || ObjectUtil.isEmpty(account.getPassword())) {
return Result.error("账号或密码必填");
}
studentService.register(account);
return Result.success();
}
} }

@ -0,0 +1,77 @@
package com.example.entity;
public class Grade {
private Integer id;
private Integer courseId;
private Integer studentId;
private Double score;
private String comment;
private String feedback;
private String studentName;
private String courseName;
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
}
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public Integer getStudentId() {
return studentId;
}
public void setStudentId(Integer studentId) {
this.studentId = studentId;
}
public Double getScore() {
return score;
}
public void setScore(Double score) {
this.score = score;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getFeedback() {
return feedback;
}
public void setFeedback(String feedback) {
this.feedback = feedback;
}
}

@ -0,0 +1,97 @@
package com.example.entity;
public class Student extends Account{
private Integer id;
private String username;
private String password;
private String name;
private String phone;
private String email;
private String sex;
private String birth;
private String avatar;
private String role;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getBirth() {
return birth;
}
public void setBirth(String birth) {
this.birth = birth;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
@Override
public String getRole() {
return role;
}
@Override
public void setRole(String role) {
this.role = role;
}
}

@ -0,0 +1,58 @@
package com.example.entity;
public class StudentCourse {
private Integer id;
private String name;
private String no;
private Integer studentId;
private Integer courseId;
private String studentName;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNo() {
return no;
}
public void setNo(String no) {
this.no = no;
}
public Integer getStudentId() {
return studentId;
}
public void setStudentId(Integer studentId) {
this.studentId = studentId;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
}
}

@ -0,0 +1,27 @@
package com.example.mapper;
import com.example.entity.Grade;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
public interface GradeMapper {
@Insert("insert into grade (course_id, student_id, score, comment, feedback) " +
"values (#{courseId}, #{studentId}, #{score}, #{comment}, #{feedback})")
void insert(Grade grade);
List<Grade> selectAll(Grade grade); // 关联查询
@Update("update grade set score = #{score}, comment = #{comment}, feedback = #{ feedback } where id = #{id}")
void update(Grade grade);
@Select("select * from grade where student_id = #{studentId} and course_id = #{courseId}")
Grade selectByCondition(Grade grade);
@Delete("delete from grade where id = #{id}")
void deleteById(Integer id);
}

@ -0,0 +1,23 @@
package com.example.mapper;
import com.example.entity.StudentCourse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface StudentCourseMapper {
@Insert("insert into student_course (name,no,student_id,course_id) values (#{name},#{no},#{studentId},#{courseId})")
void insert(StudentCourse studentCourse);
@Select("select * from student_course where student_id = #{studentId} and course_id = #{courseId}")
StudentCourse selectByCondition(StudentCourse studentCourse);
// @Select("select * from student_course where name like concat('%',#{name},'%') and no like concat('%',#{no},'%') and student_id=#{studentId}")
List<StudentCourse> selectAll(StudentCourse studentCourse);
@Delete("delete from student_course where id=#{id}")
void deleteById(Integer id);
}

@ -0,0 +1,30 @@
package com.example.mapper;
import com.example.entity.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
public interface StudentMapper {
@Select("select * from student where username = #{username}")
Student selectByUsername(String username);
@Insert("insert into student (username, password, name, phone, email, sex, birth, avatar, role) " +
"values (#{username}, #{password}, #{name}, #{phone}, #{email}, #{sex}, #{birth}, #{avatar}, #{role})")
void insert(Student student);
@Delete("delete from student where id =#{id}")
void deleteById(Integer id);
@Update("update student set username=#{username},password=#{password},name=#{name},phone=#{phone}," +
"email=#{email},sex=#{sex},birth=#{birth},avatar=#{avatar} where id =#{id}")
void updateById(Student student);
@Select("select * from student where username like concat('%',#{username},'%')and name like concat('%',#{name},'%') order by id desc")
List<Student> selectAll(Student student);
}

@ -17,14 +17,14 @@ public class AdminService {
/** /**
* *
*/ */
public Admin login(Admin admin) public Account login(Account account)
{ {
Admin dbAdmin = adminMapper.selectByUsername(admin.getUsername()); Account dbAdmin = adminMapper.selectByUsername(account.getUsername());
if(dbAdmin==null) if(dbAdmin==null)
{ {
throw new CustomException("账号或密码错误"); throw new CustomException("账号或密码错误");
} }
if (!admin.getPassword().equals(dbAdmin.getPassword())) if (!account.getPassword().equals(dbAdmin.getPassword()))
{ {
throw new CustomException("账号或密码错误"); throw new CustomException("账号或密码错误");
} }

@ -0,0 +1,40 @@
package com.example.service;
import com.example.entity.Grade;
import com.example.exception.CustomException;
import com.example.mapper.GradeMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class GradeService {
@Resource
GradeMapper gradeMapper;
public void add(Grade grade) {
Grade dbGrade = gradeMapper.selectByCondition(grade);
if (dbGrade != null) { // 打过分了
throw new CustomException("您已打过分了");
}
gradeMapper.insert(grade);
}
public PageInfo<Grade> selectPage(Integer pageNum, Integer pageSize, Grade grade) {
PageHelper.startPage(pageNum, pageSize);
List<Grade> list = gradeMapper.selectAll(grade);
return PageInfo.of(list);
}
public void update(Grade grade) {
gradeMapper.update(grade);
}
public void deleteById(Integer id) {
gradeMapper.deleteById(id);
}
}

@ -0,0 +1,39 @@
package com.example.service;
import com.example.entity.StudentCourse;
import com.example.exception.CustomException;
import com.example.mapper.StudentCourseMapper;
import com.example.mapper.StudentMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class StudentCourseService {
@Resource
StudentCourseMapper studentCourseMapper;
public void add(StudentCourse studentCourse) {
StudentCourse course = studentCourseMapper.selectByCondition(studentCourse);//通过学生Id和课程ID筛选看这个学生是否选过这门课
if (course != null) {
throw new CustomException("您已选过这门课程");
}
studentCourseMapper.insert(studentCourse);
}
public PageInfo<StudentCourse> selectPage(Integer pageNum, Integer pageSize,StudentCourse studentCourse) {
PageHelper.startPage(pageNum,pageSize);
List<StudentCourse> list = studentCourseMapper.selectAll(studentCourse);
return PageInfo.of(list);
}
public void deleteById(Integer id) {
studentCourseMapper.deleteById(id);
}
}

@ -0,0 +1,66 @@
package com.example.service;
import cn.hutool.core.util.ObjectUtil;
import com.example.common.RoleEnum;
import com.example.entity.Account;
import com.example.entity.Student;
import com.example.exception.CustomException;
import com.example.mapper.StudentMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class StudentService {
@Resource
private StudentMapper studentMapper;
public Account login(Account account)
{
Account dbStudent = studentMapper.selectByUsername(account.getUsername());
if(dbStudent==null)
{
throw new CustomException("账号或密码错误");
}
if (!account.getPassword().equals(dbStudent.getPassword()))
{
throw new CustomException("账号或密码错误");
}
return dbStudent;
}
public void register(Account account) {
Student student = new Student();
student.setUsername(account.getUsername()); // 账号
student.setPassword(account.getPassword()); // 密码
this.add(student);
}
public void add(Student student) {
Student dbStudent = studentMapper.selectByUsername(student.getUsername());
if (dbStudent != null) { // 已有同名账号 不允许插入
throw new CustomException("账号已存在");
}
if (ObjectUtil.isEmpty(student.getName())) {
student.setName(student.getUsername());
}
student.setRole(RoleEnum.STUDENT.name());
studentMapper.insert(student);
}
public void deleteById(Integer id) {
studentMapper.deleteById(id);
}
public void updateById(Student student) {
studentMapper.updateById(student);
}
public PageInfo<Student> selectPage(Integer pageNum,Integer pageSize, Student student) {
PageHelper.startPage(pageNum,pageSize);
List<Student> studentList = studentMapper.selectAll(student);
return PageInfo.of(studentList);
}
}

@ -6,7 +6,7 @@ spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: root username: root
password: 123 password: zyh1234567890
url: jdbc:mysql://localhost:3306/student?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true url: jdbc:mysql://localhost:3306/student?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
servlet: servlet:
multipart: multipart:
@ -18,3 +18,6 @@ mybatis:
configuration: configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
mapper-locations: classpath:mapper/*.xml
ip: localhost

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.mapper.GradeMapper">
<select id="selectAll" resultType="com.example.entity.Grade">
select grade.*, student.name as studentName, course.name as courseName
from grade
left join student
on grade.student_id = student.id
left join course
on grade.course_id = course.id
<where>
<if test="studentName != null">and student.name like concat('%', #{studentName}, '%')</if>
<if test="courseName != null">and course.name like concat('%', #{courseName}, '%')</if>
<if test="studentId != null">and grade.student_id = #{studentId}</if>
</where>
order by id desc
</select>
</mapper>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.mapper.StudentCourseMapper">
<select id="selectAll" resultType="com.example.entity.StudentCourse">
select student_course.*,student.name as studentName from student_course
left join student
on student_course.student_id = student.id
<where>
<if test="name != null"> and student_course.name like concat('%',#{name},'%') </if>
<if test="no != null">and student_course.no like concat('%',#{no},'%')</if>
<if test="studentId!= null">and student_course.student_id = #{studentId}</if>
</where>
order by id desc
</select>
</mapper>

@ -6,7 +6,7 @@ spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: root username: root
password: 123 password: zyh1234567890
url: jdbc:mysql://localhost:3306/student?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true url: jdbc:mysql://localhost:3306/student?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
servlet: servlet:
multipart: multipart:
@ -18,3 +18,6 @@ mybatis:
configuration: configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
mapper-locations: classpath:mapper/*.xml
ip: localhost

@ -0,0 +1,130 @@
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50737
Source Host : localhost:3306
Source Schema : student
Target Server Type : MySQL
Target Server Version : 50737
File Encoding : 65001
Date: 26/11/2023 16:31:45
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '账号',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '密码',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称',
`role` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '角色',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '管理员' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES (1, 'admin', 'admin', '管理员', 'ADMIN');
-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '课程名称',
`no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '课程编号',
`descr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '课程描述',
`times` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '课时',
`teacher` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '任课老师',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '课程信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of course
-- ----------------------------
INSERT INTO `course` VALUES (1, '大学英语', 'CS10012313', '大学英语真好玩', '24节', '张三三');
INSERT INTO `course` VALUES (2, '大学物理', 'CS12332131', '大学物理真枯燥', '24节', '李思思');
INSERT INTO `course` VALUES (5, '线性代数', 'CS10012325', '线性代数真好学', '20节', '王二二');
INSERT INTO `course` VALUES (6, '李思思', NULL, NULL, NULL, NULL);
INSERT INTO `course` VALUES (7, '2', '2', '2', '2', '2');
-- ----------------------------
-- Table structure for grade
-- ----------------------------
DROP TABLE IF EXISTS `grade`;
CREATE TABLE `grade` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`course_id` int(11) NULL DEFAULT NULL COMMENT '课程ID',
`student_id` int(11) NULL DEFAULT NULL COMMENT '学生ID',
`score` double(10, 1) NULL DEFAULT NULL COMMENT '分数',
`comment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '评语',
`feedback` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '学生反馈',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '成绩' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of grade
-- ----------------------------
INSERT INTO `grade` VALUES (1, 1, 8, 90.0, '非常nice 哈哈哈\n\n我现在更新数据', '老师非常用心,我很喜欢青哥哥的课程 哈哈哈');
INSERT INTO `grade` VALUES (3, 2, 1, 60.0, '继续加油', '');
-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '学号',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '密码',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称',
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '手机号',
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '邮箱',
`sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '性别',
`birth` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '生日',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '头像',
`role` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '角色',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '学生信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of student
-- ----------------------------
INSERT INTO `student` VALUES (1, '20191001', '123', '小白白', '13788997788', 'xbb@xm.com', '', '2000-10-01', 'http://localhost:9090/files/download?fileName=1700576780918_QQ截图20230330090301.png', 'STUDENT');
INSERT INTO `student` VALUES (2, '20191002', '123', '20191002', NULL, NULL, NULL, NULL, NULL, 'STUDENT');
INSERT INTO `student` VALUES (3, '20191003', '123', '20191003', NULL, NULL, NULL, NULL, NULL, 'STUDENT');
INSERT INTO `student` VALUES (4, '20191004', '123', '20191004', NULL, NULL, NULL, NULL, NULL, 'STUDENT');
INSERT INTO `student` VALUES (5, '20191005', '123', '20191005', NULL, NULL, NULL, NULL, NULL, 'STUDENT');
INSERT INTO `student` VALUES (6, '20191006', '123', '20191006', NULL, NULL, NULL, NULL, NULL, 'STUDENT');
INSERT INTO `student` VALUES (7, '20191007', '123', '20191007', NULL, NULL, NULL, NULL, NULL, 'STUDENT');
INSERT INTO `student` VALUES (8, '20191010', '123', '李思思', '13988998899', 'lss@xm.com', '', '2001-11-01', 'http://localhost:9090/files/download?fileName=1700575670771_QQ图片20230301222231.gif', 'STUDENT');
-- ----------------------------
-- Table structure for student_course
-- ----------------------------
DROP TABLE IF EXISTS `student_course`;
CREATE TABLE `student_course` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '课程名称',
`no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '课程编号',
`student_id` int(11) NULL DEFAULT NULL COMMENT '学生ID',
`course_id` int(11) NULL DEFAULT NULL COMMENT '课程ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '学生选课' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of student_course
-- ----------------------------
INSERT INTO `student_course` VALUES (4, '大学物理', 'CS12332131', 1, 2);
INSERT INTO `student_course` VALUES (5, '大学英语', 'CS10012313', 8, 1);
SET FOREIGN_KEY_CHECKS = 1;

@ -1,179 +1,227 @@
{ {
"hash": "bb0d390d", "hash": "7b87647c",
"browserHash": "ff48fe26", "browserHash": "3783bdee",
"optimized": { "optimized": {
"@element-plus/icons-vue": { "@element-plus/icons-vue": {
"src": "../../@element-plus/icons-vue/dist/index.js", "src": "../../@element-plus/icons-vue/dist/index.js",
"file": "@element-plus_icons-vue.js", "file": "@element-plus_icons-vue.js",
"fileHash": "a8e2157a", "fileHash": "b9f59230",
"needsInterop": false "needsInterop": false
}, },
"axios": { "axios": {
"src": "../../axios/index.js", "src": "../../axios/index.js",
"file": "axios.js", "file": "axios.js",
"fileHash": "65a5d001", "fileHash": "3c866bcf",
"needsInterop": false "needsInterop": false
}, },
"element-plus": { "element-plus": {
"src": "../../element-plus/es/index.mjs", "src": "../../element-plus/es/index.mjs",
"file": "element-plus.js", "file": "element-plus.js",
"fileHash": "f36c908b", "fileHash": "07d81f07",
"needsInterop": false "needsInterop": false
}, },
"element-plus/dist/locale/zh-cn.mjs": { "element-plus/dist/locale/zh-cn.mjs": {
"src": "../../element-plus/dist/locale/zh-cn.mjs", "src": "../../element-plus/dist/locale/zh-cn.mjs",
"file": "element-plus_dist_locale_zh-cn__mjs.js", "file": "element-plus_dist_locale_zh-cn__mjs.js",
"fileHash": "f064cca4", "fileHash": "731ceabb",
"needsInterop": false "needsInterop": false
}, },
"vue": { "vue": {
"src": "../../vue/dist/vue.runtime.esm-bundler.js", "src": "../../vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js", "file": "vue.js",
"fileHash": "3df4a5b7", "fileHash": "d542d8c4",
"needsInterop": false "needsInterop": false
}, },
"vue-router": { "vue-router": {
"src": "../../vue-router/dist/vue-router.mjs", "src": "../../vue-router/dist/vue-router.mjs",
"file": "vue-router.js", "file": "vue-router.js",
"fileHash": "97452d25", "fileHash": "cfaa6634",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es": { "element-plus/es": {
"src": "../../element-plus/es/index.mjs", "src": "../../element-plus/es/index.mjs",
"file": "element-plus_es.js", "file": "element-plus_es.js",
"fileHash": "68c72c11", "fileHash": "a22f5d6f",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/base/style/index": { "element-plus/es/components/base/style/index": {
"src": "../../element-plus/es/components/base/style/index.mjs", "src": "../../element-plus/es/components/base/style/index.mjs",
"file": "element-plus_es_components_base_style_index.js", "file": "element-plus_es_components_base_style_index.js",
"fileHash": "cc1e7034", "fileHash": "c200b7a8",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/menu/style/index": { "element-plus/es/components/menu/style/index": {
"src": "../../element-plus/es/components/menu/style/index.mjs", "src": "../../element-plus/es/components/menu/style/index.mjs",
"file": "element-plus_es_components_menu_style_index.js", "file": "element-plus_es_components_menu_style_index.js",
"fileHash": "2933b18b", "fileHash": "64291ef6",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/sub-menu/style/index": { "element-plus/es/components/sub-menu/style/index": {
"src": "../../element-plus/es/components/sub-menu/style/index.mjs", "src": "../../element-plus/es/components/sub-menu/style/index.mjs",
"file": "element-plus_es_components_sub-menu_style_index.js", "file": "element-plus_es_components_sub-menu_style_index.js",
"fileHash": "7eb24220", "fileHash": "03bf85d6",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/menu-item/style/index": { "element-plus/es/components/menu-item/style/index": {
"src": "../../element-plus/es/components/menu-item/style/index.mjs", "src": "../../element-plus/es/components/menu-item/style/index.mjs",
"file": "element-plus_es_components_menu-item_style_index.js", "file": "element-plus_es_components_menu-item_style_index.js",
"fileHash": "0fc69fc3", "fileHash": "a2dee0d4",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/icon/style/index": { "element-plus/es/components/icon/style/index": {
"src": "../../element-plus/es/components/icon/style/index.mjs", "src": "../../element-plus/es/components/icon/style/index.mjs",
"file": "element-plus_es_components_icon_style_index.js", "file": "element-plus_es_components_icon_style_index.js",
"fileHash": "32644466", "fileHash": "04400642",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/message/style/index": { "element-plus/es/components/message/style/index": {
"src": "../../element-plus/es/components/message/style/index.mjs", "src": "../../element-plus/es/components/message/style/index.mjs",
"file": "element-plus_es_components_message_style_index.js", "file": "element-plus_es_components_message_style_index.js",
"fileHash": "769b9c11", "fileHash": "bfcc6e5d",
"needsInterop": false
},
"element-plus/es/components/dialog/style/index": {
"src": "../../element-plus/es/components/dialog/style/index.mjs",
"file": "element-plus_es_components_dialog_style_index.js",
"fileHash": "a5ed6aa1",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/form/style/index": { "element-plus/es/components/form/style/index": {
"src": "../../element-plus/es/components/form/style/index.mjs", "src": "../../element-plus/es/components/form/style/index.mjs",
"file": "element-plus_es_components_form_style_index.js", "file": "element-plus_es_components_form_style_index.js",
"fileHash": "959fbca7", "fileHash": "826d74eb",
"needsInterop": false
},
"element-plus/es/components/button/style/index": {
"src": "../../element-plus/es/components/button/style/index.mjs",
"file": "element-plus_es_components_button_style_index.js",
"fileHash": "298368e4",
"needsInterop": false
},
"element-plus/es/components/select/style/index": {
"src": "../../element-plus/es/components/select/style/index.mjs",
"file": "element-plus_es_components_select_style_index.js",
"fileHash": "b03ae1f4",
"needsInterop": false
},
"element-plus/es/components/option/style/index": {
"src": "../../element-plus/es/components/option/style/index.mjs",
"file": "element-plus_es_components_option_style_index.js",
"fileHash": "0d7e30fb",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/form-item/style/index": { "element-plus/es/components/form-item/style/index": {
"src": "../../element-plus/es/components/form-item/style/index.mjs", "src": "../../element-plus/es/components/form-item/style/index.mjs",
"file": "element-plus_es_components_form-item_style_index.js", "file": "element-plus_es_components_form-item_style_index.js",
"fileHash": "e0d5177d", "fileHash": "fe81150d",
"needsInterop": false
},
"element-plus/es/components/input/style/index": {
"src": "../../element-plus/es/components/input/style/index.mjs",
"file": "element-plus_es_components_input_style_index.js",
"fileHash": "71692cbd",
"needsInterop": false
},
"element-plus/es/components/dialog/style/index": {
"src": "../../element-plus/es/components/dialog/style/index.mjs",
"file": "element-plus_es_components_dialog_style_index.js",
"fileHash": "ee419574",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/pagination/style/index": { "element-plus/es/components/pagination/style/index": {
"src": "../../element-plus/es/components/pagination/style/index.mjs", "src": "../../element-plus/es/components/pagination/style/index.mjs",
"file": "element-plus_es_components_pagination_style_index.js", "file": "element-plus_es_components_pagination_style_index.js",
"fileHash": "79e110c3", "fileHash": "3c169117",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/table/style/index": { "element-plus/es/components/table/style/index": {
"src": "../../element-plus/es/components/table/style/index.mjs", "src": "../../element-plus/es/components/table/style/index.mjs",
"file": "element-plus_es_components_table_style_index.js", "file": "element-plus_es_components_table_style_index.js",
"fileHash": "45e0d221", "fileHash": "4ac26944",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/table-column/style/index": { "element-plus/es/components/table-column/style/index": {
"src": "../../element-plus/es/components/table-column/style/index.mjs", "src": "../../element-plus/es/components/table-column/style/index.mjs",
"file": "element-plus_es_components_table-column_style_index.js", "file": "element-plus_es_components_table-column_style_index.js",
"fileHash": "7f49a9e8", "fileHash": "37b1f53a",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/button/style/index": { "element-plus/es/components/message-box/style/index": {
"src": "../../element-plus/es/components/button/style/index.mjs", "src": "../../element-plus/es/components/message-box/style/index.mjs",
"file": "element-plus_es_components_button_style_index.js", "file": "element-plus_es_components_message-box_style_index.js",
"fileHash": "19ccb854", "fileHash": "4b13d5b3",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/input/style/index": { "element-plus/es/components/upload/style/index": {
"src": "../../element-plus/es/components/input/style/index.mjs", "src": "../../element-plus/es/components/upload/style/index.mjs",
"file": "element-plus_es_components_input_style_index.js", "file": "element-plus_es_components_upload_style_index.js",
"fileHash": "fa3a1e1e", "fileHash": "238313e0",
"needsInterop": false "needsInterop": false
}, },
"element-plus/es/components/message-box/style/index": { "element-plus/es/components/date-picker/style/index": {
"src": "../../element-plus/es/components/message-box/style/index.mjs", "src": "../../element-plus/es/components/date-picker/style/index.mjs",
"file": "element-plus_es_components_message-box_style_index.js", "file": "element-plus_es_components_date-picker_style_index.js",
"fileHash": "f2719567", "fileHash": "37769ea1",
"needsInterop": false
},
"element-plus/es/components/radio-group/style/index": {
"src": "../../element-plus/es/components/radio-group/style/index.mjs",
"file": "element-plus_es_components_radio-group_style_index.js",
"fileHash": "0481c8fb",
"needsInterop": false
},
"element-plus/es/components/radio/style/index": {
"src": "../../element-plus/es/components/radio/style/index.mjs",
"file": "element-plus_es_components_radio_style_index.js",
"fileHash": "2d48a94a",
"needsInterop": false
},
"element-plus/es/components/image/style/index": {
"src": "../../element-plus/es/components/image/style/index.mjs",
"file": "element-plus_es_components_image_style_index.js",
"fileHash": "5adb848e",
"needsInterop": false "needsInterop": false
} }
}, },
"chunks": { "chunks": {
"chunk-MFXAVKGL": { "chunk-LLX57AWP": {
"file": "chunk-MFXAVKGL.js" "file": "chunk-LLX57AWP.js"
}, },
"chunk-TJY4NJSL": { "chunk-DJEZ4JTC": {
"file": "chunk-TJY4NJSL.js" "file": "chunk-DJEZ4JTC.js"
}, },
"chunk-7AKRAGCT": { "chunk-PPVUTFQ4": {
"file": "chunk-7AKRAGCT.js" "file": "chunk-PPVUTFQ4.js"
}, },
"chunk-5WWUZCGV": { "chunk-GWFAMI2R": {
"file": "chunk-5WWUZCGV.js" "file": "chunk-GWFAMI2R.js"
}, },
"chunk-KR333NDQ": { "chunk-AJCL53Z6": {
"file": "chunk-KR333NDQ.js" "file": "chunk-AJCL53Z6.js"
}, },
"chunk-FJTOK54K": { "chunk-MNGJP5CX": {
"file": "chunk-FJTOK54K.js" "file": "chunk-MNGJP5CX.js"
}, },
"chunk-RSYYQNY4": { "chunk-GKVWLPNN": {
"file": "chunk-RSYYQNY4.js" "file": "chunk-GKVWLPNN.js"
}, },
"chunk-6XXACKVZ": { "chunk-DS4Y6AOL": {
"file": "chunk-6XXACKVZ.js" "file": "chunk-DS4Y6AOL.js"
}, },
"chunk-3TXWDNGO": { "chunk-NHX6JBU6": {
"file": "chunk-3TXWDNGO.js" "file": "chunk-NHX6JBU6.js"
}, },
"chunk-D3CWYFF3": { "chunk-CI3L27KN": {
"file": "chunk-D3CWYFF3.js" "file": "chunk-CI3L27KN.js"
}, },
"chunk-BJFB2CUW": { "chunk-772POZ6I": {
"file": "chunk-BJFB2CUW.js" "file": "chunk-772POZ6I.js"
}, },
"chunk-INT4LFCS": { "chunk-MFXAVKGL": {
"file": "chunk-INT4LFCS.js" "file": "chunk-MFXAVKGL.js"
}, },
"chunk-SHI5Q57K": { "chunk-TJY4NJSL": {
"file": "chunk-SHI5Q57K.js" "file": "chunk-TJY4NJSL.js"
},
"chunk-7AKRAGCT": {
"file": "chunk-7AKRAGCT.js"
},
"chunk-5WWUZCGV": {
"file": "chunk-5WWUZCGV.js"
} }
} }
} }

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/tag/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/tag.scss";
//# sourceMappingURL=chunk-3TXWDNGO.js.map

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/popper/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/popper.scss";
//# sourceMappingURL=chunk-6XXACKVZ.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/base/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/base.scss";
//# sourceMappingURL=chunk-772POZ6I.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/checkbox/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/checkbox.scss";
//# sourceMappingURL=chunk-AJCL53Z6.js.map

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/button/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/button.scss";
//# sourceMappingURL=chunk-BJFB2CUW.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/popper/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/popper.scss";
//# sourceMappingURL=chunk-CI3L27KN.js.map

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/checkbox/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/checkbox.scss";
//# sourceMappingURL=chunk-D3CWYFF3.js.map

@ -0,0 +1,6 @@
// node_modules/element-plus/es/components/option-group/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/option-group.scss";
// node_modules/element-plus/es/components/select/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/select.scss";
//# sourceMappingURL=chunk-DJEZ4JTC.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../element-plus/es/components/option-group/style/index.mjs", "../../element-plus/es/components/select/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/option-group.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n", "import '../../base/style/index.mjs';\r\nimport '../../input/style/index.mjs';\r\nimport '../../tag/style/index.mjs';\r\nimport '../../option/style/index.mjs';\r\nimport '../../option-group/style/index.mjs';\r\nimport '../../scrollbar/style/index.mjs';\r\nimport '../../popper/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/select.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";AACA,OAAO;;;ACMP,OAAO;",
"names": []
}

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/input/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/input.scss";
//# sourceMappingURL=chunk-DS4Y6AOL.js.map

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/tooltip/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/tooltip.scss";
//# sourceMappingURL=chunk-FJTOK54K.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/button/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/button.scss";
//# sourceMappingURL=chunk-GKVWLPNN.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/option/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/option.scss";
//# sourceMappingURL=chunk-GWFAMI2R.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../element-plus/es/components/option/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/option.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";AACA,OAAO;",
"names": []
}

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/input/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/input.scss";
//# sourceMappingURL=chunk-INT4LFCS.js.map

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/overlay/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/overlay.scss";
//# sourceMappingURL=chunk-KR333NDQ.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/overlay/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/overlay.scss";
//# sourceMappingURL=chunk-LLX57AWP.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/tooltip/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/tooltip.scss";
//# sourceMappingURL=chunk-MNGJP5CX.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/scrollbar/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/scrollbar.scss";
//# sourceMappingURL=chunk-NHX6JBU6.js.map

@ -0,0 +1,3 @@
// node_modules/element-plus/es/components/tag/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/tag.scss";
//# sourceMappingURL=chunk-PPVUTFQ4.js.map

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/scrollbar/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/scrollbar.scss";
//# sourceMappingURL=chunk-RSYYQNY4.js.map

@ -1,3 +0,0 @@
// node_modules/element-plus/es/components/base/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/base.scss";
//# sourceMappingURL=chunk-SHI5Q57K.js.map

@ -1,2 +1,2 @@
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
//# sourceMappingURL=element-plus_es_components_base_style_index.js.map //# sourceMappingURL=element-plus_es_components_base_style_index.js.map

@ -1,3 +1,3 @@
import "./chunk-BJFB2CUW.js"; import "./chunk-GKVWLPNN.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
//# sourceMappingURL=element-plus_es_components_button_style_index.js.map //# sourceMappingURL=element-plus_es_components_button_style_index.js.map

@ -0,0 +1,9 @@
import "./chunk-GKVWLPNN.js";
import "./chunk-DS4Y6AOL.js";
import "./chunk-NHX6JBU6.js";
import "./chunk-CI3L27KN.js";
import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/date-picker/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/date-picker.scss";
//# sourceMappingURL=element-plus_es_components_date-picker_style_index.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../element-plus/es/components/date-picker/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/date-picker.scss';\r\nimport '../../input/style/index.mjs';\r\nimport '../../scrollbar/style/index.mjs';\r\nimport '../../popper/style/index.mjs';\r\nimport '../../button/style/index.mjs';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";;;;;;;AACA,OAAO;",
"names": []
}

@ -1,6 +1,6 @@
import "./chunk-KR333NDQ.js"; import "./chunk-LLX57AWP.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/dialog/style/index.mjs // node_modules/element-plus/es/components/dialog/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/dialog.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/dialog.scss";
//# sourceMappingURL=element-plus_es_components_dialog_style_index.js.map //# sourceMappingURL=element-plus_es_components_dialog_style_index.js.map

@ -1,5 +1,5 @@
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/form-item/style/index.mjs // node_modules/element-plus/es/components/form-item/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/form-item.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/form-item.scss";
//# sourceMappingURL=element-plus_es_components_form-item_style_index.js.map //# sourceMappingURL=element-plus_es_components_form-item_style_index.js.map

@ -1,5 +1,5 @@
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/form/style/index.mjs // node_modules/element-plus/es/components/form/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/form.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/form.scss";
//# sourceMappingURL=element-plus_es_components_form_style_index.js.map //# sourceMappingURL=element-plus_es_components_form_style_index.js.map

@ -1,5 +1,5 @@
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/icon/style/index.mjs // node_modules/element-plus/es/components/icon/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/icon.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/icon.scss";
//# sourceMappingURL=element-plus_es_components_icon_style_index.js.map //# sourceMappingURL=element-plus_es_components_icon_style_index.js.map

@ -0,0 +1,8 @@
import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/image/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/image.scss";
// node_modules/element-plus/es/components/image-viewer/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/image-viewer.scss";
//# sourceMappingURL=element-plus_es_components_image_style_index.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../element-plus/es/components/image/style/index.mjs", "../../element-plus/es/components/image-viewer/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/image.scss';\r\nimport '../../image-viewer/style/index.mjs';\r\n//# sourceMappingURL=index.mjs.map\r\n", "import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/image-viewer.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";;;AACA,OAAO;;;ACAP,OAAO;",
"names": []
}

@ -1,3 +1,3 @@
import "./chunk-INT4LFCS.js"; import "./chunk-DS4Y6AOL.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
//# sourceMappingURL=element-plus_es_components_input_style_index.js.map //# sourceMappingURL=element-plus_es_components_input_style_index.js.map

@ -1,5 +1,5 @@
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/menu-item/style/index.mjs // node_modules/element-plus/es/components/menu-item/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/menu-item.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/menu-item.scss";
//# sourceMappingURL=element-plus_es_components_menu-item_style_index.js.map //# sourceMappingURL=element-plus_es_components_menu-item_style_index.js.map

@ -1,7 +1,7 @@
import "./chunk-FJTOK54K.js"; import "./chunk-MNGJP5CX.js";
import "./chunk-6XXACKVZ.js"; import "./chunk-CI3L27KN.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/menu/style/index.mjs // node_modules/element-plus/es/components/menu/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/menu.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/menu.scss";
//# sourceMappingURL=element-plus_es_components_menu_style_index.js.map //# sourceMappingURL=element-plus_es_components_menu_style_index.js.map

@ -1,8 +1,8 @@
import "./chunk-KR333NDQ.js"; import "./chunk-LLX57AWP.js";
import "./chunk-BJFB2CUW.js"; import "./chunk-GKVWLPNN.js";
import "./chunk-INT4LFCS.js"; import "./chunk-DS4Y6AOL.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/message-box/style/index.mjs // node_modules/element-plus/es/components/message-box/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/message-box.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/message-box.scss";
//# sourceMappingURL=element-plus_es_components_message-box_style_index.js.map //# sourceMappingURL=element-plus_es_components_message-box_style_index.js.map

@ -1,8 +1,8 @@
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/badge/style/index.mjs // node_modules/element-plus/es/components/badge/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/badge.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/badge.scss";
// node_modules/element-plus/es/components/message/style/index.mjs // node_modules/element-plus/es/components/message/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/message.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/message.scss";
//# sourceMappingURL=element-plus_es_components_message_style_index.js.map //# sourceMappingURL=element-plus_es_components_message_style_index.js.map

@ -0,0 +1,3 @@
import "./chunk-GWFAMI2R.js";
import "./chunk-772POZ6I.js";
//# sourceMappingURL=element-plus_es_components_option_style_index.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

@ -1,18 +1,11 @@
import "./chunk-RSYYQNY4.js"; import "./chunk-DJEZ4JTC.js";
import "./chunk-6XXACKVZ.js"; import "./chunk-PPVUTFQ4.js";
import "./chunk-3TXWDNGO.js"; import "./chunk-GWFAMI2R.js";
import "./chunk-INT4LFCS.js"; import "./chunk-DS4Y6AOL.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-NHX6JBU6.js";
import "./chunk-CI3L27KN.js";
import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/pagination/style/index.mjs // node_modules/element-plus/es/components/pagination/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/pagination.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/pagination.scss";
// node_modules/element-plus/es/components/option/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/option.scss";
// node_modules/element-plus/es/components/option-group/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/option-group.scss";
// node_modules/element-plus/es/components/select/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/select.scss";
//# sourceMappingURL=element-plus_es_components_pagination_style_index.js.map //# sourceMappingURL=element-plus_es_components_pagination_style_index.js.map

@ -1,7 +1,7 @@
{ {
"version": 3, "version": 3,
"sources": ["../../element-plus/es/components/pagination/style/index.mjs", "../../element-plus/es/components/option/style/index.mjs", "../../element-plus/es/components/option-group/style/index.mjs", "../../element-plus/es/components/select/style/index.mjs"], "sources": ["../../element-plus/es/components/pagination/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/pagination.scss';\r\nimport '../../select/style/index.mjs';\r\n//# sourceMappingURL=index.mjs.map\r\n", "import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/option.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n", "import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/option-group.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n", "import '../../base/style/index.mjs';\r\nimport '../../input/style/index.mjs';\r\nimport '../../tag/style/index.mjs';\r\nimport '../../option/style/index.mjs';\r\nimport '../../option-group/style/index.mjs';\r\nimport '../../scrollbar/style/index.mjs';\r\nimport '../../popper/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/select.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"], "sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/pagination.scss';\r\nimport '../../select/style/index.mjs';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";;;;;;;AACA,OAAO;;;ACAP,OAAO;;;ACAP,OAAO;;;ACMP,OAAO;", "mappings": ";;;;;;;;;AACA,OAAO;",
"names": [] "names": []
} }

@ -0,0 +1,5 @@
import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/radio-group/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/radio-group.scss";
//# sourceMappingURL=element-plus_es_components_radio-group_style_index.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../element-plus/es/components/radio-group/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/radio-group.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";;;AACA,OAAO;",
"names": []
}

@ -0,0 +1,5 @@
import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/radio/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/radio.scss";
//# sourceMappingURL=element-plus_es_components_radio_style_index.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../element-plus/es/components/radio/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/radio.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";;;AACA,OAAO;",
"names": []
}

@ -0,0 +1,8 @@
import "./chunk-DJEZ4JTC.js";
import "./chunk-PPVUTFQ4.js";
import "./chunk-GWFAMI2R.js";
import "./chunk-DS4Y6AOL.js";
import "./chunk-NHX6JBU6.js";
import "./chunk-CI3L27KN.js";
import "./chunk-772POZ6I.js";
//# sourceMappingURL=element-plus_es_components_select_style_index.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

@ -1,5 +1,5 @@
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/sub-menu/style/index.mjs // node_modules/element-plus/es/components/sub-menu/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/sub-menu.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/sub-menu.scss";
//# sourceMappingURL=element-plus_es_components_sub-menu_style_index.js.map //# sourceMappingURL=element-plus_es_components_sub-menu_style_index.js.map

@ -1,7 +1,7 @@
import "./chunk-3TXWDNGO.js"; import "./chunk-PPVUTFQ4.js";
import "./chunk-D3CWYFF3.js"; import "./chunk-AJCL53Z6.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/table-column/style/index.mjs // node_modules/element-plus/es/components/table-column/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/table-column.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/table-column.scss";
//# sourceMappingURL=element-plus_es_components_table-column_style_index.js.map //# sourceMappingURL=element-plus_es_components_table-column_style_index.js.map

@ -1,9 +1,9 @@
import "./chunk-FJTOK54K.js"; import "./chunk-AJCL53Z6.js";
import "./chunk-RSYYQNY4.js"; import "./chunk-MNGJP5CX.js";
import "./chunk-6XXACKVZ.js"; import "./chunk-NHX6JBU6.js";
import "./chunk-D3CWYFF3.js"; import "./chunk-CI3L27KN.js";
import "./chunk-SHI5Q57K.js"; import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/table/style/index.mjs // node_modules/element-plus/es/components/table/style/index.mjs
import "C:/system of information/git/vue/node_modules/element-plus/theme-chalk/src/table.scss"; import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/table.scss";
//# sourceMappingURL=element-plus_es_components_table_style_index.js.map //# sourceMappingURL=element-plus_es_components_table_style_index.js.map

@ -0,0 +1,8 @@
import "./chunk-772POZ6I.js";
// node_modules/element-plus/es/components/upload/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/upload.scss";
// node_modules/element-plus/es/components/progress/style/index.mjs
import "D:/虚拟C盘/CODE/GIt/vue/node_modules/element-plus/theme-chalk/src/progress.scss";
//# sourceMappingURL=element-plus_es_components_upload_style_index.js.map

@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../element-plus/es/components/upload/style/index.mjs", "../../element-plus/es/components/progress/style/index.mjs"],
"sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/upload.scss';\r\nimport '../../progress/style/index.mjs';\r\n//# sourceMappingURL=index.mjs.map\r\n", "import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/progress.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"],
"mappings": ";;;AACA,OAAO;;;ACAP,OAAO;",
"names": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

@ -7,14 +7,19 @@ const router = createRouter({
path: '/', path: '/',
name: 'Manager', name: 'Manager',
component: () => import('@/views/Manager.vue'), component: () => import('@/views/Manager.vue'),
redirect: '/home', redirect: '/login',
children: [ children: [
{ path: 'home', name: 'Home', component: () => import('@/views/manager/Home.vue')}, { path: 'home', name: 'Home', component: () => import('@/views/manager/Home.vue')},
{ path: 'course', name: 'Course', component: () => import('@/views/manager/Course.vue')}, { path: 'course', name: 'Course', component: () => import('@/views/manager/Course.vue')},
{ path: 'student', name: 'Student', component: () => import('@/views/manager/Student.vue')},
{ path: 'courseList', name: 'CourseList', component: () => import('@/views/manager/CourseList.vue')},
{ path: 'studentCourse', name: 'StudentCourse', component: () => import('@/views/manager/StudentCourse.vue')},
{ path: 'person', name: 'Person', component: () => import('@/views/manager/Person.vue')},
{ path: 'grade', name: 'Grade', component: () => import('@/views/manager/Grade.vue')},
] ]
}, },
{ path: '/login', name: 'Login', component: () => import('@/views/Login.vue'), { path: '/login', name: 'Login', component: () => import('@/views/Login.vue'),},
} { path: '/register', name: 'Register', component: () => import('@/views/Register.vue'),},
] ]
}) })

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<div class="login-container"> <div class="login-container">
<div style="width:350px" class="login-box"> <div style="width: 350px" class="login-box">
<div style="font-weight: bold; font-size: 24px; text-align: center; margin-bottom:30px" class="title"> </div> <div style="font-weight: bold; font-size: 24px; text-align: center; margin-bottom: 30px"> </div>
<el-form :model="data.form" ref="formRef" :rules="rules"> <el-form :model="data.form" ref="formRef" :rules="rules">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input prefix-icon="User" v-model="data.form.username" placeholder="请输入账号" /> <el-input prefix-icon="User" v-model="data.form.username" placeholder="请输入账号" />
@ -10,12 +10,18 @@
<el-form-item prop="password"> <el-form-item prop="password">
<el-input show-password prefix-icon="Lock" v-model="data.form.password" placeholder="请输入密码" /> <el-input show-password prefix-icon="Lock" v-model="data.form.password" placeholder="请输入密码" />
</el-form-item> </el-form-item>
<el-form-item prop="role">
<el-select style="width: 100%" v-model="data.form.role">
<el-option value="ADMIN" label="管理员"></el-option>
<el-option value="STUDENT" label="学生"></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" style="width:100%" @click="login"> </el-button> <el-button type="primary" style="width: 100%" @click="login"> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="margin-top:30px ; text-align: right" > <div style="margin-top: 30px; text-align: right">
还没有账号<a href="/register">注册</a> 还没有账号 <a href="/register">注册</a>
</div> </div>
</div> </div>
</div> </div>
@ -29,7 +35,7 @@ import {ElMessage} from "element-plus";
import router from "@/router"; import router from "@/router";
const data = reactive({ const data = reactive({
form: {} form: { role: 'ADMIN' }
}) })
const rules = reactive({ const rules = reactive({

@ -8,8 +8,8 @@
</div> </div>
</div> </div>
<div style="width: fit-content; padding-right: 10px; display: flex; align-items: center;"> <div style="width: fit-content; padding-right: 10px; display: flex; align-items: center;">
<img src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png" alt="" style="width: 40px; height: 40px"> <img :src="user.avatar||'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" alt="" style="width: 40px; height: 40px; border-radius: 50%">
<span style="margin-left: 5px">管理员</span> <span style="margin-left: 5px">{{user.name}}</span>
</div> </div>
</div> </div>
@ -19,7 +19,7 @@
router router
style="border: none" style="border: none"
:default-active="$route.path" :default-active="$route.path"
:default-openeds="['/home', '2']" :default-openeds="['/home', '2','3']"
> >
<el-menu-item index="/home"> <el-menu-item index="/home">
<el-icon><HomeFilled /></el-icon> <el-icon><HomeFilled /></el-icon>
@ -30,12 +30,40 @@
<el-icon><Memo /></el-icon> <el-icon><Memo /></el-icon>
<span>课程管理</span> <span>课程管理</span>
</template> </template>
<el-menu-item index="/course"> <el-menu-item index="/course" v-if="user.role === 'ADMIN'">
<el-icon><Document /></el-icon> <el-icon><Document /></el-icon>
<span>课程信息</span> <span>课程信息</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="/courseList" v-if="user.role === 'STUDENT'">
<el-icon><Document /></el-icon>
<span>学生选课</span>
</el-menu-item>
<el-menu-item index="/studentCourse">
<el-icon><Document /></el-icon>
<span>选课记录</span>
</el-menu-item>
</el-sub-menu>
<el-sub-menu index="3">
<template #title>
<el-icon><Memo /></el-icon>
<span>成绩信息</span>
</template>
<el-menu-item index="/grade">
<el-icon><Document /></el-icon>
<span>学生成绩</span>
</el-menu-item>
</el-sub-menu>
<el-sub-menu index="4" v-if="user.role === 'ADMIN'">
<template #title>
<el-icon><User /></el-icon>
<span>用户管理</span>
</template>
<el-menu-item index="/student">
<el-icon><UserFilled /></el-icon>
<span>学生信息</span>
</el-menu-item>
</el-sub-menu> </el-sub-menu>
<el-menu-item index="/person"> <el-menu-item index="/person" v-if="user.role === 'STUDENT'">
<el-icon><User /></el-icon> <el-icon><User /></el-icon>
<span>个人资料</span> <span>个人资料</span>
</el-menu-item> </el-menu-item>
@ -57,6 +85,7 @@
<script setup> <script setup>
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const $route = useRoute() const $route = useRoute()
const user =JSON.parse(localStorage.getItem('student-user')||'{}')
console.log($route.path) console.log($route.path)
const logout = () => { const logout = () => {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save