zhangjie 3 лет назад
Родитель
Сommit
be6127f35a

+ 65 - 66
src/assets/styles/pages.scss

@@ -857,7 +857,6 @@
     > span {
       color: $--color-danger;
       font-weight: 600;
-      font-size: 16px;
       margin: 0 2px;
     }
   }
@@ -943,91 +942,91 @@
   .el-dialog__footer {
     display: none;
   }
-  .area-cropper {
-    position: relative;
-    border: 1px solid #e0e0e0;
-    background-color: #fff;
-    margin: 10px 0;
+}
+.area-cropper {
+  position: relative;
+  border: 1px solid #e0e0e0;
+  background-color: #fff;
+  margin: 10px 0;
 
-    .cropper-img img {
-      display: block;
-      width: 100%;
-      height: auto;
-    }
-    .cropper-areas {
-      position: absolute;
-      top: 0;
-      left: 0;
-      right: 0;
-      bottom: 0;
-      z-index: 9;
-    }
+  .cropper-img img {
+    display: block;
+    width: 100%;
+    height: auto;
+  }
+  .cropper-areas {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    z-index: 9;
+  }
 
-    .area-selection {
-      position: absolute;
-      z-index: 999;
-      border: 1px solid $--color-blue;
-      background-color: rgba($color: #000000, $alpha: 0.2);
-    }
+  .area-selection {
+    position: absolute;
+    z-index: 999;
+    border: 1px solid $--color-blue;
+    background-color: rgba($color: #000000, $alpha: 0.2);
+  }
 
-    .element-item-body {
-      position: absolute;
-      background-color: rgba($color: #000000, $alpha: 0.2);
+  .element-item-body {
+    position: absolute;
+    background-color: rgba($color: #000000, $alpha: 0.2);
+  }
+
+  .element-resize {
+    background-color: transparent;
+    > .resize-control {
+      > .control-point,
+      > .control-line {
+        display: none;
+      }
     }
 
-    .element-resize {
-      background-color: transparent;
+    &:hover {
       > .resize-control {
-        > .control-point,
         > .control-line {
-          display: none;
+          display: block;
         }
       }
+    }
 
-      &:hover {
-        > .resize-control {
-          > .control-line {
-            display: block;
-          }
+    &-act {
+      > .resize-control {
+        > .control-point,
+        > .control-line {
+          display: block;
         }
       }
-
-      &-act {
-        > .resize-control {
-          > .control-point,
-          > .control-line {
-            display: block;
-          }
-        }
+    }
+  }
+  .element-resize-compact {
+    > .resize-control {
+      > .control-line {
+        display: block;
       }
     }
-    .element-resize-compact {
+
+    &:hover {
       > .resize-control {
         > .control-line {
-          display: block;
+          border-color: $--color-primary;
         }
       }
+    }
 
-      &:hover {
-        > .resize-control {
-          > .control-line {
-            border-color: #4794b3;
+    &.element-resize-act {
+      > .resize-control {
+        > .control-line {
+          border-color: $--color-primary;
+          &-left,
+          &-right {
+            border-left-style: solid;
           }
-        }
-      }
-
-      &.element-resize-act {
-        > .resize-control {
-          > .control-line {
-            border-color: #4794b3;
-            &-left,
-            &-right {
-              border-left-style: solid;
-            }
-            &-top,
-            &-bottom {
-              border-top-style: solid;
-            }
+          &-top,
+          &-bottom {
+            border-top-style: solid;
           }
         }
       }

+ 0 - 1
src/modules/stmms/components/markParam/MarkPaperMarker.vue

@@ -245,7 +245,6 @@ export default {
 
       if (errorMessages.length) {
         this.$message.error(errorMessages.join("。"));
-        this.$emit("on-ready");
         return;
       }
 

+ 24 - 4
src/modules/stmms/components/markParam/ModifyMarkParams.vue

@@ -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"
       );

+ 2 - 0
src/modules/stmms/components/markParam/areaCropper/AreaCropper.vue

@@ -179,6 +179,8 @@ export default {
     removeArea(area) {
       const pos = this.areas.findIndex(elem => elem.id === area.id);
       this.areas.splice(pos, 1);
+      if (this.areas.length) this.actCurArea(this.areas[0]);
+      this.emitChange();
     },
     actCurArea(area) {
       this.curArea = area;

+ 5 - 5
src/modules/stmms/components/markParam/areaCropper/ElementResize.vue

@@ -487,7 +487,7 @@ export default {
     width: 8px;
     height: 8px;
     border-radius: 50%;
-    background: #00a2fe;
+    background: #3a5ae5;
     z-index: 99;
     &-l {
       left: 0;
@@ -623,25 +623,25 @@ export default {
       height: 100%;
       left: -1px;
       top: 0;
-      border-left: 1px solid #4794b3;
+      border-left: 1px solid #3a5ae5;
     }
     &-right {
       height: 100%;
       right: -1px;
       top: 0;
-      border-left: 1px solid #4794b3;
+      border-left: 1px solid #3a5ae5;
     }
     &-top {
       width: 100%;
       left: 0;
       top: -1px;
-      border-top: 1px solid #4794b3;
+      border-top: 1px solid #3a5ae5;
     }
     &-bottom {
       width: 100%;
       left: 0;
       bottom: -1px;
-      border-top: 1px solid #4794b3;
+      border-top: 1px solid #3a5ae5;
     }
   }