Kaynağa Gözat

update:初步完成修改

KELECHUAN 3 yıl önce
ebeveyn
işleme
30f684c24a

+ 1 - 1
.vs/VSWorkspaceState.json

@@ -2,6 +2,6 @@
   "ExpandedNodes": [
     ""
   ],
-  "SelectedNode": "\\store",
+  "SelectedNode": "\\common",
   "PreviewInSolutionExplorer": false
 }

BIN
.vs/miniprogram/v17/.suo


BIN
.vs/slnx.sqlite


+ 1 - 2
components/interactive-box/interactive-box.vue

@@ -295,7 +295,6 @@
 					let num = parseFloat(((this.historyData.exercise[i] / this.historyData.sleep[i]) * 100).toFixed(1))
 					tempArr.push(num)
 				}
-				console.log(tempArr);
 				exerciseSleepArea.series[0].data = tempArr
 				this.exerciseSleepArea = exerciseSleepArea
 			}
@@ -306,7 +305,7 @@
 
 <style lang="scss">
 	.module-container {
-		margin: -70rpx 20rpx 0 20rpx;
+		margin: -25rpx 20rpx 0 20rpx;
 	}
 
 	.module-box {

+ 493 - 0
components/task-box/task-box.vue

@@ -0,0 +1,493 @@
+<template>
+	<view class="module-container">
+		<!-- 评测 -->
+		<view class="card" style="background-color:#4169e1" v-if="current == 0">
+			<view class="box">
+				<view class="flex">
+					<text class="card-title">今日评测:</text>
+					<view class="flex-line">
+						<text class="card-title" style="margin-left: 20rpx;">{{testData.length}}</text>
+						<text class="unit">例</text>
+					</view>
+				</view>
+				<view class="box" style="margin: 10rpx 0 0 0;">
+					<view class="flex">
+						<view class="tag"></view>
+						<text class="card-subtitle">已完成:</text>
+						<view class="flex-line">
+							<text class="fin-number">{{testFinish}}</text>
+							<text class="unit">例</text>
+						</view>
+					</view>
+					<view class="flex">
+						<view class="tag"></view>
+						<text class="card-subtitle">完成情况:</text>
+						<text class="card-subtitle" style="font-weight: bold;opacity: 0.8;">{{list[0].level}}</text>
+					</view>
+				</view>
+			</view>
+			<view class="image" :style="{backgroundImage:`url(${list[0].image})`}"></view>
+		</view>
+		<!-- 作业 -->
+		<view class="card" style="background-color:#ff8caf" v-if="current == 1">
+			<view class="box">
+				<view class="flex">
+					<text class="card-title">今日作业:</text>
+					<view class="flex-line">
+						<text class="card-title" style="margin-left: 20rpx;">{{homeworkData.length}}</text>
+						<text class="unit">例</text>
+					</view>
+				</view>
+				<view class="box" style="margin: 10rpx 0 0 0;">
+					<view class="flex">
+						<view class="tag"></view>
+						<text class="card-subtitle">已完成:</text>
+						<view class="flex-line">
+							<text class="fin-number">{{homeworkFinish}}</text>
+							<text class="unit">例</text>
+						</view>
+					</view>
+					<view class="flex">
+						<view class="tag"></view>
+						<text class="card-subtitle">完成情况:</text>
+						<text class="card-subtitle" style="font-weight: bold;opacity: 0.8;">{{list[1].level}}</text>
+					</view>
+				</view>
+			</view>
+			<view class="image" :style="{backgroundImage:`url(${list[1].image})`}"></view>
+		</view>
+		<!-- 活动 -->
+		<view class="card" style="background-color:#f9c752" v-if="current == 2">
+			<view class="box">
+				<view class="flex">
+					<text class="card-title">今日活动:</text>
+					<view class="flex-line">
+						<text class="card-title" style="margin-left: 20rpx;">{{activityData.length}}</text>
+						<text class="unit">例</text>
+					</view>
+				</view>
+				<view class="box" style="margin: 10rpx 0 0 0;">
+					<view class="flex">
+						<view class="tag"></view>
+						<text class="card-subtitle">已完成:</text>
+						<view class="flex-line">
+							<text class="fin-number">{{activityFinish}}</text>
+							<text class="unit">例</text>
+						</view>
+					</view>
+					<view class="flex">
+						<view class="tag"></view>
+						<text class="card-subtitle">完成情况:</text>
+						<text class="card-subtitle" style="font-weight: bold;opacity: 0.8;">{{list[2].level}}</text>
+					</view>
+				</view>
+			</view>
+			<view class="image" :style="{backgroundImage:`url(${list[2].image})`}"></view>
+		</view>
+		<!-- 插槽传入内容 -->
+		<slot name="center-slot"></slot>
+		<!-- 列表 -->
+		<view class="detail-box">
+			<!-- 图表模块 -->
+			<view class="detail-box-item" v-if="current == 1">
+				<view class="item-info">
+					<view class="t-icon t-icon-ceping"></view>
+					<view class="item-text">完成率统计</view>
+				</view>
+				<view class="charts-box">
+					<qiun-data-charts type="mount" :chartData="taskData" :loadingType="4"
+						:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0933511'/>
+				</view>
+			</view>
+			<!-- 详情列表 -->
+			<!-- 评测 -->
+			<view class="detail-box-item" v-if="current == 0" @click="navListData">
+				<view class="item-info">
+					<view class="t-icon t-icon-daiban"></view>
+					<view class="item-text">评测列表</view>
+				</view>
+				<view style="margin-bottom: 20rpx;">
+					<view class="block-box" v-for="(item,i) in testData" :key="i">
+						<view class="tag-index" style="background-image: linear-gradient(#4169E1, #FFF);">
+						</view>
+						<view class="class-block" style="width: 85%;">
+							<view style="width: 40%;">
+								<view class="list-item-title">{{item.examInfo.name}}</view>
+							</view>
+
+							<view style=" display: flex; justify-content: space-between; width: 50%;">
+								<view class="block-tag-box">
+									<view class="block-tag">
+										{{item.examInfo.subjects[0].name}}
+									</view>
+								</view>
+								<view class="block-tag-box">
+									<view class="block-tag">
+										{{item.examInfo.examType.name}}
+									</view>
+								</view>
+								<view class="block-tag-box"
+									:style="{borderColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
+									<view class="block-tag"
+										:style="{color: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
+										{{item.examInfo.progress === 'finish' ? '已完成' : '进行中'}}
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 作业 -->
+			<view class="detail-box-item" v-if="current == 1" @click="navListData">
+				<view class="item-info">
+					<view class="t-icon t-icon-daiban"></view>
+					<view class="item-text">作业列表</view>
+				</view>
+				<view style="margin-bottom: 20rpx;">
+					<view class="block-box" v-for="(item,i) in homeworkData" :key="i">
+						<view class="tag-index" style="background-image: linear-gradient(#ff8caf, #FFF);">
+						</view>
+						<view class="class-block" style="width: 85%;justify-content: flex-start;">
+							<view style="display: flex; flex-direction: column;">
+
+								<view style="display: flex;margin-left: 30rpx;align-items: center;">
+									<view class="list-item-title">{{item.work.name}}</view>
+									<view class="block-tag-box"
+										:style="{marginLeft: 40+'rpx',borderColor:'#ff8caf'}">
+										<view class="block-tag"
+											:style="{color:'#ff8caf'}">
+											{{item.work.scope === 'private' ? '个人':'学校'}}作业
+										</view>
+									</view>
+									<view class="block-tag-box"
+										:style="{marginLeft: 20+'rpx',borderColor: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
+										<view class="block-tag"
+											:style="{color: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
+											{{item.work.progress === 'finish' ? '已完成' : '进行中'}}
+										</view>
+									</view>
+								</view>
+								<rich-text class="block-subtitle" style="margin:10rpx 0 0 30rpx;"
+									:nodes="item.work.description"></rich-text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- 活动 -->
+			<view class="detail-box-item" v-if="current == 2" @click="navListData">
+				<view class="item-info">
+					<view class="t-icon t-icon-daiban"></view>
+					<view class="item-text">活动列表</view>
+				</view>
+				<view style="margin-bottom: 20rpx;">
+					<view class="block-box" v-for="(item,i) in activityData" :key="i">
+						<view class="tag-index" style="background-image: linear-gradient(#f9c752, #FFF);">
+						</view>
+						<view class="class-block" style="width: 85%;justify-content: flex-start;">
+							<view style="display: flex; flex-direction: column;">
+								<view style="display: flex;margin-left: 30rpx;align-items: center;">
+									<view class="list-item-title">
+										{{item.survey.name || item.vote.name}}
+									</view>
+
+									<view class="block-tag-box"
+										:style="{ marginLeft: 40+'rpx',borderColor:'#f9c752'}">
+										<view class="block-tag"
+											:style="{color:'#f9c752'}">
+											{{item.survey.scope === 'private' ? '个人':'学校' || item.vote.scope === 'private' ? '个人':'学校'}}活动
+										</view>
+									</view>
+									<view class="block-tag-box"
+										:style="{ marginLeft: 20+'rpx',borderColor: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
+										<view class="block-tag"
+											:style="{color: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
+											{{item.survey.progress === 'finish' || item.vote.progress === 'finish' ? '已完成' : '进行中'}}
+										</view>
+									</view>
+								</view>
+
+								<rich-text class="block-subtitle" style="margin:10rpx 0 0 30rpx;"
+									:nodes="item.vote.description || item.survey.description"></rich-text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 插槽传入内容 -->
+		<slot name="end-slot"></slot>
+	</view>
+
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
+	export default {
+		name: "task-box",
+		computed: {
+			//单独作业图表数据
+			...mapState('m_chart', ['taskData']),
+		},
+		props: {
+			//当前模块
+			current: {
+				type: Number,
+				default () {
+					return 1
+				}
+			},
+		},
+		data() {
+			return {
+				//模块名
+				list: [{
+					name: '评测详情',
+					level: '',
+					image: 'https://ouch-cdn2.icons8.com/yFl5NWU3aVehLBlQf9ctvnZPqtm5U0hqM3IzWvFDCaQ/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNzY5/LzY1ZTQxZmZjLTg1/YWQtNDYyMi1hYzU0/LWQ3NDEzZmY2NGI1/YS5wbmc.png',
+				}, {
+					name: '作业详情',
+					level: '',
+					image: 'https://ouch-cdn2.icons8.com/AVOwJ9emg_ZOeHvQaunQAZlgeLsG-b1cGhiYvgoJ06g/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNTAw/LzI5YjU1YWQ4LWMw/YTEtNDE1MS1iYmQw/LWIyMDdhYmRkOTE0/Mi5wbmc.png',
+				}, {
+					name: '活动详情',
+					level: '',
+					image: 'https://ouch-cdn2.icons8.com/LW70TMgW1cGfYeGNSTEp7__kiKVgIhwdZwUmykdLYMY/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvOTI0/LzU3MWU4ZDZkLTg0/NzEtNGM5YS04MDJk/LTEzNTM5YmZmZTM2/YS5wbmc.png',
+				}],
+				//页面数据内容
+				testData: {},
+				homeworkData: {},
+				activityData: {},
+				//完成内容
+				testFinish: '',
+				homeworkFinish: '',
+				activityFinish: '',
+				//作业完成率记录
+				historyHomeworkChart: [80,60,66,79,55,20,40]
+			};
+		},
+		created(options) {
+			this.init()
+		},
+		methods: {
+			...mapMutations('m_chart', ['updateHomeworkFinChart']),
+			...mapMutations('m_children', ['updateDetailList', 'updateDetail']),
+			//初始化页面
+			init() {
+				this.$initHomework()
+				this.getLevel()
+				this.saveToStudyChart()
+			},
+			//获得评判信息
+			getLevel() {
+				this.list[0].level = this.testFinish / this.testData.length >= 0.4 ?
+					(this.testFinish / this.testData.length >= 0.7 ? '优秀' : '良好') : '较差'
+				this.list[1].level = this.homeworkFinish / this.homeworkData.length >= 0.4 ?
+					(this.homeworkFinish / this.homeworkData.length >= 0.7 ? '优秀' : '良好') : '较差'
+				this.list[2].level = this.activityFinish / this.activityData.length >= 0.4 ?
+					(this.activityFinish / this.activityData.length >= 0.7 ? '优秀' : '良好') : '较差'
+			},
+			//记录完成率到图表
+			saveToStudyChart(){
+				this.historyHomeworkChart.push(parseInt(this.homeworkFinish * 100 / this.homeworkData.length))
+				if(this.historyHomeworkChart.length>7)
+				this.historyHomeworkChart.shift()
+				let temp = {
+					series: [{
+						data: []
+					}]
+				}
+				let dateArray = this.$getRecentDateArray(this.historyHomeworkChart.length)
+				for (let i = 0 ;i<this.historyHomeworkChart.length; i++) {
+					let item = {
+						name: dateArray[i],
+						value: this.historyHomeworkChart[i]
+					}
+					temp.series[0].data.push(item)
+				}
+				this.updateHomeworkFinChart(temp)
+			},
+			//导航到详情页面
+			navListData() {
+				if (this.current === 0) {
+					this.updateDetailList(this.testData)
+					uni.navigateTo({
+						url: `/subpkg/detaillist/examlist`
+					})
+				}
+				if (this.current === 1) {
+					this.updateDetailList(this.homeworkData)
+					uni.navigateTo({
+						url: `/subpkg/detaillist/homeworklist`
+					})
+				}
+				if (this.current === 2) {
+					this.updateDetailList(this.activityData)
+					uni.navigateTo({
+						url: `/subpkg/detaillist/activitylist`
+					})
+				}
+			},
+			//导航到单条数据页面
+			navSingleData(item) {
+				if (this.current === 0) {
+					this.updateDetail(item)
+					console.log(item);
+					uni.navigateTo({
+						url: `/subpkg/detail/exam`
+					})
+				}
+				if (this.current === 1) {
+					this.updateDetail(item)
+					console.log(item);
+					uni.navigateTo({
+						url: `/subpkg/detail/homework`
+					})
+				}
+				if (this.current === 2) {
+					this.updateDetail(item)
+					console.log(item);
+					uni.navigateTo({
+						url: `/subpkg/detail/activity`
+					})
+				}
+			}
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	@import '@/pages/common/blockmsg.scss';
+
+	.list-item-title {
+		font-size: 30rpx;
+		font-weight: bold;
+		color: $color-title;
+	}
+
+	//模块
+	.module-container {
+		margin-top: -70rpx;
+
+		//头部卡片
+		.card {
+			display: flex;
+			justify-content: space-around;
+			margin: 20rpx auto 20rpx auto;
+			height: 220rpx;
+			width: 710rpx;
+			// background: linear-gradient(to right, #ff95007a,#ff8419);
+			border-radius: $card-border-radius;
+
+			.card-title {
+				font-size: 50rpx;
+				font-weight: bold;
+				color: #FFF;
+			}
+
+			.card-subtitle {
+				margin-left: 20rpx;
+				font-size: 30rpx;
+				color: #FFF;
+			}
+
+			.unit {
+				margin-left: 10rpx;
+				font-size: 30rpx;
+				opacity: 0.8;
+				color: #FFF;
+			}
+
+			.fin-number {
+				margin-left: 20rpx;
+				font-size: 36rpx;
+				font-weight: bold;
+				color: #FFF;
+			}
+
+			.image {
+				position: relative;
+				top: -80rpx;
+				right: -40rpx;
+				height: 300rpx;
+				width: 300rpx;
+				background-size: 100%;
+				background-repeat: no-repeat;
+				z-index: 2;
+			}
+		}
+
+		//头部卡片
+		.box {
+			display: flex;
+			flex-direction: column;
+			justify-content: space-around;
+			margin: 25rpx 0;
+		}
+
+		//列表block
+		.detail-box {
+			display: flex;
+			flex-flow: row wrap;
+			margin: 30rpx 20rpx 0 20rpx;
+			justify-content: space-between;
+
+			.detail-box-item {
+				margin: 0 0 4% 0;
+				width: 100%;
+				height: auto;
+				background-color: #FFF;
+				border-radius: $card-border-radius;
+
+				.item-info {
+					display: flex;
+					align-items: center;
+					padding: 20rpx;
+
+					.t-icon {
+						width: 40rpx;
+						height: 40rpx;
+					}
+
+					.item-text {
+						font-size: 30rpx;
+						font-weight: bold;
+						color: $color-title;
+						margin-left: 15rpx;
+					}
+				}
+			}
+		}
+	}
+
+	.tag {
+		background-color: #FFF;
+		height: 30rpx;
+		width: 10rpx;
+		border-radius: 100rpx;
+		margin-left: 10rpx;
+		opacity: 0.8;
+	}
+
+	//图表
+	.charts-box {
+		width: 100%;
+		height: 300rpx;
+	}
+
+	.flex {
+		display: flex;
+		align-items: center;
+		margin-left: 20rpx;
+	}
+
+	.flex-line {
+		display: flex;
+		align-items: baseline;
+	}
+</style>

+ 15 - 6
components/todayclass-box/todayclass-box.vue

@@ -17,7 +17,6 @@
 						<view class="t-icon t-icon-fenlei" style="width: 40rpx;height: 40rpx;"></view>
 						<view style="font-size: 30rpx;color: #4169E1;margin-left: 10rpx;">课程列表</view>
 					</view>
-
 				</view>
 			</view>
 			<!-- 课程列表 -->
@@ -31,7 +30,8 @@
 					<view class="block-subtitle">更早</view>
 					<view class="block-title">{{classList[classCurrent-3].time}}</view>
 					<view class="btn" @click="navVideoBefore(classCurrent-3)">
-						<view class="t-icon t-icon-bofang3"></view>
+						<!-- <view class="t-icon t-icon-bofang3"></view> -->
+						<view class="btn-text">已出勤</view>
 					</view>
 				</view>
 				<!-- 上节 -->
@@ -43,7 +43,8 @@
 					<view class="block-subtitle">上节</view>
 					<view class="block-title">{{classList[classCurrent-2].time}}</view>
 					<view class="btn" @click="navVideoBefore(classCurrent-2)">
-						<view class="t-icon t-icon-bofang3"></view>
+						<!-- <view class="t-icon t-icon-bofang3"></view> -->
+						<view class="btn-text">已出勤</view>
 					</view>
 				</view>
 				<!-- 当前 -->
@@ -55,7 +56,8 @@
 					<view class="block-index">当前</view>
 					<view class="block-title" style="color: #4169E1;">{{classList[classCurrent-1].time}}</view>
 					<view class="btn" style="background-color: #ff5959" @click="navVideoNow(classCurrent-1)">
-						<view class="t-icon t-icon-zhibo"></view>
+						<!-- <view class="t-icon t-icon-zhibo"></view> -->
+						<view class="btn-text">正出勤</view>
 					</view>
 				</view>
 				<!-- 下节 -->
@@ -67,7 +69,8 @@
 					<view class="block-subtitle">下节</view>
 					<view class="block-title">{{classList[classCurrent].time}}</view>
 					<view class="btn" style="background-color: #aaaaaa">
-						<view class="t-icon t-icon-daojishi"></view>
+						<!-- <view class="t-icon t-icon-daojishi"></view> -->
+						<view class="btn-text">未开始</view>
 					</view>
 				</view>
 				<!-- 下下节 -->
@@ -79,7 +82,8 @@
 					<view class="block-subtitle">更晚</view>
 					<view class="block-title">{{classList[classCurrent+1].time}}</view>
 					<view class="btn" style="background-color: #aaaaaa">
-						<view class="t-icon t-icon-daojishi"></view>
+						<!-- <view class="t-icon t-icon-daojishi"></view> -->
+						<view class="btn-text">未开始</view>
 					</view>
 				</view>
 			</view>
@@ -175,5 +179,10 @@
 		width: 120rpx;
 		height: 60rpx;
 		border-radius: 8rpx;
+		.btn-text{
+			color: #FFF;
+			font-weight: bold;
+			font-size: 30rpx;
+		}
 	}
 </style>

+ 6 - 1
components/top-box/top-box.vue

@@ -16,13 +16,18 @@
 			<image class="children-avatar" :src="childreninfo.avatar"></image>
 			<view class="children-name">
 				<text class="name">{{childreninfo.name}}</text>
-				<view class="detail-box">
+				<!-- 暂时不需切换学期 -->
+				<view class="detail-box" style="display: none;">
 					<text class="detail" @click="setSemesterPicker = true">{{semester}}</text>
 					<!-- 选择学期 -->
 					<view class="select-icon">
 						<u-icon name="arrow-down" color="#FFF" @click="setSemesterPicker = true"></u-icon>
 					</view>
 				</view>
+				<!-- 班级 -->
+				<view class="detail-box">
+					<text class="detail">{{childreninfo.class}}</text>
+				</view>
 			</view>
 		</view>
 

+ 13 - 12
gradepkg/subject-chart/subject-chart.vue

@@ -25,7 +25,18 @@
 			</view>
 		</view>
 
-		<!-- 图表列表 -->
+		<!-- 图表列表 -->
+		<!-- 单次考试 -->
+		<view class="chart-container">
+			<view class="chart-name">
+				<view class="start-tag"></view>
+				<text class="chart-name-text">最近考试科目得分率分析</text>
+			</view>
+			<view class="charts-box">
+				<qiun-data-charts type="rose" :chartData="gradeData.advantageRoseChart.recentAdvantage" :loadingType="4"
+					:tapLegend="true" tooltipFormat='tooltipScoreShort'/>
+			</view>
+		</view>
 		<!-- 学期平均 -->
 		<view class="chart-container">
 			<view class="chart-name">
@@ -37,17 +48,7 @@
 					:tapLegend="true" tooltipFormat='tooltipScoreShort'/>
 			</view>
 		</view>
-		<!-- 单次考试 -->
-		<view class="chart-container">
-			<view class="chart-name">
-				<view class="start-tag"></view>
-				<text class="chart-name-text">最近考试科目得分率分析</text>
-			</view>
-			<view class="charts-box">
-				<qiun-data-charts type="rose" :chartData="gradeData.advantageRoseChart.recentAdvantage" :loadingType="4"
-					:tapLegend="true" tooltipFormat='tooltipScoreShort'/>
-			</view>
-		</view>
+		
 
 
 	</view>

+ 5 - 10
pages.json

@@ -248,32 +248,27 @@
 		"list": [{
 				"pagePath": "pages/home/home",
 				"iconPath": "static/tab-icons/home.png",
-				"selectedIconPath": "static/tab-icons/homeselect.png",
-				"text": "首页"
+				"selectedIconPath": "static/tab-icons/homeselect.png"
 			},
 			{
 				"pagePath": "pages/grade/grade",
 				"iconPath": "static/tab-icons/grade.png",
-				"selectedIconPath": "static/tab-icons/gradeselect.png",
-				"text": "成绩"
+				"selectedIconPath": "static/tab-icons/gradeselect.png"
 			},
 			{
 				"pagePath": "pages/homework/homework",
 				"iconPath": "static/tab-icons/homework.png",
-				"selectedIconPath": "static/tab-icons/homeworkselect.png",
-				"text": "作业"
+				"selectedIconPath": "static/tab-icons/homeworkselect.png"
 			},
 			{
 				"pagePath": "pages/interactive/interactive",
 				"iconPath": "static/tab-icons/interactive.png",
-				"selectedIconPath": "static/tab-icons/interactiveselect.png",
-				"text": "家校"
+				"selectedIconPath": "static/tab-icons/interactiveselect.png"
 			},
 			{
 				"pagePath": "pages/my/my",
 				"iconPath": "static/tab-icons/my.png",
-				"selectedIconPath": "static/tab-icons/myselect.png",
-				"text": "我的"
+				"selectedIconPath": "static/tab-icons/myselect.png"
 			}
 		]
 	}

+ 7 - 7
pages/common/blockmsg.scss

@@ -6,13 +6,12 @@
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
-		background-color: #f6f6f6;
 		margin: 10rpx auto 10rpx auto;
-		padding: 5rpx;
 		width: 90%;
 		height: 120rpx;
-		padding: 0 20rpx;
-		border-radius: $card-border-radius;
+		padding: 5rpx 25rpx;
+		border-radius: 15rpx;
+		background: linear-gradient(90deg,#f6f6f6, #FFF);
 	
 		.block-title {
 			font-size: 32rpx;
@@ -34,10 +33,11 @@
 			}
 		}
 	}
-	.index {
+
+	.tag-index {
 		width: 1%;
 		height: 120rpx;
-		background-color: $color-mixblue;
 		border-radius: $card-border-radius;
-		margin-left: 22rpx;
+		margin-left: 20rpx;
+		background-image: linear-gradient($color-mixblue, #FFF);
 	}

+ 82 - 176
pages/grade/grade.vue

@@ -2,90 +2,82 @@
 	<view class="home-container">
 		<!-- 头部区域 -->
 		<top-box v-bind:timeStamp="timeStamp"></top-box>
-
-		<!-- 缩略图区域 -->
-		<view class="mini-chart-list">
-			<!-- 成绩走势 -->
-			<view class="mini-chart-item" style="width: 100%;">
-				<view class="chart-container" @click="navGeneral">
-					<view class="chart-name">
-						<view :class="icon.general"></view>
-						<text class="chart-name-text">成绩走势</text>
-					</view>
-					<view class="charts-box">
-						<qiun-data-charts class="chart" :canvas2d='true' canvasId='canvans1' type="mainline"
-							:chartData="gradeData.semesterLineChart.generalComparison" :loadingType="4"
-							tooltipFormat='tooltipScore' />
-					</view>
-				</view>
-			</view>
-			<!-- 单次考试 -->
-			<view class="mini-chart-item">
-				<view class="chart-container" @click="navSingle">
-					<view class="chart-name">
-						<view :class="icon.RecentTest"></view>
-						<text class="chart-name-text">单次考试分析</text>
+		<!-- 活动内容 -->
+		<task-box :current="0">
+			<!-- 记录模块 -->
+			<template #center-slot>
+				<!-- 缩略图区域 -->
+				<view class="mini-chart-list">
+					<!-- 成绩走势 -->
+					<view class="mini-chart-item" style="width: 100%;">
+						<view class="chart-container" @click="navGeneral">
+							<view class="chart-name">
+								<view :class="icon.General"></view>
+								<text class="chart-name-text">成绩走势</text>
+							</view>
+							<view class="charts-box">
+								<qiun-data-charts class="chart" :canvas2d='true' canvasId='canvans1' type="mainline"
+									:chartData="gradeData.semesterLineChart.generalComparison" :loadingType="4"
+									tooltipFormat='tooltipScore' />
+							</view>
+						</view>
 					</view>
-					<view class="charts-box">
-						<qiun-data-charts type="mini-column" :chartData="gradeData.recentTestChart.recentComparison"
-							:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans2' />
+					<!-- 单次考试 -->
+					<view class="mini-chart-item">
+						<view class="chart-container" @click="navSingle">
+							<view class="chart-name">
+								<view :class="icon.RecentTest"></view>
+								<text class="chart-name-text">单次考试分析</text>
+							</view>
+							<view class="charts-box">
+								<qiun-data-charts type="mini-column" :chartData="gradeData.recentTestChart.recentComparison"
+									:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans2' />
+							</view>
+						</view>
 					</view>
-				</view>
-			</view>
-			<!-- 成绩占比 -->
-			<view class="mini-chart-item">
-				<view class="chart-container" @click="navRank">
-					<view class="chart-name">
-						<view :class="icon.Rank"></view>
-						<text class="chart-name-text">排行占比分析</text>
-					</view>
-					<view class="charts-box">
-						<qiun-data-charts type="mini-area" :chartData="gradeData.rankChart.semesterRank"
-							:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans3' />
+					<!-- 成绩占比 -->
+					<view class="mini-chart-item">
+						<view class="chart-container" @click="navRank">
+							<view class="chart-name">
+								<view :class="icon.Rank"></view>
+								<text class="chart-name-text">排行占比分析</text>
+							</view>
+							<view class="charts-box">
+								<qiun-data-charts type="mini-area" :chartData="gradeData.rankChart.semesterRank"
+									:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans3' />
+							</view>
+						</view>
 					</view>
-				</view>
-			</view>
-			<!-- 优劣科目分析 -->
-			<view class="mini-chart-item">
-				<view class="chart-container" @click="navSubject">
-					<view class="chart-name">
-						<view :class="icon.Advantage"></view>
-						<text class="chart-name-text">优劣科目分析</text>
+					<!-- 优劣科目分析 -->
+					<view class="mini-chart-item">
+						<view class="chart-container" @click="navSubject">
+							<view class="chart-name">
+								<view :class="icon.Advantage"></view>
+								<text class="chart-name-text">优劣科目分析</text>
+							</view>
+							<view class="charts-box">
+								<qiun-data-charts type="mini-rose" :chartData="gradeData.advantageRoseChart.recentAdvantage"
+									:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans4' />
+							</view>
+						</view>
 					</view>
-					<view class="charts-box">
-						<qiun-data-charts type="mini-rose" :chartData="gradeData.advantageRoseChart.recentAdvantage"
-							:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans4' />
+					<!-- 考试能力分析 -->
+					<view class="mini-chart-item">
+						<view class="chart-container" @click="navAbility">
+							<view class="chart-name">
+								<view :class="icon.Ability"></view>
+								<text class="chart-name-text">考试能力分析</text>
+							</view>
+							<view class="charts-box">
+								<qiun-data-charts type="mini-column" :chartData="gradeData.abilityChart.importantAnalyse"
+									:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans5' />
+							</view>
+						</view>
 					</view>
 				</view>
-			</view>
-			<!-- 考试能力分析 -->
-			<view class="mini-chart-item">
-				<view class="chart-container" @click="navAbility">
-					<view class="chart-name">
-						<view :class="icon.Ability"></view>
-						<text class="chart-name-text">考试能力分析</text>
-					</view>
-					<view class="charts-box">
-						<qiun-data-charts type="mini-column" :chartData="gradeData.abilityChart.importantAnalyse"
-							:loadingType="4" :tapLegend="false" :canvas2d='true' canvasId='canvans5' />
-					</view>
-				</view>
-			</view>
-
-			<!-- 成绩表单 -->
-			<view class="mini-chart-item" style="width: 100%; height: auto;">
-				<view class="chart-container" style="height: 100%">
-					<view class="chart-name">
-						<view :class="icon.table"></view>
-						<text class="chart-name-text">成绩表单</text>
-					</view>
-					<z-table class="table" :tableData="tableData" :columns="columns"
-						showBottomSum="true">
-					</z-table>
-				</view>
-			</view>
-			
-		</view>
+			</template>
+		</task-box>
+		
 	</view>
 </template>
 
@@ -102,121 +94,35 @@
 		data() {
 			return {
 				//图标
-				icon:{
-					general: 't-icon t-icon-pingjia',
+				icon: {
+					General: 't-icon t-icon-pingjia',
 					RecentTest: 't-icon t-icon-zhishi',
 					Rank: 't-icon t-icon-fengxianpinggu',
 					Advantage: 't-icon t-icon-gaishuai',
 					Ability: 't-icon t-icon-tongji',
-					table: 't-icon t-icon-baike'
 				},
 				//时间戳
 				timeStamp: '',
-				//成绩表
-				columns: [{
-						'title': '考试',
-						'key': '考试',
-						'width': 220,
-					},
-					{
-						'title': '语文',
-						'key': '语文',
-					},
-					{
-						'title': '数学',
-						'key': '数学',
-					},
-					{
-						'title': '英语',
-						'key': '英语',
-					},
-					{
-						'title': '体育',
-						'key': '体育',
-					},
-					{
-						'title': '思品',
-						'key': '思品',
-					},
-					{
-						'title': '科学',
-						'key': '科学',
-					}
-				],
-				//表格数据
-				tableData: [{
-						'考试': '开学',
-						'语文': 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,
-					}
-				],
-					
+
 			}
 		},
 		onLoad() {
-			//获取当前时间
-			this.timeStamp = (new Date()).format("hh:mm")
-			//获取成绩数据
-			this.$initGrade()
+			this.init()
 		},
 		//刷新页面
 		onPullDownRefresh() {
-			this.timeStamp = (new Date()).format("hh:mm")
-			console.log('refresh');
 			setTimeout(function() {
+				this.init()
 				uni.stopPullDownRefresh();
 			}, 1000);
 		},
 		methods: {
+			init() {
+				//获取当前时间
+				this.timeStamp = (new Date()).format("hh:mm")
+				//获取成绩数据
+				this.$initGrade()
+			},
 			//导航成绩走势
 			navGeneral(e) {
 				uni.navigateTo({
@@ -268,7 +174,7 @@
 			display: flex;
 			align-items: center;
 			flex-wrap: wrap;
-			margin: -50rpx 20rpx 10rpx 20rpx;
+			margin: -10rpx 20rpx -20rpx 20rpx;
 			justify-content: space-between;
 
 			.mini-chart-item {

+ 19 - 7
pages/home/home.vue

@@ -69,7 +69,7 @@
 
 
 			<!-- 评测 -->
-			<view class="card-item" @click="navHomework(0)">
+			<view class="card-item" @click="navTask(0)">
 				<view class="card-info">
 					<view :class="icon.evaluation"></view>
 					<text class="info-text">今日评测</text>
@@ -80,7 +80,7 @@
 				</view>
 			</view>
 			<!-- 作业 -->
-			<view class="card-item" @click="navHomework(1)">
+			<view class="card-item" @click="navTask(1)">
 				<view class="card-info">
 					<view :class="icon.homework"></view>
 					<text class="info-text">今日作业</text>
@@ -91,7 +91,7 @@
 				</view>
 			</view>
 			<!-- 问卷 -->
-			<view class="card-item" @click="navHomework(2)">
+			<view class="card-item" @click="navTask(2)">
 				<view class="card-info">
 					<view :class="icon.activity"></view>
 					<text class="info-text">今日活动</text>
@@ -252,10 +252,22 @@
 				this.activityOpts = activity;
 			},
 			//导航
-			navHomework(index) {
-				uni.reLaunch({
-					url: `/pages/homework/homework?index=${index}`
-				})
+			navTask(index) {
+				if(index === 0){
+					uni.reLaunch({
+						url: `/pages/grade/grade`
+					})
+				}
+				if(index === 1){
+					uni.reLaunch({
+						url: `/pages/homework/homework`
+					})
+				}
+				if(index === 2){
+					uni.reLaunch({
+						url: `/pages/interactive/interactive`
+					})
+				}
 			},
 			navCalendar() {
 				uni.navigateTo({

+ 5 - 562
pages/homework/homework.vue

@@ -1,268 +1,9 @@
 <template>
-	<view class="homework-container">
+	<view>
 		<!-- 头部区域 -->
 		<top-box :timeStamp="timeStamp" />
-		<view class="module-container">
-			<view style="margin: 0 20rpx">
-				<u-tabs :list="list" :current="current" @change="changeModule"
-					:activeStyle="{color: '#4169E1',fontWeight: 'bold',transform: 'scale(1.08)',}"
-					:inactiveStyle="{fontWeight: 'bold',transform: 'scale(1)'}" lineColor="#4169E1" lineWidth="60">
-				</u-tabs>
-			</view>
-			<!-- 模块卡片 -->
-			<view class="module-box">
-				<!-- 评测 -->
-				<view class="card" style="background-color: #4169E1;" v-if="current == 0">
-					<view class="box">
-						<view class="flex">
-							<text class="card-title">今日评测:</text>
-							<view class="flex-line">
-								<text class="card-title" style="margin-left: 20rpx;">{{testData.length}}</text>
-								<text class="unit">例</text>
-							</view>
-						</view>
-						<view class="box" style="margin: 10rpx 0 0 0;">
-							<view class="flex">
-								<view class="tag"></view>
-								<text class="card-subtitle">已完成:</text>
-								<view class="flex-line">
-									<text class="fin-number">{{testFinish}}</text>
-									<text class="unit">例</text>
-								</view>
-							</view>
-							<view class="flex">
-								<view class="tag"></view>
-								<text class="card-subtitle">完成情况:</text>
-								<text class="card-subtitle"
-									style="font-weight: bold;opacity: 0.8;">{{list[0].level}}</text>
-							</view>
-						</view>
-					</view>
-					<view class="image" :style="{backgroundImage:`url(${list[0].image})`}"></view>
-				</view>
-				<!-- 作业 -->
-				<view class="card" style="background-color: #ff8caf;" v-if="current == 1">
-					<view class="box">
-						<view class="flex">
-							<text class="card-title">今日作业:</text>
-							<view class="flex-line">
-								<text class="card-title" style="margin-left: 20rpx;">{{homeworkData.length}}</text>
-								<text class="unit">例</text>
-							</view>
-						</view>
-						<view class="box" style="margin: 10rpx 0 0 0;">
-							<view class="flex">
-								<view class="tag"></view>
-								<text class="card-subtitle">已完成:</text>
-								<view class="flex-line">
-									<text class="fin-number">{{homeworkFinish}}</text>
-									<text class="unit">例</text>
-								</view>
-							</view>
-							<view class="flex">
-								<view class="tag"></view>
-								<text class="card-subtitle">完成情况:</text>
-								<text class="card-subtitle"
-									style="font-weight: bold;opacity: 0.8;">{{list[1].level}}</text>
-							</view>
-						</view>
-					</view>
-					<view class="image" :style="{backgroundImage:`url(${list[1].image})`}"></view>
-				</view>
-				<!-- 活动 -->
-				<view class="card" style="background-color: #f9c752;" v-if="current == 2">
-					<view class="box">
-						<view class="flex">
-							<text class="card-title">今日活动:</text>
-							<view class="flex-line">
-								<text class="card-title" style="margin-left: 20rpx;">{{activityData.length}}</text>
-								<text class="unit">例</text>
-							</view>
-						</view>
-						<view class="box" style="margin: 10rpx 0 0 0;">
-							<view class="flex">
-								<view class="tag"></view>
-								<text class="card-subtitle">已完成:</text>
-								<view class="flex-line">
-									<text class="fin-number">{{activityFinish}}</text>
-									<text class="unit">例</text>
-								</view>
-							</view>
-							<view class="flex">
-								<view class="tag"></view>
-								<text class="card-subtitle">完成情况:</text>
-								<text class="card-subtitle"
-									style="font-weight: bold;opacity: 0.8;">{{list[2].level}}</text>
-							</view>
-						</view>
-					</view>
-					<view class="image" :style="{backgroundImage:`url(${list[2].image})`}"></view>
-				</view>
-				<!-- 列表 -->
-				<view class="detail-box">
-					<!-- 图表模块 -->
-					<view class="detail-box-item">
-						<view class="item-info">
-							<view class="t-icon t-icon-ceping"></view>
-							<view class="item-text">完成率统计</view>
-						</view>
-						<view class="charts-box" v-if="current == 0">
-							<qiun-data-charts type="fin-area" :chartData="assignment.testData" :loadingType="4"
-								:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0980111' />
-						</view>
-						<view class="charts-box" v-if="current == 1">
-							<qiun-data-charts type="fin-area" :chartData="assignment.homeworkData" :loadingType="4"
-								:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0933511'
-								:opts="{color:['#ff8caf']}" />
-						</view>
-						<view class="charts-box" v-if="current == 2">
-							<qiun-data-charts type="fin-area" :chartData="assignment.activityData" :loadingType="4"
-								:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0531032'
-								:opts="{color:['#f9c752']}" />
-						</view>
-					</view>
-					<!-- 详情列表 -->
-					<!-- 评测 -->
-					<view class="detail-box-item" v-if="current == 0">
-						<view class="item-info">
-							<view class="t-icon t-icon-daiban"></view>
-							<view class="item-text">评测列表</view>
-							<view class="btn" @click="navListData">
-								<view class="t-icon t-icon-fenlei"></view>
-								<view class="msg">详情列表</view>
-							</view>
-						</view>
-						<view style="margin-bottom: 20rpx;">
-							<view class="block-box" v-for="(item,i) in testData" :key="i" @click="navSingleData(item)">
-								<view class="index"
-									:style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
-								</view>
-								<view class="class-block" style="width: 85%;">
-									<view style="width: 40%;">
-										<view class="list-item-title">{{item.examInfo.name}}</view>
-									</view>
-
-									<view style=" display: flex; justify-content: space-between; width: 50%;">
-										<view class="block-tag-box"
-											:style="{borderColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
-											<view class="block-tag"
-												:style="{color: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
-												{{item.examInfo.subjects[0].name}}
-											</view>
-										</view>
-										<view class="block-tag-box"
-											:style="{borderColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
-											<view class="block-tag"
-												:style="{color: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
-												{{item.examInfo.examType.name}}
-											</view>
-										</view>
-										<view class="block-tag-box"
-											:style="{borderColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
-											<view class="block-tag"
-												:style="{color: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
-												{{item.examInfo.progress === 'finish' ? '已完成' : '进行中'}}
-											</view>
-										</view>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-					<!-- 作业 -->
-					<view class="detail-box-item" v-if="current == 1">
-						<view class="item-info">
-							<view class="t-icon t-icon-daiban"></view>
-							<view class="item-text">作业列表</view>
-							<view class="btn" @click="navListData">
-								<view class="t-icon t-icon-fenlei"></view>
-								<view class="msg">详情列表</view>
-							</view>
-						</view>
-						<view style="margin-bottom: 20rpx;">
-							<view class="block-box" v-for="(item,i) in homeworkData" :key="i"
-								@click="navSingleData(item)">
-								<view class="index"
-									:style="{backgroundColor: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
-								</view>
-								<view class="class-block" style="width: 85%;justify-content: flex-start;">
-									<view style="display: flex; flex-direction: column;">
-
-										<view style="display: flex;margin-left: 30rpx;align-items: center;">
-											<view class="list-item-title">{{item.work.name}}</view>
-											<view class="block-tag-box"
-												:style="{marginLeft: 40+'rpx',borderColor: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
-												<view class="block-tag"
-													:style="{color: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
-													{{item.work.scope === 'private' ? '个人':'学校'}}作业
-												</view>
-											</view>
-											<view class="block-tag-box"
-												:style="{marginLeft: 20+'rpx',borderColor: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
-												<view class="block-tag"
-													:style="{color: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}">
-													{{item.work.progress === 'finish' ? '已完成' : '进行中'}}
-												</view>
-											</view>
-										</view>
-										<rich-text class="block-subtitle" style="margin:10rpx 0 0 30rpx;"
-											:nodes="item.work.description"></rich-text>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-					<!-- 活动 -->
-					<view class="detail-box-item" v-if="current == 2">
-						<view class="item-info">
-							<view class="t-icon t-icon-daiban"></view>
-							<view class="item-text">活动列表</view>
-							<view class="btn" @click="navListData">
-								<view class="t-icon t-icon-fenlei"></view>
-								<view class="msg">详情列表</view>
-							</view>
-						</view>
-						<view style="margin-bottom: 20rpx;">
-							<view class="block-box" v-for="(item,i) in activityData" :key="i"
-								@click="navSingleData(item)">
-								<view class="index"
-									:style="{ backgroundColor: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
-								</view>
-								<view class="class-block" style="width: 85%;justify-content: flex-start;">
-									<view style="display: flex; flex-direction: column;">
-										<view style="display: flex;margin-left: 30rpx;align-items: center;">
-											<view class="list-item-title">
-												{{item.survey.name || item.vote.name}}
-											</view>
-
-											<view class="block-tag-box"
-												:style="{ marginLeft: 40+'rpx',borderColor: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
-												<view class="block-tag"
-													:style="{color: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
-													{{item.survey.scope === 'private' ? '个人':'学校' || item.vote.scope === 'private' ? '个人':'学校'}}活动
-												</view>
-											</view>
-											<view class="block-tag-box"
-												:style="{ marginLeft: 20+'rpx',borderColor: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
-												<view class="block-tag"
-													:style="{color: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}">
-													{{item.survey.progress === 'finish' || item.vote.progress === 'finish' ? '已完成' : '进行中'}}
-												</view>
-											</view>
-										</view>
-
-										<rich-text class="block-subtitle" style="margin:10rpx 0 0 30rpx;"
-											:nodes="item.vote.description || item.survey.description"></rich-text>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-
-				</view>
-			</view>
-
-		</view>
+		<!-- 作业模块 -->
+		<task-box :current="1"></task-box>
 	</view>
 </template>
 
@@ -272,52 +13,14 @@
 		mapMutations
 	} from 'vuex'
 	export default {
-		computed: {
-			...mapState('m_chart', ['assignment']),
-		},
 		data() {
 			return {
-				//模块名
-				list: [{
-					name: '评测详情',
-					level: '',
-					image: 'https://ouch-cdn2.icons8.com/yFl5NWU3aVehLBlQf9ctvnZPqtm5U0hqM3IzWvFDCaQ/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNzY5/LzY1ZTQxZmZjLTg1/YWQtNDYyMi1hYzU0/LWQ3NDEzZmY2NGI1/YS5wbmc.png',
-					// image: 'https://ouch-cdn2.icons8.com/Fc-Mi2ntM_Ixcp_lS3XI6bUS2YaAyfiX2vlyWGtt7lU/rs:fit:1186:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvOTk1/L2FkZjRlMGQzLTg3/N2ItNGMwYy04ZjY5/LWQxODUwOGRjMWMy/NC5zdmc.png'
-				}, {
-					name: '作业详情',
-					level: '',
-					image: 'https://ouch-cdn2.icons8.com/AVOwJ9emg_ZOeHvQaunQAZlgeLsG-b1cGhiYvgoJ06g/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNTAw/LzI5YjU1YWQ4LWMw/YTEtNDE1MS1iYmQw/LWIyMDdhYmRkOTE0/Mi5wbmc.png',
-					// image: 'https://ouch-cdn2.icons8.com/HHFusNSROgWCPTuBkHHGmsnUa6MIJA1AxYfCtXQg310/rs:fit:1094:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMzYx/LzlhM2NmMWQzLTg5/NTgtNDNmMi1hYTc1/LTk5NmY0M2U2NTc4/MC5zdmc.png'
-				}, {
-					name: '活动详情',
-					level: '',
-					image: 'https://ouch-cdn2.icons8.com/LW70TMgW1cGfYeGNSTEp7__kiKVgIhwdZwUmykdLYMY/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvOTI0/LzU3MWU4ZDZkLTg0/NzEtNGM5YS04MDJk/LTEzNTM5YmZmZTM2/YS5wbmc.png',
-					// image: 'https://ouch-cdn2.icons8.com/2OQwTztN6Gf0XXjbHCAS3a1Qa9CWEr2EG759oTb7MFM/rs:fit:1216:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNzgw/LzdhNTk3OThlLTU2/ZmEtNGY3OC05Mjdm/LTRhMmQ0NWNhOWY3/MC5zdmc.png'
-				}],
-				//当前模块
-				current: 0,
-				//页面数据内容
-				testData: {},
-				homeworkData: {},
-				activityData: {},
-				//完成内容
-				testFinish: '',
-				homeworkFinish: '',
-				activityFinish: '',
-				//历史数据
-				historyData: {
-					test: [50, 55, 60],
-					homework: [10, 60, 50, 88, 100],
-					activity: [70, 19, 28, 40, 60, 100, 83]
-				},
 				//时间戳
 				timeStamp: '',
 			};
 		},
-		onLoad(options) {
+		onLoad() {
 			this.init()
-			if (options.index)
-				this.current = options.index
 		},
 		//刷新页面
 		onPullDownRefresh() {
@@ -327,277 +30,17 @@
 			}, 1000);
 		},
 		methods: {
-			...mapMutations('m_chart', ['updateTestArea', 'updateHomeworkArea', 'updateActivityArea']),
-			...mapMutations('m_children', ['updateDetailList', 'updateDetail']),
 			//初始化页面
 			init() {
 				this.timeStamp = (new Date()).format("hh:mm")
-				this.$initHomework()
-				this.saveToStudyChart()
-				this.getLevel()
-
-			},
-			//更改模块
-			changeModule(e) {
-				this.current = e.index
-			},
-			//获得评判信息
-			getLevel() {
-				let testArr = this.historyData.test
-				let homeworkArr = this.historyData.homework
-				let activityArr = this.historyData.activity
-				this.list[0].level = testArr[testArr.length - 1] >= 40 ?
-					(testArr[testArr.length - 1] >= 70 ? '优秀' : '良好') : '较差'
-				this.list[1].level = homeworkArr[homeworkArr.length - 1] >= 40 ?
-					(homeworkArr[homeworkArr.length - 1] >= 70 ? '优秀' : '良好') : '较差'
-				this.list[2].level = activityArr[activityArr.length - 1] >= 40 ?
-					(activityArr[activityArr.length - 1] >= 70 ? '优秀' : '良好') : '较差'
-			},
-			//记录完成率到图表
-			saveToStudyChart() {
-				let temp = {
-					categories: [],
-					series: [{
-						"name": "",
-						"data": []
-					}]
-				}
-				// 测试
-				this.historyData.test.push(parseInt(this.testFinish * 100 / this.testData.length))
-				if (this.historyData.test.length > 7)
-					this.historyData.test.shift()
-				temp.categories = this.$getRecentDateArray(this.historyData.test.length)
-				//数据
-				//解除对象指向同一块内存(拷贝)
-				temp.series[0].data = this.historyData.test
-				let testDataTemp = JSON.parse(JSON.stringify(temp))
-				this.updateTestArea(testDataTemp)
-				//作业
-				this.historyData.homework.push(parseInt(this.homeworkFinish * 100 / this.homeworkData
-					.length))
-				if (this.historyData.homework.length > 7)
-					this.historyData.homework.shift()
-				temp.categories = this.$getRecentDateArray(this.historyData.homework.length)
-				temp.series[0].data = this.historyData.homework
-				let homeworkDataTemp = JSON.parse(JSON.stringify(temp))
-				this.updateHomeworkArea(homeworkDataTemp)
-				//活动
-				this.historyData.activity.push(parseInt(this.activityFinish * 100 / this.activityData
-					.length))
-				if (this.historyData.activity.length > 7)
-					this.historyData.activity.shift()
-				temp.categories = this.$getRecentDateArray(this.historyData.activity.length)
-				temp.series[0].data = this.historyData.activity
-				let activityDataTemp = JSON.parse(JSON.stringify(temp))
-				this.updateActivityArea(activityDataTemp)
-			},
-			//导航到详情页面
-			navListData() {
-				if (this.current === 0) {
-					this.updateDetailList(this.testData)
-					uni.navigateTo({
-						url: `/subpkg/detaillist/examlist`
-					})
-				}
-				if (this.current === 1) {
-					this.updateDetailList(this.homeworkData)
-					uni.navigateTo({
-						url: `/subpkg/detaillist/homeworklist`
-					})
-				}
-				if (this.current === 2) {
-					this.updateDetailList(this.activityData)
-					uni.navigateTo({
-						url: `/subpkg/detaillist/activitylist`
-					})
-				}
 			},
-			//导航到单条数据页面
-			navSingleData(item) {
-				if (this.current === 0) {
-					this.updateDetail(item)
-					console.log(item);
-					uni.navigateTo({
-						url: `/subpkg/detail/exam`
-					})
-				}
-				if (this.current === 1) {
-					this.updateDetail(item)
-					console.log(item);
-					uni.navigateTo({
-						url: `/subpkg/detail/homework`
-					})
-				}
-				if (this.current === 2) {
-					this.updateDetail(item)
-					console.log(item);
-					uni.navigateTo({
-						url: `/subpkg/detail/activity`
-					})
-				}
-			}
+			
 		}
 	}
 </script>
 
 <style lang="scss">
-	@import '@/pages/common/blockmsg.scss';
-
-	.list-item-title {
-		font-size: 30rpx;
-		font-weight: bold;
-		color: $color-title;
-	}
-
 	.home-topinfo {
 		background: linear-gradient($color-yellow, $page-background-color) !important;
 	}
-
-	//模块
-	.module-container {
-		margin-top: -70rpx;
-
-		//头部卡片
-		.card {
-			display: flex;
-			justify-content: space-around;
-			margin: 20rpx auto 20rpx auto;
-			height: 220rpx;
-			width: 710rpx;
-			// background: linear-gradient(to right, #ff95007a,#ff8419);
-			border-radius: $card-border-radius;
-
-			.card-title {
-				font-size: 50rpx;
-				font-weight: bold;
-				color: #FFF;
-			}
-
-			.card-subtitle {
-				margin-left: 20rpx;
-				font-size: 30rpx;
-				color: #FFF;
-			}
-
-			.unit {
-				margin-left: 10rpx;
-				font-size: 30rpx;
-				opacity: 0.8;
-				color: #FFF;
-			}
-			.fin-number{
-				margin-left: 20rpx;
-				font-size: 36rpx;
-				font-weight: bold;
-				color: #FFF;
-			}
-
-			.border-bottom {
-				height: 10rpx;
-				width: 100%;
-				border-radius: $card-border-radius;
-				background-color: #FFF;
-				margin: 5rpx 0 5rpx 0;
-			}
-
-			.image {
-				position: relative;
-				top: -90rpx;
-				right: -35rpx;
-				height: 300rpx;
-				width: 300rpx;
-				background-size: 100%;
-				background-repeat: no-repeat;
-				z-index: 2;
-			}
-		}
-
-		//头部卡片
-		.box {
-			display: flex;
-			flex-direction: column;
-			justify-content: space-around;
-			margin: 25rpx 0;
-		}
-
-		//中间标题
-		.cut-off {
-			font-size: 30rpx;
-			font-weight: bold;
-			color: #606266;
-			margin-left: 40rpx;
-		}
-
-		//列表block
-		.detail-box {
-			display: flex;
-			flex-flow: row wrap;
-			margin: 30rpx 20rpx 0 20rpx;
-			justify-content: space-between;
-
-			.detail-box-item {
-				margin: 0 0 4% 0;
-				width: 100%;
-				height: auto;
-				background-color: #FFF;
-				border-radius: $card-border-radius;
-
-				.item-info {
-					display: flex;
-					align-items: center;
-					padding: 20rpx;
-
-					.t-icon {
-						width: 40rpx;
-						height: 40rpx;
-					}
-
-					.item-text {
-						font-size: 30rpx;
-						font-weight: bold;
-						color: $color-title;
-						margin-left: 15rpx;
-					}
-				}
-			}
-		}
-	}
-
-	.tag {
-		background-color: #FFF;
-		height: 30rpx;
-		width: 10rpx;
-		border-radius: 100rpx;
-		margin-left: 10rpx;
-		opacity: 0.8;
-	}
-
-	//图表
-	.charts-box {
-		width: 100%;
-		height: 300rpx;
-	}
-
-	.flex {
-		display: flex;
-		align-items: center;
-		margin-left: 20rpx;
-	}
-
-	.msg {
-		color: $color-mixblue;
-		margin-left: 10rpx;
-		font-size: 30rpx;
-	}
-
-	.btn {
-		display: flex;
-		align-items: center;
-		margin: 0 5rpx 0 auto;
-	}
-
-	.flex-line {
-		display: flex;
-		align-items: baseline;
-	}
 </style>

+ 8 - 23
pages/interactive/interactive.vue

@@ -2,12 +2,13 @@
 	<view class="container">
 		<!-- 头部区域 -->
 		<top-box :timeStamp="timeStamp"></top-box>
-		<!-- 记录模块 -->
-		<interactive-box></interactive-box>
-		<!-- 列表区域 -->
-		<view class="card-box">
-			<view class="card-item" v-for="(item,index) in subArr" :style="{backgroundImage:`url(${item.image})`}"></view>
-		</view>
+		<!-- 活动内容 -->
+		<task-box :current="2">
+			<!-- 记录模块 -->
+			<template #end-slot>
+				<interactive-box></interactive-box>
+			</template>
+		</task-box>
 
 	</view>
 </template>
@@ -24,23 +25,7 @@
 			return {
 				//时间戳
 				timeStamp: '',
-				subArr:[
-					{
-						image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_1.jpg',
-						title:'学情分析报告',
-						summary:'提供本学期孩子的全面考试成绩分析报告'
-					},
-					{
-						image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_2.jpg',
-						title:'大考诊断分析报告',
-						summary:'提供本学期孩子大考分析报告'
-					},
-					{
-						image:'https://psycho-1300960840.cos.ap-chengdu.myqcloud.com/fu/TMD/banner_3.jpg',
-						title:'德育分析报告',
-						summary:'提供本学期孩子德育发展全方位分析'
-					}
-				]
+
 			}
 		},
 		onLoad() {

+ 10 - 23
store/chart.js

@@ -8,45 +8,32 @@ export default {
 		homeData: '',
 		//成绩图表数据
 		gradeData: '',
-		
 		//作业图表数据
-		assignment: {
-			//评测完成率
-			testData: '',
-			homeworkData: '',
-			activityData: '',
-		}
+		taskData: '',
 
 	}),
 	//模块方法(修改数据)
 	mutations: {
-		updateHomeChart(state,homeData){
+		updateHomeChart(state, homeData) {
 			state.homeData = homeData
 		},
 		//更新成绩图表数据
-		updateGradeChart(state,gradeData){
+		updateGradeChart(state, gradeData) {
 			state.gradeData = gradeData
 		},
-		
-		
+
+
 		//更新单个图表数据
 		updateSubjectComparison(state, singleAverageComparison) {
 			state.gradeData.semesterLineChart.singleAverageComparison = singleAverageComparison
 		},
-		updateSemesterSubjectRank(state, semesterSubjectRank){
+		updateSemesterSubjectRank(state, semesterSubjectRank) {
 			state.gradeData.rankChart.semesterSubjectRank = semesterSubjectRank
 		},
-		
-		//更新作业模块数据
-		updateTestArea(state, testData){
-			state.assignment.testData = testData
-		},
-		updateHomeworkArea(state, homeworkData){
-			state.assignment.homeworkData = homeworkData
-		},
-		updateActivityArea(state, activityData){
-			state.assignment.activityData = activityData
-		},
+		//更新作业图表数据
+		updateHomeworkFinChart(state, taskData) {
+			state.taskData = taskData
+		}
 
 	},
 	//模块属性(数据包装)

+ 2 - 4
subpkg/classlist/classlist.vue

@@ -21,8 +21,7 @@
 				<!-- 课程列表 -->
 				<view style="margin-bottom: 20rpx;">
 					<view class="block-box" v-for="(item,index) in classList" :key="index">
-						<view class="index"></view>
-
+						<view class="tag-index"></view>
 						<view class="class-block" style="width: 85%;">
 							<view class="block-title">{{item.name}}</view>
 							<view class="block-tag-box">
@@ -33,8 +32,7 @@
 						</view>
 					</view>
 				</view>
-
-
+				
 			</view>
 
 			<view class="card-item" style="width: 100%;">

+ 29 - 33
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js

@@ -87,13 +87,12 @@ const formatDateTime = (timeStamp, returnType) => {
 const cfu = {
 	//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
 	"type": ["pie", "ring", "rose", "arcbar", "line", "column", "area", "radar", "mainline", "mini-line",
-		"mini-area", "mini-column", "mini-rose", "fin-area"
+		"mini-area", "mini-column", "mini-rose", "mount"
 	],
 	"range": [],
 	//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
 	//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
-	"categories": ["line", "column", "bar", "area", "radar", "mainline", "mini-line", "mini-area", "mini-column",
-		"fin-area"
+	"categories": ["line", "column", "bar", "area", "radar", "mainline", "mini-line", "mini-area", "mini-column", "mount"
 	],
 	//instance为实例变量承载属性,不要删除
 	"instance": {},
@@ -109,7 +108,7 @@ const cfu = {
 		},
 		"HomeworkPercent": function(item, category, index, opts) {
 			let value = item.data >= 40 ? (item.data >= 70 ? '优秀' : '良好') : '较差'
-			return category.replace('-', '月') + '日 ' + item.name + '完成率: ' + item.data + ' % ' + value
+			return item.name.replace('-', '月') + '日 完成率: ' + item.data + ' % ' + value
 		},
 		"tooltipHourColum": function(item, category, index, opts) {
 			return category.replace('-', '月') + '日 ' + item.name + ': ' + item.data + ' 小时 '
@@ -125,7 +124,7 @@ const cfu = {
 			return '运动占睡眠: ' + item.data + '% ' + value
 		},
 		"subjectRankColum": function(item, category, index, opts) {
-			return category + ' ' + item.name + ': ' + item.data + '% 的学生'
+			return category + ' ' + item.name + '超过 ' + item.data + '% 的学生'
 		},
 	},
 	//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
@@ -219,15 +218,8 @@ const cfu = {
 		"extra": {
 			"rose": {
 				"type": "radius",
-				"minRadius": 50,
-				"activeOpacity": 0.5,
-				"activeRadius": 10,
-				"offsetAngle": 0,
-				"labelWidth": 15,
+				"minRadius": 60,
 				"border": true,
-				"borderWidth": 2,
-				"borderColor": "#FFFFFF",
-				"linearType": "none"
 			},
 			"tooltip": tooltip,
 		}
@@ -237,7 +229,7 @@ const cfu = {
 		"animation": true,
 		"timing": "easeOut",
 		"duration": 500,
-		"padding":[20,20,20,20],
+		"padding": [20, 20, 20, 20],
 		"title": {
 			"name": "",
 			"fontSize": 24,
@@ -253,7 +245,7 @@ const cfu = {
 				"width": 22,
 				"type": "circle",
 				"radius": 195,
-				"backgroundColor":"#F5F5F5"
+				"backgroundColor": "#F5F5F5"
 			}
 		}
 	},
@@ -396,10 +388,10 @@ const cfu = {
 		"duration": 500,
 		"color": color,
 		"padding": [
-		0,
-		10,
-		10,
-		10
+			0,
+			10,
+			10,
+			10
 		],
 		"dataLabel": false,
 		"dataPointShape": false,
@@ -435,6 +427,8 @@ const cfu = {
 					"#4169E1",
 					"#FFFFFF",
 					"#ff5959",
+					"#FFFFFF",
+					"#f9c752",
 					"#FFFFFF"
 				],
 				"colorStop": 0.5,
@@ -512,6 +506,7 @@ const cfu = {
 		"extra": {
 			"rose": {
 				"type": "radius",
+				"minRadius": 110,
 				"activeRadius": 0,
 				"border": true,
 				"borderWidth": 2,
@@ -523,17 +518,17 @@ const cfu = {
 			},
 		},
 	},
-	"fin-area": {
-		"type": "area",
+	"mount": {
+		"type": "mount",
 		"animation": true,
 		"timing": "easeOut",
 		"duration": 500,
 		"color": color,
 		"padding": [
+			0,
+			20,
 			10,
-			26,
-			10,
-			10
+			20
 		],
 		"dataLabel": false,
 		"dataPointShape": false,
@@ -543,25 +538,27 @@ const cfu = {
 			"fontSize": 11,
 			"scrollColor": "#F5F5F5",
 			"scrollBackgroundColor": "#D3D3D3",
-			"boundaryGap": "justify",
+			"boundaryGap": "center",
+			"disabled": true
 		},
 		"yAxis": {
 			"disableGrid": true,
 			"data": [{
 				"fontSize": 11,
 				"min": 0,
+				"disabled": true
 			}]
 		},
 		"legend": {
 			"show": false,
 		},
 		"extra": {
-			"area": {
-				"type": "curve",
-				"opacity": 0.7,
-				"addLine": true,
-				"width": 2,
-				"gradient": true,
+			"mount": {
+				"type": "mount",
+				"borderWidth": 1.2,
+				"widthRatio": 1.7,
+				"linearType": "opacity",
+				"linearOpacity": 0.1
 			},
 			"tooltip": {
 				"showBox": true,
@@ -572,8 +569,7 @@ const cfu = {
 				"splitLine": false,
 			},
 		}
-	},
-
+	}
 }
 
 export default cfu;

+ 2 - 2
utils/APIHandler.js

@@ -1240,7 +1240,7 @@ function initGrade(semester, tmdid) {
 			recentRankComparison:{
 				categories: subjectList,
 				series: [{
-						name: "最近成绩超过",
+						name: "最近成绩",
 						data: [
 							71,
 							62,
@@ -1251,7 +1251,7 @@ function initGrade(semester, tmdid) {
 						]
 					},
 					{
-						name: "上次成绩超过",
+						name: "上次成绩",
 						data: [
 							48,
 							64,