zhangjie преди 1 година
родител
ревизия
f845227830
променени са 3 файла, в които са добавени 16 реда и са изтрити 13 реда
  1. 1 1
      src/modules/exam/views/ActionLogManage.vue
  2. 13 10
      src/modules/mark/components/ModifyMarkSetting.vue
  3. 2 2
      src/modules/stmms/views/SyncManage.vue

+ 1 - 1
src/modules/exam/views/ActionLogManage.vue

@@ -130,7 +130,7 @@ export default {
       const data = res || [];
       this.OPERATION_TYPE = {};
       data.forEach((item) => {
-        this.OPERATION_TYPE[item.name] = item.desc;
+        this.OPERATION_TYPE[item.code] = item.name;
       });
     },
     async getList() {

+ 13 - 10
src/modules/mark/components/ModifyMarkSetting.vue

@@ -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("修改成功!");

+ 2 - 2
src/modules/stmms/views/SyncManage.vue

@@ -224,7 +224,7 @@ export default {
       const data = res || [];
       this.STMMS_SYNC_TYPE = {};
       data.forEach((item) => {
-        this.STMMS_SYNC_TYPE[item.name] = item.desc;
+        this.STMMS_SYNC_TYPE[item.code] = item.name;
       });
     },
     async getSyncStatus() {
@@ -232,7 +232,7 @@ export default {
       const data = res || [];
       this.STMMS_SYNC_STATUS = {};
       data.forEach((item) => {
-        this.STMMS_SYNC_STATUS[item.name] = item.desc;
+        this.STMMS_SYNC_STATUS[item.code] = item.name;
       });
     },
     async getList() {