|
@@ -116,11 +116,26 @@ const initModalForm = {
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "data-check-dialog",
|
|
name: "data-check-dialog",
|
|
|
|
+ props: {
|
|
|
|
+ model: {
|
|
|
|
+ type: String,
|
|
|
|
+ default: "undo",
|
|
|
|
+ validate: val => ["undo", "fix"].includes(val)
|
|
|
|
+ },
|
|
|
|
+ student: {
|
|
|
|
+ type: Object,
|
|
|
|
+ default() {
|
|
|
|
+ return {
|
|
|
|
+ pages: []
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
components: { ImageContain },
|
|
components: { ImageContain },
|
|
mixins: [timeMixin],
|
|
mixins: [timeMixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- modalIsShow: true,
|
|
|
|
|
|
+ modalIsShow: false,
|
|
studentNameOrNo: "",
|
|
studentNameOrNo: "",
|
|
modalForm: { ...initModalForm },
|
|
modalForm: { ...initModalForm },
|
|
rules: {
|
|
rules: {
|
|
@@ -160,10 +175,26 @@ export default {
|
|
curPage: { url: "" }
|
|
curPage: { url: "" }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ IS_UNDO_MODEL() {
|
|
|
|
+ return this.model === "undo";
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
- visibleChange() {
|
|
|
|
|
|
+ async visibleChange() {
|
|
this.modalForm = { ...initModalForm };
|
|
this.modalForm = { ...initModalForm };
|
|
this.studentNameOrNo = "";
|
|
this.studentNameOrNo = "";
|
|
|
|
+ this.donePageList = [];
|
|
|
|
+ this.undoPageList = [];
|
|
|
|
+
|
|
|
|
+ if (this.IS_UNDO_MODEL) {
|
|
|
|
+ await this.getUndoPageList();
|
|
|
|
+ } else {
|
|
|
|
+ this.undoPageList = this.student.pages;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.curPages = this.undoPageList.shift();
|
|
|
|
+ this.switchCurPage(0);
|
|
},
|
|
},
|
|
cancel() {
|
|
cancel() {
|
|
this.modalIsShow = false;
|
|
this.modalIsShow = false;
|
|
@@ -202,10 +233,15 @@ export default {
|
|
this.undoPageList.push(...data.records);
|
|
this.undoPageList.push(...data.records);
|
|
},
|
|
},
|
|
toNextPaper() {
|
|
toNextPaper() {
|
|
- if (this.undoPageList.length <= 3) this.getUndoPageList();
|
|
|
|
|
|
+ if (!this.undoPageList.length) {
|
|
|
|
+ this.$message.error("没有下一张!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
|
|
- this.donePageList.push({ ...this.curPages });
|
|
|
|
|
|
+ if (this.undoPageList.length <= 3 && this.IS_UNDO_MODEL)
|
|
|
|
+ this.getUndoPageList();
|
|
|
|
|
|
|
|
+ this.donePageList.push({ ...this.curPages });
|
|
this.curPages = this.undoPageList.shift();
|
|
this.curPages = this.undoPageList.shift();
|
|
this.switchCurPage(0);
|
|
this.switchCurPage(0);
|
|
},
|
|
},
|