Selaa lähdekoodia

update:排除周末,优化全局样式

KELECHUAN 3 vuotta sitten
vanhempi
commit
fe9e675fba

BIN
.vs/miniprogram/v17/.suo


BIN
.vs/slnx.sqlite


+ 31 - 17
App.vue

@@ -1,6 +1,6 @@
 <script>
 	export default {
-		onLaunch: function() {
+		onLaunch: function() {
 			// console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
 			// console.log('App Launch')
 		},
@@ -16,28 +16,42 @@
 <style lang="scss">
 	/* uView */
 	@import "@/uni_modules/uview-ui/index.scss";
-	/*每个页面公共css */
-	@import '@/uni_modules/uni-scss/index.scss';
-	// /* #ifndef APP-NVUE */
+	/*每个页面公共css */
+	@import '@/uni_modules/uni-scss/index.scss';
+	// /* #ifndef APP-NVUE */
 	// 引入图标
 	@import '@/subpkg/common/iconfont-weapp-icon.css';
-	.t-icon{
+
+	.t-icon {
+		display: inline-block;
 		width: 30px;
 		height: 30px;
+		background-repeat: no-repeat;
+		background-position: center;
+		background-size: 100%;
+	}
+
+	.start-tag {
+		height: 32rpx;
+		width: 10rpx;
+		border-radius: 100rpx;
+		background-image: linear-gradient($color-mixblue 60%, #FFF);
 	}
-	// 设置整个项目的背景色
-	page {
-		background-color: $page-background-color;
+
+	// 设置整个项目的背景色
+	page {
+		background-color: $page-background-color;
 	}
+
 	//第二种
-	::-webkit-scrollbar{
-		  display: none;
-	}
-
-	/* #endif */
-	.example-info {
-		font-size: 14px;
-		color: #333;
-		padding: 10px;
+	::-webkit-scrollbar {
+		display: none;
+	}
+
+	/* #endif */
+	.example-info {
+		font-size: 14px;
+		color: #333;
+		padding: 10px;
 	}
 </style>

+ 2 - 1
common/style.scss

@@ -1,7 +1,8 @@
 // 拟态阴影
 $box-shadow-stereo-white: 5px 5px 10px #f2f2f2,-5px -5px 10px #ffffff;
 //卡片背景
-$box-background-card: linear-gradient(150deg, #f0f0f0, #ffffff);
+$card-gradient-pink: linear-gradient(90deg, #d9515e, #e57e7b, #eea69a, #f3ceba);
+$card-gradient-blue: linear-gradient(90deg, #002971, #02449c, #0260c8, #007ef7);
 //页面背景
 $page-background-color: #F5F5F5;
 //主题色

+ 1 - 1
components/todayclass-box/todayclass-box.vue

@@ -172,7 +172,7 @@
 		align-items: center;
 		justify-content: center;
 		background-color: $color-green;
-		width: 100rpx;
+		width: 120rpx;
 		height: 60rpx;
 		border-radius: 8rpx;
 	}

+ 6 - 6
gradepkg/ability-chart/ability-chart.vue

@@ -21,8 +21,8 @@
 				</view>
 				
 				<view class="module-item-box">
-					<view v-if="mainExamUndulate>=quizExamUndulate" class="t-icon t-icon-a-bianzu7" style="opacity:0.85;"></view>
-					<view v-if="mainExamUndulate<quizExamUndulate" class="t-icon t-icon-a-bianzu6" style="opacity:0.85;"></view>
+					<view v-if="mainExamUndulate>=quizExamUndulate" class="t-icon t-icon-a-bianzu7"></view>
+					<view v-if="mainExamUndulate<quizExamUndulate" class="t-icon t-icon-a-bianzu6"></view>
 				</view>
 			</view>
 
@@ -36,8 +36,8 @@
 				</view>
 				
 				<view class="module-item-box">
-					<view v-if="avgMain<avgquiz" class="t-icon t-icon-a-bianzu7" style="opacity:0.85;"></view>
-					<view v-if="avgMain>=avgquiz" class="t-icon t-icon-a-bianzu6" style="opacity:0.85;"></view>
+					<view v-if="avgMain<avgquiz" class="t-icon t-icon-a-bianzu7"></view>
+					<view v-if="avgMain>=avgquiz" class="t-icon t-icon-a-bianzu6"></view>
 				</view>
 			</view>
 		</view>
@@ -45,7 +45,7 @@
 		<!-- 图表列表 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">重要考试对比</text>
 			</view>
 			<!-- 图表 -->
@@ -57,7 +57,7 @@
 
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">普通测验记录</text>
 			</view>
 			<!-- 图表 -->

+ 0 - 5
gradepkg/common/chartpage.scss

@@ -148,10 +148,5 @@
 				width: 100%;
 				height: 550rpx;
 			}
-		}
-		.index{
-			height: 32rpx;
-			width: 10rpx;
-			border-radius: 100rpx;
 		}
 	}

+ 3 - 3
gradepkg/general-chart/general-chart.vue

@@ -20,7 +20,7 @@
 		<!-- 总成绩图表 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #3C9CFF;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">{{semester}} 总成绩对比</text>
 				<!-- 按钮区域 -->
 				<view class="btn-box">
@@ -35,7 +35,7 @@
 		<!-- 单科与平均成绩对比 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #3C9CFF;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">{{semester}} 单科与平均对比</text>
 				<!-- 按钮区域 -->
 				<view class="btn-box" @click="setSubjectPicker = true">
@@ -53,7 +53,7 @@
 		<!-- 单科成绩走势 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #3C9CFF;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">{{semester}} 单科走势对比</text>
 				<!-- 按钮 -->
 				<view class="btn-box" @click="switchScoreTypePicker = true">

+ 3 - 3
gradepkg/rank-chart/rank-chart.vue

@@ -22,7 +22,7 @@
 				</view>
 				
 				<view class="module-item-box">
-					<view :class="item.data>=40?(item.data>=70?'t-icon t-icon-a-bianzu6':'t-icon t-icon-a-bianzu7'): 't-icon t-icon-a-bianzu8'" style="opacity:0.85;"></view>
+					<view :class="item.data>=40?(item.data>=70?'t-icon t-icon-a-bianzu6':'t-icon t-icon-a-bianzu7'): 't-icon t-icon-a-bianzu8'"></view>
 				</view>
 			</view>
 		</view>
@@ -31,7 +31,7 @@
 		<!-- 总成绩排行走势 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">{{semester}} 排行占比走势对比</text>
 			</view>
 			<view class="charts-box">
@@ -42,7 +42,7 @@
 		<!-- 单科排行走势 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">单科排行占比走势对比</text>
 				<!-- 按钮区域 -->
 				<view class="btn-box" @click="setSubjectPicker = true">

+ 3 - 3
gradepkg/single-chart/single-chart.vue

@@ -22,7 +22,7 @@
 				</view>
 				
 				<view class="module-item-box">
-					<view :class="item.data>=0.4?(item.data>=0.7?'t-icon t-icon-a-bianzu6':'t-icon t-icon-a-bianzu7'): 't-icon t-icon-a-bianzu8'" style="opacity:0.85;"></view>
+					<view :class="item.data>=0.4?(item.data>=0.7?'t-icon t-icon-a-bianzu6':'t-icon t-icon-a-bianzu7'): 't-icon t-icon-a-bianzu8'"></view>
 				</view>
 			</view>
 		</view>
@@ -32,7 +32,7 @@
 		<!-- 近期成绩对比自身 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">近期成绩对比</text>
 			</view>
 			<view class="charts-box">
@@ -43,7 +43,7 @@
 		<!-- 单次排行分析 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">近期单科排行</text>
 			</view>
 			<view class="charts-box">

+ 3 - 3
gradepkg/subject-chart/subject-chart.vue

@@ -20,7 +20,7 @@
 					</view>
 				
 				<view class="module-item-box">
-					<view :class="item.data.value>=40?(item.data.value>=70?'t-icon t-icon-a-bianzu6':'t-icon t-icon-a-bianzu7'): 't-icon t-icon-a-bianzu8'" style="opacity:0.85;"></view>
+					<view :class="item.data.value>=40?(item.data.value>=70?'t-icon t-icon-a-bianzu6':'t-icon t-icon-a-bianzu7'): 't-icon t-icon-a-bianzu8'"></view>
 				</view>
 			</view>
 		</view>
@@ -29,7 +29,7 @@
 		<!-- 学期平均 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">{{semester}} 科目得分率平均值分析</text>
 			</view>
 			<view class="charts-box">
@@ -40,7 +40,7 @@
 		<!-- 单次考试 -->
 		<view class="chart-container">
 			<view class="chart-name">
-				<view class="index" style="background-color: #a5c6ff;"></view>
+				<view class="start-tag"></view>
 				<text class="chart-name-text">最近考试科目得分率分析</text>
 			</view>
 			<view class="charts-box">

+ 13 - 3
pages/home/home.vue

@@ -33,7 +33,8 @@
 				<view class="flex" style="flex-direction: column;">
 					<!-- 是否打卡 -->
 					<view class="flex">
-						<view class="index" :style="{backgroundColor: attendance==='已打卡'?'#4169E1':'#f9c752'}"></view>
+						<view class="start-tag-isattend" v-if="attendance==='已打卡'"></view>
+						<view class="start-tag-noattend" v-else></view>
 						<view class="text-content" style="z-index: 2;">打卡记录</view>
 					</view>
 					<view class="flex">
@@ -46,7 +47,8 @@
 						:style="{backgroundImage: attendance==='已打卡'?`url(${image02})`:`url(${image01})`}"></view>
 					<!-- 打卡时间 -->
 					<view class="flex">
-						<view class="index" :style="{backgroundColor: attendance==='已打卡'?'#4169E1':'#f9c752'}"></view>
+						<view class="start-tag-isattend" v-if="attendance==='已打卡'"></view>
+						<view class="start-tag-noattend" v-else></view>
 						<view class="text-content">打卡时间</view>
 					</view>
 					<view class="flex">
@@ -298,11 +300,19 @@
 		background-repeat: no-repeat;
 	}
 
-	.index {
+	.start-tag-isattend {
 		height: 30rpx;
 		width: 10rpx;
 		border-radius: 100rpx;
 		margin-left: 30rpx;
+		background-image: linear-gradient($color-mixblue 60%, #FFF);
+	}
+	.start-tag-noattend {
+		height: 30rpx;
+		width: 10rpx;
+		border-radius: 100rpx;
+		margin-left: 30rpx;
+		background-image: linear-gradient($color-yellow 60%, #FFF);
 	}
 
 	.image {

+ 38 - 31
pages/homework/homework.vue

@@ -18,26 +18,23 @@
 							<text class="card-title">今日评测:</text>
 							<view class="flex-line">
 								<text class="card-title" style="margin-left: 20rpx;">{{testData.length}}</text>
-								<text class="card-title"
-									style="margin-left: 10rpx;font-size: 36rpx;opacity: 0.8;">份</text>
+								<text class="unit">例</text>
 							</view>
 						</view>
 						<view class="box" style="margin: 10rpx 0 0 0;">
 							<view class="flex">
-								<view class="index-box"></view>
+								<view class="tag"></view>
 								<text class="card-subtitle">已完成:</text>
 								<view class="flex-line">
-									<text class="card-subtitle"
-										style="margin-left: 20rpx;font-size: 36rpx;">{{testFinish}}</text>
-									<text class="card-subtitle"
-										style="margin-left: 10rpx;font-size: 30rpx;opacity: 0.8;">份</text>
+									<text class="fin-number">{{testFinish}}</text>
+									<text class="unit">例</text>
 								</view>
 							</view>
 							<view class="flex">
-								<view class="index-box"></view>
+								<view class="tag"></view>
 								<text class="card-subtitle">完成情况:</text>
 								<text class="card-subtitle"
-									style="margin-left: 20rpx;font-size: 34rpx;">{{list[0].level}}</text>
+									style="font-weight: bold;opacity: 0.8;">{{list[0].level}}</text>
 							</view>
 						</view>
 					</view>
@@ -50,26 +47,23 @@
 							<text class="card-title">今日作业:</text>
 							<view class="flex-line">
 								<text class="card-title" style="margin-left: 20rpx;">{{homeworkData.length}}</text>
-								<text class="card-title"
-									style="margin-left: 10rpx;font-size: 36rpx;opacity: 0.8;">份</text>
+								<text class="unit">例</text>
 							</view>
 						</view>
 						<view class="box" style="margin: 10rpx 0 0 0;">
 							<view class="flex">
-								<view class="index-box"></view>
+								<view class="tag"></view>
 								<text class="card-subtitle">已完成:</text>
 								<view class="flex-line">
-									<text class="card-subtitle"
-										style="margin-left: 20rpx;font-size: 36rpx;">{{homeworkFinish}}</text>
-									<text class="card-subtitle"
-										style="margin-left: 10rpx;font-size: 30rpx;opacity: 0.8;">份</text>
+									<text class="fin-number">{{homeworkFinish}}</text>
+									<text class="unit">例</text>
 								</view>
 							</view>
 							<view class="flex">
-								<view class="index-box"></view>
+								<view class="tag"></view>
 								<text class="card-subtitle">完成情况:</text>
 								<text class="card-subtitle"
-									style="margin-left: 20rpx;font-size: 34rpx;">{{list[1].level}}</text>
+									style="font-weight: bold;opacity: 0.8;">{{list[1].level}}</text>
 							</view>
 						</view>
 					</view>
@@ -82,26 +76,23 @@
 							<text class="card-title">今日活动:</text>
 							<view class="flex-line">
 								<text class="card-title" style="margin-left: 20rpx;">{{activityData.length}}</text>
-								<text class="card-title"
-									style="margin-left: 10rpx;font-size: 36rpx;opacity: 0.8;">例</text>
+								<text class="unit">例</text>
 							</view>
 						</view>
 						<view class="box" style="margin: 10rpx 0 0 0;">
 							<view class="flex">
-								<view class="index-box"></view>
+								<view class="tag"></view>
 								<text class="card-subtitle">已完成:</text>
 								<view class="flex-line">
-									<text class="card-subtitle"
-										style="margin-left: 20rpx;font-size: 36rpx;">{{activityFinish}}</text>
-									<text class="card-subtitle"
-										style="margin-left: 10rpx;font-size: 30rpx;opacity: 0.8;">例</text>
+									<text class="fin-number">{{activityFinish}}</text>
+									<text class="unit">例</text>
 								</view>
 							</view>
 							<view class="flex">
-								<view class="index-box"></view>
+								<view class="tag"></view>
 								<text class="card-subtitle">完成情况:</text>
 								<text class="card-subtitle"
-									style="margin-left: 20rpx;font-size: 34rpx;">{{list[2].level}}</text>
+									style="font-weight: bold;opacity: 0.8;">{{list[2].level}}</text>
 							</view>
 						</view>
 					</view>
@@ -113,7 +104,7 @@
 					<view class="detail-box-item">
 						<view class="item-info">
 							<view class="t-icon t-icon-ceping"></view>
-							<view class="item-text">完成情况统计</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"
@@ -156,13 +147,15 @@
 											: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>
+												{{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>
+												{{item.examInfo.examType.name}}
+											</view>
 										</view>
 										<view class="block-tag-box"
 											:style="{borderColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'}">
@@ -486,6 +479,19 @@
 				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%;
@@ -557,12 +563,13 @@
 		}
 	}
 
-	.index-box {
+	.tag {
 		background-color: #FFF;
 		height: 30rpx;
 		width: 10rpx;
 		border-radius: 100rpx;
 		margin-left: 10rpx;
+		opacity: 0.8;
 	}
 
 	//图表

+ 84 - 44
subpkg/calendar/calendar.vue

@@ -18,14 +18,11 @@
 						</view>
 						<view class="number-box">
 							<text class="number"
-								:style="{color: monthAttendQuality==='优秀'?'#4169E1':(monthAttendQuality === '良好'?'#f9c752':'#ff5959')}">{{monthAttendQuality}}</text>
-							<view class="number-detail">出勤</view>
+								:style="{color: monthAttendQuality==='优秀'?'#4169E1':(monthAttendQuality === '较差'?'#ff5959':'#f9c752')}">{{monthAttendQuality}}</text>
+							<view class="number-detail">本月出勤</view>
 						</view>
 					</view>
 				</view>
-				<!-- <view class="flex" style="justify-content: center;" >
-					<view class="image" :style="{backgroundImage:`url(${image})`}"></view>
-				</view> -->
 			</view>
 
 			<view class="card-item">
@@ -40,7 +37,7 @@
 					<view class="msg-box">
 						<view class="flex">
 							<text class="msg-text" style="font-weight: normal;font-size: 28rpx;">打卡时间:</text>
-							<text class="msg-text">{{attendanceTime}}</text>
+							<text class="msg-text">{{attendanceTime.replace('0','')}}</text>
 						</view>
 						<view class="flex">
 							<text class="msg-text" style="font-weight: normal;font-size: 28rpx;">出勤效率:</text>
@@ -48,6 +45,11 @@
 								:style="{color: attendanceQuality==='优秀'?'#4169E1':(attendanceQuality === '良好'?'#f9c752':'#3B4144')}">{{attendanceQuality}}</text>
 						</view>
 					</view>
+					<!-- 图片信息 -->
+					<view class="image" v-if="currentTodayData.isAttend === 1" :style="{backgroundImage:`url(${imageWorkday})`}"></view>
+					<view class="image" v-if="currentTodayData.isAttend === 7" :style="{backgroundImage:`url(${imageWeekend})`}"></view>
+					<view class="image" v-if="currentTodayData.isAttend === 0" :style="{backgroundImage:`url(${imageNoAttend})`}"></view>
+					<view class="image" v-if="currentTodayData.isAttend === -1" :style="{backgroundImage:`url(${imageNoArrive})`}"></view>
 				</view>
 			</view>
 		</view>
@@ -57,7 +59,8 @@
 
 <script>
 	import {
-		mapState, mapMutations
+		mapState,
+		mapMutations
 	} from 'vuex'
 	import zsyCalendar from '@/subpkg/z-calendar/zsy-calendar.vue'
 	export default {
@@ -70,25 +73,27 @@
 		},
 		data() {
 			return {
-				// image: 'https://image.meiye.art/pic_1632658822816Dw1wc8QoTOnItNvJI76v6',
 				//当日打卡信息
 				attendance: '',
 				attendanceTime: '',
 				attendanceQuality: '',
-				//当月天数
-				// monthDates: '',
 				monthAttendQuality: '',
-				//当月
-				month: '',
+				//点击当日信息
+				currentTodayData: '',
+				//日历月份
 				calendarMonth: '',
 				//控制事件参数
 				isFirst: false,
 				//当日时间参数
 				todayData: '',
+				imageWorkday: 'https://ouch-cdn2.icons8.com/z39mAYlsJUS2hKCBbkK_ktOIjma_qhkc5J0ANdyfiKU/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMTA3/L2FlZjQ4NmM4LTAz/NTYtNGRhNS04ZWQ2/LTBhMGIzMzdhZjNm/Mi5zdmc.png',
+				imageWeekend: 'https://ouch-cdn2.icons8.com/NJDdGibHzZkGZzgqe55ESzJ6_BrcgHO2bkz_vFG6PoY/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvNTg2/L2RlMmJhZDI4LTAz/NTQtNDMwNS1hNmQ2/LTU3Y2Y1ODJjNjc3/YS5zdmc.png',
+				imageNoAttend: 'https://ouch-cdn2.icons8.com/ehPeP69ypvrLonk6YkqIzV_WfKM1G-Ls9J7PuZvxRr8/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMzY3/L2QzZGNmODA5LTY3/ODUtNGFkOC1hOWVi/LWI4OWYyM2ZiMzNi/Yi5zdmc.png',
+				imageNoArrive: 'https://ouch-cdn2.icons8.com/WfSBIzy4iTGDtprvhW0wA2S8lPNRoqeZqvFsNbKsraw/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvODQ3/LzI1NDY1ZDdhLTVj/NDEtNGIzMy1iN2Q1/LTRhYjgwOGU2NDk5/OS5zdmc.png'
 			};
 		},
-		watch:{
-			calendarMonth(){
+		watch: {
+			calendarMonth() {
 				this.getMonthAttendQuality()
 			}
 		},
@@ -100,45 +105,72 @@
 			...mapMutations('m_children', ['updateNoAttendNum', 'updateIsAttendNum']),
 			//选中日期改变回调
 			change(e) {
-				if(this.isFirst === false){
+				//存入当前时间
+				if (this.isFirst === false) {
 					this.todayData = e
 					this.isFirst = true
-				}	
+				}
+				//点击当日信息
+				this.currentTodayData = e
+				console.log("日历点击",this.currentTodayData);
+				//日历月份
 				this.calendarMonth = e.month
-				let isAttendArr = this.records.filter(x => x.month === e.month&&x.year === e.year).length
+				//当前日历月份打卡数
+				let isAttendArr = this.records.filter(x => x.month === e.month && x.year === e.year).length
+				// 当前日历月统计
 				this.updateIsAttendNum(isAttendArr)
+				// 当前日历月天数
 				let monthDays = new Date(e.year, e.month, 0).getDate()
 				//在本年当前月之前
-				if(e.year===this.todayData.year&&e.month<this.todayData.month){
-					let noAttendArr = monthDays - isAttendArr
+				if (e.year === this.todayData.year && e.month < this.todayData.month) {
+					let weekendDates = 0
+					for (let i = 1; i <= monthDays; i++) {
+						if (new Date(`${e.year}-${e.month}-${i}`).getDay() === 0 ||
+							new Date(`${e.year}-${e.month}-${i}`).getDay() === 6) {
+							weekendDates++
+						}
+					}
+					let noAttendArr = monthDays - isAttendArr - weekendDates
 					this.updateNoAttendNum(noAttendArr)
 				}
 				//之前年份
-				if(e.year<this.todayData.year){
-					let noAttendArr = monthDays - isAttendArr
+				if (e.year < this.todayData.year) {
+					let weekendDates = 0
+					for (let i = 1; i <= monthDays; i++) {
+						if (new Date(`${e.year}-${e.month}-${i}`).getDay() === 0 ||
+							new Date(`${e.year}-${e.month}-${i}`).getDay() === 6) {
+							weekendDates++
+						}
+					}
+					let noAttendArr = monthDays - isAttendArr - weekendDates
 					this.updateNoAttendNum(noAttendArr)
 				}
 				//在本月
-				if(e.year===this.todayData.year&&e.month===this.todayData.month){
-					let noAttendArr = this.todayData.date - isAttendArr
+				if (e.year === this.todayData.year && e.month === this.todayData.month) {
+					let weekendDates = 0
+					for (let i = 1; i <= this.todayData.date; i++) {
+						if (new Date(`${e.year}-${e.month}-${i}`).getDay() === 0 ||
+							new Date(`${e.year}-${e.month}-${i}`).getDay() === 6) {
+							weekendDates++
+						}
+					}
+					let noAttendArr = this.todayData.date - isAttendArr - weekendDates
 					this.updateNoAttendNum(noAttendArr)
 				}
 				//在本年当月之后
-				if(e.year===this.todayData.year&&e.month>this.todayData.month){
-					this.updateNoAttendNum('未记录')
-					this.updateIsAttendNum('未记录')
+				if (e.year === this.todayData.year && e.month > this.todayData.month) {
+					this.updateNoAttendNum('暂无')
+					this.updateIsAttendNum('暂无')
 				}
 				//之后年份
-				if(e.year>this.todayData.year){
-					this.updateNoAttendNum('未记录')
-					this.updateIsAttendNum('未记录')
+				if (e.year > this.todayData.year) {
+					this.updateNoAttendNum('暂无')
+					this.updateIsAttendNum('暂无')
 				}
-				
+
 			},
 			//今日打卡
 			getTodayAttendance() {
-				//获取当月
-				this.month = new Date().getMonth() + 1
 				//获得当前时间时间戳
 				let timeNow = (new Date()).format("yyyy-M-dd")
 				let timeArr = timeNow.split("-")
@@ -147,9 +179,9 @@
 					//出勤状况
 					this.attendance = '未打卡',
 						//打卡时间
-						this.attendanceTime = '记录',
+						this.attendanceTime = '记录',
 						//出勤质量
-						this.attendanceQuality = '记录'
+						this.attendanceQuality = '记录'
 				} else {
 					this.attendance = '已打卡'
 					this.attendanceTime = info[0].time
@@ -158,9 +190,10 @@
 			},
 			//判断本月出勤质量
 			getMonthAttendQuality() {
-				this.monthAttendQuality = this.calendar.noAttendNum/30 <= 0.1 ? '优秀' : (this.calendar.noAttendNum/30 <= 0.2 ? '良好' : '较差')
-				if(this.calendar.noAttendNum === '未记录' && this.calendar.isAttendNum === '未记录'){
-					this.monthAttendQuality = '未记录'
+				this.monthAttendQuality = this.calendar.noAttendNum / 30 <= 0.1 ? '优秀' : (this.calendar.noAttendNum / 30 <=
+					0.2 ? '良好' : '较差')
+				if (this.calendar.noAttendNum === '暂无' && this.calendar.isAttendNum === '暂无') {
+					this.monthAttendQuality = '暂无'
 				}
 			},
 			//选择日期
@@ -174,13 +207,18 @@
 				}
 				if (dateInfo.isAttend === 0) {
 					this.attendance = '未打卡'
-					this.attendanceTime = '记录'
-					this.attendanceQuality = '记录'
+					this.attendanceTime = '记录'
+					this.attendanceQuality = '记录'
 				}
 				if (dateInfo.isAttend === -1) {
-					this.attendance = '未到日期'
-					this.attendanceTime = '未记录'
-					this.attendanceQuality = '未记录'
+					this.attendance = '时间未到'
+					this.attendanceTime = '无记录'
+					this.attendanceQuality = '无记录'
+				}
+				if (dateInfo.isAttend === 7) {
+					this.attendance = '周末休息'
+					this.attendanceTime = '无记录'
+					this.attendanceQuality = '无记录'
 				}
 			},
 
@@ -297,9 +335,11 @@
 		display: flex;
 		align-items: center;
 	}
+
 	.image {
-		width: 45%;
-		height: 250rpx;
+		margin-left: 30rpx;
+		width: 200rpx;
+		height: 200rpx;
 		border-radius: $card-border-radius;
 		background-size: 100%;
 		background-repeat: no-repeat;

+ 1 - 5
subpkg/common/infopage.scss

@@ -88,11 +88,7 @@
 				font-weight: bold;
 			}
 		}
-		.index{
-			height: 30rpx;
-			width: 10rpx;
-			border-radius: 100rpx;
-		}
+
 		.flex{
 			display: flex;
 			align-items: center;

+ 3 - 19
subpkg/common/videopage.scss

@@ -45,13 +45,6 @@
 				font-size: 30rpx;
 				color: $color-subtitle;
 			}
-		
-			.info-mini {
-				font-size: 20rpx;
-				margin-top: 10rpx;
-				font-weight: bold;
-				color: $color-title;
-			}
 		}
 		.list-name-box{
 			display: flex; 
@@ -68,7 +61,7 @@
 			}
 		}
 		.video-list{
-			margin: 14rpx 0;
+			margin: 16rpx 0;
 			display: flex;
 			align-items: center;
 			justify-content: center;
@@ -107,11 +100,6 @@
 				height: 70rpx;
 				width: 140rpx;
 				border-radius: 10rpx;
-				
-			}
-			.t-icon{
-				width: 50rpx;
-				height: 50rpx;
 			}
 		}
 		.flex-box{
@@ -125,14 +113,10 @@
 			justify-content: space-between;
 		}
 		.t-icon {
-			width: 60rpx;
-			height: 60rpx;
+			size: 60rpx;
 		}
-		.index{
+		.start-tag{
 			height: 40rpx;
-			width: 10rpx;
-			border-radius: 100rpx;
-			background-color: #4169E1;
 		}
 		.content-subtitle {
 			font-size: 25rpx;

+ 16 - 0
subpkg/detail/homework.vue

@@ -71,6 +71,22 @@
 			fixNum(num){
 				return num.toFixed(2)
 			},
+			openDocument(url) {
+				//下载并打开文档
+				uni.downloadFile({
+					url: url,
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				})
+			},
+			
 		}
 	}
 </script>

+ 4 - 4
subpkg/info/childrenpage.vue

@@ -33,7 +33,7 @@
 			<view style="display: flex; flex-wrap: wrap; align-items: center;margin: 0 40rpx 0 40rpx;">
 				<view class="data-box-item">
 					<view class="flex">
-						<view class="index" :style="{backgroundColor: '#4169E1'}"></view>
+						<view class="start-tag"></view>
 						<view class="item-text">考勤卡片</view>
 					</view>
 					<view class="avatar-box">
@@ -46,7 +46,7 @@
 
 				<view class="data-box-item">
 					<view class="flex">
-						<view class="index" :style="{backgroundColor: '#ff8caf'}"></view>
+						<view class="start-tag"></view>
 						<view class="item-text">成绩卡片</view>
 					</view>
 					<view class="avatar-box">
@@ -59,7 +59,7 @@
 
 				<view class="data-box-item">
 					<view class="flex">
-						<view class="index" :style="{backgroundColor: '#f9c752'}"></view>
+						<view class="start-tag"></view>
 						<view class="item-text">作业卡片</view>
 					</view>
 					<view class="avatar-box">
@@ -71,7 +71,7 @@
 				</view>
 				<view class="data-box-item">
 					<view class="flex">
-						<view class="index" :style="{backgroundColor: '#23b46c'}"></view>
+						<view class="start-tag"></view>
 						<view class="item-text">生活卡片</view>
 					</view>
 					<view class="avatar-box">

+ 14 - 1
subpkg/info/parentpage.vue

@@ -34,7 +34,8 @@
 			<view style="display: flex; flex-wrap: wrap; align-items: center;margin: 0 40rpx 0 40rpx;">
 				<view class="data-box-item" v-for="(item,index) in parentdetail.childrenList" :key="index">
 					<view class="flex">
-						<view class="index" :style="{backgroundColor: item.gender == '男' ? '#4169E1':'#ff8caf'}"></view>
+						<view class="start-tag-boy" v-show="item.gender == '男'"></view>
+						<view class="start-tag-girl" v-show="item.gender == '女'"></view>
 						<view class="item-text">{{item.name}}</view>
 					</view>
 					<view class="avatar-box">
@@ -89,5 +90,17 @@
 			width: 220rpx;
 			height: 220rpx;
 		}
+	}
+	.start-tag-boy{
+		height: 30rpx;
+		width: 10rpx;
+		border-radius: 100rpx;
+		background-image: linear-gradient($color-mixblue 60%, #FFF);
+	}
+	.start-tag-girl{
+		height: 30rpx;
+		width: 10rpx;
+		border-radius: 100rpx;
+		background-image: linear-gradient($color-pink 60%, #FFF);
 	}
 </style>

+ 1 - 1
subpkg/video/livepage.vue

@@ -39,7 +39,7 @@
 		</view>
 		<!-- 列表名 -->
 		<view class="list-name-box">
-			<view class="index"></view>
+			<view class="start-tag"></view>
 			<view class="list-name">直播与回放</view>
 		</view>
 

+ 1 - 1
subpkg/video/videopage.vue

@@ -39,7 +39,7 @@
 		</view>
 		<!-- 列表名 -->
 		<view class="list-name-box">
-			<view class="index"></view>
+			<view class="start-tag"></view>
 			<view class="list-name">直播与回放</view>
 		</view>
 

+ 27 - 10
subpkg/z-calendar/dateBox.vue

@@ -2,16 +2,18 @@
 	<!-- 日期显示 -->
 	<view class="date_box">
 		<view v-for="(dateInfo, dateIndex) in dates" :key="dateIndex" class="calendar_date__box">
-			<view class="calendar_date" :class="{ isSelected: dateInfo.isSelected }" :style="{
-						height: cellHeight + 'rpx',
-						width: cellHeight + 'rpx',
-						color: swiperMode === 'open' ? dateInfo.type === 'cur' ? '#3B4144' : '#959595' : '#3B4144',
-						backgroundColor: dateInfo.isSelected ? dateActiveColor : ''
-					}" @tap="chooseDate(dateInfo, dateIndex)">
+			<!-- 选择圆背景 -->
+			<view class="calendar_date" :class="{ isSelected: dateInfo.isSelected }" :style="{height: cellHeight + 'rpx',width: cellHeight + 'rpx',color: dateInfo.type === 'cur' ? '#3B4144' : '#aaaaaa' ,backgroundColor: dateInfo.isSelected ? dateActiveColor : ''}" @tap="chooseDate(dateInfo, dateIndex)">
+				<!-- 数字 -->
 				<view class="calendar_date__number">{{ dateInfo.date }}</view>
+				<!-- 今天 -->
 				<view class="calendar_date__isToday" v-if="dateInfo.isToday"
 					:style="{ backgroundColor: dateActiveColor }"></view>
-				<view class="calendar_date__cricle" :style="{backgroundColor: dateInfo.isAttend === 1 ? '#4169E1' : (dateInfo.isAttend === -1 ? '#FFF' : '#ff5959')}"></view>
+				<!-- 圆点 -->
+				<view class="cirle_attend" v-show="dateInfo.isAttend === 1" ></view>
+				<view class="cirle_noattend" v-show="dateInfo.isAttend === 0" ></view>
+				<view class="cirle_arrive_weekend" v-show="dateInfo.isAttend === -1 || dateInfo.isAttend === 7" ></view>
+				
 			</view>
 		</view>
 	</view>
@@ -92,10 +94,24 @@
 		left: 0;
 		border-radius: 50%;
 		z-index: -1;
-		opacity: 0.4;
+		opacity: 0.3;
 	}
-
-	.calendar_date .calendar_date__cricle {
+/* 圆点 */
+	.calendar_date .cirle_attend {
+		width: 9rpx;
+		height: 9rpx;
+		border-radius: 50%;
+		margin-top: 5rpx;
+		background-color: #4169E1;
+	}
+	.calendar_date .cirle_noattend {
+		width: 9rpx;
+		height: 9rpx;
+		border-radius: 50%;
+		margin-top: 5rpx;
+		background-color: #ff5959;
+	}
+	.calendar_date .cirle_arrive_weekend {
 		width: 9rpx;
 		height: 9rpx;
 		border-radius: 50%;
@@ -103,5 +119,6 @@
 		background-color: #FFFFFF;
 	}
 
+
 	/* 日历轮播 */
 </style>

+ 49 - 12
subpkg/z-calendar/zsy-calendar.vue

@@ -23,8 +23,7 @@
 				:current="current" :duration="duration" :skip-hidden-item-layout="true"
 				@change="e => current = e.detail.current">
 				<swiper-item v-for="(swiper, swiperIndex) in 3" :key="swiperIndex" class="swiper-item">
-					<DateBox :dates="calendarSwiperDates[swiperIndex]" :cellHeight="cellHeight"
-						:dateActiveColor="dateActiveColor" :swiperMode="swiperMode" @chooseDate="chooseDate" />
+					<DateBox :dates="calendarSwiperDates[swiperIndex]" :cellHeight="cellHeight" :swiperMode="swiperMode" @chooseDate="chooseDate" />
 				</swiper-item>
 			</swiper>
 		</view>
@@ -212,7 +211,7 @@
 								month: month === 1 ? 12 : month - 1,
 								date: prevMonthDates - i,
 								type: 'prev',
-								isAttend: 0,//未打卡
+								isAttend: 0, //未打卡
 							}
 							this.theDateIsToday(item)
 							calendarDate.unshift(item)
@@ -261,13 +260,46 @@
 						}
 					}
 				}
-				//当月时间
-				let currentMonth = (new Date).getMonth() + 1;
+				//周末数据
+				let weekendArr = []
+				//获取本月周末存为数组
+				const monthDays = new Date(year, month, 0).getDate()
+				for (let i = 1; i <= monthDays; i++) {
+					if (new Date(`${year}-${month}-${i}`).getDay() === 0 ||
+						new Date(`${year}-${month}-${i}`).getDay() === 6) {
+						weekendArr.push({
+							m: month,
+							d: i
+						})
+					}
+				}
+				//上一月
+				const prevMonthDays = new Date(year, month-1, 0).getDate()
+				for (let i = 1; i <= prevMonthDays; i++) {
+					if (new Date(`${year}-${month-1}-${i}`).getDay() === 0 ||
+						new Date(`${year}-${month-1}-${i}`).getDay() === 6) {
+						weekendArr.push({
+							m: month-1,
+							d: i
+						})
+					}
+				}
+				//下一月
+				const nextMonthDays = new Date(year, month+1, 0).getDate()
+				for (let i = 1; i <= nextMonthDays; i++) {
+					if (new Date(`${year}-${month+1}-${i}`).getDay() === 0 ||
+						new Date(`${year}-${month+1}-${i}`).getDay() === 6) {
+						weekendArr.push({
+							m: month+1,
+							d: i
+						})
+					}
+				}
+
 				//判断是否打卡和时间对比并修改数据
 				let todayDate = Date.now() //毫秒数
 				calendarDate.forEach(item => {
-					if (this.records.find(x => x.month === item.month && x.year === item.year && x.date === item
-							.date)) {
+					if (this.records.find(x => x.month === item.month && x.year === item.year && x.date === item.date)) {
 						item.isAttend = 1 //已打卡
 					}
 					//判断是否在当前日期之后
@@ -276,7 +308,9 @@
 						item.isAttend = -1 //时间未到
 					}
 					//判断是否为周末
-					// if(){}
+					if (weekendArr.find(x=>x.m === item.month && x.d === item.date)){
+						item.isAttend = 7 //周末数据
+					}
 				})
 
 				return calendarDate
@@ -328,8 +362,7 @@
 					throw Error('请检查参数是否符合规范')
 				}
 				this.selectedDate = date
-				this.initCalendarSwiperDates(() => {
-				})
+				this.initCalendarSwiperDates(() => {})
 			},
 			// 日历轮播展开的情况下选择日期
 			chooseDate(dateInfo, dateIndex) {
@@ -360,16 +393,20 @@
 			},
 			// 向父组件传递当前选中数据
 			emitDate() {
+				//获取当前日包含数据
 				const {
 					year,
 					month,
-					date
+					date,
+					isAttend
 				} = this.calendarSwiperDates[this.current][this.dateActive]
+				//传递数据
 				const e = {
 					selectedDate: this.selectedDate,
 					year,
 					month,
-					date
+					date,
+					isAttend
 				}
 				this.$emit('change', e)
 			},

+ 3 - 0
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js

@@ -8,6 +8,8 @@ const tooltip = {
 	"borderRadius": 6,
 	"bgOpacity": 0.5,
 	"splitLine": true,
+	"gridType": "dash",
+	"dashLength": 24,
 };
 //x轴配置
 const X = {
@@ -22,6 +24,7 @@ const Y = {
 	"data": [{
 		// "fontSize": 11,
 		// "min": 0,
+		axisLine: false,
 	}]
 };
 //图例配置

+ 52 - 32
utils/APIHandler.js

@@ -897,16 +897,6 @@ function initHome() {
 		month: 3,
 		year: 2022,
 		time: '08:19'
-	}, {
-		date: 2,
-		month: 4,
-		year: 2022,
-		time: '08:25'
-	}, {
-		date: 3,
-		month: 4,
-		year: 2022,
-		time: '08:09'
 	}, {
 		date: 4,
 		month: 4,
@@ -932,16 +922,6 @@ function initHome() {
 		month: 4,
 		year: 2022,
 		time: '08:05'
-	}, {
-		date: 9,
-		month: 4,
-		year: 2022,
-		time: '08:15'
-	}, {
-		date: 10,
-		month: 4,
-		year: 2022,
-		time: '08:19'
 	}, {
 		date: 11,
 		month: 4,
@@ -958,10 +938,20 @@ function initHome() {
 		year: 2022,
 		time: '08:13'
 	}, {
-		date: 18,
+		date: 14,
+		month: 4,
+		year: 2022,
+		time: '07:53'
+	}, {
+		date: 15,
 		month: 4,
 		year: 2022,
 		time: '08:01'
+	}, {
+		date: 18,
+		month: 4,
+		year: 2022,
+		time: '07:56'
 	}, {
 		date: 19,
 		month: 4,
@@ -972,7 +962,42 @@ function initHome() {
 		month: 4,
 		year: 2022,
 		time: '08:06'
-	}, {
+	},{
+		date: 21,
+		month: 4,
+		year: 2022,
+		time: '08:09'
+	},{
+		date: 22,
+		month: 4,
+		year: 2022,
+		time: '08:01'
+	},{
+		date: 25,
+		month: 4,
+		year: 2022,
+		time: '08:21'
+	},{
+		date: 26,
+		month: 4,
+		year: 2022,
+		time: '08:01'
+	},{
+		date: 27,
+		month: 4,
+		year: 2022,
+		time: '08:22'
+	},{
+		date: 28,
+		month: 4,
+		year: 2022,
+		time: '07:59'
+	},{
+		date: 29,
+		month: 4,
+		year: 2022,
+		time: '07:59'
+	},{
 		date: 5,
 		month: 5,
 		year: 2022,
@@ -982,16 +1007,6 @@ function initHome() {
 		month: 5,
 		year: 2022,
 		time: '08:06'
-	}, {
-		date: 7,
-		month: 5,
-		year: 2022,
-		time: '08:07'
-	}, {
-		date: 8,
-		month: 5,
-		year: 2022,
-		time: '08:27'
 	}, {
 		date: 9,
 		month: 5,
@@ -1007,6 +1022,11 @@ function initHome() {
 		month: 5,
 		year: 2022,
 		time: '08:07'
+	}, {
+		date: 12,
+		month: 5,
+		year: 2022,
+		time: '08:07'
 	}]
 	this.$store.commit('m_children/updateRecords', records)
 	let homeChartData = {