Parcourir la source

目标达成度调整

zhangjie il y a 1 an
Parent
commit
d2a9810eaa

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

@@ -287,6 +287,9 @@ body {
     font-weight: 600;
     color: $--color-text-gray;
   }
+  .td-bg {
+    background-color: #f5f7fa;
+  }
 
   &--border {
     border: 1px solid $--color-border;

+ 1 - 1
src/modules/course/api.js

@@ -66,7 +66,7 @@ export const endScoreEnable = ({ id, enable }) => {
 };
 // 成绩管理-试卷蓝图详情
 export const endScorePaperPositiveDetail = (datas) => {
-  return $post(
+  return $postParam(
     "/api/admin/course/degree/final_score/paper_struct/query",
     datas
   );

+ 4 - 3
src/modules/course/components/EndScoreManage.vue

@@ -12,7 +12,8 @@
         <el-table-column type="index" label="序号" width="70"></el-table-column>
         <el-table-column prop="name" label="姓名"></el-table-column>
         <el-table-column prop="studentCode" label="学号"></el-table-column>
-        <el-table-column prop="score" label="成绩"> </el-table-column>
+        <el-table-column prop="score" label="成绩" width="80">
+        </el-table-column>
         <el-table-column prop="scoreDetailContent" label="成绩明细">
         </el-table-column>
         <el-table-column class-name="action-column" label="操作" width="120px">
@@ -92,14 +93,14 @@ export default {
       dataList: [],
       curRow: {},
       // import
-      uploadUrl: "/api/admin/course/degree/score/end_exam/import",
+      uploadUrl: "/api/admin/course/degree/final_score/import",
       dfilename: "期末成绩导入模板.xlsx",
       downloading: false,
     };
   },
   mounted() {
     this.filter = this.$objAssign(this.filter, this.course);
-    // this.toPage(1);
+    this.toPage(1);
   },
   methods: {
     async getList() {

+ 2 - 1
src/modules/course/components/ModifyEndScore.vue

@@ -20,7 +20,8 @@
         label="考生姓名:"
         :rules="{
           required: true,
-          message: '考生姓名为空',
+          message: '考生姓名不能为空,最多30字符',
+          max: 30,
           trigger: 'change',
         }"
       >

+ 2 - 1
src/modules/course/components/ModifyNormalScore.vue

@@ -20,7 +20,8 @@
         label="考生姓名:"
         :rules="{
           required: true,
-          message: '考生姓名为空',
+          message: '考生姓名不能为空,最多30字符',
+          max: 30,
           trigger: 'change',
         }"
       >

+ 15 - 5
src/modules/course/components/NormalScoreManage.vue

@@ -35,6 +35,19 @@
           </template>
         </el-table-column>
       </el-table>
+      <div class="part-page">
+        <el-pagination
+          background
+          layout="total, sizes, prev, pager, next, jumper"
+          :pager-count="5"
+          :current-page="current"
+          :total="total"
+          :page-size="size"
+          @current-change="toPage"
+          @size-change="pageSizeChange"
+        >
+        </el-pagination>
+      </div>
     </div>
 
     <!-- ModifyNormalScore -->
@@ -100,7 +113,7 @@ export default {
   },
   mounted() {
     this.filter = this.$objAssign(this.filter, this.course);
-    // this.toPage(1);
+    this.toPage(1);
   },
   methods: {
     async getList() {
@@ -141,10 +154,7 @@ export default {
       this.$refs.ModifyNormalScore.open();
     },
     uploadSuccess({ data }) {
-      let msg = `${data.success}`;
-      if (data.error) {
-        msg = +`,${data.error}`;
-      }
+      let msg = `${data.success},错误:${data.error}`;
       this.$message.success(msg);
       this.getList();
     },

+ 7 - 4
src/modules/course/components/SetBlueDialog.vue

@@ -3,8 +3,8 @@
     <el-dialog
       :visible.sync="modalIsShow"
       title="设置试卷蓝图"
-      top="10vh"
-      width="600px"
+      top="10px"
+      width="800px"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
       append-to-body
@@ -14,12 +14,12 @@
         <el-table-column
           prop="mainNumber"
           label="大题号"
-          width="100px"
+          width="80px"
         ></el-table-column>
         <el-table-column
           prop="subNumber"
           label="小题号"
-          width="100px"
+          width="80px"
         ></el-table-column>
         <el-table-column prop="dimensionList" label="知识点">
           <template slot-scope="scope">
@@ -95,6 +95,9 @@ export default {
       });
       this.dataList = res || [];
     },
+    visibleChange() {
+      this.getBlueDetail();
+    },
     cancel() {
       this.modalIsShow = false;
     },

+ 68 - 45
src/modules/course/components/TargetReportDetail.vue

@@ -16,7 +16,12 @@
         >
       </div>
       <div>
-        <el-button type="primary" @click="toExport">导出报告</el-button>
+        <el-button type="primary" :loading="downloading" @click="toSave"
+          >保存报告</el-button
+        >
+        <el-button type="primary" :loading="downloading" @click="toExport"
+          >导出报告</el-button
+        >
         <el-button type="danger" @click="cancel">退出</el-button>
       </div>
     </div>
@@ -29,11 +34,11 @@
     <div class="part-box part-box-pad">
       <table class="table table-tiny">
         <tr>
-          <td>课程编码</td>
+          <td class="td-bg">课程编码</td>
           <td>{{ commonInfo.courseCode }}</td>
-          <td>课程名称</td>
+          <td class="td-bg">课程名称</td>
           <td>{{ commonInfo.courseName }}</td>
-          <td>课程类别</td>
+          <td class="td-bg">课程类别</td>
           <td>
             <el-input
               v-model="courseBasicInfo.courseType"
@@ -41,7 +46,7 @@
               size="small"
             ></el-input>
           </td>
-          <td>学分</td>
+          <td class="td-bg">学分</td>
           <td>
             <el-input-number
               v-model="courseBasicInfo.credit"
@@ -55,7 +60,7 @@
           </td>
         </tr>
         <tr>
-          <td>考核方式</td>
+          <td class="td-bg">考核方式</td>
           <td>
             <el-input
               v-model="courseBasicInfo.evaluationMode"
@@ -63,11 +68,11 @@
               size="small"
             ></el-input>
           </td>
-          <td>开课时间</td>
+          <td class="td-bg">开课时间</td>
           <td>{{ courseBasicInfo.openTime }}</td>
-          <td>授课对象</td>
+          <td class="td-bg">授课对象</td>
           <td>{{ courseBasicInfo.teachingObject }}</td>
-          <td>学时</td>
+          <td class="td-bg">学时</td>
           <td>
             <el-input-number
               v-model="courseBasicInfo.period"
@@ -81,7 +86,7 @@
           </td>
         </tr>
         <tr>
-          <td>选课人数</td>
+          <td class="td-bg">选课人数</td>
           <td>
             <el-input-number
               v-model="courseBasicInfo.selectionCount"
@@ -93,9 +98,9 @@
               style="width: 125px"
             ></el-input-number>
           </td>
-          <td>参评人数</td>
+          <td class="td-bg">参评人数</td>
           <td>{{ courseBasicInfo.participantCount }}</td>
-          <td>课程目标达成度期望值</td>
+          <td class="td-bg">课程目标达成度期望值</td>
           <td colspan="3">
             <el-select
               v-model="courseBasicInfo.courseDegree"
@@ -112,9 +117,9 @@
           </td>
         </tr>
         <tr>
-          <td>任课老师</td>
+          <td class="td-bg">任课老师</td>
           <td>{{ courseBasicInfo.teacher }}</td>
-          <td>评价负责人</td>
+          <td class="td-bg">评价负责人</td>
           <td>
             <el-input
               v-model="courseBasicInfo.director"
@@ -122,7 +127,7 @@
               size="small"
             ></el-input>
           </td>
-          <td>评价参与人</td>
+          <td class="td-bg">评价参与人</td>
           <td colspan="3">
             <el-input
               v-model="courseBasicInfo.participant"
@@ -219,7 +224,7 @@
       <h4 class="part-title">课程考核成绩评价结果</h4>
 
       <table class="table">
-        <tr>
+        <tr class="td-bg">
           <th>课程目标</th>
           <th>评价依据</th>
           <th>评价环节</th>
@@ -297,7 +302,7 @@
         >
           <el-table-column min-width="120" align="center">
             <template slot="header">
-              期末考试({{ target.finalWeight }})
+              期末考试<br />({{ target.finalWeight | percentFilter }})
             </template>
             <el-table-column
               v-for="dimension in target.finalDimensions"
@@ -311,14 +316,14 @@
           </el-table-column>
           <el-table-column min-width="120" align="center">
             <template slot="header">
-              平时考试({{ target.usualWeight }})
+              平时考试<br />({{ target.usualWeight | percentFilter }})
             </template>
             <el-table-column
               v-for="work in target.usualWorks"
               :key="`${target.targetId}${work}`"
               :label="work"
               :prop="`${target.targetId}-usual-${work}`"
-              min-width="60"
+              min-width="100"
               align="center"
             >
             </el-table-column>
@@ -331,13 +336,6 @@
           width="100"
         ></el-table-column>
       </el-table>
-
-      <div class="chart-box" style="height: 400px; margin-top: 20px">
-        <v-chart
-          v-if="studentScoreChartOption"
-          :option="studentScoreChartOption"
-        ></v-chart>
-      </div>
     </div>
 
     <div slot="footer"></div>
@@ -345,8 +343,12 @@
 </template>
 
 <script>
-import { reportData } from "./data";
-import { targetReportDetail, exportTargetReport } from "../api";
+// import { reportData } from "./data";
+import {
+  targetReportDetail,
+  exportTargetReport,
+  targetReportSave,
+} from "../api";
 import { downloadByApi } from "@/plugins/download";
 import { calcSum } from "@/plugins/utils";
 
@@ -360,9 +362,14 @@ export default {
       },
     },
   },
+  filters: {
+    percentFilter(val) {
+      return ((val || 0) / 100).toFixed(2);
+    },
+  },
   data() {
     return {
-      modalIsShow: true,
+      modalIsShow: false,
       expectancyList: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
       commonInfo: {},
       courseBasicInfo: {},
@@ -376,14 +383,9 @@ export default {
       courseTargets: [],
       targetColumnCounts: [],
       studentScoreTable: [],
-      studentScoreChartOption: null,
       downloading: false,
     };
   },
-  mounted() {
-    // this.initData();
-    this.buildData(reportData);
-  },
   methods: {
     cancel() {
       this.modalIsShow = false;
@@ -395,11 +397,11 @@ export default {
       this.commonInfo = data.commonInfo;
       this.courseBasicInfo = data.courseBasicInfo;
 
-      this.courseTargetValue = data.courseEvaluationResult.targetValue;
-      this.courseTargetList = data.courseEvaluationResult.targetList;
+      this.courseTargetValue = data.courseEvaluationResultInfo.targetValue;
+      this.courseTargetList = data.courseEvaluationResultInfo.targetList;
 
       const {
-        courseEvaluationSpread: { questionInfo, scoreList },
+        courseEvaluationSpreadInfo: { questionInfo, scoreList },
       } = data;
       this.parsePaperStructs(questionInfo);
       this.parseQuestionInfoTable(questionInfo);
@@ -407,16 +409,11 @@ export default {
       this.courseTargetListChartOption = this.getCourseTargetListChartOption();
 
       const {
-        courseEvaluationResultDetail: {
-          examStudentList,
-          courseTargetList: examStudentTargets,
-        },
+        courseEvaluationResultDetailInfo: { examStudentList },
       } = data;
 
       this.parseCourseTargets(examStudentList);
       this.parseStudentScoreTable(examStudentList);
-      this.studentScoreChartOption =
-        this.parseStudentScoreChartOption(examStudentTargets);
     },
     async initData() {
       const data = await targetReportDetail({
@@ -661,6 +658,10 @@ export default {
       if (!examStudentList || !examStudentList.length) return;
 
       const targetList = examStudentList[0].targetList;
+      const targetVals = {};
+      this.courseTargetList.forEach((target) => {
+        targetVals[target.targetId] = target.evaluationValue;
+      });
 
       let tColumnCounts = [];
       this.courseTargets = targetList.map((target) => {
@@ -669,7 +670,7 @@ export default {
           targetName: target.targetName,
           finalWeight: target.finalScore.weight,
           usualWeight: target.usualScore.weight,
-          evaluationValue: target.evaluationValue,
+          evaluationValue: targetVals[target.targetId],
         };
         ntarget.finalDimensions = target.finalScore.dimensionList.map(
           (item) => item.dimensionCode
@@ -858,6 +859,22 @@ export default {
       };
       return options;
     },
+    async toSave() {
+      if (this.downloading) return;
+      this.downloading = true;
+
+      const res = await targetReportSave({
+        examId: this.course.examId,
+        courseName: this.course.courseName,
+        courseCode: this.course.courseCode,
+        paperNumber: this.course.paperNumber,
+        ...this.courseBasicInfo,
+      }).catch(() => {});
+      this.downloading = false;
+
+      if (!res) return;
+      this.$message.success("保存成功!");
+    },
     async toExport() {
       if (this.downloading) return;
       this.downloading = true;
@@ -867,7 +884,6 @@ export default {
           examId: this.course.examId,
           courseCode: this.course.courseCode,
           paperNumber: this.course.paperNumber,
-          paperType: this.course.paperType,
         };
         return exportTargetReport(datas);
       }).catch((e) => {
@@ -881,3 +897,10 @@ export default {
   },
 };
 </script>
+
+<style scoped>
+.td-bg {
+  color: #8b8fa1;
+  font-weight: 500;
+}
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 381 - 595
src/modules/course/components/data.json


+ 6 - 3
src/modules/course/views/TargetReportManage.vue

@@ -48,7 +48,7 @@
         >
           <template slot-scope="scope">
             <el-button
-              v-if="checkPrivilege('link', 'preview')"
+              v-if="checkPrivilege('link', 'View')"
               class="btn-primary"
               type="text"
               @click="toDetail(scope.row)"
@@ -72,7 +72,10 @@
       </div>
     </div>
     <!-- TargetReportDetail -->
-    <target-report-detail ref="TargetReportDetail"></target-report-detail>
+    <target-report-detail
+      ref="TargetReportDetail"
+      :course="curRow"
+    ></target-report-detail>
   </div>
 </template>
 
@@ -115,7 +118,7 @@ export default {
       this.getList();
     },
     search() {
-      // this.toPage(1);
+      this.toPage(1);
     },
     toDetail(row) {
       this.curRow = row;

+ 1 - 1
src/modules/course/views/TargetScoreManage.vue

@@ -44,7 +44,7 @@
         >
           <template slot-scope="scope">
             <el-button
-              v-if="checkPrivilege('link', 'detail')"
+              v-if="checkPrivilege('link', 'Score')"
               class="btn-primary"
               type="text"
               @click="toDetail(scope.row)"

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff