Browse Source

修改文件管理

chenbaoxin 3 months ago
parent
commit
bd834218b6
1 changed files with 13 additions and 3 deletions
  1. 13 3
      src/views/FileManagement/index.vue

+ 13 - 3
src/views/FileManagement/index.vue

@@ -160,6 +160,12 @@
           align="center"
           width="240"
         ></el-table-column>
+             <el-table-column label="上传状态" width="240" align="center">
+          <template v-slot="scope">
+         {{scope.row.status==0?'🟡上传中':scope.row.status==1?'🔵成功':'🔴失败'}}
+
+          </template>
+        </el-table-column>
         <el-table-column
           prop="remark"
           label="备注"
@@ -298,13 +304,17 @@ const getMockTotal = () => {
 };
 onMounted(() => {
   getMockTotal();
+
+  setInterval(()=>{
+    fetchData()
+  },5000)
 });
 const fetchDataFunction = async (
   page: number,
   pageSize: number
 ): Promise<PaginationResponse<DataItem>> => {
   try {
-    proxy.$loading.start();
+    // proxy.$loading.start();
     const response = await fileList({
       current: page,
       size: pageSize,
@@ -315,11 +325,11 @@ const fetchDataFunction = async (
       total: response.data.total,
     };
   } catch (error) {
-    proxy.$loading.stop();
+    // proxy.$loading.stop();
     console.error("获取数据失败:", error);
     throw error;
   } finally {
-    proxy.$loading.stop();
+    // proxy.$loading.stop();
   }
 };
 const pagination = useServerPagination<DataItem>(fetchDataFunction);