|
@@ -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>
|