Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
7883b6ff
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 大约 3 年
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7883b6ff
编写于
5月 09, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用例导入时显示导入中
上级
b941ffeb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
9 deletion
+13
-9
frontend/src/business/components/track/case/components/TestCaseImport.vue
...iness/components/track/case/components/TestCaseImport.vue
+13
-9
未找到文件。
frontend/src/business/components/track/case/components/TestCaseImport.vue
浏览文件 @
7883b6ff
...
...
@@ -8,18 +8,20 @@
<el-row>
<el-link
type=
"primary"
class=
"download-template"
href=
"/test/case/export/template"
>
{{
$t
(
'
test_track.case.import.download_template
'
)
}}
</el-link></el-row>
<el-row>
<el-upload
v-loading=
"isLoading"
element-loading-text=
"导入中"
element-loading-spinner=
"el-icon-loading"
class=
"upload-demo"
:action=
"'/test/case/import/' + projectId"
:on-preview=
"handlePreview"
multiple
:limit=
"1"
:on-exceed=
"handleExceed"
:beforeUpload=
"UploadValidate"
:on-success=
"handleSuccess"
:on-error=
"handleError"
:show-file-list=
"false"
:file-list=
"fileList"
>
<template
v-slot:trigger
>
<el-button
size=
"mini"
type=
"success"
plain
>
{{
$t
(
'
test_track.case.import.click_upload
'
)
}}
</el-button>
...
...
@@ -27,7 +29,8 @@
<
template
v-slot:tip
>
<div
class=
"el-upload__tip"
>
{{
$t
(
'
test_track.case.import.upload_limit
'
)
}}
</div>
</
template
>
</el-upload></el-row>
</el-upload>
</el-row>
<el-row>
<ul>
...
...
@@ -46,7 +49,6 @@
import
ElUploadList
from
"
element-ui/packages/upload/src/upload-list
"
;
import
MsTableButton
from
'
../../../../components/common/components/MsTableButton
'
;
export
default
{
name
:
"
TestCaseImport
"
,
components
:
{
ElUploadList
,
MsTableButton
},
...
...
@@ -54,7 +56,8 @@
return
{
dialogVisible
:
false
,
fileList
:
[],
errList
:
[]
errList
:
[],
isLoading
:
false
}
},
props
:
{
...
...
@@ -63,9 +66,6 @@
}
},
methods
:
{
handlePreview
(
file
)
{
this
.
init
();
},
handleExceed
(
files
,
fileList
)
{
this
.
$warning
(
this
.
$t
(
'
test_track.case.import.upload_limit_count
'
));
},
...
...
@@ -80,9 +80,12 @@
this
.
$warning
(
this
.
$t
(
'
test_track.case.import.upload_limit_size
'
));
return
false
;
}
this
.
isLoading
=
true
;
this
.
errList
=
[];
return
true
;
},
handleSuccess
(
response
)
{
this
.
isLoading
=
false
;
let
res
=
response
.
data
;
if
(
res
.
success
)
{
this
.
$success
(
this
.
$t
(
'
test_track.case.import.success
'
));
...
...
@@ -94,6 +97,7 @@
this
.
fileList
=
[];
},
handleError
(
err
,
file
,
fileList
)
{
this
.
isLoading
=
false
;
this
.
$error
(
err
.
message
);
},
init
()
{
...
...
@@ -102,7 +106,7 @@
},
open
()
{
this
.
dialogVisible
=
true
;
}
}
,
}
}
</
script
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录