添加合同和卷宗数据隔离

This commit is contained in:
2025-06-03 12:16:31 +08:00
parent b02978508d
commit 0397139ad8
20 changed files with 1190 additions and 437 deletions
+1 -1
View File
@@ -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 响应中提取数据
+7 -1
View File
@@ -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) {