Browse Source

仲裁评分

xiatian 1 month ago
parent
commit
ab674be696

+ 6 - 0
src/modules/marking/routes/routes.js

@@ -1,6 +1,7 @@
 import Home from "../../portal/views/home/Home.vue";
 import Tips from "../../portal/views/tips/Tips.vue";
 import Marking from "../views/Marking.vue";
+import ArbitrateMarking from "../views/ArbitrateMarking.vue";
 import MarkSettingMain from "../views/MarkSettingMain.vue";
 import MarkWork from "../views/MarkWork.vue";
 import MarkPaperCheck from "../views/MarkPaperCheck.vue";
@@ -79,5 +80,10 @@ export default [
     path: "/marking/:workId", //试卷正评
     component: Marking,
   },
+  {
+    path: "arbitrate-marking", //仲裁评分
+    name: "arbitrate-marking",
+    component: ArbitrateMarking,
+  },
   { path: "*", redirect: "/login" },
 ];

+ 436 - 0
src/modules/marking/views/ArbitrateMarking.vue

@@ -0,0 +1,436 @@
+<template>
+  <div v-loading="loading" element-loading-text="拼命加载中">
+    <section class="content-header">
+      <span>
+        <span class="pull-left">
+          <small class="marktitle titlefont">
+            <span>课程:{{ arbitrateTask.courseName }}</span>
+          </small>
+          <small class="marktitle titlefont">
+            <span>试卷编号:{{ arbitrateTask.paperName }}</span>
+          </small>
+          <small class="marktitle titlefont">
+            <span>试卷ID:{{ studentPaper.examRecordDataId }}</span>
+          </small>
+          <small class="marktitle titlefont">
+            <span>客观分:{{ studentPaper.objectiveScore }}</span>
+          </small>
+        </span>
+        <span class="pull-right icon-right">
+          <small class="marktitle titlefont">
+            <span class="titlefont">
+              <v-icon name="user" style="height: 12px" />
+              {{ user.displayName }}
+            </span>
+          </small>
+          <small class="marktitle titlefont marksign">
+            <el-button
+              type="success"
+              size="small"
+              icon="el-icon-arrow-left"
+              @click="backIndex"
+            >
+              <!-- <v-icon name="sign-out-alt" scale="0.5"/> -->
+              <span class="titlefont">返回</span>
+            </el-button>
+          </small>
+        </span>
+      </span>
+    </section>
+
+    <section class="content">
+      <div class="box box-info backcolor">
+        <div class="box-body">
+          <!-- 文本图片阅卷主界面 -->
+          <tpMain
+            :paper-mark-sign="paperMarkSign"
+            :sign-item="signItem"
+            :sign-scores="signScores"
+            :sign-option="signOption"
+            :mark-sign="markSign"
+            :student-paper="studentPaper"
+            :exam-type="examType"
+            :answer-html="answerHtml"
+            @changePaperSign="changePaperSign"
+            @clearScores="clearScores"
+            @changeSignScores="changeSignScores"
+            @showAnswerChange="showAnswerChange"
+          ></tpMain>
+          <!-- 文本图片给分板 -->
+          <tpScoreboard
+            ref="scoreboard"
+            :work-id="workId"
+            :objective-score="studentPaper.objectiveScore"
+            :paper-mark-sign="paperMarkSign"
+            :sign-item="signItem"
+            :sign-scores="signScores"
+            :sign-option="signOption"
+            :mark-sign="markSign"
+            :paper-mark="paperMark"
+            :marked-result="markedResult"
+            :result-items="resultItems"
+            :student-paper-id="studentPaper.id"
+            :score-step="studentPaper.scoreStep"
+            :mark-task-id="task.id"
+            :exam-type="examType"
+            :arbitrate="true"
+            @submitMark="getNext"
+            @changeSign="changeSign"
+          ></tpScoreboard>
+        </div>
+      </div>
+    </section>
+  </div>
+</template>
+<script>
+import { mapState } from "vuex";
+import TpMain from "./TpMain.vue";
+import TpScoreBoard from "./TpScoreBoard.vue";
+import {
+  MARKING_API,
+  MARKING_LOGIC_API,
+  QUESTION_API,
+} from "@/constants/constants";
+export default {
+  components: {
+    tpMain: TpMain,
+    tpScoreboard: TpScoreBoard,
+  },
+  data() {
+    return {
+      markSign: false,
+      paperMarkSign: [],
+      signScores: [],
+      signItem: {},
+      signOption: { score: 0, data: "", width: 800, height: 8000, loc: [] },
+      tasks: [],
+      task: {},
+      changeTasks: [],
+      changeTaskTotal: 0,
+      studentPaper: {},
+      markRange: {},
+      resultItems: [],
+      markedResults: [],
+      markedResult: {},
+      loading: true,
+      taskCurrentPage: 1,
+      taskPageSize: 10,
+      taskTotal: 0,
+      markedCurrentPage: 1,
+      markedPageSize: 10,
+      markedTotal: 0,
+      pageSize: 10,
+      mark_type: "正评",
+      mark_task: {},
+      taskVisible: false,
+      markedTaskVisible: false,
+      problemTaskVisible: false,
+      degree: [
+        { label: "是", value: "Y" },
+        { label: "否", value: "N" },
+      ],
+      markTaskFormSearch: {
+        courseCode: "",
+        courseName: "",
+        degree: "",
+      },
+      taskFormSearch: {
+        courseCode: "",
+        courseName: "",
+        paperCode: "",
+      },
+      course: {},
+      workId: "",
+      examType: "",
+      markSearch: {
+        userId: "",
+        workId: "",
+      },
+      //回评标志
+      backMark: false,
+      //获取试卷标志(成功获取true,没有试卷false)
+      paperMark: true,
+      tags: [],
+      answerHtml: null,
+      rangeId: null,
+      arbitrateTask: {
+        studentPaperId: "",
+        resultId: "",
+        courseName: "",
+        paperName: "",
+      },
+    };
+  },
+  computed: {
+    ...mapState({ user: (state) => state.user }),
+  },
+  async created() {
+    this.loading = true;
+    await this.markInit();
+    await this.markTaskSelect();
+    this.getTags();
+    this.loading = false;
+  },
+  methods: {
+    async getNext() {
+      this.backMark = false;
+      this.$loading().close();
+    },
+    showAnswerChange() {
+      this.$refs.scoreboard.showBodyChange();
+      this.$refs.scoreboard.showAnswerChange();
+    },
+    getTags() {
+      this.$http.get(MARKING_API + "/markResults/tag").then((response) => {
+        this.tags = response.data;
+      });
+    },
+    getTagName(code) {
+      for (let tag of this.tags) {
+        if (tag.code === code) {
+          return tag.name;
+        }
+      }
+    },
+    clearScores() {
+      this.signScores.splice(0, this.signScores.length);
+    },
+    changePaperSign(val) {
+      this.paperMarkSign = val;
+    },
+    changeSignScores(val) {
+      this.signScores = val;
+    },
+    changeSign(val) {
+      console.log(val);
+      this.signItem = val;
+    },
+    markedClick() {
+      this.markedTaskVisible = true;
+      this.getMarkedTask();
+    },
+    problemClick() {
+      this.problemTaskVisible = true;
+    },
+    backIndex() {
+      this.$router.back();
+    },
+    taskCurrentChange(val) {
+      this.taskCurrentPage = val;
+      this.getChangeTasks();
+    },
+    markedCurrentChange(val) {
+      this.markedCurrentPage = val;
+      this.getMarkedTask();
+    },
+    markedSizeChange(val) {
+      this.markedPageSize = val;
+      this.getMarkedTask();
+    },
+    async markTaskSelect() {
+      this.markedTaskVisible = false;
+      this.loading = true;
+      this.backMark = true;
+      this.paperMark = true;
+      await this.getMarkedPaper(this.arbitrateTask.studentPaperId);
+      await this.getMarkedResultItems(this.arbitrateTask.resultId);
+      await this.getAnswerHtml();
+      this.loading = false;
+    },
+    async markInit() {
+      this.workId = this.$route.params.workId;
+      this.arbitrateTask.studentPaperId = this.$route.params.studentPaperId;
+      this.arbitrateTask.resultId = this.$route.params.resultId;
+      this.arbitrateTask.paperName = this.$route.params.paperName;
+      this.arbitrateTask.courseName = this.$route.params.courseName;
+    },
+    async getMarkedPaper(studentPaperId) {
+      var self = this;
+      await self.$http
+        .get(MARKING_LOGIC_API + "/studentPapers/" + studentPaperId)
+        .then((response) => {
+          self.studentPaper = response.data;
+          self.examType = self.studentPaper.examType;
+        });
+    },
+    async getMarkedResultItems(markResultId) {
+      var self = this;
+      await self.$http
+        .get(MARKING_API + "/markResults/" + markResultId)
+        .then((response) => {
+          self.resultItems = response.data.resultItems;
+          self.markedResult = response.data;
+          console.log(self.markedResult);
+        });
+    },
+    async getMarkRange() {
+      if (!this.paperMark) {
+        return;
+      }
+      if (!this.backMark && this.rangeId == this.task.markRangeId) {
+        for (let resultItem of this.resultItems) {
+          resultItem.score = "";
+        }
+        return;
+      }
+      this.resultItems.splice(0, this.resultItems.length);
+      var self = this;
+      await self.$http
+        .get(
+          MARKING_API +
+            "/markRanges/info?markRangeId=" +
+            self.task.markRangeId +
+            "&examRecordDataId=" +
+            self.studentPaper.examRecordDataId
+        )
+        .then((response) => {
+          self.markRange = response.data;
+          self.getResultItems(self.markRange);
+          console.log("markRange", self.markRange);
+          console.log("resultItems", self.resultItems);
+        });
+    },
+    getResultItems(markRange) {
+      for (let markItem of markRange.markItems) {
+        var resultItem = { markItem: markItem, score: "" };
+        this.resultItems.push(resultItem);
+      }
+    },
+    dateFormatter(row) {
+      var fulldate = new Date(row.markedOn);
+      var year = fulldate.getFullYear();
+      var month = fulldate.getMonth() + 1;
+      var date = fulldate.getDate();
+      var formatDate = [year, month, date].join("-");
+      return formatDate;
+    },
+    initMarkItem() {
+      this.markResult = {};
+      this.markedResult = {};
+    },
+    markSignChange() {
+      if (this.markSign) {
+        this.$message({
+          showClose: true,
+          message: "轨迹模式已开启,只支持鼠标操作",
+          type: "warning",
+        });
+      }
+    },
+    async getAnswerHtml() {
+      if (this.studentPaper.basePaperId && this.examType == "OFFLINE") {
+        var paperId = this.studentPaper.basePaperId;
+        await this.$http
+          .get(QUESTION_API + "/extract/getAnswerHtml/" + paperId)
+          .then((response) => {
+            this.answerHtml = response.data;
+          });
+      }
+    },
+  },
+};
+</script>
+<style scoped>
+.el-select {
+  width: 160px;
+}
+.content {
+  min-height: 600px;
+  margin-right: auto;
+  margin-left: auto;
+  padding-left: 15px;
+}
+small {
+  font-size: 18px;
+  font-weight: bold;
+  margin-left: 10px;
+  margin-top: 20px;
+}
+.content-header {
+  margin-left: 15px;
+  overflow: hidden;
+  background-color: rgb(77, 124, 196);
+  height: 55px;
+}
+.box-body {
+  height: 100%;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 3px;
+  border-bottom-left-radius: 3px;
+  padding-left: 40px;
+  padding-right: 15px;
+  overflow: hidden;
+}
+li {
+  list-style-type: none;
+}
+.marktitle {
+  margin-right: 20px;
+  margin-bottom: 10px;
+  font-size: 18px;
+  font-weight: 700;
+  color: white;
+}
+.titlefont {
+  font-size: 14px;
+  display: inline-block;
+}
+.box-card {
+  width: 200px;
+  height: 120px;
+}
+.block {
+  display: inline-block;
+}
+.text {
+  text-align: center;
+}
+.markcount {
+  margin-right: 10px;
+}
+.reject {
+  color: red;
+}
+.marksign {
+  margin-left: 20px;
+}
+.label-danger {
+  background-color: #d9534f;
+  color: #fff;
+  padding: 2px;
+}
+.box {
+  position: relative;
+  border-radius: 3px;
+  margin-bottom: 0px;
+  width: 100%;
+}
+.pull-right {
+  float: right !important;
+}
+.pull-left {
+  float: left !important;
+}
+.scroll {
+  overflow: auto;
+  height: 450px;
+}
+.el-button {
+  background: rgb(77, 124, 196);
+  color: white;
+  border-radius: 8px;
+  border-color: white;
+}
+.course-tags {
+  background: rgb(84, 191, 255);
+}
+.icon-right {
+  margin-top: -6px;
+}
+</style>
+<style>
+.altbox {
+  color: rgb(85, 191, 255);
+}
+</style>

+ 75 - 10
src/modules/marking/views/MarkPaperCheck.vue

@@ -140,14 +140,27 @@
             <el-form-item label="总分">
               <el-input
                 v-model="formSearch.scoreStart"
-                style="width: 80px"
+                style="width: 69px"
               ></el-input>
               -
               <el-input
                 v-model="formSearch.scoreEnd"
-                style="width: 80px"
+                style="width: 69px"
               ></el-input>
             </el-form-item>
+            <el-form-item label="仲裁">
+              <el-select
+                v-model="formSearch.arbitrate"
+                clearable
+                filterable
+                class="input"
+                placeholder="请选择"
+                style="width: 150px"
+              >
+                <el-option label="是" value="true"></el-option>
+                <el-option label="否" value="false"></el-option>
+              </el-select>
+            </el-form-item>
             <div></div>
             <el-form-item>
               <el-button
@@ -259,6 +272,23 @@
                 </el-popover>
               </template>
             </el-table-column>
+            <el-table-column label="是否仲裁" width="100">
+              <template slot-scope="scope">
+                <div>
+                  <span>{{ scope.row.arbitrate == true ? "是" : "否" }}</span>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="仲裁人"
+              width="120"
+              prop="arbitrateUserName"
+            />
+            <el-table-column
+              label="仲裁时间"
+              width="140"
+              prop="arbitrateTime"
+            />
             <el-table-column fixed="right" label="操作" width="300">
               <template slot-scope="scope">
                 <el-button
@@ -276,14 +306,33 @@
                   @click="backRefresh(scope.row)"
                   >打回</el-button
                 >
-                <el-button
-                  v-if="scope.row.examFaceEnable == true"
-                  type="danger"
-                  icon="el-icon-arrow-left"
-                  size="mini"
-                  @click="openAudit(scope.row.examRecordDataId)"
-                  >违纪审核
-                </el-button>
+
+                <el-dropdown style="margin-left: 10px" placement="bottom-start">
+                  <el-button size="mini" type="primary" plain>
+                    更多 <i class="el-icon-arrow-down el-icon--right"></i>
+                  </el-button>
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item v-if="scope.row.examFaceEnable == true">
+                      <el-button
+                        type="danger"
+                        icon="el-icon-arrow-left"
+                        size="mini"
+                        @click="openAudit(scope.row.examRecordDataId)"
+                        >违纪审核
+                      </el-button>
+                    </el-dropdown-item>
+                    <el-dropdown-item>
+                      <el-button
+                        type="primary"
+                        size="mini"
+                        plain
+                        icon="el-icon-magic-stick"
+                        @click="arbitrate(scope.row)"
+                        >仲裁评卷
+                      </el-button>
+                    </el-dropdown-item>
+                  </el-dropdown-menu>
+                </el-dropdown>
               </template>
             </el-table-column>
           </el-table>
@@ -382,6 +431,7 @@ export default {
     return {
       selectedIds: [],
       formSearch: {
+        arbitrate: "",
         orgCode: "",
         studentName: "",
         studentCode: "",
@@ -455,6 +505,19 @@ export default {
     window.viewPicture = this.viewPicture;
   },
   methods: {
+    arbitrate(row) {
+      var self = this;
+      self.$router.push({
+        name: "arbitrate-marking",
+        params: {
+          workId: row.workId,
+          resultId: row.id,
+          studentPaperId: row.studentPaperId,
+          paperName: row.paperType,
+          courseName: row.courseName,
+        },
+      });
+    },
     auditDialogClosed() {
       this.$refs["auditForm"].resetFields();
     },
@@ -752,6 +815,7 @@ export default {
             userId: this.formSearch.userId,
             markRemark: this.formSearch.markRemark,
             currentPage: this.currentPage,
+            arbitrate: this.formSearch.arbitrate,
             pageSize: this.pageSize,
             examRecordDataId: this.formSearch.examRecordDataId,
             identityNumber: this.formSearch.identityNumber,
@@ -907,6 +971,7 @@ export default {
         this.formSearch.courseCode = formData.courseCode;
         this.formSearch.userId = formData.userId;
         this.formSearch.tag = formData.tag;
+        this.formSearch.arbitrate = formData.arbitrate;
         this.formSearch.examRecordDataId = formData.examRecordDataId;
         this.formSearch.identityNumber = formData.identityNumber;
         this.currentPage = parseInt(formData.currentPage);

+ 8 - 1
src/modules/marking/views/TpScoreBoard.vue

@@ -284,6 +284,10 @@ export default {
       type: [Number, String],
       default: "",
     },
+    arbitrate: {
+      type: Boolean,
+      default: false,
+    },
   },
   data() {
     return {
@@ -878,7 +882,10 @@ export default {
         this.markedResultData.resultItems = this.resultItemsData;
         this.markedResultData.remark = remarkValue;
         this.$httpWithMsg
-          .put(MARKING_API + "/markResults", this.markedResultData)
+          .put(
+            MARKING_API + "/markResults?arbitrate=" + this.arbitrate,
+            this.markedResultData
+          )
           .then(
             () => {
               this.saveMarkSign();