|
@@ -9,101 +9,204 @@
|
|
:inactiveStyle="{fontWeight: 'bold',transform: 'scale(1)'}" lineColor="#4169E1" lineWidth="60">
|
|
:inactiveStyle="{fontWeight: 'bold',transform: 'scale(1)'}" lineColor="#4169E1" lineWidth="60">
|
|
</u-tabs>
|
|
</u-tabs>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <view class="module-box" v-for="(item,index) in pageData" :key="index" v-if="current == index">
|
|
|
|
- <!-- 详情头部卡片 -->
|
|
|
|
- <view class="card" :style="{backgroundColor: `${item.color}`}">
|
|
|
|
|
|
+ <!-- 模块卡片 -->
|
|
|
|
+ <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>
|
|
|
|
+ <text class="card-title" style="margin-left: 20rpx;">{{testData.length}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box" style="margin: 10rpx 0 0 0;">
|
|
|
|
+ <view class="flex">
|
|
|
|
+ <text class="card-subtitle">完成数量:</text>
|
|
|
|
+ <text class="card-subtitle" style="margin-left: 20rpx;">{{testFinish}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flex">
|
|
|
|
+ <text class="card-subtitle">完成情况:</text>
|
|
|
|
+ <text class="card-subtitle" style="margin-left: 20rpx;">{{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="box">
|
|
<view class="flex">
|
|
<view class="flex">
|
|
- <text class="card-title">今日{{item.name}}数:</text>
|
|
|
|
- <text class="card-title" style="margin-left: 20rpx;">{{item.detail.data.length}}</text>
|
|
|
|
|
|
+ <text class="card-title">今日作业数:</text>
|
|
|
|
+ <text class="card-title" style="margin-left: 20rpx;">{{homeworkData.length}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="box" style="margin: 10rpx 0 0 0;">
|
|
<view class="box" style="margin: 10rpx 0 0 0;">
|
|
<view class="flex">
|
|
<view class="flex">
|
|
<text class="card-subtitle">完成数量:</text>
|
|
<text class="card-subtitle">完成数量:</text>
|
|
- <text class="card-subtitle" style="margin-left: 20rpx;">{{finishData.length}}</text>
|
|
|
|
|
|
+ <text class="card-subtitle" style="margin-left: 20rpx;">{{homeworkFinish}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="flex">
|
|
<view class="flex">
|
|
<text class="card-subtitle">完成情况:</text>
|
|
<text class="card-subtitle">完成情况:</text>
|
|
- <text class="card-subtitle" style="margin-left: 20rpx;">{{item.level}}</text>
|
|
|
|
|
|
+ <text class="card-subtitle" style="margin-left: 20rpx;">{{list[1].level}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="image" :style="{backgroundImage:`url(${item.image})`}"></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>
|
|
|
|
+ <text class="card-title" style="margin-left: 20rpx;">{{activityData.length}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box" style="margin: 10rpx 0 0 0;">
|
|
|
|
+ <view class="flex">
|
|
|
|
+ <text class="card-subtitle">完成数量:</text>
|
|
|
|
+ <text class="card-subtitle" style="margin-left: 20rpx;">{{activityFinish}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flex">
|
|
|
|
+ <text class="card-subtitle">完成情况:</text>
|
|
|
|
+ <text class="card-subtitle" style="margin-left: 20rpx;">{{list[2].level}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="image" :style="{backgroundImage:`url(${list[2].image})`}"></view>
|
|
</view>
|
|
</view>
|
|
<!-- 中间标题 -->
|
|
<!-- 中间标题 -->
|
|
<view class="flex">
|
|
<view class="flex">
|
|
- <view class="cut-off">{{item.name}}信息</view>
|
|
|
|
|
|
+ <view class="cut-off" v-if="current == 0">评测信息</view>
|
|
|
|
+ <view class="cut-off" v-if="current == 1">作业信息</view>
|
|
|
|
+ <view class="cut-off" v-if="current == 2">活动信息</view>
|
|
</view>
|
|
</view>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <view class="detail-box" v-if="current == index">
|
|
|
|
|
|
+ <view class="detail-box">
|
|
|
|
+ <!-- 图表模块 -->
|
|
<view class="detail-box-item">
|
|
<view class="detail-box-item">
|
|
<view class="item-info">
|
|
<view class="item-info">
|
|
<view class="t-icon t-icon-ceping"></view>
|
|
<view class="t-icon t-icon-ceping"></view>
|
|
- <view class="item-text">近七天完成率</view>
|
|
|
|
|
|
+ <view class="item-text">近期完成率数据</view>
|
|
</view>
|
|
</view>
|
|
- <!-- 图表部分 -->
|
|
|
|
<view class="charts-box" v-if="current == 0">
|
|
<view class="charts-box" v-if="current == 0">
|
|
- <qiun-data-charts type="fin-area" :chartData="homeworkData.testData" :loadingType="4"
|
|
|
|
|
|
+ <qiun-data-charts type="fin-area" :chartData="assignment.testData" :loadingType="4"
|
|
:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0980111' />
|
|
:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0980111' />
|
|
</view>
|
|
</view>
|
|
<view class="charts-box" v-if="current == 1">
|
|
<view class="charts-box" v-if="current == 1">
|
|
- <qiun-data-charts type="fin-area" :chartData="homeworkData.homeworkData" :loadingType="4"
|
|
|
|
|
|
+ <qiun-data-charts type="fin-area" :chartData="assignment.homeworkData" :loadingType="4"
|
|
:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0933511' />
|
|
:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0933511' />
|
|
</view>
|
|
</view>
|
|
<view class="charts-box" v-if="current == 2">
|
|
<view class="charts-box" v-if="current == 2">
|
|
- <qiun-data-charts type="fin-area" :chartData="homeworkData.activityData" :loadingType="4"
|
|
|
|
|
|
+ <qiun-data-charts type="fin-area" :chartData="assignment.activityData" :loadingType="4"
|
|
:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0531032' />
|
|
:canvas2d='true' tooltipFormat='HomeworkPercent' canvasId='canvans0531032' />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- 完成列表 -->
|
|
|
|
- <view class="detail-box-item">
|
|
|
|
|
|
+ <!-- 详情列表 -->
|
|
|
|
+ <!-- 评测 -->
|
|
|
|
+ <view class="detail-box-item" v-if="current == 0">
|
|
<view class="item-info">
|
|
<view class="item-info">
|
|
- <view class="t-icon t-icon-shenhe"></view>
|
|
|
|
- <view class="item-text">今日已完成</view>
|
|
|
|
- <!-- 完成列表展示所有已完成的评测作业和活动信息 -->
|
|
|
|
|
|
+ <view class="t-icon t-icon-daiban"></view>
|
|
|
|
+ <view class="item-text">评测列表</view>
|
|
|
|
+ <view class="btn" @click="navData">
|
|
|
|
+ <view class="t-icon t-icon-fenlei"></view>
|
|
|
|
+ <view class="msg">详情列表</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view style="margin-bottom: 20rpx;">
|
|
<view style="margin-bottom: 20rpx;">
|
|
- <view class="block-box" v-for="(item,index) in finishData" :key="index">
|
|
|
|
- <view class="index" style="height: 100rpx;background-color: #00b894;"></view>
|
|
|
|
- <view class="class-block" style="height: 100rpx;width: 90%;">
|
|
|
|
- <view class="block-title">{{item.name}}</view>
|
|
|
|
- <view class="block-subtitle">科目:</view>
|
|
|
|
- <view class="block-tag-box">
|
|
|
|
- <view class="block-tag">{{item.subject}}</view>
|
|
|
|
|
|
+ <view class="block-box" v-for="(item,i) in testData" :key="i">
|
|
|
|
+ <view class="index" :style="{backgroundColor: item.examInfo.progress === 'finish'? '#23b46c':'#4169E1'} "></view>
|
|
|
|
+
|
|
|
|
+ <view class="class-block" style="width: 90%;">
|
|
|
|
+ <view style="width: 40%;">
|
|
|
|
+ <view class="list-item-title">{{item.examInfo.name}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="block-subtitle">布置老师:</view>
|
|
|
|
- <view class="block-tag-box">
|
|
|
|
- <view class="block-tag">{{item.teacher}}</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">
|
|
|
|
+ <view class="block-tag">
|
|
|
|
+ {{item.examInfo.progress === 'finish' ? '已完成' : (item.examInfo.progress === 'going' ? '进行中' : '待发布')}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- 列表 -->
|
|
|
|
- <view class="detail-box-item">
|
|
|
|
|
|
+ <!-- 作业 -->
|
|
|
|
+ <view class="detail-box-item" v-if="current == 1">
|
|
<view class="item-info">
|
|
<view class="item-info">
|
|
<view class="t-icon t-icon-daiban"></view>
|
|
<view class="t-icon t-icon-daiban"></view>
|
|
- <view class="item-text">{{item.detail.title}}</view>
|
|
|
|
- <!-- 详情列表展示(评测,活动或者作业)信息 -->
|
|
|
|
- <view style="display: flex; align-items: center;margin: 0 5rpx 0 auto;" @click="navData(index)">
|
|
|
|
|
|
+ <view class="item-text">作业列表</view>
|
|
|
|
+ <view class="btn" @click="navData">
|
|
<view class="t-icon t-icon-fenlei"></view>
|
|
<view class="t-icon t-icon-fenlei"></view>
|
|
<view class="msg">详情列表</view>
|
|
<view class="msg">详情列表</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view style="margin-bottom: 20rpx;">
|
|
<view style="margin-bottom: 20rpx;">
|
|
- <view class="block-box" v-for="(i,x) in item.detail.data" :key="x">
|
|
|
|
- <view class="index" :style="{height: 100+'rpx',backgroundColor: current === 0 ? '#4169E1':(current === 1 ? '#ff8caf': '#f9c752')}"></view>
|
|
|
|
- <view class="class-block" style="height: 100rpx; width: 90%;">
|
|
|
|
- <view class="block-title">{{i.name}}</view>
|
|
|
|
- <view class="block-tag-box">
|
|
|
|
- <view class="block-tag">{{i.subject}}</view>
|
|
|
|
|
|
+ <view class="block-box" v-for="(item,i) in homeworkData" :key="i">
|
|
|
|
+ <view class="index" :style="{backgroundColor: item.work.progress === 'finish'? '#23b46c':'#ff8caf'}" ></view>
|
|
|
|
+ <view class="class-block" style="width: 90%;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="margin-left: 40rpx;">
|
|
|
|
+ <view class="block-tag">{{item.work.scope === 'private' ? '个人':'学校'}}作业
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="block-tag-box" style="margin-left: 20rpx;">
|
|
|
|
+ <view class="block-tag">
|
|
|
|
+ {{item.work.progress === 'finish' ? '已完成' : (item.work.progress === 'going' ? '进行中' : '待发布')}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <rich-text class="block-subtitle" style="margin:10rpx 0 0 30rpx;"
|
|
|
|
+ :nodes="item.work.description"></rich-text>
|
|
</view>
|
|
</view>
|
|
- <view class="block-tag-box">
|
|
|
|
- <view class="block-tag">{{i.teacher}}</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="navData">
|
|
|
|
+ <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">
|
|
|
|
+ <view class="index" :style="{ backgroundColor: item.survey.progress === 'finish' || item.vote.progress === 'finish'? '#23b46c':'#f9c752'}" ></view>
|
|
|
|
+ <view class="class-block" style="width: 90%;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="margin-left: 40rpx;">
|
|
|
|
+ <view class="block-tag">
|
|
|
|
+ {{item.survey.scope === 'private' ? '个人':'学校' || item.vote.scope === 'private' ? '个人':'学校'}}活动
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="block-tag-box" style="margin-left: 20rpx;">
|
|
|
|
+ <view class="block-tag">
|
|
|
|
+ {{item.survey.progress === 'finish' || item.vote.progress === 'finish' ? '已完成' : (item.survey.progress === 'going' || item.vote.progress === 'going' ? '进行中' : '待发布')}}
|
|
|
|
+ </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 class="block-subtitle">{{i.description}}</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -123,39 +226,44 @@
|
|
} from 'vuex'
|
|
} from 'vuex'
|
|
export default {
|
|
export default {
|
|
computed: {
|
|
computed: {
|
|
- ...mapState('m_chart', ['homeworkData']),
|
|
|
|
|
|
+ ...mapState('m_chart', ['assignment']),
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
//模块名
|
|
//模块名
|
|
list: [{
|
|
list: [{
|
|
- name: '评测详情'
|
|
|
|
|
|
+ name: '评测详情',
|
|
|
|
+ level: '',
|
|
|
|
+ image: 'https://ouch-cdn2.icons8.com/yFl5NWU3aVehLBlQf9ctvnZPqtm5U0hqM3IzWvFDCaQ/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNzY5/LzY1ZTQxZmZjLTg1/YWQtNDYyMi1hYzU0/LWQ3NDEzZmY2NGI1/YS5wbmc.png',
|
|
}, {
|
|
}, {
|
|
- name: '作业详情'
|
|
|
|
|
|
+ name: '作业详情',
|
|
|
|
+ level: '',
|
|
|
|
+ image: 'https://ouch-cdn2.icons8.com/AVOwJ9emg_ZOeHvQaunQAZlgeLsG-b1cGhiYvgoJ06g/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvNTAw/LzI5YjU1YWQ4LWMw/YTEtNDE1MS1iYmQw/LWIyMDdhYmRkOTE0/Mi5wbmc.png',
|
|
}, {
|
|
}, {
|
|
- name: '活动详情'
|
|
|
|
|
|
+ name: '活动详情',
|
|
|
|
+ level: '',
|
|
|
|
+ image: 'https://ouch-cdn2.icons8.com/LW70TMgW1cGfYeGNSTEp7__kiKVgIhwdZwUmykdLYMY/rs:fit:912:912/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9wbmcvOTI0/LzU3MWU4ZDZkLTg0/NzEtNGM5YS04MDJk/LTEzNTM5YmZmZTM2/YS5wbmc.png',
|
|
}],
|
|
}],
|
|
//当前模块
|
|
//当前模块
|
|
current: 0,
|
|
current: 0,
|
|
//页面数据内容
|
|
//页面数据内容
|
|
- pageData: '',
|
|
|
|
|
|
+ testData: {},
|
|
|
|
+ homeworkData: {},
|
|
|
|
+ activityData: {},
|
|
//完成内容
|
|
//完成内容
|
|
- finishData: [],
|
|
|
|
|
|
+ testFinish: '',
|
|
|
|
+ homeworkFinish: '',
|
|
|
|
+ activityFinish: '',
|
|
//历史数据
|
|
//历史数据
|
|
historyData: {
|
|
historyData: {
|
|
- test: [90, 89, 98, 100, 50, 55, 60],
|
|
|
|
- homework: [10, 29, 38, 60, 50, 88, 100],
|
|
|
|
|
|
+ test: [50, 55, 60],
|
|
|
|
+ homework: [10, 60, 50, 88, 100],
|
|
activity: [70, 19, 28, 40, 60, 100, 83]
|
|
activity: [70, 19, 28, 40, 60, 100, 83]
|
|
},
|
|
},
|
|
//时间戳
|
|
//时间戳
|
|
timeStamp: '',
|
|
timeStamp: '',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- watch: {
|
|
|
|
- current() {
|
|
|
|
- this.getFinishData()
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.init()
|
|
this.init()
|
|
if (options.index)
|
|
if (options.index)
|
|
@@ -170,38 +278,32 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations('m_chart', ['updateTestArea', 'updateHomeworkArea', 'updateActivityArea']),
|
|
...mapMutations('m_chart', ['updateTestArea', 'updateHomeworkArea', 'updateActivityArea']),
|
|
- ...mapMutations('m_children', ['updateHomeworkDetail']),
|
|
|
|
|
|
+ ...mapMutations('m_children', ['updateDetail']),
|
|
//初始化页面
|
|
//初始化页面
|
|
init() {
|
|
init() {
|
|
- this.$getTimeStamp()
|
|
|
|
|
|
+ this.timeStamp = (new Date()).format("hh:mm")
|
|
this.$initHomework()
|
|
this.$initHomework()
|
|
this.saveToStudyChart()
|
|
this.saveToStudyChart()
|
|
this.getLevel()
|
|
this.getLevel()
|
|
- this.getFinishData()
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//更改模块
|
|
//更改模块
|
|
- changeModule(index) {
|
|
|
|
- this.current = index.index
|
|
|
|
|
|
+ changeModule(e) {
|
|
|
|
+ this.current = e.index
|
|
},
|
|
},
|
|
//获得评判信息
|
|
//获得评判信息
|
|
getLevel() {
|
|
getLevel() {
|
|
- this.pageData[0].level = this.historyData.test[6] >= 40 ? (this.historyData.test[6] >= 70 ? '优秀' : '良好') :
|
|
|
|
- '较差'
|
|
|
|
- this.pageData[1].level = this.historyData.homework[6] >= 40 ? (this.historyData.homework[6] >= 70 ? '优秀' :
|
|
|
|
- '良好') : '较差'
|
|
|
|
- this.pageData[2].level = this.historyData.activity[6] >= 40 ? (this.historyData.activity[6] >= 70 ? '优秀' :
|
|
|
|
- '良好') : '较差'
|
|
|
|
- },
|
|
|
|
- //获得完成数量
|
|
|
|
- getFinishData() {
|
|
|
|
- if (this.current === 0)
|
|
|
|
- this.finishData = this.pageData[0].detail.data.filter(x => x.finish === true)
|
|
|
|
- if (this.current === 1)
|
|
|
|
- this.finishData = this.pageData[1].detail.data.filter(x => x.finish === true)
|
|
|
|
- if (this.current === 2)
|
|
|
|
- this.finishData = this.pageData[2].detail.data.filter(x => x.finish === true)
|
|
|
|
|
|
+ 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() {
|
|
saveToStudyChart() {
|
|
let temp = {
|
|
let temp = {
|
|
categories: [],
|
|
categories: [],
|
|
@@ -210,30 +312,57 @@
|
|
"data": []
|
|
"data": []
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
- //时间
|
|
|
|
- temp.categories = this.$getRecentDateArray(7)
|
|
|
|
|
|
+ // 测试
|
|
|
|
+ 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
|
|
temp.series[0].data = this.historyData.test
|
|
let testDataTemp = JSON.parse(JSON.stringify(temp))
|
|
let testDataTemp = JSON.parse(JSON.stringify(temp))
|
|
this.updateTestArea(testDataTemp)
|
|
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
|
|
temp.series[0].data = this.historyData.homework
|
|
let homeworkDataTemp = JSON.parse(JSON.stringify(temp))
|
|
let homeworkDataTemp = JSON.parse(JSON.stringify(temp))
|
|
this.updateHomeworkArea(homeworkDataTemp)
|
|
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
|
|
temp.series[0].data = this.historyData.activity
|
|
let activityDataTemp = JSON.parse(JSON.stringify(temp))
|
|
let activityDataTemp = JSON.parse(JSON.stringify(temp))
|
|
this.updateActivityArea(activityDataTemp)
|
|
this.updateActivityArea(activityDataTemp)
|
|
},
|
|
},
|
|
//导航到详情页面
|
|
//导航到详情页面
|
|
- navData(index) {
|
|
|
|
- this.updateHomeworkDetail(this.pageData[this.current].detail.data)
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: `/subpkg/detaillist/detaillist?index=${index}`
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ navData() {
|
|
|
|
+ if (this.current === 0) {
|
|
|
|
+ this.updateDetail(this.testData)
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/subpkg/detaillist/examlist`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (this.current === 1) {
|
|
|
|
+ this.updateDetail(this.homeworkData)
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/subpkg/detaillist/homeworklist`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (this.current === 2) {
|
|
|
|
+ this.updateDetail(this.activityData)
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/subpkg/detaillist/activitylist`
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -241,6 +370,12 @@
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
@import '@/pages/common/blockmsg.scss';
|
|
@import '@/pages/common/blockmsg.scss';
|
|
|
|
|
|
|
|
+ .list-item-title {
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: $color-title;
|
|
|
|
+ }
|
|
|
|
+
|
|
.home-topinfo {
|
|
.home-topinfo {
|
|
background: linear-gradient($color-yellow, $page-background-color) !important;
|
|
background: linear-gradient($color-yellow, $page-background-color) !important;
|
|
}
|
|
}
|
|
@@ -260,13 +395,13 @@
|
|
border-radius: $card-border-radius;
|
|
border-radius: $card-border-radius;
|
|
|
|
|
|
.card-title {
|
|
.card-title {
|
|
- font-size: 48rpx;
|
|
|
|
|
|
+ font-size: 50rpx;
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
color: #FFF;
|
|
color: #FFF;
|
|
}
|
|
}
|
|
|
|
|
|
.card-subtitle {
|
|
.card-subtitle {
|
|
- font-size: 28rpx;
|
|
|
|
|
|
+ font-size: 30rpx;
|
|
color: #FFF;
|
|
color: #FFF;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -357,4 +492,10 @@
|
|
margin-left: 10rpx;
|
|
margin-left: 10rpx;
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .btn {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin: 0 5rpx 0 auto;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|