loulijun2021
2024-01-08 0dd0bf217772b61681f8a24d277305af97d561a2
src/views/systemSetting/dataImport.vue
@@ -830,7 +830,7 @@
          }
          // 数据提交前去除空格方法
          this.tableDataTrim()
          // this.tableDataTrim()
          const data = {
            fileCode: this.excelCode,
@@ -2171,7 +2171,9 @@
    // 模板下载
    async getExcel() {
      const res = await DownLoadExcel({ FileCode: this.excelCode })
      window.location.href = res.data
      if (res.code === '200') {
        window.location.href = res.data
      }
    },
    async getSelectArr() {
      await this.getPrentOrganization()
@@ -2249,11 +2251,9 @@
    tableDataTrim() {
      if (this.tableData.length === 1) { // 一个sheet
        this.tableData[0].forEach(i => {
          this.tableData[0].forEach(i => {
            for (const j in i) {
              i[j] = i[j].trim()
            }
          })
          for (const j in i) {
            i[j] = i[j].trim()
          }
        })
      }