添加合同和卷宗数据隔离
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { postgrestGet, type PostgrestParams, postgrestPut, postgrestPost } from "../postgrest-client";
|
||||
import {getDocument} from "~/api/files/documents";
|
||||
import dayjs from "dayjs";
|
||||
import { formatDate } from "~/utils";
|
||||
// import { formatDate } from "~/utils";
|
||||
|
||||
/**
|
||||
* 从不同格式的 API 响应中提取数据
|
||||
|
||||
@@ -265,8 +265,14 @@ export async function getReviewFiles(searchParams: DocumentSearchParams = {}): P
|
||||
// 添加筛选条件
|
||||
const filter: Record<string, string> = {};
|
||||
|
||||
// 处理文件类型筛选
|
||||
if (searchParams.fileType) {
|
||||
filter['type_id'] = `eq.${searchParams.fileType}`;
|
||||
// 特殊处理 'record' 类型,表示 type_id 为 2 或 3
|
||||
if (searchParams.fileType === 'record') {
|
||||
filter['type_id'] = 'in.(2,3)';
|
||||
} else {
|
||||
filter['type_id'] = `eq.${searchParams.fileType}`;
|
||||
}
|
||||
}
|
||||
|
||||
if (searchParams.reviewStatus) {
|
||||
|
||||
Reference in New Issue
Block a user