|
@@ -72,6 +72,11 @@
|
|
|
<el-table-column prop="percent" label="完成进度" width="120">
|
|
|
<span slot-scope="scope">{{ scope.row.percent || 0 }}%</span>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="statusDisplay"
|
|
|
+ label="评卷状态"
|
|
|
+ min-width="140"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
class-name="action-column"
|
|
|
label="操作"
|
|
@@ -91,7 +96,9 @@
|
|
|
class="btn-primary"
|
|
|
type="text"
|
|
|
@click="toSimpleFinish(scope.row)"
|
|
|
- >结束评卷</el-button
|
|
|
+ >{{
|
|
|
+ scope.row.status === "FORMAL" ? "结束评卷" : "开始评卷"
|
|
|
+ }}</el-button
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -201,24 +208,33 @@ export default {
|
|
|
|
|
|
this.toFinish(
|
|
|
this.multipleSelection[0].examId,
|
|
|
- this.multipleSelection.map((item) => item.paperNumber)
|
|
|
+ this.multipleSelection.map((item) => item.paperNumber),
|
|
|
+ "FINISH"
|
|
|
);
|
|
|
},
|
|
|
async toSimpleFinish(row) {
|
|
|
- const confirm = await this.$confirm("确定要结束当前评卷?", "提示", {
|
|
|
- type: "warning",
|
|
|
- }).catch(() => {});
|
|
|
+ const confirm = await this.$confirm(
|
|
|
+ "确定要" + (row.status === "FORMAL" ? "结束" : "开始") + "当前评卷?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ ).catch(() => {});
|
|
|
if (confirm !== "confirm") return;
|
|
|
|
|
|
- this.toFinish(row.examId, [row.paperNumber]);
|
|
|
+ this.toFinish(
|
|
|
+ row.examId,
|
|
|
+ [row.paperNumber],
|
|
|
+ row.status === "FINISH" ? "FORMAL" : "FINISH"
|
|
|
+ );
|
|
|
},
|
|
|
- async toFinish(examId, paperNumbers) {
|
|
|
+ async toFinish(examId, paperNumbers, status) {
|
|
|
if (!paperNumbers.length) return;
|
|
|
|
|
|
await markManageItemFinish({
|
|
|
examId,
|
|
|
paperNumbers,
|
|
|
- status: "FINISH",
|
|
|
+ status,
|
|
|
});
|
|
|
this.$message.success("操作成功!");
|
|
|
this.getList();
|