From 0d40ce565cdc87668f83dbeddbf1246536986f9e Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Sat, 14 Sep 2024 18:02:36 +0800
Subject: [PATCH] fix: 样式、自行排查

---
 gz-customerSystem/src/components/personCard/DetailDialog.jsx |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/gz-customerSystem/src/components/personCard/DetailDialog.jsx b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
index f5f7dce..2a94e1c 100644
--- a/gz-customerSystem/src/components/personCard/DetailDialog.jsx
+++ b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
@@ -2,6 +2,7 @@
 import KeyVisits from "./KeyVisits";
 import { link } from '@/assets/images';
 import { Scrollbars } from "react-custom-scrollbars";
+import PreviewImage from '../PreviewImage';
 
 export default function DetailDialog(props) {
   const nuturalList = [
@@ -325,10 +326,20 @@
           return {
             ...res,
             value: <>
-              {data[res.field]?.map(item => {
-                return <a target="_blank">
-                  <img src={link} alt="" className="title-file" />{item.name}
-                </a>
+              {data[res.field]?.map((item, index) => {
+                if (item.response) {
+                  //新上传的,前端数据
+                  const newData = item.response.data[0]
+                  return <div style={{ display: 'inline-block' }}>
+                    <PreviewImage name={newData.name} src={newData.showUrl} />
+                    {index !== data[res.field].length - 1 && <>,</>}
+                  </div>
+                } else {
+                  return <div style={{ display: 'inline-block' }}>
+                    <PreviewImage name={item.name} src={item.showUrl} />
+                    {index !== data[res.field].length - 1 && <>,</>}
+                  </div>
+                }
               })}
             </>
           }
@@ -346,6 +357,11 @@
               ...res,
               value: filterValue
             }
+          } else if (res.field === 'extreme') {
+            return {
+              ...res,
+              value: data[res.field] === 0 ? '否' : '是'
+            }
           } else {
             return {
               ...res,

--
Gitblit v1.8.0