|
@@ -9,13 +9,7 @@
|
|
|
<p class="tips-info tips-error">3.开始阅卷后不允许删除评卷分组!</p>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span
|
|
|
- ><i class="el-icon-success color-success"></i>评卷参数提交成功!</span
|
|
|
- >
|
|
|
- <span
|
|
|
- ><i class="el-icon-success color-danger"></i>
|
|
|
- 评卷参数同步阅卷模块失败!</span
|
|
|
- >
|
|
|
+ <mark-status field="group"></mark-status>
|
|
|
<el-button type="primary" @click="toAdd">新增</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -98,50 +92,15 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="mb-2">
|
|
|
- <span>分班阅卷:</span>
|
|
|
- <el-switch
|
|
|
- v-model="openClassReading"
|
|
|
- @change="openClassReadingChange"
|
|
|
- ></el-switch>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div v-if="openClassReading" class="part-box part-box-pad">
|
|
|
- <el-table :data="markerClassList" border>
|
|
|
- <el-table-column type="index" width="50"> </el-table-column>
|
|
|
- <el-table-column label="评卷员" width="200">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag class="tag-spin" size="medium">
|
|
|
- {{ scope.row.name }}({{ scope.row.orgName }})
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="评卷班级">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag
|
|
|
- v-for="item in scope.row.className"
|
|
|
- :key="item"
|
|
|
- size="medium"
|
|
|
- type="info"
|
|
|
- class="mb-1 mr-1"
|
|
|
- >
|
|
|
- {{ item }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column class-name="action-column" label="操作" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- class="btn-primary"
|
|
|
- type="text"
|
|
|
- @click="toEditClass(scope.row)"
|
|
|
- >选择班级</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
+ <mark-paper-class
|
|
|
+ v-if="checkPrivilege('button', 'OpenClassReading') && dataReady"
|
|
|
+ ref="MarkPaperClass"
|
|
|
+ :datas="{
|
|
|
+ groupInfo,
|
|
|
+ classInfo: datas.classInfo,
|
|
|
+ basicPaperInfo: datas.basicPaperInfo,
|
|
|
+ }"
|
|
|
+ ></mark-paper-class>
|
|
|
|
|
|
<!-- ModifyMarkerQuestion -->
|
|
|
<modify-marker-question
|
|
@@ -160,30 +119,25 @@
|
|
|
:paper-list="paperList"
|
|
|
@modified="areaModified"
|
|
|
></modify-mark-area>
|
|
|
- <!-- SelectClassByCourse -->
|
|
|
- <select-class-by-course
|
|
|
- ref="SelectClassByCourse"
|
|
|
- :filter-data="{
|
|
|
- examId: datas.basicPaperInfo.examId,
|
|
|
- paperNumber: datas.basicPaperInfo.paperNumber,
|
|
|
- }"
|
|
|
- :selected-ids="selectedClassIds"
|
|
|
- :disable-ids="disabledClassIds"
|
|
|
- @confirm="classSelected"
|
|
|
- ></select-class-by-course>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import MarkStatus from "./MarkStatus.vue";
|
|
|
import ModifyMarkerQuestion from "./ModifyMarkerQuestion.vue";
|
|
|
import ModifyMarkArea from "./ModifyMarkArea.vue";
|
|
|
-import SelectClassByCourse from "../SelectClassByCourse.vue";
|
|
|
+import markPaperClass from "./markPaperClass.vue";
|
|
|
import { examStructureFindJpg } from "../../api";
|
|
|
import { cardDetail } from "../../../card/api";
|
|
|
|
|
|
export default {
|
|
|
name: "mark-paper-group",
|
|
|
- components: { ModifyMarkerQuestion, ModifyMarkArea, SelectClassByCourse },
|
|
|
+ components: {
|
|
|
+ ModifyMarkerQuestion,
|
|
|
+ ModifyMarkArea,
|
|
|
+ MarkStatus,
|
|
|
+ markPaperClass,
|
|
|
+ },
|
|
|
props: {
|
|
|
datas: {
|
|
|
type: Object,
|
|
@@ -213,13 +167,7 @@ export default {
|
|
|
},
|
|
|
paperList: [],
|
|
|
cardPages: [],
|
|
|
- // 分班阅卷
|
|
|
- openClassReading: false,
|
|
|
- markerClassList: [],
|
|
|
- curMarkClass: {},
|
|
|
- selectedClassIds: [],
|
|
|
- disabledClassIds: [],
|
|
|
- casheMarkerClass: {},
|
|
|
+ dataReady: false,
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
@@ -271,18 +219,7 @@ export default {
|
|
|
this.objectiveQuestionCount =
|
|
|
this.questionCount - this.subjectiveQuestionCount;
|
|
|
|
|
|
- this.openClassReading = this.datas.basicPaperInfo.openClassReading;
|
|
|
-
|
|
|
- if (this.openClassReading) {
|
|
|
- this.markerClassList = this.datas.classInfo.map((item) => {
|
|
|
- let nitem = { ...item };
|
|
|
- nitem.className = nitem.className.split(",");
|
|
|
- return nitem;
|
|
|
- });
|
|
|
- this.updateCasheMarkerClass();
|
|
|
- this.initMarkerClassList();
|
|
|
- }
|
|
|
-
|
|
|
+ this.dataReady = true;
|
|
|
this.$emit("on-ready");
|
|
|
},
|
|
|
updateDisableQuestionIds(filterId) {
|
|
@@ -352,9 +289,7 @@ export default {
|
|
|
this.updateGroupNumber();
|
|
|
|
|
|
// 分班阅卷相关
|
|
|
- if (!this.openClassReading) return;
|
|
|
- this.updateCasheMarkerClass();
|
|
|
- this.initMarkerClassList();
|
|
|
+ this.$refs.MarkPaperClass && this.$refs.MarkPaperClass.groupChange();
|
|
|
},
|
|
|
autoParsePictureConfigList(questions) {
|
|
|
if (!questions.length) return [];
|
|
@@ -444,46 +379,6 @@ export default {
|
|
|
if (pos === -1) return;
|
|
|
this.groupInfo.splice(pos, 1, row);
|
|
|
},
|
|
|
- // 分班阅卷 --->
|
|
|
- openClassReadingChange(val) {
|
|
|
- if (val) {
|
|
|
- this.initMarkerClassList();
|
|
|
- } else {
|
|
|
- this.updateCasheMarkerClass();
|
|
|
- this.markerClassList = [];
|
|
|
- }
|
|
|
- },
|
|
|
- initMarkerClassList() {
|
|
|
- let markerClassList = [];
|
|
|
- this.groupInfo.forEach((group) => {
|
|
|
- group.markerList.forEach((marker) => {
|
|
|
- markerClassList.push({
|
|
|
- id: marker.id,
|
|
|
- loginName: marker.loginName,
|
|
|
- name: marker.name,
|
|
|
- orgName: marker.orgName,
|
|
|
- className: this.casheMarkerClass[marker.id] || [],
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- this.markerClassList = markerClassList;
|
|
|
- },
|
|
|
- updateCasheMarkerClass() {
|
|
|
- let casheMarkerClass = {};
|
|
|
- this.markerClassList.forEach((item) => {
|
|
|
- casheMarkerClass[item.id] = item.className;
|
|
|
- });
|
|
|
- this.casheMarkerClass = casheMarkerClass;
|
|
|
- },
|
|
|
- toEditClass(row) {
|
|
|
- this.curMarkClass = row;
|
|
|
- this.selectedClassIds = row.className;
|
|
|
- this.$refs.SelectClassByCourse.open();
|
|
|
- },
|
|
|
- classSelected(className) {
|
|
|
- this.curMarkClass.className = className;
|
|
|
- },
|
|
|
- // 分班阅卷 end --->
|
|
|
checkData() {
|
|
|
let errorMessages = [];
|
|
|
|
|
@@ -497,12 +392,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- if (this.openClassReading) {
|
|
|
- this.markerClassList.forEach((item) => {
|
|
|
- if (!item.className.length) {
|
|
|
- errorMessages.push(`评卷员${item.name}的阅卷班级没有设置`);
|
|
|
- }
|
|
|
- });
|
|
|
+ if (this.$refs.MarkPaperClass) {
|
|
|
+ errorMessages.push(...this.$refs.MarkPaperClass.checkData());
|
|
|
}
|
|
|
|
|
|
if (errorMessages.length) {
|
|
@@ -514,19 +405,21 @@ export default {
|
|
|
this.$emit("next-step");
|
|
|
},
|
|
|
getData() {
|
|
|
- return {
|
|
|
+ let data = {
|
|
|
groupInfo: this.groupInfo.map((item) => {
|
|
|
return { ...item };
|
|
|
}),
|
|
|
- basicPaperInfo: Object.assign(this.datas.basicPaperInfo, {
|
|
|
- openClassReading: this.openClassReading,
|
|
|
- }),
|
|
|
- classInfo: this.markerClassList.map((item) => {
|
|
|
- let nitem = { ...item };
|
|
|
- nitem.className = item.className.join();
|
|
|
- return nitem;
|
|
|
- }),
|
|
|
};
|
|
|
+
|
|
|
+ if (this.$refs.MarkPaperClass) {
|
|
|
+ const { openClassReading, classInfo } =
|
|
|
+ this.$refs.MarkPaperClass.getData();
|
|
|
+ data.classInfo = classInfo;
|
|
|
+ data.basicPaperInfo = Object.assign(this.datas.basicPaperInfo, {
|
|
|
+ openClassReading,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return data;
|
|
|
},
|
|
|
updateData() {
|
|
|
this.$emit("data-change", this.getData());
|