mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 10:57:10 +08:00 
			
		
		
		
	refactor: 文件列表查询由分页调整为全部列表
This commit is contained in:
		@@ -22,19 +22,11 @@ export interface FileItem {
 | 
			
		||||
export interface ListParam {
 | 
			
		||||
  name?: string;
 | 
			
		||||
  type?: string;
 | 
			
		||||
  updateTime?: string;
 | 
			
		||||
  page?: number;
 | 
			
		||||
  size?: number;
 | 
			
		||||
  sort?: Array<string>;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface PageRes<T> {
 | 
			
		||||
  total: number;
 | 
			
		||||
  list: T;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function list(params: ListParam) {
 | 
			
		||||
  return axios.get<PageRes<FileItem[]>>(`${BASE_URL}`, {
 | 
			
		||||
  return axios.get<FileItem[]>(`${BASE_URL}/list`, {
 | 
			
		||||
    params,
 | 
			
		||||
    paramsSerializer: (obj) => {
 | 
			
		||||
      return qs.stringify(obj);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,7 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="root">
 | 
			
		||||
    <div class="header">
 | 
			
		||||
      <img
 | 
			
		||||
        :src="appStore.getLogo ?? './logo.svg'"
 | 
			
		||||
        alt="Logo"
 | 
			
		||||
        height="33"
 | 
			
		||||
      />
 | 
			
		||||
      <img :src="appStore.getLogo ?? './logo.svg'" alt="Logo" height="33" />
 | 
			
		||||
      <div class="logo-text">{{ appStore.getTitle }}</div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="container">
 | 
			
		||||
 
 | 
			
		||||
@@ -464,7 +464,7 @@
 | 
			
		||||
      isBatchMode.value = false;
 | 
			
		||||
      params.type = params.type === '0' ? undefined : params.type;
 | 
			
		||||
      const res = await list(params);
 | 
			
		||||
      fileList.value = res.data.list;
 | 
			
		||||
      fileList.value = res.data;
 | 
			
		||||
    } finally {
 | 
			
		||||
      loading.value = false;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -36,5 +36,5 @@ import top.charles7c.continew.starter.extension.crud.enums.Api;
 | 
			
		||||
 */
 | 
			
		||||
@Tag(name = "文件管理 API")
 | 
			
		||||
@RestController
 | 
			
		||||
@CrudRequestMapping(value = "/system/file", api = {Api.PAGE, Api.UPDATE, Api.DELETE})
 | 
			
		||||
@CrudRequestMapping(value = "/system/file", api = {Api.LIST, Api.UPDATE, Api.DELETE})
 | 
			
		||||
public class FileController extends BaseController<FileService, FileResp, FileResp, FileQuery, FileReq> {}
 | 
			
		||||
		Reference in New Issue
	
	Block a user