zhangjie 2 年之前
父节点
当前提交
cc10963f8c

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

@@ -341,8 +341,6 @@
     justify-content: space-between;
   }
   .image-info {
-    white-space: nowrap;
-    overflow: hidden;
     flex-grow: 0;
     flex-shrink: 0;
     > div {
@@ -400,7 +398,6 @@
     }
   }
   .image-action {
-    width: 60px;
     flex-grow: 0;
     flex-shrink: 0;
     .ivu-btn {

+ 1 - 1
src/modules/grading-set/GradingLevelSet.vue

@@ -78,7 +78,7 @@
             <InputNumber
               v-model="level.weight"
               :min="1"
-              :max="100"
+              :max="1000"
               @on-blur="checkLevelValidate(level)"
               v-if="level.canEdit && workDetail.modifyOtherVal"
             ></InputNumber>

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

@@ -72,7 +72,7 @@
               </div>
             </div>
           </div>
-          <div class="part-page" v-if="total > size">
+          <div class="part-page">
             <Page
               :current="current"
               :total="total"

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

@@ -37,7 +37,9 @@
                 {{ paper.level }}
               </div>
             </div>
-            <div class="image-title">{{ paper.title }}</div>
+            <div class="image-title" :title="paper.title">
+              {{ paper.title }}
+            </div>
             <div v-if="canEditStandard" class="image-action">
               <Button
                 type="error"

+ 346 - 346
src/modules/inspection/InspectionGrading.vue

@@ -1,346 +1,346 @@
-<template>
-  <div class="inspection-grading page-container-flex">
-    <div class="part-box part-box-filter">
-      <Form ref="FilterForm" label-position="left" inline>
-        <FormItem>
-          <Select
-            v-model="filter.workId"
-            @on-change="workChange"
-            placeholder="工作文件夹"
-            style="width: 150px"
-          >
-            <Option
-              v-for="(work, windex) in works"
-              :key="windex"
-              :value="work.id"
-              :label="work.name"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem>
-          <Select
-            v-model="filter.subject"
-            @on-change="subjectChange"
-            placeholder="科目"
-          >
-            <Option
-              v-for="subject in subjects"
-              :key="subject.id"
-              :value="subject.subject"
-              :label="subject.name"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem>
-          <Select v-model="filter.questionId" placeholder="考区">
-            <Option
-              v-for="area in areas"
-              :key="area.id"
-              :value="area.id"
-              :label="area.areaName"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem>
-          <Select
-            v-model="filter.status"
-            placeholder="类型"
-            clearable
-            style="width: 120px"
-          >
-            <Option
-              v-for="(val, key) in CHANGE_LEVEL_STATUS"
-              :key="key"
-              :value="key * 1"
-              :label="val"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem>
-          <Button
-            type="primary"
-            class="btn-form-search"
-            size="small"
-            @click="toPage(1)"
-            >查询</Button
-          >
-        </FormItem>
-      </Form>
-    </div>
-
-    <div class="check-grade" v-if="papers.length">
-      <!-- paper-list -->
-      <div class="check-grade-body part-box">
-        <div class="check-grade-list image-view-list image-view-list-4">
-          <div
-            :class="[
-              'image-view',
-              { 'image-view-act': curPaperIndex === index }
-            ]"
-            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>
-          </div>
-        </div>
-        <div class="part-page" v-if="total > size">
-          <Page
-            :current="current"
-            :total="total"
-            :page-size="size"
-            show-total
-            show-elevator
-            @on-change="toPage"
-          ></Page>
-        </div>
-      </div>
-      <!-- action -->
-      <div
-        :class="[
-          'check-grade-action',
-          { 'check-grade-action-fullscreen': isFullscreenMarking }
-        ]"
-        v-if="curPaper.id"
-      >
-        <div class="action-paper-info">
-          <p>
-            <span>试卷考号:</span><span>{{ curPaper.examNumber }}</span>
-          </p>
-          <p>
-            <span>试卷密号:</span><span>NO.{{ curPaper.sn }}</span>
-          </p>
-        </div>
-        <div class="action-grade-info">
-          <p>
-            <span>原始档位:</span><span>{{ curPaper.originLevel }}</span>
-          </p>
-          <p>
-            <span>申请档位:</span><span>{{ curPaper.redoLevel }}</span>
-          </p>
-        </div>
-        <div
-          :class="[
-            'action-grade-result',
-            { 'action-grade-result-error': curPaper.auditStatus === 2 }
-          ]"
-          v-if="curPaper.auditStatus !== 0"
-        >
-          <p>{{ curPaper.auditStatus === 1 ? "同意改档" : "不同意改档" }}</p>
-        </div>
-        <div class="action-grade-btn" v-else>
-          <Button shape="circle" type="primary" @click="confirm(1)"
-            >同意改档</Button
-          >
-          <Button shape="circle" type="error" @click="confirm(2)"
-            >不同意改档</Button
-          >
-        </div>
-      </div>
-      <!-- 占位 -->
-      <div class="check-grade-action" v-if="isFullscreenMarking"></div>
-    </div>
-    <div class="check-grade" v-else>
-      <p class="check-grade-none">暂无数据</p>
-    </div>
-
-    <!-- image-preview -->
-    <simple-image-preview
-      class="check-grade-image-preview"
-      :cur-image="curPaper"
-      @on-prev="toPrevPaper"
-      @on-next="toNextPaper"
-      @on-close="isFullscreenMarking = false"
-      ref="SimpleImagePreview"
-    ></simple-image-preview>
-  </div>
-</template>
-
-<script>
-import {
-  changeLevelPaperList,
-  inspectionConfirmCheckGrade,
-  workList,
-  areaList
-} from "@/api";
-import SimpleImagePreview from "@/components/SimpleImagePreview";
-import { CHANGE_LEVEL_STATUS } from "@/constants/enumerate";
-
-export default {
-  name: "inspection-grading",
-  components: { SimpleImagePreview },
-  data() {
-    return {
-      filter: {
-        workId: "",
-        subject: "",
-        questionId: "",
-        status: 0,
-        type: 1
-      },
-      CHANGE_LEVEL_STATUS,
-      works: [],
-      subjects: [],
-      areas: [],
-      current: 1,
-      size: 8,
-      total: 0,
-      totalPage: 1,
-      papers: [],
-      curPaper: {},
-      curPaperIndex: 0,
-      isFullscreenMarking: false
-    };
-  },
-  mounted() {
-    this.initData();
-  },
-  methods: {
-    async initData() {
-      await this.getWorkList();
-      this.filter.workId = this.works[0].id;
-      this.workChange();
-      await this.getAreaList();
-      this.filter.questionId = this.areas[0].id;
-      this.getList();
-    },
-    async getWorkList() {
-      this.works = await workList();
-    },
-    async getAreaList() {
-      const data = await areaList({
-        workId: this.filter.workId,
-        subject: this.filter.subject
-      });
-      this.areas = data.map(item => {
-        return {
-          id: item.id,
-          areaName: item.areaName,
-          areaCode: item.areaCode
-        };
-      });
-    },
-    async getList() {
-      const datas = {
-        ...this.filter,
-        current: this.current,
-        size: this.size
-      };
-      const data = await changeLevelPaperList(datas);
-      this.papers = data.data.map(item => {
-        item.title = `NO.${item.sn}`;
-        return item;
-      });
-      this.total = data.totalCount;
-      this.totalPage = data.pageCount;
-      this.selectPaper(0);
-    },
-    toPage(page) {
-      this.current = page;
-      this.getList();
-    },
-    workChange() {
-      this.filter.subject = null;
-      this.filter.questionId = null;
-      const curWork = this.works.find(item => item.id === this.filter.workId);
-      this.subjects = curWork.subjects;
-      this.filter.subject = this.subjects[0].subject;
-      this.subjectChange();
-    },
-    subjectChange() {
-      this.areas = [];
-      this.filter.questionId = null;
-      this.getAreaList();
-    },
-    async confirm(isAgree) {
-      if (isAgree === 1) {
-        this.updateCheckGradeState(isAgree);
-        return;
-      }
-
-      this.$Modal.confirm({
-        content: "确定不同意当前改档吗?",
-        onOk: () => {
-          this.updateCheckGradeState(isAgree);
-        }
-      });
-    },
-    async updateCheckGradeState(auditStatus) {
-      await inspectionConfirmCheckGrade({
-        id: this.curPaper.id,
-        auditStatus,
-        userId: this.$ls.get("user", { id: "" }).id
-      });
-      this.toActionNextPaper();
-    },
-    // paper view action
-    toReview(index) {
-      this.isFullscreenMarking = true;
-      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.current > 1) {
-          this.current--;
-          this.curPaperIndex = this.size - 1;
-          await this.getList();
-        } else {
-          this.$Message.warning("当前已经是第一条数据了");
-          return;
-        }
-      } else {
-        this.curPaperIndex--;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    },
-    async toNextPaper() {
-      if (this.curPaperIndex === this.papers.length - 1) {
-        if (this.current === this.totalPage) {
-          this.$Message.warning("当前已经是最后一条数据了");
-          return;
-        } else {
-          this.current++;
-          this.curPaperIndex = 0;
-          await this.getList();
-        }
-      } else {
-        this.curPaperIndex++;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    },
-    async toActionNextPaper() {
-      if (this.current > 1 && this.papers.length === 1) {
-        this.current--;
-        this.curPaperIndex = this.size;
-      }
-
-      await this.getList();
-      if (!this.papers.length) this.$refs.SimpleImagePreview.cancel();
-      this.selectPaper(this.curPaperIndex);
-    }
-  }
-};
-</script>
+<template>
+  <div class="inspection-grading page-container-flex">
+    <div class="part-box part-box-filter">
+      <Form ref="FilterForm" label-position="left" inline>
+        <FormItem>
+          <Select
+            v-model="filter.workId"
+            @on-change="workChange"
+            placeholder="工作文件夹"
+            style="width: 150px"
+          >
+            <Option
+              v-for="(work, windex) in works"
+              :key="windex"
+              :value="work.id"
+              :label="work.name"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select
+            v-model="filter.subject"
+            @on-change="subjectChange"
+            placeholder="科目"
+          >
+            <Option
+              v-for="subject in subjects"
+              :key="subject.id"
+              :value="subject.subject"
+              :label="subject.name"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select v-model="filter.questionId" placeholder="考区">
+            <Option
+              v-for="area in areas"
+              :key="area.id"
+              :value="area.id"
+              :label="area.areaName"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select
+            v-model="filter.status"
+            placeholder="类型"
+            clearable
+            style="width: 120px"
+          >
+            <Option
+              v-for="(val, key) in CHANGE_LEVEL_STATUS"
+              :key="key"
+              :value="key * 1"
+              :label="val"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Button
+            type="primary"
+            class="btn-form-search"
+            size="small"
+            @click="toPage(1)"
+            >查询</Button
+          >
+        </FormItem>
+      </Form>
+    </div>
+
+    <div class="check-grade" v-if="papers.length">
+      <!-- paper-list -->
+      <div class="check-grade-body part-box">
+        <div class="check-grade-list image-view-list image-view-list-4">
+          <div
+            :class="[
+              'image-view',
+              { 'image-view-act': curPaperIndex === index }
+            ]"
+            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>
+          </div>
+        </div>
+        <div class="part-page">
+          <Page
+            :current="current"
+            :total="total"
+            :page-size="size"
+            show-total
+            show-elevator
+            @on-change="toPage"
+          ></Page>
+        </div>
+      </div>
+      <!-- action -->
+      <div
+        :class="[
+          'check-grade-action',
+          { 'check-grade-action-fullscreen': isFullscreenMarking }
+        ]"
+        v-if="curPaper.id"
+      >
+        <div class="action-paper-info">
+          <p>
+            <span>试卷考号:</span><span>{{ curPaper.examNumber }}</span>
+          </p>
+          <p>
+            <span>试卷密号:</span><span>NO.{{ curPaper.sn }}</span>
+          </p>
+        </div>
+        <div class="action-grade-info">
+          <p>
+            <span>原始档位:</span><span>{{ curPaper.originLevel }}</span>
+          </p>
+          <p>
+            <span>申请档位:</span><span>{{ curPaper.redoLevel }}</span>
+          </p>
+        </div>
+        <div
+          :class="[
+            'action-grade-result',
+            { 'action-grade-result-error': curPaper.auditStatus === 2 }
+          ]"
+          v-if="curPaper.auditStatus !== 0"
+        >
+          <p>{{ curPaper.auditStatus === 1 ? "同意改档" : "不同意改档" }}</p>
+        </div>
+        <div class="action-grade-btn" v-else>
+          <Button shape="circle" type="primary" @click="confirm(1)"
+            >同意改档</Button
+          >
+          <Button shape="circle" type="error" @click="confirm(2)"
+            >不同意改档</Button
+          >
+        </div>
+      </div>
+      <!-- 占位 -->
+      <div class="check-grade-action" v-if="isFullscreenMarking"></div>
+    </div>
+    <div class="check-grade" v-else>
+      <p class="check-grade-none">暂无数据</p>
+    </div>
+
+    <!-- image-preview -->
+    <simple-image-preview
+      class="check-grade-image-preview"
+      :cur-image="curPaper"
+      @on-prev="toPrevPaper"
+      @on-next="toNextPaper"
+      @on-close="isFullscreenMarking = false"
+      ref="SimpleImagePreview"
+    ></simple-image-preview>
+  </div>
+</template>
+
+<script>
+import {
+  changeLevelPaperList,
+  inspectionConfirmCheckGrade,
+  workList,
+  areaList
+} from "@/api";
+import SimpleImagePreview from "@/components/SimpleImagePreview";
+import { CHANGE_LEVEL_STATUS } from "@/constants/enumerate";
+
+export default {
+  name: "inspection-grading",
+  components: { SimpleImagePreview },
+  data() {
+    return {
+      filter: {
+        workId: "",
+        subject: "",
+        questionId: "",
+        status: 0,
+        type: 1
+      },
+      CHANGE_LEVEL_STATUS,
+      works: [],
+      subjects: [],
+      areas: [],
+      current: 1,
+      size: 8,
+      total: 0,
+      totalPage: 1,
+      papers: [],
+      curPaper: {},
+      curPaperIndex: 0,
+      isFullscreenMarking: false
+    };
+  },
+  mounted() {
+    this.initData();
+  },
+  methods: {
+    async initData() {
+      await this.getWorkList();
+      this.filter.workId = this.works[0].id;
+      this.workChange();
+      await this.getAreaList();
+      this.filter.questionId = this.areas[0].id;
+      this.getList();
+    },
+    async getWorkList() {
+      this.works = await workList();
+    },
+    async getAreaList() {
+      const data = await areaList({
+        workId: this.filter.workId,
+        subject: this.filter.subject
+      });
+      this.areas = data.map(item => {
+        return {
+          id: item.id,
+          areaName: item.areaName,
+          areaCode: item.areaCode
+        };
+      });
+    },
+    async getList() {
+      const datas = {
+        ...this.filter,
+        current: this.current,
+        size: this.size
+      };
+      const data = await changeLevelPaperList(datas);
+      this.papers = data.data.map(item => {
+        item.title = `NO.${item.sn}`;
+        return item;
+      });
+      this.total = data.totalCount;
+      this.totalPage = data.pageCount;
+      this.selectPaper(0);
+    },
+    toPage(page) {
+      this.current = page;
+      this.getList();
+    },
+    workChange() {
+      this.filter.subject = null;
+      this.filter.questionId = null;
+      const curWork = this.works.find(item => item.id === this.filter.workId);
+      this.subjects = curWork.subjects;
+      this.filter.subject = this.subjects[0].subject;
+      this.subjectChange();
+    },
+    subjectChange() {
+      this.areas = [];
+      this.filter.questionId = null;
+      this.getAreaList();
+    },
+    async confirm(isAgree) {
+      if (isAgree === 1) {
+        this.updateCheckGradeState(isAgree);
+        return;
+      }
+
+      this.$Modal.confirm({
+        content: "确定不同意当前改档吗?",
+        onOk: () => {
+          this.updateCheckGradeState(isAgree);
+        }
+      });
+    },
+    async updateCheckGradeState(auditStatus) {
+      await inspectionConfirmCheckGrade({
+        id: this.curPaper.id,
+        auditStatus,
+        userId: this.$ls.get("user", { id: "" }).id
+      });
+      this.toActionNextPaper();
+    },
+    // paper view action
+    toReview(index) {
+      this.isFullscreenMarking = true;
+      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.current > 1) {
+          this.current--;
+          this.curPaperIndex = this.size - 1;
+          await this.getList();
+        } else {
+          this.$Message.warning("当前已经是第一条数据了");
+          return;
+        }
+      } else {
+        this.curPaperIndex--;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    },
+    async toNextPaper() {
+      if (this.curPaperIndex === this.papers.length - 1) {
+        if (this.current === this.totalPage) {
+          this.$Message.warning("当前已经是最后一条数据了");
+          return;
+        } else {
+          this.current++;
+          this.curPaperIndex = 0;
+          await this.getList();
+        }
+      } else {
+        this.curPaperIndex++;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    },
+    async toActionNextPaper() {
+      if (this.current > 1 && this.papers.length === 1) {
+        this.current--;
+        this.curPaperIndex = this.size;
+      }
+
+      await this.getList();
+      if (!this.papers.length) this.$refs.SimpleImagePreview.cancel();
+      this.selectPaper(this.curPaperIndex);
+    }
+  }
+};
+</script>

+ 1 - 1
src/modules/main/PaperManage.vue

@@ -118,7 +118,7 @@
       ref="ImageActionList"
     ></image-action-list>
 
-    <div class="part-page" v-if="total > size">
+    <div class="part-page">
       <Page
         :current="current"
         :total="total"

+ 1 - 1
src/modules/main/StudentManage.vue

@@ -147,7 +147,7 @@
       border
     ></Table>
 
-    <div class="part-page" v-if="total > size">
+    <div class="part-page">
       <Page
         :current="current"
         :total="total"

+ 330 - 330
src/modules/main/StudentScore.vue

@@ -1,330 +1,330 @@
-<template>
-  <div class="student-score">
-    <div class="part-box part-box-filter">
-      <Form ref="FilterForm" label-position="left" inline>
-        <FormItem v-if="IS_INSPECTION">
-          <Select
-            v-model="filter.workId"
-            @on-change="workChange"
-            placeholder="工作文件夹"
-            style="width: 150px"
-          >
-            <Option
-              v-for="(work, windex) in works"
-              :key="windex"
-              :value="work.id"
-              :label="work.name"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem>
-          <Select
-            v-model="filter.subject"
-            @on-change="subjecChange"
-            placeholder="科目"
-            style="width: 100px;"
-            clearable
-          >
-            <Option
-              v-for="(item, index) in subjects"
-              :key="index"
-              :value="item.subject"
-              :label="item.name"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem v-if="IS_INSPECTION">
-          <Select v-model="filter.questionId" placeholder="考区">
-            <Option
-              v-for="area in areas"
-              :key="area.id"
-              :value="area.id"
-              :label="area.areaName"
-            ></Option>
-          </Select>
-        </FormItem>
-
-        <FormItem>
-          <Select
-            v-model="filter.type"
-            placeholder="号码类型"
-            style="width: 100px"
-          >
-            <Option
-              v-for="(val, key) in CODE_TYPE"
-              :key="key"
-              :value="key"
-              :label="val"
-            ></Option>
-          </Select>
-        </FormItem>
-        <FormItem>
-          <Input
-            v-model.trim="filter.number"
-            placeholder="输入号码"
-            clearable
-          ></Input>
-        </FormItem>
-        <FormItem>
-          <Input
-            v-model.trim="filter.studentName"
-            placeholder="输入姓名"
-            clearable
-          ></Input>
-        </FormItem>
-        <FormItem>
-          <Button
-            class="btn-form-search"
-            size="small"
-            type="primary"
-            @click="toSearch"
-            >查询</Button
-          >
-        </FormItem>
-      </Form>
-    </div>
-
-    <div class="student-score-content" v-if="curStudent.name">
-      <div class="score-content-head">
-        <h1 class="score-content-title">{{ curStudent.name }}</h1>
-        <p class="score-content-info">
-          <span>考号:</span><span>{{ curStudent.examNumber }}</span>
-        </p>
-        <p class="score-content-tscore">
-          <span>总分:</span><span>{{ curStudent.sumScore }}</span>
-        </p>
-      </div>
-      <div class="score-content-body">
-        <image-action-list
-          :data="papers"
-          :column-number="papers.length"
-          @on-review="toReview"
-          ref="ImageActionList"
-        ></image-action-list>
-
-        <table :class="['table', `table-column-${papers.length}`]">
-          <tr>
-            <td v-for="(paper, sindex) in papers" :key="sindex">
-              <div class="score-content-task">
-                <div class="task-list">
-                  <div class="task-item">
-                    <div class="task-item-label">试卷密号:</div>
-                    <div class="task-item-content">
-                      {{ paper.secretNumber }}
-                    </div>
-                  </div>
-                  <div class="task-item">
-                    <div class="task-item-label">任务密号:</div>
-                    <div class="task-item-content">
-                      <p v-for="task in paper.taskList" :key="task.id">
-                        {{ task.secretNumber }}({{ task.markerName }})
-                      </p>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </td>
-          </tr>
-          <tr>
-            <td
-              class="color-dark"
-              v-for="(paper, sindex) in papers"
-              :key="sindex"
-            >
-              {{ paper.level || "空" }}
-            </td>
-          </tr>
-          <tr>
-            <td
-              class="color-error"
-              v-for="(paper, sindex) in papers"
-              :key="sindex"
-            >
-              {{ paper.score ? paper.score + "分" : "空" }}
-            </td>
-          </tr>
-        </table>
-      </div>
-    </div>
-
-    <div class="part-page" v-if="total > size">
-      <Page
-        :current="current"
-        :total="total"
-        :page-size="size"
-        show-total
-        show-elevator
-        @on-change="toPage"
-      ></Page>
-    </div>
-
-    <!-- image-preview -->
-    <simple-image-preview
-      :cur-image="curPaper"
-      @on-prev="toPrevPaper"
-      @on-next="toNextPaper"
-      ref="SimpleImagePreview"
-    ></simple-image-preview>
-  </div>
-</template>
-
-<script>
-import { studentScoreList, workList, subjectList, areaList } from "@/api";
-import { CODE_TYPE } from "@/constants/enumerate";
-import ImageActionList from "./components/ImageActionList";
-import SimpleImagePreview from "@/components/SimpleImagePreview";
-
-export default {
-  name: "student-score",
-  components: { ImageActionList, SimpleImagePreview },
-  data() {
-    return {
-      filter: {
-        workId: this.$route.params && this.$route.params.workId,
-        subject: "",
-        questionId: "",
-        type: "examNumber",
-        number: "",
-        studentName: ""
-      },
-      CODE_TYPE,
-      IS_INSPECTION: false,
-      works: [],
-      subjects: [],
-      areas: [],
-      current: 1,
-      total: 0,
-      size: 1,
-      curStudent: { name: "" },
-      students: [],
-      // image preview
-      papers: [],
-      curPaper: {},
-      curPaperIndex: 0
-    };
-  },
-  mounted() {
-    this.initData();
-  },
-  methods: {
-    async initData() {
-      this.IS_INSPECTION =
-        this.$ls.get("user", { role: "" }).role === "INSPECTION";
-      if (this.IS_INSPECTION) {
-        await this.getWorkList();
-        this.filter.workId = this.works[0].id;
-        this.workChange();
-        this.getAreaList();
-      } else {
-        await this.getSubjects();
-        // this.filter.subject = this.subjects[0].subject;
-        if (this.$route.query && this.$route.query.examNumber) {
-          this.filter.number = this.$route.query.examNumber;
-          this.toSearch();
-        }
-      }
-    },
-    async getWorkList() {
-      this.works = await workList();
-    },
-    async getSubjects() {
-      const data = await subjectList(this.filter.workId);
-      this.subjects = data.filter(item => item.enable);
-    },
-    async getAreaList() {
-      const data = await areaList({
-        workId: this.filter.workId,
-        subject: this.filter.subject
-      });
-      this.areas = data.map(item => {
-        return {
-          id: item.id,
-          areaName: item.areaName,
-          areaCode: item.areaCode
-        };
-      });
-    },
-    async toSearch() {
-      if (!this.filter.number && !this.filter.studentName) {
-        this.$Message.error("号码和姓名必须填写一个");
-        return;
-      }
-      const data = await studentScoreList(this.filter);
-      if (!data.length) {
-        this.$Message.error("无此考生");
-        return;
-      }
-      this.students = data;
-      this.total = this.students.length;
-      this.toPage(1);
-    },
-    toPage(page) {
-      if (!this.students[page - 1]) return;
-      this.current = page;
-      this.curStudent = this.students[page - 1];
-      this.papers = this.curStudent.papers.map(item => {
-        let nitem = { ...item };
-        nitem.key = this.$randomCode();
-        nitem.imgSrc = item.sheetSrc;
-        nitem.thumbSrc = item.sheetSrc;
-        const fields = ["taskScores", "taskLevels"];
-        const validField = fields.find(
-          field => item[field] && item[field].length
-        );
-        nitem.taskList = validField ? item[validField] : [];
-        return nitem;
-      });
-    },
-    workChange() {
-      this.filter.subject = null;
-      this.filter.questionId = null;
-      const curWork = this.works.find(item => item.id === this.filter.workId);
-      this.subjects = curWork.subjects;
-      this.filter.subject = this.subjects[0].subject;
-    },
-    subjecChange() {
-      if (this.IS_INSPECTION) {
-        this.filter.questionId = null;
-        this.getAreaList();
-      }
-    },
-    // paper view
-    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) {
-        this.$Message.warning("当前已经是第一条数据了");
-        return;
-      } else {
-        this.curPaperIndex--;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    },
-    async toNextPaper() {
-      if (this.curPaperIndex === this.papers.length - 1) {
-        this.$Message.warning("当前已经是最后一条数据了");
-        return;
-      } else {
-        this.curPaperIndex++;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    }
-  }
-};
-</script>
+<template>
+  <div class="student-score">
+    <div class="part-box part-box-filter">
+      <Form ref="FilterForm" label-position="left" inline>
+        <FormItem v-if="IS_INSPECTION">
+          <Select
+            v-model="filter.workId"
+            @on-change="workChange"
+            placeholder="工作文件夹"
+            style="width: 150px"
+          >
+            <Option
+              v-for="(work, windex) in works"
+              :key="windex"
+              :value="work.id"
+              :label="work.name"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Select
+            v-model="filter.subject"
+            @on-change="subjecChange"
+            placeholder="科目"
+            style="width: 100px;"
+            clearable
+          >
+            <Option
+              v-for="(item, index) in subjects"
+              :key="index"
+              :value="item.subject"
+              :label="item.name"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem v-if="IS_INSPECTION">
+          <Select v-model="filter.questionId" placeholder="考区">
+            <Option
+              v-for="area in areas"
+              :key="area.id"
+              :value="area.id"
+              :label="area.areaName"
+            ></Option>
+          </Select>
+        </FormItem>
+
+        <FormItem>
+          <Select
+            v-model="filter.type"
+            placeholder="号码类型"
+            style="width: 100px"
+          >
+            <Option
+              v-for="(val, key) in CODE_TYPE"
+              :key="key"
+              :value="key"
+              :label="val"
+            ></Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Input
+            v-model.trim="filter.number"
+            placeholder="输入号码"
+            clearable
+          ></Input>
+        </FormItem>
+        <FormItem>
+          <Input
+            v-model.trim="filter.studentName"
+            placeholder="输入姓名"
+            clearable
+          ></Input>
+        </FormItem>
+        <FormItem>
+          <Button
+            class="btn-form-search"
+            size="small"
+            type="primary"
+            @click="toSearch"
+            >查询</Button
+          >
+        </FormItem>
+      </Form>
+    </div>
+
+    <div class="student-score-content" v-if="curStudent.name">
+      <div class="score-content-head">
+        <h1 class="score-content-title">{{ curStudent.name }}</h1>
+        <p class="score-content-info">
+          <span>考号:</span><span>{{ curStudent.examNumber }}</span>
+        </p>
+        <p class="score-content-tscore">
+          <span>总分:</span><span>{{ curStudent.sumScore }}</span>
+        </p>
+      </div>
+      <div class="score-content-body">
+        <image-action-list
+          :data="papers"
+          :column-number="papers.length"
+          @on-review="toReview"
+          ref="ImageActionList"
+        ></image-action-list>
+
+        <table :class="['table', `table-column-${papers.length}`]">
+          <tr>
+            <td v-for="(paper, sindex) in papers" :key="sindex">
+              <div class="score-content-task">
+                <div class="task-list">
+                  <div class="task-item">
+                    <div class="task-item-label">试卷密号:</div>
+                    <div class="task-item-content">
+                      {{ paper.secretNumber }}
+                    </div>
+                  </div>
+                  <div class="task-item">
+                    <div class="task-item-label">任务密号:</div>
+                    <div class="task-item-content">
+                      <p v-for="task in paper.taskList" :key="task.id">
+                        {{ task.secretNumber }}({{ task.markerName }})
+                      </p>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </td>
+          </tr>
+          <tr>
+            <td
+              class="color-dark"
+              v-for="(paper, sindex) in papers"
+              :key="sindex"
+            >
+              {{ paper.level || "空" }}
+            </td>
+          </tr>
+          <tr>
+            <td
+              class="color-error"
+              v-for="(paper, sindex) in papers"
+              :key="sindex"
+            >
+              {{ paper.score ? paper.score + "分" : "空" }}
+            </td>
+          </tr>
+        </table>
+      </div>
+    </div>
+
+    <div class="part-page" v-if="total > size">
+      <Page
+        :current="current"
+        :total="total"
+        :page-size="size"
+        show-total
+        show-elevator
+        @on-change="toPage"
+      ></Page>
+    </div>
+
+    <!-- image-preview -->
+    <simple-image-preview
+      :cur-image="curPaper"
+      @on-prev="toPrevPaper"
+      @on-next="toNextPaper"
+      ref="SimpleImagePreview"
+    ></simple-image-preview>
+  </div>
+</template>
+
+<script>
+import { studentScoreList, workList, subjectList, areaList } from "@/api";
+import { CODE_TYPE } from "@/constants/enumerate";
+import ImageActionList from "./components/ImageActionList";
+import SimpleImagePreview from "@/components/SimpleImagePreview";
+
+export default {
+  name: "student-score",
+  components: { ImageActionList, SimpleImagePreview },
+  data() {
+    return {
+      filter: {
+        workId: this.$route.params && this.$route.params.workId,
+        subject: "",
+        questionId: "",
+        type: "examNumber",
+        number: "",
+        studentName: ""
+      },
+      CODE_TYPE,
+      IS_INSPECTION: false,
+      works: [],
+      subjects: [],
+      areas: [],
+      current: 1,
+      total: 0,
+      size: 1,
+      curStudent: { name: "" },
+      students: [],
+      // image preview
+      papers: [],
+      curPaper: {},
+      curPaperIndex: 0
+    };
+  },
+  mounted() {
+    this.initData();
+  },
+  methods: {
+    async initData() {
+      this.IS_INSPECTION =
+        this.$ls.get("user", { role: "" }).role === "INSPECTION";
+      if (this.IS_INSPECTION) {
+        await this.getWorkList();
+        this.filter.workId = this.works[0].id;
+        this.workChange();
+        this.getAreaList();
+      } else {
+        await this.getSubjects();
+        // this.filter.subject = this.subjects[0].subject;
+        if (this.$route.query && this.$route.query.examNumber) {
+          this.filter.number = this.$route.query.examNumber;
+          this.toSearch();
+        }
+      }
+    },
+    async getWorkList() {
+      this.works = await workList();
+    },
+    async getSubjects() {
+      const data = await subjectList(this.filter.workId);
+      this.subjects = data.filter(item => item.enable);
+    },
+    async getAreaList() {
+      const data = await areaList({
+        workId: this.filter.workId,
+        subject: this.filter.subject
+      });
+      this.areas = data.map(item => {
+        return {
+          id: item.id,
+          areaName: item.areaName,
+          areaCode: item.areaCode
+        };
+      });
+    },
+    async toSearch() {
+      if (!this.filter.number && !this.filter.studentName) {
+        this.$Message.error("号码和姓名必须填写一个");
+        return;
+      }
+      const data = await studentScoreList(this.filter);
+      if (!data.length) {
+        this.$Message.error("无此考生");
+        return;
+      }
+      this.students = data;
+      this.total = this.students.length;
+      this.toPage(1);
+    },
+    toPage(page) {
+      if (!this.students[page - 1]) return;
+      this.current = page;
+      this.curStudent = this.students[page - 1];
+      this.papers = this.curStudent.papers.map(item => {
+        let nitem = { ...item };
+        nitem.key = this.$randomCode();
+        nitem.imgSrc = item.sheetSrc;
+        nitem.thumbSrc = item.sheetSrc;
+        const fields = ["taskScores", "taskLevels"];
+        const validField = fields.find(
+          field => item[field] && item[field].length
+        );
+        nitem.taskList = validField ? item[validField] : [];
+        return nitem;
+      });
+    },
+    workChange() {
+      this.filter.subject = null;
+      this.filter.questionId = null;
+      const curWork = this.works.find(item => item.id === this.filter.workId);
+      this.subjects = curWork.subjects;
+      this.filter.subject = this.subjects[0].subject;
+    },
+    subjecChange() {
+      if (this.IS_INSPECTION) {
+        this.filter.questionId = null;
+        this.getAreaList();
+      }
+    },
+    // paper view
+    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) {
+        this.$Message.warning("当前已经是第一条数据了");
+        return;
+      } else {
+        this.curPaperIndex--;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    },
+    async toNextPaper() {
+      if (this.curPaperIndex === this.papers.length - 1) {
+        this.$Message.warning("当前已经是最后一条数据了");
+        return;
+      } else {
+        this.curPaperIndex++;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    }
+  }
+};
+</script>

+ 1 - 1
src/modules/main/components/CheckDataResult.vue

@@ -15,7 +15,7 @@
       border
     ></Table>
 
-    <div class="part-page" v-if="total > size">
+    <div class="part-page">
       <Page
         :current="current"
         :total="total"

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

@@ -52,7 +52,7 @@
               </div>
             </div>
           </div>
-          <div class="part-page" v-if="total > size">
+          <div class="part-page">
             <Page
               :current="current"
               :total="total"

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

@@ -1,493 +1,493 @@
-<template>
-  <div class="mark-operation grading-operation home">
-    <view-header> </view-header>
-    <div class="home-body">
-      <div class="home-main grading-detail">
-        <div class="grading-detail page-container-flex">
-          <grade-filter
-            ref="GradeFilter"
-            :data="workSubject"
-            @change="areaChange"
-          ></grade-filter>
-          <mark-step
-            :steps="steps"
-            :init-step="curStep"
-            :show-top-number="false"
-            @on-change="stepChange"
-            ref="MarkStep"
-            v-if="steps.levelStep"
-          ></mark-step>
-          <div class="detail-body clear-float">
-            <!-- detail-papers -->
-            <div :class="detailPapersClasses">
-              <div class="detail-papers-carousel">
-                <grade-history-paper
-                  :question-id="filter.questionId"
-                  stage="SCORE"
-                  @on-paper-click="toViewCarouselPaper"
-                  v-if="filter.questionId"
-                  ref="GradeHistoryPaper"
-                ></grade-history-paper>
-              </div>
-              <div class="detail-papers-list" v-if="papers.length">
-                <div :class="imageViewClasses">
-                  <div
-                    :class="[
-                      'image-view',
-                      { 'image-view-act': curPaperIndex === index }
-                    ]"
-                    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)"
-                        />
-                        <span
-                          class="image-info"
-                          v-if="image.score || image.score === 0"
-                          >{{ image.score }}分</span
-                        >
-                      </div>
-                    </div>
-                  </div>
-                </div>
-                <div class="part-page" v-if="total > size">
-                  <Page
-                    :current="current"
-                    :total="total"
-                    :page-size="size"
-                    show-total
-                    show-elevator
-                    :page-size-opts="[4, 6, 8]"
-                    @on-page-size-change="pageSizeChange"
-                    @on-change="toPage"
-                  ></Page>
-                </div>
-              </div>
-              <div class="detail-papers-list" v-else>
-                <p class="detail-papers-none">暂无数据</p>
-              </div>
-            </div>
-            <!-- detail-aciton -->
-            <div
-              :class="[
-                'detail-action',
-                { 'detail-action-fullscreen': isFullscreenMarking }
-              ]"
-            >
-              <mark-action
-                :cur-paper-or-task="curPaper"
-                :levels="levels"
-                @on-leader-level="gradingCurPaper"
-                @on-select-score="scoreCurPaper"
-                @on-pass="passCurPaper"
-                ref="GradeAction"
-                v-if="curPaper.id"
-              ></mark-action>
-            </div>
-            <!-- 占位 -->
-            <div class="detail-action" v-if="isFullscreenMarking"></div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- image-preview -->
-    <simple-image-preview
-      class="grading-operation-image-preview"
-      :cur-image="curPaper"
-      @on-prev="toPrevPaper"
-      @on-next="toNextPaper"
-      @on-close="isFullscreenMarking = false"
-      ref="SimpleImagePreview"
-    ></simple-image-preview>
-
-    <!-- carousel paper review -->
-    <simple-image-preview
-      class="grading-operation-image-preview"
-      :cur-image="curPaper"
-      @on-prev="toCarousePaper('prev')"
-      @on-next="toCarousePaper('next')"
-      @on-close="carouseImagePreviewClose"
-      ref="CarouselPapersPreview"
-    ></simple-image-preview>
-  </div>
-</template>
-
-<script>
-import {
-  getParamsSet,
-  markerTaskList,
-  markerChangeLevelPaperList,
-  markerScoreTotalStatData,
-  workLevelList,
-  paperSelectLevelOrScore,
-  paperTaskPass
-} from "@/api";
-import SimpleImagePreview from "@/components/SimpleImagePreview";
-import MarkStep from "./components/MarkStep";
-import GradeFilter from "../grading/components/GradeFilter";
-import GradeHistoryPaper from "../grading/components/GradeHistoryPaper";
-import MarkAction from "./components/MarkAction";
-// 三种情况:
-// 管理员(ADMIN),科组长(MARK_LEADER),评卷员(MARKER)
-// 评卷员:操作记录,试卷列表,操作盘(打分)
-
-// TIP:不考虑管理员、科组长的情况
-// 管理员:试卷列表,操作盘
-// 科组长:操作记录,试卷列表,操作盘(改档)
-
-export default {
-  name: "mark-operation",
-  components: {
-    SimpleImagePreview,
-    MarkStep,
-    GradeFilter,
-    GradeHistoryPaper,
-    MarkAction
-  },
-  data() {
-    return {
-      filter: {
-        markerId: this.$ls.get("user").id,
-        questionId: ""
-      },
-      typeFilter: {
-        undo: {
-          sort: "paper.level",
-          stage: "SCORE"
-        },
-        done: {
-          level: "",
-          sort: "updatedOn,desc",
-          stage: "SCORE"
-        },
-        shift: {
-          isShift: true,
-          isShiftScore: false
-        },
-        shiftScore: {
-          isShift: false,
-          isShiftScore: true
-        }
-      },
-      workId: this.$route.params.workId,
-      subjectId: this.$route.params.subjectId,
-      subject: "",
-      workSubject: {},
-      curSubject: {},
-      curUserRoleType: "MARKER",
-      changeStage: 0, // 是否显示改档及改档打分
-      current: 1,
-      size: 6,
-      total: 0,
-      totalPage: 1,
-      curStep: null,
-      curStandardGradeId: "",
-      steps: [],
-      levels: [],
-      curArea: {},
-      papers: [],
-      curPaper: {},
-      curPaperIndex: 0,
-      // carousel paper review,
-      carouselPapers: [],
-      curCarouselPaperIndex: 0,
-      isFullscreenMarking: false
-    };
-  },
-  computed: {
-    detailPapersClasses() {
-      return ["detail-papers", `detail-papers-col-${1 + this.size / 2}`];
-    },
-    imageViewClasses() {
-      return ["image-view-list", `image-view-list-${this.size / 2}`];
-    }
-  },
-  created() {
-    this.subject = this.subjectId.split("-")[1];
-    this.workSubject = {
-      workId: this.workId,
-      subject: this.subject
-    };
-    this.initData();
-  },
-  methods: {
-    initData() {
-      this.getWorkLevels();
-      this.getParamsSetInfo();
-    },
-    async getParamsSetInfo() {
-      const data = await getParamsSet(this.workId);
-      this.changeStage = data.changeStage;
-    },
-    async getList() {
-      const datas = {
-        ...this.filter,
-        ...this.typeFilter[this.curStep.type],
-        workId: this.workId,
-        page: this.current - 1,
-        size: this.size
-      };
-      if (this.curStep.type === "done") {
-        datas.level = this.curStep.name;
-      }
-      const requestAction = this.curStep.type.includes("shift")
-        ? markerChangeLevelPaperList
-        : markerTaskList;
-
-      const data = await requestAction(datas);
-      this.papers = data.data.map(paper => {
-        paper.title = `NO.${paper.sn}`;
-        return paper;
-      });
-      this.total = data.totalCount;
-      this.totalPage = data.pageCount;
-    },
-    async toPage(page) {
-      this.current = page;
-      await this.getList();
-      this.selectPaper(this.curPaperIndex);
-    },
-    async getStepLevels() {
-      const data = await markerScoreTotalStatData(
-        this.filter.markerId,
-        this.filter.questionId
-      );
-      const undoIndex = data.findIndex(item => item.id === null);
-      let otherStep = [];
-      let undo = {
-        count: 0,
-        shift: 0,
-        shiftScore: 0
-      };
-      if (undoIndex !== -1) {
-        undo = { ...data[undoIndex] };
-        data.splice(undoIndex, 1);
-      }
-      otherStep.push({
-        name: "待评",
-        count: undo.count,
-        type: "undo"
-      });
-
-      if (this.changeStage) {
-        otherStep.push({
-          name: "改档",
-          count: undo.shift,
-          type: "shift"
-        });
-        otherStep.push({
-          name: "改档打分",
-          count: undo.shiftScore,
-          type: "shiftScore"
-        });
-      }
-      let levelStep = data.map(item => {
-        return {
-          ...item,
-          name: item.id,
-          type: "done"
-        };
-      });
-      this.steps = { levelStep, otherStep };
-
-      if (!this.curStep) {
-        let curStep = {};
-        if (undoIndex === -1) {
-          curStep = levelStep[0];
-        } else {
-          curStep = otherStep[0];
-        }
-        this.curStep = curStep;
-      }
-    },
-    updateStepLevel(curStep, curLevel, count = 1) {
-      if (curStep.type === "done") return;
-
-      const opos = this.steps.otherStep.findIndex(
-        item => item.type === curStep.type
-      );
-      this.steps.otherStep[opos].count -= count;
-
-      if (curStep.type === "shift") {
-        const spos = this.steps.otherStep.findIndex(
-          item => item.type === "shiftScore"
-        );
-        this.steps.otherStep[spos].count += count;
-      } else {
-        const pos = this.steps.levelStep.findIndex(
-          item => item.name === curLevel
-        );
-        this.steps.levelStep[pos].count += count;
-      }
-    },
-    async getWorkLevels() {
-      const data = await workLevelList(this.workId);
-      this.levels = data.map(item => {
-        return {
-          ...item,
-          name: item.code
-        };
-      });
-    },
-    pageSizeChange(size) {
-      this.size = size;
-      this.toPage(1);
-      this.getStepLevels();
-    },
-    async stepChange(step) {
-      this.curStep = step;
-      this.current = 1;
-      await this.getList();
-      this.getStepLevels();
-      if (this.papers.length) {
-        this.selectPaper(0);
-      } else {
-        this.curPaper = {};
-      }
-    },
-    async areaChange(curArea) {
-      this.curArea = curArea;
-      this.filter.questionId = curArea.id;
-      await this.getStepLevels();
-      this.toPage(1);
-      this.updateHistory();
-    },
-    toReview(index) {
-      this.isFullscreenMarking = true;
-      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;
-      }
-      const lastPaper = { ...this.curPaper };
-      this.curPaperIndex = nindex;
-      this.curPaper = this.papers[nindex] ? { ...this.papers[nindex] } : {};
-
-      // 待评时,检查当前试卷是否已经切换档位
-      if (
-        this.curStep.type === "undo" &&
-        this.curPaper["level"] &&
-        this.curPaper["level"] !== lastPaper["level"]
-      ) {
-        this.$Modal.info({
-          content: `即将打分档位:${this.curPaper.level}`
-        });
-      }
-    },
-    async toPrevPaper() {
-      if (this.curPaperIndex === 0) {
-        if (this.current > 1) {
-          this.current--;
-          this.curPaperIndex = this.size - 1;
-          await this.getList();
-        } else {
-          this.$Message.warning("当前已经是第一条数据了");
-          return;
-        }
-      } else {
-        this.curPaperIndex--;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    },
-    async toNextPaper() {
-      if (this.curPaperIndex === this.papers.length - 1) {
-        if (this.current === this.totalPage) {
-          this.$Message.warning("当前已经是最后一条数据了");
-          return;
-        } else {
-          this.current++;
-          this.curPaperIndex = 0;
-          await this.getList();
-        }
-      } else {
-        this.curPaperIndex++;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    },
-    async toActionNextPaper() {
-      if (this.current > 1 && this.papers.length === 1) {
-        this.current--;
-        this.curPaperIndex = this.size;
-      }
-
-      await this.getList();
-      if (!this.papers.length) this.$refs.SimpleImagePreview.cancel();
-      this.selectPaper(this.curPaperIndex);
-    },
-    async gradingCurPaper({ selectedLevel }) {
-      // 确认改档
-      await paperSelectLevelOrScore(
-        this.curPaper.id, // is taskId
-        selectedLevel,
-        "LEVEL"
-      );
-      this.updateStepLevel(this.curStep, "shiftScore");
-      this.toActionNextPaper();
-    },
-    async scoreCurPaper(score) {
-      const paper = await paperSelectLevelOrScore(
-        this.curPaper.id, // is taskId
-        score,
-        "SCORE"
-      );
-      this.updateStepLevel(this.curStep, this.curPaper.level);
-      this.updateCacheHistory([paper]);
-      this.toActionNextPaper();
-    },
-    async passCurPaper(level) {
-      await paperTaskPass(this.curPaper.id);
-      this.toActionNextPaper();
-    },
-    updateHistory() {
-      this.$refs.GradeHistoryPaper.updatePapers();
-    },
-    updateCacheHistory(papers) {
-      this.$refs.GradeHistoryPaper.updateCachePapers(papers);
-    },
-    // paper carousel
-    toViewCarouselPaper(paperIndex, papers) {
-      this.isFullscreenMarking = true;
-      this.carouselPapers = papers;
-      this.selectCarouselPaper(paperIndex);
-      this.$nextTick(() => {
-        this.$refs.CarouselPapersPreview.open();
-      });
-    },
-    selectCarouselPaper(index) {
-      this.curCarouselPaperIndex = index;
-      this.curPaper = { ...this.carouselPapers[index] };
-    },
-    toCarousePaper(type) {
-      if (type === "prev" && this.curCarouselPaperIndex > 0) {
-        this.curCarouselPaperIndex--;
-      } else if (
-        type === "next" &&
-        this.curCarouselPaperIndex < this.carouselPapers.length - 1
-      ) {
-        this.curCarouselPaperIndex++;
-      }
-      this.selectCarouselPaper(this.curCarouselPaperIndex);
-    },
-    carouseImagePreviewClose() {
-      this.isFullscreenMarking = false;
-      this.selectPaper(this.curPaperIndex);
-    }
-  }
-};
-</script>
+<template>
+  <div class="mark-operation grading-operation home">
+    <view-header> </view-header>
+    <div class="home-body">
+      <div class="home-main grading-detail">
+        <div class="grading-detail page-container-flex">
+          <grade-filter
+            ref="GradeFilter"
+            :data="workSubject"
+            @change="areaChange"
+          ></grade-filter>
+          <mark-step
+            :steps="steps"
+            :init-step="curStep"
+            :show-top-number="false"
+            @on-change="stepChange"
+            ref="MarkStep"
+            v-if="steps.levelStep"
+          ></mark-step>
+          <div class="detail-body clear-float">
+            <!-- detail-papers -->
+            <div :class="detailPapersClasses">
+              <div class="detail-papers-carousel">
+                <grade-history-paper
+                  :question-id="filter.questionId"
+                  stage="SCORE"
+                  @on-paper-click="toViewCarouselPaper"
+                  v-if="filter.questionId"
+                  ref="GradeHistoryPaper"
+                ></grade-history-paper>
+              </div>
+              <div class="detail-papers-list" v-if="papers.length">
+                <div :class="imageViewClasses">
+                  <div
+                    :class="[
+                      'image-view',
+                      { 'image-view-act': curPaperIndex === index }
+                    ]"
+                    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)"
+                        />
+                        <span
+                          class="image-info"
+                          v-if="image.score || image.score === 0"
+                          >{{ image.score }}分</span
+                        >
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <div class="part-page">
+                  <Page
+                    :current="current"
+                    :total="total"
+                    :page-size="size"
+                    show-total
+                    show-elevator
+                    :page-size-opts="[4, 6, 8]"
+                    @on-page-size-change="pageSizeChange"
+                    @on-change="toPage"
+                  ></Page>
+                </div>
+              </div>
+              <div class="detail-papers-list" v-else>
+                <p class="detail-papers-none">暂无数据</p>
+              </div>
+            </div>
+            <!-- detail-aciton -->
+            <div
+              :class="[
+                'detail-action',
+                { 'detail-action-fullscreen': isFullscreenMarking }
+              ]"
+            >
+              <mark-action
+                :cur-paper-or-task="curPaper"
+                :levels="levels"
+                @on-leader-level="gradingCurPaper"
+                @on-select-score="scoreCurPaper"
+                @on-pass="passCurPaper"
+                ref="GradeAction"
+                v-if="curPaper.id"
+              ></mark-action>
+            </div>
+            <!-- 占位 -->
+            <div class="detail-action" v-if="isFullscreenMarking"></div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- image-preview -->
+    <simple-image-preview
+      class="grading-operation-image-preview"
+      :cur-image="curPaper"
+      @on-prev="toPrevPaper"
+      @on-next="toNextPaper"
+      @on-close="isFullscreenMarking = false"
+      ref="SimpleImagePreview"
+    ></simple-image-preview>
+
+    <!-- carousel paper review -->
+    <simple-image-preview
+      class="grading-operation-image-preview"
+      :cur-image="curPaper"
+      @on-prev="toCarousePaper('prev')"
+      @on-next="toCarousePaper('next')"
+      @on-close="carouseImagePreviewClose"
+      ref="CarouselPapersPreview"
+    ></simple-image-preview>
+  </div>
+</template>
+
+<script>
+import {
+  getParamsSet,
+  markerTaskList,
+  markerChangeLevelPaperList,
+  markerScoreTotalStatData,
+  workLevelList,
+  paperSelectLevelOrScore,
+  paperTaskPass
+} from "@/api";
+import SimpleImagePreview from "@/components/SimpleImagePreview";
+import MarkStep from "./components/MarkStep";
+import GradeFilter from "../grading/components/GradeFilter";
+import GradeHistoryPaper from "../grading/components/GradeHistoryPaper";
+import MarkAction from "./components/MarkAction";
+// 三种情况:
+// 管理员(ADMIN),科组长(MARK_LEADER),评卷员(MARKER)
+// 评卷员:操作记录,试卷列表,操作盘(打分)
+
+// TIP:不考虑管理员、科组长的情况
+// 管理员:试卷列表,操作盘
+// 科组长:操作记录,试卷列表,操作盘(改档)
+
+export default {
+  name: "mark-operation",
+  components: {
+    SimpleImagePreview,
+    MarkStep,
+    GradeFilter,
+    GradeHistoryPaper,
+    MarkAction
+  },
+  data() {
+    return {
+      filter: {
+        markerId: this.$ls.get("user").id,
+        questionId: ""
+      },
+      typeFilter: {
+        undo: {
+          sort: "paper.level",
+          stage: "SCORE"
+        },
+        done: {
+          level: "",
+          sort: "updatedOn,desc",
+          stage: "SCORE"
+        },
+        shift: {
+          isShift: true,
+          isShiftScore: false
+        },
+        shiftScore: {
+          isShift: false,
+          isShiftScore: true
+        }
+      },
+      workId: this.$route.params.workId,
+      subjectId: this.$route.params.subjectId,
+      subject: "",
+      workSubject: {},
+      curSubject: {},
+      curUserRoleType: "MARKER",
+      changeStage: 0, // 是否显示改档及改档打分
+      current: 1,
+      size: 6,
+      total: 0,
+      totalPage: 1,
+      curStep: null,
+      curStandardGradeId: "",
+      steps: [],
+      levels: [],
+      curArea: {},
+      papers: [],
+      curPaper: {},
+      curPaperIndex: 0,
+      // carousel paper review,
+      carouselPapers: [],
+      curCarouselPaperIndex: 0,
+      isFullscreenMarking: false
+    };
+  },
+  computed: {
+    detailPapersClasses() {
+      return ["detail-papers", `detail-papers-col-${1 + this.size / 2}`];
+    },
+    imageViewClasses() {
+      return ["image-view-list", `image-view-list-${this.size / 2}`];
+    }
+  },
+  created() {
+    this.subject = this.subjectId.split("-")[1];
+    this.workSubject = {
+      workId: this.workId,
+      subject: this.subject
+    };
+    this.initData();
+  },
+  methods: {
+    initData() {
+      this.getWorkLevels();
+      this.getParamsSetInfo();
+    },
+    async getParamsSetInfo() {
+      const data = await getParamsSet(this.workId);
+      this.changeStage = data.changeStage;
+    },
+    async getList() {
+      const datas = {
+        ...this.filter,
+        ...this.typeFilter[this.curStep.type],
+        workId: this.workId,
+        page: this.current - 1,
+        size: this.size
+      };
+      if (this.curStep.type === "done") {
+        datas.level = this.curStep.name;
+      }
+      const requestAction = this.curStep.type.includes("shift")
+        ? markerChangeLevelPaperList
+        : markerTaskList;
+
+      const data = await requestAction(datas);
+      this.papers = data.data.map(paper => {
+        paper.title = `NO.${paper.sn}`;
+        return paper;
+      });
+      this.total = data.totalCount;
+      this.totalPage = data.pageCount;
+    },
+    async toPage(page) {
+      this.current = page;
+      await this.getList();
+      this.selectPaper(this.curPaperIndex);
+    },
+    async getStepLevels() {
+      const data = await markerScoreTotalStatData(
+        this.filter.markerId,
+        this.filter.questionId
+      );
+      const undoIndex = data.findIndex(item => item.id === null);
+      let otherStep = [];
+      let undo = {
+        count: 0,
+        shift: 0,
+        shiftScore: 0
+      };
+      if (undoIndex !== -1) {
+        undo = { ...data[undoIndex] };
+        data.splice(undoIndex, 1);
+      }
+      otherStep.push({
+        name: "待评",
+        count: undo.count,
+        type: "undo"
+      });
+
+      if (this.changeStage) {
+        otherStep.push({
+          name: "改档",
+          count: undo.shift,
+          type: "shift"
+        });
+        otherStep.push({
+          name: "改档打分",
+          count: undo.shiftScore,
+          type: "shiftScore"
+        });
+      }
+      let levelStep = data.map(item => {
+        return {
+          ...item,
+          name: item.id,
+          type: "done"
+        };
+      });
+      this.steps = { levelStep, otherStep };
+
+      if (!this.curStep) {
+        let curStep = {};
+        if (undoIndex === -1) {
+          curStep = levelStep[0];
+        } else {
+          curStep = otherStep[0];
+        }
+        this.curStep = curStep;
+      }
+    },
+    updateStepLevel(curStep, curLevel, count = 1) {
+      if (curStep.type === "done") return;
+
+      const opos = this.steps.otherStep.findIndex(
+        item => item.type === curStep.type
+      );
+      this.steps.otherStep[opos].count -= count;
+
+      if (curStep.type === "shift") {
+        const spos = this.steps.otherStep.findIndex(
+          item => item.type === "shiftScore"
+        );
+        this.steps.otherStep[spos].count += count;
+      } else {
+        const pos = this.steps.levelStep.findIndex(
+          item => item.name === curLevel
+        );
+        this.steps.levelStep[pos].count += count;
+      }
+    },
+    async getWorkLevels() {
+      const data = await workLevelList(this.workId);
+      this.levels = data.map(item => {
+        return {
+          ...item,
+          name: item.code
+        };
+      });
+    },
+    pageSizeChange(size) {
+      this.size = size;
+      this.toPage(1);
+      this.getStepLevels();
+    },
+    async stepChange(step) {
+      this.curStep = step;
+      this.current = 1;
+      await this.getList();
+      this.getStepLevels();
+      if (this.papers.length) {
+        this.selectPaper(0);
+      } else {
+        this.curPaper = {};
+      }
+    },
+    async areaChange(curArea) {
+      this.curArea = curArea;
+      this.filter.questionId = curArea.id;
+      await this.getStepLevels();
+      this.toPage(1);
+      this.updateHistory();
+    },
+    toReview(index) {
+      this.isFullscreenMarking = true;
+      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;
+      }
+      const lastPaper = { ...this.curPaper };
+      this.curPaperIndex = nindex;
+      this.curPaper = this.papers[nindex] ? { ...this.papers[nindex] } : {};
+
+      // 待评时,检查当前试卷是否已经切换档位
+      if (
+        this.curStep.type === "undo" &&
+        this.curPaper["level"] &&
+        this.curPaper["level"] !== lastPaper["level"]
+      ) {
+        this.$Modal.info({
+          content: `即将打分档位:${this.curPaper.level}`
+        });
+      }
+    },
+    async toPrevPaper() {
+      if (this.curPaperIndex === 0) {
+        if (this.current > 1) {
+          this.current--;
+          this.curPaperIndex = this.size - 1;
+          await this.getList();
+        } else {
+          this.$Message.warning("当前已经是第一条数据了");
+          return;
+        }
+      } else {
+        this.curPaperIndex--;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    },
+    async toNextPaper() {
+      if (this.curPaperIndex === this.papers.length - 1) {
+        if (this.current === this.totalPage) {
+          this.$Message.warning("当前已经是最后一条数据了");
+          return;
+        } else {
+          this.current++;
+          this.curPaperIndex = 0;
+          await this.getList();
+        }
+      } else {
+        this.curPaperIndex++;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    },
+    async toActionNextPaper() {
+      if (this.current > 1 && this.papers.length === 1) {
+        this.current--;
+        this.curPaperIndex = this.size;
+      }
+
+      await this.getList();
+      if (!this.papers.length) this.$refs.SimpleImagePreview.cancel();
+      this.selectPaper(this.curPaperIndex);
+    },
+    async gradingCurPaper({ selectedLevel }) {
+      // 确认改档
+      await paperSelectLevelOrScore(
+        this.curPaper.id, // is taskId
+        selectedLevel,
+        "LEVEL"
+      );
+      this.updateStepLevel(this.curStep, "shiftScore");
+      this.toActionNextPaper();
+    },
+    async scoreCurPaper(score) {
+      const paper = await paperSelectLevelOrScore(
+        this.curPaper.id, // is taskId
+        score,
+        "SCORE"
+      );
+      this.updateStepLevel(this.curStep, this.curPaper.level);
+      this.updateCacheHistory([paper]);
+      this.toActionNextPaper();
+    },
+    async passCurPaper(level) {
+      await paperTaskPass(this.curPaper.id);
+      this.toActionNextPaper();
+    },
+    updateHistory() {
+      this.$refs.GradeHistoryPaper.updatePapers();
+    },
+    updateCacheHistory(papers) {
+      this.$refs.GradeHistoryPaper.updateCachePapers(papers);
+    },
+    // paper carousel
+    toViewCarouselPaper(paperIndex, papers) {
+      this.isFullscreenMarking = true;
+      this.carouselPapers = papers;
+      this.selectCarouselPaper(paperIndex);
+      this.$nextTick(() => {
+        this.$refs.CarouselPapersPreview.open();
+      });
+    },
+    selectCarouselPaper(index) {
+      this.curCarouselPaperIndex = index;
+      this.curPaper = { ...this.carouselPapers[index] };
+    },
+    toCarousePaper(type) {
+      if (type === "prev" && this.curCarouselPaperIndex > 0) {
+        this.curCarouselPaperIndex--;
+      } else if (
+        type === "next" &&
+        this.curCarouselPaperIndex < this.carouselPapers.length - 1
+      ) {
+        this.curCarouselPaperIndex++;
+      }
+      this.selectCarouselPaper(this.curCarouselPaperIndex);
+    },
+    carouseImagePreviewClose() {
+      this.isFullscreenMarking = false;
+      this.selectPaper(this.curPaperIndex);
+    }
+  }
+};
+</script>

+ 323 - 323
src/modules/quality/Quality.vue

@@ -1,323 +1,323 @@
-<template>
-  <div class="quality home">
-    <view-header> </view-header>
-
-    <div class="home-body">
-      <div class="home-main">
-        <div class="page-container-flex">
-          <div class="part-box part-box-filter">
-            <Form ref="FilterForm" label-position="left" inline>
-              <FormItem>
-                <Select
-                  v-model="filter.workId"
-                  @on-change="workChange"
-                  placeholder="工作文件夹"
-                  style="width: 150px"
-                >
-                  <Option
-                    v-for="(work, windex) in works"
-                    :key="windex"
-                    :value="work.id"
-                    :label="work.name"
-                  ></Option>
-                </Select>
-              </FormItem>
-              <FormItem>
-                <Select
-                  v-model="filter.subject"
-                  @on-change="subjectChange"
-                  placeholder="科目"
-                >
-                  <Option
-                    v-for="subject in subjects"
-                    :key="subject.id"
-                    :value="subject.subject"
-                    :label="subject.name"
-                  ></Option>
-                </Select>
-              </FormItem>
-              <FormItem>
-                <Select v-model="filter.areaCode" placeholder="考区">
-                  <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>
-                <Input
-                  v-model.trim="filter.studentName"
-                  placeholder="输入姓名"
-                  clearable
-                ></Input>
-              </FormItem>
-              <FormItem>
-                <Select v-model="filter.sortBy" placeholder="排序方式">
-                  <Option
-                    v-for="(val, key) in SORT_RULE_TYPE"
-                    :key="key"
-                    :value="key"
-                    :label="val"
-                  ></Option>
-                </Select>
-              </FormItem>
-              <FormItem>
-                <Button
-                  class="btn-form-search"
-                  size="small"
-                  type="primary"
-                  @click="toPage(1)"
-                  >查询</Button
-                >
-              </FormItem>
-            </Form>
-          </div>
-
-          <image-action-list
-            v-if="papers.length"
-            :data="papers"
-            :column-number="4"
-            :actions="imageListActions"
-            @on-review="toReview"
-            ref="ImageActionList"
-          ></image-action-list>
-
-          <div class="part-page" v-if="total > size">
-            <Page
-              :current="current"
-              :total="total"
-              :page-size="size"
-              show-total
-              show-elevator
-              @on-change="toPage"
-            ></Page>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- image-preview -->
-    <simple-image-preview
-      :cur-image="curPaper"
-      @on-prev="toPrevPaper"
-      @on-next="toNextPaper"
-      ref="SimpleImagePreview"
-    ></simple-image-preview>
-  </div>
-</template>
-
-<script>
-import { workList, areaList, paperPageList } from "@/api";
-import { SORT_RULE_TYPE, CAFA_EXCEPTION_TYPE } from "@/constants/enumerate";
-import ImageActionList from "../main/components/ImageActionList";
-import SimpleImagePreview from "@/components/SimpleImagePreview";
-
-export default {
-  name: "quality",
-  components: { ImageActionList, SimpleImagePreview },
-  data() {
-    return {
-      filter: {
-        workId: null,
-        subject: null,
-        areaCode: null,
-        startNumber: null,
-        endNumber: null,
-        isManual: null,
-        missing: null,
-        studentName: "",
-        sortBy: "1"
-      },
-      paperType: "2",
-      selectPaperType: "0",
-      SORT_RULE_TYPE,
-      CAFA_EXCEPTION_TYPE: {},
-      current: 1,
-      size: 8,
-      total: 0,
-      totalPage: 0,
-      papers: [],
-      works: [],
-      subjects: [],
-      areas: [],
-      curPaper: {},
-      curPaperIndex: 0
-    };
-  },
-  computed: {
-    imageListActions() {
-      return this.selectPaperType === "1" ? [] : ["rotate", "absent"];
-    }
-  },
-  mounted() {
-    this.CAFA_EXCEPTION_TYPE = { ...CAFA_EXCEPTION_TYPE, 2: "全部" };
-    this.initData();
-  },
-  methods: {
-    async initData() {
-      await this.getWorkList();
-      this.filter.workId = this.works[0].id;
-      this.workChange();
-      await this.getAreaList();
-      this.filter.areaCode = this.areas[0].areaCode;
-      this.getList();
-    },
-    async getWorkList() {
-      this.works = await workList();
-    },
-    async getAreaList() {
-      const data = await areaList({
-        workId: this.filter.workId,
-        subject: this.filter.subject
-      });
-      this.areas = data.map(item => {
-        return {
-          id: item.id,
-          areaName: item.areaName,
-          areaCode: item.areaCode
-        };
-      });
-      if (this.areas.length === 1) {
-        this.filter.areaCode = this.areas[0].areaCode;
-      }
-    },
-    async getList() {
-      const datas = {
-        ...this.filter,
-        page: this.current - 1,
-        size: this.size
-      };
-      this.papers = [];
-      const data = await paperPageList(datas);
-      this.papers = data.data.map(paper => {
-        return {
-          id: paper.id,
-          key: this.$randomCode(),
-          title: paper.examNumber,
-          imgSrc: paper.imgSrc,
-          thumbSrc: paper.thumbSrc,
-          missing: paper.missing,
-          stage: paper.stage,
-          styles: {},
-          deg: 0
-        };
-      });
-      this.total = data.totalCount;
-      this.totalPage = data.pageCount;
-      this.selectPaperType = this.paperType;
-    },
-    toPage(page) {
-      this.current = page;
-      this.papers = [];
-      this.getList();
-    },
-    workChange() {
-      this.filter.subject = null;
-      this.filter.areaCode = null;
-      const curWork = this.works.find(item => item.id === this.filter.workId);
-      this.subjects = curWork.subjects;
-      this.filter.subject = this.subjects[0].subject;
-      this.subjectChange();
-    },
-    subjectChange() {
-      this.areas = [];
-      this.filter.areaCode = null;
-      if (!this.filter.subject) return;
-      this.getAreaList();
-    },
-    typeChange() {
-      if (this.paperType === "1") {
-        this.filter.isManual = true;
-        this.filter.missing = null;
-      } else if (this.paperType === "0") {
-        this.filter.isManual = null;
-        this.filter.missing = true;
-      } else {
-        this.filter.isManual = null;
-        this.filter.missing = null;
-      }
-    },
-    // paper view
-    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.current > 1) {
-          this.current--;
-          this.curPaperIndex = this.size - 1;
-          await this.getList();
-        } else {
-          this.$Message.warning("当前已经是第一条数据了");
-          return;
-        }
-      } else {
-        this.curPaperIndex--;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    },
-    async toNextPaper() {
-      if (this.curPaperIndex === this.papers.length - 1) {
-        if (this.current === this.totalPage) {
-          this.$Message.warning("当前已经是最后一条数据了");
-          return;
-        } else {
-          this.current++;
-          this.curPaperIndex = 0;
-          await this.getList();
-        }
-      } else {
-        this.curPaperIndex++;
-      }
-
-      this.selectPaper(this.curPaperIndex);
-    }
-  }
-};
-</script>
+<template>
+  <div class="quality home">
+    <view-header> </view-header>
+
+    <div class="home-body">
+      <div class="home-main">
+        <div class="page-container-flex">
+          <div class="part-box part-box-filter">
+            <Form ref="FilterForm" label-position="left" inline>
+              <FormItem>
+                <Select
+                  v-model="filter.workId"
+                  @on-change="workChange"
+                  placeholder="工作文件夹"
+                  style="width: 150px"
+                >
+                  <Option
+                    v-for="(work, windex) in works"
+                    :key="windex"
+                    :value="work.id"
+                    :label="work.name"
+                  ></Option>
+                </Select>
+              </FormItem>
+              <FormItem>
+                <Select
+                  v-model="filter.subject"
+                  @on-change="subjectChange"
+                  placeholder="科目"
+                >
+                  <Option
+                    v-for="subject in subjects"
+                    :key="subject.id"
+                    :value="subject.subject"
+                    :label="subject.name"
+                  ></Option>
+                </Select>
+              </FormItem>
+              <FormItem>
+                <Select v-model="filter.areaCode" placeholder="考区">
+                  <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>
+                <Input
+                  v-model.trim="filter.studentName"
+                  placeholder="输入姓名"
+                  clearable
+                ></Input>
+              </FormItem>
+              <FormItem>
+                <Select v-model="filter.sortBy" placeholder="排序方式">
+                  <Option
+                    v-for="(val, key) in SORT_RULE_TYPE"
+                    :key="key"
+                    :value="key"
+                    :label="val"
+                  ></Option>
+                </Select>
+              </FormItem>
+              <FormItem>
+                <Button
+                  class="btn-form-search"
+                  size="small"
+                  type="primary"
+                  @click="toPage(1)"
+                  >查询</Button
+                >
+              </FormItem>
+            </Form>
+          </div>
+
+          <image-action-list
+            v-if="papers.length"
+            :data="papers"
+            :column-number="4"
+            :actions="imageListActions"
+            @on-review="toReview"
+            ref="ImageActionList"
+          ></image-action-list>
+
+          <div class="part-page">
+            <Page
+              :current="current"
+              :total="total"
+              :page-size="size"
+              show-total
+              show-elevator
+              @on-change="toPage"
+            ></Page>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- image-preview -->
+    <simple-image-preview
+      :cur-image="curPaper"
+      @on-prev="toPrevPaper"
+      @on-next="toNextPaper"
+      ref="SimpleImagePreview"
+    ></simple-image-preview>
+  </div>
+</template>
+
+<script>
+import { workList, areaList, paperPageList } from "@/api";
+import { SORT_RULE_TYPE, CAFA_EXCEPTION_TYPE } from "@/constants/enumerate";
+import ImageActionList from "../main/components/ImageActionList";
+import SimpleImagePreview from "@/components/SimpleImagePreview";
+
+export default {
+  name: "quality",
+  components: { ImageActionList, SimpleImagePreview },
+  data() {
+    return {
+      filter: {
+        workId: null,
+        subject: null,
+        areaCode: null,
+        startNumber: null,
+        endNumber: null,
+        isManual: null,
+        missing: null,
+        studentName: "",
+        sortBy: "1"
+      },
+      paperType: "2",
+      selectPaperType: "0",
+      SORT_RULE_TYPE,
+      CAFA_EXCEPTION_TYPE: {},
+      current: 1,
+      size: 8,
+      total: 0,
+      totalPage: 0,
+      papers: [],
+      works: [],
+      subjects: [],
+      areas: [],
+      curPaper: {},
+      curPaperIndex: 0
+    };
+  },
+  computed: {
+    imageListActions() {
+      return this.selectPaperType === "1" ? [] : ["rotate", "absent"];
+    }
+  },
+  mounted() {
+    this.CAFA_EXCEPTION_TYPE = { ...CAFA_EXCEPTION_TYPE, 2: "全部" };
+    this.initData();
+  },
+  methods: {
+    async initData() {
+      await this.getWorkList();
+      this.filter.workId = this.works[0].id;
+      this.workChange();
+      await this.getAreaList();
+      this.filter.areaCode = this.areas[0].areaCode;
+      this.getList();
+    },
+    async getWorkList() {
+      this.works = await workList();
+    },
+    async getAreaList() {
+      const data = await areaList({
+        workId: this.filter.workId,
+        subject: this.filter.subject
+      });
+      this.areas = data.map(item => {
+        return {
+          id: item.id,
+          areaName: item.areaName,
+          areaCode: item.areaCode
+        };
+      });
+      if (this.areas.length === 1) {
+        this.filter.areaCode = this.areas[0].areaCode;
+      }
+    },
+    async getList() {
+      const datas = {
+        ...this.filter,
+        page: this.current - 1,
+        size: this.size
+      };
+      this.papers = [];
+      const data = await paperPageList(datas);
+      this.papers = data.data.map(paper => {
+        return {
+          id: paper.id,
+          key: this.$randomCode(),
+          title: paper.examNumber,
+          imgSrc: paper.imgSrc,
+          thumbSrc: paper.thumbSrc,
+          missing: paper.missing,
+          stage: paper.stage,
+          styles: {},
+          deg: 0
+        };
+      });
+      this.total = data.totalCount;
+      this.totalPage = data.pageCount;
+      this.selectPaperType = this.paperType;
+    },
+    toPage(page) {
+      this.current = page;
+      this.papers = [];
+      this.getList();
+    },
+    workChange() {
+      this.filter.subject = null;
+      this.filter.areaCode = null;
+      const curWork = this.works.find(item => item.id === this.filter.workId);
+      this.subjects = curWork.subjects;
+      this.filter.subject = this.subjects[0].subject;
+      this.subjectChange();
+    },
+    subjectChange() {
+      this.areas = [];
+      this.filter.areaCode = null;
+      if (!this.filter.subject) return;
+      this.getAreaList();
+    },
+    typeChange() {
+      if (this.paperType === "1") {
+        this.filter.isManual = true;
+        this.filter.missing = null;
+      } else if (this.paperType === "0") {
+        this.filter.isManual = null;
+        this.filter.missing = true;
+      } else {
+        this.filter.isManual = null;
+        this.filter.missing = null;
+      }
+    },
+    // paper view
+    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.current > 1) {
+          this.current--;
+          this.curPaperIndex = this.size - 1;
+          await this.getList();
+        } else {
+          this.$Message.warning("当前已经是第一条数据了");
+          return;
+        }
+      } else {
+        this.curPaperIndex--;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    },
+    async toNextPaper() {
+      if (this.curPaperIndex === this.papers.length - 1) {
+        if (this.current === this.totalPage) {
+          this.$Message.warning("当前已经是最后一条数据了");
+          return;
+        } else {
+          this.current++;
+          this.curPaperIndex = 0;
+          await this.getList();
+        }
+      } else {
+        this.curPaperIndex++;
+      }
+
+      this.selectPaper(this.curPaperIndex);
+    }
+  }
+};
+</script>