瀏覽代碼

接口调整

zhangjie 2 年之前
父節點
當前提交
1c3dec6eb1

+ 9 - 8
src/api.js

@@ -232,7 +232,7 @@ export const deleteGradingGroup = (subjectId, groupId) => {
   return $del(`/api/marksubjects/${subjectId}/markergroups/${groupId}`);
 };
 export const deleteGradeGroupStudent = (subject, groupId) => {
-  return $del(`/api/marksubjects/marker_groups_student/${subject}/${groupId}`);
+  return $post(`/api/marksubjects/marker_groups_student/${subject}/${groupId}`);
 };
 export const markUserList = ({ workId, subjectId }) => {
   return $get("/api/markers", { workId, subject: subjectId });
@@ -365,11 +365,11 @@ export const paperSelectLevelOrScore = (taskId, result, stage) => {
 export const paperSelectLevelBatch = (taskIds, result, stage) => {
   return $patch(`/api/marktasks/batch`, { taskIds, result, stage }, "json");
 };
-export const paperTaskPass = taskId => {
-  return $post(`/api/marktasks/${taskId}/skip`, {});
+export const paperTaskPass = (stage, taskId) => {
+  return $post(`/api/marktasks/${stage}/${taskId}/skip`, {});
 };
-export const markTask = ({ markTaskId, isMark }) => {
-  return $post(`/api/marktasks/mark_task`, { markTaskId, isMark });
+export const markTask = ({ markTaskId, stage, isMark }) => {
+  return $post(`/api/marktasks/${stage}/mark_task`, { markTaskId, isMark });
 };
 // grade or mark history
 export const markHistoryList = (paperId, stage) => {
@@ -393,15 +393,16 @@ export const actionLeaderHistory = datas => {
   return $get("/api/marktasks/kzzReviewPaper", datas);
 };
 // sn search
-export const taskSnSearch = (type, code, questionId) => {
+export const taskSnSearch = (type, code, questionId, stage) => {
   if (type === "task") {
     return $get(`/api/papers/search/byTaskSecretNumber`, {
       sn: code,
-      questionId
+      questionId,
+      stage
     });
   } else {
     const paramName = type === "examNumber" ? "examNumber" : "sn";
-    return $get(`/api/papers/one`, { [paramName]: code, questionId });
+    return $get(`/api/papers/one`, { [paramName]: code, questionId, stage });
   }
 };
 // mark step change level

+ 4 - 2
src/modules/grading/GradingDetail.vue

@@ -503,7 +503,8 @@ export default {
       const data = await taskSnSearch(
         params.codeType,
         params.code,
-        this.filter.questionId
+        this.filter.questionId,
+        "LEVEL"
       );
       if (!data) {
         this.$Message.error("没有查找到结果!");
@@ -523,7 +524,8 @@ export default {
           action: levelInfo.markLeaderOnlyRight.action,
           level: levelInfo.selectedLevel,
           originLevel: levelInfo.curLevel,
-          paperIds: levelInfo.paperIds
+          paperIds: levelInfo.paperIds,
+          stage: "LEVEL"
         };
         if (datas.action === "reject") {
           datas.range = markers.map(item => item.id).join();

+ 1 - 1
src/modules/grading/GradingOperation.vue

@@ -523,7 +523,7 @@ export default {
       this.toActionNextPaper();
     },
     async passCurPaper() {
-      await paperTaskPass(this.curPaper.id);
+      await paperTaskPass("LEVEL", this.curPaper.id);
       this.toActionNextPaper();
     },
     updateHistory() {

+ 355 - 354
src/modules/grading/GradingStandardPaperManage.vue

@@ -1,354 +1,355 @@
-<template>
-  <div class="grading-standard-paper-manage">
-    <div class="part-box-head">
-      <Form
-        class="part-box-head-left"
-        ref="FilterForm"
-        label-position="left"
-        inline
-      >
-        <FormItem>
-          <Select v-model="questionId" placeholder="选择考区">
-            <Option
-              v-for="area in areas"
-              :key="area.id"
-              :value="area.id"
-              :label="area.areaName"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem>
-          <Button
-            size="small"
-            class="btn-form-search"
-            type="primary"
-            @click="search"
-            >查询</Button
-          >
-        </FormItem>
-      </Form>
-      <div class="part-box-head-right">
-        <div class="level-list">
-          <p
-            v-for="(level, index) in levels"
-            :key="level"
-            :class="['level-item', { 'level-item-act': curLevel === level }]"
-            @click="switchLevel(index)"
-          >
-            {{ level }}
-          </p>
-          <p
-            :class="['level-item', { 'level-item-act': !curLevel }]"
-            @click="showAllLevel"
-          >
-            全部
-          </p>
-        </div>
-      </div>
-    </div>
-
-    <div class="standard-papers-list" v-if="papers.length">
-      <div class="image-view-list image-view-list-5">
-        <div
-          :class="['image-view']"
-          v-for="(image, index) in papers"
-          :key="index"
-        >
-          <div class="image-view-container">
-            <h5 class="image-view-title">
-              {{ image.title }}
-            </h5>
-            <div class="image-view-contain">
-              <img
-                :src="image.thumbSrc"
-                :alt="image.title"
-                @click="toReview(index)"
-              />
-            </div>
-            <div class="image-view-actions">
-              <Button disabled>{{ image.level }}</Button>
-              <Button
-                type="error"
-                size="small"
-                @click="cancelPaper(image)"
-                :disabled="image.loading"
-                v-if="canCancel"
-                >取消</Button
-              >
-              <Button type="primary" size="small" @click="toChangePaper(image)"
-                >修改</Button
-              >
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div class="standard-papers-list" v-else>
-      <p class="standard-papers-none">暂无数据</p>
-    </div>
-
-    <!-- image-preview -->
-    <simple-image-preview
-      :cur-image="curPaper"
-      @on-prev="toPrevPaper"
-      @on-next="toNextPaper"
-      ref="SimpleImagePreview"
-    ></simple-image-preview>
-    <!-- change-standard-paper-dialog -->
-    <Modal
-      class="change-standard-paper-dialog"
-      v-model="modalIsShow"
-      title="修改标准卷"
-      :mask-closable="false"
-    >
-      <div class="level-list">
-        <p
-          v-for="level in levels"
-          :key="level"
-          :class="[
-            'level-item',
-            {
-              'level-item-act': level === curSelectLevel,
-              'level-item-disabled': level === curChangePaper.level
-            }
-          ]"
-          @click="selectLevel(level)"
-        >
-          {{ level }}
-        </p>
-      </div>
-
-      <div slot="footer">
-        <Button
-          shape="circle"
-          type="primary"
-          :disabled="isSubmit || !curSelectLevel"
-          @click="confirmChange"
-          >确认</Button
-        >
-        <Button shape="circle" @click="cancelChange">取消</Button>
-      </div>
-    </Modal>
-  </div>
-</template>
-
-<script>
-import {
-  paperList,
-  sampleAreaList,
-  workLevelList,
-  cancelStandardPaper,
-  leaderGradingPaper
-} from "@/api";
-import SimpleImagePreview from "@/components/SimpleImagePreview";
-
-export default {
-  name: "grading-standard-paper-manage",
-  components: { SimpleImagePreview },
-  data() {
-    return {
-      workId: this.$route.params.workId,
-      subjectId: this.$route.params.subjectId,
-      subject: "",
-      canCancel: true,
-      questionId: "",
-      lastQuestionId: "",
-      curLevel: "",
-      curLevelIndex: -1,
-      levels: [],
-      areas: [],
-      paperList: [],
-      papers: [],
-      curPaper: {},
-      curPaperIndex: 0,
-      // change standard
-      modalIsShow: false,
-      curChangePaper: {},
-      curSelectLevel: null,
-      isSubmit: false
-    };
-  },
-  mounted() {
-    this.subject = this.subjectId.split("-")[1];
-    this.initData();
-  },
-  methods: {
-    async initData() {
-      await this.getAreaList();
-      this.questionId = this.areas[0] && this.areas[0].id;
-      if (!this.questionId) return;
-      await this.getWorkLevels();
-      this.search();
-    },
-    async getWorkLevels() {
-      const data = await workLevelList(this.workId);
-      this.levels = data.map(item => item.code);
-    },
-    async getAreaList() {
-      const data = await sampleAreaList({
-        workId: this.workId,
-        subject: this.subject
-      });
-      this.areas = data.map(item => {
-        return {
-          id: item.id,
-          areaName: `${item.areaName}-${item.name}`,
-          areaCode: item.areaCode
-        };
-      });
-    },
-    async search() {
-      this.lastQuestionId = this.questionId;
-      await this.getPaperList();
-      this.updatePapers();
-    },
-    updatePapers() {
-      if (this.curLevel) {
-        this.papers = this.paperList.filter(
-          paper => paper.level === this.curLevel
-        );
-      } else {
-        this.papers = this.paperList;
-      }
-    },
-    async getPaperList() {
-      const datas = {
-        questionId: this.questionId,
-        level: "",
-        sort: "secretNumber",
-        isSample: true,
-        page: 0,
-        size: 100
-      };
-      const data = await paperList(datas);
-      this.paperList = data.data.map(item => {
-        item.title = `NO.${item.sn}`;
-        item.loading = false;
-        return item;
-      });
-      this.paperList.sort((a, b) => (a.level < b.level ? -1 : 1));
-    },
-    switchLevel(index) {
-      this.curLevelIndex = index;
-      this.curLevel = this.levels[index];
-
-      this.updatePapers();
-    },
-    showAllLevel() {
-      this.curLevelIndex = -1;
-      this.curLevel = "";
-      this.updatePapers();
-    },
-    cancelPaper(paper) {
-      if (paper.loading) return;
-      this.$Modal.confirm({
-        content: "确定要取消当前标准卷吗?",
-        onOk: async () => {
-          paper.loading = true;
-          const res = await cancelStandardPaper(paper.id).catch(() => {});
-          paper.loading = false;
-          if (!res) return;
-
-          this.paperList = this.paperList.filter(
-            item => paper.level !== item.level
-          );
-          this.papers = this.papers.filter(item => paper.level !== item.level);
-        }
-      });
-    },
-    // change standard paper
-    toChangePaper(paper) {
-      this.curChangePaper = paper;
-      this.modalIsShow = true;
-    },
-    selectLevel(level) {
-      if (level === this.curChangePaper.level) return;
-      this.curSelectLevel = level;
-    },
-    async confirmChange() {
-      if (!this.curSelectLevel) return;
-      if (this.isSubmit) return;
-
-      this.isSubmit = true;
-      const datas = {
-        action: "sampling",
-        level: this.curSelectLevel,
-        originLevel: this.curChangePaper.level,
-        paperIds: this.curChangePaper.id
-      };
-      let result = true;
-      await leaderGradingPaper(datas).catch(() => {
-        result = false;
-      });
-      this.isSubmit = false;
-
-      if (!result) return;
-
-      this.$Message.success("操作成功!");
-      this.cancelChange();
-      this.search();
-    },
-    cancelChange() {
-      this.curSelectLevel = null;
-      this.modalIsShow = false;
-    },
-    // to review
-    toReview(index) {
-      this.selectPaper(index);
-      this.$refs.SimpleImagePreview.open();
-    },
-    selectPaper(index) {
-      let nindex = index;
-      if (!this.papers.length) {
-        nindex = 0;
-      } else if (index > this.papers.length - 1) {
-        nindex = this.papers.length - 1;
-      } else if (index < 0) {
-        nindex = 0;
-      }
-      this.curPaperIndex = nindex;
-      this.curPaper = this.papers[nindex] ? { ...this.papers[nindex] } : {};
-    },
-    async toPrevPaper() {
-      if (this.curPaperIndex === 0) {
-        if (this.curLevelIndex === 0 || this.curLevelIndex === -1) {
-          this.$Message.warning("当前已经是第一条数据了");
-          return;
-        } else {
-          this.curLevelIndex--;
-          this.curLevel = this.levels[this.curLevelIndex];
-          await this.updatePapers();
-          this.curPaperIndex = this.papers.length - 1;
-        }
-      } else {
-        this.curPaperIndex--;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    },
-    async toNextPaper() {
-      if (
-        this.curPaperIndex === this.papers.length - 1 ||
-        !this.papers.length
-      ) {
-        if (
-          this.curLevelIndex === this.levels.length - 1 ||
-          this.curLevelIndex === -1
-        ) {
-          this.$Message.warning("当前已经是最后一条数据了");
-          return;
-        } else {
-          this.curLevelIndex++;
-          this.curLevel = this.levels[this.curLevelIndex];
-          await this.updatePapers();
-          this.curPaperIndex = 0;
-        }
-      } else {
-        this.curPaperIndex++;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    }
-  }
-};
-</script>
+<template>
+  <div class="grading-standard-paper-manage">
+    <div class="part-box-head">
+      <Form
+        class="part-box-head-left"
+        ref="FilterForm"
+        label-position="left"
+        inline
+      >
+        <FormItem>
+          <Select v-model="questionId" placeholder="选择考区">
+            <Option
+              v-for="area in areas"
+              :key="area.id"
+              :value="area.id"
+              :label="area.areaName"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Button
+            size="small"
+            class="btn-form-search"
+            type="primary"
+            @click="search"
+            >查询</Button
+          >
+        </FormItem>
+      </Form>
+      <div class="part-box-head-right">
+        <div class="level-list">
+          <p
+            v-for="(level, index) in levels"
+            :key="level"
+            :class="['level-item', { 'level-item-act': curLevel === level }]"
+            @click="switchLevel(index)"
+          >
+            {{ level }}
+          </p>
+          <p
+            :class="['level-item', { 'level-item-act': !curLevel }]"
+            @click="showAllLevel"
+          >
+            全部
+          </p>
+        </div>
+      </div>
+    </div>
+
+    <div class="standard-papers-list" v-if="papers.length">
+      <div class="image-view-list image-view-list-5">
+        <div
+          :class="['image-view']"
+          v-for="(image, index) in papers"
+          :key="index"
+        >
+          <div class="image-view-container">
+            <h5 class="image-view-title">
+              {{ image.title }}
+            </h5>
+            <div class="image-view-contain">
+              <img
+                :src="image.thumbSrc"
+                :alt="image.title"
+                @click="toReview(index)"
+              />
+            </div>
+            <div class="image-view-actions">
+              <Button disabled>{{ image.level }}</Button>
+              <Button
+                type="error"
+                size="small"
+                @click="cancelPaper(image)"
+                :disabled="image.loading"
+                v-if="canCancel"
+                >取消</Button
+              >
+              <Button type="primary" size="small" @click="toChangePaper(image)"
+                >修改</Button
+              >
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="standard-papers-list" v-else>
+      <p class="standard-papers-none">暂无数据</p>
+    </div>
+
+    <!-- image-preview -->
+    <simple-image-preview
+      :cur-image="curPaper"
+      @on-prev="toPrevPaper"
+      @on-next="toNextPaper"
+      ref="SimpleImagePreview"
+    ></simple-image-preview>
+    <!-- change-standard-paper-dialog -->
+    <Modal
+      class="change-standard-paper-dialog"
+      v-model="modalIsShow"
+      title="修改标准卷"
+      :mask-closable="false"
+    >
+      <div class="level-list">
+        <p
+          v-for="level in levels"
+          :key="level"
+          :class="[
+            'level-item',
+            {
+              'level-item-act': level === curSelectLevel,
+              'level-item-disabled': level === curChangePaper.level
+            }
+          ]"
+          @click="selectLevel(level)"
+        >
+          {{ level }}
+        </p>
+      </div>
+
+      <div slot="footer">
+        <Button
+          shape="circle"
+          type="primary"
+          :disabled="isSubmit || !curSelectLevel"
+          @click="confirmChange"
+          >确认</Button
+        >
+        <Button shape="circle" @click="cancelChange">取消</Button>
+      </div>
+    </Modal>
+  </div>
+</template>
+
+<script>
+import {
+  paperList,
+  sampleAreaList,
+  workLevelList,
+  cancelStandardPaper,
+  leaderGradingPaper
+} from "@/api";
+import SimpleImagePreview from "@/components/SimpleImagePreview";
+
+export default {
+  name: "grading-standard-paper-manage",
+  components: { SimpleImagePreview },
+  data() {
+    return {
+      workId: this.$route.params.workId,
+      subjectId: this.$route.params.subjectId,
+      subject: "",
+      canCancel: true,
+      questionId: "",
+      lastQuestionId: "",
+      curLevel: "",
+      curLevelIndex: -1,
+      levels: [],
+      areas: [],
+      paperList: [],
+      papers: [],
+      curPaper: {},
+      curPaperIndex: 0,
+      // change standard
+      modalIsShow: false,
+      curChangePaper: {},
+      curSelectLevel: null,
+      isSubmit: false
+    };
+  },
+  mounted() {
+    this.subject = this.subjectId.split("-")[1];
+    this.initData();
+  },
+  methods: {
+    async initData() {
+      await this.getAreaList();
+      this.questionId = this.areas[0] && this.areas[0].id;
+      if (!this.questionId) return;
+      await this.getWorkLevels();
+      this.search();
+    },
+    async getWorkLevels() {
+      const data = await workLevelList(this.workId);
+      this.levels = data.map(item => item.code);
+    },
+    async getAreaList() {
+      const data = await sampleAreaList({
+        workId: this.workId,
+        subject: this.subject
+      });
+      this.areas = data.map(item => {
+        return {
+          id: item.id,
+          areaName: `${item.areaName}-${item.name}`,
+          areaCode: item.areaCode
+        };
+      });
+    },
+    async search() {
+      this.lastQuestionId = this.questionId;
+      await this.getPaperList();
+      this.updatePapers();
+    },
+    updatePapers() {
+      if (this.curLevel) {
+        this.papers = this.paperList.filter(
+          paper => paper.level === this.curLevel
+        );
+      } else {
+        this.papers = this.paperList;
+      }
+    },
+    async getPaperList() {
+      const datas = {
+        questionId: this.questionId,
+        level: "",
+        sort: "secretNumber",
+        isSample: true,
+        page: 0,
+        size: 100
+      };
+      const data = await paperList(datas);
+      this.paperList = data.data.map(item => {
+        item.title = `NO.${item.sn}`;
+        item.loading = false;
+        return item;
+      });
+      this.paperList.sort((a, b) => (a.level < b.level ? -1 : 1));
+    },
+    switchLevel(index) {
+      this.curLevelIndex = index;
+      this.curLevel = this.levels[index];
+
+      this.updatePapers();
+    },
+    showAllLevel() {
+      this.curLevelIndex = -1;
+      this.curLevel = "";
+      this.updatePapers();
+    },
+    cancelPaper(paper) {
+      if (paper.loading) return;
+      this.$Modal.confirm({
+        content: "确定要取消当前标准卷吗?",
+        onOk: async () => {
+          paper.loading = true;
+          const res = await cancelStandardPaper(paper.id).catch(() => {});
+          paper.loading = false;
+          if (!res) return;
+
+          this.paperList = this.paperList.filter(
+            item => paper.level !== item.level
+          );
+          this.papers = this.papers.filter(item => paper.level !== item.level);
+        }
+      });
+    },
+    // change standard paper
+    toChangePaper(paper) {
+      this.curChangePaper = paper;
+      this.modalIsShow = true;
+    },
+    selectLevel(level) {
+      if (level === this.curChangePaper.level) return;
+      this.curSelectLevel = level;
+    },
+    async confirmChange() {
+      if (!this.curSelectLevel) return;
+      if (this.isSubmit) return;
+
+      this.isSubmit = true;
+      const datas = {
+        action: "sampling",
+        level: this.curSelectLevel,
+        originLevel: this.curChangePaper.level,
+        paperIds: this.curChangePaper.id,
+        stage: "LEVEL"
+      };
+      let result = true;
+      await leaderGradingPaper(datas).catch(() => {
+        result = false;
+      });
+      this.isSubmit = false;
+
+      if (!result) return;
+
+      this.$Message.success("操作成功!");
+      this.cancelChange();
+      this.search();
+    },
+    cancelChange() {
+      this.curSelectLevel = null;
+      this.modalIsShow = false;
+    },
+    // to review
+    toReview(index) {
+      this.selectPaper(index);
+      this.$refs.SimpleImagePreview.open();
+    },
+    selectPaper(index) {
+      let nindex = index;
+      if (!this.papers.length) {
+        nindex = 0;
+      } else if (index > this.papers.length - 1) {
+        nindex = this.papers.length - 1;
+      } else if (index < 0) {
+        nindex = 0;
+      }
+      this.curPaperIndex = nindex;
+      this.curPaper = this.papers[nindex] ? { ...this.papers[nindex] } : {};
+    },
+    async toPrevPaper() {
+      if (this.curPaperIndex === 0) {
+        if (this.curLevelIndex === 0 || this.curLevelIndex === -1) {
+          this.$Message.warning("当前已经是第一条数据了");
+          return;
+        } else {
+          this.curLevelIndex--;
+          this.curLevel = this.levels[this.curLevelIndex];
+          await this.updatePapers();
+          this.curPaperIndex = this.papers.length - 1;
+        }
+      } else {
+        this.curPaperIndex--;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    },
+    async toNextPaper() {
+      if (
+        this.curPaperIndex === this.papers.length - 1 ||
+        !this.papers.length
+      ) {
+        if (
+          this.curLevelIndex === this.levels.length - 1 ||
+          this.curLevelIndex === -1
+        ) {
+          this.$Message.warning("当前已经是最后一条数据了");
+          return;
+        } else {
+          this.curLevelIndex++;
+          this.curLevel = this.levels[this.curLevelIndex];
+          await this.updatePapers();
+          this.curPaperIndex = 0;
+        }
+      } else {
+        this.curPaperIndex++;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    }
+  }
+};
+</script>

+ 154 - 153
src/modules/grading/components/ModifyLeaderGrading.vue

@@ -1,153 +1,154 @@
-<template>
-  <Modal
-    class="modify-leader-grading"
-    v-model="modalIsShow"
-    title="科组长评档"
-    :mask-closable="false"
-    @on-cancel="cancelHandle"
-    @on-visible-change="visibleChange"
-  >
-    <div class="leader-grading">
-      <div class="leader-level">
-        <p>已选档位</p>
-        <h3>{{ levelInfo.selectedLevel }}</h3>
-      </div>
-      <RadioGroup v-model="actionType">
-        <div class="leader-aciton" v-if="standardVolume">
-          <Radio size="large" label="sampling">设为标准卷</Radio>
-        </div>
-        <div class="leader-aciton" v-if="oneClickLevel">
-          <Radio size="large" label="leveling" :disabled="noneedLevelOrReject"
-            >一键定档</Radio
-          >
-        </div>
-        <div class="leader-aciton" v-if="levelCallback">
-          <Radio size="large" label="reject" :disabled="noneedLevelOrReject"
-            >建议档位打回</Radio
-          >
-        </div>
-      </RadioGroup>
-      <div
-        class="leader-markers"
-        v-if="actionType === 'reject' && !noneedLevelOrReject"
-      >
-        <CheckboxGroup v-model="selectedMarkers">
-          <Checkbox
-            v-for="marker in markers"
-            :key="marker.id"
-            :label="marker.id"
-            >{{ marker.name }}</Checkbox
-          >
-        </CheckboxGroup>
-      </div>
-    </div>
-
-    <div slot="footer">
-      <Button shape="circle" type="primary" :disabled="isSubmit" @click="submit"
-        >确认</Button
-      >
-      <Button shape="circle" @click="cancel">取消</Button>
-    </div>
-  </Modal>
-</template>
-
-<script>
-import { leaderGradingPaper } from "@/api";
-
-export default {
-  name: "modify-leader-grading",
-  props: {
-    levelInfo: {
-      type: Object,
-      default() {
-        return {
-          paperIds: "",
-          curLevel: "",
-          selectedLevel: ""
-        };
-      }
-    },
-    markers: {
-      type: Array,
-      default() {
-        return [];
-      }
-    }
-  },
-  data() {
-    return {
-      modalIsShow: false,
-      isSubmit: false,
-      standardVolume: false,
-      oneClickLevel: false,
-      levelCallback: false,
-      noneedLevelOrReject: false,
-      actionType: null,
-      selectedMarkers: []
-    };
-  },
-  methods: {
-    initData() {
-      const isMuliple = this.levelInfo.paperIds.includes(",");
-      this.noneedLevelOrReject =
-        this.levelInfo.curLevel === this.levelInfo.selectedLevel;
-      const user = this.$ls.get("user");
-      this.standardVolume = user.standardVolume && !isMuliple;
-      this.levelCallback = user.levelCallback;
-      this.oneClickLevel = user.oneClickLevel;
-      this.selectedMarkers = [];
-      // this.selectedMarkers = this.markers.map(item => item.id);
-    },
-    visibleChange(visible) {
-      if (visible) {
-        this.initData();
-      } else {
-        this.isSubmit = false;
-        this.actionType = null;
-      }
-    },
-    cancel() {
-      this.modalIsShow = false;
-      this.cancelHandle();
-    },
-    cancelHandle() {
-      this.$emit("canceled");
-    },
-    open() {
-      this.modalIsShow = true;
-    },
-    async submit() {
-      if (!this.actionType) {
-        this.$Message.error("请选择操作类型!");
-        return;
-      }
-      if (this.actionType === "reject" && !this.selectedMarkers.length) {
-        this.$Message.error("请指定评卷员!");
-        return;
-      }
-      const datas = {
-        action: this.actionType,
-        level: this.levelInfo.selectedLevel,
-        originLevel: this.levelInfo.curLevel,
-        paperIds: this.levelInfo.paperIds
-      };
-      if (this.actionType === "reject")
-        datas.range = this.selectedMarkers.join();
-
-      if (this.isSubmit) return;
-      this.isSubmit = true;
-      let result = true;
-      const paper = await leaderGradingPaper(datas).catch(() => {
-        result = false;
-      });
-      this.isSubmit = false;
-
-      if (!result) return;
-
-      this.$Message.success("操作成功!");
-      this.$emit("modified", datas, paper);
-      this.cancel();
-    }
-  }
-};
-</script>
+<template>
+  <Modal
+    class="modify-leader-grading"
+    v-model="modalIsShow"
+    title="科组长评档"
+    :mask-closable="false"
+    @on-cancel="cancelHandle"
+    @on-visible-change="visibleChange"
+  >
+    <div class="leader-grading">
+      <div class="leader-level">
+        <p>已选档位</p>
+        <h3>{{ levelInfo.selectedLevel }}</h3>
+      </div>
+      <RadioGroup v-model="actionType">
+        <div class="leader-aciton" v-if="standardVolume">
+          <Radio size="large" label="sampling">设为标准卷</Radio>
+        </div>
+        <div class="leader-aciton" v-if="oneClickLevel">
+          <Radio size="large" label="leveling" :disabled="noneedLevelOrReject"
+            >一键定档</Radio
+          >
+        </div>
+        <div class="leader-aciton" v-if="levelCallback">
+          <Radio size="large" label="reject" :disabled="noneedLevelOrReject"
+            >建议档位打回</Radio
+          >
+        </div>
+      </RadioGroup>
+      <div
+        class="leader-markers"
+        v-if="actionType === 'reject' && !noneedLevelOrReject"
+      >
+        <CheckboxGroup v-model="selectedMarkers">
+          <Checkbox
+            v-for="marker in markers"
+            :key="marker.id"
+            :label="marker.id"
+            >{{ marker.name }}</Checkbox
+          >
+        </CheckboxGroup>
+      </div>
+    </div>
+
+    <div slot="footer">
+      <Button shape="circle" type="primary" :disabled="isSubmit" @click="submit"
+        >确认</Button
+      >
+      <Button shape="circle" @click="cancel">取消</Button>
+    </div>
+  </Modal>
+</template>
+
+<script>
+import { leaderGradingPaper } from "@/api";
+
+export default {
+  name: "modify-leader-grading",
+  props: {
+    levelInfo: {
+      type: Object,
+      default() {
+        return {
+          paperIds: "",
+          curLevel: "",
+          selectedLevel: ""
+        };
+      }
+    },
+    markers: {
+      type: Array,
+      default() {
+        return [];
+      }
+    }
+  },
+  data() {
+    return {
+      modalIsShow: false,
+      isSubmit: false,
+      standardVolume: false,
+      oneClickLevel: false,
+      levelCallback: false,
+      noneedLevelOrReject: false,
+      actionType: null,
+      selectedMarkers: []
+    };
+  },
+  methods: {
+    initData() {
+      const isMuliple = this.levelInfo.paperIds.includes(",");
+      this.noneedLevelOrReject =
+        this.levelInfo.curLevel === this.levelInfo.selectedLevel;
+      const user = this.$ls.get("user");
+      this.standardVolume = user.standardVolume && !isMuliple;
+      this.levelCallback = user.levelCallback;
+      this.oneClickLevel = user.oneClickLevel;
+      this.selectedMarkers = [];
+      // this.selectedMarkers = this.markers.map(item => item.id);
+    },
+    visibleChange(visible) {
+      if (visible) {
+        this.initData();
+      } else {
+        this.isSubmit = false;
+        this.actionType = null;
+      }
+    },
+    cancel() {
+      this.modalIsShow = false;
+      this.cancelHandle();
+    },
+    cancelHandle() {
+      this.$emit("canceled");
+    },
+    open() {
+      this.modalIsShow = true;
+    },
+    async submit() {
+      if (!this.actionType) {
+        this.$Message.error("请选择操作类型!");
+        return;
+      }
+      if (this.actionType === "reject" && !this.selectedMarkers.length) {
+        this.$Message.error("请指定评卷员!");
+        return;
+      }
+      const datas = {
+        action: this.actionType,
+        level: this.levelInfo.selectedLevel,
+        originLevel: this.levelInfo.curLevel,
+        paperIds: this.levelInfo.paperIds,
+        stage: "LEVEL"
+      };
+      if (this.actionType === "reject")
+        datas.range = this.selectedMarkers.join();
+
+      if (this.isSubmit) return;
+      this.isSubmit = true;
+      let result = true;
+      const paper = await leaderGradingPaper(datas).catch(() => {
+        result = false;
+      });
+      this.isSubmit = false;
+
+      if (!result) return;
+
+      this.$Message.success("操作成功!");
+      this.$emit("modified", datas, paper);
+      this.cancel();
+    }
+  }
+};
+</script>

+ 4 - 2
src/modules/grading/leader/LeaderGrading.vue

@@ -534,7 +534,8 @@ export default {
       const data = await taskSnSearch(
         params.codeType,
         params.code,
-        this.filter.questionId
+        this.filter.questionId,
+        "LEVEL"
       );
       if (!data) {
         this.$Message.error("没有查找到结果!");
@@ -558,7 +559,8 @@ export default {
           action: levelInfo.markLeaderOnlyRight.action,
           level: levelInfo.selectedLevel,
           originLevel: levelInfo.curLevel,
-          paperIds: levelInfo.paperIds
+          paperIds: levelInfo.paperIds,
+          stage: "LEVEL"
         };
         if (datas.action === "reject") {
           datas.range = markers.map(item => item.id).join();

+ 1 - 1
src/modules/grading/marker/MarkerGrading.vue

@@ -501,7 +501,7 @@ export default {
       }
     },
     async passCurPaper() {
-      await paperTaskPass(this.curPaper.id);
+      await paperTaskPass(this.filter.stage, this.curPaper.id);
       this.toActionNextPaper();
     },
     imagePreviewClose() {

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

@@ -117,7 +117,8 @@ export default {
       this.loading = true;
       const res = await markTask({
         markTaskId: this.image.id,
-        isMark: !this.image.mark
+        isMark: !this.image.mark,
+        stage: this.stage
       }).catch(() => {});
       this.loading = false;
       if (!res) return;

+ 2 - 1
src/modules/grading/marker/MarkerStandard.vue

@@ -232,7 +232,8 @@ export default {
         action: "sampling",
         level: this.curSelectLevel,
         originLevel: this.curChangePaper.level,
-        paperIds: this.curChangePaper.id
+        paperIds: this.curChangePaper.id,
+        stage: "LEVEL"
       };
       let result = true;
       await leaderGradingPaper(datas).catch(() => {

+ 2 - 1
src/modules/mark/MarkDetail.vue

@@ -391,7 +391,8 @@ export default {
       const data = await taskSnSearch(
         params.codeType,
         params.code,
-        this.filter.questionId
+        this.filter.questionId,
+        "SCORE"
       );
       if (!data) {
         this.$Message.error("没有查找到结果!");

+ 1 - 1
src/modules/mark/MarkOperation.vue

@@ -451,7 +451,7 @@ export default {
       this.toActionNextPaper();
     },
     async passCurPaper(level) {
-      await paperTaskPass(this.curPaper.id);
+      await paperTaskPass("SCORE", this.curPaper.id);
       this.toActionNextPaper();
     },
     updateHistory() {

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

@@ -427,7 +427,8 @@ export default {
       const data = await taskSnSearch(
         params.codeType,
         params.code,
-        this.filter.questionId
+        this.filter.questionId,
+        "SCORE"
       );
       if (!data) {
         this.$Message.error("没有查找到结果!");

+ 1 - 1
src/modules/mark/marker/MarkerMarking.vue

@@ -481,7 +481,7 @@ export default {
       }
     },
     async passCurPaper() {
-      await paperTaskPass(this.curPaper.id);
+      await paperTaskPass("SCORE", this.curPaper.id);
       this.toActionNextPaper();
     },
     imagePreviewClose() {