|
@@ -140,6 +140,7 @@ export default {
|
|
|
...mapMutations("markParam", ["setOpenClassMark"]),
|
|
|
async initData() {
|
|
|
this.classMarkIsOpen = this.openClassMark;
|
|
|
+ if (!this.classMarkIsOpen) return;
|
|
|
|
|
|
const params = {
|
|
|
examId: this.basicInfo.examId,
|
|
@@ -150,7 +151,7 @@ export default {
|
|
|
this.classList = res.classNames || [];
|
|
|
|
|
|
this.updateUnsignData();
|
|
|
- this.updateCacheDataMd5();
|
|
|
+ this.cacheDataMd5 = this.getSubmitDataMd5();
|
|
|
},
|
|
|
resetData() {
|
|
|
this.dataList = [];
|
|
@@ -159,7 +160,7 @@ export default {
|
|
|
this.unsignData = [];
|
|
|
this.cacheDataMd5 = "";
|
|
|
},
|
|
|
- updateCacheDataMd5() {
|
|
|
+ getSubmitDataMd5() {
|
|
|
this.cacheDataMd5 = MD5(JSON.stringify(this.dataList));
|
|
|
},
|
|
|
async markClassChange() {
|
|
@@ -254,13 +255,13 @@ export default {
|
|
|
}).catch(() => {});
|
|
|
if (!res) return;
|
|
|
this.$message.success("保存成功!");
|
|
|
- this.updateCacheDataMd5();
|
|
|
+ this.cacheDataMd5 = this.getSubmitDataMd5();
|
|
|
return true;
|
|
|
},
|
|
|
async toPrev(step = 1) {
|
|
|
if (
|
|
|
!this.classMarkIsOpen ||
|
|
|
- this.cacheDataMd5 === MD5(JSON.stringify(this.dataList))
|
|
|
+ this.cacheDataMd5 === this.getSubmitDataMd5()
|
|
|
) {
|
|
|
this.$emit("prev", step);
|
|
|
return;
|
|
@@ -283,6 +284,14 @@ export default {
|
|
|
this.$emit("prev", step);
|
|
|
},
|
|
|
async toNext(step = 1) {
|
|
|
+ if (
|
|
|
+ !this.classMarkIsOpen ||
|
|
|
+ this.cacheDataMd5 === this.getSubmitDataMd5()
|
|
|
+ ) {
|
|
|
+ this.$emit("next", step);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
const res = await this.submit();
|
|
|
if (!res) return;
|
|
|
this.$emit("next", step);
|