fix(测试计划):测试计划关联功能用例未勾选数据点击保存报错
--bug=1010619 --user=李敏 【测试跟踪】github#10985 测试计划关联功能用例 不勾选 用例 直接点确定会报错 https://www.tapd.cn/55049933/s/1109962
This commit is contained in:
parent
ba0ca5a7dc
commit
3d8e3158da
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<functional-relevance
|
||||
:page="page"
|
||||
:get-table-data="getTestCases"
|
||||
:get-node-tree="getTreeNodes"
|
||||
:is-test-plan="true"
|
||||
:save="saveCaseRelevance"
|
||||
:version-enable="versionEnable"
|
||||
ref="functionalRelevance">
|
||||
</functional-relevance>
|
||||
<functional-relevance
|
||||
:page="page"
|
||||
:get-table-data="getTestCases"
|
||||
:get-node-tree="getTreeNodes"
|
||||
:is-test-plan="true"
|
||||
:save="saveCaseRelevance"
|
||||
:version-enable="versionEnable"
|
||||
ref="functionalRelevance">
|
||||
</functional-relevance>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -51,15 +51,20 @@ export default {
|
|||
}
|
||||
},
|
||||
saveCaseRelevance(param, vueObj) {
|
||||
param.planId = this.planId;
|
||||
vueObj.result = this.$post('/test/plan/relevance', param, () => {
|
||||
if (param.ids.length > 0) {
|
||||
param.planId = this.planId;
|
||||
vueObj.result = this.$post('/test/plan/relevance', param, () => {
|
||||
vueObj.isSaving = false;
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
vueObj.$refs.baseRelevance.close();
|
||||
this.$emit('refresh');
|
||||
}, (error) => {
|
||||
vueObj.isSaving = false;
|
||||
});
|
||||
} else {
|
||||
vueObj.isSaving = false;
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
vueObj.$refs.baseRelevance.close();
|
||||
this.$emit('refresh');
|
||||
},(error) => {
|
||||
vueObj.isSaving = false;
|
||||
});
|
||||
this.$warning(this.$t('test_track.plan_view.please_choose_test_case'));
|
||||
}
|
||||
},
|
||||
search() {
|
||||
this.getTestCases();
|
||||
|
@ -80,9 +85,9 @@ export default {
|
|||
},
|
||||
getTreeNodes(vueObj) {
|
||||
vueObj.$refs.nodeTree.result = this.$post("/case/node/list/all/plan",
|
||||
{testPlanId: this.planId, projectId: vueObj.projectId}, response => {
|
||||
vueObj.treeNodes = response.data;
|
||||
});
|
||||
{testPlanId: this.planId, projectId: vueObj.projectId}, response => {
|
||||
vueObj.treeNodes = response.data;
|
||||
});
|
||||
vueObj.selectNodeIds = [];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2305,6 +2305,7 @@ export default {
|
|||
allow_associated_repetitive_cases_tip: "Whether to allow the same use case to be associated multiple times in the same test plan",
|
||||
performance_case_count: "Performance Case Count",
|
||||
running: "Running",
|
||||
please_choose_test_case: "please select a test case!",
|
||||
},
|
||||
issue: {
|
||||
issue: "Issue",
|
||||
|
|
|
@ -2310,6 +2310,7 @@ export default {
|
|||
allow_associated_repetitive_cases_tip: "是否允许同一个测试计划中多次关联相同用例",
|
||||
performance_case_count: "性能测试用例数",
|
||||
running: "运行中",
|
||||
please_choose_test_case: "请选择测试用例!",
|
||||
},
|
||||
issue: {
|
||||
issue: "缺陷",
|
||||
|
|
|
@ -2309,6 +2309,7 @@ export default {
|
|||
allow_associated_repetitive_cases_tip: "是否允許同一個測試計劃中多次關聯相同用例",
|
||||
performance_case_count: "性能測試用例數",
|
||||
running: "運行中",
|
||||
please_choose_test_case: "请选择测试用例!",
|
||||
},
|
||||
issue: {
|
||||
issue: "缺陷",
|
||||
|
|
Loading…
Reference in New Issue