Pārlūkot izejas kodu

修改评分显示及功能

zengyicheng 1 gadu atpakaļ
vecāks
revīzija
7d4ed4a1b6

+ 1 - 1
dist/index.html

@@ -24,4 +24,4 @@
             height: 100%;
             width: 100%;
             background: #e6eaf0;
-        }</style><link href=./static/css/app.70962c0ea4b89bf1d18d21f050b2664c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.f73e1f5407603f6a733b.js></script><script type=text/javascript src=./static/js/vendor.0c21445a4cd992a83ee9.js></script><script type=text/javascript src=./static/js/app.4579e6f18801c838a129.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>
+        }</style><link href=./static/css/app.5a6043f9b96c91b70af2ee2834492b8d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.f73e1f5407603f6a733b.js></script><script type=text/javascript src=./static/js/vendor.0c21445a4cd992a83ee9.js></script><script type=text/javascript src=./static/js/app.1fd49e557492bd200acc.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.5a6043f9b96c91b70af2ee2834492b8d.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.5a6043f9b96c91b70af2ee2834492b8d.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.70962c0ea4b89bf1d18d21f050b2664c.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.1fd49e557492bd200acc.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.1fd49e557492bd200acc.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.4579e6f18801c838a129.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.4579e6f18801c838a129.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/manifest.f73e1f5407603f6a733b.js.map


+ 2 - 2
src/components/login.vue

@@ -312,10 +312,10 @@ export default {
                 this.$router.push("/eventCenter?steps=" + "1");
               } else if (isU == 2 || isU == 4) {
                 //市级账号 munAdmin
-                this.$router.push("/anliList");
+                this.$router.push("/score");
               } else if (isU == 5 || isU == 6) {
                 //区县账号 disAdmin
-                this.$router.push("/anliList1");
+                this.$router.push("/score1");
               } else if (isU == 3) {
                 //省级账号 proAdmin
                 this.$router.push("/anliList2");

+ 47 - 2
src/components/pages/disAdmin/score.vue

@@ -103,6 +103,16 @@
               <div>{{ scope.row.scoreName ? scope.row.scoreName : "-" }}</div>
             </template>
           </el-table-column> -->
+          <el-table-column label="评委1" min-width="10" align="center">
+            <template slot-scope="scope">
+              <div>{{ scope.row.firstPw ? scope.row.firstPw : "-" }}</div>
+            </template>
+          </el-table-column>
+           <el-table-column label="评委2" min-width="10" align="center">
+            <template slot-scope="scope">
+              <div>{{ scope.row.secondPw ? scope.row.secondPw : "-" }}</div>
+            </template>
+          </el-table-column>
           <el-table-column label="评分结果" min-width="10" align="center">
             <template slot-scope="scope">
               <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div>
@@ -365,7 +375,7 @@ export default {
       this.$router.push(path);
     },
     isNumber(e, t) {
-      if(e.includes('.')){
+      if (e.includes(".")) {
         this.$message.error("暂时不支持小数点评分");
       }
       let value = /^\d+$/.test(e);
@@ -481,13 +491,48 @@ export default {
           const start = (this.page - 1) * 10;
           const end = start + 10;
           let pageData = scoreList.slice(start, end);
-          this.tableData = pageData;
+          this.selectPwScore(pageData);
           this.isLoading = false;
         })
         .catch((err) => {
           console.error(err);
         });
     },
+    selectPwScore(p) {
+      this.ajax
+        .get(this.$store.state.api + "selectAllScore")
+        .then((res) => {
+          var scoreList = res.data[0];
+          for (var j = 0; j < p.length; j++) {
+            let sum = 0;
+            let isScore = 0;
+            for (var i = 0; i < scoreList.length; i++) {
+              if (p[j].id == scoreList[i].rid) {
+                var point = JSON.parse(scoreList[i].score);
+                var a = parseInt(point.first);
+                var b = parseInt(point.second);
+                var c = parseInt(point.third);
+                var sumScore = Math.round((a + b + c) / 3);
+                sum += sumScore;
+                isScore++;
+                if (!p[j].firstPw) {
+                  p[j].firstPw = sumScore;
+                } else {
+                  if (!p[j].secondPw) {
+                    p[j].secondPw = sumScore;
+                  }
+                }
+              }
+            }
+            p[j].sum = isScore == 0 ? 0 : (sum / isScore).toFixed(2)
+          }
+          this.tableData = p;
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     // getAnliList(rc) {
     //   this.isLoading = true;
     //   var typeE = [];

+ 46 - 1
src/components/pages/munAdmin/score.vue

@@ -103,6 +103,16 @@
               <div>{{ scope.row.scoreName ? scope.row.scoreName : "-" }}</div>
             </template>
           </el-table-column> -->
+          <el-table-column label="评委1" min-width="10" align="center">
+            <template slot-scope="scope">
+              <div>{{ scope.row.firstPw ? scope.row.firstPw : "-" }}</div>
+            </template>
+          </el-table-column>
+           <el-table-column label="评委2" min-width="10" align="center">
+            <template slot-scope="scope">
+              <div>{{ scope.row.secondPw ? scope.row.secondPw : "-" }}</div>
+            </template>
+          </el-table-column>
           <el-table-column label="评分结果" min-width="10" align="center">
             <template slot-scope="scope">
               <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div>
@@ -480,13 +490,48 @@ export default {
           const start = (this.page - 1) * 10;
           const end = start + 10;
           let pageData = scoreList.slice(start, end);
-          this.tableData = pageData;
+          this.selectPwScore(pageData);
           this.isLoading = false;
         })
         .catch((err) => {
           console.error(err);
         });
     },
+    selectPwScore(p) {
+      this.ajax
+        .get(this.$store.state.api + "selectAllScore")
+        .then((res) => {
+          var scoreList = res.data[0];
+          for (var j = 0; j < p.length; j++) {
+            let sum = 0;
+            let isScore = 0;
+            for (var i = 0; i < scoreList.length; i++) {
+              if (p[j].id == scoreList[i].rid) {
+                var point = JSON.parse(scoreList[i].score);
+                var a = parseInt(point.first);
+                var b = parseInt(point.second);
+                var c = parseInt(point.third);
+                var sumScore = Math.round((a + b + c) / 3);
+                sum += sumScore;
+                isScore++;
+                if (!p[j].firstPw) {
+                  p[j].firstPw = sumScore;
+                } else {
+                  if (!p[j].secondPw) {
+                    p[j].secondPw = sumScore;
+                  }
+                }
+              }
+            }
+            p[j].sum = isScore == 0 ? 0 : (sum / isScore).toFixed(2)
+          }
+          this.tableData = p;
+          this.$forceUpdate();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     // getAnliList(rc) {
     //   this.isLoading = true;
     //   var typeE = [];

+ 9 - 5
src/components/pages/race/eventCenter/anliDetail.vue

@@ -2427,7 +2427,7 @@ export default {
     //   }
     // },
     isNumber(e, t) {
-      if(e.includes('.')){
+      if (e.includes(".")) {
         this.$message.error("暂时不支持小数点评分");
       }
       let value = /^\d+$/.test(e);
@@ -4475,13 +4475,17 @@ ol {
 .jdChildCss {
   margin: 5px 0px;
 }
-.getScore {
-  position: absolute;
-  right: 60px;
-}
+
 .getScore >>> .el-button {
   background: #2268bd;
+  border-radius: 50%;
   color: #fff;
+  position: fixed;
+  width: 70px;
+  height: 70px;
+  right: 50px;
+  top: 50%;
+  transform: translateY(-50%);
 }
 .customWidth1 >>> .el-dialog {
   min-width: 800px !important;

+ 19 - 19
src/components/tools/leftBar.vue

@@ -3,6 +3,15 @@
     <el-row class="tac">
       <el-col :span="12">
         <el-menu :default-active="path" background-color="#fff" text-color="#777" active-text-color="#fff" router v-if="$store.state.userInfo.type == 2 || $store.state.userInfo.type == 4">
+          <el-menu-item index="/score" v-if="nav.indexOf('/score') != -1">
+            <div class="img" v-if="path == '/score'">
+              <img src="../../assets/icon/works-active.png" alt="" />
+            </div>
+            <div class="img" v-else>
+              <img src="../../assets/icon/works.png" alt="" />
+            </div>
+            <span>评审列表</span>
+          </el-menu-item>
           <el-menu-item index="/anliList" v-if="nav.indexOf('/anliList') != -1">
             <div class="img" v-if="path == '/anliList'">
               <img src="../../assets/icon/course-active.svg" alt="" />
@@ -39,15 +48,6 @@
             </div>
             <span>学校管理</span>
           </el-menu-item> -->
-          <el-menu-item index="/score" v-if="nav.indexOf('/score') != -1">
-            <div class="img" v-if="path == '/score'">
-              <img src="../../assets/icon/works-active.png" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/works.png" alt="" />
-            </div>
-            <span>评分查看</span>
-          </el-menu-item>
           <el-menu-item index="/data" v-if="nav.indexOf('/data') != -1">
             <div class="img" v-if="path == '/data'">
               <img src="../../assets/icon/data-active.png" alt="" />
@@ -68,6 +68,15 @@
           </el-menu-item> -->
         </el-menu>
         <el-menu :default-active="path" background-color="#fff" text-color="#777" active-text-color="#fff" router v-else-if="$store.state.userInfo.type == 5 || $store.state.userInfo.type == 6">
+          <el-menu-item index="/score1" v-if="nav.indexOf('/score1') != -1">
+            <div class="img" v-if="path == '/score1'">
+              <img src="../../assets/icon/works-active.png" alt="" />
+            </div>
+            <div class="img" v-else>
+              <img src="../../assets/icon/works.png" alt="" />
+            </div>
+            <span>评审列表</span>
+          </el-menu-item>
           <el-menu-item index="/anliList1" v-if="nav.indexOf('/anliList1') != -1">
             <div class="img" v-if="path == '/anliList1'">
               <img src="../../assets/icon/course-active.svg" alt="" />
@@ -95,15 +104,6 @@
             </div>
             <span>学校管理</span>
           </el-menu-item> -->
-          <el-menu-item index="/score1" v-if="nav.indexOf('/score1') != -1">
-            <div class="img" v-if="path == '/score1'">
-              <img src="../../assets/icon/works-active.png" alt="" />
-            </div>
-            <div class="img" v-else>
-              <img src="../../assets/icon/works.png" alt="" />
-            </div>
-            <span>评分查看</span>
-          </el-menu-item>
           <el-menu-item index="/data" v-if="nav.indexOf('/data') != -1">
             <div class="img" v-if="path == '/data'">
               <img src="../../assets/icon/data-active.png" alt="" />
@@ -158,7 +158,7 @@
             <div class="img" v-else>
               <img src="../../assets/icon/works.png" alt="" />
             </div>
-            <span>评分查看</span>
+            <span>评审列表</span>
           </el-menu-item>-->
           <el-menu-item index="/data" v-if="nav.indexOf('/data') != -1">
             <div class="img" v-if="path == '/data'">

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels