浏览代码

Merge branch 'develop' of http://163.228.141.122:3000/TEAMMODEL/TEAMModelOS into develop

CrazyIter_Bin 3 月之前
父节点
当前提交
050ea78675

+ 13 - 10
TEAMModelOS.Extension/IES.Exam/IES.ExamViews/src/api/http.js

@@ -50,11 +50,6 @@ let loading = undefined
 
 // http request 拦截器
 axios.interceptors.request.use(config => {
-    loading = Loading.service({
-        lock: true,
-        text: '加载中',
-        background: 'rgba(0, 0, 0, 0.7)'
-    })
 
     let isNeedAccess = true
 
@@ -136,9 +131,6 @@ axios.interceptors.response.use(response => {
     // 四小时没操作过则需重新登录
     let endTime = (new Date().getTime() + (4 * 60 * 60 * 1000))
     localStorage.setItem('webEndTime', endTime)
-    setTimeout(() => {
-        loading.close()
-    }, 1500)
     return response
 }, error => {
     console.log('vbfbbtfnt', error);
@@ -180,7 +172,6 @@ axios.interceptors.response.use(response => {
             message: 'http.error400'
         })
     }
-    loading.close()
     return Promise.reject(error)
 })
 
@@ -266,6 +257,7 @@ function refreshToken() {
 // 超时退出重新登录
 function loginOut() {
     localStorage.clear()
+    sessionStorage.clear()
     console.log('超时退出');
     // router.push({path: '/home/homePage'})
     window.location.href = window.location.origin + '/login/admin'
@@ -304,13 +296,20 @@ export function fetch(url, params) {
  * @returns {Promise}
  */
 
-export function post(url, params, timeout) {
+export function post(url, params, isLoad, loadInfo, timeout) {
     let data = {}
     let apiUrl = `${apiPrefix}${url}`
     data.method = apiUrl
     data.params = params
     data.lang = localStorage.getItem('local')
     return new Promise((resolve, reject) => {
+        if(isLoad) {
+            loading = Loading.service({
+                lock: true,
+                text: loadInfo || '加载中',
+                background: 'rgba(0, 0, 0, 0.7)'
+            })
+        }
         if(timeout) {
             axios.defaults.timeout = timeout // 设置超时时长
         }
@@ -320,6 +319,10 @@ export function post(url, params, timeout) {
             }
         }, err => {
             reject(err)
+        }).finally(() => {
+            if(isLoad) setTimeout(() => {
+                    loading.close()
+                }, 1500)
         })
     })
 }

+ 38 - 12
TEAMModelOS.Extension/IES.Exam/IES.ExamViews/src/api/index.js

@@ -51,29 +51,55 @@ export default {
     /**
      * 获取评测信息
      * @param {String} deviceId - 前端浏览器设备id
-     * @param {String} shortCode - 开卷
+     * @param {String} shortCode - 提取
      * @param {String} evaluationId - 评测id
+     * @param {Number} checkCenter - 是否连接数据中心搜索  1连接 其他:不连接
      */
     getExamInfo: function (data) {
         return post('/manage/check-evaluation', data)
     },
     /**
-     * 输入开卷码开始作答
-     * @param {String} deviceId
-     * @param {String} evaluationId 评测id
-     * @param {String} openCode 开卷码
+     * 根据开卷码检测文件
+     * @param {String} deviceId - 前端浏览器设备id
+     * @param {String} evaluationId - 评测id
+     * @param {String} openCode - 开卷码
+     * @param {String} shortCode - 提取码
      */
-    openEvaluation: function(data) {
-        return post('/manage/open-evaluation', data)
+    openEvaluation: function (data) {
+        return post('/manage/open-evaluation', data, true, '正在检测评测文件...', 5 * 60 * 1000)
     },
     /**
      * 下载数据包、文件包
-     * @param {String} deviceId
-     * @param {String} evaluationId 评测id
-     * @param {String} shortCode 提取码
+     * @param {String} deviceId - 前端浏览器设备id
+     * @param {String} evaluationId - 评测id
+     * @param {String} shortCode - 提取码
+     */
+    updatePackage: function (data) {
+        return post('/manage/download-package', data, true, '正在下载...', 5 * 60 * 1000)
+    },
+    /**
+     * 获取开考信息
+     * @param {String} evaluationId - 评测id
+     * @param {String} openCode - 开卷码
+     * @param {String} shortCode - 提取码
+     */
+    getExamRoundInfo: function (data) {
+        return post('/manage/load-evaluation-round', data)
+    },
+    /**
+     * 设置开考信息
+     * @param {String} evaluationId - 评测id
+     * @param {String} groupList - 名单 e.g. [{id: '', name: ''}]
+     * @param {Number} activate - 0停止 1开始
+     * @param {Number} countdownType - 倒计时类型  0未设置  1统一以服务器时间为基准介绍  2以开始作答为基准,开始作答向局域网端发送请求,返回开始作答时间
+     * @param {Number} countdown - 倒计时(毫秒)
+     * @param {Number} deadline - 截至时间  countdownType=1 时有值
+     * @param {Number} startline - 开考时间
+     * @param {String} openCode - 开卷码
+     * @param {String} shortCode - 提取码
      */
-    updatePackage: function(data) {
-        return post('/manage/download-package', data, 5 * 60 * 1000)
+    setExamRoundInfo: function (data) {
+        return post('/manage/setting-evaluation-round', data)
     },
 
     // 学生页面

+ 35 - 0
TEAMModelOS.Extension/IES.Exam/IES.ExamViews/src/view/admin/ActivityManage.less

@@ -228,6 +228,41 @@
                 float: right;
             }
         }
+
+        .el-tab-pane {
+            height: 100%;
+        }
+    }
+
+    .open-evaluation {
+        position: absolute;
+        top: 70px;
+        right: 20px;
+
+        .info-box {
+            display: flex;
+            justify-content: space-between;
+            padding: 8px 16px;
+            margin-bottom: 15px;
+
+            p {
+                margin-right: 20px;
+            }
+
+            .el-icon-close {
+                cursor: pointer;
+            }
+        }
+
+        .error-info {
+            background: #fef0f0;
+            color: #f56c6c;
+        }
+
+        .success-info {
+            background-color: #f0f9eb;
+            color: #67c23a;
+        }
     }
 }
 

+ 232 - 87
TEAMModelOS.Extension/IES.Exam/IES.ExamViews/src/view/admin/ActivityManage.vue

@@ -57,6 +57,9 @@
                             <span class="paper-extType" style="border-color: #88a1d8; color: #9fa91d;" v-if="evaluationClient.type === 'Art'">
                                 艺术评测
                             </span>
+                            <div class="short-code">
+                                <el-button size="mini">暂时隐藏页面</el-button>
+                            </div>
                         </div>
                         <span>{{ evaluationClient.name }}
                             <span v-show="needUpdate.status" style="font-size: 16px; font-weight: normal; margin-left: 60px;">
@@ -69,7 +72,7 @@
                                     </el-dropdown-menu>
                                 </el-dropdown>
                                 <span style="cursor: pointer;" v-show="needUpdate.status === 1" @click="updatePackage()">立即更新</span>
-                                <span v-show="needUpdate.status === 2">该活动在云端不存在</span>
+                                <span v-show="needUpdate.status === 2">该活动在云端不存在或未联网</span>
                             </span>
                         </span>
                     </div>
@@ -103,7 +106,7 @@
                             </vuescroll>
                         </el-tab-pane>
                         <el-tab-pane label="学生作答" name="student" class="answer-content">
-                            <div v-show="!isInputOpen">
+                            <div v-show="!isInputOpen" style="height: 100%;">
                                 <vuescroll>
                                     <!-- 学生作答
                                 活动列表
@@ -112,26 +115,31 @@
                                     学生作答框展示哪些电脑在作答,是否作答完成,设置评测考试时间等
                                             在进入学生作答页面时,判断 激活字段 是否存在,不存在需要用户输入开卷码,才能展示相关信息(勾选一次作答的班级(多选),考试时长,)
                                             学生端需教师点击开始考试后,才能进行作答 -->
-                                <div class="short-code">
-                                    <el-button size="mini" type="info" @click="isStartExam = true" v-show="evaluationClient.progress === 'going'">开始考试</el-button>
-                                </div>
                                     <div style="border-bottom: 1px dashed #ccc; padding: 15px 10px;">
                                         <div>
                                             <div>参考人数:{{ 92 }}</div>
                                             <div></div>
                                             <div></div>
                                         </div>
-                                        <div style="display: flex; align-items: center; flex-wrap: wrap;">
-                                            <div style="margin-right: 40px;">设置作答班级:
-                                                <el-select v-model="setAnswerInfo.groupId" size="small" clearable multiple collapse-tags placeholder="请选择">
-                                                    <el-option v-for="(item, index) in evaluationClient.grouplist" :key="index" :label="item.name" :value="item.id"></el-option>
-                                                </el-select>
+                                        <div>
+                                            <div style="margin-right: 40px; margin-bottom: 20px;">设置作答班级:
+                                                <el-tooltip class="item" effect="light" placement="bottom-start">
+                                                    <el-select v-model="setAnswerInfo.groupId" :disabled="!!setAnswerInfo.activate" size="small" clearable multiple collapse-tags placeholder="请选择">
+                                                        <el-option v-for="(item, index) in evaluationClient.grouplist" :key="index" :label="item.name" :value="item.id"></el-option>
+                                                    </el-select>
+                                                    <template slot="content">
+                                                        <div v-if="!selectGroup.length">未选择班级</div>
+                                                        <div v-else>
+                                                            <p v-for="(item, index) in selectGroup" :key="index" style="margin-bottom: 5px;">{{ item.name }}</p>
+                                                        </div>
+                                                    </template>
+                                                </el-tooltip>
                                             </div>
-                                            <div style="margin-right: 40px;">考试时间类型:
-                                                <el-radio-group v-model="setExamInfo.countdownType">
+                                            <div style="margin-right: 40px; margin-bottom: 20px;">考试时间类型:
+                                                <el-radio-group v-model="setAnswerInfo.countdownType" :disabled="!!setAnswerInfo.activate">
                                                     <el-radio :label="0">无</el-radio>
                                                     <el-radio :label="1">
-                                                        统一截止时间
+                                                        统一作答时长
                                                         <el-tooltip class="item" effect="light" content="针对所有学生,考试计时从开考后开始计算,考试时长结束,所有学生均不能作答" placement="bottom">
                                                             <i class="el-icon-warning" style="color: #9b9b9b;"></i>
                                                         </el-tooltip>
@@ -144,34 +152,42 @@
                                                     </el-radio>
                                                 </el-radio-group>
                                             </div>
-                                            <div v-show="setExamInfo.countdownType">考试时长:
-                                                <el-input-number v-model="setAnswerInfo.hour" :min="0" type="number" controls-position="right" placeholder="请输入内容" size="small" style="width: 100px;"></el-input-number>
+                                            <div style="margin-right: 40px; margin-bottom: 20px;">设置作答时间:
+                                                <el-date-picker v-show="setAnswerInfo.countdownType === 1" v-model="setAnswerInfo.startTime" :disabled="!!setAnswerInfo.activate" type="datetime" placeholder="开考时间"></el-date-picker>
+                                                <el-date-picker v-show="setAnswerInfo.countdownType != 1" v-model="setAnswerInfo.answerTime" :disabled="!!setAnswerInfo.activate" size="small" type="datetimerange" start-placeholder="开考时间" end-placeholder="截至时间"></el-date-picker>
+                                            </div>
+                                            <div v-show="setAnswerInfo.countdownType" style="margin-right: 40px; margin-bottom: 20px;">考试时长:
+                                                <el-input-number v-model="setAnswerInfo.hour" :disabled="!!setAnswerInfo.activate" :min="0" type="number" controls-position="right" placeholder="请输入内容" size="small" style="width: 100px;"></el-input-number>
                                                 <span style="margin: 0 15px 0 10px;">时</span>
-                                                <el-input-number v-model="setAnswerInfo.minute" :min="0" :max="59" type="number" controls-position="right" placeholder="请输入内容" size="small" style="width: 100px;"></el-input-number>
+                                                <el-input-number v-model="setAnswerInfo.minute" :disabled="!!setAnswerInfo.activate" :min="0" :max="59" type="number" controls-position="right" placeholder="请输入内容" size="small" style="width: 100px;"></el-input-number>
                                                 <span style="margin: 0 10px;">分</span>
                                             </div>
+                                            <div>
+                                                <el-button size="mini" :type="setAnswerInfo.activate ? 'info' : 'primary'" @click="startExam()" v-show="evaluationClient.progress === 'going'">{{ setAnswerInfo.activate ? '停止考试' : '开始考试'}}</el-button>
+                                            </div>
                                         </div>
                                         <div></div>
                                         <div></div>
                                     </div>
-                                    <div style="display: flex; flex-wrap: wrap;">
+                                    <div style="display: flex; flex-wrap: wrap; margin-top: 20px;">
                                         <div v-for="(item, index) in studentListShow" :key="index" class="student-info" :style="{'border-color': item.isAnswer === 1 ? '#4393e4' : item.isAnswer === 2 ? '#53a929' : '#909399'}">
                                             <p class="name-info" :style="{'background-color': item.isAnswer === 1 ? '#4393e4' : item.isAnswer === 2 ? '#53a929' : '#909399'}">
                                                 <i class="el-icon-s-custom" style="margin-right: 5px;"></i>
-                                                {{ item.name }}({{ item.id }})
+                                                {{ item.studentName }}({{ item.studentId }})
                                             </p>
                                             <div style="text-align: center; margin: 10px 0;">
                                                 <i :class="item.isAnswer === 1 ? 'el-icon-a-ziyuan491' : item.isAnswer === 2 ? 'el-icon-guanlizhongxin' : 'el-icon-mti-diannao'" :style="{'font-size': '100px', 'color': item.isAnswer === 1 ? '#4393e4' : item.isAnswer === 2 ? '#53a929' : '#ccc'}"></i>
                                             </div>
                                             <div style="margin: 0 15px 15px;">
-                                                <p style="margin-bottom: 5px;">
-                                                    <span>某个科目作答进度</span>
-                                                    <el-progress :percentage="item.paperProgress" :status="item.paperProgress === 100 ? 'success' : null"></el-progress>
+                                                <p style="text-align: center; margin-bottom: 5px;">{{ item.className }}</p>
+                                                <p style="margin-bottom: 5px;" v-for="(subject, index) in item.subjectResults" :key="index">
+                                                    <span>{{ subject.subjectName }}</span>
+                                                    <el-progress :percentage="subject.paperProgress" :status="subject.finished ? 'success' : null"></el-progress>
                                                 </p>
-                                                <p>
+                                                <!-- <p>
                                                     <span>某个科目作答进度</span>
                                                     <el-progress :percentage="item.answerProgress" :status="item.answerProgress === 100 ? 'success' : null"></el-progress>
-                                                </p>
+                                                </p> -->
                                             </div>
                                         </div>
                                     </div>
@@ -205,6 +221,22 @@
                 <el-button @click="isStartExam = false">取消</el-button>
             </span>
         </el-dialog>
+        <div class="open-evaluation" v-if="showErrorMsgs">
+            <div class="info-box error-info" v-for="(item, index) in openErrorMsgs" :key="index">
+                <p>
+                    <i class="el-icon-error"></i>
+                    {{ item }}
+                </p>
+                <span><i class="el-icon-close" @click="delInfo(index)"></i></span>
+            </div>
+            <!-- <div class="info-box success-info">
+                <p>
+                    <i class="el-icon-success"></i>
+                    加载评测试卷文件包!
+                </p>
+                <span><i class="el-icon-close"></i></span>
+            </div> -->
+        </div>
     </el-container>
 </template>
 
@@ -217,69 +249,25 @@ export default {
         return {
             isLoading: undefined,
             examList: [],
-            activeName: 'student',
+            activeName: 'info',
             evaluationClient: undefined,
             curIndex: 0,
             paperSubject: '',
             shortCode: '', //提取码
-            openCode: '', //开卷码
+            openCode: '9RUZWE', //开卷码
             isStartExam: false,
-            setExamInfo: {
-                openCode: '',
-                countdownType: 0,
-                countdown: 0,
-            },
             nowtime: null, //服务器时间
             isInputOpen: false, //学生作答需验证开卷码
             isStartExam: false, //开始考试
-            studentListShow: [
-                {
-                    id: 202106001,
-                    name: '李莉莉',
-                    paperProgress: 80,
-                    answerProgress: 0,
-                    isAnswer: 0
-                },
-                {
-                    id: 202106002,
-                    name: '猫猫猫',
-                    paperProgress: 100,
-                    answerProgress: 10,
-                    isAnswer: 1
-                },
-                {
-                    id: 202106003,
-                    name: '瞧瞧去',
-                    paperProgress: 30,
-                    answerProgress: 0,
-                    isAnswer: 2
-                },
-                {
-                    id: 202106001,
-                    name: '李莉莉',
-                    paperProgress: 80,
-                    answerProgress: 0,
-                    isAnswer: 0
-                },
-                {
-                    id: 202106002,
-                    name: '猫猫猫',
-                    paperProgress: 100,
-                    answerProgress: 10,
-                    isAnswer: 1
-                },
-                {
-                    id: 202106003,
-                    name: '瞧瞧去',
-                    paperProgress: 30,
-                    answerProgress: 0,
-                    isAnswer: 0
-                },
-            ],
+            studentListShow: [],
             setAnswerInfo: {
                 groupId: [],
+                startTime: '',
+                answerTime: [],
+                countdownType: 0,
                 hour: 0,
-                minute: 0
+                minute: 0,
+                activate: 0,
             },
             userInfo: undefined,
             needUpdate: {
@@ -287,6 +275,8 @@ export default {
                 msg: []
             },
             deviceId: '',
+            openErrorMsgs: [],
+            showErrorMsgs: false,
         }
     },
     created() {
@@ -311,8 +301,18 @@ export default {
             })
         },
         handleClick(tab, event) {
-            return
-            if(tab.name === 'student') this.isInputOpen = true
+            if(tab.name === 'student') {
+                if(this.needUpdate.status === 1) {
+                    this.$message({
+                        message: '活动需更新,请先下载',
+                        type: 'warning'
+                    });
+                    this.activeName = 'info'
+                    return
+                }
+                if(!this.evaluationClient.openCode) this.isInputOpen = true
+                else this.getExamRoundInfo()
+            }
         },
         getNowTime() {
             return new Promise((resolve, reject) => {
@@ -334,7 +334,7 @@ export default {
                             "countdownType": 0,
                             "countdown": 0,
                             "deadline": 0,
-                            "id": "6af32bbd-144e-4366-8bc0-61ba4c85677c",
+                            "id": "6af32bbd-144e-4366-8bc0-61ba4c85677d",
                             "pid": "c025bf88-53b5-4ccb-9f4d-224173709883",
                             "name": "艺术评测本地缓存25",
                             "type": "Art",
@@ -444,7 +444,7 @@ export default {
                             "countdownType": 0,
                             "countdown": 0,
                             "deadline": 0,
-                            "id": "6af32bbd-144e-4366-8bc0-61ba4c85677c",
+                            "id": "6af32bbd-144e-4366-8bc0-61ba4c85677a",
                             "pid": "c025bf88-53b5-4ccb-9f4d-224173709883",
                             "name": "艺术评测本地缓存25",
                             "type": "Art",
@@ -554,7 +554,7 @@ export default {
                             "countdownType": 0,
                             "countdown": 0,
                             "deadline": 0,
-                            "id": "6af32bbd-144e-4366-8bc0-61ba4c85677c",
+                            "id": "6af32bbd-144e-4366-8bc0-61ba4c856772",
                             "pid": "c025bf88-53b5-4ccb-9f4d-224173709883",
                             "name": "艺术评测本地缓存25",
                             "type": "Exam",
@@ -700,6 +700,23 @@ export default {
             })
         },
         onSelectAct(index) {
+            this.needUpdate = {
+                status: 0,
+                msg: []
+            }
+            this.activeName = 'info'
+            this.showErrorMsgs = false
+            this.openErrorMsgs = []
+            this.setAnswerInfo = {
+                groupId: [],
+                startTime: '',
+                answerTime: [],
+                countdownType: 0,
+                hour: 0,
+                minute: 0,
+                activate: 0,
+            }
+            this.studentListShow = []
             this.curIndex = index
             this.evaluationClient = this.examList[index]
             let params = {
@@ -734,8 +751,60 @@ export default {
             return date >= etime ? 'finish' : date < stime ? 'notStarted' : 'going'
         },
         verifyOpenCode(type) {
-            if(!type) this.activeName = 'info'
-            this.isInputOpen = false
+            if(!type) {
+                this.activeName = 'info'
+                this.isInputOpen = false
+            } else {
+                if(!this.openCode) {
+                    this.$message({
+                        message: '请输入开卷码!',
+                        type: 'warning'
+                    });
+                    return
+                }
+                let openCode = sessionStorage.getItem(this.evaluationClient.id)
+                // 之前验证过开卷码,可直接前端判断
+                if(openCode && this.openCode === openCode) {
+                    this.evaluationClient.openCode = openCode
+                    this.examList[this.curIndex].openCode = openCode
+                    this.getExamRoundInfo()
+                    this.openCode = ''
+                    this.isInputOpen = false
+                } else {
+                    let params = {
+                        deviceId: this.deviceId,
+                        evaluationId: this.evaluationClient.id,
+                        openCode: this.openCode,
+                        shortCode: this.evaluationClient.shortCode
+                    }
+                    this.$api.openEvaluation(params).then(res => {
+                        if(res.code === 200) {
+                            this.evaluationClient.openCode = this.openCode
+                            this.examList[this.curIndex].openCode = this.openCode
+                            this.getExamRoundInfo()
+                            sessionStorage.setItem(this.evaluationClient.id, this.openCode)
+                            this.openCode = ''
+                        } else if(res.code === 1) {
+                            this.$message({
+                                message: '检测失败',
+                                type: 'warning'
+                            });
+                            this.openErrorMsgs = res.result.errorMsgs
+                            this.openErrorMsgs.push('评测名单文件(groupList.json),检测结果:失败')
+                            this.openErrorMsgs.push('评测数据文件(evaluation.json),校验评测基本信息,检测结果:失败')
+                            this.openErrorMsgs.push('试卷名称:[1]艺术评测本地缓存25-美术-2024青羊区艺术测评五年级美术试卷(2),文件数量:33,检测成功数量:30,检测异常数量3')
+                            this.openErrorMsgs.push('试卷名称:[8]艺术评测本地缓存25-美术-2024青羊区艺术测评五年级美术试卷(1),文件数量:33,检测成功数量:15,检测异常数量18')
+                            this.openErrorMsgs.push('试卷名称:[16]艺术评测本地缓存25-美术-2024青羊区艺术测评五年级美术试卷(21),文件数量:33,检测成功数量:10,检测异常数量23')
+                            this.openErrorMsgs.push('试卷名称:[2]艺术评测本地缓存25-音乐-2024青羊区艺术测评五年级音乐试卷(12),文件数量:29,检测成功数量:18,检测异常数量11')
+                            this.showErrorMsgs = true
+                            this.openCode = ''
+                            this.activeName = 'info'
+                        }
+                    }).finally(() => {
+                        this.isInputOpen = false
+                    })
+                }
+            }
         },
         startExam() {
             /* this.$confirm('开始考试后,考生将进行作答,请确认是否开始?', '提示', {
@@ -747,11 +816,52 @@ export default {
                 
             }) */
             let params = {
-                deviceId: this.deviceId,
-                evaluationId: '',
-                openCode: '',
+                evaluationId: this.evaluationClient.id,
+                groupList: [],
+                activate: this.evaluationClient.activate ? 0 : 1,
+                countdownType: this.setAnswerInfo.countdownType,
+                countdown: '',
+                startline: '',
+                deadline: '',
+                openCode: this.evaluationClient.openCode,
+                shortCode: this.evaluationClient.shortCode,
+            }
+            params.groupList = this.evaluationClient.grouplist.filter(item => this.setAnswerInfo.groupId.includes(item.id))
+            params.countdown = (this.setAnswerInfo.hour * 60 * 60 + this.setAnswerInfo.minute * 60) * 1000
+            if(this.setAnswerInfo.countdownType === 1) {
+                params.startline = this.setAnswerInfo.startTime.getTime()
+                params.deadline = params.startline + params.countdown
+            } else {
+                params.startline = this.setAnswerInfo.answerTime[0].getTime()
+                params.deadline = this.setAnswerInfo.answerTime[1].getTime()
             }
-            // this.$api.openEvaluation(params).then(res => {})
+            this.$api.setExamRoundInfo(params).then(res => {
+                if(res.code === 200) {
+                    if(params.activate) {
+                        this.$message({
+                            message: '设置成功,已开始考试!',
+                            type: 'success'
+                        });
+                    } else {
+                        this.$message({
+                            message: '已停止考试!',
+                            type: 'success'
+                        });
+                    }
+                    this.setAnswerInfo.activate = res.setting.activate
+                    this.studentListShow = res.results.map(item => {
+                        // 后续要重新处理状态
+                        item.isAnswer = item.finished ? 2 : item.pushed ? 1 : 0 //0未开始  1正在作答  2已完成
+                        return item
+                    })
+                    this.$forceUpdate()
+                } else {
+                    this.$message({
+                        message: '设置失败!',
+                        type: 'warning'
+                    });
+                }
+            })
         },
         updatePackage() {
             this.isLoading = Loading.service({
@@ -784,6 +894,36 @@ export default {
                 this.isLoading.close()
             })
         },
+        getExamRoundInfo() {
+            let params = {
+                evaluationId: this.evaluationClient.id,
+                openCode: this.evaluationClient.openCode,
+                shortCode: this.evaluationClient.shortCode,
+            }
+            this.$api.getExamRoundInfo(params).then(res => {
+                if(res.code === 200) {
+                    this.setAnswerInfo.groupId = res.setting.groupList.map(item => item.id)
+                    this.setAnswerInfo.activate = res.setting.activate
+                    this.setAnswerInfo.countdownType = res.setting.countdownType
+                    let second = res.setting.countdown / 1000 / 60
+                    this.setAnswerInfo.hour = Math.floor(second / 60)
+                    this.setAnswerInfo.minute = (second - this.setAnswerInfo.hour * 60)
+                    if(res.setting.countdownType === 1) {
+                        this.setAnswerInfo.startTime = new Date(res.setting.startline)
+                    }
+                    this.setAnswerInfo.answerTime.push(new Date(res.setting.startline), new Date(res.setting.deadline))
+                    this.studentListShow = res.results.map(item => {
+                        // 后续要重新处理状态
+                        item.isAnswer = item.finished ? 2 : item.pushed ? 1 : 0 //0未开始  1正在作答  2已完成
+                        // item.subject = item.subjectResults
+                        return item
+                    })
+                }
+            })
+        },
+        delInfo(index) {
+            this.openErrorMsgs.splice(index, 1)
+        },
         loginOut() {
             localStorage.removeItem('auth_token')
 			localStorage.removeItem('expires_in')
@@ -792,7 +932,12 @@ export default {
                 path: "/login/admin"
             });
         },
-    }
+    },
+    computed: {
+        selectGroup() {
+            return this.evaluationClient.grouplist.filter(item => this.setAnswerInfo.groupId.includes(item.id))
+        },
+    },
 }
 </script>