From ae1ed54b82a951a28da33391d4445280f86e9f7b Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Wed, 11 Sep 2024 09:55:48 +0800
Subject: [PATCH] fix: bug
---
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 9 ++++++++-
gz-customerSystem/src/views/register/matterDetail/FileTable.jsx | 23 +++++++++++++----------
gz-customerSystem/src/views/register/visit/preview.jsx | 4 +++-
gz-customerSystem/src/api/appUrl.js | 4 ++--
gz-customerSystem/src/views/register/visit/index.jsx | 4 ++--
gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx | 4 ++--
gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx | 9 ++++++++-
7 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/gz-customerSystem/src/api/appUrl.js b/gz-customerSystem/src/api/appUrl.js
index 7424d14..6bfac1c 100644
--- a/gz-customerSystem/src/api/appUrl.js
+++ b/gz-customerSystem/src/api/appUrl.js
@@ -10,11 +10,11 @@
export const debug = {
// web服务
// baseUrl: 'http://gz.hugeinfo.com.cn',
- baseUrl: "http://6dycet.natappfree.cc",
+ baseUrl: "http://kjqw4y.natappfree.cc",
// baseUrl: 'http://mdqgnh.natappfree.cc',
// 附件服务
- fileUrl: "http://6dycet.natappfree.cc",
+ fileUrl: "http://kjqw4y.natappfree.cc",
// fileUrl: 'http://gz.hugeinfo.com.cn',
// 文件查看url 后面接附件编号
diff --git a/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx b/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx
index a93a3b7..4a2727f 100644
--- a/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx
+++ b/gz-customerSystem/src/views/register/eventFlow/component/Examine.jsx
@@ -118,7 +118,14 @@
<Col span={24}>
<div><div className="title-text">附件材料</div></div>
<div style={{ color: '#1A6FB8' }}>
- <img src={link} alt="" className="title-file" />{infoData?.file || '-'}
+ {infoData?.fileInfoList?.map(res => {
+ return res.fileList.map((result, resIndex) => {
+ return <a href="your-link-here.html" target="_blank">
+ <img src={link} alt="" className="title-file" />{result.trueName}
+ {resIndex !== res.fileList.length - 1 && <>,</>}
+ </a>
+ })
+ })}
</div>
</Col>
<Col span={24}>
diff --git a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
index cfbd91e..981d034 100644
--- a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
@@ -111,8 +111,8 @@
查看
</Link>
{!props.isReview && <Link onClick={() => {
- if (record.fileInfoList && record.fileInfoList.length != 0) {
- let ids = record.fileInfoList?.map(item => item.id).join(',')
+ if (record.fileList && record.fileList.length != 0) {
+ let ids = record.fileList?.map(item => item.id).join(',')
handleDelete(ids)
} else {
$$.info({ type: 'warning', content: '还没上传关于该材料的文件!' });
@@ -121,8 +121,8 @@
删除
</Link>}
<Link onClick={() => {
- if (record.fileInfoList && record.fileInfoList.length != 0) {
- let ids = record.fileInfoList?.map(item => item.id).join(',')
+ if (record.fileList && record.fileList.length != 0) {
+ let ids = record.fileList?.map(item => item.id).join(',')
handleDownlod(ids)
} else {
$$.info({ type: 'warning', content: '还没上传关于该材料的文件!' });
@@ -133,9 +133,9 @@
{!props.isReview && <Link onClick={() => {
setSourceType(record.ownerType)
setUpLoadVisible(true)
- setFileInfoList(record.fileInfoList)
+ setFileInfoList(record.fileList)
setTimeout(() => {
- formRef.current.setFieldValue('file', record.fileInfoList)
+ formRef.current.setFieldValue('file', record.fileList)
}, 0)
}}>
上传
@@ -167,7 +167,7 @@
size: applyFile.fileList.length,
fileNames: applyFile.fileList?.map(item => item.trueName).join(','),
updateTime: $$.timeFormat(applyFile.fileList[applyFile.fileList.length - 1].updateTime),
- fileInfoList: applyFile.fileList.map(item => {
+ fileList: applyFile.fileList.map(item => {
return {
...item,
uid: item.id,
@@ -182,7 +182,7 @@
size: evidenceFile.fileList.length,
fileNames: evidenceFile.fileList?.map(item => item.trueName).join(','),
updateTime: $$.timeFormat(evidenceFile.fileList[evidenceFile.fileList.length - 1].updateTime),
- fileInfoList: evidenceFile.fileList.map(item => {
+ fileList: evidenceFile.fileList.map(item => {
return {
...item,
uid: item.id,
@@ -221,13 +221,12 @@
const newList = tableData.map(item => {
if (item.ownerType == sourceType) {
const data = fileMap[sourceType]
- console.log(data);
return {
...item,
size: data.length,
fileNames: data.map(item => item.trueName).join(','),
updateTime: $$.timeFormat(data[data.length - 1].updateTime),
- fileInfoList: data.map(item => {
+ fileList: data.map(item => {
return {
...item,
name: item.trueName,
@@ -239,6 +238,10 @@
return item
}
})
+ //回传文件数据的时候使用
+ if(props.handleSaveList) {
+ props.handleSaveList(newList)
+ }
setTableData(newList)
setUpLoadVisible(false);
};
diff --git a/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx b/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx
index ebabd3c..3f7d827 100644
--- a/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx
@@ -120,9 +120,9 @@
{props.menuList?.map(item => {
return <SubMenu
key={item.id}
- title={item.ownerTypeName + `(${item.fileInfoList && item.fileInfoList.length || 0})`}
+ title={item.ownerTypeName + `(${item.fileList && item.fileList.length || 0})`}
>
- {item.fileInfoList?.map(res => {
+ {item.fileList?.map(res => {
return <MenuItem key={res.id} onClick={() => { clickItem(res) }}>{res.trueName}</MenuItem>
})}
</SubMenu>
diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
index 305c8c3..71e9caa 100644
--- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -391,7 +391,14 @@
</Space>
</Col>
<div style={{ marginBottom: '65px' }}>
- <FileTable mainId={props.mainId} fileInfoList={props.fileInfoList} isReview={false} />
+ <FileTable
+ mainId={props.mainId}
+ fileInfoList={props.fileInfoList}
+ isReview={false}
+ handleSaveList={(list) => {
+ props.formRef.current.setFieldValue('fileInfoList', list)
+ }}
+ />
</div>
diff --git a/gz-customerSystem/src/views/register/visit/index.jsx b/gz-customerSystem/src/views/register/visit/index.jsx
index d914bfc..42ce510 100644
--- a/gz-customerSystem/src/views/register/visit/index.jsx
+++ b/gz-customerSystem/src/views/register/visit/index.jsx
@@ -204,10 +204,10 @@
<div className="dataSync-excel">
<Space size="large" style={{ margin: '4px 14px' }}>
<Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={handleSave} >保存</Button>
- <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={handleReview}>预览</Button>
+ <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={handleReview}>{isReview ? '修改' : '预览'}</Button>
<Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={handleSubmit}>提交</Button>
<Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={() => selfAcceptance()}>自行受理</Button>
- <Button type='secondary' onClick={handleReview}>返回上级页面</Button>
+ <Button type='secondary' onClick={() => { navigate(-1) }}>返回上级页面</Button>
</Space>
</div>
</Fragment>
diff --git a/gz-customerSystem/src/views/register/visit/preview.jsx b/gz-customerSystem/src/views/register/visit/preview.jsx
index 308a020..a7c160a 100644
--- a/gz-customerSystem/src/views/register/visit/preview.jsx
+++ b/gz-customerSystem/src/views/register/visit/preview.jsx
@@ -235,7 +235,9 @@
<div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>事件材料</h4>
</Space>
</Col>
- <FileTable mainId={props.mainId} fileInfoList={props.data?.fileInfoList} isReview={true} />
+ <div style={{ marginBottom: '65px' }}>
+ <FileTable mainId={props.mainId} fileInfoList={props.data?.fileInfoList} isReview={true} />
+ </div>
</div>
)
}
--
Gitblit v1.8.0