nikang 6 年之前
父節點
當前提交
499ea21395
共有 2 個文件被更改,包括 46 次插入19 次删除
  1. 12 12
      src/modules/marking/views/Marking.vue
  2. 34 7
      src/modules/marking/views/TpScoreBoard.vue

+ 12 - 12
src/modules/marking/views/Marking.vue

@@ -39,8 +39,8 @@
               @click="taskChange"
               size="small"
             >
-              <span class="titlefont">
-                切换任务 <i class="el-icon-caret-bottom el-icon--right"></i>
+              <span class="titlefont"
+                >切换任务 <i class="el-icon-caret-bottom el-icon--right"></i>
               </span>
             </el-button>
           </small>
@@ -133,9 +133,9 @@
                 <el-table-column label="评阅时间">
                   <template slot-scope="scope">
                     <div>
-                      <span style="margin-left: 10px">
-                        {{ dateFormatter(scope.row) }}
-                      </span>
+                      <span style="margin-left: 10px">{{
+                        dateFormatter(scope.row)
+                      }}</span>
                     </div>
                   </template>
                 </el-table-column>
@@ -145,18 +145,18 @@
                 <el-table-column label="问题卷">
                   <template slot-scope="scope">
                     <div>
-                      <span style="margin-left: 10px">
-                        {{ getTagName(scope.row.tag) }}
-                      </span>
+                      <span style="margin-left: 10px">{{
+                        getTagName(scope.row.tag)
+                      }}</span>
                     </div>
                   </template>
                 </el-table-column>
                 <el-table-column label="评卷备注">
                   <template slot-scope="scope">
                     <div>
-                      <span style="margin-left: 10px">
-                        {{ scope.row.markRemark }}
-                      </span>
+                      <span style="margin-left: 10px">{{
+                        scope.row.markRemark
+                      }}</span>
                     </div>
                   </template>
                 </el-table-column>
@@ -700,7 +700,7 @@ li {
   color: white;
 }
 .titlefont {
-  font-size: 12px;
+  font-size: 14px;
   display: inline-block;
 }
 .box-card {

+ 34 - 7
src/modules/marking/views/TpScoreBoard.vue

@@ -60,10 +60,14 @@
           <div class="itemScroll">
             <div
               :key="score"
-              v-for="score in itemScores"
+              v-for="(score, index) in itemScores"
               class="pull-left scoretitle"
             >
-              <div @click="scoreClick(score)" class="scorebutton">
+              <div
+                @click="scoreClick(score, index)"
+                class="scorebutton"
+                v-bind:class="{ 'score-btn': itemScoreBtn[index] }"
+              >
                 <span class="score-item">{{ score }}</span>
               </div>
             </div>
@@ -152,9 +156,9 @@
                 v-for="tag in tags"
                 :key="tag.code"
               >
-                <el-radio :label="tag.code" :key="tag.code">
-                  {{ tag.name }}
-                </el-radio>
+                <el-radio :label="tag.code" :key="tag.code">{{
+                  tag.name
+                }}</el-radio>
               </div>
             </el-radio-group>
           </span>
@@ -223,10 +227,12 @@ export default {
       curIndex: 0,
       steps: [],
       loading: false,
+      btnflag: false,
       tmpSignItem: this.signItem,
       tags: [],
       unusualType: "",
-      scoreError: []
+      scoreError: [],
+      itemScoreBtn: []
     };
   },
   props: [
@@ -314,6 +320,8 @@ export default {
         this.signScores.splice(0, this.signScores.length);
       }
       this.positionDiv(order);
+      //重置打分板样式
+      this.itemScoreBtn = [];
     },
     positionDiv(order) {
       EVENTHUB.$emit("positionDiv", order);
@@ -375,7 +383,7 @@ export default {
       }
       return true;
     },
-    scoreClick(score) {
+    scoreClick(score, index1) {
       //轨迹模式处理分值问题
       if (this.markSign) {
         if (this.checkSignScore(score)) {
@@ -393,6 +401,15 @@ export default {
         //正常模式
         this.resultItem.score = score;
         this.resultItems[this.curIndex].score = score;
+        //设置动态样式(打分板)
+        this.itemScoreBtn = [];
+        for (let i = 0; i < this.itemScores.length; i++) {
+          if (i == index1) {
+            this.itemScoreBtn.push(true);
+          } else {
+            this.itemScoreBtn.push(false);
+          }
+        }
       }
     },
     //键盘打分板change事件
@@ -859,6 +876,11 @@ li {
   border: 1px solid rgb(77, 124, 196);
   text-align: center;
 }
+.scorebutton:hover {
+  background: rgb(85, 191, 255);
+  color: white;
+  border-color: rgb(85, 191, 255);
+}
 .titlebutton {
   border-radius: 15px;
   cursor: pointer;
@@ -1003,4 +1025,9 @@ textarea {
   margin-right: 10px;
   margin-bottom: 10px;
 }
+.score-btn {
+  background: rgb(85, 191, 255);
+  color: white;
+  border-color: rgb(85, 191, 255);
+}
 </style>