# 1804b **Repository Path**: lstyr/b1804 ## Basic Information - **Project Name**: 1804b - **Description**: 2020.10教学周期授课记录仓库。 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2020-10-12 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 概述 2020 年 10 月教学周期授课记录。 包含课程讲解和作业。 # 班规 - 早自习 - 6 点 50 进班。 - 一次迟到上午四节站着; - 二次迟到站外面; - 三次迟到站办公室; - 有问题,值日都提前请假,不请假不来的站一天; - 日考 - 提前 2 分钟录屏,不允许做与考试无关的事情; - 日考技能有问题,就做上一天作业相关内容,并且不能提前下课; - 日考技能未完成,不允许提前结束; - 虚报成绩,查出来日考成绩 0 分,站一天; - 一次不过(85 通过),抄错题 10 遍; - 二次不过,一天内正课一直站着; - 三次不过,抄一遍所有理论题; - 课堂 - 下课期间不允许玩手机,发现站一节课,以后进班交手机; - 自习课做与考试无关的事情,站一天; - 作业 - 基础类型作业,晚自习下课前必须提交,否则不允许回宿舍; - 不提交的明天一天上课站着; - 违纪 - 正课违纪,去外面站着; - 其他违纪,站到后面; - 只要违纪就抄写当天代码一遍。 ## 11-4 - 3 - 4 - 7 ```tsx import React, { useState } from "react"; import { Layout, Menu } from "antd"; import menus from "../../router/menu"; import { Link } from "react-router-dom"; import { useLocation } from "react-router-dom"; import useStore from "../../context/useStore"; import { useObserver } from "mobx-react-lite"; import { injectIntl } from "react-intl"; const { Sider } = Layout; const { SubMenu } = Menu; const MyMenu: React.FC = (props) => { let [openKey, setOpenKey] = useState(""); let [selectKey, setSelectKey] = useState(""); let { util, user } = useStore(); let location = useLocation(); let index = menus.findIndex((item) => { return item.children.some( (value) => value.path === location.pathname ); }) + ""; if (index !== openKey) { setOpenKey(index); } if (location.pathname !== selectKey) { setSelectKey(location.pathname); } function getMyMenu() { return user.userViewAuthority.length ? user.userViewAuthority : menus; } return useObserver(() => ( {getMyMenu().map((item: any, index: number) => { return ( } title={formatMessage({ id: item.name, defaultMessage: item.name, })} > {item.children.map((value: any) => { return ( value.meta.show && ( util.addTag({ name: value.name, path: value.path, }) } > {formatMessage({ id: value.name, defaultMessage: value.name, })} ) ); })} ); })} )); }; export default injectIntl(MyMenu); ``` ```tsx import { UserOutlined, LaptopOutlined, NotificationOutlined, BellOutlined, CommentOutlined, } from "@ant-design/icons"; import React from "react"; // 试题管理 const AddQuestionPage = React.lazy( () => import("../views/main/question/AddQuestion") ); const ClassifyQuestionPage = React.lazy( () => import("../views/main/question/ClassifyQuestion") ); const QuestionDetailPage = React.lazy( () => import("../views/main/question/QuestionDetail") ); const ViewQuestionPage = React.lazy( () => import("../views/main/question/ViewQuestion") ); // 班级管理 const ClassManagerPage = React.lazy( () => import("../views/main/class/ClassManager") ); const RoomManagerPage = React.lazy( () => import("../views/main/class/RoomManager") ); const StudentManagerPage = React.lazy( () => import("../views/main/class/StudentManager") ); // 用户管理 const AddConsumerPage = React.lazy( () => import("../views/main/consumer/AddConsumer") ); const ShowConsumerPage = React.lazy( () => import("../views/main/consumer/ShowConsumer") ); // 试卷管理 const AddPaperPage = React.lazy(() => import("../views/main/paper/AddPaper")); const PaperDetailPage = React.lazy( () => import("../views/main/paper/PaperDetail") ); const PaperListPage = React.lazy(() => import("../views/main/paper/PaperList")); // 阅卷管理 const MarkingDetailPage = React.lazy( () => import("../views/main/marking/MarkingDetail") ); const MarkingListPage = React.lazy( () => import("../views/main/marking/MarkingList") ); const MarkingStudentListPage = React.lazy( () => import("../views/main/marking/MarkingStudentList") ); const menus = [ { name: "menu.question", meta: { icon: UserOutlined, title: "", show: true, }, children: [ { path: "/main/addQuestion", name: "menu.question.addQuestion", meta: { title: "添加试题", show: true, component: AddQuestionPage, view_id: "main-addQuestions", }, }, { path: "/main/classifyQuestion", name: "menu.question.classifyQuestion", meta: { title: "试题分类", show: true, component: ClassifyQuestionPage, view_id: "main-questionsType", }, }, { path: "/main/questionDetail", name: "menu.question.questionDetail", meta: { title: "试题详情", show: false, component: QuestionDetailPage, view_id: "main-questionsDetail", }, }, { path: "/main/viewQuestion", name: "menu.question.viewQuestion", meta: { title: "查看试题", show: true, component: ViewQuestionPage, view_id: "main-watchQuestions", }, }, ], }, { name: "用户管理", meta: { icon: LaptopOutlined, title: "用户管理", show: true, }, children: [ { path: "/main/addConsumer", name: "添加用户", meta: { title: "添加用户", show: true, component: AddConsumerPage, view_id: "main-addUser", }, }, { path: "/main/showConsumer", name: "用户展示", meta: { title: "用户展示", show: true, component: ShowConsumerPage, view_id: "main-showUser", }, }, ], }, { name: "考试管理", meta: { icon: NotificationOutlined, title: "", show: true, }, children: [ { path: "/main/addPaper", name: "添加考试", meta: { title: "添加考试", show: true, component: AddPaperPage, view_id: "main-addExam", }, }, { path: "/main/paperDetail", name: "考试详情", meta: { title: "考试详情", show: false, component: PaperDetailPage, view_id: "main-examDetail", }, }, { path: "/main/paperList", name: "试卷列表", meta: { title: "试卷列表", show: true, component: PaperListPage, view_id: "main-examList", }, }, ], }, { name: "班级管理", meta: { icon: BellOutlined, title: "班级管理", show: true, }, children: [ { path: "/main/classManager", name: "班级管理", meta: { title: "班级管理", show: true, component: ClassManagerPage, view_id: "main-grade", }, }, { path: "/main/roomManager", name: "教室管理", meta: { title: "教室管理", show: true, component: RoomManagerPage, view_id: "main-room", }, }, { path: "/main/studentManager", name: "学生管理", meta: { title: "学生管理", show: true, component: StudentManagerPage, view_id: "main-student", }, }, ], }, { name: "阅卷管理", meta: { icon: CommentOutlined, title: "", show: true, }, children: [ { path: "/main/markingDetail", name: "批卷", meta: { title: "批卷", show: false, component: MarkingDetailPage, view_id: "main-examinationPapers", }, }, { path: "/main/markingList", name: "待批班级", meta: { title: "待批班级", show: true, component: MarkingListPage, view_id: "main-examPaperClassList", }, }, { path: "/main/markingStudentList", name: "学生试卷列表", meta: { title: "学生试卷列表", show: false, component: MarkingStudentListPage, view_id: "main-examPaperClassmate", }, }, ], }, ]; export default menus; ```