Jelajahi Sumber

完成了各个任务

SanHQin 1 tahun lalu
induk
melakukan
4902d69d1c

+ 186 - 26
src/components/pages/disAdmin/score.vue

@@ -91,8 +91,10 @@
           :fit="true"
           v-loading="isLoading"
           style="width: 100%"
+					@sort-change="ownScoreSort"
           :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
           :row-class-name="tableRowClassName"
+					:default-sort = "{prop: 'ownScore', order: 'descending'}"
         >
           <el-table-column label="序号" min-width="5" align="center">
             <template slot-scope="scope">
@@ -105,7 +107,7 @@
             label="创建人"
             min-width="5"
             align="center"
-            v-if="tType == 0"
+            v-if="false"
           >
             <template slot-scope="scope">
               <div class="userImg">
@@ -122,16 +124,38 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column
-            label="我的评分"
-            min-width="10"
+					<el-table-column
+            label="案例分类"
+            min-width="20"
             align="center"
             v-if="tType == 2"
           >
             <template slot-scope="scope">
-              <div>{{ scope.row.ownScore ? scope.row.ownScore : "-" }}</div>
+              <div>{{ scope.row.typename ? scope.row.typename : "-" }}</div>
             </template>
           </el-table-column>
+				
+    			  <el-table-column
+          	  label="我的评分"
+          	  min-width="10"
+          	  align="center"
+							prop="ownScore"
+							sortable="custom"
+          	  v-if="tType == 2"
+          	>
+						<template slot="header">
+							<div style="display: flex;float: left;align-items: center;position: relative;">
+								<el-tooltip effect="light" :content="`一等90分以上 占比${ratingData.one[1]}%,二等75-89 占比${ratingData.two[1]}%,三等60-74 占比${ratingData.three[1]}%`" placement="top">
+									<div style="position:relative;left:15px;top:5px;">我的评分</div>
+								</el-tooltip>
+							</div>
+						</template>
+          	  <template slot-scope="scope">
+          	    <div>{{ scope.row.ownScore ? scope.row.ownScore : "-" }}</div>
+          	  </template>
+          	</el-table-column>
+    			
+          
           <el-table-column
             label="所属单位"
             min-width="10"
@@ -181,22 +205,21 @@
             label="平均得分"
             min-width="10"
             align="center"
+						sortable="custom"
             v-if="tType == 0"
           >
+					<template slot="header">
+							<div style="display: flex;float: left;align-items: center;position: relative;">
+								<el-tooltip effect="light" :content="`一等90分以上 占比${ratingDataAdmin.one[1]}%,二等75-89 占比${ratingDataAdmin.two[1]}%,三等60-74 占比${ratingDataAdmin.three[1]}%`" placement="top">
+									<div style="position:relative;left:40px;top:5px;">平均得分</div>
+								</el-tooltip>
+							</div>
+						</template>
             <template slot-scope="scope">
               <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div>
             </template>
           </el-table-column>
-          <el-table-column
-            label="案例分类"
-            min-width="20"
-            align="center"
-            v-if="tType == 2"
-          >
-            <template slot-scope="scope">
-              <div>{{ scope.row.typename ? scope.row.typename : "-" }}</div>
-            </template>
-          </el-table-column>
+          
           <!-- <el-table-column
             label="所获奖项"
             min-width="10"
@@ -251,7 +274,7 @@
                     )
                   "
                 >
-                  案例详情
+                  查看
                 </div>
                 <!-- <div @click="openScore(scope.row, 1)">立即评分</div> -->
                 <div
@@ -290,6 +313,18 @@
           @current-change="handleCurrentChange"
         >
         </el-pagination>
+				<div class="rating_information" v-if="tType=='2'">
+					<div class="ri-card" style="background-color: #E2F0D9;">90分以上:{{ratingData.one[0]}}个 {{ratingData.one[1]}}%</div>
+					<div class="ri-card" style="background-color: #E2F0D9;">89-75分:{{ratingData.two[0]}}个 {{ratingData.two[1]}}%</div>
+					<div class="ri-card" style="background-color: #FCE4D6 ;">74-60分以上:{{ratingData.three[0]}}个 {{ratingData.three[1]}}%</div>
+					<div class="ri-card" style="background-color: #E7E6E6;">未评分:{{ratingData.four[0]}}个 {{ratingData.four[1]}}%</div>
+				</div>
+				<div class="rating_information" v-if="tType=='0'">
+					<div class="ri-card" style="background-color: #E2F0D9;">90分以上:{{ratingDataAdmin.one[0]}}个 {{ratingDataAdmin.one[1]}}%</div>
+					<div class="ri-card" style="background-color: #E2F0D9;">89-75分:{{ratingDataAdmin.two[0]}}个 {{ratingDataAdmin.two[1]}}%</div>
+					<div class="ri-card" style="background-color: #FCE4D6 ;">74-60分以上:{{ratingDataAdmin.three[0]}}个 {{ratingDataAdmin.three[1]}}%</div>
+					<div class="ri-card" style="background-color: #E7E6E6;">未评分:{{ratingDataAdmin.four[0]}}个 {{ratingDataAdmin.four[1]}}%</div>
+				</div>
       </div>
     </div>
     <el-dialog
@@ -438,7 +473,7 @@ export default {
       page: 1,
       total: 0,
       // anliType: "",
-      tableHeight: "500px",
+      tableHeight: "100%",
       isLoading: false,
       CourseType: [],
       CourseTypeJson: {},
@@ -447,6 +482,9 @@ export default {
       anliName: "",
       anliBox: "",
       tableData: [],
+			scoreListData:[],
+			allScoreList:[],
+			scoreFn:2,// 0 默认 1 升序  2 降序
       reviewer: "",
       reviewerBox: [],
       checkboxList: [],
@@ -476,6 +514,66 @@ export default {
       reCid: "",
     };
   },
+	computed: {
+	  ratingData(){
+			const myScore = this.allScoreList.filter(i=>i.scorer===this.userid)
+			
+			let one = [0,0];
+			let two = [0,0];
+			let three = [0,0];
+			let four = [0,0];
+
+			myScore.forEach(i=>{
+				let score = JSON.parse(i.score);
+				let total = (score.first + score.second + score.third)/3;
+				if(total>=90){
+					one[0]++;
+				}else if(total>=75 && total<=89){
+					two[0]++;
+				}else if(total>=60 && total<=74){
+					three[0]++;
+				}
+			})
+
+			four[0] = this.total-myScore.length;
+
+			one[1] = (one[0]/this.total).toFixed(4)*100
+			two[1] = (two[0]/this.total).toFixed(4)*100
+			three[1] = (three[0]/this.total).toFixed(4)*100
+			four[1] = (four[0]/this.total).toFixed(4)*100
+			
+			return {one:one,two:two,three:three,four:four}
+		},
+		ratingDataAdmin(){
+			const score = this.scoreListData;
+
+			let one = [0,0];
+			let two = [0,0];
+			let three = [0,0];
+			let four = [0,0];
+
+			score.forEach(i=>{
+				let sum = i.sum;
+				if(sum===0){
+					four[0]++
+				}
+				if(parseFloat(sum)>=90){
+					one[0]++
+				}else if(parseFloat(sum)>=75 && parseFloat(sum)<=89){
+					two[0]++;
+				}else if(parseFloat(sum)>=60 && parseFloat(sum)<=74){
+					three[0]++;
+				}
+			})
+
+			one[1] = (one[0]/this.total).toFixed(4)*100
+			two[1] = (two[0]/this.total).toFixed(4)*100
+			three[1] = (three[0]/this.total).toFixed(4)*100
+			four[1] = (four[0]/this.total).toFixed(4)*100
+			
+			return {one:one,two:two,three:three,four:four}
+		}
+	},
   mounted() {
     this.$nextTick(function () {
       this.tableHeight =
@@ -615,8 +713,10 @@ export default {
         .get(this.$store.state.api + "selectPointAll", params)
         .then((res) => {
 
+
           this.total = res.data[0].length > 0 ? res.data[0].length : 0;
           var scoreList = res.data[0];
+					this.scoreListData = scoreList;
           for (var i = 0; i < scoreList.length; i++) {
             scoreList[i].info = JSON.parse(scoreList[i].info);
             if (scoreList[i].score != null) {
@@ -628,13 +728,17 @@ export default {
               scoreList[i].sum = sumScore;
             }
           }
-          scoreList.sort((item1, item2) => item2.sum - item1.sum);
+          
+					// 降序
+					// scoreList.sort((item1, item2) => item2.sum - item1.sum);
+					// 升序
+					// scoreList.sort((item1, item2) => item1.sum - item2.sum);
 					
-					sessionStorage.setItem("allScoreList",JSON.stringify(scoreList.map(i=>i.id)))
-          const start = (this.page - 1) * 10;
-          const end = start + 10;
-          let pageData = scoreList.slice(start, end);
-          this.selectPwScore(pageData);
+					
+          // const start = (this.page - 1) * 10;
+          // const end = start + 10;
+          // let pageData = scoreList.slice(start, end);
+          this.selectPwScore(scoreList);
           this.isLoading = false;
         })
         .catch((err) => {
@@ -646,6 +750,7 @@ export default {
         .get(this.$store.state.api + "selectAllScore")
         .then((res) => {
           var scoreList = res.data[0];
+					this.allScoreList = scoreList;
           for (var j = 0; j < p.length; j++) {
             let sum = 0;
             let isScore = 0;
@@ -680,8 +785,29 @@ export default {
             }
             p[j].sum = isScore == 0 ? 0 : (sum / isScore).toFixed(2);
           }
-          this.tableData = p;
-					console.log(this.tableData);
+
+					if(this.scoreFn===1){//升序
+						// 升序
+						p.sort((a, b) => {
+						    let aScore = a.hasOwnProperty(this.tType==2?'ownScore':'sum') ? this.tType=='2'?a.ownScore:a.sum===0?Number.MAX_VALUE: parseFloat(a.sum) : Number.MAX_VALUE;
+						    let bScore = b.hasOwnProperty(this.tType==2?'ownScore':'sum') ? this.tType=='2'?b.ownScore:b.sum===0?Number.MAX_VALUE: parseFloat(b.sum) : Number.MAX_VALUE;
+						    return aScore - bScore;
+						})
+					}else if(this.scoreFn===2){//降序
+						//降序
+						p.sort((a, b) => {
+						    let aScore = a.hasOwnProperty(this.tType==2?'ownScore':'sum') ? this.tType=='2'?a.ownScore:a.sum===0?-1: parseFloat(a.sum) : -1;
+						    let bScore = b.hasOwnProperty(this.tType==2?'ownScore':'sum') ? this.tType=='2'?b.ownScore:b.sum===0?-1: parseFloat(b.sum) : -1;
+						    return bScore - aScore;
+						});
+					}
+
+					sessionStorage.setItem("allScoreList",JSON.stringify(p.map(i=>i.id)))
+
+					const start = (this.page - 1) * 10;
+          const end = start + 10;
+          let result = p.slice(start, end);
+          this.tableData = result;
           this.$forceUpdate();
         })
         .catch((err) => {
@@ -1029,6 +1155,17 @@ export default {
         type: "success",
       });
     },
+		// 我的评分排序
+		ownScoreSort(row,column){
+			if(row.order==="descending"){
+				this.scoreFn=2
+			}else if(row.order==="ascending"){
+				this.scoreFn=1
+			}else{
+				this.scoreFn=2
+			}
+			this.search()
+		}
   },
   created() {
     // this.getAnliList();
@@ -1134,8 +1271,31 @@ export default {
 }
 
 .student_page {
-  width: 95%;
+  width: 100%;
   margin: 20px auto 0;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.rating_information{
+	flex: 1;
+	height: 100%;
+	margin-left: 20px;
+	display: flex;
+	margin-bottom: 20px;
+}
+
+.ri-card{
+	width: auto;
+	font-size: 14px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	padding: 5px 10px;
+	white-space: nowrap;
+	margin-right: 20px;
+	border-radius: 5px;
 }
 
 .anliBox {

+ 142 - 54
src/components/pages/race/eventCenter/anliDetail.vue

@@ -24,9 +24,9 @@
                 anliBox[0] && anliBox[0].info ? anliBox[0].info.title : ""
               }}
             </div>
-            <div>创建人:{{ anliBox[0] ? anliBox[0].name : "" }}</div>
+            <div v-if="['0','1'].includes(tType)">创建人:{{ anliBox[0] ? anliBox[0].name : "" }}</div>
             <div>
-              <div>单位:{{ anliBox[0] ? anliBox[0].schoolName : "" }}</div>
+              <div v-if="['0','1'].includes(tType)">单位:{{ anliBox[0] ? anliBox[0].schoolName : "" }}</div>
               <div>
                 类型:{{
                   anliBox[0] && anliBox[0].typename
@@ -35,7 +35,7 @@
                 }}
               </div>
             </div>
-            <div class="personAndAutor">
+            <div class="personAndAutor" v-if="['0','1'].includes(tType)">
               <div>总人数:</div>
               <div class="people">
                 <div class="man">
@@ -82,32 +82,28 @@
                 </div>
               </div>
             </div>
-            <div v-if="anliBox[0].info && anliBox[0].info.typeOtherName != ''">
+            <div style="font-size:14px" v-if="anliBox[0].info && anliBox[0].info.typeOtherName != ''">
               课时:{{ anliBox[0].info.typeOtherName }}小时
             </div>
           </div>.
-					<el-button
+					<div
 					v-if="['0','2'].includes(tType)"
 					@click="upperOne()"
+					class="clickBtn"
 					style="
-							margin:5px 10px;
-              background: rgb(34, 90, 199);
-              color: #fff;
 							position: absolute;
               right: 300px;
-            ">上一个</el-button>
+            ">上一个</div>
 
-						<el-button
+						<div
 						v-if="['0','2'].includes(tType)"
 						@click="nextOne()"
+						class="clickBtn"
 						style="
-							margin:5px 10px;
-              background: rgb(34, 90, 199);
-              color: #fff;
 							position: absolute;
               right: 200px;
-            ">下一个</el-button>
-          <el-button
+            ">下一个</div>
+          <div
 						
             @click="
               goTo(
@@ -121,21 +117,19 @@
                   tType
               )
             "
-            style="
-              position: absolute;
+            class="clickBtn"
+						style="
+							position: absolute;
               right: 100px;
-              background: rgb(34, 90, 199);
-              color: #fff;
             "
-            >返回</el-button
-          >
+            >返回</div >
           <!-- <div class="getScore" v-if="$store.state.userInfo.type != 1">
             <el-button @click="openScore(anliBox[0])">评分</el-button>
           </div> -->
         </div>
       </div>
-      <div class="navBox" :class="{ isNavBox: isNavTop >= 300 }" :style="{ margin: psDialog ? '0 50px' : '0 auto'}">
-				<div class=navBoxHeader :style="{justifyContent: psDialog ? 'flex-start' : 'center'}">
+      <div class="navBox" :class="{ isNavBox: isNavTop >= 300 }" :style="{ margin: isNavTop>=300 ? '0 0' : psDialog?'0 50px':'0 auto'}">
+				<div class=navBoxHeader :style="{justifyContent: psDialog ? 'flex-start' : 'center',marginLeft:psDialog&&isNavTop >= 300?'50px':'0'}">
 					<div class="navTop" @click="isShow = 0">
         	  <div class="navImg" style="width: 24px">
         	    <img src="../../../../assets/icon/anliDetail/proOver.png" alt="" />
@@ -154,24 +148,11 @@
 				</div>
 				<div class=navBoxBtn v-if="psDialog && isNavTop >= 300 && ['0','2'].includes(tType)">
 
-					<el-button
-					@click="upperOne()"
-					style="
-							margin:5px 10px;
-              background: rgb(34, 90, 199);
-              color: #fff;
-            ">上一个</el-button>
+					<div @click="upperOne()" class="clickBtn">上一个</div>
 
-						<el-button
-						@click="nextOne()"
-						style="
-							margin:5px 10px;
-              background: rgb(34, 90, 199);
-              color: #fff;
-            ">下一个</el-button>
+					<div @click="nextOne()" class="clickBtn">下一个</div>
 
-					<el-button
-            @click="
+					<div @click="
               goTo(
                 '/score1?userid=' +
                   userid +
@@ -182,12 +163,7 @@
                   '&type=' +
                   tType
               )
-            "
-            style="
-							margin:5px 30px;
-              background: rgb(34, 90, 199);
-              color: #fff;
-            ">返回</el-button>
+            " class="clickBtn">返回</div>
 						
 				</div>
       </div>
@@ -2448,14 +2424,76 @@
                 :max="100"
               ></el-input-number>
             </div>
-            <div style="display:block;">
-              <span>评审说明:</span
+            <div class="reviewDescription">
+							<el-table
+    					  :data="reviewDescriptionData"
+								border
+								width="90%"
+								:cell-style="{borderColor:'black'}"
+								:header-cell-style="{borderColor:'black'}"
+    					  style="width: 90%;margin-right:20px;border:solid 1px black">
+    					  <el-table-column
+    					    prop="class"
+    					    label="类别"
+									align="center"
+    					    width="80">
+    					  </el-table-column>
+    					  <el-table-column
+    					    prop="ask"
+    					    label="要求"
+									align="center">
+    					  </el-table-column>
+    					  <el-table-column
+    					    prop="score"
+    					    label="分值"
+									align="center"
+									width="80">
+    					  </el-table-column>
+    					</el-table>
+							<!-- <table border="1">
+								<thead>
+									<tr>
+										<td>类别</td>
+										<td>要求</td>
+										<td>分值</td>
+									</tr>
+								</thead>
+								<tbody>
+									<tr>
+										<td>项目简介</td>
+										<td>能清晰介绍案例开展情况,具体体现为根据什么问题、开展了什么活动,效果如何。</td>
+										<td>16</td>
+									</tr>
+									<tr>
+										<td>驱动问题</td>
+										<td>问题来源要真实,并符合开展年纪学生的实际学情。</td>
+										<td>16</td>
+									</tr>
+									<tr>
+										<td>项目评价</td>
+										<td>有过程性评价与总结性评价量表。</td>
+										<td>16</td>
+									</tr>
+									<tr>
+										<td>结构清晰</td>
+										<td>根据要求,正文要有项目名称、学习目标、实施过程、成果与评价、成效与反思、附件等环节和。</td>
+										<td>26</td>
+									</tr>
+									<tr>
+										<td>项目效果</td>
+										<td>项目任务安排合理,各阶段任务有逻辑进阶关系,并能达到学习目标。</td>
+										<td>26</td>
+									</tr>
+								</tbody>
+								
+							</table> -->
+              <!-- <span>评审说明:</span
               ><textarea
                 :rows="20"
                 class="tAreaCss"
                 placeholder="请输入评语。"
                 v-model="scoreDetail[0].scoreAll.content"
-              ></textarea>
+              ></textarea> -->
             </div>
             <!-- <div>
               <span>项目成果</span
@@ -2668,6 +2706,27 @@ export default {
       videoVisible: false,
       full: false,
       dialogVisibleScore: false,
+			reviewDescriptionData:[{
+				class:"项目简介",
+				ask:"能清晰介绍案例开展情况,具体体现为根据什么问题、开展了什么活动,效果如何。",
+				score:"16"
+			},{
+				class:"驱动问题",
+				ask:"问题来源要真实,并符合开展年纪学生的实际学情。",
+				score:"16"
+			},{
+				class:"项目评价",
+				ask:"有过程性评价与总结性评价量表。",
+				score:"16"
+			},{
+				class:"结构清晰",
+				ask:"根据要求,正文要有项目名称、学习目标、实施过程、成果与评价、成效与反思、附件等环节和。",
+				score:"26"
+			},{
+				class:"项目效果",
+				ask:"项目任务安排合理,各阶段任务有逻辑进阶关系,并能达到学习目标。",
+				score:"26"
+			},],
       briefNav: "",
       pptImgUrl: "",
       pptImgUrl1: {
@@ -4292,11 +4351,12 @@ body {
   padding-left: 30px;
 }
 .anliNav > div:nth-child(1) {
-  font-size: 20px;
+  font-size: 18px;
   font-weight: bold;
 }
 .anliNav > div:nth-child(2) {
   margin: 10px 0 10px 0;
+	font-size:14px;
 }
 .anliNav > div:nth-child(3) {
   display: flex;
@@ -4304,10 +4364,12 @@ body {
   flex-direction: row;
   flex-wrap: nowrap;
   align-items: center;
+	font-size:14px;
 }
 .anliNav > div:nth-child(3) > div:nth-child(2) {
   /* color: #aba8a8; */
   margin-left: 35px;
+	font-size:14px;
 }
 .navBox {
   display: flex;
@@ -4333,7 +4395,20 @@ body {
 	flex:1;
 	height:100%;
 	justify-content:center;
-	align-item:center;
+	align-items:center;
+}
+
+.clickBtn{
+	width: 70px;
+  height: 35px;
+  background: #2268bc;
+  color: #fff !important;
+  text-align: center;
+  border-radius: 5px;
+  line-height: 35px;
+  cursor: pointer;
+  font-size: 16px;
+	margin:0 20px;
 }
 .isNavBox {
   position: fixed;
@@ -4815,6 +4890,7 @@ body {
   flex-wrap: nowrap;
   align-items: flex-end;
   margin-bottom: 10px;
+	font-size:14px;
 }
 .autorBox {
   display: flex;
@@ -5204,15 +5280,16 @@ ol {
 .newDialogCss {
   position: fixed;
   right: 0;
-  top: 250px;
-  width: 340px;
-  height: calc(100% - 80px);
+	bottom:0;
+	width: 450px;
+  height: auto;
+	max-height:calc(100% - 100px);
   z-index: 999;
   background: #fff;
   border-radius: 15px;
   border-top-right-radius: 0px;
   border-bottom-right-radius: 0px;
-  overflow: hidden;
+  overflow: auto;
   box-shadow: 0px 3px 6px 5px rgba(0, 0, 0, 0.1);
 }
 
@@ -5299,4 +5376,15 @@ ol {
   width: 100px;
   text-align: center;
 }
+
+.reviewDescription{
+	width:100%;
+	height:auto;
+	overflow:auto;
+	display:flex;
+	justify-content:center;
+	align-items:flex-start;
+	/* box-sizing:border-box; */
+	padding:10px !important;
+}
 </style>