Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
0b5b55e7
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,体验更适合开发者的 AI 搜索 >>
提交
0b5b55e7
编写于
9月 27, 2020
作者:
S
shiziyuan9527
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(测试计划): 增加取消全部关联按钮
上级
233e4e2f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
41 addition
and
12 deletion
+41
-12
frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue
...onents/track/plan/view/comonents/TestPlanTestCaseList.vue
+32
-9
frontend/src/i18n/en-US.js
frontend/src/i18n/en-US.js
+3
-1
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+3
-1
frontend/src/i18n/zh-TW.js
frontend/src/i18n/zh-TW.js
+3
-1
未找到文件。
frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue
浏览文件 @
0b5b55e7
...
...
@@ -19,6 +19,8 @@
:content=
"$t('test_track.plan_view.create_report')"
@
click=
"openTestReport"
/>
<ms-table-button
:is-tester-permission=
"true"
v-if=
"testPlan.reportId"
icon=
"el-icon-document"
:content=
"$t('test_track.plan_view.view_report')"
@
click=
"openReport"
/>
<ms-table-button
:is-tester-permission=
"true"
icon=
"el-icon-document-remove"
:content=
"$t('test_track.plan_view.cancel_all_relevance')"
@
click=
"handleDeleteBatch"
/>
</
template
>
</ms-table-header>
</template>
...
...
@@ -413,26 +415,47 @@
});
},
handleDeleteBatch
()
{
if
(
this
.
tableData
.
length
<
1
)
{
this
.
$warning
(
this
.
$t
(
'
test_track.plan_view.no_case_relevance
'
));
return
;
}
this
.
$alert
(
this
.
$t
(
'
test_track.plan_view.confirm_cancel_relevance
'
)
+
"
?
"
,
''
,
{
confirmButtonText
:
this
.
$t
(
'
commons.confirm
'
),
callback
:
(
action
)
=>
{
if
(
action
===
'
confirm
'
)
{
let
ids
=
Array
.
from
(
this
.
selectRows
).
map
(
row
=>
row
.
id
);
this
.
$post
(
'
/test/plan/case/batch/delete
'
,
{
ids
:
ids
},
()
=>
{
// this.selectIds.clear();
this
.
selectRows
.
clear
();
this
.
$emit
(
"
refresh
"
);
this
.
$success
(
this
.
$t
(
'
commons.delete_success
'
));
});
if
(
this
.
selectRows
.
size
>
0
)
{
let
ids
=
Array
.
from
(
this
.
selectRows
).
map
(
row
=>
row
.
id
);
this
.
_handleBatchDelete
(
ids
);
}
else
{
if
(
this
.
planId
)
{
this
.
condition
.
planId
=
this
.
planId
;
}
if
(
this
.
selectNodeIds
&&
this
.
selectNodeIds
.
length
>
0
)
{
this
.
condition
.
nodeIds
=
this
.
selectNodeIds
;
}
// 根据条件查询计划下所有的关联用例
this
.
$post
(
'
/test/plan/case/list/all
'
,
this
.
condition
,
res
=>
{
let
data
=
res
.
data
;
let
ids
=
data
.
map
(
d
=>
d
.
id
);
this
.
_handleBatchDelete
(
ids
);
})
}
}
}
});
},
_handleBatchDelete
(
ids
)
{
this
.
result
=
this
.
$post
(
'
/test/plan/case/batch/delete
'
,
{
ids
:
ids
},
()
=>
{
this
.
selectRows
.
clear
();
this
.
$emit
(
"
refresh
"
);
this
.
$success
(
this
.
$t
(
'
test_track.cancel_relevance_success
'
));
});
},
_handleDelete
(
testCase
)
{
let
testCaseId
=
testCase
.
id
;
this
.
$post
(
'
/test/plan/case/delete/
'
+
testCaseId
,
{},
()
=>
{
this
.
result
=
this
.
$post
(
'
/test/plan/case/delete/
'
+
testCaseId
,
{},
()
=>
{
this
.
$emit
(
"
refresh
"
);
this
.
$success
(
this
.
$t
(
'
commons.delet
e_success
'
));
this
.
$success
(
this
.
$t
(
'
test_track.cancel_relevanc
e_success
'
));
});
},
handleSelectAll
(
selection
)
{
...
...
frontend/src/i18n/en-US.js
浏览文件 @
0b5b55e7
...
...
@@ -798,6 +798,7 @@ export default {
plan_view
:
{
plan
:
"
Plan
"
,
relevance_test_case
:
"
Relevance case
"
,
cancel_all_relevance
:
"
Unlink all
"
,
executor
:
"
Executor
"
,
execute_result
:
"
Result
"
,
pass
:
"
Pass
"
,
...
...
@@ -842,7 +843,8 @@ export default {
report_template
:
"
Report template
"
,
test_detail
:
"
Test detail
"
,
failure_case
:
"
Failure case
"
,
export_report
:
"
Export Report
"
export_report
:
"
Export Report
"
,
no_case_relevance
:
"
No related use cases
"
,
},
issue
:
{
issue
:
"
Issue
"
,
...
...
frontend/src/i18n/zh-CN.js
浏览文件 @
0b5b55e7
...
...
@@ -804,6 +804,7 @@ export default {
plan_view
:
{
plan
:
"
计划
"
,
relevance_test_case
:
"
关联测试用例
"
,
cancel_all_relevance
:
"
取消全部关联
"
,
executor
:
"
执行人
"
,
execute_result
:
"
执行结果
"
,
pass
:
"
通过
"
,
...
...
@@ -848,7 +849,8 @@ export default {
report_template
:
"
测试报告模版
"
,
test_detail
:
"
测试详情
"
,
failure_case
:
"
失败用例
"
,
export_report
:
"
导出报告
"
export_report
:
"
导出报告
"
,
no_case_relevance
:
"
没有关联用例
"
,
},
issue
:
{
issue
:
"
缺陷
"
,
...
...
frontend/src/i18n/zh-TW.js
浏览文件 @
0b5b55e7
...
...
@@ -800,6 +800,7 @@ export default {
plan_view
:
{
plan
:
"
計劃
"
,
relevance_test_case
:
"
關聯測試用例
"
,
cancel_all_relevance
:
"
取消全部關聯
"
,
executor
:
"
執行人
"
,
execute_result
:
"
執行結果
"
,
pass
:
"
通過
"
,
...
...
@@ -844,7 +845,8 @@ export default {
report_template
:
"
測試報告模版
"
,
test_detail
:
"
測試詳情
"
,
failure_case
:
"
失敗用例
"
,
export_report
:
"
導出報告
"
export_report
:
"
導出報告
"
,
no_case_relevance
:
"
沒有關聯用例
"
,
},
issue
:
{
issue
:
"
缺陷
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录