浏览代码

Merge branch 'dev_2.0.0' of http://git.qmth.com.cn/scan-central/client-admin into dev_2.0.0

刘洋 9 月之前
父节点
当前提交
54f41f9f24
共有 3 个文件被更改,包括 6 次插入34 次删除
  1. 2 2
      src/render/ap/imageCheck.ts
  2. 4 24
      src/render/views/ImageCheck/ImageFailed.vue
  3. 0 8
      src/render/views/ImageCheck/index.vue

+ 2 - 2
src/render/ap/imageCheck.ts

@@ -36,7 +36,7 @@ export const imageCheckFailedExport = (
 ): Promise<AxiosResponse<Blob>> =>
   request({
     url: "/api/admin/check/image/failed/export",
-    method: "post",
+    method: "get",
     params: data,
-    responseType: "blob",
+    download: true,
   });

+ 4 - 24
src/render/views/ImageCheck/ImageFailed.vue

@@ -39,7 +39,7 @@ import { SwapLeftOutlined, ExportOutlined } from "@ant-design/icons-vue";
 import useTable from "@/hooks/useTable";
 import { ImageCheckFailedListItem } from "@/ap/types/imageCheck";
 import { imageCheckFailedList, imageCheckFailedExport } from "@/ap/imageCheck";
-import { downloadByApi } from "@/utils/download";
+// import { downloadByApi } from "@/utils/download";
 import useLoading from "@/hooks/useLoading";
 
 defineOptions({
@@ -73,11 +73,6 @@ const columns: TableProps["columns"] = [
     title: "有图片异常",
     dataIndex: "failed",
     width: "100px",
-    customCell: () => {
-      return {
-        class: "operation-cell",
-      };
-    },
   },
 ];
 
@@ -89,7 +84,7 @@ const searchModel = reactive({
 const { dataList, pagination, loading } = useTable<ImageCheckFailedListItem>(
   imageCheckFailedList,
   searchModel,
-  false
+  true
 );
 
 const { loading: downloading, setLoading } = useLoading();
@@ -97,9 +92,7 @@ async function onExport() {
   if (downloading.value) return;
 
   setLoading(true);
-  const res = await downloadByApi(() =>
-    imageCheckFailedExport(searchModel)
-  ).catch((e: Error) => {
+  const res = await imageCheckFailedExport(searchModel).catch((e: Error) => {
     message.error(e.message || "下载失败,请重新尝试!");
   });
   setLoading(false);
@@ -112,20 +105,7 @@ function goback() {
   router.back();
 }
 
-onMounted(() => {
-  dataList.value = [
-    {
-      subjectCode: "8956145235",
-      subjectName: "语法基础",
-      campusCode: "string",
-      campusName: "string",
-      examSite: "string",
-      examSiteName: "string",
-      examRoom: "string",
-      failed: false,
-    },
-  ];
-});
+onMounted(() => {});
 </script>
 
 <style lang="less" scoped>

+ 0 - 8
src/render/views/ImageCheck/index.vue

@@ -85,14 +85,6 @@ function onViewFailed(index: number) {
 }
 
 onMounted(() => {
-  // dataList.value = [
-  //   {
-  //     subjectCode: "8956145235",
-  //     subjectName: "语法基础",
-  //     imageCheckProgress: 89,
-  //     failedCount: 10,
-  //   },
-  // ];
   getData();
 });
 </script>