From a54284270f39f155960e7bd9d0921e7b204ccdae Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Tue, 03 Sep 2024 11:31:31 +0800
Subject: [PATCH] feat: 事件流转回退弹窗、文件样式调整

---
 gz-customerSystem/src/components/personCard/DetailDialog.jsx |   48 +++++++++++++++++++++++++++++++++++-------------
 1 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/gz-customerSystem/src/components/personCard/DetailDialog.jsx b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
index a62c172..f241b8f 100644
--- a/gz-customerSystem/src/components/personCard/DetailDialog.jsx
+++ b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
@@ -69,10 +69,9 @@
     [
       {
         label: '身份证明材料',
-        value: <a href="your-link-here.html" target="_blank">
-          <img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
-        </a>,
-        isFile: true
+        value: '',
+        isFile: true,
+        field: 'file',
       },
     ],
   ]
@@ -128,14 +127,16 @@
         value: <a href="your-link-here.html" target="_blank">
           <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
         </a>,
-        isFile: true
+        isFile: true,
+        field: 'file',
       },
       {
         label: '法定代表人身份证明材料',
         value: <a href="your-link-here.html" target="_blank">
           <img src={link} alt="" className="title-file" />江照月个人身份.pdf
         </a>,
-        isFile: true
+        isFile: true,
+        field: 'file1',
       },
     ],
   ]
@@ -191,14 +192,16 @@
         value: <a href="your-link-here.html" target="_blank">
           <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
         </a>,
-        isFile: true
+        isFile: true,
+        field: 'file',
       },
       {
         label: '机构代表人身份证明材料',
         value: <a href="your-link-here.html" target="_blank">
           <img src={link} alt="" className="title-file" />江照月个人身份.pdf
         </a>,
-        isFile: true
+        isFile: true,
+        field: 'file1',
       },
     ],
   ]
@@ -281,7 +284,7 @@
       {
         label: '代理对象',
         value: '',
-        field: 'personList',
+        field: 'personId',
       },
     ],
     [
@@ -291,6 +294,7 @@
           <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
         </a>,
         isFile: true,
+        field: 'file',
       },
       {
         label: '代理人授权委托书',
@@ -298,6 +302,7 @@
           <img src={link} alt="" className="title-file" />江照月个人身份.pdf
         </a>,
         isFile: true,
+        field: 'file1',
       },
     ],
   ]
@@ -328,7 +333,16 @@
     newList = mapList.map(item => {
       return item.map(res => {
         if (res.isFile) {
-          return res
+          return {
+            ...res,
+            value: <>
+              {data[res.field].map(item => {
+                return <a target="_blank">
+                  <img src={link} alt="" className="title-file" />{item.name}
+                </a>
+              })}
+            </>
+          }
         }
         if (res.isName) {
           return {
@@ -337,9 +351,17 @@
             perClass: data.perClassName || data.perTypeName
           }
         } else {
-          return {
-            ...res,
-            value: res.field === 'personList' ? data[res.field].join(',') : data[res.field]
+          if (res.field === 'personId') {
+            const filterValue = props.personData.filter(result => data[res.field].indexOf(result.id) != -1).map(result => result.trueName).join(',')
+            return {
+              ...res,
+              value: filterValue
+            }
+          } else {
+            return {
+              ...res,
+              value: data[res.field]
+            }
           }
         }
       })

--
Gitblit v1.8.0