|
@@ -196,15 +196,17 @@ export default {
|
|
|
let originStruct = [];
|
|
|
let group = [];
|
|
|
let curMainId = null;
|
|
|
+ let curQType = null;
|
|
|
paperStructureInfo.forEach(item => {
|
|
|
if (curMainId !== item.mainId) {
|
|
|
curMainId = item.mainId;
|
|
|
- if (group.length) originStruct.push(group.length);
|
|
|
+ curQType = item.qType[0];
|
|
|
+ if (group.length) originStruct.push(`${curQType}${group.length}`);
|
|
|
group = [];
|
|
|
}
|
|
|
group.push(item);
|
|
|
});
|
|
|
- if (group.length) originStruct.push(group.length);
|
|
|
+ if (group.length) originStruct.push(`${curQType}${group.length}`);
|
|
|
return originStruct;
|
|
|
},
|
|
|
dataChange(data) {
|
|
@@ -216,7 +218,12 @@ export default {
|
|
|
const curStruct = this.getPaperStructData(data.paperStructureInfo);
|
|
|
if (curStruct.join("") !== originStruct.join("")) {
|
|
|
data.groupInfo = [];
|
|
|
- this.$message.warning("试卷结构有变动,评卷员将被清空,请重新设置!");
|
|
|
+ this.$notify({
|
|
|
+ title: "警告",
|
|
|
+ message: "试卷结构有变动,评卷员将被清空,请重新设置!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 5000
|
|
|
+ });
|
|
|
} else {
|
|
|
// 更新分组中的试题信息
|
|
|
const paperMap = {};
|
|
@@ -262,8 +269,21 @@ export default {
|
|
|
},
|
|
|
async submit() {
|
|
|
if (this.loading) return;
|
|
|
- this.loading = true;
|
|
|
+ const hasGroupNoPic = this.infos.groupInfo.some(
|
|
|
+ item => !item.pictureConfigList.length
|
|
|
+ );
|
|
|
+ if (hasGroupNoPic) {
|
|
|
+ const confirm = await this.$confirm(
|
|
|
+ `当前评卷员分组中存在没有设置答题区的分组, 确定要提交吗?`,
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ type: "warning"
|
|
|
+ }
|
|
|
+ ).catch(() => {});
|
|
|
+ if (confirm !== "confirm") return;
|
|
|
+ }
|
|
|
|
|
|
+ this.loading = true;
|
|
|
let subjectiveStartPos = this.infos.paperStructureInfo.findIndex(
|
|
|
item => item.qType === "subjective"
|
|
|
);
|