|
@@ -77,15 +77,15 @@
|
|
|
></el-input-number>
|
|
|
<span class="ml-1">%</span>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="pictureConfig" label="原图遮盖:">
|
|
|
+ <el-form-item prop="sheetConfig" label="原图遮盖:">
|
|
|
<el-button
|
|
|
class="btn-act-primary"
|
|
|
type="text"
|
|
|
- @click="toSetPictureConfig"
|
|
|
+ @click="toSetSheetConfig"
|
|
|
>设置</el-button
|
|
|
>
|
|
|
<i
|
|
|
- v-if="modalForm.pictureConfig.length"
|
|
|
+ v-if="modalForm.sheetConfig.length"
|
|
|
class="el-icon-success color-success ml-1"
|
|
|
></i>
|
|
|
</el-form-item>
|
|
@@ -101,7 +101,7 @@
|
|
|
<!-- ModifyPaperArea -->
|
|
|
<modify-paper-area
|
|
|
ref="ModifyPaperArea"
|
|
|
- :areaConfigs="modalForm.pictureConfig"
|
|
|
+ :areaConfigs="modalForm.sheetConfig"
|
|
|
:paperList="paperList"
|
|
|
@modified="areaModified"
|
|
|
></modify-paper-area>
|
|
@@ -129,7 +129,7 @@ const initModalForm = {
|
|
|
autoScroll: "",
|
|
|
passScore: 60,
|
|
|
excellentScore: 80,
|
|
|
- pictureConfig: [],
|
|
|
+ sheetConfig: [],
|
|
|
};
|
|
|
|
|
|
export default {
|
|
@@ -214,7 +214,8 @@ export default {
|
|
|
this.modalForm.markStartTime || undefined,
|
|
|
this.modalForm.markEndTime || undefined,
|
|
|
];
|
|
|
- this.modalForm.pictureConfig = this.modalForm.pictureConfig || [];
|
|
|
+ const sheetConfig = res.sheetConfig || "[]";
|
|
|
+ this.modalForm.sheetConfig = JSON.parse(sheetConfig);
|
|
|
this.modalForm.passScore = this.modalForm.passScore || 60;
|
|
|
this.modalForm.excellentScore = this.modalForm.excellentScore || 80;
|
|
|
},
|
|
@@ -237,9 +238,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
areaModified(areas) {
|
|
|
- this.modalForm.pictureConfig = areas;
|
|
|
+ this.modalForm.sheetConfig = areas;
|
|
|
},
|
|
|
- toSetPictureConfig() {
|
|
|
+ toSetSheetConfig() {
|
|
|
this.$refs.ModifyPaperArea.open();
|
|
|
},
|
|
|
async submit() {
|
|
@@ -248,11 +249,13 @@ export default {
|
|
|
|
|
|
if (this.isSubmit) return;
|
|
|
this.isSubmit = true;
|
|
|
- const data = await markSettingSave(this.modalForm).catch(() => {
|
|
|
+ const data = { ...this.modalForm };
|
|
|
+ data.sheetConfig = JSON.stringify(data.sheetConfig);
|
|
|
+ const res = await markSettingSave(data).catch(() => {
|
|
|
this.isSubmit = false;
|
|
|
});
|
|
|
|
|
|
- if (!data) return;
|
|
|
+ if (!res) return;
|
|
|
|
|
|
this.isSubmit = false;
|
|
|
this.$message.success("修改成功!");
|