|
|
@ -247,7 +247,7 @@ |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="item" style="height: 630px"> |
|
|
|
<div class="item" style="height: 300px"> |
|
|
|
<div class="t_line_box"> |
|
|
|
<div class="t_line_box"> |
|
|
|
<i class="t_l_line"></i> |
|
|
|
<i class="t_l_line"></i> |
|
|
|
<i class="l_t_line"></i> |
|
|
|
<i class="l_t_line"></i> |
|
|
@ -274,20 +274,20 @@ |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<th width="20%">名次</th> |
|
|
|
<th width="20%">名次</th> |
|
|
|
<th width="20%">姓名</th> |
|
|
|
<th width="20%">姓名</th> |
|
|
|
<th width="20%">班级</th> |
|
|
|
<th width="20%">{{ token ? '班级' : '学校' }}</th> |
|
|
|
<th width="20%">练习次数</th> |
|
|
|
<th width="20%">练习次数</th> |
|
|
|
<th width="20%">平均分</th> |
|
|
|
<th width="20%">平均分</th> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
</thead> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="main_table" ref="ach" style="max-height: 520px;margin-top: 0;overflow: hidden"> |
|
|
|
<div class="main_table" ref="ach" style="max-height: 220px;margin-top: 0;overflow: hidden"> |
|
|
|
<table> |
|
|
|
<table> |
|
|
|
<tbody> |
|
|
|
<tbody> |
|
|
|
<tr v-for="(item, i) in achs" :key="i"> |
|
|
|
<tr v-for="(item, i) in achs" :key="i"> |
|
|
|
<td width="20%">{{ i + 1 }}</td> |
|
|
|
<td width="20%">{{ i + 1 }}</td> |
|
|
|
<td width="20%">{{ item.userName }}</td> |
|
|
|
<td width="20%">{{ item.userName }}</td> |
|
|
|
<td width="20%">{{ item.className }}</td> |
|
|
|
<td width="20%">{{ token ? item.className : item.schoolName }}</td> |
|
|
|
<td width="20%">{{ item.practiceNumber }}</td> |
|
|
|
<td width="20%">{{ item.practiceNumber }}</td> |
|
|
|
<td width="20%">{{ item.avgScore }}</td> |
|
|
|
<td width="20%">{{ item.avgScore }}</td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
@ -295,6 +295,50 @@ |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="item" style="height: 300px"> |
|
|
|
|
|
|
|
<div class="t_line_box"> |
|
|
|
|
|
|
|
<i class="t_l_line"></i> |
|
|
|
|
|
|
|
<i class="l_t_line"></i> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="t_line_box"> |
|
|
|
|
|
|
|
<i class="t_r_line"></i> |
|
|
|
|
|
|
|
<i class="r_t_line"></i> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="t_line_box"> |
|
|
|
|
|
|
|
<i class="l_b_line"></i> |
|
|
|
|
|
|
|
<i class="b_l_line"></i> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="t_line_box"> |
|
|
|
|
|
|
|
<i class="r_b_line"></i> |
|
|
|
|
|
|
|
<i class="b_r_line"></i> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_title"> |
|
|
|
|
|
|
|
<img src="@/assets/img/screen/t_7.png" alt=""> |
|
|
|
|
|
|
|
活跃度排行榜 |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_table"> |
|
|
|
|
|
|
|
<table> |
|
|
|
|
|
|
|
<thead> |
|
|
|
|
|
|
|
<tr> |
|
|
|
|
|
|
|
<th width="20%">名次</th> |
|
|
|
|
|
|
|
<th width="20%">{{ token ? '班级' : '学校' }}</th> |
|
|
|
|
|
|
|
<th width="20%">活跃指数</th> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</thead> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_table" ref="active" style="max-height: 220px;margin-top: 0;overflow: hidden"> |
|
|
|
|
|
|
|
<table> |
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
|
|
|
<tr v-for="(item, i) in actives" :key="i"> |
|
|
|
|
|
|
|
<td width="20%">{{ i + 1 }}</td> |
|
|
|
|
|
|
|
<td width="20%">{{ token ? item.className : item.schoolName }}</td> |
|
|
|
|
|
|
|
<td width="20%">{{ item.activityIndex }}</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -307,6 +351,7 @@ import Setting from '@/setting' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
token: Util.local.get(Setting.tokenKey), |
|
|
|
time: 0, |
|
|
|
time: 0, |
|
|
|
times: [ |
|
|
|
times: [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -324,6 +369,7 @@ export default { |
|
|
|
courses: [], |
|
|
|
courses: [], |
|
|
|
popularCourses: [], |
|
|
|
popularCourses: [], |
|
|
|
achs: [], |
|
|
|
achs: [], |
|
|
|
|
|
|
|
actives: [], |
|
|
|
examChart: null |
|
|
|
examChart: null |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -381,6 +427,11 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.achs = list |
|
|
|
this.achs = list |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 活跃度排行榜 |
|
|
|
|
|
|
|
this.$post(this.api.activityRanking).then(({ list }) => { |
|
|
|
|
|
|
|
this.actives = list |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
this.scrollTable() |
|
|
|
this.scrollTable() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 切换时间单位 |
|
|
|
// 切换时间单位 |
|
|
@ -453,7 +504,7 @@ export default { |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取图标数据并渲染 |
|
|
|
// 获取图标数据并渲染 |
|
|
|
renderChart() { |
|
|
|
async renderChart() { |
|
|
|
const animateChart = (chart, option, data, num = 6) => { |
|
|
|
const animateChart = (chart, option, data, num = 6) => { |
|
|
|
// 每次向后滚动一个,最后一个从头开始。 |
|
|
|
// 每次向后滚动一个,最后一个从头开始。 |
|
|
|
if (option.dataZoom[0].endValue == data.length ) { |
|
|
|
if (option.dataZoom[0].endValue == data.length ) { |
|
|
@ -650,9 +701,24 @@ export default { |
|
|
|
color2: 'rgba(156, 163, 2, 0.4)' |
|
|
|
color2: 'rgba(156, 163, 2, 0.4)' |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
this.$get(this.api.schoolCourse).then(({ data }) => { |
|
|
|
// 登录前登录后调的课程接口不一样 |
|
|
|
const courseList = data |
|
|
|
const cousrseRes = this.token ? |
|
|
|
const ids = data.map(e => e.cid) |
|
|
|
await this.$get(this.api.schoolCourse) : |
|
|
|
|
|
|
|
await this.$post(this.api.curriculumListForBeforeLogin, { |
|
|
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
|
|
pageSize: 100, |
|
|
|
|
|
|
|
supplierId: '1,2,3,4', |
|
|
|
|
|
|
|
curriculumName: '', |
|
|
|
|
|
|
|
categoryId: '', |
|
|
|
|
|
|
|
curriculumType: '', |
|
|
|
|
|
|
|
professionalCategoryId: '', |
|
|
|
|
|
|
|
professionalId: '', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (cousrseRes) { |
|
|
|
|
|
|
|
const courseList = this.token ? |
|
|
|
|
|
|
|
cousrseRes.data : |
|
|
|
|
|
|
|
cousrseRes.page.records |
|
|
|
|
|
|
|
const ids = courseList.map(e => e.cid) |
|
|
|
times.map(e => { |
|
|
|
times.map(e => { |
|
|
|
e.cid = ids |
|
|
|
e.cid = ids |
|
|
|
}) |
|
|
|
}) |
|
|
@ -801,7 +867,7 @@ export default { |
|
|
|
// animateChart(chart[1], option, times) |
|
|
|
// animateChart(chart[1], option, times) |
|
|
|
// }, 5000) |
|
|
|
// }, 5000) |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(err => {}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 月人均在线学习时长情况 |
|
|
|
// 月人均在线学习时长情况 |
|
|
|
const date = new Date() |
|
|
|
const date = new Date() |
|
|
@ -1018,12 +1084,16 @@ export default { |
|
|
|
scrollTable() { |
|
|
|
scrollTable() { |
|
|
|
const dom = this.$refs.popularCourses |
|
|
|
const dom = this.$refs.popularCourses |
|
|
|
const dom1 = this.$refs.ach |
|
|
|
const dom1 = this.$refs.ach |
|
|
|
|
|
|
|
const dom2 = this.$refs.active |
|
|
|
setInterval(() => { |
|
|
|
setInterval(() => { |
|
|
|
dom.scrollTop += 1 |
|
|
|
dom.scrollTop += 1 |
|
|
|
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0 |
|
|
|
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0 |
|
|
|
|
|
|
|
|
|
|
|
dom1.scrollTop += 1 |
|
|
|
dom1.scrollTop += 1 |
|
|
|
if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0 |
|
|
|
if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dom2.scrollTop += 1 |
|
|
|
|
|
|
|
if (dom2.clientHeight + dom2.scrollTop === dom2.scrollHeight) dom2.scrollTop = 0 |
|
|
|
}, 30) |
|
|
|
}, 30) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|