123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389 |
- <template>
- <div class="mark-detail-progress">
- <div class="box-justify part-box part-box-pad">
- <el-breadcrumb separator="|">
- <el-breadcrumb-item
- >考生人数:{{ summary.studentCount }}</el-breadcrumb-item
- >
- <el-breadcrumb-item
- >已扫描人数:{{ summary.uploadCount }}</el-breadcrumb-item
- >
- <el-breadcrumb-item
- >缺考人数:{{ summary.absentCount }}</el-breadcrumb-item
- >
- <el-breadcrumb-item
- >评卷进度:{{ summary.percent || 0 }}%</el-breadcrumb-item
- >
- </el-breadcrumb>
- <div>
- <el-button type="primary" @click="initData">查询</el-button>
- <el-button
- type="primary"
- :loading="downloading"
- icon="el-icon-download"
- @click="toExport"
- >导出评卷员工作量</el-button
- >
- </div>
- </div>
- <div v-if="openClassMark" class="part-box part-box-pad">
- <div class="part-box-head">
- <h3>班级评卷进度</h3>
- </div>
- <el-form label-position="left" label-width="0" inline>
- <el-form-item>
- <el-input
- v-model.trim="filter.className"
- placeholder="班级"
- clearable
- >
- </el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="getList(1)">查询</el-button>
- </el-form-item>
- </el-form>
- <el-table ref="TableList" :data="classList">
- <el-table-column
- prop="className"
- label="班级"
- min-width="200"
- ></el-table-column>
- <el-table-column
- class-name="action-column"
- label="评卷员"
- align="center"
- min-width="100"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- @click="toMarker(scope.row)"
- >{{ scope.row.markerCount }}</el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- prop="taskCount"
- label="任务总数"
- min-width="100"
- ></el-table-column>
- <el-table-column
- prop="markedCount"
- label="完成总数"
- min-width="100"
- ></el-table-column>
- <el-table-column
- prop="leftCount"
- label="剩余总数"
- min-width="100"
- ></el-table-column>
- <el-table-column prop="percent" label="评卷进度" min-width="100">
- <span slot-scope="scope">{{ scope.row.percent || 0 }}%</span>
- </el-table-column>
- <el-table-column
- class-name="action-column"
- label="待仲裁数"
- width="100"
- align="center"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- @click="toArbitrate(scope.row)"
- >{{ scope.row.arbitrateCount }}</el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- class-name="action-column"
- label="操作"
- width="100"
- align="center"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- @click="toDetail(scope.row)"
- >查看详情</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <div class="part-page">
- <el-pagination
- background
- layout="total, sizes, prev, pager, next, jumper"
- :pager-count="5"
- :current-page="current"
- :total="total"
- :page-size="size"
- @current-change="toPage"
- @size-change="pageSizeChange"
- >
- </el-pagination>
- </div>
- </div>
- <div class="part-box part-box-pad">
- <div class="part-box-head">
- <h3>题目评卷进度</h3>
- </div>
- <el-table ref="TableList" :data="questionList">
- <el-table-column prop="questionNumber" label="评阅题目" width="120">
- <template slot-scope="scope">
- <span>{{ scope.row.questionNumber }}</span>
- <el-tag
- v-if="scope.row.aiMark"
- class="tag-spin tag-wrap"
- size="medium"
- >AI智能评卷</el-tag
- >
- </template>
- </el-table-column>
- <el-table-column
- class-name="action-column"
- label="评卷员"
- align="center"
- min-width="100"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- @click="toMarker(scope.row)"
- >{{ scope.row.markerCount }}</el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- prop="taskCount"
- label="任务总数"
- width="100"
- ></el-table-column>
- <el-table-column
- prop="markedCount"
- label="完成总数"
- width="100"
- ></el-table-column>
- <el-table-column
- prop="leftCount"
- label="剩余总数"
- width="100"
- ></el-table-column>
- <el-table-column
- prop="currentCount"
- label="正在评卷"
- width="100"
- ></el-table-column>
- <el-table-column prop="percent" label="评卷进度" width="100">
- <span slot-scope="scope">{{ scope.row.percent || 0 }}%</span>
- </el-table-column>
- <el-table-column
- class-name="action-column"
- label="待仲裁数"
- width="100"
- align="center"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- @click="toArbitrate(scope.row)"
- >{{ scope.row.arbitrateCount }}</el-button
- >
- </template>
- </el-table-column>
- <el-table-column
- class-name="action-column"
- label="操作"
- width="200"
- align="center"
- fixed="right"
- >
- <template slot-scope="scope">
- <template v-if="scope.row.aiMark">
- <el-button
- v-if="checkPrivilege('link', 'EnableAiMark', 'MarkManage')"
- class="btn-primary"
- type="text"
- @click="handleAiStatusUpdate(scope.row)"
- >{{ scope.row.enableAi ? "终止" : "开启" }}智能评卷</el-button
- >
- <el-button
- v-if="checkPrivilege('link', 'ResetAiMarkTask', 'MarkManage')"
- class="btn-primary"
- type="text"
- @click="handleAiReset(scope.row)"
- >重置AI智能评卷任务</el-button
- >
- </template>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <class-mark-progress-dialog
- ref="ClassMarkProgressDialog"
- :data="curClass"
- />
- </div>
- </template>
- <script>
- import {
- markProgressSummary,
- markProgressClassListPage,
- markProgressMarkerExport,
- markProgressQuestionAiStatusUpdate,
- markProgressQuestionAiReset,
- } from "../../api";
- import { downloadByApi } from "@/plugins/download";
- import ClassMarkProgressDialog from "./ClassMarkProgressDialog.vue";
- export default {
- name: "mark-detail-progress",
- components: {
- ClassMarkProgressDialog,
- },
- props: {
- baseInfo: {
- type: Object,
- default() {
- return {};
- },
- },
- },
- data() {
- return {
- filter: {
- className: "",
- },
- size: this.GLOBAL.pageSize,
- current: 1,
- total: 0,
- classList: [],
- curClass: {},
- summary: {},
- questionList: [],
- curRow: {},
- openClassMark: false,
- downloading: false,
- };
- },
- mounted() {
- this.initData();
- },
- methods: {
- async initData() {
- await this.getSummary();
- if (this.openClassMark) this.toPage(1);
- },
- async getSummary() {
- const res = await markProgressSummary({
- examId: this.baseInfo.examId,
- paperNumber: this.baseInfo.paperNumber,
- });
- this.summary = res.totalInfo || {
- studentCount: "",
- uploadCount: "",
- absentCount: "",
- percent: "",
- };
- this.questionList = res.groupInfo || [];
- this.openClassMark = res.classMark;
- },
- async handleAiStatusUpdate(row) {
- const actionName = row.enableAi ? "终止" : "开启";
- const confirm = await this.$confirm(
- `确定要${actionName}AI智能评卷任务?`,
- "提示",
- {
- type: "warning",
- }
- ).catch(() => {});
- if (confirm !== "confirm") return;
- await markProgressQuestionAiStatusUpdate({
- questionId: row.questionId,
- enableAi: !row.enableAi,
- });
- this.$message.success("操作成功");
- this.initData();
- },
- async handleAiReset(row) {
- const confirm = await this.$confirm(
- "确定要重置AI智能评卷任务?",
- "提示",
- {
- type: "warning",
- }
- ).catch(() => {});
- if (confirm !== "confirm") return;
- await markProgressQuestionAiReset(row.questionId);
- this.$message.success("重置成功");
- this.initData();
- },
- async getList() {
- const datas = {
- examId: this.baseInfo.examId,
- paperNumber: this.baseInfo.paperNumber,
- ...this.filter,
- pageNumber: this.current,
- pageSize: this.size,
- };
- const data = await markProgressClassListPage(datas);
- if (!data) return;
- this.classList = data.records;
- this.total = data.total;
- },
- toPage(page) {
- this.current = page;
- this.getList();
- },
- toArbitrate(row) {
- if (row.className) this.$ls.set("preset-className", row.className);
- this.$ls.set("preset-questionId", row.questionId);
- this.$emit("to-menu", "arbitration");
- },
- toMarker(row) {
- if (row.className) this.$ls.set("preset-className", row.className);
- this.$ls.set("preset-questionId", row.questionId);
- this.$emit("to-menu", "marker");
- },
- async toExport() {
- if (this.downloading) return;
- this.downloading = true;
- const res = await downloadByApi(() => {
- return markProgressMarkerExport({
- examId: this.baseInfo.examId,
- courseId: this.baseInfo.courseId,
- paperNumber: this.baseInfo.paperNumber,
- });
- }).catch((e) => {
- this.$message.error(e || "下载失败,请重新尝试!");
- });
- this.downloading = false;
- if (!res) return;
- this.$message.success("下载成功!");
- },
- toDetail(row) {
- this.curClass = {
- ...row,
- examId: this.baseInfo.examId,
- paperNumber: this.baseInfo.paperNumber,
- };
- this.$refs.ClassMarkProgressDialog.open();
- },
- },
- };
- </script>
|