| | |
| | | } |
| | | |
| | | // 数据提交前去除空格方法 |
| | | this.tableDataTrim() |
| | | // this.tableDataTrim() |
| | | |
| | | const data = { |
| | | fileCode: this.excelCode, |
| | |
| | | // 模板下载 |
| | | 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() |
| | |
| | | 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() |
| | | } |
| | | }) |
| | | } |
| | | |