12.学生列表中的添加学生
14.题目难度导入
17.建议时长
| | |
| | | }, |
| | | data () { |
| | | return { |
| | | uploadUrl: 'https://ycl.easyblog.vip:81/api/upload/upload', |
| | | uploadUrl: '/api/upload/upload', |
| | | fileTypeList: { |
| | | 'video': ['mp4', 'avi', 'webm'], |
| | | 'img': ['jpg', 'png', 'jpeg'], |
| | |
| | | 'excel': ['xlsx', 'xls'], |
| | | 'audio': ['mp3'], |
| | | 'ppt': ['ppt', 'pptx'], |
| | | 'file': ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'png', 'jpg', 'jpeg', 'pdf'], |
| | | 'file': ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'png', 'jpg', 'jpeg', 'pdf'] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | clearFile () { |
| | | this.fileUrl = [] |
| | | |
| | | }, |
| | | beforeRemove (file, fileList) { |
| | | if (file && file.status === 'success') { |
| | |
| | | this.$message.error(`上传文件大小不能超过 ${this.fileSizeLimitM}MB!`) |
| | | } |
| | | return limitType && limit |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | acceptList () { |
| | |
| | | :before-close="handleAddClose" |
| | | :close-on-click-modal="false"> |
| | | <el-form :model="studentForm" :rules="studentRules" ref="studentForm" label-width="100px" class="demo-ruleForm"> |
| | | <el-form-item label="姓名" prop="realName"> |
| | | <el-input v-model="studentForm.realName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="性别" prop="sex"> |
| | | <el-select v-model="studentForm.sex"> |
| | | <el-option label="男" :value="1"></el-option> |
| | | <el-option label="女" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="电话" prop="phone"> |
| | | <el-input v-model="studentForm.phone"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="登录账号" prop="account"> |
| | | <el-input v-model="studentForm.account"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="登录密码" prop="password"> |
| | | <el-input v-model="studentForm.password" show-password placeholder="不填写会使用默认202406"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="真实姓名:" prop="realName" required> |
| | | <el-input v-model="studentForm.realName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="手机号码:" prop="phone" required> |
| | | <el-input v-model="studentForm.phone"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="登录账号:" prop="userName" required> |
| | | <el-input v-model="studentForm.userName" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="!studentForm.id" label="登录密码:" prop="password" required> |
| | | <el-input v-model="studentForm.password" show-password autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="年龄:"> |
| | | <el-input v-model="studentForm.age"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="性别:"> |
| | | <el-select v-model="studentForm.sex" placeholder="性别" clearable> |
| | | <el-option v-for="item in sexEnum" :key="item.key" :value="item.key" :label="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="出生日期:"> |
| | | <el-date-picker v-model="studentForm.birthDay" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="状态:" required> |
| | | <el-select v-model="studentForm.status" placeholder="状态"> |
| | | <el-option v-for="item in statusEnum" :key="item.key" :value="item.key" :label="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleAddClose">取 消</el-button> |
| | |
| | | <script> |
| | | // 引入彈出窗口組件 |
| | | import UserApi from '@/api/user' |
| | | import { mapGetters, mapState } from 'vuex' |
| | | import { |
| | | updateClassesUser, |
| | | getClassesUsers, |
| | |
| | | editClassesUser |
| | | } from '@/api/classesUser' |
| | | import Pagination from '@/components/Pagination' |
| | | import {deleteExamById} from "@/api/exam"; |
| | | |
| | | export default { |
| | | components: { Pagination }, |
| | |
| | | realName: '', |
| | | sex: 1, |
| | | phone: '', |
| | | birthDay: '', |
| | | age: null, |
| | | account: '', |
| | | userName: '', |
| | | password: '' |
| | | }, |
| | | studentRules: { |
| | | realName: [ |
| | | { required: true, message: '请填写学员姓名', trigger: 'blur' }, |
| | | { required: true, message: '请填写学员姓名', trigger: 'blur' } |
| | | ], |
| | | sex: [ |
| | | { required: true, message: '请选择学员性别', trigger: 'change' }, |
| | | { required: true, message: '请选择学员性别', trigger: 'change' } |
| | | ], |
| | | phone: [ |
| | | { required: true, message: '请填写学员电话', trigger: 'blur' }, |
| | | { required: true, message: '请填写学员电话', trigger: 'blur' } |
| | | ], |
| | | account: [ |
| | | { required: true, message: '请填写学员登录账号', trigger: 'blur' }, |
| | | userName: [ |
| | | { required: true, message: '请填写学员登录账号', trigger: 'blur' } |
| | | ] |
| | | }, |
| | | studentTitle: '新增学员', |
| | |
| | | formLabelAlign: { |
| | | type: '', |
| | | user: '', |
| | | region: '', |
| | | region: '' |
| | | }, |
| | | tableData: [], |
| | | tableData: [] |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | this.page() |
| | | this.resetStudentForm() |
| | | }) |
| | | }else { |
| | | } else { |
| | | addClassesUser(this.studentForm).then(res => { |
| | | this.addOpen = false |
| | | this.$message.success(res.data.message) |
| | |
| | | }, |
| | | resetStudentForm () { |
| | | this.studentForm = { |
| | | id: null, |
| | | realName: '', |
| | | sex: '', |
| | | sex: 1, |
| | | phone: '', |
| | | age: null |
| | | birthDay: '', |
| | | age: null, |
| | | userName: '', |
| | | password: '' |
| | | } |
| | | }, |
| | | handleAddClose () { |
| | |
| | | // 生成试卷 |
| | | getCreate () { |
| | | // 跳转到生成页面 |
| | | //跳转到对应的管理页面 |
| | | // 跳转到对应的管理页面 |
| | | this.$router.push({ |
| | | path: '/manage/test-paper-generation', |
| | | path: '/manage/test-paper-generation' |
| | | }) |
| | | }, |
| | | // 弹窗 |
| | | // 接收弹窗组件返回的表单值 |
| | | parentGoods (obj) { |
| | | console.log(obj, '弹窗组件的表单值') |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters('enumItem', [ |
| | | 'enumFormat' |
| | | ]), |
| | | ...mapState('enumItem', { |
| | | sexEnum: state => state.user.sexEnum, |
| | | roleEnum: state => state.user.roleEnum, |
| | | statusEnum: state => state.user.statusEnum, |
| | | levelEnum: state => state.user.levelEnum |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | |
| | | margin-right: 5px; |
| | | } |
| | | </style> |
| | | |
| | |
| | | <el-form-item label="主题简介" prop="introduction"> |
| | | <el-input v-model="form.introduction" placeholder="主题内容"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="班级"> |
| | | <el-form-item label="班级" prop="classId"> |
| | | <el-select |
| | | v-model="form.classId" |
| | | placeholder="班级" |
| | |
| | | introduction: [ |
| | | { required: true, message: '请输入主题内容', trigger: 'blur' } |
| | | ], |
| | | classId: [ |
| | | { required: true, message: '请选择班级', trigger: 'blur' } |
| | | ], |
| | | subjectId: [ |
| | | { required: true, message: '请选择科目', trigger: 'blur' } |
| | | ], |
| | | belongType: [ |
| | | { required: true, message: '请选择学习分类', trigger: 'change' } |
| | | ], |
| | |
| | | if (row.contentType === 'ppt') { |
| | | return 'PPT' |
| | | } |
| | | |
| | | }, |
| | | clearFile () { |
| | | this.form.contentUrl = [] |
| | |
| | | this.form.belongType = row.belongType |
| | | this.dialogTitle = '修改学习内容' |
| | | this.open = true |
| | | }, |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.page() |
| | |
| | | <div class="app-container"> |
| | | <div style="display: flex; flex-direction: row"> |
| | | <div> |
| | | <el-button type="primary" size="small" style="margin-right: 10px" @click="openAdd">安排考试</el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | style="margin-right: 10px" |
| | | @click="openAdd" |
| | | >安排考试</el-button |
| | | > |
| | | </div> |
| | | <div> |
| | | <el-form :inline="true" :model="searchForm" class="demo-form-inline"> |
| | | <el-form-item label="考试名称"> |
| | | <el-input v-model="searchForm.examName" @input="page" clearable size="small" @clear="page" |
| | | placeholder="班级名称"></el-input> |
| | | <el-input |
| | | v-model="searchForm.examName" |
| | | @input="page" |
| | | clearable |
| | | size="small" |
| | | @clear="page" |
| | | placeholder="班级名称" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="参考班级"> |
| | | <el-select v-model="searchForm.classesId" @change="page" clearable size="small" @clear="page"> |
| | | <el-option v-for="classes in classesList" :key="classes.id" :value="classes.id" |
| | | :label="classes.className"/> |
| | | <el-select |
| | | v-model="searchForm.classesId" |
| | | @change="page" |
| | | clearable |
| | | size="small" |
| | | @clear="page" |
| | | > |
| | | <el-option |
| | | v-for="classes in classesList" |
| | | :key="classes.id" |
| | | :value="classes.id" |
| | | :label="classes.className" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="page" size="small">查询</el-button> |
| | | <el-button type="primary" @click="page" size="small" |
| | | >查询</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | prop="status" |
| | | :formatter="statusFormatter" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | label="考试时间" |
| | | width="180px" |
| | | algin="center" |
| | | > |
| | | <el-table-column label="考试时间" width="180px" algin="center"> |
| | | <template slot-scope="scope"> |
| | | <div>{{ scope.row.startTime }}</div> |
| | | <div>至</div> |
| | |
| | | @click="handlerEdit(scope.row)" |
| | | v-if="scope.row.status === 'not_start'" |
| | | v-show="scope.row.status !== 'cancel'" |
| | | >修改 |
| | | >修改 |
| | | </el-button> |
| | | <el-popconfirm |
| | | v-if="scope.row.status === 'not_start'" |
| | |
| | | title="确定要删除该考试吗?" |
| | | @confirm="deleteExam(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" type="danger" size="small" v-show="scope.row.status !== 'cancel'">删除</el-button> |
| | | <el-button |
| | | slot="reference" |
| | | type="danger" |
| | | size="small" |
| | | v-show="scope.row.status !== 'cancel'" |
| | | >删除</el-button |
| | | > |
| | | </el-popconfirm> |
| | | |
| | | <el-button v-if="scope.row.status === 'finished'" type="success" size="small" @click="markPaper(scope.row)" v-show="scope.row.status !== 'cancel'"> |
| | | <el-button |
| | | v-if="scope.row.status === 'finished'" |
| | | type="success" |
| | | size="small" |
| | | @click="markPaper(scope.row)" |
| | | v-show="scope.row.status !== 'cancel'" |
| | | > |
| | | 阅卷 |
| | | </el-button> |
| | | <el-button v-if="scope.row.status === 'ing'" type="warning" size="small" @click="monitor(scope.row)" v-show="scope.row.status !== 'cancel'">监控</el-button> |
| | | <el-button |
| | | v-if="scope.row.status === 'ing'" |
| | | type="warning" |
| | | size="small" |
| | | @click="monitor(scope.row)" |
| | | v-show="scope.row.status !== 'cancel'" |
| | | >监控</el-button |
| | | > |
| | | <el-popconfirm |
| | | class="confirm" |
| | | style="margin: 0 5px" |
| | | title="确定要作废该考试记录吗?" |
| | | @confirm="cancel(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" v-show="scope.row.status !== 'cancel'" type="danger" |
| | | size="small" |
| | | v-if="scope.row.status !== 'ing'">作废 |
| | | <el-button |
| | | slot="reference" |
| | | v-show="scope.row.status !== 'cancel'" |
| | | type="danger" |
| | | size="small" |
| | | v-if="scope.row.status !== 'ing'" |
| | | >作废 |
| | | </el-button> |
| | | </el-popconfirm> |
| | | <el-popconfirm |
| | |
| | | title="确定要恢复该考试记录吗?" |
| | | @confirm="recover(scope.row.id)" |
| | | > |
| | | <el-button slot="reference" v-show="scope.row.status === 'cancel'" type="success" |
| | | size="small">恢复正常 |
| | | <el-button |
| | | slot="reference" |
| | | v-show="scope.row.status === 'cancel'" |
| | | type="success" |
| | | size="small" |
| | | >恢复正常 |
| | | </el-button> |
| | | </el-popconfirm> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div |
| | | class="flex" |
| | | style="justify-content:center;margin-top:20px;" |
| | | > |
| | | <pagination v-show="total>0" :total="total" :page.sync="searchForm.currentPage" :limit.sync="searchForm.pageSize" |
| | | @pagination="page"/> |
| | | <div class="flex" style="justify-content: center; margin-top: 20px"> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | :page.sync="searchForm.currentPage" |
| | | :limit.sync="searchForm.pageSize" |
| | | @pagination="page" |
| | | /> |
| | | </div> |
| | | <el-dialog width="500px" :title="title" @close="closeHandler" :visible.sync="open" :destroy-on-close="true" |
| | | :append-to-body="true" :close-on-click-modal="false"> |
| | | <el-dialog |
| | | width="500px" |
| | | :title="title" |
| | | @close="closeHandler" |
| | | :visible.sync="open" |
| | | :destroy-on-close="true" |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :model="examForm" :rules="examRules" ref="examForm"> |
| | | <el-form-item label="考试名称" :label-width="formLabelWidth" prop="examName"> |
| | | <el-form-item |
| | | label="考试名称" |
| | | :label-width="formLabelWidth" |
| | | prop="examName" |
| | | > |
| | | <el-input v-model="examForm.examName" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="参考班级" :label-width="formLabelWidth" prop="classesId"> |
| | | <el-form-item |
| | | label="参考班级" |
| | | :label-width="formLabelWidth" |
| | | prop="classesId" |
| | | > |
| | | <el-select v-model="examForm.classesId"> |
| | | <el-option v-for="classes in classesList" :key="classes.id" :value="classes.id" :label="classes.className"/> |
| | | <el-option |
| | | v-for="classes in classesList" |
| | | :key="classes.id" |
| | | :value="classes.id" |
| | | :label="classes.className" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="试卷类型" :label-width="formLabelWidth" prop="examPaperType"> |
| | | <el-select v-model="examForm.examPaperType" @change="getMyExamPaperList"> |
| | | <el-form-item |
| | | label="试卷类型" |
| | | :label-width="formLabelWidth" |
| | | prop="examPaperType" |
| | | > |
| | | <el-select |
| | | v-model="examForm.examPaperType" |
| | | @change="getMyExamPaperList" |
| | | > |
| | | <el-option label="固定试卷" :value="1"></el-option> |
| | | <el-option label="随机试卷" :value="2"></el-option> |
| | | <el-option label="随序试卷" :value="3"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="考试试卷" :label-width="formLabelWidth" prop="examPaperId"> |
| | | <el-select v-model="examForm.examPaperId" :disabled="!examForm.examPaperType" placeholder="请先选择试卷类型"> |
| | | <el-option v-for="examPaper in examPaperList" :key="examPaper.id" :value="examPaper.id" |
| | | :label="examPaper.name"/> |
| | | <el-form-item |
| | | label="考试试卷" |
| | | :label-width="formLabelWidth" |
| | | prop="examPaperId" |
| | | > |
| | | <el-select |
| | | @change="handleExamPaperSelect" |
| | | v-model="examForm.examPaperId" |
| | | :disabled="!examForm.examPaperType" |
| | | placeholder="请先选择试卷类型" |
| | | > |
| | | <el-option |
| | | v-for="examPaper in examPaperList" |
| | | :key="examPaper.id" |
| | | :value="examPaper.id" |
| | | :label="examPaper.name" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="开始时间" :label-width="formLabelWidth" prop="time"> |
| | | <el-form-item v-show="examForm.examPaperId" label="考试时长"> |
| | | <div>{{ selectExamPaper.suggestTime }}分钟</div> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="开始时间" |
| | | :label-width="formLabelWidth" |
| | | prop="time" |
| | | > |
| | | <el-date-picker |
| | | v-model="examForm.time" |
| | | type="datetimerange" |
| | |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="考试地点" :label-width="formLabelWidth" prop="examPlace"> |
| | | <el-form-item |
| | | label="考试地点" |
| | | :label-width="formLabelWidth" |
| | | prop="examPlace" |
| | | > |
| | | <el-input v-model="examForm.examPlace" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { getExams, addExam, editExam, deleteExamById, cancel, recover } from '@/api/exam' |
| | | import { |
| | | getExams, |
| | | addExam, |
| | | editExam, |
| | | deleteExamById, |
| | | cancel, |
| | | recover |
| | | } from '@/api/exam' |
| | | import { myClasses } from '@/api/classes' |
| | | import examPaperAPI from '@/api/examPaper' |
| | | |
| | |
| | | endTime: null, |
| | | time: [] |
| | | }, |
| | | selectExamPaper: {}, |
| | | examRules: { |
| | | examName: [ |
| | | { required: true, message: '请输入考试名称', trigger: 'blur' } |
| | |
| | | methods: { |
| | | // 作废考试 |
| | | cancel (id) { |
| | | cancel(id).then(res => { |
| | | cancel(id).then((res) => { |
| | | this.$message.success(res.data.message) |
| | | this.page() |
| | | }) |
| | | }, |
| | | // 恢复考试 |
| | | recover (id) { |
| | | recover(id).then(res => { |
| | | recover(id).then((res) => { |
| | | this.$message.success(res.data.message) |
| | | this.page() |
| | | }) |
| | |
| | | }, |
| | | markPaper (row) { |
| | | // 跳转阅卷页面 |
| | | this.$router.push({ path: '/exam/mark/paper', query: { examName: row.examName, examId: row.id } }) |
| | | this.$router.push({ |
| | | path: '/exam/mark/paper', |
| | | query: { examName: row.examName, examId: row.id } |
| | | }) |
| | | }, |
| | | timeFormatter (row) { |
| | | return row.startTime + '至' + row.endTime |
| | |
| | | }, |
| | | MyExamPaperList () { |
| | | let param = { |
| | | 'paperType': this.examForm.examPaperType |
| | | paperType: this.examForm.examPaperType |
| | | } |
| | | examPaperAPI.myExamPaperList(param).then(res => { |
| | | examPaperAPI.myExamPaperList(param).then((res) => { |
| | | this.examForm.examPaperId = null |
| | | this.examPaperList = res.data |
| | | }) |
| | |
| | | this.MyExamPaperList() |
| | | }, |
| | | getMyClasses () { |
| | | myClasses().then(res => { |
| | | myClasses().then((res) => { |
| | | this.classesList = res.data.data |
| | | }) |
| | | }, |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteExamById(row.id).then(res => { |
| | | deleteExamById(row.id).then((res) => { |
| | | this.$message.success('删除成功') |
| | | this.page() |
| | | }) |
| | |
| | | this.examForm.startTime = this.examForm.time[0] |
| | | this.examForm.endTime = this.examForm.time[1] |
| | | if (this.examForm.id) { |
| | | editExam(this.examForm).then(res => { |
| | | editExam(this.examForm).then((res) => { |
| | | this.open = false |
| | | this.clearForm() |
| | | this.$message.success('操作成功') |
| | | this.page() |
| | | }) |
| | | } else { |
| | | addExam(this.examForm).then(res => { |
| | | addExam(this.examForm).then((res) => { |
| | | this.open = false |
| | | this.clearForm() |
| | | this.$message.success('操作成功') |
| | |
| | | this.title = this.examForm.id ? '修改考试' : '安排考试' |
| | | this.open = true |
| | | }, |
| | | formatterType (row) { |
| | | }, |
| | | formatterType (row) {}, |
| | | page () { |
| | | getExams(this.searchForm).then(res => { |
| | | getExams(this.searchForm).then((res) => { |
| | | this.tableData = res.data.data |
| | | this.total = res.data.total |
| | | }) |
| | |
| | | routerTo (url) { |
| | | this.$router.push(url) |
| | | }, |
| | | handleExamPaperSelect (e) { |
| | | this.selectExamPaper = this.examPaperList.find((o) => o.id === e) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | time: [ |
| | | { required: true, message: '请选择时间', trigger: 'change' } |
| | | ] |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | path: '/meet', |
| | | query: { |
| | | meetId: item.id, |
| | | domain: 'ycl.easyblog.vip:81/' + item.id, |
| | | domain: 'ycl.easyblog.vip:8443/' + item.id, |
| | | roomName: item.meetName, |
| | | userInfoStr: JSON.stringify({ |
| | | displayName: item.teacherName |