瀏覽代碼

优化数据存储,首页优化

KELECHUAN 3 年之前
父節點
當前提交
6b52047aa1

+ 3 - 28
components/area-mini-chart/area-mini-chart.vue

@@ -6,7 +6,7 @@
 		</view>
 
 		<view class="charts-box">
-			<qiun-data-charts type="mini-area" :chartData="areaChartData" :loadingType="4" background="none"
+			<qiun-data-charts type="mini-area" :chartData="gradeData.subjectAreaChart.areaComparison" :loadingType="4" background="none"
 				:tapLegend="false" :canvas2d='true' canvasId='canvans1' />
 		</view>
 	</view>
@@ -20,41 +20,16 @@
 		//定义props属性,用来接收外界传递到当前组件的数据
 		props: {},
 		computed: {
-			...mapState('m_chart', ['areaChartData'])
+			...mapState('m_chart', ['gradeData'])
 		},
 		data() {
 			return {
-				queryObj: {}
 			};
 		},
 		methods: {
-			//获取图表数据
-			// async getChartData(){
-			//  this.queryObj = {
-			//	query: 'area',
-			//	tmdid: this.childreninfo.tmdid,
-			//	semester: this.semester
-			//}
-			// 	//发起请求
-			// 	const {data:res} = await uni.$http.post('https://',this.queryObj)
-			//  
-			// 	//判断请求获取结果
-			// 	if(res.meta.status !== 200) return uni.$showMsg()
-			// 	//为数据赋值:通过展开运算符的形式进行,新旧数据的拼接
-			// 	this.chartData = {categories:[...res.test],series[...res.object,...res.class,...res.grade]}
-			// },
-
-			//获取图表数据
-			// getChartData() {
-			// 	let areaChartData = 
-			// 	this.updateAreaChartData(areaChartData)
-			// }
+			
 			
 		},
-		//创建组件生命周期函数
-		// created() {
-			// this.getChartData()
-		// }
 	}
 </script>
 

+ 45 - 48
components/column-mini-chart/column-mini-chart.vue

@@ -1,73 +1,70 @@
-<template>
+<template>
 	<view class="chart-container">
 		<view class="chart-name">
 			<view class="t-icon t-icon-xtubiao-2"></view>
-			<text class="chart-name-text">近期考试</text>
+			<text class="chart-name-text">最近成绩</text>
 		</view>
-		
+
 		<view class="charts-box">
-		  <qiun-data-charts
-		    type="mini-column"
-		    :chartData="columnChartData"
-		    :loadingType="4"
-		    background="none"
-		    :tapLegend="false"
-				:canvas2d='true' canvasId='canvans2'
-		  />
-		</view>
-	</view>
-</template>
-
+			<qiun-data-charts type="mini-column" :chartData="gradeData.recentColumnChart.columnComparison"
+				:loadingType="4" background="none" :tapLegend="false" :canvas2d='true' canvasId='canvans2' />
+		</view>
+	</view>
+</template>
+
 <script>
-	import {mapState} from 'vuex'
-	export default {
-		name:"column-mini-chart",
-		props:{},
-		computed:{
-			...mapState('m_chart', ['columnChartData'])
-		},
-		data() {
-			return {
-			};
+	import {
+		mapState
+	} from 'vuex'
+	export default {
+		name: "column-mini-chart",
+		props: {},
+		computed: {
+			...mapState('m_chart', ['gradeData'])
+		},
+		data() {
+			return {};
+		},
+		methods: {
+
 		},
-		methods:{
-			
-		},
-	}
-</script>
-
+	}
+</script>
+
 <style lang="scss">
-.chart-container {
-		border-radius: 10px;
+	.chart-container {
+		border-radius: 20rpx;
 		display: flex;
 		align-items: center;
 		justify-content: center;
 		flex-direction: column;
 		background-color: #FFFFFF;
-		box-shadow: 0 2px 4px rgba(0,0,0,0.05);
+		box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
 		width: 340rpx;
-	
+
 		.chart-name {
 			display: flex;
 			align-items: center;
 			justify-content: flex-start;
 			width: 100%;
-			margin: 10px 0px 10px 20px;
-			
+			margin: 20rpx 0 20rpx 40rpx;
+
 			.chart-name-text {
-				margin-left: 10px;
-				font-size: 15px;
+				margin-left: 20rpx;
+				font-size: 30rpx;
 				font-weight: bold;
 				color: #3B4144;
 			}
-		}
-	.charts-box{
-		width: 100%;
-		height: 240rpx;
+		}
+
+		.charts-box {
+			width: 100%;
+			height: 240rpx;
+		}
+	}
+
+	.t-icon {
+		width: 40rpx;
+		height: 40rpx;
 	}
-}
-.t-icon{
-		width: 20px;
-		height: 20px;
-	}
 </style>

+ 41 - 85
components/line-mini-chart/line-mini-chart.vue

@@ -1,86 +1,40 @@
-<template>
+<template>
 	<view class="chart-container">
 		<view class="chart-name">
 			<view class="t-icon t-icon-xtubiao-4"></view>
 			<text class="chart-name-text">学期走势</text>
 		</view>
-		
+
 		<view class="charts-box">
-		  <qiun-data-charts
-		    type="mini-line"
-		    :chartData="chartData"
-		    :loadingType="4"
-		    background="none"
-		    :tapLegend="false"
-				:canvas2d='true' canvasId='canvans3'
-		  />
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		name:"line-mini-chart",
-		props:{},
-		data() {
-			return {
-				chartData: {},
-				queryObj: {}
-			};
+			<qiun-data-charts type="mini-line" :chartData="gradeData.semesterLineChart.lineComparison" :loadingType="4" background="none"
+				:tapLegend="false" :canvas2d='true' canvasId='canvans3' />
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex'
+	
+	export default {
+		name: "line-mini-chart",
+		props: {},
+		computed:{
+			...mapState('m_chart',['gradeData'])
 		},
-		methods:{
-			getChartData(){
-				this.chartData = {
-					categories: [
-						"测验1",
-						"测验2",
-						"测验3",
-						"测验4",
-						"测验5",
-					],
-					series: [{
-							"name": "孩子总分",
-							"data": [
-								400,
-								390,
-								380,
-								399,
-								366,
-							]
-						},
-						{
-							"name": "班级平均分",
-							"data": [
-								360,
-								377,
-								355,
-								322,
-								338,
-							]
-						},
-						{
-							"name": "年级平均分",
-							"data": [
-								333,
-								346,
-								364,
-								347,
-								355,
-							]
-						}
-					],
-				}
-				
-				
-			}
+		data() {
+			return {
+			};
+		},
+		methods: {
 		},
 		//创建组件生命周期函数
-		created(){
-			this.getChartData()
-		}
-	}
-</script>
-
+		created() {
+		}
+	}
+</script>
+
 <style lang="scss">
 	.chart-container {
 		border-radius: 20rpx;
@@ -89,31 +43,33 @@
 		justify-content: center;
 		flex-direction: column;
 		background-color: #FFFFFF;
-		box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.05);
+		box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
 		width: 340rpx;
-	
+
 		.chart-name {
 			display: flex;
 			align-items: center;
 			justify-content: flex-start;
 			width: 100%;
 			margin: 20rpx 0 20rpx 40rpx;
-			
+
 			.chart-name-text {
 				margin-left: 20rpx;
 				font-size: 30rpx;
 				font-weight: bold;
 				color: #3B4144;
 			}
-		}
-	.charts-box{
-		margin-top: 40rpx;
-		width: 100%;
-		height:200rpx;
+		}
+
+		.charts-box {
+			margin-top: 40rpx;
+			width: 100%;
+			height: 200rpx;
+		}
 	}
-}
-.t-icon{
+
+	.t-icon {
 		width: 40rpx;
 		height: 40rpx;
-	}
+	}
 </style>

+ 7 - 30
components/mainline-mini-chart/mainline-mini-chart.vue

@@ -6,51 +6,28 @@
 		</view>
 		
 		<view class="charts-box">
-			<qiun-data-charts class="chart" :canvas2d='true' canvasId='canvans5' type="mainline" :chartData="chartData" :loadingType="4"/>
+			<qiun-data-charts class="chart" :canvas2d='true' canvasId='canvans5' type="mainline" :chartData="gradeData.mainLineChart" :loadingType="4"/>
 		</view>
 	</view>
 </template>
 
-<script>
+<script>
+	import {mapState} from 'vuex'
 	export default {
 		name:"mainline-mini-chart",
 		props: {},
 		data() {
-			return {	
-				chartData: {},
-				queryObj: {}
+			return {	
 
 			};
 		},
+		computed:{
+			...mapState('m_chart',['gradeData'])
+		},
 		methods:{
-			getChartData(){
-				this.chartData = {
-					categories: [
-						"开学考试",
-						"第一月考",
-						"第二月考",
-						"期中考试",
-						"第三月考",
-						"期末考试"
-					],
-					series: [{
-						"name": "总成绩",
-						"data": [
-							555,
-							577,
-							540,
-							588,
-							563,
-							594
-						]
-					}],
-				}
-				
-			}
 		},
 		//创建组件生命周期函数
 		created(){
-			this.getChartData()
 		}
 	}
 </script>

+ 63 - 32
components/top-box/top-box.vue

@@ -9,22 +9,28 @@
 					<text class="detail" @click="select = true">{{semester}}</text>
 					<!-- 选择学期 -->
 					<view class="select-box">
-						<u-picker class="picker" :show="select" :closeOnClickOverlay="true" :columns="semesterList" ref="uPicker" @confirm="selectSemester" @cancel="selectCancel"></u-picker>
+						<u-picker class="picker" :show="select" :closeOnClickOverlay="true" :columns="semesterList"
+							ref="uPicker" @confirm="selectSemester" @cancel="selectCancel"></u-picker>
 						<view class="t-icon t-icon-youjiantou" @click="select = true"></view>
 					</view>
 				</view>
 			</view>
 		</view>
+		<!-- 更新时间戳 -->
+		<view class="refresh-time">
+			<text class="time-text">更新时间:{{timeStamp}}</text>
+		</view>
 		<!-- 切换孩子 -->
 		<view class="list-box" v-show="show">
-			<view class="children-item" v-for="(item,index) in parentdetail.childrenList" :key="index" @click="switchChildren(item)">
+			<view class="children-item" v-for="(item,index) in parentdetail.childrenList" :key="index"
+				@click="switchChildren(item)">
 				<view class="item-box">
 					<image class="item-avatar" :src="item.avatar"></image>
 					<text class="item-text">{{item.name}}</text>
 				</view>
 			</view>
 		</view>
-		
+
 	</view>
 </template>
 
@@ -33,51 +39,56 @@
 		mapState,
 		mapMutations
 	} from 'vuex'
-	
+
 	export default {
 		name: "top-box",
+		props: {
+			timeStamp: {
+				type: String,
+				default: false
+			}
+		},
 		data() {
 			return {
-				
 				show: false,
-				
 				select: false,
-				semesterList:[
-					['19学年上学期','19学年下学期','20学年上学期','20学年下学期']
+				semesterList: [
+					['19学年上学期', '19学年下学期', '20学年上学期', '20学年下学期']
 				],
-				
+
 			};
 		},
 		computed: {
-			...mapState('m_children', ['childreninfo','semester']),
-			...mapState('m_parent',['parentdetail'])
+			...mapState('m_children', ['childreninfo', 'semester']),
+			...mapState('m_parent', ['parentdetail'])
 		},
 		methods: {
-			...mapMutations('m_children',['updateChildrenInfo','updateChildrenSemester']),
-			
+			...mapMutations('m_children', ['updateChildrenInfo', 'updateChildrenSemester']),
+
 			//学期选择
-			selectSemester(e){
-				console.log('selectSemester',e)
+			selectSemester(e) {
+				console.log('selectSemester', e)
 				uni.$showMsg('切换完成')
 				this.updateChildrenSemester(e.value[0])
 				this.select = false
 			},
 			//取消选择
-			selectCancel(){
+			selectCancel() {
 				uni.$showMsg('取消选择')
 				this.select = false
 			},
-			
+
 			//头部孩子选择
-			showChildrenList(e){
+			showChildrenList(e) {
 				console.log('chooseChildren' + e)
 				this.show = !this.show
 			},
-			switchChildren(item){
+			switchChildren(item) {
 				console.log(item);
 				this.updateChildrenInfo(item)
 				this.show = false
-			}
+			},
+
 		}
 	}
 </script>
@@ -113,7 +124,8 @@
 				margin: 4rpx 0 0 10rpx;
 				font-weight: bold;
 			}
-			.detail-box{
+
+			.detail-box {
 				display: flex;
 
 				.detail {
@@ -122,30 +134,47 @@
 					font-size: 28rpx;
 					margin: 10rpx 0rpx 0 10rpx;
 				}
-				.select-box{
+
+				.select-box {
 					margin: 10rpx;
 				}
 			}
 		}
 	}
-	.list-box{
+
+	.refresh-time {
+		.time-text {
+			position: relative;
+			left: 560rpx;
+			bottom: 230rpx;
+			font-size: 24rpx;
+			color: #2197ef;
+			font-weight: bold;
+		}
+	}
+
+	.list-box {
 		margin: -120rpx 40rpx 120rpx 30rpx;
 		display: flex;
 		flex-wrap: wrap;
-		.children-item{
+
+		.children-item {
 			margin: 0 10rpx 0 10rpx;
-			.item-box{
+
+			.item-box {
 				display: flex;
 				flex-direction: column;
 				justify-content: center;
 				align-items: center;
-				.item-avatar{
+
+				.item-avatar {
 					width: 90rpx;
 					height: 90rpx;
 					border-radius: 50rpx;
 					border: 4rpx solid #FFFFFF;
 				}
-				.item-text{
+
+				.item-text {
 					font-size: 24rpx;
 					font-weight: bold;
 					color: #6b778d;
@@ -153,11 +182,13 @@
 			}
 		}
 	}
-	.t-icon{
-			width: 40rpx;
-			height: 40rpx;
-		}
-	.picker{
+
+	.t-icon {
+		width: 40rpx;
+		height: 40rpx;
+	}
+
+	.picker {
 		z-index: 99;
 	}
 </style>

+ 86 - 119
gradepkg/arcbar-chart/arcbar-chart.vue

@@ -3,7 +3,7 @@
 		<view class="back">
 			<view class="t-icon t-icon-fanhui2-copy" @click="returnList"></view>
 		</view>
-		
+
 		<view class="children-box">
 			<image class="children-avatar" :src="childreninfo.avatar"></image>
 			<view class="children-msg">
@@ -11,18 +11,41 @@
 				<view class="children-class">{{childreninfo.class}}</view>
 			</view>
 		</view>
-<!-- 图表列表 -->
-<!-- 走势 -->
-<view class="chart-container">
-			<view class="chart-name">
-				<view class="t-icon t-icon-xianxinglanqiu"></view>
-				<text class="chart-name-text">{{semester}} 排行占比走势对比</text>
+
+		<!-- 数据分析模块 -->
+		<view class="data-box">
+			<view class="data-box-item" v-bind:style="{background: gradeData.rankArcbarChart.recentAnalyse.series[0].color}">
+				<view class="item-text">{{gradeData.rankArcbarChart.recentAnalyse.series[0].name}}</view>
+				<view class="item-number">{{gradeData.rankArcbarChart.recentAnalyse.series[0].data/0.01}}%</view>
+				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 0 15rpx 10rpx 15rpx;">
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[0].data<0.4" class="t-icon t-icon-jiangbei-20"></view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[0].data>=0.4 && gradeData.rankArcbarChart.recentAnalyse.series[0].data<0.7"
+						class="t-icon t-icon-jiangbei-19"></view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[0].data>=0.7" class="t-icon t-icon-jiangbei-18"></view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[0].data<0.4" class="icon-text-item">要加把劲!</view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[0].data>=0.4 && gradeData.rankArcbarChart.recentAnalyse.series[0].data<0.7"
+						class="icon-text-item">再接再厉!</view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[0].data>=0.7" class="icon-text-item">非常优秀!</view>
+				</view>
 			</view>
-			<view class="charts-box">
-				<qiun-data-charts type="area" :chartData="listChartData" :loadingType="4" :opts="{dataLabel: false}"
-					:canvas2d='true' canvasId='canvans899' />
+
+			<view class="data-box-item" v-bind:style="{background: gradeData.rankArcbarChart.recentAnalyse.series[1].color}">
+				<view class="item-text">{{gradeData.rankArcbarChart.recentAnalyse.series[1].name}}</view>
+				<view class="item-number">{{gradeData.rankArcbarChart.recentAnalyse.series[1].data/0.01}}%</view>
+				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 0 15rpx 10rpx 15rpx;">
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[1].data<0.4" class="t-icon t-icon-jiangbei-20"></view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[1].data>=0.4 && gradeData.rankArcbarChart.recentAnalyse.series[1].data<0.7"
+						class="t-icon t-icon-jiangbei-19"></view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[1].data>=0.7" class="t-icon t-icon-jiangbei-18"></view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[1].data<0.4" class="icon-text-item">要加把劲!</view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[1].data>=0.4 && gradeData.rankArcbarChart.recentAnalyse.series[1].data<0.7"
+						class="icon-text-item">再接再厉!</view>
+					<view v-if="gradeData.rankArcbarChart.recentAnalyse.series[1].data>=0.7" class="icon-text-item">非常优秀!</view>
+				</view>
 			</view>
 		</view>
+
+		<!-- 图表列表 -->
 		<!-- 单次分析 -->
 		<view class="chart-container">
 			<view class="chart-name">
@@ -30,115 +53,47 @@
 				<text class="chart-name-text">近期排行占比分析</text>
 			</view>
 			<view class="charts-box">
-		 	<qiun-data-charts type="arcbar" :chartData="arcbarChartData" :loadingType="4"/>
+				<qiun-data-charts type="arcbar" :chartData="gradeData.rankArcbarChart.recentAnalyse" :loadingType="4" />
 			</view>
 		</view>
-		<!-- 数据分析模块 -->
-		<view class="data-box">
-			<view class="data-box-item" v-bind:style="{background: arcbarChartData.series[0].color}">
-				<view class="item-text">{{arcbarChartData.series[0].name}}</view>
-				<view class="item-number">{{arcbarChartData.series[0].data/0.01}}%</view>
-				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 5rpx 15rpx;">
-					<view v-if="arcbarChartData.series[0].data<0.4" class="t-icon t-icon-jiangbei-20"></view>
-					<view v-if="arcbarChartData.series[0].data>=0.4 && arcbarChartData.series[0].data<0.7" class="t-icon t-icon-jiangbei-19"></view>
-					<view v-if="arcbarChartData.series[0].data>=0.7" class="t-icon t-icon-jiangbei-18"></view>
-					<view v-if="arcbarChartData.series[0].data<0.4" class="icon-text-item">要加把劲!</view>
-					<view v-if="arcbarChartData.series[0].data>=0.4 && arcbarChartData.series[0].data<0.7" class="icon-text-item">再接再厉!</view>
-					<view v-if="arcbarChartData.series[0].data>=0.7" class="icon-text-item">非常优秀!</view>
-				</view>
+		<!-- 走势 -->
+		<view class="chart-container">
+			<view class="chart-name">
+				<view class="t-icon t-icon-xianxinglanqiu"></view>
+				<text class="chart-name-text">{{semester}} 排行占比走势对比</text>
 			</view>
-			
-			<view class="data-box-item" v-bind:style="{background: arcbarChartData.series[1].color}">
-				<view class="item-text">{{arcbarChartData.series[1].name}}</view>
-				<view class="item-number">{{arcbarChartData.series[1].data/0.01}}%</view>
-				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 5rpx 15rpx;">
-					<view v-if="arcbarChartData.series[1].data<0.4" class="t-icon t-icon-jiangbei-20"></view>
-					<view v-if="arcbarChartData.series[1].data>=0.4 && arcbarChartData.series[1].data<0.7" class="t-icon t-icon-jiangbei-19"></view>
-					<view v-if="arcbarChartData.series[1].data>=0.7" class="t-icon t-icon-jiangbei-18"></view>
-					<view v-if="arcbarChartData.series[1].data<0.4" class="icon-text-item">要加把劲!</view>
-					<view v-if="arcbarChartData.series[1].data>=0.4 && arcbarChartData.series[1].data<0.7" class="icon-text-item">再接再厉!</view>
-					<view v-if="arcbarChartData.series[1].data>=0.7" class="icon-text-item">非常优秀!</view>
-				</view>
+			<view class="charts-box">
+				<qiun-data-charts type="area" :chartData="gradeData.rankArcbarChart.semesterAnalyse" :loadingType="4" :opts="{dataLabel: false}"
+					:canvas2d='true' canvasId='canvans899' />
 			</view>
-			
 		</view>
+
 	</view>
 </template>
 
 <script>
-	import {mapState} from 'vuex'
-	
+	import {
+		mapState
+	} from 'vuex'
+
 	export default {
-		computed:{
-			...mapState('m_children',['childreninfo','semester'])
+		computed: {
+			...mapState('m_children', ['childreninfo', 'semester']),
+			...mapState('m_chart',['gradeData'])
 		},
 		data() {
 			return {
-				arcbarChartData: {
-					series: [{
-							"name": "超过年级中",
-							"data": 0.6,
-							"color": "#0052d4"
-						},
-						{
-							"name": "超过班级中",
-							"data": 0.92,
-							"color": "#ff5959"
-						}
-					],
-				},
-				listChartData: {
-					categories: [
-						"测验1",
-						"测验2",
-						"测验3",
-						"测验4",
-						"测验5",
-						"测验6"
-					],
-					series: [{
-							"name": "超过年级中百分之",
-							"data": [
-								90,
-								95,
-								92,
-								100,
-								88,
-								99
-							]
-						},
-						{
-							"name": "超过班级中百分之",
-							"data": [
-								95,
-								98,
-								84,
-								92,
-								93,
-								79
-							]
-						}
-					]
-				},
-				//查询参数
-				queryObj: {},
-				
 			};
 		},
-		methods:{
+		methods: {
 			//返回成绩页面
-			returnList(){
+			returnList() {
 				uni.switchTab({
 					url: '/pages/grade/grade'
 				})
 			},
-			//获取表格数据
-			// async getChartData(){
-				
-			// },
 		},
-		onLoad(){
-			// this.getChartData()
+		onLoad() {
 		}
 	}
 </script>
@@ -147,19 +102,21 @@
 	.page-box {
 		height: 600rpx;
 		background: linear-gradient(#ffd071, #f1f3f5);
-	
+
 		.back {
 			padding: 100rpx 0 30rpx 40rpx;
-			.t-icon{
-				width:50rpx;
-				height:50rpx;
+
+			.t-icon {
+				width: 50rpx;
+				height: 50rpx;
 			}
 		}
-		
-		.children-box{
+
+		.children-box {
 			display: flex;
 			align-items: center;
-			.children-avatar{
+
+			.children-avatar {
 				margin-left: 40rpx;
 				width: 96rpx;
 				height: 96rpx;
@@ -167,16 +124,18 @@
 				border: 4rpx solid #FFFFFF;
 				box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.2);
 			}
-			.children-msg{
+
+			.children-msg {
 				margin-left: 30rpx;
-				
-				.children-name{
+
+				.children-name {
 					color: #3B4144;
 					font-size: 32rpx;
 					font-weight: bold;
 					margin-bottom: 10rpx;
 				}
-				.children-class{
+
+				.children-class {
 					color: #696969;
 					font-size: 32rpx;
 					font-weight: bold;
@@ -184,6 +143,7 @@
 				}
 			}
 		}
+
 		.chart-container {
 			margin: 40rpx 20rpx 0 20rpx;
 			padding: 0rpx 10rpx 0rpx 0rpx;
@@ -193,8 +153,8 @@
 			justify-content: center;
 			flex-direction: column;
 			background-color: #FFFFFF;
-			box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1);
-		
+			box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
+
 			.chart-name {
 				width: 100%;
 				display: flex;
@@ -202,7 +162,7 @@
 				align-items: center;
 				margin-left: 40rpx;
 				margin-top: 20rpx;
-		
+
 				.chart-name-text {
 					font-size: 30rpx;
 					font-weight: bold;
@@ -210,37 +170,43 @@
 					margin-left: 10rpx;
 				}
 			}
+
 			.charts-box {
 				width: 100%;
 				height: 500rpx;
 			}
 		}
-		.data-box{
+
+		.data-box {
 			display: flex;
 			flex-direction: row;
 			align-items: center;
 			flex-wrap: wrap;
 			justify-content: space-between;
 			margin: 20rpx;
-			.data-box-item{
+
+			.data-box-item {
 				display: flex;
 				flex-direction: column;
 				background-color: #FFFFFF;
 				border-radius: 15rpx;
 				width: 340rpx;
 				height: 290rpx;
-				box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1);
-				.item-text{
+				box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
+
+				.item-text {
 					font-size: 30rpx;
 					font-weight: bold;
 					color: #FFFFFF;
 					margin: 30rpx 0 0 30rpx;
 				}
-				.t-icon{
+
+				.t-icon {
 					width: 100rpx;
 					height: 100rpx;
 				}
-				.item-number{
+
+				.item-number {
 					font-size: 60rpx;
 					margin: 20rpx 0 10rpx 30rpx;
 					color: #FFFFFF;
@@ -249,7 +215,8 @@
 			}
 		}
 	}
-	.icon-text-item{
+
+	.icon-text-item {
 		font-size: 30rpx;
 		font-weight: bold;
 		color: #FFFFFF;

+ 19 - 98
gradepkg/area-chart/area-chart.vue

@@ -19,16 +19,17 @@
 			<view class="chart-name">
 				<view class="t-icon t-icon-xianxinggangqin"></view>
 				<text class="chart-name-text">{{semester}} 单科与平均对比</text>
-				
+
 				<view class="search-box" @click="show = true">
-					<view class="t-icon t-icon-fangdajing"></view>
-					<view style="font-weight: bold;font-size: 26rpx;color: #3B4144;">科目</view>
+					<!-- <view class="t-icon t-icon-fangdajing"></view>
+					<view style="font-weight: bold;font-size: 26rpx;color: #3B4144;">科目</view> -->
+					<u-button>{{gradeData.subjectAreaChart.areaComparison.series[0].name}}</u-button>
 				</view>
 			</view>
 			<!-- 图表 -->
 			<view class="charts-box">
-				<qiun-data-charts type="area" :chartData="areaChartData" :loadingType="4" background="none"
-					:canvas2d='true' canvasId='canvans999' />
+				<qiun-data-charts type="area" :chartData="gradeData.subjectAreaChart.areaComparison" :loadingType="4"
+					background="none" :canvas2d='true' canvasId='canvans999' />
 			</view>
 		</view>
 
@@ -40,8 +41,8 @@
 			</view>
 			<!-- 图表 -->
 			<view class="charts-box">
-				<qiun-data-charts type="area" :chartData="subjectChartData" :loadingType="4" :opts="{dataLabel: false}"
-					:canvas2d='true' canvasId='canvans899' />
+				<qiun-data-charts type="area" :chartData="gradeData.subjectAreaChart.subjectComparison" :loadingType="4"
+					:opts="{dataLabel: false}" :canvas2d='true' canvasId='canvans899' />
 			</view>
 		</view>
 
@@ -56,111 +57,30 @@
 
 <script>
 	import {
-		mapState
+		mapState, mapMutations
 	} from 'vuex'
 
 	export default {
 		computed: {
 			...mapState('m_children', ['childreninfo', 'semester']),
-			...mapState('m_chart', ['areaChartData'])
+			...mapState('m_chart', ['gradeData'])
 		},
 
 		data() {
 			return {
 				show: false,
-				subject: [
-					['语文', '数学', '英语', '体育', '思品', '科学']
-				],
-				//查询参数
-				queryObj: {},
-				subjectChartData: {
-					categories: [
-						"测验1",
-						"测验2",
-						"测验3",
-						"测验4",
-						"测验5",
-						"测验6"
-					],
-					series: [{
-							"name": "数学",
-							"data": [
-								90,
-								95,
-								92,
-								100,
-								88,
-								99
-							]
-						},
-						{
-							"name": "语文",
-							"data": [
-								95,
-								98,
-								84,
-								92,
-								93,
-								89
-							]
-						},
-						{
-							"name": "英语",
-							"data": [
-								98,
-								89,
-								97,
-								84,
-								95,
-								89
-							]
-						},
-						{
-							"name": "科学",
-							"data": [
-								91,
-								72,
-								92,
-								89,
-								97,
-								92
-							]
-						},
-						{
-							"name": "体育",
-							"data": [
-								95,
-								89,
-								92,
-								87,
-								91,
-								83
-							]
-						},
-						{
-							"name": "思品",
-							"data": [
-								91,
-								82,
-								87,
-								84,
-								90,
-								85
-							]
-						}
-					],
-				}
+				subject: [['语文', '数学', '英语', '体育', '思品', '科学']],
 
 			};
 		},
-		onLoad() {
-			// this.getChartData()
-		},
+		onLoad() {},
 		methods: {
+			...mapMutations('m_chart', ['updateSubjectAreaComparison']),
 			//选择科目
 			selectSubject(e) {
 				console.log('selectSubject', e)
-				// this.queryObj = e.value[0]
+				
+				this.updateSubjectAreaComparison(areaComparison)
 				// this.getChartData()
 				uni.$showMsg('切换完成')
 				this.show = false
@@ -251,9 +171,10 @@
 					color: #3B4144;
 					margin-left: 10rpx;
 				}
-				.search-box{
-					display: flex; 
-					align-items: center; 
+
+				.search-box {
+					display: flex;
+					align-items: center;
 					margin-left: auto;
 					margin-right: 40rpx;
 				}

+ 4 - 56
gradepkg/column-chart/column-chart.vue

@@ -19,7 +19,7 @@
 				<text class="chart-name-text">近期成绩对比</text>
 			</view>
 			<view class="charts-box">
-				<qiun-data-charts type="column" :chartData="columnChartData" :loadingType="4" background="none" />
+				<qiun-data-charts type="column" :chartData="gradeData.recentColumnChart.columnComparison" :loadingType="4" background="none" />
 			</view>
 		</view>
 		<!-- 近期成绩对比平均 -->
@@ -29,7 +29,7 @@
 				<text class="chart-name-text">近期学科能力</text>
 			</view>
 			<view class="charts-box">
-				<qiun-data-charts type="radar" :chartData="radarChartData" :loadingType="4" />
+				<qiun-data-charts type="radar" :chartData="gradeData.recentColumnChart.radarSubjectComparison" :loadingType="4" />
 			</view>
 		</view>
 		
@@ -42,59 +42,11 @@
 	export default {
 		computed:{
 			...mapState('m_children',['childreninfo','semester']),
-			...mapState('m_chart',['columnChartData'])
+			...mapState('m_chart',['gradeData'])
 		},
 		
 		data() {
 			return {
-				//查询参数
-				queryObj: {},
-				radarChartData: {
-					categories: [
-						"数学",
-						"语文",
-						"英语",
-						"体育",
-						"科学",
-						"思品"
-					],
-					series: [{
-							"name": "孩子",
-							"data": [
-								91,
-								92,
-								94,
-								82,
-								82,
-								89
-							]
-						},
-						{
-							"name": "班平均",
-							"data": [
-								82,
-								83,
-								77,
-								83,
-								91,
-								81
-							]
-						},
-						{
-							"name": "年级平均",
-							"data": [
-								77,
-								78,
-								73,
-								80,
-								86,
-								85
-							]
-						}
-					],
-				},
-				
-				
 			};
 		},
 		methods:{
@@ -104,13 +56,9 @@
 					url: '/pages/grade/grade'
 				})
 			},
-			//获取表格数据
-			// async getChartData(){
-				
-			// },
+
 		},
 		onLoad(){
-			// this.getChartData()
 		}
 	}
 </script>

+ 5 - 90
gradepkg/line-chart/line-chart.vue

@@ -20,7 +20,7 @@
 				<text class="chart-name-text">{{semester}} 总成绩对比</text>
 			</view>
 			<view class="charts-box">
-				<qiun-data-charts type="line" :chartData="lineChartData" :loadingType="4"/>
+				<qiun-data-charts type="line" :chartData="gradeData.semesterLineChart.lineComparison" :loadingType="4"/>
 			</view>
 		</view>
 		<!-- 主科总成绩图表 -->
@@ -30,7 +30,7 @@
 				<text class="chart-name-text">{{semester}} 主科总成绩对比</text>
 			</view>
 			<view class="charts-box">
-				<qiun-data-charts type="line" :chartData="majorChartData" :loadingType="4"/>
+				<qiun-data-charts type="line" :chartData="gradeData.semesterLineChart.majorComparison" :loadingType="4"/>
 			</view>
 		</view>
 		<!-- 副科总成绩图表 -->
@@ -40,7 +40,7 @@
 				<text class="chart-name-text">{{semester}} 副科总成绩对比</text>
 			</view>
 			<view class="charts-box">
-				<qiun-data-charts type="line" :chartData="minorChartData" :loadingType="4"/>
+				<qiun-data-charts type="line" :chartData="gradeData.semesterLineChart.minorComparison" :loadingType="4"/>
 			</view>
 		</view>
 		
@@ -53,94 +53,14 @@
 	export default {
 		computed:{
 			...mapState('m_children',['childreninfo','semester']),
-			...mapState('m_chart', ['lineChartData'])
+			...mapState('m_chart', ['gradeData'])
 		},
 		
 		data() {
 			return {
 				//查询参数
 				queryObj: {},
-				majorChartData: {
-					categories: [
-						"测验1",
-						"测验2",
-						"测验3",
-						"测验4",
-						"测验5",
-					],
-					series: [{
-							"name": "语数外总分",
-							"data": [
-								266,
-								277,
-								258,
-								288,
-								294,
-							]
-						},
-						{
-							"name": "班级平均分",
-							"data": [
-								255,
-								257,
-								260,
-								264,
-								250,
-							]
-						},
-						{
-							"name": "年级平均分",
-							"data": [
-								245,
-								260,
-								252,
-								247,
-								255,
-							]
-						}
-					],
-				},
-				minorChartData: {
-					categories: [
-						"测验1",
-						"测验2",
-						"测验3",
-						"测验4",
-						"测验5",
-					],
-					series: [{
-							"name": "科学体育思品总分",
-							"data": [
-								280,
-								290,
-								280,
-								299,
-								266,
-							]
-						},
-						{
-							"name": "班级平均分",
-							"data": [
-								260,
-								277,
-								255,
-								222,
-								238,
-							]
-						},
-						{
-							"name": "年级平均分",
-							"data": [
-								233,
-								246,
-								268,
-								242,
-								256,
-							]
-						}
-					],
-				},
-				
+
 			}
 		},
 		methods:{
@@ -150,13 +70,8 @@
 					url: '/pages/grade/grade'
 				})
 			},
-			//获取表格数据
-			// async getChartData(){
-				
-			// },
 		},
 		onLoad(){
-			// this.getChartData()
 		}
 	}
 </script>

+ 32 - 119
gradepkg/radar-chart/radar-chart.vue

@@ -11,6 +11,31 @@
 				<view class="children-class">{{childreninfo.class}}</view>
 			</view>
 		</view>
+		
+		<!-- 数据分析模块 -->
+		<view class="data-box">
+			<view class="data-box-item">
+				<view class="item-text">考试成绩波动对比:</view>
+				<view class="item-number">{{mainExamUndulate>=quizExamUndulate?'小考稳定':'大考稳定'}}</view>
+				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 0 15rpx 10rpx 15rpx;">
+					<view v-if="mainExamUndulate>=quizExamUndulate" class="t-icon t-icon-jiangbei-4"></view>
+					<view v-if="mainExamUndulate<quizExamUndulate" class="t-icon t-icon-jiangbei-3"></view>
+					<view v-if="mainExamUndulate>=quizExamUndulate" class="icon-text-item">重要考试时沉住气稳住心态</view>
+					<view v-if="mainExamUndulate<quizExamUndulate" class="icon-text-item">普通考试也不能掉以轻心</view>
+				</view>
+			</view>
+		
+			<view class="data-box-item2">
+				<view class="item-text">考试得分能力对比:</view>
+				<view class="item-number">{{avgMain>=avgquiz?'大考能力强':'小考能力强'}}</view>
+				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 0 15rpx 10rpx 15rpx;">
+					<view v-if="avgMain<avgquiz" class="t-icon t-icon-jiangbei-4"></view>
+					<view v-if="avgMain>=avgquiz" class="t-icon t-icon-jiangbei-3"></view>
+					<view v-if="avgMain<avgquiz" class="icon-text-item">重要考试要多证明自己能力</view>
+					<view v-if="avgMain>=avgquiz" class="icon-text-item">普通考试要注重得分与练习</view>
+				</view>
+			</view>
+		</view>
 
 		<!-- 图表列表 -->
 		<view class="chart-container">
@@ -20,7 +45,7 @@
 			</view>
 			<!-- 图表 -->
 			<view class="charts-box">
-				<qiun-data-charts type="mainradar" :chartData="mainChartData" :loadingType="4" />
+				<qiun-data-charts type="mainradar" :chartData="gradeData.abilityRadarChart.importantAnalyse" :loadingType="4" />
 			</view>
 		</view>
 
@@ -31,34 +56,11 @@
 			</view>
 			<!-- 图表 -->
 			<view class="charts-box">
-				<qiun-data-charts type="mainradar" :chartData="quizChartData" :loadingType="4" />
+				<qiun-data-charts type="mainradar" :chartData="gradeData.abilityRadarChart.commonAnalyse" :loadingType="4" />
 			</view>
 		</view>
 
-		<!-- 数据分析模块 -->
-		<view class="data-box">
-			<view class="data-box-item">
-				<view class="item-text">{{childreninfo.name}}考试发挥能力:</view>
-				<view class="item-number">{{mainExamUndulate>=quizExamUndulate?'小考稳定':'大考稳定'}}</view>
-				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 5rpx 15rpx;">
-					<view v-if="mainExamUndulate>=quizExamUndulate" class="t-icon t-icon-jiangbei-4"></view>
-					<view v-if="mainExamUndulate<quizExamUndulate" class="t-icon t-icon-jiangbei-3"></view>
-					<view v-if="mainExamUndulate>=quizExamUndulate" class="icon-text-item">重要考试时沉住气稳住心态</view>
-					<view v-if="mainExamUndulate<quizExamUndulate" class="icon-text-item">普通考试也不能掉以轻心</view>
-				</view>
-			</view>
-
-			<view class="data-box-item2">
-				<view class="item-text">{{childreninfo.name}}考试得分能力:</view>
-				<view class="item-number">{{avgMain>=avgquiz?'大考能力强':'小考能力强'}}</view>
-				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 5rpx 15rpx;">
-					<view v-if="avgMain<avgquiz" class="t-icon t-icon-jiangbei-4"></view>
-					<view v-if="avgMain>=avgquiz" class="t-icon t-icon-jiangbei-3"></view>
-					<view v-if="avgMain<avgquiz" class="icon-text-item">重要考试要多证明自己能力</view>
-					<view v-if="avgMain>=avgquiz" class="icon-text-item">普通考试要注重得分与练习</view>
-				</view>
-			</view>
-		</view>
+		
 
 
 	</view>
@@ -71,100 +73,12 @@
 
 	export default {
 		computed: {
-			...mapState('m_children', ['childreninfo', 'semester'])
+			...mapState('m_children', ['childreninfo', 'semester']),
+			...mapState('m_chart', ['gradeData'])
 		},
 
 		data() {
 			return {
-
-				mainChartData: {
-					categories: [
-						"语文",
-						"数学",
-						"英语",
-						"科学",
-						"体育",
-						"思品"
-					],
-					series: [{
-							"name": "开学考试",
-							"data": [
-								90,
-								100,
-								77,
-								88,
-								95,
-								83
-							]
-						},
-						{
-							"name": "期中考试",
-							"data": [
-								94,
-								89,
-								97,
-								81,
-								95,
-								82
-							]
-						},
-						{
-							"name": "期末考试",
-							"data": [
-								82,
-								90,
-								65,
-								96,
-								70,
-								92
-							]
-						}
-					],
-				},
-				quizChartData: {
-					categories: [
-						"语文",
-						"数学",
-						"英语",
-						"科学",
-						"体育",
-						"思品"
-					],
-					series: [{
-							"name": "4月月考",
-							"data": [
-								90,
-								100,
-								77,
-								78,
-								75,
-								95
-							]
-						},
-						{
-							"name": "6月月考",
-							"data": [
-								89,
-								94,
-								75,
-								99,
-								80,
-								92
-							]
-						},
-						{
-							"name": "8月月考",
-							"data": [
-								79,
-								84,
-								94,
-								73,
-								99,
-								87
-							]
-						}
-					],
-				},
 				//查询参数
 				queryObj: {},
 				//成绩波动参数(标准差)
@@ -173,7 +87,6 @@
 				//大小考每次考试平均成绩
 				avgMain: 0,
 				avgquiz: 0,
-
 			};
 		},
 		methods: {
@@ -201,10 +114,10 @@
 				const mainArr = []
 				const quizArr = []
 				//统计每次考试总成绩并存为数组
-				for (let item of this.mainChartData.series) {
+				for (let item of this.gradeData.abilityRadarChart.importantAnalyse.series) {
 					mainArr.push(arrSum(item.data))
 				}
-				for (let item of this.quizChartData.series) {
+				for (let item of this.gradeData.abilityRadarChart.commonAnalyse.series) {
 					quizArr.push(arrSum(item.data))
 				}
 				//大小考试平均成绩

+ 41 - 99
gradepkg/rose-chart/rose-chart.vue

@@ -12,34 +12,12 @@
 			</view>
 		</view>
 
-		<!-- 图表列表 -->
-		<!-- 单次考试 -->
-		<view class="chart-container">
-			<view class="chart-name">
-				<view class="t-icon t-icon-xianxingmeishuhuahua"></view>
-				<text class="chart-name-text">最近考试科目分析</text>
-			</view>
-			<view class="charts-box">
-				<qiun-data-charts type="rose" :chartData="roseChartData" :loadingType="4" :tapLegend="true" />
-			</view>
-		</view>
-		<!-- 学期平均 -->
-		<view class="chart-container">
-			<view class="chart-name">
-				<view class="t-icon t-icon-xianxingyouyong"></view>
-				<text class="chart-name-text">{{semester}} 各科目平均值分析</text>
-			</view>
-			<view class="charts-box">
-				<qiun-data-charts type="rose" :chartData="meanChartData" :loadingType="4" :tapLegend="true" />
-			</view>
-		</view>
-
 		<!-- 数据分析模块 -->
 		<view class="data-box">
 			<view class="data-box-item">
-				<view class="item-text">{{childreninfo.name}}优势科:{{bestSubject.name}}</view>
-				<view class="item-number">{{bestSubject.value}}分</view>
-				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 5rpx 15rpx;">
+				<view class="item-text">本学期优势科目为:</view>
+				<view class="item-number">{{bestSubject.name}}{{bestSubject.value}}分</view>
+				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 0 15rpx 10rpx 15rpx;">
 					<view v-if="bestSubject.value>=80" class="t-icon t-icon-jiangbei-9"></view>
 					<view v-if="bestSubject.value<80 && bestSubject.value>=50" class="t-icon t-icon-jiangbei-10"></view>
 					<view v-if="bestSubject.value<50" class="t-icon t-icon-jiangbei-11"></view>
@@ -48,22 +26,48 @@
 					<view v-if="bestSubject.value>=80" class="icon-text-item">非常优秀!</view>
 				</view>
 			</view>
-			
+
 			<view class="data-box-item2">
-				<view class="item-text">{{childreninfo.name}}劣势科:{{worstSubject.name}}</view>
-				<view class="item-number">{{worstSubject.value}}分</view>
-				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 5rpx 15rpx;">
+				<view class="item-text">本学期劣势科目为:</view>
+				<view class="item-number">{{worstSubject.name}}{{worstSubject.value}}分</view>
+				<view style="display: flex;align-items: center;padding-bottom: 15rpx;padding: 0 15rpx 10rpx 15rpx;">
 					<view v-if="worstSubject.value>=80" class="t-icon t-icon-jiangbei-9"></view>
-					<view v-if="worstSubject.value<80 && bestSubject.value>=50" class="t-icon t-icon-jiangbei-10"></view>
+					<view v-if="worstSubject.value<80 && bestSubject.value>=50" class="t-icon t-icon-jiangbei-10">
+					</view>
 					<view v-if="worstSubject.value<50" class="t-icon t-icon-jiangbei-11"></view>
 					<view v-if="worstSubject.value<50" class="icon-text-item">提升自己!</view>
-						<view v-if="worstSubject.value<80 && bestSubject.value>=50" class="icon-text-item">再接再厉!</view>
-						<view v-if="worstSubject.value>=80" class="icon-text-item">非常优秀!</view>
-					</view>
+					<view v-if="worstSubject.value<80 && bestSubject.value>=50" class="icon-text-item">再接再厉!</view>
+					<view v-if="worstSubject.value>=80" class="icon-text-item">非常优秀!</view>
 				</view>
 			</view>
-			
 		</view>
+
+		<!-- 图表列表 -->
+		<!-- 学期平均 -->
+		<view class="chart-container">
+			<view class="chart-name">
+				<view class="t-icon t-icon-xianxingyouyong"></view>
+				<text class="chart-name-text">{{semester}} 科目得分平均值分析</text>
+			</view>
+			<view class="charts-box">
+				<qiun-data-charts type="rose" :chartData="gradeData.advantageRoseChart.semesterAnalyse" :loadingType="4" :tapLegend="true" />
+			</view>
+		</view>
+		<!-- 单次考试 -->
+		<view class="chart-container">
+			<view class="chart-name">
+				<view class="t-icon t-icon-xianxingmeishuhuahua"></view>
+				<text class="chart-name-text">最近考试科目得分分析</text>
+			</view>
+			<view class="charts-box">
+				<qiun-data-charts type="rose" :chartData="gradeData.advantageRoseChart.recentAnalyse" :loadingType="4" :tapLegend="true" />
+			</view>
+		</view>
+		
+
+
+
+	</view>
 	</view>
 </template>
 
@@ -75,7 +79,7 @@
 	export default {
 		computed: {
 			...mapState('m_children', ['childreninfo', 'semester']),
-			...mapState('m_chart', ['areaChartData'])
+			...mapState('m_chart', ['gradeData'])
 		},
 
 		data() {
@@ -84,71 +88,9 @@
 				bestSubject: {},
 				//劣势科目
 				worstSubject: {},
-				
-				roseChartData: {
-					series: [{
-						"data": [{
-								"name": "数学",
-								"value": 100
-							},
-							{
-								"name": "语文",
-								"value": 86
-							},
-							{
-								"name": "英语",
-								"value": 100
-							},
-							{
-								"name": "科学",
-								"value": 79
-							},
-							{
-								"name": "体育",
-								"value": 88
-							},
-							{
-								"name": "思品",
-								"value": 95
-							}
-						]
-					}]
-				},
-				meanChartData: {
-					series: [{
-						"data": [{
-								"name": "数学",
-								"value": 97
-							},
-							{
-								"name": "语文",
-								"value": 82
-							},
-							{
-								"name": "英语",
-								"value": 99
-							},
-							{
-								"name": "科学",
-								"value": 80
-							},
-							{
-								"name": "体育",
-								"value": 77
-							},
-							{
-								"name": "思品",
-								"value": 95
-							}
-						]
-					}]
-				},
-
-
 			};
 		},
 		onLoad() {
-			// this.getChartData()
 			this.getGradeDetail()
 		},
 		methods: {
@@ -161,10 +103,10 @@
 			//通过map方法返回成绩的数组
 			getGradeDetail() {
 				//获取成绩最好科目
-				this.bestSubject = this.meanChartData.series[0].data.reduce((pre, cur) => pre.value > cur.value ? pre :
+				this.bestSubject = this.gradeData.advantageRoseChart.semesterAnalyse.series[0].data.reduce((pre, cur) => pre.value > cur.value ? pre :
 					cur)
 				//劣势科目
-				this.worstSubject = this.meanChartData.series[0].data.reduce((pre, cur) => pre.value < cur.value ? pre :
+				this.worstSubject = this.gradeData.advantageRoseChart.semesterAnalyse.series[0].data.reduce((pre, cur) => pre.value < cur.value ? pre :
 					cur)
 				console.log(this.bestSubject)
 				console.log(this.worstSubject)

+ 577 - 45
information/chart.js

@@ -5,52 +5,116 @@ export default {
 
 	//模块数据
 	state: () => ({
-		//区域图数据(单科成绩走势对比)
-		areaChartData: {
-			categories: [
-				"测验1",
-				"测验2",
-				"测验3",
-				"测验4",
-				"测验5",
-				"测验6"
-			],
-			series: [{
-					"name": "数学成绩",
+		//成绩图表数据
+		gradeData: {
+			mainLineChart: {
+				categories: [
+					"开学考试",
+					"第一月考",
+					"第二月考",
+					"期中考试",
+					"第三月考",
+					"期末考试"
+				],
+				series: [{
+					"name": "总成绩",
 					"data": [
-						90,
-						95,
-						92,
-						100,
-						88,
-						99
+						555,
+						577,
+						540,
+						588,
+						563,
+						594
 					]
+				}],
+			},
+			tableData: [{
+					'考试': '开学',
+					'语文': 83,
+					'数学': 95,
+					'外语': 95,
+					'体育': 92,
+					'思品': 88,
+					'科学': 90,
 				},
 				{
-					"name": "班级平均",
-					"data": [
-						85,
-						88,
-						84,
-						92,
-						93,
-						89
-					]
+					'考试': '四月月考',
+					'语文': 93,
+					'数学': 92,
+					'外语': 90,
+					'体育': 82,
+					'思品': 90,
+					'科学': 99,
 				},
 				{
-					"name": "年纪平均",
-					"data": [
-						88,
-						79,
-						77,
-						74,
-						85,
-						89
-					]
+					'考试': '期中',
+					'语文': 99,
+					'数学': 91,
+					'外语': 82,
+					'体育': 94,
+					'思品': 85,
+					'科学': 100,
+				},
+				{
+					'考试': '五月月考',
+					'语文': 99,
+					'数学': 92,
+					'外语': 97,
+					'体育': 92,
+					'思品': 98,
+					'科学': 88,
+				},
+				{
+					'考试': '六月月考',
+					'语文': 99,
+					'数学': 90,
+					'外语': 92,
+					'体育': 92,
+					'思品': 80,
+					'科学': 90,
+				},
+				{
+					'考试': '期末',
+					'语文': 99,
+					'数学': 85,
+					'外语': 92,
+					'体育': 95,
+					'思品': 91,
+					'科学': 99,
 				}
 			],
-		},
-		lineChartData: {
+			columns: [{
+					'title': '考试',
+					'key': '考试',
+					'width': 220,
+				},
+				{
+					'title': '语文',
+					'key': '语文',
+				},
+				{
+					'title': '数学',
+					'key': '数学',
+				},
+				{
+					'title': '外语',
+					'key': '外语',
+				},
+				{
+					'title': '体育',
+					'key': '体育',
+				},
+				{
+					'title': '思品',
+					'key': '思品',
+				},
+				{
+					'title': '科学',
+					'key': '科学',
+				}
+			],
+			semesterLineChart: {
+				lineComparison: {
 					categories: [
 						"测验1",
 						"测验2",
@@ -90,7 +154,212 @@ export default {
 						}
 					],
 				},
-		columnChartData: {
+				majorComparison: {
+					categories: [
+						"测验1",
+						"测验2",
+						"测验3",
+						"测验4",
+						"测验5",
+					],
+					series: [{
+							"name": "语数外总分",
+							"data": [
+								266,
+								277,
+								258,
+								288,
+								294,
+							]
+						},
+						{
+							"name": "班级平均分",
+							"data": [
+								255,
+								257,
+								260,
+								264,
+								250,
+							]
+						},
+						{
+							"name": "年级平均分",
+							"data": [
+								245,
+								260,
+								252,
+								247,
+								255,
+							]
+						}
+					],
+				},
+				minorComparison: {
+					categories: [
+						"测验1",
+						"测验2",
+						"测验3",
+						"测验4",
+						"测验5",
+					],
+					series: [{
+							"name": "科学体育思品总分",
+							"data": [
+								280,
+								290,
+								280,
+								299,
+								266,
+							]
+						},
+						{
+							"name": "班级平均分",
+							"data": [
+								260,
+								277,
+								255,
+								222,
+								238,
+							]
+						},
+						{
+							"name": "年级平均分",
+							"data": [
+								233,
+								246,
+								268,
+								242,
+								256,
+							]
+						}
+					],
+				},
+			},
+			subjectAreaChart: {
+				areaComparison: {
+					categories: [
+						"测验1",
+						"测验2",
+						"测验3",
+						"测验4",
+						"测验5",
+						"测验6"
+					],
+					series: [{
+							"name": "数学成绩",
+							"data": [
+								90,
+								95,
+								92,
+								100,
+								88,
+								99
+							]
+						},
+						{
+							"name": "班级平均",
+							"data": [
+								85,
+								88,
+								84,
+								92,
+								93,
+								89
+							]
+						},
+						{
+							"name": "年纪平均",
+							"data": [
+								88,
+								79,
+								77,
+								74,
+								85,
+								89
+							]
+						}
+					],
+				},
+				subjectComparison: {
+					categories: [
+						"测验1",
+						"测验2",
+						"测验3",
+						"测验4",
+						"测验5",
+						"测验6"
+					],
+					series: [{
+							"name": "数学",
+							"data": [
+								90,
+								95,
+								92,
+								100,
+								88,
+								99
+							]
+						},
+						{
+							"name": "语文",
+							"data": [
+								95,
+								98,
+								84,
+								92,
+								93,
+								89
+							]
+						},
+						{
+							"name": "英语",
+							"data": [
+								98,
+								89,
+								97,
+								84,
+								95,
+								89
+							]
+						},
+						{
+							"name": "科学",
+							"data": [
+								91,
+								72,
+								92,
+								89,
+								97,
+								92
+							]
+						},
+						{
+							"name": "体育",
+							"data": [
+								95,
+								89,
+								92,
+								87,
+								91,
+								83
+							]
+						},
+						{
+							"name": "思品",
+							"data": [
+								91,
+								82,
+								87,
+								84,
+								90,
+								85
+							]
+						}
+					],
+				},
+			},
+			recentColumnChart: {
+				columnComparison: {
 					categories: [
 						"数学",
 						"语文",
@@ -118,20 +387,283 @@ export default {
 								97,
 								92,
 								89,
-								96
+								93
 							]
 						}
 					],
-				}
+				},
+				radarSubjectComparison: {
+					categories: [
+						"数学",
+						"语文",
+						"英语",
+						"体育",
+						"科学",
+						"思品"
+					],
+					series: [{
+							"name": "孩子",
+							"data": [
+								91,
+								92,
+								94,
+								82,
+								82,
+								89
+							]
+						},
+						{
+							"name": "班平均",
+							"data": [
+								82,
+								83,
+								77,
+								83,
+								91,
+								81
+							]
+						},
+						{
+							"name": "年级平均",
+							"data": [
+								77,
+								78,
+								73,
+								80,
+								86,
+								85
+							]
+						}
+					],
+				},
+			},
+			advantageRoseChart: {
+				recentAnalyse: {
+					series: [{
+						"data": [{
+								"name": "数学",
+								"value": 100
+							},
+							{
+								"name": "语文",
+								"value": 86
+							},
+							{
+								"name": "英语",
+								"value": 100
+							},
+							{
+								"name": "科学",
+								"value": 79
+							},
+							{
+								"name": "体育",
+								"value": 88
+							},
+							{
+								"name": "思品",
+								"value": 95
+							}
+						]
+					}]
+				},
+				semesterAnalyse: {
+					series: [{
+						"data": [{
+								"name": "数学",
+								"value": 95
+							},
+							{
+								"name": "语文",
+								"value": 88
+							},
+							{
+								"name": "英语",
+								"value": 99
+							},
+							{
+								"name": "科学",
+								"value": 80
+							},
+							{
+								"name": "体育",
+								"value": 77
+							},
+							{
+								"name": "思品",
+								"value": 95
+							}
+						]
+					}]
+				},
+			},
+			abilityRadarChart: {
+				importantAnalyse: {
+					categories: [
+						"语文",
+						"数学",
+						"英语",
+						"科学",
+						"体育",
+						"思品"
+					],
+					series: [{
+							"name": "开学考试",
+							"data": [
+								90,
+								89,
+								98,
+								88,
+								95,
+								83
+							]
+						},
+						{
+							"name": "期中考试",
+							"data": [
+								94,
+								89,
+								97,
+								91,
+								95,
+								82
+							]
+						},
+						{
+							"name": "期末考试",
+							"data": [
+								82,
+								90,
+								95,
+								96,
+								90,
+								92
+							]
+						}
+					],
+				},
+				commonAnalyse: {
+					categories: [
+						"语文",
+						"数学",
+						"英语",
+						"科学",
+						"体育",
+						"思品"
+					],
+					series: [{
+							"name": "4月月考",
+							"data": [
+								90,
+								100,
+								77,
+								78,
+								75,
+								95
+							]
+						},
+						{
+							"name": "6月月考",
+							"data": [
+								89,
+								94,
+								75,
+								99,
+								80,
+								92
+							]
+						},
+						{
+							"name": "8月月考",
+							"data": [
+								79,
+								84,
+								94,
+								73,
+								99,
+								87
+							]
+						}
+					],
+				},
+			},
+			rankArcbarChart: {
+				recentAnalyse: {
+					series: [{
+							"name": "超过年级中",
+							"data": 0.8,
+							"color": "#0052d4"
+						},
+						{
+							"name": "超过班级中",
+							"data": 0.92,
+							"color": "#ff5959"
+						}
+					],
+				},
+				semesterAnalyse: {
+					categories: [
+						"测验1",
+						"测验2",
+						"测验3",
+						"测验4",
+						"测验5",
+						"测验6"
+					],
+					series: [{
+							"name": "超过年级中百分之",
+							"data": [
+								90,
+								95,
+								92,
+								100,
+								88,
+								99
+							]
+						},
+						{
+							"name": "超过班级中百分之",
+							"data": [
+								95,
+								98,
+								84,
+								92,
+								93,
+								79
+							]
+						}
+					]
+				},
+			}
+		},
+		//今日页面图表数据
+		todayData: {
+			//评测进度条数据
+			evaluationArcbar: {
+				"series": [{
+					"name": "完成率",
+					"data": 0.84,
+					"color": "#0052d4"
+				}]
+			},
+			homeworkArcbar: {
+				"series": [{
+					"name": "完成率",
+					"data": 1,
+					"color": "#ff5959"
+				}]
+			},
+		},
+
 
 	}),
 	//模块方法(修改数据)
 	mutations: {
-		//更新图表数据
-		updateAreaChartData(state,areaChartData){
-			state.areaChartData = areaChartData
+		// 更新图表数据
+		updateSubjectAreaComparison(state, areaComparison) {
+			state.areaComparison = areaComparison
 		},
-		updateLineChartData(state,lineChartData){
+		updateLineChartData(state, lineChartData) {
 			state.lineChartData = lineChartData
 		}
 

+ 12 - 3
pages.json

@@ -12,14 +12,16 @@
 			"style": {
 				// "navigationBarTitleText": "",
 				"enablePullDownRefresh": false,
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": true
 			}
 
 		}, {
 			"path": "pages/grade/grade",
 			"style": {
 				"enablePullDownRefresh": false,
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": true
 			}
 
 		}, {
@@ -58,7 +60,14 @@
 					"disableScroll": true
 				}
 			}, {
-				"path": "children/children",
+				"path": "childrenInfo/childrenInfo",
+				"style": {
+					"navigationBarTitleText": "",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "MyMsg/MyMsg",
 				"style": {
 					"navigationBarTitleText": "",
 					"enablePullDownRefresh": false

+ 32 - 112
pages/grade/grade.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="chart-list-container">
 		<!-- 头部区域 -->
-		<top-box></top-box>
+		<top-box v-bind:timeStamp="timeStamp"></top-box>
 
 		<!-- 缩略图区域 -->
 		<view class="mini-chart-list">
@@ -51,13 +51,7 @@
 					</view>
 				</view>
 			</view>
-			<!-- <view class="mini-chart-item" @click="navMainRadarChart">
-				<radar-mini-chart></radar-mini-chart>
-			</view>
 
-			<view class="mini-chart-item" @click="navBarChart">
-				<bar-mini-chart></bar-mini-chart>
-			</view> -->
 		</view>
 		<!-- 成绩表单 -->
 		<view class="table-card">
@@ -65,7 +59,8 @@
 				<view class="t-icon t-icon-xtubiao-5"></view>
 				<text class="table-name-text">成绩概览</text>
 			</view>
-			<z-table class="table" :tableData="tableData" :columns="columns" stickSide="true" showBottomSum="true"></z-table>
+			<z-table class="table" :tableData="gradeData.tableData" :columns="gradeData.columns" stickSide="true">
+			</z-table>
 		</view>
 	</view>
 </template>
@@ -74,110 +69,19 @@
 	import {
 		mapState
 	} from 'vuex'
-	
+
 	export default {
-		computed:{
-			...mapState('m_children',['childreninfo','semester'])
+		computed: {
+			...mapState('m_children', ['childreninfo', 'semester']),
+			...mapState('m_chart', ['gradeData'])
 		},
 		data() {
 			return {
-				tableData: [
-				{
-					'科目':'数学',
-					'开学':83,
-					'期中':95,
-					'期末':96,
-					'毕业':96,
-					'升学':96
-				},
-				{
-					'科目':'语文',
-					'开学':93,
-					'期中':90,
-					'期末':96,
-					'毕业':96,
-					'升学':96
-				},
-				{
-					'科目':'英语',
-					'开学':99,
-					'期中':82,
-					'期末':96,
-					'毕业':96,
-					'升学':96
-				},
-				{
-					'科目':'体育',
-					'开学':99,
-					'期中':97,
-					'期末':96,
-					'毕业':96,
-					'升学':96
-				},
-				{
-					'科目':'科学',
-					'开学':99,
-					'期中':92,
-					'期末':96,
-					'毕业':96,
-					'升学':96
-				},
-				{
-					'科目':'思品',
-					'开学':99,
-					'期中':94,
-					'期末':96,
-					'毕业':96,
-					'升学':96
-				}
-				],
-				columns: [
-					{
-						'title':'科目',
-						'key':'科目',
-					},
-					{
-						'title':'开学',
-						'key':'开学',
-					},
-					{
-						'title':'期中',
-						'key':'期中',
-					},
-					{
-						'title':'期末',
-						'key':'期末',
-					},
-					{
-						'title':'毕业',
-						'key':'毕业',
-					},
-					{
-						'title':'升学',
-						'key':'升学',
-					}
-				],
-				//查询参数
-				queryObj: {},
-				
-				
+				//时间戳
+				timeStamp: '',
 			}
 		},
 		methods: {
-			
-			//获取表格数据
-			// async getTableData(){
-			// 	this.queryObj = {
-			// 		query: 'tableData',
-			// 		tmdid: this.childreninfo.tmdid,
-			// 		semester: this.semester
-			// 	}
-			// 	const {data:res} = await uni.$http.get('',this.queryObj)
-			// 	if(res.meta.status !== 200) return uni.$showMsg()
-			// 	this.tableData = [...res.test]
-			// 	this.columns = [...res.column]
-			// },
-			
 			//导航柱状图页面
 			navColumnChart(e) {
 				console.log(e);
@@ -220,10 +124,23 @@
 					url: "/gradepkg/arcbar-chart/arcbar-chart"
 				})
 			},
-
+			//更新时间戳
+			getTimeStamp() {
+				var date = new Date(),
+					hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
+					minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
+				this.timeStamp = (hour + ':' + minute).toString();
+			}
 		},
 		onLoad() {
-			// this.getTableData()
+			this.getTimeStamp()
+		},
+		onPullDownRefresh() {
+			this.getTimeStamp()
+			console.log('refresh');
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
 		}
 	}
 </script>
@@ -285,7 +202,8 @@
 				}
 			}
 		}
-		.table-card{
+
+		.table-card {
 			margin: 20rpx 22rpx;
 			border-radius: 16rpx;
 			display: flex;
@@ -293,9 +211,9 @@
 			justify-content: center;
 			flex-direction: column;
 			background-color: #FFFFFF;
-			box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.05);
-			
-			.table-name{
+			box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
+
+			.table-name {
 				width: 100%;
 				text-align: left;
 				margin: 20rpx 0 0 50rpx;
@@ -303,12 +221,14 @@
 				align-items: center;
 				font-weight: bold;
 				color: #3B4144;
+
 				.table-name-text {
 					font-size: 30rpx;
 					margin-left: 20rpx;
 				}
 			}
-			.table{
+
+			.table {
 				margin: 20rpx;
 				width: 90%;
 			}

+ 110 - 79
pages/home/home.vue

@@ -1,8 +1,7 @@
 <template>
 	<view class="home-container">
-		<view class="bg1"></view>
 		<!-- 头部区域 -->
-		<top-box></top-box>
+		<top-box v-bind:timeStamp="timeStamp"></top-box>
 		<!-- 滚动条 -->
 		<view class="notice">
 			<u-notice-bar :text="notification" mode="closable" bgColor="#6495ED" color="#FFFFFF"></u-notice-bar>
@@ -10,79 +9,105 @@
 		<!-- 卡片区域 -->
 		<view class="card-box">
 
+			<!-- 今日打卡 -->
+			<view class="card-item" style="width: 100%;">
+				<view class="card-info">
+					<view class="t-icon t-icon-xueshengdaka"></view>
+					<text class="info-text">今日打卡情况(今日迟到情况)</text>
+				</view>
+				<!-- 内容 -->
+				<view class="calendar_container">
+					<zsyCalendar :sundayIndex="6" @change="change" :mode="'close'" />
+				</view>
+			</view>
+
 			<view class="card-item">
 				<view class="card-info">
 					<view class="t-icon t-icon-chengjiguanli"></view>
-					<text class="info-text">今日活动</text>
+					<text class="info-text">今日评测</text>
 				</view>
 				<view class="charts-box">
-					<qiun-data-charts type="home-arcbar" :chartData="arcbarChartData" :loadingType="4"
-						:opts="arcbaropts" />
+					<qiun-data-charts type="home-arcbar" :chartData="todayData.evaluationArcbar" :loadingType="4"
+						:canvas2d='true' canvasId='canvans931' :opts="evaluationOpts" />
 				</view>
 			</view>
 
 			<view class="card-item">
 				<view class="card-info">
 					<view class="t-icon t-icon-xuexiaobaobei"></view>
-					<text class="info-text">今日自主学习</text>
+					<text class="info-text">今日作业</text>
+				</view>
+				<view class="charts-box">
+					<qiun-data-charts type="home-arcbar" :chartData="todayData.homeworkArcbar" :loadingType="4"
+						:canvas2d='true' canvasId='canvans932' :opts="homeworkOpts" />
 				</view>
 			</view>
 
 			<!-- 今日课程 -->
 			<view class="card-item">
 				<view class="card-info">
-					<view class="t-icon t-icon-chengchangdangan"></view>
+					<view class="t-icon t-icon-jiaowuxunke"></view>
 					<text class="info-text">今日课程</text>
 				</view>
 				<!-- 内容 -->
 				<view style="display: flex; align-items: center;">
-					<view style="color: #3B4144;margin-left: 30rpx;font-size: 30rpx;font-weight: bold;">课程数:</view>
+					<view style="color: #3B4144;margin-left: 30rpx;font-size: 30rpx;font-weight: bold;">个人课程数:</view>
 					<view class="card-content">{{classNum}}</view>
 				</view>
 				<view class="u-page__item">
 					<u-collapse accordion :border="false">
 						<u-collapse-item title="孩子今日课程:">
 							<view style="display: flex; flex-wrap: wrap;">
-								<text class="u-collapse-content" v-for="(item,index) in classList"
-									:key="index">&nbsp;{{item}}||</text>
+								<u-tag v-for="(item,index) in classList"
+									:key="index" :text="item" plain shape="circle" size="mini"></u-tag>
 							</view>
 						</u-collapse-item>
 						<u-collapse-item title="今日授课老师:">
 							<view style="display: flex; flex-wrap: wrap;">
-								<text class="u-collapse-content" v-for="(item,index) in teacherList"
-									:key="index">{{item}}||</text>
+								<u-tag v-for="(item,index) in teacherList"
+									:key="index":text="item" plain shape="circle" size="mini"></u-tag>
 							</view>
 						</u-collapse-item>
 					</u-collapse>
 				</view>
 			</view>
 
+			<!-- 今日问卷 -->
 			<view class="card-item">
 				<view class="card-info">
-					<view class="t-icon t-icon-jiankangshangbao"></view>
-					<text class="info-text">睡眠时间</text>
+					<view class="t-icon t-icon-qingjiatiaoke"></view>
+					<text class="info-text">今日活动</text>
 				</view>
-			</view>
-			
-			<!-- 今日打卡 -->
-			<view class="card-item" style="width: 100%;">
-				<view class="card-info">
-					<view class="t-icon t-icon-jiaoshidianming"></view>
-					<text class="info-text">今日打卡情况(今日迟到情况)</text>
+				<!-- 内容 -->
+				<view style="display: flex; align-items: center;">
+					<view style="color: #3B4144;margin-left: 30rpx;font-size: 30rpx;font-weight: bold;">问卷完成率:</view>
+					<view class="card-content">{{questionnaire}}%</view>
+				</view>
+				<view style="padding: 0rpx 10rpx 10rpx 10rpx;">
+					<u-line-progress :showText="false" :percentage="questionnaire" activeColor="#6495ed" height="15">
+					</u-line-progress>
 				</view>
 				<!-- 内容 -->
-				<view class="calendar_container">
-				    <zsyCalendar :sundayIndex="6" @change="change" :mode="'close'"/>
+				<view style="display: flex; align-items: center;">
+					<view style="color: #3B4144;margin-left: 30rpx;font-size: 30rpx;font-weight: bold;">投票完成率:</view>
+					<view class="card-content">{{vote}}%</view>
 				</view>
+				<view style="padding: 0rpx 10rpx 10rpx 10rpx;">
+					<u-line-progress :showText="false" :percentage="vote" activeColor="#fd7193" height="15">
+					</u-line-progress>
+				</view>
+
 			</view>
-			
+
+
+
 			<view class="card-item">
 				<view class="card-info">
-					<view class="t-icon t-icon-jiankangshangbao"></view>
-					<text class="info-text">今日睡眠时间</text>
+					<view class="t-icon t-icon-jiaoshidaka"></view>
+					<text class="info-text">今日自主学习</text>
 				</view>
 			</view>
-			
+
 			<view class="card-item">
 				<view class="card-info">
 					<view class="t-icon t-icon-jiankangshangbao"></view>
@@ -96,13 +121,19 @@
 </template>
 
 <script>
-	import {mapState} from 'vuex'
+	import {
+		mapState
+	} from 'vuex'
 	//日历组件
 	import zsyCalendar from '@/components/zsy-calendar/zsy-calendar'
 	export default {
 		name: 'Calendar',
+		computed: {
+			...mapState('m_chart', ['todayData']),
+			...mapState('m_children', ['childreninfo'])
+		},
 		components: {
-		    zsyCalendar
+			zsyCalendar
 		},
 		data() {
 			return {
@@ -113,44 +144,67 @@
 				classList: ['数学', '语文', '英语', '体育', '思品'],
 				//授课老师
 				teacherList: ['张老师', '李老师', '王老师', '陈老师', '黄老师'],
-				//圆环进度条数据
-				arcbarChartData: {
-					"series": [{
-						"name": "完成率",
-						"data": 0.83,
-						"color": "#0052d4"
-					}]
-				},
-				//圆环进度条属性
-				arcbaropts: {},
 
+				//评测进度条属性
+				evaluationOpts: {},
+				//作业进度条属性
+				homeworkOpts: {},
+				//时间戳
+				timeStamp: '',
+				//问卷完成率
+				questionnaire: 50,
+				//投票完成率
+				vote: 100,
 			}
 		},
-
-		computed: {
-			...mapState('m_children', ['childreninfo'])
-		},
 		onLoad() {
 			this.setOpts()
+			this.getTimeStamp()
+		},
+		onPullDownRefresh() {
+			this.setOpts()
+			this.getTimeStamp()
+			console.log('refresh')
+			setTimeout(function() {
+				uni.stopPullDownRefresh()
+			}, 1000);
 		},
 		methods: {
 			//设置更新
 			setOpts() {
 				//圆环图标题和副标题动态变化
-				let tmpopts = {
+				let evaluation = {
+					title: {
+						name: this.todayData.evaluationArcbar.series[0].data * 100 + "%",
+						color: this.todayData.evaluationArcbar.series[0].color
+					},
+					subtitle: {
+						name: this.todayData.evaluationArcbar.series[0].name
+					}
+				}
+				let homework = {
 					title: {
-						name: this.arcbarChartData.series[0].data * 100 + "%"
+						name: this.todayData.homeworkArcbar.series[0].data * 100 + "%",
+						color: this.todayData.homeworkArcbar.series[0].color
 					},
 					subtitle: {
-						name: this.arcbarChartData.series[0].name
+						name: this.todayData.homeworkArcbar.series[0].name
 					}
 				}
-				this.arcbaropts = tmpopts;
+				this.evaluationOpts = evaluation;
+				this.homeworkOpts = homework;
 			},
 			// 日历选中日期改变事件回调
-			 change(e) {
-			     console.log(e)
-			 }
+			change(e) {
+				console.log(e)
+			},
+			//更新时间戳
+			getTimeStamp() {
+				var date = new Date(),
+					hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
+					minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
+				this.timeStamp = (hour + ':' + minute).toString();
+			}
 
 		},
 	}
@@ -196,7 +250,7 @@
 				}
 
 				.card-content {
-					font-size: 50rpx;
+					font-size: 35rpx;
 					margin: 10rpx 0 10rpx 25rpx;
 					color: #3B4144;
 					font-weight: bold;
@@ -208,7 +262,7 @@
 	.charts-box {
 		width: 100%;
 		height: 300rpx;
-		padding: 5rpx 5rpx 10rpx 5rpx;
+		padding-bottom: 10rpx;
 	}
 
 	.t-icon {
@@ -216,34 +270,11 @@
 		height: 40rpx;
 	}
 
-	//折叠面板
-	.u-page {
-		padding: 0;
-
-		&__item {
-
-			&__title {
-				padding: 1px;
-				font-size: 1px;
-
-				&__slot-title {
-					color: $u-primary;
-					font-size: 13px;
-				}
-			}
-		}
-	}
-
-	.u-collapse-content {
-		color: $u-tips-color;
-		font-size: 14px;
-	}
 	//日历
 	.calendar_container {
-	    background-color: #FFFFFF;
-	    padding: 10rpx;
-			margin: 10rpx;
-	    box-sizing: border-box;
+		background-color: #FFFFFF;
+		padding: 10rpx;
+		margin: 10rpx;
+		box-sizing: border-box;
 	}
-
 </style>

+ 10 - 12
pages/my/my.vue

@@ -25,7 +25,7 @@
 							</view>
 						</view>
 					</view>
-					<view class="box-cart-item right-box" @click="getChildrenMsg">
+					<view class="box-cart-item right-box" @click="childrenInfo">
 						<view class="t-icon t-icon-a-jiangpaijiangzhang" ></view>
 						<view class="card-text">
 							孩子名片
@@ -46,7 +46,7 @@
 							</view>
 							<u-icon name="arrow-right" color="#bababa" size="16"></u-icon>
 						</view>
-						<view class="cell">
+						<view class="cell" @click="MyMsg">
 							<view class="cell-left">
 								<view class="t-icon t-icon-a-liaotianpingluntaolunduihua" ></view>
 								<view class="cell-text">我的消息</view>
@@ -113,12 +113,6 @@
 		methods: {
 			...mapMutations('m_parent',['updateParentDetail','updateParentInfo','updateToken']),
 			...mapMutations('m_children',['updateChildrenInfo','updateChildrenSemester']),
-			//日历事件
-			// confirm(e){
-			// 	console.log('confirm',e)
-			// 	uni.$showMsg('打卡成功!')
-			// 	this.show = false
-			// },
 			//退出登录事件
 			async logout(){
 				const [err,succ] = await uni.showModal({
@@ -147,13 +141,17 @@
 				})
 			},
 			//孩子名片
-			getChildrenMsg(){
+			childrenInfo(){
 				uni.navigateTo({
-					url: '/subpkg/children/children'
+					url: '/subpkg/childrenInfo/childrenInfo'
+				})
+			},
+			//我的消息
+			MyMsg(){
+				uni.navigateTo({
+					url: '/subpkg/MyMsg/MyMsg'
 				})
 			}
-			
-
 
 		}
 	}

+ 30 - 0
subpkg/MyMsg/MyMsg.vue

@@ -0,0 +1,30 @@
+<template>
+	<view class="u-demo-block">
+		<view class="u-demo-block-content">
+			<view class="u-alert-item" v-for="(item,index) in msgList" :key="index">
+				<u-alert :description="item" type="success" closable @click="deleteMsg(index)"></u-alert>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				msgList: ['1111','22222','333']
+			};
+		},
+		methods:{
+			deleteMsg(index){
+				this.msgList.splice(index,null)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.u-alert-item{
+	margin: 20rpx;
+}
+</style>

subpkg/children/children.vue → subpkg/childrenInfo/childrenInfo.vue


+ 3 - 2
uni_modules/uview-ui/components/u-alert/u-alert.vue

@@ -116,11 +116,12 @@
 		methods: {
 			// 点击内容
 			clickHandler() {
-				this.$emit('click')
+				// this.$emit('click')
 			},
 			// 点击关闭按钮
 			closeHandler() {
-				this.show = false
+				this.show = false
+				this.$emit('click')
 			}
 		}
 	}

+ 3 - 3
uni_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue

@@ -215,11 +215,11 @@
 			height: 0;
 
 			&__text {
-				padding: 12px 15px;
+				padding: 0rpx 20rpx 10rpx 25rpx;
 				color: $u-content-color;
 				font-weight: 600;
-				font-size: 13px;
-				line-height: 18px;
+				font-size: 26rpx;
+				line-height: 36rpx;
 			}
 		}
 	}

+ 50 - 0
utils/DataUtils.js

@@ -0,0 +1,50 @@
+const grade = {
+	开学: {
+		'语文': 83,
+		'数学': 95,
+		'外语': 95,
+		'体育': 92,
+		'思品': 88,
+		'科学': 90,
+	},
+	四月月考: {
+		'语文': 93,
+		'数学': 92,
+		'外语': 90,
+		'体育': 82,
+		'思品': 90,
+		'科学': 99,
+	},
+	期中: {
+		'语文': 99,
+		'数学': 91,
+		'外语': 82,
+		'体育': 94,
+		'思品': 85,
+		'科学': 100,
+	},
+	五月月考: {
+		'语文': 99,
+		'数学': 92,
+		'外语': 97,
+		'体育': 92,
+		'思品': 98,
+		'科学': 88,
+	},
+	六月月考: {
+		'语文': 99,
+		'数学': 90,
+		'外语': 92,
+		'体育': 92,
+		'思品': 80,
+		'科学': 90,
+	},
+	期末: {
+		'语文': 99,
+		'数学': 85,
+		'外语': 92,
+		'体育': 95,
+		'思品': 91,
+		'科学': 99,
+	}
+}