From 42ddba4c235e1db44e17b525698f89450a4289a4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 07 八月 2023 16:44:11 +0800
Subject: [PATCH] 2023-08-07

---
 src/tabviews/custom/components/module/voucher/resetAttach/index.jsx |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx b/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx
index f90ba2e..cbf864d 100644
--- a/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx
+++ b/src/tabviews/custom/components/module/voucher/resetAttach/index.jsx
@@ -41,7 +41,6 @@
 
     list = list.map(item => {
       item.icon = this.getIcon(item.attachments_url)
-      item.name = this.getName(item.attachments_url)
       return item
     })
 
@@ -75,7 +74,6 @@
           file.attachments = file.attachments.map(item => {
             item.id = item.attach_id
             item.icon = this.getIcon(item.attachments_url)
-            item.name = this.getName(item.attachments_url)
             item.data_code = file.data_code
             item.data_name = file.data_name
             item.BID = file.id
@@ -154,7 +152,6 @@
         }
 
         item.icon = this.getIcon(res.url)
-        item.name = this.getName(res.url)
 
         list.push(item)
 
@@ -165,14 +162,6 @@
 
   deleteFile = (id) => {
     this.setState({list: this.state.list.filter(item => item.id !== id)})
-  }
-
-  getName = (url) => {
-    if (!url || !/\//.test(url)) return url
-
-    let names = url.split('/')
-
-    return names[names.length - 1]
   }
 
   getIcon = (url) => {
@@ -266,8 +255,8 @@
               return <div className="attach-item" key={item.id}>
                 <img src={item.icon} alt=""/>
                 <div className="attach-msg">
-                  <div>{item.attachments_title}</div>
-                  <div>{item.data_name ? item.data_name + ' / ' : ''}{item.name}</div>
+                  {/* <div>{item.attachments_title}</div> */}
+                  <div>{item.data_name ? item.data_name + ' / ' : ''}{item.attachments_title}</div>
                 </div>
                 <div>
                   <DeleteOutlined onClick={() => this.deleteFile(item.id)}/>

--
Gitblit v1.8.0