king
2023-08-07 42ddba4c235e1db44e17b525698f89450a4289a4
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)}/>