DESKTOP-USV654P\pc преди 3 месеца
родител
ревизия
202d6c0e07
променени са 1 файла, в които са добавени 3 реда и са изтрити 9 реда
  1. 3 9
      src/views/course/statistics/components/detail.vue

+ 3 - 9
src/views/course/statistics/components/detail.vue

@@ -73,7 +73,6 @@
     postClassTimeStatisticsRecordDetailExportQuery,
     getClassTimeStatisticsRecordDetailInfo,
   } from '/@/services/apis/ClassTimeStatisticsController';
-  import { useLoading } from '/@/components/Loading';
   import { formatToDate } from '/@/utils/dateUtil';
   import { downloadByData } from '/@/utils/file/download';
 
@@ -84,9 +83,6 @@
     index: 0,
   });
   const emit = defineEmits(['success', 'register']);
-  const [openFullLoading, closeFullLoading] = useLoading({
-    tip: '处理中...',
-  });
 
   const [registerTable, { setTableData, setColumns, redoHeight }] = useTable({
     title: '课时统计表',
@@ -119,8 +115,7 @@
   });
 
   const loadData = async () => {
-    setModalProps({ confirmLoading: true });
-    openFullLoading();
+    setModalProps({ confirmLoading: true, loading: true });
     modelRef.value = dataSoruce.data[dataSoruce.index];
     const resData = await getClassTimeStatisticsRecordDetailInfo({ id: unref(modelRef).id });
 
@@ -135,7 +130,7 @@
     const dataList: Recordable[] = [];
     try {
       if (resData) {
-        const { rowTitle, columnTitle, data, allClassTime } = JSON.parse(resData);
+        const { rowTitle, columnTitle, data, allClassTime } = resData;
 
         const totalRow: Recordable = { timeName: '合计课时' };
 
@@ -213,8 +208,7 @@
         redoHeight();
       }, 500);
     } finally {
-      setModalProps({ confirmLoading: false });
-      closeFullLoading();
+      setModalProps({ confirmLoading: false, loading: false });
     }
   };