zengyicheng 1 yıl önce
ebeveyn
işleme
1cee17b631
2 değiştirilmiş dosya ile 18 ekleme ve 12 silme
  1. 1 1
      index.html
  2. 17 11
      src/components/pages/disAdmin/score.vue

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <title>广东省案例征集</title>
+    <title>PBL案例征集</title>
     <link rel="shortcut icon" type="image/x-icon" href="static/logo1.ico">
     <style>
         @charset "utf-8";

+ 17 - 11
src/components/pages/disAdmin/score.vue

@@ -126,7 +126,7 @@
               <div>{{ scope.row.firstPw ? scope.row.firstPw : "-" }}</div>
             </template>
           </el-table-column>
-           <el-table-column label="评委2" min-width="10" align="center">
+          <el-table-column label="评委2" min-width="10" align="center">
             <template slot-scope="scope">
               <div>{{ scope.row.secondPw ? scope.row.secondPw : "-" }}</div>
             </template>
@@ -468,7 +468,8 @@ export default {
       var typea, typeb, typec, typed;
       for (var i = 0; i < this.CourseType[0].length; i++) {
         if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
-          typeE.push(this.CourseType[0][i].id);
+          // typeE.push(this.CourseType[0][i].id);
+          typeE = []
         } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
           if (this.CourseType[0][i].name == "案例组别") {
             typea = this.courseTypeId[this.CourseType[0][i].id];
@@ -543,7 +544,7 @@ export default {
                 }
               }
             }
-            p[j].sum = isScore == 0 ? 0 : (sum / isScore).toFixed(2)
+            p[j].sum = isScore == 0 ? 0 : (sum / isScore).toFixed(2);
           }
           this.tableData = p;
           this.$forceUpdate();
@@ -871,17 +872,17 @@ export default {
             .get(this.$store.state.api + "selectScoreByUid", params)
             .then((res) => {
               var scoreListByuid = res.data[0];
-              for(var i = 0;i<scoreList.length;i++){
-                for(var j = 0;j<scoreListByuid.length;j++){
-                  if(scoreList[i].rid == scoreListByuid[j].rid){
-                    if(scoreList[i].scorer == scoreListByuid[j].scorer){
+              for (var i = 0; i < scoreList.length; i++) {
+                for (var j = 0; j < scoreListByuid.length; j++) {
+                  if (scoreList[i].rid == scoreListByuid[j].rid) {
+                    if (scoreList[i].scorer == scoreListByuid[j].scorer) {
                       var point = JSON.parse(scoreListByuid[j].score);
                       var a = parseInt(point.first);
                       var b = parseInt(point.second);
                       var c = parseInt(point.third);
                       var sumScore = Math.round((a + b + c) / 3);
                       scoreListByuid[j].firstPw = sumScore;
-                    }else{
+                    } else {
                       var point = JSON.parse(scoreList[i].score);
                       var a = parseInt(point.first);
                       var b = parseInt(point.second);
@@ -890,9 +891,14 @@ export default {
                       scoreListByuid[j].secondPw = sumScore;
                     }
                   }
-                  if(scoreListByuid[j].firstPw && scoreListByuid[j].secondPw){
-                    scoreListByuid[j].sum = ((scoreListByuid[j].firstPw + scoreListByuid[j].secondPw) / 2).toFixed(2)
-                    scoreListByuid[j].title = JSON.parse(scoreListByuid[j].info).title;
+                  if (scoreListByuid[j].firstPw && scoreListByuid[j].secondPw) {
+                    scoreListByuid[j].sum = (
+                      (scoreListByuid[j].firstPw + scoreListByuid[j].secondPw) /
+                      2
+                    ).toFixed(2);
+                    scoreListByuid[j].title = JSON.parse(
+                      scoreListByuid[j].info
+                    ).title;
                   }
                 }
               }