|
@@ -20,7 +20,9 @@
|
|
>道,主观题<span class="mlr-1">{{ subjectiveQuestionCount }}</span
|
|
>道,主观题<span class="mlr-1">{{ subjectiveQuestionCount }}</span
|
|
>道,主观题已全部设置评卷员!
|
|
>道,主观题已全部设置评卷员!
|
|
</p>
|
|
</p>
|
|
- <el-button type="primary" @click="toAdd">新增</el-button>
|
|
|
|
|
|
+ <el-button v-if="!onlyMarker" type="primary" @click="toAdd"
|
|
|
|
+ >新增</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<el-table :data="groupInfo" border>
|
|
<el-table :data="groupInfo" border>
|
|
@@ -37,7 +39,7 @@
|
|
</el-tag>
|
|
</el-tag>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="评卷方式">
|
|
|
|
|
|
+ <el-table-column v-if="!onlyMarker" label="评卷方式">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-radio-group v-model="scope.row.doubleRate">
|
|
<el-radio-group v-model="scope.row.doubleRate">
|
|
<el-radio
|
|
<el-radio
|
|
@@ -67,7 +69,12 @@
|
|
{{ scope.row.questions | questionsFilter }}
|
|
{{ scope.row.questions | questionsFilter }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="评卷区" width="80" align="center">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ v-if="!onlyMarker"
|
|
|
|
+ label="评卷区"
|
|
|
|
+ width="80"
|
|
|
|
+ align="center"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<i
|
|
<i
|
|
v-if="scope.row.pictureConfigList.length"
|
|
v-if="scope.row.pictureConfigList.length"
|
|
@@ -81,13 +88,18 @@
|
|
>编辑</el-button
|
|
>编辑</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="!onlyMarker"
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
type="text"
|
|
type="text"
|
|
:disabled="!paperList.length"
|
|
:disabled="!paperList.length"
|
|
@click="toSetArea(scope.row)"
|
|
@click="toSetArea(scope.row)"
|
|
>评卷区</el-button
|
|
>评卷区</el-button
|
|
>
|
|
>
|
|
- <el-button class="btn-danger" type="text" @click="toDelete(scope.row)"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="!onlyMarker"
|
|
|
|
+ class="btn-danger"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="toDelete(scope.row)"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
@@ -104,6 +116,7 @@
|
|
></modify-marker-question>
|
|
></modify-marker-question>
|
|
<!-- ModifyMarkArea -->
|
|
<!-- ModifyMarkArea -->
|
|
<modify-mark-area
|
|
<modify-mark-area
|
|
|
|
+ v-if="!onlyMarker"
|
|
ref="ModifyMarkArea"
|
|
ref="ModifyMarkArea"
|
|
:base-info="datas.basicPaperInfo"
|
|
:base-info="datas.basicPaperInfo"
|
|
:group="curGroupInfo"
|
|
:group="curGroupInfo"
|
|
@@ -116,7 +129,7 @@
|
|
<script>
|
|
<script>
|
|
import ModifyMarkerQuestion from "./ModifyMarkerQuestion";
|
|
import ModifyMarkerQuestion from "./ModifyMarkerQuestion";
|
|
import ModifyMarkArea from "./ModifyMarkArea.vue";
|
|
import ModifyMarkArea from "./ModifyMarkArea.vue";
|
|
-import { examStructureFindJpg } from "../../api";
|
|
|
|
|
|
+import { examStructureFindJpg, examBindMarker } from "../../api";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "mark-paper-marker",
|
|
name: "mark-paper-marker",
|
|
@@ -131,6 +144,10 @@ export default {
|
|
groupInfo: []
|
|
groupInfo: []
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ onlyMarker: {
|
|
|
|
+ type: Boolean,
|
|
|
|
+ default: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -157,7 +174,7 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.initData();
|
|
this.initData();
|
|
- this.getPaperList();
|
|
|
|
|
|
+ if (!this.onlyMarker) this.getPaperList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async getPaperList() {
|
|
async getPaperList() {
|
|
@@ -178,8 +195,8 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
initData() {
|
|
initData() {
|
|
- this.groupInfo = this.datas.groupInfo.map(item => {
|
|
|
|
- return { ...item };
|
|
|
|
|
|
+ this.groupInfo = this.datas.groupInfo.map((item, index) => {
|
|
|
|
+ return { ...item, groupNumber: index + 1 };
|
|
});
|
|
});
|
|
this.questionCount = this.datas.paperStructureInfo.length;
|
|
this.questionCount = this.datas.paperStructureInfo.length;
|
|
this.updateDisableQuestionIds();
|
|
this.updateDisableQuestionIds();
|
|
@@ -207,6 +224,11 @@ export default {
|
|
this.disabledQuestionIds = disabledQuestionIds;
|
|
this.disabledQuestionIds = disabledQuestionIds;
|
|
if (!filterId) this.groupQuestionCount = disabledQuestionIds.length;
|
|
if (!filterId) this.groupQuestionCount = disabledQuestionIds.length;
|
|
},
|
|
},
|
|
|
|
+ updateGroupNumber() {
|
|
|
|
+ this.groupInfo.forEach((group, index) => {
|
|
|
|
+ group.groupNumber = index + 1;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
toAdd() {
|
|
toAdd() {
|
|
this.updateDisableQuestionIds();
|
|
this.updateDisableQuestionIds();
|
|
if (this.groupQuestionCount === this.subjectiveQuestionCount) {
|
|
if (this.groupQuestionCount === this.subjectiveQuestionCount) {
|
|
@@ -216,6 +238,7 @@ export default {
|
|
|
|
|
|
this.curGroupInfo = {
|
|
this.curGroupInfo = {
|
|
id: this.$randomCode(),
|
|
id: this.$randomCode(),
|
|
|
|
+ groupNumber: null,
|
|
markerList: [],
|
|
markerList: [],
|
|
doubleRate: 0,
|
|
doubleRate: 0,
|
|
arbitrateThreshold: 1,
|
|
arbitrateThreshold: 1,
|
|
@@ -237,6 +260,7 @@ export default {
|
|
const pos = this.groupInfo.findIndex(item => item.id === row.id);
|
|
const pos = this.groupInfo.findIndex(item => item.id === row.id);
|
|
this.groupInfo.splice(pos, 1);
|
|
this.groupInfo.splice(pos, 1);
|
|
this.updateDisableQuestionIds();
|
|
this.updateDisableQuestionIds();
|
|
|
|
+ this.updateGroupNumber();
|
|
},
|
|
},
|
|
groupModified(row) {
|
|
groupModified(row) {
|
|
const pos = this.groupInfo.findIndex(item => item.id === row.id);
|
|
const pos = this.groupInfo.findIndex(item => item.id === row.id);
|
|
@@ -246,6 +270,18 @@ export default {
|
|
this.groupInfo.splice(pos, 1, row);
|
|
this.groupInfo.splice(pos, 1, row);
|
|
}
|
|
}
|
|
this.updateDisableQuestionIds();
|
|
this.updateDisableQuestionIds();
|
|
|
|
+ this.updateGroupNumber();
|
|
|
|
+
|
|
|
|
+ if (this.onlyMarker) {
|
|
|
|
+ this.updateGroupMarker(row);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async updateGroupMarker(group) {
|
|
|
|
+ console.log(group);
|
|
|
|
+ await examBindMarker({
|
|
|
|
+ paperStructureId: this.datas.basicPaperInfo.id,
|
|
|
|
+ groupInfo: group
|
|
|
|
+ });
|
|
},
|
|
},
|
|
areaModified(row) {
|
|
areaModified(row) {
|
|
const pos = this.groupInfo.findIndex(item => item.id === row.id);
|
|
const pos = this.groupInfo.findIndex(item => item.id === row.id);
|