Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-marketing
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-marketing
Commits
ba5197fd
提交
ba5197fd
authored
8月 20, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 导入数据错误提示增加跳转错误页交互功能
上级
9c01de67
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
124 行增加
和
10 行删除
+124
-10
route.js
src/modules/tools/signIn/route.js
+4
-0
ErrorMsg.vue
src/modules/tools/signIn/views/ErrorMsg.vue
+51
-0
List.vue
src/modules/tools/signIn/views/List.vue
+32
-9
PersonList.vue
src/modules/tools/signIn/views/components/PersonList.vue
+37
-1
没有找到文件。
src/modules/tools/signIn/route.js
浏览文件 @
ba5197fd
...
...
@@ -6,5 +6,9 @@ export default [
{
path
:
'preview'
,
component
:
()
=>
import
(
'./views/Preview.vue'
)
},
{
path
:
'error-msg'
,
component
:
()
=>
import
(
'./views/ErrorMsg.vue'
)
}
]
src/modules/tools/signIn/views/ErrorMsg.vue
0 → 100644
浏览文件 @
ba5197fd
<
template
>
<app-card>
<div
class=
"error-msg"
>
<h5><el-button
size=
"mini"
icon=
"el-icon-arrow-left"
style=
"margin-right:20px;"
@
click=
"goBack"
>
返回上页
</el-button>
导入人员excel表错误提示
</h5>
<p
v-for=
"(msg, index) in msgList"
:key=
"index"
><i
class=
"el-icon-error"
></i>
{{
msg
}}
</p>
</div>
</app-card>
</
template
>
<
script
>
import
AppCard
from
'@/components/base/AppCard.vue'
export
default
{
components
:
{
AppCard
},
data
()
{
return
{
msgList
:
[]
}
},
created
()
{
const
msg
=
window
.
sessionStorage
.
getItem
(
'importErrorMsg'
)
this
.
msgList
=
JSON
.
parse
(
msg
)
},
methods
:
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
}
}
}
</
script
>
<
style
scoped
>
.app-card
{
margin-bottom
:
0
;
padding-top
:
20px
;
}
.error-msg
{
min-height
:
calc
(
100vh
-
165px
);
}
.error-msg
h5
{
font-size
:
16px
;
line-height
:
50px
;
color
:
#444
;
}
.error-msg
p
{
font-size
:
15px
;
line-height
:
32px
;
color
:
#f56c6c
}
.error-msg
p
i
{
margin-right
:
10px
;
}
</
style
>
\ No newline at end of file
src/modules/tools/signIn/views/List.vue
浏览文件 @
ba5197fd
...
...
@@ -247,16 +247,39 @@ export default {
this
.
dialogVisible
=
false
}
else
{
if
(
res
.
data
.
error_list
.
length
)
{
const
arr
=
[]
const
h
=
this
.
$createElement
res
.
data
.
error_list
.
forEach
(
item
=>
{
arr
.
push
(
h
(
'p'
,
null
,
item
))
})
this
.
$message
({
type
:
'error'
,
message
:
h
(
'div'
,
null
,
arr
),
duration
:
15000
})
const
count
=
res
.
data
.
error_list
.
length
if
(
count
>
5
)
{
window
.
sessionStorage
.
setItem
(
'importErrorMsg'
,
JSON
.
stringify
(
res
.
data
.
error_list
))
const
msg
=
this
.
$message
({
type
:
'error'
,
duration
:
15000
,
message
:
h
(
'p'
,
null
,
[
h
(
'span'
,
null
,
'上传失败!共计 '
),
h
(
'span'
,
{
style
:
'color: #f56c6c'
},
count
),
h
(
'span'
,
null
,
' 处错误。'
),
h
(
'span'
,
{
style
:
'color:#3276fc;cursor:pointer;margin-left:30px;'
,
on
:
{
click
:
()
=>
{
this
.
$router
.
push
({
path
:
'/tools/error-msg'
})
msg
.
close
()
}
}
},
'查看错误原因>>'
)
])
})
}
else
{
const
arr
=
[]
res
.
data
.
error_list
.
forEach
(
item
=>
{
arr
.
push
(
h
(
'p'
,
null
,
item
))
})
this
.
$message
({
type
:
'error'
,
message
:
h
(
'div'
,
null
,
arr
),
duration
:
15000
})
}
}
else
{
this
.
$message
.
error
(
'导入数据失败'
)
}
...
...
src/modules/tools/signIn/views/components/PersonList.vue
浏览文件 @
ba5197fd
...
...
@@ -199,7 +199,43 @@ export default {
this
.
$refs
.
appList
.
refetch
(
true
)
this
.
dialogVisible
=
false
}
else
{
this
.
$message
.
error
(
res
.
message
||
'导入数据失败,请重选选取文件上传'
)
if
(
res
.
data
.
error_list
.
length
)
{
const
h
=
this
.
$createElement
const
count
=
res
.
data
.
error_list
.
length
if
(
count
>
5
)
{
window
.
sessionStorage
.
setItem
(
'importErrorMsg'
,
JSON
.
stringify
(
res
.
data
.
error_list
))
const
msg
=
this
.
$message
({
type
:
'error'
,
duration
:
15000
,
message
:
h
(
'p'
,
null
,
[
h
(
'span'
,
null
,
'上传失败!共计 '
),
h
(
'span'
,
{
style
:
'color: #f56c6c'
},
count
),
h
(
'span'
,
null
,
' 处错误。'
),
h
(
'span'
,
{
style
:
'color:#3276fc;cursor:pointer;margin-left:30px;'
,
on
:
{
click
:
()
=>
{
this
.
$router
.
push
({
path
:
'/tools/error-msg'
})
msg
.
close
()
}
}
},
'查看错误原因>>'
)
])
})
}
else
{
const
arr
=
[]
res
.
data
.
error_list
.
forEach
(
item
=>
{
arr
.
push
(
h
(
'p'
,
null
,
item
))
})
this
.
$message
({
type
:
'error'
,
message
:
h
(
'div'
,
null
,
arr
),
duration
:
15000
})
}
}
else
{
this
.
$message
.
error
(
'导入数据失败'
)
}
}
})
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论