|
@@ -15,7 +15,11 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="part-box part-box-pad">
|
|
<div class="part-box part-box-pad">
|
|
- <el-table :data="subjectiveTaskList" border>
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ :data="subjectiveTaskList"
|
|
|
|
+ border
|
|
|
|
+ :span-method="openMergeMarker ? objectSpanMethod : undefined"
|
|
|
|
+ >
|
|
<el-table-column label="大题名称" prop="mainTitle"> </el-table-column>
|
|
<el-table-column label="大题名称" prop="mainTitle"> </el-table-column>
|
|
<el-table-column label="大题号" prop="mainNumber"> </el-table-column>
|
|
<el-table-column label="大题号" prop="mainNumber"> </el-table-column>
|
|
<el-table-column label="小题号" prop="subNumber"> </el-table-column>
|
|
<el-table-column label="小题号" prop="subNumber"> </el-table-column>
|
|
@@ -137,7 +141,6 @@ export default {
|
|
SCORE_POLICY_TYPE,
|
|
SCORE_POLICY_TYPE,
|
|
questionCount: 0,
|
|
questionCount: 0,
|
|
curRow: {},
|
|
curRow: {},
|
|
- subjectiveQuestionList: [],
|
|
|
|
curRowQuestions: [],
|
|
curRowQuestions: [],
|
|
MARK_TYPE: {
|
|
MARK_TYPE: {
|
|
0: "单评",
|
|
0: "单评",
|
|
@@ -145,8 +148,7 @@ export default {
|
|
},
|
|
},
|
|
paperList: [],
|
|
paperList: [],
|
|
cardPages: [],
|
|
cardPages: [],
|
|
- dataReady: false,
|
|
|
|
- deleting: false,
|
|
|
|
|
|
+ fillQuestionRanges: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -158,7 +160,7 @@ export default {
|
|
]),
|
|
]),
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.initData();
|
|
|
|
|
|
+ this.initFillQuestionRanges();
|
|
this.getPaperList();
|
|
this.getPaperList();
|
|
this.getCardPages();
|
|
this.getCardPages();
|
|
},
|
|
},
|
|
@@ -189,43 +191,90 @@ export default {
|
|
const cardContent = JSON.parse(detData.content);
|
|
const cardContent = JSON.parse(detData.content);
|
|
this.cardPages = cardContent.pages;
|
|
this.cardPages = cardContent.pages;
|
|
},
|
|
},
|
|
- initData() {
|
|
|
|
- this.questionCount = this.paperStructureInfo.length;
|
|
|
|
- this.subjectiveQuestionList = this.paperStructureInfo
|
|
|
|
- .filter((item) => !item.objective)
|
|
|
|
- .map((item) => {
|
|
|
|
|
|
+ initFillQuestionRanges() {
|
|
|
|
+ if (!this.openMergeMarker) return;
|
|
|
|
+
|
|
|
|
+ const qRangeDict = {};
|
|
|
|
+ this.fillQuestionRanges = this.subjectiveTaskList.map((item, index) => {
|
|
|
|
+ if (item.questionType !== 3) return;
|
|
|
|
+
|
|
|
|
+ if (qRangeDict[item.mainNumber]) {
|
|
|
|
+ qRangeDict[item.mainNumber].push(index);
|
|
|
|
+ } else {
|
|
|
|
+ qRangeDict[item.mainNumber] = [index];
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.fillQuestionRanges = Object.values(qRangeDict);
|
|
|
|
+ },
|
|
|
|
+ objectSpanMethod({ rowIndex, columnIndex }) {
|
|
|
|
+ // 第四列为评卷员
|
|
|
|
+ if (columnIndex === 3) {
|
|
|
|
+ const pos = this.fillQuestionRanges.findIndex((item) =>
|
|
|
|
+ item.includes(rowIndex)
|
|
|
|
+ );
|
|
|
|
+ if (pos === -1) return;
|
|
|
|
+ const range = this.fillQuestionRanges[pos];
|
|
|
|
+ if (range[0] === rowIndex) {
|
|
return {
|
|
return {
|
|
- ...item,
|
|
|
|
- qno: `${item.mainNumber}-${item.subNumber}`,
|
|
|
|
|
|
+ rowspan: range.length,
|
|
|
|
+ colspan: 1,
|
|
};
|
|
};
|
|
- });
|
|
|
|
- this.subjectiveQuestionCount = this.subjectiveQuestionList.length;
|
|
|
|
- this.objectiveQuestionCount =
|
|
|
|
- this.questionCount - this.subjectiveQuestionCount;
|
|
|
|
-
|
|
|
|
- this.dataReady = true;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ return {
|
|
|
|
+ rowspan: 0,
|
|
|
|
+ colspan: 0,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
toSetMarker(row) {
|
|
toSetMarker(row) {
|
|
this.curRow = row;
|
|
this.curRow = row;
|
|
- this.curRowQuestions = [
|
|
|
|
- {
|
|
|
|
- mainNumber: row.mainNumber,
|
|
|
|
- subNumber: row.subNumber,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
|
|
+
|
|
|
|
+ if (this.openMergeMarker && row.questionType === 3) {
|
|
|
|
+ // 填空题按大题批量处理
|
|
|
|
+ const pos = this.subjectiveTaskList.findIndex(
|
|
|
|
+ (item) => item.questionId === row.questionId
|
|
|
|
+ );
|
|
|
|
+ if (pos === -1) return;
|
|
|
|
+ const range = this.fillQuestionRanges.find((item) =>
|
|
|
|
+ item.includes(pos)
|
|
|
|
+ );
|
|
|
|
+ if (!range) return;
|
|
|
|
+ this.curRowQuestions = range.map((index) => {
|
|
|
|
+ const item = this.subjectiveTaskList[index];
|
|
|
|
+ return {
|
|
|
|
+ questionId: item.questionId,
|
|
|
|
+ mainNumber: item.mainNumber,
|
|
|
|
+ subNumber: item.subNumber,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ // 非填空题按单题处理
|
|
|
|
+ this.curRowQuestions = [
|
|
|
|
+ {
|
|
|
|
+ questionId: row.questionId,
|
|
|
|
+ mainNumber: row.mainNumber,
|
|
|
|
+ subNumber: row.subNumber,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+
|
|
this.$refs.ModifyMarkMarker.open();
|
|
this.$refs.ModifyMarkMarker.open();
|
|
},
|
|
},
|
|
async markMarkerModified(row) {
|
|
async markMarkerModified(row) {
|
|
- const datas = {
|
|
|
|
- questionId: row.questionId,
|
|
|
|
- markers: row.markers,
|
|
|
|
- };
|
|
|
|
await markSubjectiveBindMarker({
|
|
await markSubjectiveBindMarker({
|
|
examId: this.basicInfo.examId,
|
|
examId: this.basicInfo.examId,
|
|
paperNumber: this.basicInfo.paperNumber,
|
|
paperNumber: this.basicInfo.paperNumber,
|
|
- ...datas,
|
|
|
|
|
|
+ questionId: this.curRowQuestions.map((item) => item.questionId),
|
|
|
|
+ markers: row.markers,
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ this.curRowQuestions.forEach((item) => {
|
|
|
|
+ this.updateSubjectiveTaskItem({
|
|
|
|
+ questionId: item.questionId,
|
|
|
|
+ markers: row.markers,
|
|
|
|
+ });
|
|
});
|
|
});
|
|
- this.updateSubjectiveTaskItem(datas);
|
|
|
|
},
|
|
},
|
|
toSetArea(row) {
|
|
toSetArea(row) {
|
|
this.curRow = row;
|
|
this.curRow = row;
|