zhangjie 2 سال پیش
والد
کامیت
dae8184de5

+ 12 - 11
src/assets/styles/marker.less

@@ -579,6 +579,7 @@
     &-content {
       background: @color-background;
 
+      &.is-active,
       &:hover {
         background-color: @color-act1;
         color: @color-text-act;
@@ -922,17 +923,7 @@
     flex-direction: column;
     justify-content: space-between;
   }
-  .user-all {
-    padding: 5px 10px;
-    text-align: right;
-    border-bottom: 1px solid @color-background-light;
 
-    .user-selection {
-      display: inline-block;
-      height: 26px;
-      cursor: pointer;
-    }
-  }
   .user-item {
     padding: 5px 10px;
     line-height: 30px;
@@ -945,6 +936,14 @@
       background-color: @color-background-light;
     }
   }
+  .user-all {
+    padding: 5px 10px;
+    border-bottom: 1px solid @color-background-light;
+    cursor: auto;
+    &:hover {
+      background-color: transparent;
+    }
+  }
   .user-name {
     flex-grow: 2;
     overflow: hidden;
@@ -956,6 +955,7 @@
     flex-shrink: 0;
     width: 30px;
     font-size: 24px;
+    color: @color-text;
   }
   .user-selection {
     flex-grow: 0;
@@ -964,9 +964,10 @@
     font-size: 26px;
     text-align: right;
     color: @color-text;
+    cursor: pointer;
 
     &.is-active {
-      color: @color-act3;
+      color: #168bcf;
     }
   }
 

+ 4 - 1
src/modules/grading/components/GradeAction.vue

@@ -523,7 +523,10 @@ export default {
       return this.levels.find(item => item.name === key);
     },
     toKeySubmit() {
-      if (!this.keyInput) return;
+      if (!this.keyInput) {
+        this.$Message.error("请选择档位");
+        return;
+      }
       const level = this.getKeyInputLevel(this.keyInput);
       this.selectLevel(level);
     },

+ 13 - 3
src/modules/grading/components/NoticeDialog.vue

@@ -10,7 +10,8 @@
   >
     <div class="notice-container">
       <div v-if="IS_MARK_LEADER" class="notice-users">
-        <div class="user-all">
+        <div class="user-item user-all">
+          <div>小组成员</div>
           <div
             :class="['user-selection', { 'is-active': userSelectAll }]"
             @click="selectAll"
@@ -34,7 +35,7 @@
         </div>
       </div>
       <div class="notice-body">
-        <div class="notice-content">
+        <div ref="NoticeContent" class="notice-content">
           <div v-for="notice in notices" :key="notice.id" class="notice-item">
             <div class="notice-item-head">
               <span class="notice-head-users">
@@ -59,6 +60,7 @@
 </template>
 
 <script>
+import { mapMutations } from "vuex";
 import { noticeList, userList } from "./data";
 
 export default {
@@ -82,10 +84,18 @@ export default {
   },
   mounted() {},
   methods: {
-    initData() {},
+    ...mapMutations("marker", ["setShortcut", "recoverShortcut"]),
+    initData() {
+      this.$nextTick(() => {
+        this.$refs.NoticeContent.scrollTop = this.$refs.NoticeContent.offsetHeight;
+      });
+    },
     visibleChange(visible) {
       if (visible) {
         this.initData();
+        this.setShortcut([]);
+      } else {
+        this.recoverShortcut();
       }
     },
     cancel() {

+ 20 - 4
src/modules/grading/marker/store.js

@@ -18,8 +18,11 @@ const state = {
   // key shortcut:
   shortcutKeyStatus: {
     page: false,
-    action: false,
-    preview: false
+    action: false
+  },
+  prevShortcutKeyStatus: {
+    page: false,
+    action: false
   }
 };
 const mutations = {
@@ -27,6 +30,11 @@ const mutations = {
     state.paramsSet = paramsSet;
   },
   setPage(state, page) {
+    if (
+      Object.prototype.hasOwnProperty.call(page, "totalPage") &&
+      !page.totalPage
+    )
+      page.totalPage = 1;
     state.page = Object.assign({}, state.page, page);
   },
   setSteps(state, steps) {
@@ -56,11 +64,16 @@ const mutations = {
     state.shortcutKeyStatus = Object.assign({}, state.shortcutKeyStatus, data);
   },
   setShortcut(state, types) {
+    state.prevShortcutKeyStatus = { ...state.shortcutKeyStatus };
+
     Object.keys(state.shortcutKeyStatus).forEach(key => {
       state.shortcutKeyStatus[key] = types.includes(key);
     });
     // console.log(JSON.stringify(state.shortcutKeyStatus));
   },
+  recoverShortcut(state) {
+    state.shortcutKeyStatus = { ...state.prevShortcutKeyStatus };
+  },
   clearState(state) {
     state.paramsSet = {};
     state.page = {
@@ -78,8 +91,11 @@ const mutations = {
     state.IS_MARK_LEADER = false;
     state.shortcutKeyStatus = {
       page: false,
-      action: false,
-      preview: false
+      action: false
+    };
+    state.prevShortcutKeyStatus = {
+      page: false,
+      action: false
     };
   }
 };

+ 96 - 100
src/modules/main/PaperManage.vue

@@ -1,105 +1,94 @@
 <template>
   <div class="paper-manage page-container-flex">
-    <div class="part-box part-box-filter part-box-head">
-      <div class="part-box-head-left">
-        <Form ref="FilterForm" label-position="left" inline>
-          <FormItem>
-            <Select
-              v-model="filter.subject"
-              @on-change="subjectChange"
-              placeholder="科目"
-            >
-              <Option
-                v-for="(item, index) in subjects"
-                :key="index"
-                :value="item.subject"
-                :label="item.name"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem>
-            <Select v-model="filter.areaCode" placeholder="选择考区" clearable>
-              <Option
-                v-for="area in areas"
-                :key="area.id"
-                :value="area.areaCode"
-                :label="area.areaName"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem>
-            <Input
-              v-model="filter.startNumber"
-              type="text"
-              placeholder="输入开始编号"
-              clearable
-            />
-          </FormItem>
-          <FormItem>
-            <Input
-              v-model="filter.endNumber"
-              type="text"
-              placeholder="输入结束编号"
-              clearable
-            />
-          </FormItem>
-          <FormItem>
-            <Select
-              v-model="paperType"
-              @on-change="typeChange"
-              placeholder="类型"
-            >
-              <Option
-                v-for="(val, key) in CAFA_EXCEPTION_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem>
-            <Select
-              v-model="filter.scanUserId"
-              placeholder="选择采集账号"
-              clearable
-            >
-              <Option
-                v-for="user in scanUsers"
-                :key="user.id"
-                :value="user.id"
-                :label="user.loginName"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem>
-            <Input
-              v-model.trim="filter.studentName"
-              placeholder="输入姓名"
-              clearable
-            ></Input>
-          </FormItem>
-          <FormItem>
-            <Select v-model="filter.sortBy" placeholder="排序方式" clearable>
-              <Option
-                v-for="(val, key) in SORT_RULE_TYPE"
-                :key="key"
-                :value="key"
-                :label="val"
-              ></Option>
-            </Select>
-          </FormItem>
-          <FormItem>
-            <Button
-              size="small"
-              class="btn-form-search"
-              type="primary"
-              @click="toPage(1)"
-              >查询</Button
-            >
-          </FormItem>
-        </Form>
-      </div>
-      <div class="part-box-head-right">
+    <div class="part-box">
+      <Form ref="FilterForm" label-position="left" inline>
+        <FormItem>
+          <Select
+            v-model="filter.subject"
+            @on-change="subjectChange"
+            placeholder="科目"
+          >
+            <Option
+              v-for="(item, index) in subjects"
+              :key="index"
+              :value="item.subject"
+              :label="item.name"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select v-model="filter.areaCode" placeholder="选择考区" clearable>
+            <Option
+              v-for="area in areas"
+              :key="area.id"
+              :value="area.areaCode"
+              :label="area.areaName"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Input
+            v-model="filter.startNumber"
+            type="text"
+            placeholder="输入开始编号"
+            clearable
+          />
+        </FormItem>
+        <FormItem>
+          <Input
+            v-model="filter.endNumber"
+            type="text"
+            placeholder="输入结束编号"
+            clearable
+          />
+        </FormItem>
+        <FormItem>
+          <Select
+            v-model="paperType"
+            @on-change="typeChange"
+            placeholder="类型"
+          >
+            <Option
+              v-for="(val, key) in CAFA_EXCEPTION_TYPE"
+              :key="key"
+              :value="key"
+              :label="val"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select
+            v-model="filter.scanUserId"
+            placeholder="选择采集账号"
+            clearable
+          >
+            <Option
+              v-for="user in scanUsers"
+              :key="user.id"
+              :value="user.id"
+              :label="user.loginName"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Input
+            v-model.trim="filter.studentName"
+            placeholder="输入姓名"
+            clearable
+          ></Input>
+        </FormItem>
+        <FormItem>
+          <Select v-model="filter.sortBy" placeholder="排序方式" clearable>
+            <Option
+              v-for="(val, key) in SORT_RULE_TYPE"
+              :key="key"
+              :value="key"
+              :label="val"
+            ></Option>
+          </Select>
+        </FormItem>
+      </Form>
+      <div class="box-justify">
         <Button
           type="success"
           shape="circle"
@@ -107,6 +96,13 @@
           @click="toExportMark"
           >导出标记试卷</Button
         >
+        <Button
+          size="small"
+          class="btn-form-search"
+          type="primary"
+          @click="toPage(1)"
+          >查询</Button
+        >
       </div>
     </div>
 

+ 8 - 2
src/modules/mark/components/MarkAction.vue

@@ -543,7 +543,10 @@ export default {
       return score >= minScore && score <= maxScore;
     },
     toKeySubmitScore() {
-      if (!this.keyInput) return;
+      if (!this.keyInput) {
+        this.$Message.error("请选择分数");
+        return;
+      }
       if (!this.checkScoreValid(this.keyInput * 1)) {
         this.$Message.destroy();
         this.$Message.error("输入分数无效");
@@ -555,7 +558,10 @@ export default {
       return this.levels.find(item => item.name === key);
     },
     toKeySubmitLevel() {
-      if (!this.keyInput) return;
+      if (!this.keyInput) {
+        this.$Message.error("请选择档位");
+        return;
+      }
       const level = this.getKeyInputLevel(this.keyInput);
       this.selectLevel(level);
     },

+ 3 - 1
src/modules/mark/leader/LeaderMarking.vue

@@ -466,7 +466,9 @@ export default {
             this.$refs.CarouselPapersPreview.cancel();
             this.$refs.MarkerHistory.updatePapers();
           } else {
-            this.toActionNextPaper();
+            // this.toActionNextPaper();
+            // 调档之后,试卷还在当前类别中,应该调用下一张
+            this.toNextPaper();
           }
         }
       });