zhangjie 1 жил өмнө
parent
commit
d7c4d646eb

+ 12 - 0
src/assets/icons/icon-down-active.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-向下</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="01-评卷" transform="translate(-1351, -402)">
+            <g id="icon-向下" transform="translate(1358, 409) scale(1, -1) translate(-1358, -409)translate(1351, 402)">
+                <polygon id="矩形" opacity="0" transform="translate(7, 7) rotate(-180) translate(-7, -7)" points="14.0000007 5.24536636e-07 14.0000007 14.0000005 6.99382197e-07 14.0000005 6.99382197e-07 5.24536636e-07"></polygon>
+                <polygon id="路径-4-(Stroke)" fill="#165DFF" transform="translate(7, 6.7989) rotate(-180) translate(-7, -6.7989)" points="3.902172 4.44564553 7.00000513 7.54347845 10.097838 4.44564553 10.9021722 5.24997948 7.00000513 9.15214636 3.09783804 5.24997948"></polygon>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/icons/icon-drag-active.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-拖动</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="01-评卷" transform="translate(-1253, -402)">
+            <g id="icon-拖动" transform="translate(1253, 402)">
+                <rect id="view-list-(Background)" opacity="0" x="0" y="0" width="14" height="14"></rect>
+                <path d="M1.75,3.9375 L1.75,3.0625 L12.25,3.0625 L12.25,3.9375 L1.75,3.9375 Z M1.75,7.4375 L1.75,6.5625 L12.25,6.5625 L12.25,7.4375 L1.75,7.4375 Z M12.25,10.9375 L12.25,10.0625 L1.75,10.0625 L1.75,10.9375 L12.25,10.9375 Z" id="view-list" fill="#165DFF"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/icons/icon-up-active.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>icon-向上</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="01-评卷" transform="translate(-1155, -402)">
+            <g id="icon-向上" transform="translate(1155, 402)">
+                <polygon id="矩形" opacity="0" transform="translate(7, 7) rotate(-180) translate(-7, -7)" points="14.0000007 5.24536693e-07 14.0000007 14.0000005 6.99382225e-07 14.0000005 6.99382225e-07 5.24536693e-07"></polygon>
+                <polygon id="路径-4-(Stroke)" fill="#165DFF" transform="translate(7, 6.7989) rotate(-180) translate(-7, -6.7989)" points="3.902172 4.44564553 7.00000513 7.54347845 10.097838 4.44564553 10.9021722 5.24997948 7.00000513 9.15214636 3.09783804 5.24997948"></polygon>
+            </g>
+        </g>
+    </g>
+</svg>

+ 9 - 3
src/components/QmDialog.vue

@@ -48,6 +48,8 @@ const {
   zIndex = 1020,
   enableResize = true,
   fixedWidth = false,
+  minWidth = 200,
+  minHeight = 400,
   customClass = "",
 } = defineProps<{
   title: string;
@@ -57,6 +59,8 @@ const {
   zIndex?: number;
   enableResize?: boolean;
   fixedWidth?: boolean;
+  minWidth?: number;
+  minHeight?: number;
   customClass?: string;
 }>();
 
@@ -139,10 +143,12 @@ const handleResizeMouseMove = (e: MouseEvent) => {
   const { clientX, clientY } = e;
   const newXRatio = clientX - mousePosition.offsetX;
   const newYRatio = clientY - mousePosition.offsetY;
-  positionStyle.width = fixedWidth
+  const positionStyleWidth = fixedWidth
     ? width
-    : parseFloat(positionStyle.width) + newXRatio + "px";
-  positionStyle.height = parseFloat(positionStyle.height) + newYRatio + "px";
+    : parseFloat(positionStyle.width) + newXRatio;
+  positionStyle.width = Math.max(positionStyleWidth, minWidth) + "px";
+  const positionStyleHeight = parseFloat(positionStyle.height) + newYRatio;
+  positionStyle.height = Math.max(positionStyleHeight, minHeight) + "px";
 
   mousePosition.offsetX = clientX;
   mousePosition.offsetY = clientY;

+ 19 - 18
src/features/mark/CommonMarkBody.vue

@@ -17,28 +17,29 @@
         :style="{ width: answerPaperScale }"
         :class="[`rotate-board-${rotateBoard}`]"
       >
-        <div
+        <template
           v-for="(item, index) in sliceImagesWithTrackList"
           :key="index"
-          class="single-image-container"
         >
-          <img
-            :src="item.url"
-            draggable="false"
-            @click="(event) => innerMakeTrack(event, item)"
-            @contextmenu="showBigImage"
-          />
-          <MarkDrawTrack
-            :trackList="item.trackList"
-            :specialTagList="item.tagList"
-            :sliceImageWidth="item.sliceImageWidth"
-            :sliceImageHeight="item.sliceImageHeight"
-            :dx="item.dx"
-            :dy="item.dy"
-            @deleteSpecialtag="(tag) => deleteSpecialtag(item, tag)"
-          />
+          <div class="single-image-container">
+            <img
+              :src="item.url"
+              draggable="false"
+              @click="(event) => innerMakeTrack(event, item)"
+              @contextmenu="showBigImage"
+            />
+            <MarkDrawTrack
+              :trackList="item.trackList"
+              :specialTagList="item.tagList"
+              :sliceImageWidth="item.sliceImageWidth"
+              :sliceImageHeight="item.sliceImageHeight"
+              :dx="item.dx"
+              :dy="item.dy"
+              @deleteSpecialtag="(tag) => deleteSpecialtag(item, tag)"
+            />
+          </div>
           <hr class="image-seperator" />
-        </div>
+        </template>
       </div>
       <div v-else-if="store.isMultiMedia">
         <MultiMediaMarkBody />

+ 2 - 0
src/features/mark/MarkBoardTrack.vue

@@ -110,10 +110,12 @@
     <div class="board-spliter">
       <div class="board-spliter-up" @click="areaHeight = 74">
         <img src="@/assets/icons/icon-up.svg" />
+        <img src="@/assets/icons/icon-up-active.svg" />
       </div>
       <div ref="dragSpliter" class="board-spliter-bar"></div>
       <div class="board-spliter-down" @click="areaHeight = 0">
         <img src="@/assets/icons/icon-down.svg" />
+        <img src="@/assets/icons/icon-down-active.svg" />
       </div>
     </div>
     <div v-if="!questionScoreDisabled" class="board-scores">

+ 11 - 2
src/features/mark/MarkDrawTrack.vue

@@ -20,7 +20,7 @@
   <template v-for="(tag, index) in specialTagList" :key="index">
     <div
       v-if="tag.tagType === 'TEXT'"
-      class="score-container"
+      class="score-container special-container"
       :style="computeTopAndLeft(tag)"
       @keypress.stop
       @mousemove.stop
@@ -30,7 +30,7 @@
       <a-textarea
         v-model:value="tag.tagName"
         class="tag-textarea tw-m-auto"
-        :autosize="{ minRows: 2, maxRows: 6 }"
+        :autosize="{ minRows: 1, maxRows: 6 }"
         :maxlength="32"
         @blur="specialTagBlur(tag)"
       />
@@ -175,6 +175,15 @@ watch(
   margin-top: -100px;
   margin-left: -100px;
 }
+.score-container.special-container {
+  width: auto;
+  height: auto;
+  margin-top: none;
+  margin-left: none;
+  max-width: 200px;
+  max-height: 200px;
+  transform: translate(-50%, -50%);
+}
 .score-container.no-event {
   /* to click through div */
   pointer-events: none;

+ 7 - 13
src/features/mark/MarkHeader.vue

@@ -67,11 +67,9 @@
       <div v-show="store.status.totalCount" class="header-total">
         <span class="header-noun">
           <span>已评:</span>
-          <transition-group name="count-animation" tag="span">
-            <span :key="store.status.personCount || 0">
-              {{ store.status.personCount }}
-            </span>
-          </transition-group>
+          <span :key="store.status.personCount || 0">
+            {{ store.status.personCount }}
+          </span>
         </span>
         <span v-if="store.setting.topCount" class="header-noun">
           <span>分配:</span>
@@ -79,17 +77,13 @@
         </span>
         <span class="header-noun">
           <span>未评:</span>
-          <transition-group name="count-animation" tag="span">
-            <span :key="todoCount || 0">
-              {{ todoCount }}
-            </span>
-          </transition-group>
+          <span :key="todoCount || 0">
+            {{ todoCount }}
+          </span>
         </span>
         <span class="header-noun">
           <span>进度:</span>
-          <transition-group name="count-animation" tag="span">
-            <span :key="progress || '-'"> {{ progress }}% </span>
-          </transition-group>
+          <span :key="progress || '-'"> {{ progress }}% </span>
         </span>
       </div>
     </div>

+ 20 - 3
src/styles/page.less

@@ -339,8 +339,8 @@
       }
 
       &.is-active {
-        color: #fff;
-        background: #165dff;
+        color: #165dff;
+        background: #e8f3ff;
       }
     }
     .body-col {
@@ -620,12 +620,23 @@
       height: 14px;
       width: 14px;
       margin: 2px auto;
+
+      &:nth-of-type(2) {
+        display: none;
+      }
     }
     .board-spliter-item {
       background: #f7f7f7;
       cursor: pointer;
       &:hover {
         background-color: #e8f3ff;
+
+        img:nth-of-type(1) {
+          display: none;
+        }
+        img:nth-of-type(2) {
+          display: block;
+        }
       }
     }
 
@@ -652,6 +663,12 @@
         height: 14px;
         width: 14px;
       }
+
+      &:hover {
+        &::after {
+          background-image: url(../assets/icons/icon-drag-active.svg);
+        }
+      }
     }
     &-down {
       flex-grow: 2;
@@ -846,7 +863,7 @@
     }
   }
   .image-seperator {
-    border: 2px solid transparent;
+    border: 20px solid transparent;
   }
 }