|
@@ -1,316 +1,328 @@
|
|
-<template>
|
|
|
|
- <div class="grading-progress">
|
|
|
|
- <div class="part-box-head" v-if="IS_ADMIN">
|
|
|
|
- <div class="part-box-head-right">
|
|
|
|
- <Button
|
|
|
|
- type="error"
|
|
|
|
- shape="circle"
|
|
|
|
- icon="area icon"
|
|
|
|
- @click="toCleanData"
|
|
|
|
- v-if="IS_LEVEL || IS_SCORE"
|
|
|
|
- >清除当前阅卷数据</Button
|
|
|
|
- >
|
|
|
|
- <Button
|
|
|
|
- type="success"
|
|
|
|
- shape="circle"
|
|
|
|
- icon="recode-white icon"
|
|
|
|
- @click="toGrading"
|
|
|
|
- v-if="showGradingBtn"
|
|
|
|
- >正评任务创建</Button
|
|
|
|
- >
|
|
|
|
- <Button
|
|
|
|
- type="warning"
|
|
|
|
- shape="circle"
|
|
|
|
- icon="recode-white icon"
|
|
|
|
- @click="toTryGrading"
|
|
|
|
- v-if="showTryGradingBtn"
|
|
|
|
- >试评任务创建</Button
|
|
|
|
- >
|
|
|
|
- <Button shape="circle" @click="toMark" v-if="showMarkBtn"
|
|
|
|
- >进入打分阶段
|
|
|
|
- <Icon type="arrow-right-long icon" style="margin-left:8px;" />
|
|
|
|
- </Button>
|
|
|
|
- </div>
|
|
|
|
- <div class="part-box-head-left" v-if="IS_LEVEL">
|
|
|
|
- <Button shape="circle" icon="md-download" @click="toExportStandard"
|
|
|
|
- >导出标准卷信息</Button
|
|
|
|
- >
|
|
|
|
- <Button shape="circle" icon="md-download" @click="toExportGrading"
|
|
|
|
- >导出一键定档信息</Button
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <Row :gutter="20" type="flex">
|
|
|
|
- <Col span="12">
|
|
|
|
- <div class="part-box progress-table">
|
|
|
|
- <table class="table table-noborder">
|
|
|
|
- <tr v-for="(item, aindex) in areaProgress" :key="aindex">
|
|
|
|
- <td>{{ item.areaName }}</td>
|
|
|
|
- <td>
|
|
|
|
- <progress-line
|
|
|
|
- :sum="item.totalCount"
|
|
|
|
- :current="item.successCount"
|
|
|
|
- :show-count="showPaperRelateCount"
|
|
|
|
- ></progress-line>
|
|
|
|
- </td>
|
|
|
|
- <td>进度:{{ item.progress }}%</td>
|
|
|
|
- <td></td>
|
|
|
|
- </tr>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- </Col>
|
|
|
|
- <Col span="12">
|
|
|
|
- <div class="part-box progress-table">
|
|
|
|
- <table
|
|
|
|
- class="table table-noborder"
|
|
|
|
- v-if="IS_LEVEL && markerProgress.length"
|
|
|
|
- >
|
|
|
|
- <tr>
|
|
|
|
- <td>{{ kzzInfo.loginName }}</td>
|
|
|
|
- <td colspan="3" style="text-align:left">
|
|
|
|
- 仲裁:{{ kzzInfo.arbitrated }}
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- <tr v-for="(item, aindex) in markerProgress" :key="aindex">
|
|
|
|
- <td>{{ item.loginName }}</td>
|
|
|
|
- <td>
|
|
|
|
- <progress-line
|
|
|
|
- :sum="item.totalCount"
|
|
|
|
- :current="item.successCount"
|
|
|
|
- :show-count="showPaperRelateCount"
|
|
|
|
- ></progress-line>
|
|
|
|
- </td>
|
|
|
|
- <td>进度:{{ item.progress }}%</td>
|
|
|
|
- <td>打回:{{ item.rejectedCount }}</td>
|
|
|
|
- </tr>
|
|
|
|
- </table>
|
|
|
|
-
|
|
|
|
- <table class="table table-noborder" v-if="IS_SCORE">
|
|
|
|
- <tr v-for="(item, aindex) in markerProgress" :key="aindex">
|
|
|
|
- <td>{{ item.loginName }}</td>
|
|
|
|
- <td>
|
|
|
|
- <progress-line
|
|
|
|
- :sum="item.totalCount"
|
|
|
|
- :current="item.successCount"
|
|
|
|
- :show-count="showPaperRelateCount"
|
|
|
|
- ></progress-line>
|
|
|
|
- </td>
|
|
|
|
- <td>进度:{{ item.progress }}%</td>
|
|
|
|
- <td>改档:{{ item.shiftCount }}</td>
|
|
|
|
- <td>改档打分:{{ item.shiftScoreCount }}</td>
|
|
|
|
- </tr>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
-
|
|
|
|
- <!-- clean-grading-data-dialog -->
|
|
|
|
- <clean-grading-data-dialog
|
|
|
|
- :cur-subject="curSubject"
|
|
|
|
- @modified="initData"
|
|
|
|
- ref="CleanGradingDataDialog"
|
|
|
|
- ></clean-grading-data-dialog>
|
|
|
|
- <!-- modify-unformal-grading-task -->
|
|
|
|
- <modify-unformal-grading-task
|
|
|
|
- :cur-subject="curSubject"
|
|
|
|
- @modified="taskSubmitSuccess"
|
|
|
|
- ref="ModifyUnformalGradingTask"
|
|
|
|
- v-if="curSubject.id"
|
|
|
|
- ></modify-unformal-grading-task>
|
|
|
|
- <!-- modify-formal-grading-task -->
|
|
|
|
- <modify-formal-grading-task
|
|
|
|
- :subject-id="subjectId"
|
|
|
|
- @modified="taskSubmitSuccess"
|
|
|
|
- ref="ModifyFormalGradingTask"
|
|
|
|
- ></modify-formal-grading-task>
|
|
|
|
- </div>
|
|
|
|
-</template>
|
|
|
|
-
|
|
|
|
-<script>
|
|
|
|
-import ProgressLine from "./components/ProgressLine";
|
|
|
|
-import ModifyUnformalGradingTask from "./components/ModifyUnformalGradingTask";
|
|
|
|
-import ModifyFormalGradingTask from "./components/ModifyFormalGradingTask";
|
|
|
|
-import CleanGradingDataDialog from "./components/CleanGradingDataDialog";
|
|
|
|
-import {
|
|
|
|
- gradingProgressDetail,
|
|
|
|
- subjectDetail,
|
|
|
|
- gotoScoreStep,
|
|
|
|
- getParamsSet
|
|
|
|
-} from "@/api";
|
|
|
|
-import { SUBJECT_STAGE } from "@/constants/enumerate";
|
|
|
|
-
|
|
|
|
-export default {
|
|
|
|
- name: "grading-progress",
|
|
|
|
- components: {
|
|
|
|
- ProgressLine,
|
|
|
|
- ModifyUnformalGradingTask,
|
|
|
|
- ModifyFormalGradingTask,
|
|
|
|
- CleanGradingDataDialog
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- subjectId: this.$route.params.subjectId,
|
|
|
|
- workId: this.$route.params.workId,
|
|
|
|
- paramsSet: {},
|
|
|
|
- curSubject: {},
|
|
|
|
- SUBJECT_STAGE,
|
|
|
|
- kzzInfo: {},
|
|
|
|
- totalProgress: {},
|
|
|
|
- areaProgress: [],
|
|
|
|
- markerProgress: [],
|
|
|
|
- curUserRoleType: "",
|
|
|
|
- password: ""
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- showGradingBtn() {
|
|
|
|
- // 采集时已知档位,则不显示正评任务按钮
|
|
|
|
- if (this.paramsSet.paperStage) return false;
|
|
|
|
-
|
|
|
|
- return (
|
|
|
|
- (this.curSubject.stage == "INIT" &&
|
|
|
|
- this.curSubject.test !== 2 &&
|
|
|
|
- !this.curSubject.formal &&
|
|
|
|
- this.totalProgress.progress > 0) ||
|
|
|
|
- (this.curSubject.stage == "LEVEL" &&
|
|
|
|
- this.totalProgress.progress !== 100 &&
|
|
|
|
- this.curSubject.test === 0 &&
|
|
|
|
- this.curSubject.formal)
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- showTryGradingBtn() {
|
|
|
|
- return false;
|
|
|
|
- // // 采集时已知档位,则不显示试评任务按钮
|
|
|
|
- // if (this.paramsSet.paperStage) return false;
|
|
|
|
-
|
|
|
|
- // return (
|
|
|
|
- // (this.curSubject.stage == "INIT" &&
|
|
|
|
- // this.curSubject.test !== 2 &&
|
|
|
|
- // !this.curSubject.formal &&
|
|
|
|
- // this.totalProgress.progress > 0) ||
|
|
|
|
- // (this.curSubject.stage == "LEVEL" && this.curSubject.test === 2)
|
|
|
|
- // );
|
|
|
|
- },
|
|
|
|
- showMarkBtn() {
|
|
|
|
- // 采集时已知档位,分档阶段则可直接进入打分
|
|
|
|
- if (this.paramsSet.paperStage) return this.curSubject.stage == "LEVEL";
|
|
|
|
-
|
|
|
|
- // 若不知档位,则必须分档进度为100时,才能进入打分
|
|
|
|
- return (
|
|
|
|
- (this.curSubject.stage == "LEVEL" &&
|
|
|
|
- this.totalProgress.progress === 100) ||
|
|
|
|
- (this.curSubject.stage == "SCORE" && !this.curSubject.allLevel)
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- showPaperRelateCount() {
|
|
|
|
- return this.IS_ADMIN || !!this.paramsSet["showPaperCount"];
|
|
|
|
- },
|
|
|
|
- IS_ADMIN() {
|
|
|
|
- return (
|
|
|
|
- this.curUserRoleType === "ADMIN" ||
|
|
|
|
- this.curUserRoleType === "SUPER_ADMIN"
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- IS_MARK_LEADER() {
|
|
|
|
- return this.curUserRoleType === "MARK_LEADER";
|
|
|
|
- },
|
|
|
|
- IS_LEVEL() {
|
|
|
|
- return this.curSubject.stage === "LEVEL";
|
|
|
|
- },
|
|
|
|
- IS_SCORE() {
|
|
|
|
- return this.curSubject.stage === "SCORE";
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- mounted() {
|
|
|
|
- this.curUserRoleType = this.$ls.get("user", { role: "" }).role;
|
|
|
|
- this.initData();
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- async initData() {
|
|
|
|
- await this.getSubjectDetail();
|
|
|
|
- this.getParamsSetInfo();
|
|
|
|
- this.getProgressDetail();
|
|
|
|
- },
|
|
|
|
- async getParamsSetInfo() {
|
|
|
|
- this.paramsSet = await getParamsSet(this.workId);
|
|
|
|
- },
|
|
|
|
- async getProgressDetail() {
|
|
|
|
- const data = await gradingProgressDetail({
|
|
|
|
- workId: this.curSubject.workId,
|
|
|
|
- subject: this.curSubject.subject
|
|
|
|
- });
|
|
|
|
- this.kzzInfo = data.kzz || {};
|
|
|
|
- this.totalProgress = data.totalProgress;
|
|
|
|
- const totalInfo = {
|
|
|
|
- successCount: data.totalProgress.successCount,
|
|
|
|
- totalCount: data.totalProgress.totalCount,
|
|
|
|
- progress: data.totalProgress.progress.toFixed(2),
|
|
|
|
- areaName: "总体进度"
|
|
|
|
- };
|
|
|
|
- if (this.curSubject.stage === "INIT") {
|
|
|
|
- this.areaProgress = [totalInfo];
|
|
|
|
- this.markerProgress = [];
|
|
|
|
- } else {
|
|
|
|
- this.areaProgress = [totalInfo, ...this.addProgress(data.areaProgress)];
|
|
|
|
- this.markerProgress = this.addProgress(data.markerProgress);
|
|
|
|
- }
|
|
|
|
- this.$parent.setProgress &&
|
|
|
|
- this.$parent.setProgress(data.totalProgress.progress);
|
|
|
|
- },
|
|
|
|
- addProgress(data) {
|
|
|
|
- return data.map(item => {
|
|
|
|
- item.successCount = item.totalCount - item.leftCount;
|
|
|
|
- item.progress = item.totalCount
|
|
|
|
- ? ((100 * item.successCount) / item.totalCount).toFixed(2)
|
|
|
|
- : "0.00";
|
|
|
|
- return item;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- async getSubjectDetail() {
|
|
|
|
- this.curSubject = await subjectDetail(this.subjectId);
|
|
|
|
- },
|
|
|
|
- toCleanData() {
|
|
|
|
- this.$refs.CleanGradingDataDialog.open();
|
|
|
|
- },
|
|
|
|
- toGrading() {
|
|
|
|
- this.$refs.ModifyFormalGradingTask.open();
|
|
|
|
- },
|
|
|
|
- toTryGrading() {
|
|
|
|
- this.$refs.ModifyUnformalGradingTask.open();
|
|
|
|
- },
|
|
|
|
- toMark() {
|
|
|
|
- this.$Modal.confirm({
|
|
|
|
- content: "确定要进入打分阶段吗?",
|
|
|
|
- onOk: async () => {
|
|
|
|
- await gotoScoreStep(this.subjectId);
|
|
|
|
- this.$router.replace({
|
|
|
|
- name: "Mark",
|
|
|
|
- params: {
|
|
|
|
- workId: this.curSubject.workId,
|
|
|
|
- subjectId: this.subjectId
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- taskSubmitSuccess() {
|
|
|
|
- this.$parent.initData();
|
|
|
|
- this.initData();
|
|
|
|
- },
|
|
|
|
- toExportStandard() {
|
|
|
|
- window.open(
|
|
|
|
- this.urlAddAuthor(
|
|
|
|
- `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/sample`
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- toExportGrading() {
|
|
|
|
- window.open(
|
|
|
|
- this.urlAddAuthor(
|
|
|
|
- `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/oneClick`
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
-</script>
|
|
|
|
|
|
+<template>
|
|
|
|
+ <div class="grading-progress">
|
|
|
|
+ <div class="part-box-head" v-if="IS_ADMIN">
|
|
|
|
+ <div class="part-box-head-right">
|
|
|
|
+ <Button
|
|
|
|
+ type="error"
|
|
|
|
+ shape="circle"
|
|
|
|
+ icon="area icon"
|
|
|
|
+ @click="toCleanData"
|
|
|
|
+ v-if="IS_LEVEL || IS_SCORE"
|
|
|
|
+ >清除当前阅卷数据</Button
|
|
|
|
+ >
|
|
|
|
+ <Button
|
|
|
|
+ type="success"
|
|
|
|
+ shape="circle"
|
|
|
|
+ icon="recode-white icon"
|
|
|
|
+ @click="toGrading"
|
|
|
|
+ v-if="showGradingBtn"
|
|
|
|
+ >正评任务创建</Button
|
|
|
|
+ >
|
|
|
|
+ <Button
|
|
|
|
+ type="warning"
|
|
|
|
+ shape="circle"
|
|
|
|
+ icon="recode-white icon"
|
|
|
|
+ @click="toTryGrading"
|
|
|
|
+ v-if="showTryGradingBtn"
|
|
|
|
+ >试评任务创建</Button
|
|
|
|
+ >
|
|
|
|
+ <Button shape="circle" @click="toMark" v-if="showMarkBtn"
|
|
|
|
+ >进入打分阶段
|
|
|
|
+ <Icon type="arrow-right-long icon" style="margin-left:8px;" />
|
|
|
|
+ </Button>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="part-box-head-left" v-if="IS_LEVEL">
|
|
|
|
+ <Button shape="circle" icon="md-download" @click="toExportStandard"
|
|
|
|
+ >导出标准卷信息</Button
|
|
|
|
+ >
|
|
|
|
+ <Button shape="circle" icon="md-download" @click="toExportGrading"
|
|
|
|
+ >导出一键定档信息</Button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="IS_SCORE" class="part-box-head-left">
|
|
|
|
+ <Button shape="circle" icon="md-download" @click="toExportChangeLevel"
|
|
|
|
+ >导出改档信息</Button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <Row :gutter="20" type="flex">
|
|
|
|
+ <Col span="12">
|
|
|
|
+ <div class="part-box progress-table">
|
|
|
|
+ <table class="table table-noborder">
|
|
|
|
+ <tr v-for="(item, aindex) in areaProgress" :key="aindex">
|
|
|
|
+ <td>{{ item.areaName }}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <progress-line
|
|
|
|
+ :sum="item.totalCount"
|
|
|
|
+ :current="item.successCount"
|
|
|
|
+ :show-count="showPaperRelateCount"
|
|
|
|
+ ></progress-line>
|
|
|
|
+ </td>
|
|
|
|
+ <td>进度:{{ item.progress }}%</td>
|
|
|
|
+ <td></td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col span="12">
|
|
|
|
+ <div class="part-box progress-table">
|
|
|
|
+ <table
|
|
|
|
+ class="table table-noborder"
|
|
|
|
+ v-if="IS_LEVEL && markerProgress.length"
|
|
|
|
+ >
|
|
|
|
+ <tr>
|
|
|
|
+ <td>{{ kzzInfo.loginName }}</td>
|
|
|
|
+ <td colspan="3" style="text-align:left">
|
|
|
|
+ 仲裁:{{ kzzInfo.arbitrated }}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr v-for="(item, aindex) in markerProgress" :key="aindex">
|
|
|
|
+ <td>{{ item.loginName }}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <progress-line
|
|
|
|
+ :sum="item.totalCount"
|
|
|
|
+ :current="item.successCount"
|
|
|
|
+ :show-count="showPaperRelateCount"
|
|
|
|
+ ></progress-line>
|
|
|
|
+ </td>
|
|
|
|
+ <td>进度:{{ item.progress }}%</td>
|
|
|
|
+ <td>打回:{{ item.rejectedCount }}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+
|
|
|
|
+ <table class="table table-noborder" v-if="IS_SCORE">
|
|
|
|
+ <tr v-for="(item, aindex) in markerProgress" :key="aindex">
|
|
|
|
+ <td>{{ item.loginName }}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <progress-line
|
|
|
|
+ :sum="item.totalCount"
|
|
|
|
+ :current="item.successCount"
|
|
|
|
+ :show-count="showPaperRelateCount"
|
|
|
|
+ ></progress-line>
|
|
|
|
+ </td>
|
|
|
|
+ <td>进度:{{ item.progress }}%</td>
|
|
|
|
+ <td>改档:{{ item.shiftCount }}</td>
|
|
|
|
+ <td>改档打分:{{ item.shiftScoreCount }}</td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+
|
|
|
|
+ <!-- clean-grading-data-dialog -->
|
|
|
|
+ <clean-grading-data-dialog
|
|
|
|
+ :cur-subject="curSubject"
|
|
|
|
+ @modified="initData"
|
|
|
|
+ ref="CleanGradingDataDialog"
|
|
|
|
+ ></clean-grading-data-dialog>
|
|
|
|
+ <!-- modify-unformal-grading-task -->
|
|
|
|
+ <modify-unformal-grading-task
|
|
|
|
+ :cur-subject="curSubject"
|
|
|
|
+ @modified="taskSubmitSuccess"
|
|
|
|
+ ref="ModifyUnformalGradingTask"
|
|
|
|
+ v-if="curSubject.id"
|
|
|
|
+ ></modify-unformal-grading-task>
|
|
|
|
+ <!-- modify-formal-grading-task -->
|
|
|
|
+ <modify-formal-grading-task
|
|
|
|
+ :subject-id="subjectId"
|
|
|
|
+ @modified="taskSubmitSuccess"
|
|
|
|
+ ref="ModifyFormalGradingTask"
|
|
|
|
+ ></modify-formal-grading-task>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import ProgressLine from "./components/ProgressLine";
|
|
|
|
+import ModifyUnformalGradingTask from "./components/ModifyUnformalGradingTask";
|
|
|
|
+import ModifyFormalGradingTask from "./components/ModifyFormalGradingTask";
|
|
|
|
+import CleanGradingDataDialog from "./components/CleanGradingDataDialog";
|
|
|
|
+import {
|
|
|
|
+ gradingProgressDetail,
|
|
|
|
+ subjectDetail,
|
|
|
|
+ gotoScoreStep,
|
|
|
|
+ getParamsSet
|
|
|
|
+} from "@/api";
|
|
|
|
+import { SUBJECT_STAGE } from "@/constants/enumerate";
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: "grading-progress",
|
|
|
|
+ components: {
|
|
|
|
+ ProgressLine,
|
|
|
|
+ ModifyUnformalGradingTask,
|
|
|
|
+ ModifyFormalGradingTask,
|
|
|
|
+ CleanGradingDataDialog
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ subjectId: this.$route.params.subjectId,
|
|
|
|
+ workId: this.$route.params.workId,
|
|
|
|
+ paramsSet: {},
|
|
|
|
+ curSubject: {},
|
|
|
|
+ SUBJECT_STAGE,
|
|
|
|
+ kzzInfo: {},
|
|
|
|
+ totalProgress: {},
|
|
|
|
+ areaProgress: [],
|
|
|
|
+ markerProgress: [],
|
|
|
|
+ curUserRoleType: "",
|
|
|
|
+ password: ""
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ showGradingBtn() {
|
|
|
|
+ // 采集时已知档位,则不显示正评任务按钮
|
|
|
|
+ if (this.paramsSet.paperStage) return false;
|
|
|
|
+
|
|
|
|
+ return (
|
|
|
|
+ (this.curSubject.stage == "INIT" &&
|
|
|
|
+ this.curSubject.test !== 2 &&
|
|
|
|
+ !this.curSubject.formal &&
|
|
|
|
+ this.totalProgress.progress > 0) ||
|
|
|
|
+ (this.curSubject.stage == "LEVEL" &&
|
|
|
|
+ this.totalProgress.progress !== 100 &&
|
|
|
|
+ this.curSubject.test === 0 &&
|
|
|
|
+ this.curSubject.formal)
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ showTryGradingBtn() {
|
|
|
|
+ return false;
|
|
|
|
+ // // 采集时已知档位,则不显示试评任务按钮
|
|
|
|
+ // if (this.paramsSet.paperStage) return false;
|
|
|
|
+
|
|
|
|
+ // return (
|
|
|
|
+ // (this.curSubject.stage == "INIT" &&
|
|
|
|
+ // this.curSubject.test !== 2 &&
|
|
|
|
+ // !this.curSubject.formal &&
|
|
|
|
+ // this.totalProgress.progress > 0) ||
|
|
|
|
+ // (this.curSubject.stage == "LEVEL" && this.curSubject.test === 2)
|
|
|
|
+ // );
|
|
|
|
+ },
|
|
|
|
+ showMarkBtn() {
|
|
|
|
+ // 采集时已知档位,分档阶段则可直接进入打分
|
|
|
|
+ if (this.paramsSet.paperStage) return this.curSubject.stage == "LEVEL";
|
|
|
|
+
|
|
|
|
+ // 若不知档位,则必须分档进度为100时,才能进入打分
|
|
|
|
+ return (
|
|
|
|
+ (this.curSubject.stage == "LEVEL" &&
|
|
|
|
+ this.totalProgress.progress === 100) ||
|
|
|
|
+ (this.curSubject.stage == "SCORE" && !this.curSubject.allLevel)
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ showPaperRelateCount() {
|
|
|
|
+ return this.IS_ADMIN || !!this.paramsSet["showPaperCount"];
|
|
|
|
+ },
|
|
|
|
+ IS_ADMIN() {
|
|
|
|
+ return (
|
|
|
|
+ this.curUserRoleType === "ADMIN" ||
|
|
|
|
+ this.curUserRoleType === "SUPER_ADMIN"
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ IS_MARK_LEADER() {
|
|
|
|
+ return this.curUserRoleType === "MARK_LEADER";
|
|
|
|
+ },
|
|
|
|
+ IS_LEVEL() {
|
|
|
|
+ return this.curSubject.stage === "LEVEL";
|
|
|
|
+ },
|
|
|
|
+ IS_SCORE() {
|
|
|
|
+ return this.curSubject.stage === "SCORE";
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.curUserRoleType = this.$ls.get("user", { role: "" }).role;
|
|
|
|
+ this.initData();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ async initData() {
|
|
|
|
+ await this.getSubjectDetail();
|
|
|
|
+ this.getParamsSetInfo();
|
|
|
|
+ this.getProgressDetail();
|
|
|
|
+ },
|
|
|
|
+ async getParamsSetInfo() {
|
|
|
|
+ this.paramsSet = await getParamsSet(this.workId);
|
|
|
|
+ },
|
|
|
|
+ async getProgressDetail() {
|
|
|
|
+ const data = await gradingProgressDetail({
|
|
|
|
+ workId: this.curSubject.workId,
|
|
|
|
+ subject: this.curSubject.subject
|
|
|
|
+ });
|
|
|
|
+ this.kzzInfo = data.kzz || {};
|
|
|
|
+ this.totalProgress = data.totalProgress;
|
|
|
|
+ const totalInfo = {
|
|
|
|
+ successCount: data.totalProgress.successCount,
|
|
|
|
+ totalCount: data.totalProgress.totalCount,
|
|
|
|
+ progress: data.totalProgress.progress.toFixed(2),
|
|
|
|
+ areaName: "总体进度"
|
|
|
|
+ };
|
|
|
|
+ if (this.curSubject.stage === "INIT") {
|
|
|
|
+ this.areaProgress = [totalInfo];
|
|
|
|
+ this.markerProgress = [];
|
|
|
|
+ } else {
|
|
|
|
+ this.areaProgress = [totalInfo, ...this.addProgress(data.areaProgress)];
|
|
|
|
+ this.markerProgress = this.addProgress(data.markerProgress);
|
|
|
|
+ }
|
|
|
|
+ this.$parent.setProgress &&
|
|
|
|
+ this.$parent.setProgress(data.totalProgress.progress);
|
|
|
|
+ },
|
|
|
|
+ addProgress(data) {
|
|
|
|
+ return data.map(item => {
|
|
|
|
+ item.successCount = item.totalCount - item.leftCount;
|
|
|
|
+ item.progress = item.totalCount
|
|
|
|
+ ? ((100 * item.successCount) / item.totalCount).toFixed(2)
|
|
|
|
+ : "0.00";
|
|
|
|
+ return item;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ async getSubjectDetail() {
|
|
|
|
+ this.curSubject = await subjectDetail(this.subjectId);
|
|
|
|
+ },
|
|
|
|
+ toCleanData() {
|
|
|
|
+ this.$refs.CleanGradingDataDialog.open();
|
|
|
|
+ },
|
|
|
|
+ toGrading() {
|
|
|
|
+ this.$refs.ModifyFormalGradingTask.open();
|
|
|
|
+ },
|
|
|
|
+ toTryGrading() {
|
|
|
|
+ this.$refs.ModifyUnformalGradingTask.open();
|
|
|
|
+ },
|
|
|
|
+ toMark() {
|
|
|
|
+ this.$Modal.confirm({
|
|
|
|
+ content: "确定要进入打分阶段吗?",
|
|
|
|
+ onOk: async () => {
|
|
|
|
+ await gotoScoreStep(this.subjectId);
|
|
|
|
+ this.$router.replace({
|
|
|
|
+ name: "Mark",
|
|
|
|
+ params: {
|
|
|
|
+ workId: this.curSubject.workId,
|
|
|
|
+ subjectId: this.subjectId
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ taskSubmitSuccess() {
|
|
|
|
+ this.$parent.initData();
|
|
|
|
+ this.initData();
|
|
|
|
+ },
|
|
|
|
+ toExportStandard() {
|
|
|
|
+ window.open(
|
|
|
|
+ this.urlAddAuthor(
|
|
|
|
+ `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/sample`
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ toExportGrading() {
|
|
|
|
+ window.open(
|
|
|
|
+ this.urlAddAuthor(
|
|
|
|
+ `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/oneClick`
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ toExportChangeLevel() {
|
|
|
|
+ window.open(
|
|
|
|
+ this.urlAddAuthor(
|
|
|
|
+ `${this.GLOBAL.domain}/api/export/paper/${this.curSubject.workId}/${this.curSubject.subject}/changeLevel`
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|