perf: 优化 csv/xlsx 导入 (#725)

* perf: 优化导入csv

* perf: 优化导入

stash

perf: 优化导入

perf: 更新导入

perf: 优化导入

feat: 完成导入优化

perf: 修复bug

* perf: 继续优化导入,性能提高三倍

Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
fit2bot
2021-04-08 10:09:58 +08:00
committed by GitHub
parent 12ffa363c1
commit eddd27e95d
16 changed files with 2066 additions and 164 deletions

View File

@@ -1,6 +1,7 @@
import axios from 'axios'
import i18n from '@/i18n/i18n'
import { getTokenFromCookie } from '@/utils/auth'
import { getErrorResponseMsg } from '@/utils/common'
import { refreshSessionIdAge } from '@/api/users'
import { Message, MessageBox } from 'element-ui'
import store from '@/store'
@@ -84,11 +85,8 @@ function ifBadRequest({ response, error }) {
export function flashErrorMsg({ response, error }) {
if (!response.config.disableFlashErrorMsg) {
let msg = error.message
const data = response.data
if (data && (data.error || data.msg || data.detail)) {
msg = data.error || data.msg || data.detail
}
const responseErrorMsg = getErrorResponseMsg(error)
const msg = responseErrorMsg || error.message
Message({
message: msg,
type: 'error',