king
2020-08-11 04b5222fcf0c8f24b3a577cf3a05fb57462982a5
src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -378,27 +378,26 @@
   */
  exportExcel = (data) => {
    const { btn } = this.props
    if (data && data.length > 0) {
      try {
        let _header = []
        let _topRow = {}
        let colwidth = []
        btn.verify.columns.forEach(col => {
          if (!data[0].hasOwnProperty(col.Column)) return
          if (_topRow[col.Column]) return
          _header.push(col.Column)
          _topRow[col.Column] = col.Text
          colwidth.push({width: col.Width})
        colwidth.push({width: col.Width || 20})
        })
        let table = []
        table.push(_topRow)
        data.forEach(item => {
      data && data.forEach(item => {
          let _row = {}
          _header.forEach(field => {
            _row[field] = item[field]
@@ -423,9 +422,6 @@
        }
      } catch {
        this.execError({ErrCode: 'N', message: 'Excel生成失败!'})
      }
    } else {
      this.execError({ErrCode: 'N', message: '未查询到导出数据!'})
    }
  }