|
@@ -164,10 +164,15 @@
|
|
|
});
|
|
|
};
|
|
|
const handelRefrresh = async () => {
|
|
|
- await postClassTimeStatisticsRefreshStatistics({ id: unref(modelRef).id });
|
|
|
- closeModal();
|
|
|
+ try {
|
|
|
+ setModalProps({ loading: true, confirmLoading: true });
|
|
|
+ await postClassTimeStatisticsRefreshStatistics({ id: unref(modelRef).id });
|
|
|
+ closeModal();
|
|
|
|
|
|
- emit('success');
|
|
|
+ emit('success');
|
|
|
+ } finally {
|
|
|
+ setModalProps({ loading: false, confirmLoading: false });
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const handleExport = async () => {
|
|
@@ -193,8 +198,8 @@
|
|
|
width: 80,
|
|
|
customRender: ({ text, record }) => {
|
|
|
try {
|
|
|
- if (record.courseTimeTypeJson) {
|
|
|
- const courseTimeTypeData = JSON.parse(record.courseTimeTypeJson);
|
|
|
+ if (record.courseTimeTypeData) {
|
|
|
+ const courseTimeTypeData = JSON.parse(record.courseTimeTypeData);
|
|
|
if (courseTimeTypeData[text]) return courseTimeTypeData[text];
|
|
|
else return 0;
|
|
|
} else {
|