修改评查详情
This commit is contained in:
+26
-50
@@ -163,19 +163,6 @@ export default function RulesFiles() {
|
||||
setSearchParams(newParams);
|
||||
};
|
||||
|
||||
// 处理确认评查状态
|
||||
const handleConfirmStatus = async (id: string, status: string) => {
|
||||
try {
|
||||
await updateReviewStatus(id, status);
|
||||
// 刷新页面获取最新数据
|
||||
const newParams = new URLSearchParams(searchParams);
|
||||
setSearchParams(newParams);
|
||||
} catch (error) {
|
||||
console.error('更新评查状态失败:', error);
|
||||
// 可以在这里添加错误提示
|
||||
}
|
||||
};
|
||||
|
||||
// 渲染问题摘要
|
||||
const renderIssues = (file: ReviewFileUI) => {
|
||||
// 如果评查状态为通过,显示"所有评查点均通过"
|
||||
@@ -220,11 +207,13 @@ export default function RulesFiles() {
|
||||
key: "fileName",
|
||||
width: "30%",
|
||||
render: (_: unknown, file: ReviewFileUI) => (
|
||||
<div className="flex items-center">
|
||||
<FileIcon fileName={file.fileName} className="mr-2 text-lg flex-shrink-0 w-10 h-10" />
|
||||
<div>
|
||||
<div className="font-normal text-base break-words" title={file.fileName}>{file.fileName}</div>
|
||||
<div className="text-xs text-secondary mt-1">
|
||||
<div className="flex">
|
||||
<div className="flex-shrink-0 flex items-center self-center">
|
||||
<FileIcon fileName={file.fileName} className="text-lg w-10 h-10" />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1 flex flex-col py-2 ml-2">
|
||||
<div className="font-normal text-base break-words whitespace-normal leading-normal" title={file.fileName}>{file.fileName}</div>
|
||||
<div className="text-xs text-secondary mt-2">
|
||||
文件编号:{file.fileCode}
|
||||
</div>
|
||||
</div>
|
||||
@@ -283,27 +272,16 @@ export default function RulesFiles() {
|
||||
width: "14%",
|
||||
render: (_: unknown, file: ReviewFileUI) => (
|
||||
<>
|
||||
{file.reviewStatus === 'pending' ? (
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="ri-check-double-line"
|
||||
className="mr-2"
|
||||
onClick={() => handleConfirmStatus(file.id, 'pass')}
|
||||
>
|
||||
确认
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
type="default"
|
||||
size="small"
|
||||
icon="ri-eye-line"
|
||||
to={`/files/${file.id}`}
|
||||
className="mr-2"
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
type="default"
|
||||
size="small"
|
||||
icon="ri-eye-line"
|
||||
to={`/reviews?id=${file.id}`}
|
||||
className="mr-2"
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
|
||||
<Button type="default" size="small" icon="ri-download-2-line">
|
||||
下载
|
||||
</Button>
|
||||
@@ -357,16 +335,6 @@ export default function RulesFiles() {
|
||||
onChange={handleFilterChange}
|
||||
className="mr-2 w-40"
|
||||
/>
|
||||
|
||||
<SearchFilter
|
||||
label="搜索"
|
||||
placeholder="搜索文件名、合同编号或关键词"
|
||||
value={searchParams.get('keyword') || ''}
|
||||
onSearch={handleSearch}
|
||||
buttonText=""
|
||||
className="mr-2 w-64"
|
||||
/>
|
||||
|
||||
<FilterSelect
|
||||
label="排序方式"
|
||||
name="sortOrder"
|
||||
@@ -380,6 +348,14 @@ export default function RulesFiles() {
|
||||
{ value: "issue_count_asc", label: "问题数量 ↑" }
|
||||
]}
|
||||
/>
|
||||
<SearchFilter
|
||||
label="搜索"
|
||||
placeholder="搜索文件名、合同编号或关键词"
|
||||
value={searchParams.get('keyword') || ''}
|
||||
onSearch={handleSearch}
|
||||
buttonText=""
|
||||
className="mr-2 flex-1"
|
||||
/>
|
||||
</FilterPanel>
|
||||
|
||||
{/* 文件列表 */}
|
||||
@@ -389,7 +365,7 @@ export default function RulesFiles() {
|
||||
dataSource={files}
|
||||
rowKey="id"
|
||||
emptyText="暂无文件数据"
|
||||
className="files-table"
|
||||
className="files-table table-auto-height"
|
||||
/>
|
||||
|
||||
{/* 分页组件 */}
|
||||
|
||||
Reference in New Issue
Block a user