Browse Source

完成文档:67,68,69,71,72,73,74,75,76,77

SanHQin 1 year ago
parent
commit
7ae44fc76e

+ 15 - 15
src/components/pages/disAdmin/score.vue

@@ -127,7 +127,7 @@
             label="案例分类"
             min-width="20"
             align="center"
-            v-if="tType == 2"
+            v-if="['0','2'].includes(tType)"
           >
             <template slot-scope="scope">
               <div>{{ scope.row.typename ? scope.row.typename : "-" }}</div>
@@ -244,7 +244,7 @@
             </template>
           </el-table-column> -->
           <el-table-column
-            label="时间"
+            label="评分时间"
             min-width="10"
             align="center"
             v-if="tType == 2"
@@ -253,7 +253,7 @@
               <div>{{ scope.row.scoreTime ? scope.row.scoreTime : "-" }}</div>
             </template>
           </el-table-column>
-          <el-table-column label="操作" min-width="20">
+          <el-table-column label="操作" min-width="20" width="100">
             <template slot-scope="scope">
               <div class="tableButton">
                 <div
@@ -313,7 +313,7 @@
         >
         </el-pagination>
 
-				<el-tooltip v-if="tType=='2'" effect="light" :content="`一等90分以上 占比30%,二等75-89 占比40%,三等60-74 占比30%`" placement="top"> 
+				<el-tooltip v-if="tType=='2'" effect="light" :content="`评分比例为一等90分以上占比30%,二等 75-89分占比40%,三等60-74分占比30%`" placement="top-start"> 
 					<div class="rating_information">
 						<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingData.one[1])<=5?'#E2F0D9':'#FCE4D6'}`">90分以上:{{ratingData.one[0]}}个 {{ratingData.one[1]}}%</div>
 						<div class="ri-card" :style="`background-color: ${Math.abs(40-ratingData.two[1])<=5?'#E2F0D9':'#FCE4D6'}`">89-75分:{{ratingData.two[0]}}个 {{ratingData.two[1]}}%</div>
@@ -323,7 +323,7 @@
 					</div>
 				</el-tooltip>
 
-				<el-tooltip v-if="tType=='0'" effect="light" :content="`一等90分以上 占比30%,二等75-89 占比40%,三等60-74 占比30%`" placement="top">
+				<el-tooltip v-if="tType=='0'" effect="light" :content="`评分比例为一等90分以上占比30%,二等 75-89分占比40%,三等60-74分占比30%`" placement="top-start">
 					<div class="rating_information">
 						<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingData.one[1])<=5?'#E2F0D9':'#FCE4D6'}`">90分以上:{{ratingDataAdmin.one[0]}}个 {{ratingDataAdmin.one[1]}}%</div>
 						<div class="ri-card" :style="`background-color: ${Math.abs(40-ratingData.two[1])<=5?'#E2F0D9':'#FCE4D6'}`">89-75分:{{ratingDataAdmin.two[0]}}个 {{ratingDataAdmin.two[1]}}%</div>
@@ -547,11 +547,11 @@ export default {
 
 			five[0] = this.total-myScore.length;
 
-			one[1] = (one[0]/this.total*100).toFixed(2)
-			two[1] = (two[0]/this.total*100).toFixed(2)
-			three[1] = (three[0]/this.total*100).toFixed(2)
-			four[1] = (four[0]/this.total*100).toFixed(2)
-			five[1] = (five[0]/this.total*100).toFixed(2)
+			one[1] = (one[0]/this.total*100).toFixed(1)
+			two[1] = (two[0]/this.total*100).toFixed(1)
+			three[1] = (three[0]/this.total*100).toFixed(1)
+			four[1] = (four[0]/this.total*100).toFixed(1)
+			five[1] = (five[0]/this.total*100).toFixed(1)
 			
 			return {one:one,two:two,three:three,four:four,five:five}
 		},
@@ -580,11 +580,11 @@ export default {
 				}
 			})
 
-			one[1] = (one[0]/this.total*100).toFixed(2)
-			two[1] = (two[0]/this.total*100).toFixed(2)
-			three[1] = (three[0]/this.total*100).toFixed(2)
-			four[1] = (four[0]/this.total*100).toFixed(2)
-			five[1] = (five[0]/this.total*100).toFixed(2)
+			one[1] = (one[0]/this.total*100).toFixed(1)
+			two[1] = (two[0]/this.total*100).toFixed(1)
+			three[1] = (three[0]/this.total*100).toFixed(1)
+			four[1] = (four[0]/this.total*100).toFixed(1)
+			five[1] = (five[0]/this.total*100).toFixed(1)
 			
 			return {one:one,two:two,three:three,four:four,five:five}
 		}

+ 26 - 14
src/components/pages/race/eventCenter/anliDetail.vue

@@ -2414,14 +2414,17 @@
           </div>
           <div class="psBox">
             <div>
-              <span>总分</span
-              ><el-input-number
+              <!-- <span>总分</span -->
+							<span>评分(总分100)分</span>
+              <el-input
                 class="number"
+								placeholder="请输入评分"
                 v-model="scoreDetail[0].scoreAll.first"
                 @change="setScore"
                 :controls="false"
+								
 								:min="0"
-              ></el-input-number>
+              ></el-input>
             </div>
             <div class="reviewDescription">
 							<el-table
@@ -2535,7 +2538,7 @@
                 scoreDetail[0].scoreAll.third
               }}</span>
             </div> -->
-            <div class="addScore" @click="addScore">评分</div>
+            <!-- <div class="addScore" @click="addScore">评分</div> -->
           </div>
         </div>
       </div>
@@ -2858,9 +2861,18 @@ export default {
     //   }
     // },
     setScore(e) {
-			if(e>100){
+			let newValue = parseInt(e);
+			if(!newValue){
+				this.$message.error("请输入分数,请重新评分")
+				this.scoreDetail[0].scoreAll.first = '';
+			}
+			if(newValue<0){
+				this.$message.error("当前评分小于0,请重新评分")
+				this.scoreDetail[0].scoreAll.first = '';
+			}
+			if(newValue>100){
 				this.$message.error("当前评分超出最高分,请重新评分")
-				this.scoreDetail[0].scoreAll.first = 0;
+				this.scoreDetail[0].scoreAll.first = '';
 			}
       this.scoreDetail[0].scoreAll.second = this.scoreDetail[0].scoreAll.first;
       this.scoreDetail[0].scoreAll.third = this.scoreDetail[0].scoreAll.first;
@@ -2942,7 +2954,7 @@ export default {
         });
     },
 		async nextOne(){
-			if(this.tType == 1 || await this.addScore(false)){
+			if(['0','1'].includes(this.tType) || await this.addScore(false)){
 				const allScoreList = JSON.parse(sessionStorage.getItem("allScoreList"))
 				if(!allScoreList.length>0)return this.$message.info("没有了")
 				let nowIndex = allScoreList.findIndex(i=>i===this.aid);
@@ -2961,7 +2973,7 @@ export default {
               content: "",
             };
             this.scoreDetail[0].sumScore = 0;
-					if (this.tType == 2 || this.tType == 0) {
+					if (!['0','1'].includes(this.tType)) {
    				  this.psDialog = true;
    				  this.getScore(this.aid);
    				}
@@ -2970,7 +2982,7 @@ export default {
 
 		},
 		async upperOne(){
-			if(this.tType == 1 || await this.addScore(false)){
+			if(['0','1'].includes(this.tType) || await this.addScore(false)){
 				const allScoreList = JSON.parse(sessionStorage.getItem("allScoreList"))
 				if(!allScoreList.length>0)return this.$message.info("没有了")
 				let nowIndex = allScoreList.findIndex(i=>i===this.aid);
@@ -2990,7 +3002,7 @@ export default {
               content: "",
             };
             this.scoreDetail[0].sumScore = 0;
-					if (this.tType == 2 || this.tType == 0) {
+					if (!['0','1'].includes(this.tType)) {
    				  this.psDialog = true;
    				  this.getScore(this.aid);
    				}
@@ -4234,7 +4246,7 @@ export default {
     this.selectAnLi();
   },
   mounted() {
-    if (this.tType == 2 || this.tType == 0) {
+    if (['2'].includes(this.tType)) {
       this.psDialog = true;
       this.getScore(this.aid);
     }
@@ -5274,9 +5286,9 @@ ol {
   color: #fff;
   text-align: center;
   cursor: pointer;
-  z-index: 999;
+  z-index: 2999;
   right: 0;
-  top: 250px;
+  top: 300px;
   width: 50px;
   height: 50px;
   background: #fff;
@@ -5387,7 +5399,7 @@ ol {
 }
 
 .reviewDescription{
-	width:100%;
+	/* width:100%; */
 	height:auto;
 	overflow:auto;
 	display:flex;