yu 4 anni fa
parent
commit
a797f71db7
1 ha cambiato i file con 36 aggiunte e 15 eliminazioni
  1. 36 15
      components/user/stuTestDetails.vue

+ 36 - 15
components/user/stuTestDetails.vue

@@ -41,7 +41,7 @@
 				</view>
 				<view class="box2-table-box-cjfb df fdr aic">
 					<!-- <radar class=""></radar> -->
-					<canvas canvas-id="canvasRadar" id="canvasRadar" class="charts myRadar"></canvas>
+					<canvas canvas-id="canvasRadar" class="charts myRadar radarChat"></canvas>
 					<!-- <web-view class='webview' :src="url" v-if="url.length"></web-view> -->
 					<!-- 五维图暂缓 -->
 				</view>
@@ -187,8 +187,22 @@
 				}
 			});
 			//#endif
-			this.cWidth=uni.upx2px(650);
-			this.cHeight=uni.upx2px(400);
+			this.cWidth=uni.upx2px(900);
+			this.cHeight=uni.upx2px(900);
+			
+			// //px转vw
+			// @function px2vw($px) {
+			// 	@return $px/1920*100vw;
+			// }
+			// //px转vh
+			// @function px2vh($px) {
+			// 	@return $px/1080*100vh;
+			// }
+			// this.cWidth=uni.px2vw(100);
+			// this.cHeight=uni.px2vw(100);
+	
+			// let data = {"categories":["原理认知","实景勘察","虚拟技术搭建","虚拟艺术创作","教师评分(加分项目)"],"series":[{"name":"成绩分布","data":[90,110,165,195,187]}]}
+			// _self.showRadar("canvasRadar",data);
 		},
 		methods: {
 			//点击添加个人信息
@@ -240,11 +254,11 @@
 				
 				//五维图
 				let aData= [];
-				
+				let miniPoint = 0;
 				//原理认知
 				if(data[0].Score=='-1')
 				{
-					aData.push(0);
+					aData.push(miniPoint);
 				}
 				else{
 					aData.push(parseInt(data[0].Score));
@@ -253,7 +267,7 @@
 				//实景考察
 				if(data[1].Score=='-1')
 				{
-					aData.push(0);
+					aData.push(miniPoint);
 				}
 				else{
 					aData.push(parseInt(data[1].Score));
@@ -281,17 +295,17 @@
 					}
 				}
 				aData.push(XNYSCZ_score);
-			console.log('data=',data);
+				// console.log('data=',data);
 				//教师评分(加分项目)
 				if(data[15].Score=='-1')
 				{
-					aData.push(0);
+					aData.push(miniPoint);
 				}
 				else{
 					aData.push(parseInt(data[15].Score));
 				}
 				// aData.push(parseInt(data[16]));
-				// console.log('aData=',aData)
+				console.log('aData=',aData)
 			
 				this.getServerData(aData);
 			},
@@ -432,10 +446,20 @@
 		width: px2vw(1377);
 	}
 	.box2-table-box-cjfb{
+		display: flex;/*父元素设置flex属性*/
+		justify-content: center;/*水平主轴居中*/
+		align-items: center;/*垂直交叉轴居中*/
+		
 		width: px2vw(1377);
-		height: px2vw(300);
+		height: px2vw(500);
+		//宽度
+	}
+	.radarChat{
+		// border: 1px solid #DDDDDD;
+		
+		width: px2vw(600);
+		height: px2vw(600);
 	}
-
 	.box2-table-box-left {
 		width: px2vw(500);
 	}
@@ -617,8 +641,5 @@
 		line-height: px2vw(26);
 		margin-left: px2vw(40);
 	}
-	.webview{
-		height: 650upx;
-		width: 500upx;
-	}
+	
 </style>