From 68f41dad70cc9c90b87258d91300576d7f5682e7 Mon Sep 17 00:00:00 2001
From: liuwh <964324856@qq.com>
Date: Sat, 14 Sep 2024 15:58:38 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master
---
gz-customerSystem/src/views/register/visit/component/previewTable.jsx | 162 +++++++++++++++++++++++++++++++++--------------------
1 files changed, 101 insertions(+), 61 deletions(-)
diff --git a/gz-customerSystem/src/views/register/visit/component/previewTable.jsx b/gz-customerSystem/src/views/register/visit/component/previewTable.jsx
index 6785ad2..36a8e61 100644
--- a/gz-customerSystem/src/views/register/visit/component/previewTable.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/previewTable.jsx
@@ -1,8 +1,12 @@
import React, { useEffect, useState } from 'react';
import { person, link } from '@/assets/images'
+import { person1 } from '@/assets/images/icon'
+import PreviewImage from '@/components/PreviewImage';
+
const ApplyDialog = ({ applyDialog }) => {
+ console.log(applyDialog, 'applyDialog');
return (
<>
{
@@ -16,10 +20,10 @@
<th bgcolor="#F7F8FA" className="table-title" width='140'>性别</th>
<td>{item.sexName || '-'}</td>
<td rowspan="4" width="112" height='147' style={{ padding: '0px' }}>
- <img border="0" src={person} alt="" style={{
+ <img border="0" src={person1} alt="" style={{
width: '100%',
height: '100%',
- objectFit: 'cover', // 保持原始宽高比并填充整个容器
+ // objectFit: 'cover', // 保持原始宽高比并填充整个容器
objectPosition: 'center', // 图片居中显示
}} />
</td>
@@ -46,14 +50,19 @@
<th bgcolor="#F7F8FA" className="table-title">身份证明材料</th>
<td>
{
- item.fileInfoList?.map(res => {
- if (res.ownerType == "22_00018-202") {
- 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>
- })
+ item.file?.map((result, resIndex) => {
+ if (result.response) {
+ //新上传的,前端数据
+ const newData = result.response.data[0]
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={newData.name} src={newData.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
+ } else {
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={result.name} src={result.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
}
})
}
@@ -71,6 +80,7 @@
}
const AgentDialog = ({ agentDialog }) => {
+ console.log(agentDialog, 'agentDialog');
return (
<>
{agentDialog?.map((item, index) => (
@@ -83,7 +93,7 @@
<th bgcolor="#F7F8FA" className="table-title" width="140">性别</th>
<td>{item.sexName || '-'}</td>
<td rowspan="4" width="112" height='147' style={{ padding: '0px' }}>
- <img border="0" src={person} alt="" style={{ width: '100%', height: '100%' }} />
+ <img border="0" src={person1} alt="" style={{ width: '100%', height: '100%' }} />
</td>
</tr>
<tr>
@@ -116,14 +126,19 @@
<th bgcolor="#F7F8FA" className="table-title">身份证明材料</th>
<td>
{
- item.fileInfoList?.map(res => {
- if (res.ownerType == "22_00018-202") {
- 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>
- })
+ item.file?.map((result, resIndex) => {
+ if (result.response) {
+ //新上传的,前端数据
+ const newData = result.response.data[0]
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={newData.name} src={newData.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
+ } else {
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={result.name} src={result.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
}
})
}
@@ -131,28 +146,32 @@
<th bgcolor="#F7F8FA" className="table-title">代理人授权委托书</th>
<td>
{
- item.fileInfoList?.map(res => {
- if (res.ownerType == '22_00018-207') {
- 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>
- })
+ item.file1?.map((result, resIndex) => {
+ if (result.response) {
+ //新上传的,前端数据
+ const newData = result.response.data[0]
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={newData.name} src={newData.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
+ } else {
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={result.name} src={result.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
}
})
}
</td>
</tr>
-
</table>
-
))}
</>
)
}
const Respondent = ({ respondent }) => {
+ console.log(respondent, 'respondent');
return (
<>
{respondent?.map((item, index) => (
@@ -179,14 +198,19 @@
<th bgcolor="#F7F8FA" className="table-title">企业登记材料</th>
<td>
{
- item.fileInfoList?.map(res => {
- if (res.ownerType == '22_00018-203') {
- 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>
- })
+ item.file?.map((result, resIndex) => {
+ if (result.response) {
+ //新上传的,前端数据
+ const newData = result.response.data[0]
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={newData.name} src={newData.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
+ } else {
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={result.name} src={result.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
}
})
}
@@ -194,14 +218,19 @@
<th bgcolor="#F7F8FA" className="table-title" >法定代表人身份证明材料</th>
<td>
{
- item.fileInfoList?.map(res => {
- if (res.ownerType == '22_00018-204') {
- 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>
- })
+ item.file1?.map((result, resIndex) => {
+ if (result.response) {
+ //新上传的,前端数据
+ const newData = result.response.data[0]
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={newData.name} src={newData.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
+ } else {
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={result.name} src={result.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
}
})
}
@@ -217,6 +246,7 @@
}
const Company = ({ company }) => {
+ console.log(company, 'company');
return (
<>
{company?.map((item, index) => (
@@ -243,14 +273,19 @@
<th bgcolor="#F7F8FA" className="table-title">机构登记材料</th>
<td>
{
- item.fileInfoList?.map(res => {
- if (res.ownerType == '22_00018-203') {
- 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>
- })
+ item.file?.map((result, resIndex) => {
+ if (result.response) {
+ //新上传的,前端数据
+ const newData = result.response.data[0]
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={newData.name} src={newData.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
+ } else {
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={result.name} src={result.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
}
})
}
@@ -258,14 +293,19 @@
<th bgcolor="#F7F8FA" className="table-title" >机构代表人身份证明材料</th>
<td>
{
- item.fileInfoList?.map(res => {
- if (res.ownerType == '22_00018-204') {
- 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>
- })
+ item.file1?.map((result, resIndex) => {
+ if (result.response) {
+ //新上传的,前端数据
+ const newData = result.response.data[0]
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={newData.name} src={newData.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
+ } else {
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={result.name} src={result.showUrl} />
+ {resIndex !== item.file?.length - 1 && <>,</>}
+ </div>
}
})
}
--
Gitblit v1.8.0