From cf88306b1f6aade9f0c6c4fa5859872d3f177c4a Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Fri, 13 Sep 2024 14:56:29 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh
---
gz-customerSystem/src/views/register/matterDetail/FileTable.jsx | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
index aea5435..83dacd2 100644
--- a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
@@ -100,9 +100,9 @@
title: '操作',
dataIndex: 'perClassName',
key: 'perClassName',
- width: props.isReview ? 60 : 125,
+ width: props.isReview ? 80 : 140,
fixed: 'right',
- render: (text, record) => (
+ render: (text, record, index) => (
<Space size="middle">
<Link onClick={() => {
setSourceType(record.ownerType)
@@ -111,9 +111,9 @@
查看
</Link>
{!props.isReview && <Link onClick={() => {
- if (record.fileList && record.fileList.length != 0) {
- let ids = record.fileList?.map(item => item.id).join(',')
- handleDelete(ids)
+ if (record.fileInfoList && record.fileInfoList.length != 0) {
+ let ids = record.fileInfoList?.map(item => item.id).join(',')
+ handleDelete(ids, record, index)
} else {
$$.info({ type: 'warning', content: '还没上传关于该材料的文件!' });
}
@@ -323,11 +323,16 @@
}
//删除
- const handleDelete = (ids) => {
+ const handleDelete = (ids, record, index) => {
Modal.confirm({
title: '删除确认',
content: '确认全部删除该材料?',
onOk: async () => {
+ let newData = tableData;
+ newData[index] = { ...record, fileInfoList: record.fileInfoList.filter(i => (i.id !== ids)) }
+ console.log('newData', newData);
+
+ // setTableData(newData)
const res = await deleteFileByIdApi({ ids })
if (res.type) {
$$.infoSuccess({ content: '删除成功!' });
@@ -351,6 +356,7 @@
rowKey="ownerType"
bordered={true}
scroll={{ x: 1300 }}
+ tableHeight={137}
/>
<Modal
style={{ width: '512px' }}
--
Gitblit v1.8.0