mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user