|
@@ -6,11 +6,17 @@
|
|
</div>
|
|
</div>
|
|
<div class="part-box-head">
|
|
<div class="part-box-head">
|
|
<div class="part-box-head-left">
|
|
<div class="part-box-head-left">
|
|
- <Button type="primary" @click="toGrading">正评任务创建</Button>
|
|
|
|
- <Button type="primary" @click="toTryGrading">试评任务创建</Button>
|
|
|
|
- <Button type="primary" @click="toMark">进入打分阶段</Button>
|
|
|
|
|
|
+ <Button type="primary" @click="toGrading" v-if="showGradingBtn"
|
|
|
|
+ >正评任务创建</Button
|
|
|
|
+ >
|
|
|
|
+ <Button type="primary" @click="toTryGrading" v-if="showTryGradingBtn"
|
|
|
|
+ >试评任务创建</Button
|
|
|
|
+ >
|
|
|
|
+ <Button type="primary" @click="toMark" v-if="showMarkBtn"
|
|
|
|
+ >进入打分阶段</Button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
- <div class="part-box-head-right">
|
|
|
|
|
|
+ <div class="part-box-head-right" v-if="curSubject.stage !== 'INIT'">
|
|
<Button type="primary" icon="md-download" @click="toExportStandard"
|
|
<Button type="primary" icon="md-download" @click="toExportStandard"
|
|
>导出标准卷信息</Button
|
|
>导出标准卷信息</Button
|
|
>
|
|
>
|
|
@@ -22,31 +28,31 @@
|
|
<div class="part-box">
|
|
<div class="part-box">
|
|
<div class="progress-table">
|
|
<div class="progress-table">
|
|
<table class="table table-noborder">
|
|
<table class="table table-noborder">
|
|
- <tr v-for="(area, aindex) in areaInfos" :key="aindex">
|
|
|
|
- <td style="width: 12%">{{ area.name }}</td>
|
|
|
|
|
|
+ <tr v-for="(item, aindex) in areaProgress" :key="aindex">
|
|
|
|
+ <td style="width: 12%">{{ item.areaName }}</td>
|
|
<td style="width: 60%;">
|
|
<td style="width: 60%;">
|
|
<progress-line
|
|
<progress-line
|
|
- :sum="area.sum"
|
|
|
|
- :current="area.current"
|
|
|
|
|
|
+ :sum="item.totalCount"
|
|
|
|
+ :current="item.successCount"
|
|
></progress-line>
|
|
></progress-line>
|
|
</td>
|
|
</td>
|
|
- <td style="width: 14%;">进度:{{ area.progress }}%</td>
|
|
|
|
|
|
+ <td style="width: 14%;">进度:{{ item.progress }}%</td>
|
|
<td style="width: 14%;"></td>
|
|
<td style="width: 14%;"></td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="progress-table">
|
|
<div class="progress-table">
|
|
<table class="table table-noborder">
|
|
<table class="table table-noborder">
|
|
- <tr v-for="(area, aindex) in userInfos" :key="aindex">
|
|
|
|
- <td style="width: 12%">{{ area.name }}</td>
|
|
|
|
|
|
+ <tr v-for="(item, aindex) in markerProgress" :key="aindex">
|
|
|
|
+ <td style="width: 12%">{{ item.markerName }}</td>
|
|
<td style="width: 60%;">
|
|
<td style="width: 60%;">
|
|
<progress-line
|
|
<progress-line
|
|
- :sum="area.sum"
|
|
|
|
- :current="area.current"
|
|
|
|
|
|
+ :sum="item.totalCount"
|
|
|
|
+ :current="item.successCount"
|
|
></progress-line>
|
|
></progress-line>
|
|
</td>
|
|
</td>
|
|
- <td style="width: 14%;">进度:{{ area.progress }}%</td>
|
|
|
|
- <td style="width: 14%;">打回:{{ area.arbitration }}</td>
|
|
|
|
|
|
+ <td style="width: 14%;">进度:{{ item.progress }}%</td>
|
|
|
|
+ <td style="width: 14%;">打回:{{ item.rejectedCount }}</td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@@ -58,6 +64,8 @@
|
|
></modify-unformal-grading-task>
|
|
></modify-unformal-grading-task>
|
|
<!-- modify-formal-grading-task -->
|
|
<!-- modify-formal-grading-task -->
|
|
<modify-formal-grading-task
|
|
<modify-formal-grading-task
|
|
|
|
+ :subject-id="subjectId"
|
|
|
|
+ @confirm="getData"
|
|
ref="ModifyFormalGradingTask"
|
|
ref="ModifyFormalGradingTask"
|
|
></modify-formal-grading-task>
|
|
></modify-formal-grading-task>
|
|
</div>
|
|
</div>
|
|
@@ -67,7 +75,8 @@
|
|
import ProgressLine from "./components/ProgressLine";
|
|
import ProgressLine from "./components/ProgressLine";
|
|
import ModifyUnformalGradingTask from "./components/ModifyUnformalGradingTask";
|
|
import ModifyUnformalGradingTask from "./components/ModifyUnformalGradingTask";
|
|
import ModifyFormalGradingTask from "./components/ModifyFormalGradingTask";
|
|
import ModifyFormalGradingTask from "./components/ModifyFormalGradingTask";
|
|
-import { gradingProgressDetail } from "@/api";
|
|
|
|
|
|
+import { gradingProgressDetail, subjectDetail } from "@/api";
|
|
|
|
+import { SUBJECT_STAGE } from "@/constants/enumerate";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "grading-progress",
|
|
name: "grading-progress",
|
|
@@ -79,70 +88,91 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
subjectId: this.$route.params.subjectId,
|
|
subjectId: this.$route.params.subjectId,
|
|
- stepName: "采集阶段",
|
|
|
|
- stepProgress: "95.56%",
|
|
|
|
- areaInfos: [
|
|
|
|
- {
|
|
|
|
- name: "总体进度",
|
|
|
|
- sum: 5500,
|
|
|
|
- current: 0,
|
|
|
|
- progress: 0
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "考区1进度",
|
|
|
|
- sum: 1000,
|
|
|
|
- current: 990,
|
|
|
|
- progress: 100
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "考区2进度",
|
|
|
|
- sum: 5500,
|
|
|
|
- current: 2000,
|
|
|
|
- progress: 45.45
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "考区3进度",
|
|
|
|
- sum: 5500,
|
|
|
|
- current: 2000,
|
|
|
|
- progress: 45.45
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- userInfos: [
|
|
|
|
- {
|
|
|
|
- name: "科组长",
|
|
|
|
- sum: 5500,
|
|
|
|
- current: 2000,
|
|
|
|
- arbitration: 10,
|
|
|
|
- progress: 45.45
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "评卷员1",
|
|
|
|
- sum: 5500,
|
|
|
|
- current: 2000,
|
|
|
|
- arbitration: 10,
|
|
|
|
- progress: 45.45
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "评卷员2",
|
|
|
|
- sum: 5500,
|
|
|
|
- current: 2000,
|
|
|
|
- arbitration: 10,
|
|
|
|
- progress: 45.45
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "评卷员3",
|
|
|
|
- sum: 5500,
|
|
|
|
- current: 2000,
|
|
|
|
- arbitration: 10,
|
|
|
|
- progress: 45.45
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ workId: "",
|
|
|
|
+ subject: "",
|
|
|
|
+ stepName: "",
|
|
|
|
+ stepProgress: "",
|
|
|
|
+ curSubject: {},
|
|
|
|
+ SUBJECT_STAGE,
|
|
|
|
+ totalProgress: {},
|
|
|
|
+ areaProgress: [],
|
|
|
|
+ markerProgress: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ showGradingBtn() {
|
|
|
|
+ return (
|
|
|
|
+ (this.curSubject.stage == "INIT" &&
|
|
|
|
+ this.curSubject.test !== 2 &&
|
|
|
|
+ !this.curSubject.formal) ||
|
|
|
|
+ (this.curSubject.stage == "LEVEL" &&
|
|
|
|
+ this.stepProgress !== 100 &&
|
|
|
|
+ this.curSubject.test === 0 &&
|
|
|
|
+ this.curSubject.formal)
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ showTryGradingBtn() {
|
|
|
|
+ return (
|
|
|
|
+ (this.curSubject.stage == "LEVEL" && this.stepProgress === 100) ||
|
|
|
|
+ (this.curSubject.stage == "SCORE" && !this.curSubject.allLevel)
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ showMarkBtn() {
|
|
|
|
+ return (
|
|
|
|
+ (this.curSubject.stage == "INIT" &&
|
|
|
|
+ this.curSubject.test !== 2 &&
|
|
|
|
+ !this.curSubject.formal) ||
|
|
|
|
+ (this.curSubject.stage == "LEVEL" && this.curSubject.test === 2)
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ const ids = this.subjectId.split("-");
|
|
|
|
+ this.workId = ids[0];
|
|
|
|
+ this.subject = ids[1];
|
|
|
|
+ this.getData();
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
async getData() {
|
|
async getData() {
|
|
- const data = await gradingProgressDetail(this.subjectId);
|
|
|
|
- console.log(data);
|
|
|
|
|
|
+ await this.getSubjectDetail();
|
|
|
|
+ this.getProgressDetail();
|
|
|
|
+ },
|
|
|
|
+ async getProgressDetail() {
|
|
|
|
+ const data = await gradingProgressDetail({
|
|
|
|
+ workId: this.workId,
|
|
|
|
+ subject: this.subject
|
|
|
|
+ });
|
|
|
|
+ this.totalProgress = data.totalProgress;
|
|
|
|
+ this.stepProgress = data.totalProgress.progress.toFixed(2) + "%";
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ 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);
|
|
|
|
+ this.stepName =
|
|
|
|
+ this.curSubject.test === 2
|
|
|
|
+ ? "试评"
|
|
|
|
+ : this.SUBJECT_STAGE[this.curSubject.stage];
|
|
},
|
|
},
|
|
toGrading() {
|
|
toGrading() {
|
|
this.$refs.ModifyFormalGradingTask.open();
|
|
this.$refs.ModifyFormalGradingTask.open();
|