Bläddra i källkod

完成文档 64,68,78,78和修改评分占比问题

SanHQin 1 år sedan
förälder
incheckning
badf52a314

+ 7 - 5
src/components/pages/disAdmin/score.vue

@@ -215,7 +215,8 @@
 							</div>
 						</template>
             <template slot-scope="scope">
-              <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div>
+							<div>{{ scope.row.scoreList.length>0?scope.row.scoreList.length>=2?scope.row.sum ? scope.row.sum : "-":"-":""}}</div>
+              <!-- <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div> -->
             </template>
           </el-table-column>
           
@@ -325,9 +326,9 @@
 
 				<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>
-						<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingData.three[1])<=5?'#E2F0D9':'#FCE4D6'}`">74-60分以上:{{ratingDataAdmin.three[0]}}个 {{ratingDataAdmin.three[1]}}%</div>
+						<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingDataAdmin.one[1])<=5?'#E2F0D9':'#FCE4D6'}`">90分以上:{{ratingDataAdmin.one[0]}}个 {{ratingDataAdmin.one[1]}}%</div>
+						<div class="ri-card" :style="`background-color: ${Math.abs(40-ratingDataAdmin.two[1])<=5?'#E2F0D9':'#FCE4D6'}`">89-75分:{{ratingDataAdmin.two[0]}}个 {{ratingDataAdmin.two[1]}}%</div>
+						<div class="ri-card" :style="`background-color: ${Math.abs(30-ratingDataAdmin.three[1])<=5?'#E2F0D9':'#FCE4D6'}`">74-60分以上:{{ratingDataAdmin.three[0]}}个 {{ratingDataAdmin.three[1]}}%</div>
 						<div class="ri-card" :style="`background-color: #FCE4D6`" v-if="ratingDataAdmin.four[0]!=0">60分以下:{{ratingDataAdmin.four[0]}}个 {{ratingDataAdmin.four[1]}}%</div>
 						<div class="ri-card" style="background-color: #E7E6E6;">未评分:{{ratingDataAdmin.five[0]}}个 {{ratingDataAdmin.five[1]}}%</div>
 					</div>
@@ -530,10 +531,11 @@ export default {
 			let three = [0,0];
 			let four = [0,0];
 			let five = [0,0]
+		
 
 			myScore.forEach(i=>{
 				let score = JSON.parse(i.score);
-				let total = (score.first + score.second + score.third)/3;
+				let total = (parseFloat(score.first)+parseFloat(score.second)+parseFloat(score.third))/3
 				if(total>=90){
 					one[0]++;
 				}else if(total>=75 && total<=89){

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

@@ -2415,7 +2415,7 @@
           <div class="psBox">
             <div>
               <!-- <span>总分</span -->
-							<span>评分(总分100分</span>
+							<span>评分(总分100分</span>
               <el-input
                 class="number"
 								placeholder="请输入评分"
@@ -2563,6 +2563,7 @@
       width="100%"
       :before-close="handleClose"
       class="dialog_diy"
+			:show-close="false"
       :class="{ fullStyle: full }"
     >
       <div slot="title" class="header-title">
@@ -2574,6 +2575,7 @@
             alt=""
             @click="fullTools"
           />
+					<span class="hTitleBack" @click.stop='dialogVisible = false'>返回</span>
         </div>
       </div>
       <pdf
@@ -2861,19 +2863,19 @@ export default {
     //   }
     // },
     setScore(e) {
-			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 = '';
-			}
+			// let newValue = parseFloat(e);
+			// if(!newValue){
+			// 	return this.$message.error("请输入分数,请重新评分")
+			// 	//this.scoreDetail[0].scoreAll.first = '';
+			// }
+			// if(newValue<0){
+			// 	return this.$message.error("当前评分小于0,请重新评分")
+			// 	// this.scoreDetail[0].scoreAll.first = '';
+			// }
+			// if(newValue>100){
+			// 	return this.$message.error("当前评分超出最高分,请重新评分")
+			// 	// 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;
       this.$forceUpdate();
@@ -3018,6 +3020,21 @@ export default {
       	  this.$message.error("请填写案例评分");
       	  return reject(false);
       	}
+				let newValue = parseFloat(this.scoreDetail[0].scoreAll.first);
+				if(!newValue){
+					this.$message.error("请输入分数,请重新评分")
+					return reject(false)
+					//this.scoreDetail[0].scoreAll.first = '';
+				}
+				if(newValue<0){
+					this.$message.error("当前评分小于0,请重新评分")
+					return reject(false)
+					// this.scoreDetail[0].scoreAll.first = '';
+				}
+				if(newValue>100){
+					this.$message.error("当前评分超出最高分,请重新评分")
+					return reject(false)
+				}
       //  else if (this.scoreDetail[0].scoreAll.second == "") {
       //   this.$message.error("请将信息填写完整");
       //   return;
@@ -4754,6 +4771,15 @@ body {
 }
 .header-title {
   display: flex;
+	align-items:center;
+}
+.hTitleBack{
+	color:white;
+	margin-left:20px;
+	position:relative;
+	cursor:pointer;
+	top:-3px;
+	left:10px;
 }
 .logoImg {
   width: 30px;