|
@@ -12,6 +12,7 @@ import numeral from 'numeral';
|
|
|
import { useECharts } from '@/hooks/web/useECharts';
|
|
|
import Pagination from '/src/components/pagination';
|
|
|
import { getTrainingStat } from '../api';
|
|
|
+import { getTrainingStatList } from '@/views/classList/api'
|
|
|
import {
|
|
|
getNowDateAndMonday,
|
|
|
getNowDateAndSunday,
|
|
@@ -85,8 +86,18 @@ export default defineComponent({
|
|
|
}
|
|
|
];
|
|
|
};
|
|
|
- const getList = () => {
|
|
|
- console.log('1');
|
|
|
+ const getList = async () => {
|
|
|
+ try{
|
|
|
+ const res = await getTrainingStatList({
|
|
|
+ page:1,
|
|
|
+ rows:999,
|
|
|
+ studentId: props.studentId,
|
|
|
+ ...getTimes(timer.value, ['startTime', 'endTime'], 'YYYY-MM-DD')
|
|
|
+ })
|
|
|
+ state.tableList = res.data.rows;
|
|
|
+ }catch(e){
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
};
|
|
|
const setChart = () => {
|
|
|
setOptions({
|
|
@@ -222,7 +233,7 @@ export default defineComponent({
|
|
|
payForm.timeList = res.data.trainingStatDetailList.map((item: any) => {
|
|
|
return item.practiceDuration;
|
|
|
});
|
|
|
- state.tableList = res.data.trainingStatDetailList;
|
|
|
+
|
|
|
setChart();
|
|
|
console.log(payForm);
|
|
|
} catch (e) {
|
|
@@ -232,6 +243,7 @@ export default defineComponent({
|
|
|
const search = () => {
|
|
|
state.pagination.page = 1;
|
|
|
getChartDetail();
|
|
|
+ getList()
|
|
|
console.log('search');
|
|
|
};
|
|
|
const onReset = () => {
|
|
@@ -240,11 +252,13 @@ export default defineComponent({
|
|
|
getNowDateAndSunday(new Date().getTime())
|
|
|
];
|
|
|
search();
|
|
|
+ getList()
|
|
|
console.log('onReset');
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
console.log(props.studentId);
|
|
|
getChartDetail();
|
|
|
+ getList()
|
|
|
});
|
|
|
return () => (
|
|
|
<>
|