zhangjie 1 an în urmă
părinte
comite
8a3fc530ab

+ 24 - 19
src/modules/base/components/course-simple/CourseWeightManage.vue

@@ -3,17 +3,15 @@
     <div class="part-box part-box-pad">
       <p>说明:</p>
       <p>
-        1.请在课程目标考核对应的评价方式表格中打√,并录入权重占比及目标分值
+        1.课程目标评价依据来源于平时成绩和期末考试成绩二部分,请录入平时成绩,期末成绩整体权重及各目标的权重
       </p>
-      <p>2.所有课程目标的总目标分值等于100分;</p>
-      <p>3.各课程目标下评价方式的总权重应等于100%;</p>
-      <p>4.目标整体权重应等于100%,用于计算课程整体达成度。</p>
+      <p>2.各课程目标下评价方式平时成绩部分总权重应等于100%;</p>
     </div>
     <div class="part-box part-box-pad">
       <el-table :data="tableSetData" style="max-width: 1000px" border>
         <el-table-column
           prop="courseTargetName"
-          label="评价方式"
+          label="课程目标"
         ></el-table-column>
         <el-table-column label="平时成绩" width="160">
           <template slot-scope="scope">
@@ -106,7 +104,7 @@
         </el-table-column>
         <el-table-column label="考核/评价环节及目标分值">
           <el-table-column
-            v-for="(item, eindex) in evaluationList"
+            v-for="(item, eindex) in fullEvaluationList"
             :key="item.evaluationId"
             :label="item.evaluationName"
           >
@@ -160,6 +158,7 @@ export default {
       customRate: 0,
       tableSetData: [],
       evaluationList: [],
+      fullEvaluationList: [],
       resultDataList: [],
       curTarget: {},
       evaluationSources: [],
@@ -202,6 +201,9 @@ export default {
         .map((evaluation) => {
           return { ...evaluation };
         });
+      this.fullEvaluationList = data[0].evaluationList.map((evaluation) => {
+        return { ...evaluation };
+      });
 
       this.tableSetData = data;
       this.tableSetData.push({
@@ -246,9 +248,10 @@ export default {
       console.log(this.curTarget);
     },
     getEvaluationSumScore(evaluationList) {
-      return calcSum(
+      const num = calcSum(
         evaluationList.map((item) => (item.enable ? item.targetScore : 0))
       );
+      return num.toFixed(2);
     },
     spanMethod({ rowIndex, columnIndex }) {
       const lineCount = this.resultDataList.length - 1;
@@ -263,17 +266,19 @@ export default {
     updateResultDataList() {
       // 更新合计
       const dataList = this.tableSetData.slice(0, -1);
-      const tatolEvaluation = this.evaluationList.map((evaluation, eindex) => {
-        const targetScore = calcSum(
-          dataList.map((item) => item.evaluationList[eindex].targetScore || 0)
-        );
-        return {
-          evaluationName: evaluation.evaluationName,
-          enable: true,
-          weight: null,
-          targetScore,
-        };
-      });
+      const tatolEvaluation = this.fullEvaluationList.map(
+        (evaluation, eindex) => {
+          const targetScore = calcSum(
+            dataList.map((item) => item.evaluationList[eindex].targetScore || 0)
+          );
+          return {
+            evaluationName: evaluation.evaluationName,
+            enable: true,
+            weight: null,
+            targetScore,
+          };
+        }
+      );
       this.resultDataList = [
         ...dataList,
         {
@@ -288,7 +293,7 @@ export default {
     checkDataList() {
       // 整体权重设置
       if (!this.customRate) {
-        this.$message.error("请输入平成绩权重");
+        this.$message.error("请输入平成绩权重");
         return;
       }
       if (!this.defaultRate) {

+ 0 - 3
src/modules/base/views/CourseSimpleManage.vue

@@ -123,9 +123,6 @@ export default {
       userId: this.$ls.get("user", { id: "" }).id,
     };
   },
-  mounted() {
-    this.getList();
-  },
   methods: {
     async getList() {
       if (!this.checkPrivilege("list", "list")) return;