zhangjie 1 год назад
Родитель
Сommit
b0f90b0596

+ 3 - 0
src/assets/styles/pages.scss

@@ -901,6 +901,9 @@
   .mark-body {
     margin-bottom: 20px;
   }
+  .mark-footer {
+    text-align: center;
+  }
   .structure-desc {
     margin-bottom: 10px;
   }

+ 1 - 11
src/modules/exam/components/WaitTaskStmms.vue

@@ -2,16 +2,6 @@
   <div class="wait-task-stmms">
     <div class="part-box part-box-pad">
       <el-table ref="TableList" :data="dataList">
-        <el-table-column
-          prop="thirdRelateId"
-          label="云阅卷考试ID"
-          min-width="160"
-        ></el-table-column>
-        <el-table-column
-          prop="thirdRelateName"
-          label="云阅卷考试名称"
-          min-width="160"
-        ></el-table-column>
         <el-table-column prop="courseName" label="课程(代码)" min-width="200">
           <span slot-scope="scope">
             {{ scope.row.courseName }}({{ scope.row.courseCode }})
@@ -70,7 +60,7 @@
 <script>
 import { mapActions, mapMutations } from "vuex";
 import { stmmsTaskListPage } from "../api";
-import ModifyMarkParams from "../../stmms/components/markParam/ModifyMarkParams";
+import ModifyMarkParams from "../../mark/components/markParam/ModifyMarkParams";
 
 export default {
   name: "wait-task-stmms",

+ 2 - 5
src/modules/mark/api.js

@@ -1,7 +1,7 @@
 import { $postParam, $post } from "@/plugins/axios";
 
 export const examStructureFindJpg = (datas) => {
-  return $postParam("/api/admin/exam/structure/find_jpg_file", datas);
+  return $postParam("/api/admin/exam/card/find_jpg_file", datas);
 };
 // mark-entrance
 export const markTaskListPage = (datas) => {
@@ -44,10 +44,7 @@ export const markGroupItemDelete = (datas) => {
 };
 // class
 export const markClassStatusUpdate = (datas) => {
-  return $postParam(
-    "/api/admin/mark/group/update_open_mark_class_status",
-    datas
-  );
+  return $postParam("/api/admin/mark/group/update_open_mark_class", datas);
 };
 export const markClassList = (datas) => {
   return $postParam("/api/admin/mark/class/list", datas);

+ 9 - 6
src/modules/mark/components/markParam/MarkParamGroup.vue

@@ -26,7 +26,7 @@
         <el-table-column label="评卷员">
           <template slot-scope="scope">
             <el-tag
-              v-for="user in scope.row.markerList"
+              v-for="user in scope.row.markers"
               :key="user.id"
               class="tag-spin"
               size="medium"
@@ -213,10 +213,8 @@ export default {
         return { ...deepCopy(item), id: this.$randomCode() };
       });
       this.questionCount = this.paperStructureInfo.length;
-      this.updateDisableQuestionNos();
-
       this.subjectiveQuestionList = this.paperStructureInfo
-        .filter((item) => !item.isObjective)
+        .filter((item) => !item.objective)
         .map((item) => {
           return {
             ...item,
@@ -226,6 +224,7 @@ export default {
       this.subjectiveQuestionCount = this.subjectiveQuestionList.length;
       this.objectiveQuestionCount =
         this.questionCount - this.subjectiveQuestionCount;
+      this.updateDisableQuestionNos();
 
       this.dataReady = true;
     },
@@ -237,7 +236,9 @@ export default {
       groupList.forEach((item) => {
         disabledQuestionNos = [
           ...disabledQuestionNos,
-          ...item.questions.map((item) => item.qno),
+          ...item.questions.map(
+            (item) => `${item.mainNumber}-${item.subNumber}`
+          ),
         ];
       });
       this.disabledQuestionNos = disabledQuestionNos;
@@ -279,7 +280,7 @@ export default {
       this.$refs.ModifyMarkArea.open();
     },
     async toDelete(row) {
-      if (!this.deleting) return;
+      if (this.deleting) return;
 
       const confirm = await this.$confirm(`确定要删除当前分组吗?`, "提示", {
         type: "warning",
@@ -468,8 +469,10 @@ export default {
             "mainTitle",
             "subNumber",
             "questionType",
+            "qno",
           ])
         );
+        return group;
       });
     },
     updateData() {

+ 2 - 10
src/modules/mark/components/markParam/MarkParamObjectiveAnswer.vue

@@ -74,7 +74,7 @@
           </div>
         </el-table-column>
         <el-table-column label="判分策略" width="140px">
-          <template v-if="scope.row.type === 2" slot-scope="scope">
+          <template v-if="scope.row.questionType === 2" slot-scope="scope">
             <el-select v-model="scope.row.objectivePolicy">
               <el-option
                 v-for="(val, key) in QUESTION_SCORE_TYPE"
@@ -135,7 +135,6 @@ export default {
       this.tableData = objectiveStructure.map((item) => {
         let nitem = {
           ...item,
-          id: this.$randomCode(),
           mainFirstSub: false,
           expandSub: true,
           error: false,
@@ -232,14 +231,7 @@ export default {
         examId: this.basicInfo.examId,
         paperNumber: this.basicInfo.paperNumber,
         objectiveInfo: this.tableData.map((item) =>
-          omit(item, [
-            "id",
-            "mainFirstSub",
-            "expandSub",
-            "error",
-            "errMsg",
-            "mainId",
-          ])
+          omit(item, ["mainFirstSub", "expandSub", "error", "errMsg", "mainId"])
         ),
       };
       const data = await markObjectiveQuestionSave(datas).catch(() => {});

+ 61 - 14
src/modules/mark/components/markParam/MarkParamStructure.vue

@@ -93,7 +93,17 @@
             </template>
           </el-table-column>
         </template>
-        <el-table-column label="每题分值" width="100">
+        <el-table-column prop="mainNumber" label="大题号" width="80">
+          <template slot-scope="scope" v-if="scope.row.mainFirstSub">
+            <span>{{ scope.row.mainNumber }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="subNumber"
+          label="小题号"
+          width="80"
+        ></el-table-column>
+        <el-table-column label="每题分值" width="120">
           <template slot-scope="scope" v-if="scope.row.mainFirstSub">
             <el-input-number
               v-model="scoresPerTopic[scope.row.mainId]"
@@ -104,31 +114,54 @@
               :step="0.5"
               step-strictly
               :controls="false"
+              placeholder="每题分值"
               @change="(val) => scorePerTopicChange(val, scope.row)"
             ></el-input-number>
           </template>
         </el-table-column>
-        <el-table-column prop="mainNumber" label="大题号" width="80">
+        <el-table-column prop="totalScore" label="小题满分" width="120">
+          <template slot-scope="scope">
+            <el-input-number
+              v-model="scope.row.totalScore"
+              class="width-full"
+              size="small"
+              :min="0.5"
+              :max="500"
+              :step="0.5"
+              step-strictly
+              :controls="false"
+              placeholder="小题分值"
+            ></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column label="每题间隔分" width="120">
           <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-            <span>{{ scope.row.mainNumber }}</span>
+            <el-input-number
+              v-model="intervalScorePerTopic[scope.row.mainId]"
+              class="width-full"
+              size="small"
+              :min="0.5"
+              :max="500"
+              :step="0.5"
+              step-strictly
+              :controls="false"
+              placeholder="每题间隔分"
+              @change="(val) => intervalScorePerTopicChange(val, scope.row)"
+            ></el-input-number>
           </template>
         </el-table-column>
-        <el-table-column
-          prop="subNumber"
-          label="小题号"
-          width="80"
-        ></el-table-column>
-        <el-table-column prop="totalScore" label="小题满分" width="105">
+        <el-table-column prop="intervalScore" label="间隔分" width="120">
           <template slot-scope="scope">
             <el-input-number
-              v-model="scope.row.totalScore"
-              class="width-80"
+              v-model="scope.row.intervalScore"
+              class="width-full"
               size="small"
               :min="0.5"
               :max="500"
               :step="0.5"
               step-strictly
               :controls="false"
+              placeholder="小题间隔分"
             ></el-input-number>
           </template>
         </el-table-column>
@@ -191,6 +224,7 @@ export default {
       QUESTION_TYPE_LIST,
       questionTypeDict: {},
       scoresPerTopic: {},
+      intervalScorePerTopic: {},
       loading: false,
     };
   },
@@ -218,7 +252,8 @@ export default {
 
       let curMainNumber = null;
       let curMainId = null;
-      let scoresPerTopic = {};
+      let scoresPerTopic = {},
+        intervalScorePerTopic = {};
       this.tableData = this.paperStructureInfo.map((item) => {
         let nitem = {
           ...item,
@@ -230,13 +265,17 @@ export default {
           curMainNumber = item.mainNumber;
           curMainId = this.$randomCode();
           scoresPerTopic[curMainNumber] = undefined;
+          intervalScorePerTopic[curMainNumber] = undefined;
           nitem.mainFirstSub = true;
         }
+        nitem.totalScore = nitem.totalScore || undefined;
+        nitem.intervalScore = nitem.intervalScore || undefined;
         nitem.mainId = curMainId;
 
         return nitem;
       });
       this.scoresPerTopic = scoresPerTopic;
+      this.intervalScorePerTopic = intervalScorePerTopic;
 
       if (!this.tableData.length && this.structureCanEdit) {
         this.createMain();
@@ -248,7 +287,7 @@ export default {
           id: null,
           key: this.$randomCode(),
           mainId: null,
-          isObjective: true,
+          objective: true,
           mainNumber: 1,
           subNumber: 1,
           mainTitle: "",
@@ -368,7 +407,7 @@ export default {
         .filter((item) => item.mainId === row.mainId)
         .forEach((item) => {
           item.questionType = curQt.code;
-          item.isObjective = curQt.qType === "objective";
+          item.objective = curQt.qType === "objective";
           item.optionCount = curQt.optionCount;
         });
     },
@@ -389,6 +428,14 @@ export default {
           item.totalScore = val;
         });
     },
+    intervalScorePerTopicChange(val, row) {
+      if (!val) return;
+      this.tableData
+        .filter((item) => item.mainId === row.mainId)
+        .forEach((item) => {
+          item.intervalScore = val;
+        });
+    },
     checkData() {
       let errorMessages = [];
       this.tableData.forEach((item) => {

+ 12 - 11
src/modules/mark/components/markParam/ModifyMarkGroup.vue

@@ -1,18 +1,19 @@
 <template>
   <el-dialog
-    class="modify-mark-group"
+    class="modify-mark-group modify-marker-question"
     :visible.sync="modalIsShow"
     append-to-body
-    top="0"
+    top="10vh"
     width="900px"
+    title="分组设置"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     :show-close="false"
     @opened="visibleChange"
   >
-    <div slot="title"></div>
-    <el-form ref="rowInfoFormRef" :model="rowInfo" :rules="rowInfoRules" line>
-      <el-form-item label="评卷方式">
+    <!-- <div slot="title"></div> -->
+    <el-form ref="rowInfoFormRef" :model="rowInfo" :rules="rowInfoRules" inline>
+      <el-form-item label="评卷方式:" label-width="80px">
         <el-radio-group v-model="rowInfo.doubleEnable">
           <el-radio :label="false">单评</el-radio>
           <el-radio :label="true">双评</el-radio>
@@ -20,7 +21,7 @@
       </el-form-item>
       <br />
       <template v-if="rowInfo.doubleEnable">
-        <el-form-item label="仲裁阀值" prop="arbitrateThreshold">
+        <el-form-item label="仲裁阀值" prop="arbitrateThreshold">
           <el-input-number
             v-model="rowInfo.arbitrateThreshold"
             class="width-80"
@@ -33,8 +34,8 @@
           >
           </el-input-number>
         </el-form-item>
-        <el-form-item label="合分策略" prop="scorePolicy">
-          <el-select v-model="rowInfo.scorePolicy" class="width-80">
+        <el-form-item label="合分策略" prop="scorePolicy">
+          <el-select v-model="rowInfo.scorePolicy">
             <el-option
               v-for="(val, key) in SCORE_POLICY_TYPE"
               :key="key"
@@ -43,7 +44,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="双评比例" prop="doubleRate">
+        <el-form-item label="双评比例" prop="doubleRate">
           <el-input-number
             v-model="rowInfo.doubleRate"
             class="width-80"
@@ -325,9 +326,9 @@ export default {
       this.selectedQuestions = this.instance.questions;
       this.selectedQuestionNos = this.selectedQuestions.map((item) => item.id);
       this.selectedUsers = this.instance.markers.map((item) => {
-        return { ...item };
+        return { ...item, id: item.userId };
       });
-      this.selectedUserIds = this.instance.markers.map((item) => item.id);
+      this.selectedUserIds = this.instance.markers.map((item) => item.userId);
       this.labelChange();
       this.rowInfo = this.$objAssign(
         {

+ 18 - 1
src/modules/mark/components/markParam/ModifyMarkParams.vue

@@ -133,11 +133,28 @@ export default {
 
       // structure
       const structRes = await markStructureList(params);
-      this.setPaperStructureInfo(structRes.questions || []);
+      let curMainNumber = null;
+      const questions = structRes.questions.map((item) => {
+        let nitem = {
+          ...item,
+          mainFirstSub: false,
+        };
+        if (curMainNumber !== item.mainNumber) {
+          curMainNumber = item.mainNumber;
+          nitem.mainFirstSub = true;
+        }
+        return nitem;
+      });
+      this.setPaperStructureInfo(questions || []);
       this.setStructureCanEdit(structRes.canCreate);
       this.questionSubmit = structRes.questionSubmit;
       // group
       const groupRes = await markGroupList(params);
+      groupRes.groups.forEach((item) => {
+        item.questions.forEach((q) => {
+          q.qno = `${q.mainNumber}-${q.subNumber}`;
+        });
+      });
       this.setGroupInfo(groupRes.groups || []);
       this.setOpenMarkClass(!!groupRes.openMarkClass);
 

+ 1 - 0
src/plugins/utils.js

@@ -341,6 +341,7 @@ export function calcAvg(dataList) {
 
 /** 获取数组最大数 */
 export function maxNum(dataList) {
+  if (!dataList.length) return 0;
   return Math.max.apply(null, dataList);
 }
 

+ 1 - 1
src/views/Home.vue

@@ -343,7 +343,7 @@ export default {
           );
         },
         stmms: () => {
-          return this.checkPrivilege("link", "Submit", "UploadStructure");
+          return this.checkPrivilege("link", "MarkParamSetting", "MarkSetting");
         },
         analysis: () => {
           return this.checkPrivilege("link", "window", "DataInitManage");

+ 1 - 1
src/views/HomePage.vue

@@ -232,7 +232,7 @@ export default {
         return {
           ...item,
           type: "stmms",
-          content: `${item.thirdRelateName}(${item.thirdRelateId}),试卷编号${item.paperNumber},${item.paperType}`,
+          content: `${item.courseName}(${item.courseCode}),试卷编号${item.paperNumber},${item.paperType}`,
         };
       });
       this.taskList[1] = dataList;