|
@@ -5,11 +5,13 @@
|
|
|
<page-header>
|
|
<page-header>
|
|
|
<template #actions>
|
|
<template #actions>
|
|
|
<el-button
|
|
<el-button
|
|
|
- @click="fetchExamDetail"
|
|
|
|
|
- :loading="loading.refresh"
|
|
|
|
|
- v-if="isStudentGroup && exam.joined"
|
|
|
|
|
|
|
+ @click="fetchExamDetail"
|
|
|
|
|
+ :loading="loading.refresh"
|
|
|
|
|
+ v-if="isStudentGroup && exam.joined"
|
|
|
>
|
|
>
|
|
|
- <el-icon><RefreshRight /></el-icon>
|
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
|
+ <RefreshRight/>
|
|
|
|
|
+ </el-icon>
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="isStudentGroup && !exam.joined"
|
|
v-if="isStudentGroup && !exam.joined"
|
|
@@ -20,11 +22,11 @@
|
|
|
参加考试
|
|
参加考试
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- v-if="(isStudentGroup || isTeacherGroup) && !exam.joined"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :loading="loading.create"
|
|
|
|
|
- @click="createExamPaper"
|
|
|
|
|
- :disabled="statusTagContent!=='进行中'"
|
|
|
|
|
|
|
+ v-if="(isStudentGroup || isTeacherGroup) && !exam.joined"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :loading="loading.create"
|
|
|
|
|
+ @click="createExamPaper"
|
|
|
|
|
+ :disabled="statusTagContent!=='进行中'"
|
|
|
>
|
|
>
|
|
|
生成自测试卷
|
|
生成自测试卷
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -153,9 +155,9 @@
|
|
|
|
|
|
|
|
<!-- 题目列表-->
|
|
<!-- 题目列表-->
|
|
|
<el-card
|
|
<el-card
|
|
|
- v-if="exam.joined || isTeacherGroup"
|
|
|
|
|
- class="son-card"
|
|
|
|
|
- style="background: none; box-shadow:none;border: none; margin-top: 15px;margin-bottom: 30px"
|
|
|
|
|
|
|
+ v-if="exam.joined || isTeacherGroup"
|
|
|
|
|
+ class="son-card"
|
|
|
|
|
+ style="background: none; box-shadow:none;border: none; margin-top: 15px;margin-bottom: 30px"
|
|
|
>
|
|
>
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<span style="color:black;font-size: 24px;font-family: 'Inter',sans-serif">题目列表</span>
|
|
<span style="color:black;font-size: 24px;font-family: 'Inter',sans-serif">题目列表</span>
|
|
@@ -175,7 +177,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<div style="margin-left: 40px">{{ problem.description }}</div>
|
|
<div style="margin-left: 40px">{{ problem.description }}</div>
|
|
|
<div style="margin-left: 30px;margin-top: 10px">
|
|
<div style="margin-left: 30px;margin-top: 10px">
|
|
|
-<!-- 原来逻辑:只有老师和管理员可以查看题目预览-->
|
|
|
|
|
|
|
+ <!-- 原来逻辑:只有老师和管理员可以查看题目预览-->
|
|
|
<a
|
|
<a
|
|
|
v-if="isTeacherGroup || isAdmin"
|
|
v-if="isTeacherGroup || isAdmin"
|
|
|
style="color: #409EFF;cursor: pointer;"
|
|
style="color: #409EFF;cursor: pointer;"
|
|
@@ -189,15 +191,16 @@
|
|
|
|
|
|
|
|
<!-- 提交记录-->
|
|
<!-- 提交记录-->
|
|
|
<el-card
|
|
<el-card
|
|
|
- v-if="exam.joined || isTeacherGroup"
|
|
|
|
|
- class="son-card"
|
|
|
|
|
- style="background: none; box-shadow:none;border: none;margin-bottom: 30px"
|
|
|
|
|
|
|
+ v-if="exam.joined || isTeacherGroup"
|
|
|
|
|
+ class="son-card"
|
|
|
|
|
+ style="background: none; box-shadow:none;border: none;margin-bottom: 30px"
|
|
|
>
|
|
>
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<span style="color:black;font-size: 24px;font-family: 'Inter',sans-serif">提交记录</span>
|
|
<span style="color:black;font-size: 24px;font-family: 'Inter',sans-serif">提交记录</span>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <el-table v-if="exam.joined || isTeacherGroup" :data="result.commits" style="background: none; box-shadow:none;border: none">
|
|
|
|
|
|
|
+ <el-table v-if="exam.joined || isTeacherGroup" :data="result.commits"
|
|
|
|
|
+ style="background: none; box-shadow:none;border: none">
|
|
|
<el-table-column prop="id" label="#" width="200"/>
|
|
<el-table-column prop="id" label="#" width="200"/>
|
|
|
<el-table-column label="提交时间">
|
|
<el-table-column label="提交时间">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
@@ -213,28 +216,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="score" label="成绩" width="150"/>
|
|
<el-table-column prop="score" label="成绩" width="150"/>
|
|
|
- <el-table-column label="操作" width="150">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
-<!-- <el-button-->
|
|
|
|
|
-<!-- type="text"-->
|
|
|
|
|
-<!-- @click="-->
|
|
|
|
|
-<!-- $router.push(-->
|
|
|
|
|
-<!-- {-->
|
|
|
|
|
-<!-- path: `/exam/${$route.params.examId}/commit/${scope.row.id}`-->
|
|
|
|
|
-<!-- })-->
|
|
|
|
|
-<!-- "-->
|
|
|
|
|
-<!-- >-->
|
|
|
|
|
-<!-- 详情-->
|
|
|
|
|
-<!-- </el-button>-->
|
|
|
|
|
-<!-- <el-divider direction="vertical"/>-->
|
|
|
|
|
- <el-button type="text"
|
|
|
|
|
- @click="stopRecord(scope.row.id)"
|
|
|
|
|
- class="commit-stop-button">
|
|
|
|
|
- 停止
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column type="expand">
|
|
|
|
|
|
|
+ <el-table-column label="操作" type="expand" width="50">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<CommitBoard :commit-id="scope.row.id" :exam-id="$route.params.examId"></CommitBoard>
|
|
<CommitBoard :commit-id="scope.row.id" :exam-id="$route.params.examId"></CommitBoard>
|
|
|
</template>
|
|
</template>
|
|
@@ -310,13 +292,13 @@
|
|
|
<el-table-column label="操作" width="200">
|
|
<el-table-column label="操作" width="200">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button type="text" @click="jumpToCodemirror(scope.row.owner)">源码</el-button>
|
|
<el-button type="text" @click="jumpToCodemirror(scope.row.owner)">源码</el-button>
|
|
|
-<!-- |-->
|
|
|
|
|
-<!-- <el-button type="text" @click="jumpToResultDetail(scope.row.id)">详情</el-button>-->
|
|
|
|
|
|
|
+ <!-- |-->
|
|
|
|
|
+ <!-- <el-button type="text" @click="jumpToResultDetail(scope.row.id)">详情</el-button>-->
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column type="expand">
|
|
<el-table-column type="expand">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <ResultDetail :resultId="scope.row.id" :exam-id="$route.params.examId"></ResultDetail>
|
|
|
|
|
|
|
+ <ResultDetail :resultId="scope.row.id" :exam-id="$route.params.examId"></ResultDetail>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -372,7 +354,7 @@
|
|
|
<template #footer class="dialog-footer">
|
|
<template #footer class="dialog-footer">
|
|
|
<el-button @click="dialog.update = false">取消</el-button>
|
|
<el-button @click="dialog.update = false">取消</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
- type="primary"
|
|
|
|
|
|
|
+ type="primary"
|
|
|
:loading="loading.update"
|
|
:loading="loading.update"
|
|
|
:disabled="range.length !== 2"
|
|
:disabled="range.length !== 2"
|
|
|
@click="updateExam"
|
|
@click="updateExam"
|
|
@@ -389,7 +371,8 @@
|
|
|
{{ isConsoleOutputShownForStu ? "" : "不" }}允许学生查看控制台输出
|
|
{{ isConsoleOutputShownForStu ? "" : "不" }}允许学生查看控制台输出
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="控制台权限变更:">
|
|
<el-descriptions-item label="控制台权限变更:">
|
|
|
- {{ isConsoleOutputShownForStu ? "" : "不" }}允许学生查看控制台输出 -> {{ isConsoleOutputShownForStu ? "不" : "" }}允许学生查看控制台输出
|
|
|
|
|
|
|
+ {{ isConsoleOutputShownForStu ? "" : "不" }}允许学生查看控制台输出 ->
|
|
|
|
|
+ {{ isConsoleOutputShownForStu ? "不" : "" }}允许学生查看控制台输出
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
<template #footer class="dialog-footer">
|
|
<template #footer class="dialog-footer">
|
|
@@ -751,13 +734,13 @@ export default {
|
|
|
createExamPaper() { // 生成自测试卷(老师选择考试,否则不能正常自测)
|
|
createExamPaper() { // 生成自测试卷(老师选择考试,否则不能正常自测)
|
|
|
this.loading.create = true;
|
|
this.loading.create = true;
|
|
|
this.$apis.joinCoderExam(this.exam.id)
|
|
this.$apis.joinCoderExam(this.exam.id)
|
|
|
- .then(_res => {
|
|
|
|
|
- this.$message.success({
|
|
|
|
|
- message: "生成自测试卷成功!",
|
|
|
|
|
- center: true
|
|
|
|
|
- });
|
|
|
|
|
- this.fetchExamDetail();
|
|
|
|
|
- }).catch(_err => {
|
|
|
|
|
|
|
+ .then(_res => {
|
|
|
|
|
+ this.$message.success({
|
|
|
|
|
+ message: "生成自测试卷成功!",
|
|
|
|
|
+ center: true
|
|
|
|
|
+ });
|
|
|
|
|
+ this.fetchExamDetail();
|
|
|
|
|
+ }).catch(_err => {
|
|
|
this.$message.error({
|
|
this.$message.error({
|
|
|
message: "生成自测试卷出错!",
|
|
message: "生成自测试卷出错!",
|
|
|
center: true
|
|
center: true
|
|
@@ -787,9 +770,9 @@ export default {
|
|
|
this.$router.push(`${this.$route.path}/result/${resultId}`);
|
|
this.$router.push(`${this.$route.path}/result/${resultId}`);
|
|
|
},
|
|
},
|
|
|
// stop coder record
|
|
// stop coder record
|
|
|
- async stopRecord(recordId){
|
|
|
|
|
- const res = (await this.$apis.stopRecord(recordId)).data;
|
|
|
|
|
- console.log(res);
|
|
|
|
|
|
|
+ async stopRecord(recordId) {
|
|
|
|
|
+ const res = (await this.$apis.stopRecord(recordId)).data;
|
|
|
|
|
+ console.log(res);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -818,7 +801,7 @@ export default {
|
|
|
padding-bottom: 0;
|
|
padding-bottom: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-::v-deep .exam-description .el-descriptions__body{
|
|
|
|
|
|
|
+::v-deep .exam-description .el-descriptions__body {
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
background-color: #F8F9FB; //样式穿透,覆盖原本的样式
|
|
background-color: #F8F9FB; //样式穿透,覆盖原本的样式
|
|
|
}
|
|
}
|
|
@@ -847,11 +830,16 @@ export default {
|
|
|
// border-bottom: 1px solid #afaaaa;
|
|
// border-bottom: 1px solid #afaaaa;
|
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
-.commit-stop-button{
|
|
|
|
|
|
|
+.commit-stop-button {
|
|
|
color: var(--el-color-danger)
|
|
color: var(--el-color-danger)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.commit-stop-button:hover{
|
|
|
|
|
- opacity: 75%;
|
|
|
|
|
|
|
+.commit-stop-button:hover {
|
|
|
|
|
+ color: rgba(245, 108, 108, 0.75);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+:deep(.el-table__expanded-cell[class*=cell]){
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ box-shadow: inset 0px 0px 5px 0px var(--el-color-info);
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|