zhangjie 2 gadi atpakaļ
vecāks
revīzija
59322b92db

+ 8 - 0
src/assets/styles/marker.less

@@ -459,9 +459,17 @@
       &:hover {
       &:hover {
         color: @color-text-act;
         color: @color-text-act;
       }
       }
+      &.is-disabled {
+        color: tint(@color-text, 20%);
+        cursor: not-allowed;
+      }
     }
     }
     .mark-act {
     .mark-act {
       color: @warning-color;
       color: @warning-color;
+      &.is-disabled {
+        color: tint(@warning-color, 20%);
+        cursor: not-allowed;
+      }
     }
     }
   }
   }
   .image-sn {
   .image-sn {

+ 7 - 0
src/modules/grading/leader/LeaderGrading.vue

@@ -323,6 +323,9 @@ export default {
       return data;
       return data;
     },
     },
     async getMarkList(params) {
     async getMarkList(params) {
+      const userId = this.$ls.get("user", { id: "" }).id;
+      const markDisabled = userId !== params.markerId;
+
       const datas = {
       const datas = {
         ...params,
         ...params,
         workId: this.workId,
         workId: this.workId,
@@ -333,6 +336,10 @@ export default {
       };
       };
 
 
       const data = await markTaskPaperList(datas);
       const data = await markTaskPaperList(datas);
+      data.data.forEach(item => {
+        item.markDisabled = markDisabled;
+        item.mark = true;
+      });
       return data;
       return data;
     },
     },
     async toPage(page) {
     async toPage(page) {

+ 5 - 0
src/modules/grading/marker/MarkerHeader.vue

@@ -368,6 +368,11 @@ export default {
         role: "MARKER"
         role: "MARKER"
       });
       });
       this.markers = data || [];
       this.markers = data || [];
+      const user = this.$ls.get("user", { id: "", name: "" });
+      this.markers.push({
+        id: user.id,
+        name: "我自己"
+      });
     },
     },
     keyEvent(e) {
     keyEvent(e) {
       if (!e.altKey && !e.shiftKey && !e.repeat) {
       if (!e.altKey && !e.shiftKey && !e.repeat) {

+ 6 - 1
src/modules/grading/marker/MarkerImageView.vue

@@ -36,7 +36,10 @@
           {{ image.title }}
           {{ image.title }}
         </div>
         </div>
         <div class="image-action">
         <div class="image-action">
-          <div class="image-action-li" @click="toMark">
+          <div
+            :class="['image-action-li', { 'is-disabled': image.markDisabled }]"
+            @click="toMark"
+          >
             <Icon :class="{ 'mark-act': image.mark }" type="md-bookmark" />
             <Icon :class="{ 'mark-act': image.mark }" type="md-bookmark" />
           </div>
           </div>
           <div class="image-action-li" @click="toRotate">
           <div class="image-action-li" @click="toRotate">
@@ -97,6 +100,7 @@ export default {
         score: "",
         score: "",
         deg: 0,
         deg: 0,
         mark: false,
         mark: false,
+        markDisabled: false,
         sample: false,
         sample: false,
         selected: false
         selected: false
       },
       },
@@ -119,6 +123,7 @@ export default {
       this.$refs.ImageViewContain.resizeImage(image.deg);
       this.$refs.ImageViewContain.resizeImage(image.deg);
     },
     },
     async toMark() {
     async toMark() {
+      if (this.image.markDisabled) return;
       if (this.loading) return;
       if (this.loading) return;
       this.loading = true;
       this.loading = true;
       let res = null;
       let res = null;