king
2023-11-30 a6be5cfd9c6fb084af584b77f79100fe32b385c1
2023-11-30
9个文件已修改
5个文件已添加
117 ■■■■ 已修改文件
public/media/excel.png 补丁 | 查看 | 原始文档 | blame | 历史
public/media/pdf.png 补丁 | 查看 | 原始文档 | blame | 历史
public/media/rar.png 补丁 | 查看 | 原始文档 | blame | 历史
public/media/txt.png 补丁 | 查看 | 原始文档 | blame | 历史
public/media/word.png 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/basetable/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/edit-table/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/media/excel.png
public/media/pdf.png
public/media/rar.png
public/media/txt.png
public/media/word.png
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -60,6 +60,7 @@
  let linkTypes = [
    { value: 'tel', text: '电话' },
    { value: 'email', text: '邮箱' },
    { value: 'download', text: '下载' },
    { value: 'other', text: '其他' }
  ]
@@ -69,6 +70,7 @@
      { value: 'email', text: '邮箱' },
      { value: 'qywx', text: '企业微信' },
      { value: 'linkmenu', text: '关联菜单' },
      { value: 'download', text: '下载' },
      { value: 'other', text: '其他' }
    ]
  } else if (appType === 'pc') {
@@ -76,6 +78,7 @@
      { value: 'tel', text: '电话' },
      { value: 'email', text: '邮箱' },
      { value: 'linkmenu', text: '关联菜单' },
      { value: 'download', text: '下载' },
      { value: 'other', text: '其他' }
    ]
  }
src/tabviews/basetable/index.jsx
@@ -409,6 +409,11 @@
                  }
                }
              }
              if (cell.marks && cell.marks.length === 0) {
                cell.marks = null
              }
              return true
            })
@@ -424,6 +429,10 @@
            col.linkThdMenu = ''
          }
          if (col.marks && col.marks.length === 0) {
            col.marks = null
          }
          return true
        })
      }
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -197,26 +197,36 @@
    //   })
    //   return
    // }
    let Id = ''
    if (cards.subtype === 'propcard' && cardCell) {
      Id = cardCell.setting.primaryId || ''
    } else {
      Id = data[cards.setting.primaryKey] || ''
    }
    
    if (card.joint === 'true') {
      let con = '?'
      if (/\?/ig.test(url)) {
        con = '&'
    if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar|.ppt)$/i.test(url)) {
      let d = document.createElement('a')
      d.href = url
      d.setAttribute('download', 'download')
      d.setAttribute('target', '_blank')
      document.body.appendChild(d)
      d.click()
      d.remove()
    } else {
      if (card.joint === 'true') {
        let Id = ''
        if (cards.subtype === 'propcard' && cardCell) {
          Id = cardCell.setting.primaryId || ''
        } else {
          Id = data[cards.setting.primaryKey] || ''
        }
        let con = '?'
        if (/\?/ig.test(url)) {
          con = '&'
        }
        url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      }
      url = url + `${con}id=${Id}&appkey=${window.GLOB.appkey}&userid=${sessionStorage.getItem('UserID')}&LoginUID=${sessionStorage.getItem('LoginUID') || ''}`
      window.open(url)
    }
    window.open(url)
  }
  getColor = (marks) => {
@@ -435,6 +445,30 @@
          }
          className = mark.signType
        }
        if (card.linkType === 'download') {
          let url = ''
          if (card.link === 'static') {
            url = card.linkurl
          } else {
            url = data[card.linkurl]
          }
          if (/^http.+(.txt|.doc|.docx|.pdf|.xlsx|.xls|.zip|.rar)$/i.test(url)) {
            if (/pdf$/i.test(url)) {
              val = <><img src="/media/pdf.png" className="file-image" alt=""/> {val}</>
            } else if (/(.doc|.docx)$/i.test(url)) {
              val = <><img src="/media/word.png" className="file-image" alt=""/> {val}</>
            } else if (/(.xlsx|.xls)$/i.test(url)) {
              val = <><img src="/media/excel.png" className="file-image" alt=""/> {val}</>
            } else if (/(.zip|.rar)$/i.test(url)) {
              val = <><img src="/media/rar.png" className="file-image" alt=""/> {val}</>
            } else {
              val = <><img src="/media/txt.png" className="file-image" alt=""/> {val}</>
            }
          }
        }
  
        if (card.link || (card.anchors && card.anchors.length > 0)) {
          _style.cursor = 'pointer'
src/tabviews/custom/components/card/cardcellList/index.scss
@@ -6,6 +6,11 @@
  .ant-btn {
    padding: 0;
  }
  .file-image {
    max-height: 100%;
    vertical-align: top;
    margin-right: 2px;
  }
  .ant-typography {
    margin: 0;
    padding: 0;
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -499,10 +499,6 @@
            } else if (_format && !Math.floor(Math.random() * radio)) {
              item.blur = true
            }
            if (item.marks && item.marks.length === 0) {
              item.marks = ''
            }
  
            if (item.field) {
              orderfields[item.uuid] = item.field
src/tabviews/custom/components/table/edit-table/index.jsx
@@ -113,10 +113,6 @@
            item.type = 'text'
          }
          if (item.marks && item.marks.length === 0) {
            item.marks = ''
          }
          if (item.editable === 'true') {
            setting.hasSubmit = setting.commit !== 'change'
            item.$ctrl = setting.commit === 'change'
src/tabviews/custom/index.jsx
@@ -661,6 +661,10 @@
              col.linkThdMenu = ''
            }
            if (col.marks && col.marks.length === 0) {
              col.marks = null
            }
            return true
          })
        }
@@ -960,6 +964,10 @@
      cell.style.verticalAlign = 'top'
    }
    if (cell.marks && cell.marks.length === 0) {
      cell.marks = null
    }
    if (['text', 'number', 'formula'].includes(cell.eleType)) {
      if (!cell.height) {
        cell.innerHeight = 'auto'
src/tabviews/custom/popview/index.jsx
@@ -405,6 +405,10 @@
              col.linkThdMenu = ''
            }
            if (col.marks && col.marks.length === 0) {
              col.marks = null
            }
            return true
          })
        }
@@ -677,6 +681,10 @@
      cell.style.verticalAlign = 'top'
    }
    if (cell.marks && cell.marks.length === 0) {
      cell.marks = null
    }
    if (['text', 'number', 'formula'].includes(cell.eleType)) {
      if (!cell.height) {
        cell.innerHeight = 'auto'
src/views/billprint/index.jsx
@@ -395,6 +395,10 @@
                } else {
                  item.IsSort = 'false'
                }
                if (item.marks && item.marks.length === 0) {
                  item.marks = null
                }
          
                return true
              })
@@ -614,6 +618,10 @@
    if (cell.style.display === 'inline-block') {
      cell.style.verticalAlign = 'top'
    }
    if (cell.marks && cell.marks.length === 0) {
      cell.marks = null
    }
    
    if (['text', 'number', 'formula'].includes(cell.eleType)) {
      cell.innerHeight = cell.innerHeight || 'auto'