|
@@ -53,7 +53,7 @@ export default defineComponent({
|
|
page: 1,
|
|
page: 1,
|
|
rows: 20
|
|
rows: 20
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ statistics: {} as any,
|
|
orchestraInfo: {} as any // 乐团详情
|
|
orchestraInfo: {} as any // 乐团详情
|
|
})
|
|
})
|
|
|
|
|
|
@@ -107,6 +107,15 @@ export default defineComponent({
|
|
|
|
|
|
const getDetails = async () => {
|
|
const getDetails = async () => {
|
|
try {
|
|
try {
|
|
|
|
+ const { data } = await request.get('/api-school/orchestra/detail/' + route.query.id)
|
|
|
|
+ state.orchestraInfo = data || {}
|
|
|
|
+ } catch {
|
|
|
|
+ //
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const getStatistics = async () => {
|
|
|
|
+ try {
|
|
const { data } = await request.post('/api-school/classGroup/statistics', {
|
|
const { data } = await request.post('/api-school/classGroup/statistics', {
|
|
data: {
|
|
data: {
|
|
orchestraId: route.query.id,
|
|
orchestraId: route.query.id,
|
|
@@ -114,7 +123,7 @@ export default defineComponent({
|
|
endTime: state.params.endTime
|
|
endTime: state.params.endTime
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- state.orchestraInfo = data || {}
|
|
|
|
|
|
+ state.statistics = data || {}
|
|
|
|
|
|
initNumCountUp()
|
|
initNumCountUp()
|
|
} catch {
|
|
} catch {
|
|
@@ -164,16 +173,17 @@ export default defineComponent({
|
|
const initNumCountUp = () => {
|
|
const initNumCountUp = () => {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
// 在读学生
|
|
// 在读学生
|
|
- 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()
|
|
|
|
|
|
+ const statistics = state.statistics
|
|
|
|
+ new CountUp('currentStudentNum', statistics.studentNum || 0).start()
|
|
|
|
+ new CountUp('time1', statistics.attendanceRate || 0).start()
|
|
|
|
+ new CountUp('time2', statistics.homeworkRate || 0).start()
|
|
|
|
+ new CountUp('time3', statistics.homeworkQualifiedRate || 0).start()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getDetails()
|
|
getDetails()
|
|
|
|
+ getStatistics()
|
|
getList()
|
|
getList()
|
|
})
|
|
})
|
|
|
|
|
|
@@ -205,26 +215,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">{state.orchestraInfo.studentNum || 0}</span>
|
|
|
|
|
|
+ <span id="currentStudentNum">{state.statistics.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">{state.orchestraInfo.attendanceRate || 0}</span>%
|
|
|
|
|
|
+ <span id="time1">{state.statistics.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">{state.orchestraInfo.homeworkRate || 0}</span>%
|
|
|
|
|
|
+ <span id="time2">{state.statistics.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">{state.orchestraInfo.homeworkQualifiedRate || 0}</span>%
|
|
|
|
|
|
+ <span id="time3">{state.statistics.homeworkQualifiedRate || 0}</span>%
|
|
</p>
|
|
</p>
|
|
<p class={styles.name}>练习合格率</p>
|
|
<p class={styles.name}>练习合格率</p>
|
|
</GridItem>
|
|
</GridItem>
|
|
@@ -271,7 +281,8 @@ export default defineComponent({
|
|
)}
|
|
)}
|
|
|
|
|
|
{/* */}
|
|
{/* */}
|
|
- {state.orchestraInfo.type === 'DELIVERY' &&
|
|
|
|
|
|
+ {(state.orchestraInfo.deliveryType === 'SINGLE_DELIVERY' ||
|
|
|
|
+ state.orchestraInfo.deliveryType === 'MULTIPLE_DELIVERY') &&
|
|
['REGISTER', 'DOING', 'DONE'].includes(state.orchestraInfo.status) && (
|
|
['REGISTER', 'DOING', 'DONE'].includes(state.orchestraInfo.status) && (
|
|
<OSticky position="bottom">
|
|
<OSticky position="bottom">
|
|
<div class={'btnGroup'}>
|
|
<div class={'btnGroup'}>
|