Browse Source

feat: 客观题答案

zhangjie 8 tháng trước cách đây
mục cha
commit
2b465566d0

+ 46 - 26
src/modules/mark/components/markParam/MarkParamObjectiveAnswer.vue

@@ -17,14 +17,19 @@
 
         <div>
           <el-select
+            v-if="paperTypes.length > 1"
             v-model="curPaperType"
             placeholder="选择卷型"
             :clearable="false"
             style="width: 100px; margin-right: 10px"
             @change="paperTypeChange"
           >
-            <el-option value="A" label="A卷"></el-option>
-            <el-option value="B" label="B卷"></el-option>
+            <el-option
+              v-for="item in paperTypes"
+              :key="item"
+              :value="item"
+              :label="`${item}卷`"
+            ></el-option>
           </el-select>
           <el-button type="primary" @click="toImport">导入标答</el-button>
         </div>
@@ -32,8 +37,8 @@
       <el-table
         ref="TableList"
         :data="tableData"
-        border
         :row-class-name="getRowClassName"
+        border
       >
         <el-table-column width="50" align="center">
           <template slot-scope="scope" v-if="scope.row.mainFirstSub">
@@ -217,6 +222,7 @@ export default {
   data() {
     return {
       loading: false,
+      tableDict: {},
       tableData: [],
       QUESTION_SCORE_TYPE,
       abc: "abcdefghijklmnopqrstuvwxyz".toUpperCase(),
@@ -224,6 +230,7 @@ export default {
         NONE: "全对给分",
         ALL: "任选给分",
       },
+      paperTypes: [],
       curPaperType: "A",
       prevPaperType: "A",
       // import
@@ -251,30 +258,43 @@ export default {
         examId: this.basicInfo.examId,
         paperNumber: this.basicInfo.paperNumber,
       };
+      this.paperTypes = this.basicInfo.paperType.split(",");
+
       const res = await markObjectiveQuestionList(params);
-      let objectiveStructure = res || [];
-      let curMainNumber = null;
-      let curMainId = null;
-      this.tableData = objectiveStructure.map((item) => {
-        let nitem = {
-          ...item,
-          objectivePolicyScore: item.objectivePolicyScore || undefined,
-          mainFirstSub: false,
-          expandSub: true,
-          answerError: "",
-          objectivePolicyError: "",
-        };
-        if (item.questionType <= 3 && !item.objectivePolicy) {
-          nitem.objectivePolicy = "NONE";
-        }
-        if (nitem.mainNumber !== curMainNumber) {
-          curMainNumber = nitem.mainNumber;
-          nitem.mainFirstSub = true;
-          curMainId = this.$randomCode();
-        }
-        nitem.mainId = curMainId;
-        return nitem;
+      const objectiveStructure = res || [];
+
+      this.paperTypes.forEach((paperType) => {
+        let curMainNumber = null;
+        let curMainId = null;
+        const tableData = objectiveStructure
+          .filter((item) => item.paperType === paperType)
+          .map((item) => {
+            let nitem = {
+              ...item,
+              objectivePolicyScore: item.objectivePolicyScore || undefined,
+              mainFirstSub: false,
+              expandSub: true,
+              answerError: "",
+              objectivePolicyError: "",
+            };
+            if (item.questionType <= 3 && !item.objectivePolicy) {
+              nitem.objectivePolicy = "NONE";
+            }
+            if (nitem.mainNumber !== curMainNumber) {
+              curMainNumber = nitem.mainNumber;
+              nitem.mainFirstSub = true;
+              curMainId = this.$randomCode();
+            }
+            nitem.mainId = curMainId;
+            return nitem;
+          });
+
+        this.tableDict[paperType] = tableData;
       });
+
+      this.curPaperType = this.paperTypes[0];
+      this.prevPaperType = this.curPaperType;
+      this.tableData = this.tableDict[this.curPaperType];
     },
     paperTypeChange() {
       if (!this.checkData()) {
@@ -282,6 +302,7 @@ export default {
         return;
       }
       this.prevPaperType = this.curPaperType;
+      this.tableData = this.tableDict[this.curPaperType];
     },
     getRowClassName({ row }) {
       let classNames = [];
@@ -409,7 +430,6 @@ export default {
         "保存成功,请到成绩检查菜单点击客观题统分按钮进行统分!"
       );
 
-      // TODO:检查其他卷是否已提交
       // this.$emit("confirm");
     },
     cancel() {

+ 15 - 0
src/modules/target/api.js

@@ -146,6 +146,21 @@ export const courseOutlineTargetRequirementKnowledge = (datas) => {
 //   return $post("/api/admin/basic/professional/save", datas);
 // };
 
+// 课程大纲管理-审核  ------------------->
+export const courseOutlineAuditReport = (obeCourseOutlineId) => {
+  return $postParam("/api/admin/obe/course_outline/audit_report", {
+    obeCourseOutlineId,
+  });
+};
+export const courseOutlineAuditRationalityReport = (obeCourseOutlineId) => {
+  return $postParam("/api/admin/obe/course_outline/audit_rationality_report", {
+    obeCourseOutlineId,
+  });
+};
+export const courseOutlineAuditSave = (datas) => {
+  return $post("/api/admin/obe/course_outline/audit/save", datas);
+};
+
 // 课程考核设置 ------------------->
 export const courseExamineListPage = (datas) => {
   return $postParam(

+ 358 - 0
src/modules/target/components/course-outline/AuditCourseOutlineDialog.vue

@@ -0,0 +1,358 @@
+<template>
+  <el-dialog
+    class="page-dialog"
+    :visible.sync="modalIsShow"
+    :title="title"
+    fullscreen
+    append-to-body
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    @open="visibleChange"
+    @close="dialogClose"
+  >
+    <div class="part-page">
+      <h1>{{ reportTitle }}</h1>
+      <!-- 课程基本信息 -->
+      <div v-if="courseBasicInfo" class="page-part">
+        <h3>课程基本信息</h3>
+        <el-form label-width="100px">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="courseCode" label="课程编码:">
+                <el-input
+                  v-model.trim="courseBasicInfo.courseCode"
+                  placeholder="请输入课程编码"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="courseName" label="课程名称:">
+                <el-input
+                  v-model.trim="courseBasicInfo.courseName"
+                  placeholder="请输入课程名称"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="semester" label="授课学期:">
+                <el-input
+                  v-model.trim="courseBasicInfo.semester"
+                  placeholder="请输入授课学期"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="professional" label="适用专业:">
+                <el-input
+                  v-model.trim="courseBasicInfo.professional"
+                  placeholder="请输入适用专业"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="period" label="学时:">
+                <el-input-number
+                  v-model="courseBasicInfo.period"
+                  placeholder="请输入学时"
+                  :min="0"
+                  :max="999"
+                  :controls="false"
+                ></el-input-number>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="credit" label="学分:">
+                <el-input-number
+                  v-model="courseBasicInfo.credit"
+                  placeholder="请录入学分"
+                  size="small"
+                  :min="0"
+                  :max="999"
+                  :controls="false"
+                ></el-input-number>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="clazz" label="授课班级:">
+                <el-input
+                  v-model.trim="courseBasicInfo.clazz"
+                  placeholder="请输入授课班级"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="teacher" label="授课教师:">
+                <el-input
+                  v-model.trim="courseBasicInfo.teacher"
+                  placeholder="请输入授课教师"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <!-- 课程目标情况 -->
+      <div v-if="courseTargetInfo" class="page-part">
+        <h3>课程目标情况</h3>
+        <table class="table">
+          <tr>
+            <th rowspan="2"></th>
+            <th colspan="3">过程性评价</th>
+            <th colspan="3">终结性评价</th>
+          </tr>
+          <tr>
+            <th>形式与内容</th>
+            <th>观测点</th>
+            <th>分值</th>
+            <th>形式与内容</th>
+            <th>观测点</th>
+            <th>分值</th>
+          </tr>
+          <template v-for="(item, index) in courseEvaluateList">
+            <tr
+              v-for="(evaluate, eindex) in item.procedureEvaluateList"
+              :key="`${index}-${eindex}`"
+            >
+              <td
+                v-if="eindex === 0"
+                :rowspan="item.procedureEvaluateList.length"
+              >
+                {{ item.name }}
+              </td>
+              <td>{{ evaluate.content }}</td>
+              <td>{{ evaluate.point }}</td>
+              <td>{{ evaluate.score }}</td>
+              <template v-if="eindex === 0">
+                <td :rowspan="item.procedureEvaluateList.length">
+                  {{ item.finalityEvaluateList[0]?.content }}
+                </td>
+                <td :rowspan="item.procedureEvaluateList.length">
+                  {{ item.finalityEvaluateList[0]?.point }}
+                </td>
+                <td :rowspan="item.procedureEvaluateList.length">
+                  {{ item.finalityEvaluateList[0]?.score }}
+                </td>
+              </template>
+            </tr>
+          </template>
+          <tr>
+            <td>总目标分值</td>
+            <td colspan="3">{{ courseTargetInfo.proceduralTotalScore }}</td>
+            <td colspan="3">{{ courseTargetInfo.finalityTotalScore }}</td>
+          </tr>
+          <tr>
+            <td colspan="7">
+              <el-row>
+                <el-col :span="12">
+                  <span>课程负责人:</span>
+                  <el-input
+                    v-model="courseTargetInfo.courseManager"
+                    placeholder="请输入"
+                    clearable
+                  ></el-input>
+                </el-col>
+                <el-col :span="12">
+                  <span>填写日期:</span>
+                  <el-date-picker
+                    v-model="courseTargetInfo.date"
+                    type="date"
+                    value-format="timestamp"
+                  >
+                  </el-date-picker>
+                </el-col>
+              </el-row>
+            </td>
+          </tr>
+        </table>
+      </div>
+
+      <!-- 合理性评价 -->
+      <div v-if="rationalityEvaluation" class="page-part">
+        <h3>合理性评价 <span class="tips">(请在对应结论处打√)</span></h3>
+        <table class="table">
+          <tr>
+            <th></th>
+            <th>评价内容</th>
+            <th>合理</th>
+            <th>较合理</th>
+            <th>不合理</th>
+          </tr>
+          <tr
+            v-for="(
+              item, index
+            ) in rationalityEvaluation.rationalityEvaluationDetailList"
+            :key="index"
+          >
+            <td>{{ item.index || "" }}</td>
+            <td>{{ item.content }}</td>
+            <td>
+              <el-checkbox
+                v-model="item.reasonable"
+                @change="() => evaluationChange(item, 'reasonable')"
+              ></el-checkbox>
+            </td>
+            <td>
+              <el-checkbox
+                v-model="item.middle"
+                @change="() => evaluationChange(item, 'reasonable')"
+              ></el-checkbox>
+            </td>
+            <td>
+              <el-checkbox
+                v-model="item.unreasonable"
+                @change="() => evaluationChange(item, 'reasonable')"
+              ></el-checkbox>
+            </td>
+          </tr>
+          <tr>
+            <td colspan="5">存在的问题及建议:</td>
+          </tr>
+          <tr>
+            <td colspan="5"></td>
+          </tr>
+          <tr>
+            <td colspan="5">
+              <el-row>
+                <el-col :span="12">
+                  <span>课程负责人:</span>
+                  <el-input
+                    v-model="courseTargetInfo.courseManager"
+                    placeholder="请输入"
+                    clearable
+                  ></el-input>
+                </el-col>
+                <el-col :span="12">
+                  <span>填写日期:</span>
+                  <el-date-picker
+                    v-model="courseTargetInfo.date"
+                    type="date"
+                    value-format="timestamp"
+                  >
+                  </el-date-picker>
+                </el-col>
+              </el-row>
+            </td>
+          </tr>
+          <tr>
+            <td colspan="5">
+              <el-row>
+                <el-col :span="12">
+                  <span>课程负责人:</span>
+                  <el-input
+                    v-model="courseTargetInfo.courseManager"
+                    placeholder="请输入"
+                    clearable
+                  ></el-input>
+                </el-col>
+                <el-col :span="12">
+                  <span>填写日期:</span>
+                  <el-date-picker
+                    v-model="courseTargetInfo.date"
+                    type="date"
+                    value-format="timestamp"
+                  >
+                  </el-date-picker>
+                </el-col>
+              </el-row>
+            </td>
+          </tr>
+        </table>
+      </div>
+    </div>
+
+    <div slot="footer"></div>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  courseOutlineAuditReport,
+  courseOutlineAuditRationalityReport,
+  // courseOutlineAuditSave,
+} from "../../api";
+
+export default {
+  name: "audit-course-outline-dialog",
+  props: {
+    rowData: {
+      type: Object,
+      default() {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      modalIsShow: false,
+      loading: false,
+      courseBasicInfo: null,
+      courseTargetInfo: null,
+      rationalityEvaluation: null,
+      audit: this.checkPrivilege("link", "audit"),
+      auditRationality: this.checkPrivilege("link", "auditRationality"),
+    };
+  },
+  computed: {
+    reportTitle() {
+      return this.auditRationality
+        ? "课程目标达成情况评价依据合理性审核表"
+        : "课程目标达成情况评价依据审核表";
+    },
+    title() {
+      return `${this.rowData.outlineName} ${this.reportTitle}`;
+    },
+  },
+  methods: {
+    visibleChange() {
+      this.initData();
+    },
+    async initData() {
+      const func = this.auditRationality
+        ? courseOutlineAuditRationalityReport
+        : courseOutlineAuditReport;
+      const res = await func(this.rowData.id);
+
+      const { courseBasicInfo, courseTargetInfo, rationalityEvaluation } =
+        res || {};
+
+      this.courseBasicInfo = courseBasicInfo;
+      this.courseTargetInfo = courseTargetInfo;
+      this.rationalityEvaluation = rationalityEvaluation;
+    },
+    evaluationChange(evaluate, type) {
+      if (!evaluate[type]) return;
+
+      const keys = ["reasonable", "middle", "unreasonable"];
+      keys
+        .filter((k) => k !== type)
+        .forEach((k) => {
+          evaluate[k] = false;
+        });
+    },
+    cancel() {
+      this.modalIsShow = false;
+    },
+    open() {
+      this.modalIsShow = true;
+    },
+    dialogClose() {
+      this.courseBasicInfo = null;
+      this.courseTargetInfo = null;
+      this.rationalityEvaluation = null;
+    },
+  },
+};
+</script>

+ 105 - 0
src/modules/target/components/course-outline/data.json

@@ -0,0 +1,105 @@
+{
+  "courseOutlineId": "577087461423841280",
+  "courseBasicInfo": {
+    "courseCode": "0100",
+    "courseName": "电力电子与电力传动",
+    "semester": "第一学期",
+    "professional": "电气专业",
+    "period": null,
+    "credit": null,
+    "clazz": null,
+    "teacher": null
+  },
+  "courseTargetInfo": {
+    "proceduralTotalScore": 20.00,
+    "finalityTotalScore": 80.00,
+    "courseManager": null,
+    "date": 1728541291980,
+    "courseEvaluateList": [
+      {
+        "name": "课程目标一",
+        "procedureEvaluateList": [
+          {
+            "content": "作业",
+            "point": null,
+            "score": 15.00
+          },
+          {
+            "content": "考勤",
+            "point": null,
+            "score": 5.00
+          }
+        ],
+        "finalityEvaluateList": [
+          {
+            "content": "期末考试",
+            "point": null,
+            "score": 50.00
+          }
+        ]
+      },
+      {
+        "name": "课程目标二",
+        "procedureEvaluateList": [],
+        "finalityEvaluateList": [
+          {
+            "content": "期末考试",
+            "point": null,
+            "score": 30.00
+          }
+        ]
+      }
+    ]
+  },
+  "rationalityEvaluation": {
+    "rationalityEvaluationDetailList": [
+      {
+        "index": 1,
+        "content": "课程评价落实教学大纲情况",
+        "reasonable": null,
+        "middle": null,
+        "unreasonable": null
+      },
+      {
+        "index": 2,
+        "content": "评价形式是否合理(是否采用全过程、多元化形式开展评价)",
+        "reasonable": null,
+        "middle": null,
+        "unreasonable": null
+      },
+      {
+        "index": 3,
+        "content": "评价内容是否合理(是否能够覆盖课程目标的要求)",
+        "reasonable": null,
+        "middle": null,
+        "unreasonable": null
+      },
+      {
+        "index": 4,
+        "content": "评价内容是否合理(是否能够有效评价课程目标的达成情况)",
+        "reasonable": null,
+        "middle": null,
+        "unreasonable": null
+      },
+      {
+        "index": 5,
+        "content": "评价结果是否合理(是否能客观反映课程目标达成情况)",
+        "reasonable": null,
+        "middle": null,
+        "unreasonable": null
+      },
+      {
+        "index": null,
+        "content": "合理性总体评价",
+        "reasonable": null,
+        "middle": null,
+        "unreasonable": null
+      }
+    ],
+    "questionAndAdvice": null,
+    "professionalManager": null,
+    "evaluateDate": 1728541291980,
+    "auditor": null,
+    "auditDate": 1728541291980
+  }
+}