|
@@ -93,8 +93,14 @@ export default defineComponent({
|
|
|
|
|
|
const getDetails = async () => {
|
|
const getDetails = async () => {
|
|
try {
|
|
try {
|
|
- const { data } = await request.get('/api-school/orchestra/detail/' + route.query.id)
|
|
|
|
|
|
+ const { data } = await request.get('/api-school/classGroup/statistics', {
|
|
|
|
+ params: {
|
|
|
|
+ orchestraId: route.query.id
|
|
|
|
+ }
|
|
|
|
+ })
|
|
state.orchestraInfo = data || {}
|
|
state.orchestraInfo = data || {}
|
|
|
|
+
|
|
|
|
+ initNumCountUp()
|
|
} catch {
|
|
} catch {
|
|
//
|
|
//
|
|
}
|
|
}
|
|
@@ -142,17 +148,17 @@ export default defineComponent({
|
|
const initNumCountUp = () => {
|
|
const initNumCountUp = () => {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
// 在读学生
|
|
// 在读学生
|
|
- new CountUp('currentStudentNum', Math.random() * 1000).start()
|
|
|
|
- new CountUp('time1', Math.random() * 100).start()
|
|
|
|
- new CountUp('time2', Math.random() * 100).start()
|
|
|
|
- new CountUp('time3', Math.random() * 100).start()
|
|
|
|
|
|
+ const orchestraInfo = state.orchestraInfo
|
|
|
|
+ new CountUp('currentStudentNum', orchestraInfo.studentNum || 0).start()
|
|
|
|
+ new CountUp('time1', orchestraInfo.attendanceRate || 0).start()
|
|
|
|
+ new CountUp('time2', orchestraInfo.homeworkRate || 0).start()
|
|
|
|
+ new CountUp('time3', orchestraInfo.homeworkQualifiedRate || 0).start()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getDetails()
|
|
getDetails()
|
|
getList()
|
|
getList()
|
|
- initNumCountUp()
|
|
|
|
})
|
|
})
|
|
|
|
|
|
return () => (
|
|
return () => (
|
|
@@ -183,26 +189,26 @@ export default defineComponent({
|
|
<Grid border={false} class={styles.gridContainer}>
|
|
<Grid border={false} class={styles.gridContainer}>
|
|
<GridItem>
|
|
<GridItem>
|
|
<p class={[styles.title, styles.red]}>
|
|
<p class={[styles.title, styles.red]}>
|
|
- <span id="currentStudentNum">0</span>
|
|
|
|
|
|
+ <span id="currentStudentNum">{state.orchestraInfo.studentNum || 0}</span>
|
|
<i>名</i>
|
|
<i>名</i>
|
|
</p>
|
|
</p>
|
|
<p class={styles.name}>在读学生</p>
|
|
<p class={styles.name}>在读学生</p>
|
|
</GridItem>
|
|
</GridItem>
|
|
<GridItem>
|
|
<GridItem>
|
|
<p class={[styles.title, styles.red]}>
|
|
<p class={[styles.title, styles.red]}>
|
|
- <span id="time1">0</span>%
|
|
|
|
|
|
+ <span id="time1">{state.orchestraInfo.attendanceRate || 0}</span>%
|
|
</p>
|
|
</p>
|
|
<p class={styles.name}>到课率</p>
|
|
<p class={styles.name}>到课率</p>
|
|
</GridItem>
|
|
</GridItem>
|
|
<GridItem>
|
|
<GridItem>
|
|
<p class={[styles.title, styles.red]}>
|
|
<p class={[styles.title, styles.red]}>
|
|
- <span id="time2">0</span>%
|
|
|
|
|
|
+ <span id="time2">{state.orchestraInfo.homeworkRate || 0}</span>%
|
|
</p>
|
|
</p>
|
|
<p class={styles.name}>作业提交率</p>
|
|
<p class={styles.name}>作业提交率</p>
|
|
</GridItem>
|
|
</GridItem>
|
|
<GridItem>
|
|
<GridItem>
|
|
<p class={[styles.title, styles.red]}>
|
|
<p class={[styles.title, styles.red]}>
|
|
- <span id="time3">0</span>%
|
|
|
|
|
|
+ <span id="time3">{state.orchestraInfo.homeworkQualifiedRate || 0}</span>%
|
|
</p>
|
|
</p>
|
|
<p class={styles.name}>练习合格率</p>
|
|
<p class={styles.name}>练习合格率</p>
|
|
</GridItem>
|
|
</GridItem>
|
|
@@ -273,7 +279,7 @@ export default defineComponent({
|
|
v-model:show={state.showQrcode}
|
|
v-model:show={state.showQrcode}
|
|
position="bottom"
|
|
position="bottom"
|
|
style={{ background: 'transparent' }}
|
|
style={{ background: 'transparent' }}
|
|
- safeAreaInsetBottom={true}
|
|
|
|
|
|
+ // safeAreaInsetBottom={true}
|
|
>
|
|
>
|
|
<div class={styles.codeContainer}>
|
|
<div class={styles.codeContainer}>
|
|
<div class={styles.codeImg}>
|
|
<div class={styles.codeImg}>
|