fix(测试跟踪): 修复功能用例中批量移动用例目录里未规划用例显示了英文的缺陷
--bug=1011463 --user=王孝刚 【测试跟踪】功能用例,批量移动用例,目录里 未规划用例 显示了英文 https://www.tapd.cn/55049933/s/1121990
This commit is contained in:
parent
40b1d4b6ba
commit
da86e0ac47
|
@ -186,8 +186,14 @@
|
||||||
if (response.data != undefined && response.data != null) {
|
if (response.data != undefined && response.data != null) {
|
||||||
this.data = response.data;
|
this.data = response.data;
|
||||||
this.data.forEach(node => {
|
this.data.forEach(node => {
|
||||||
node.name === 'UNPLANNED' ? node.name = this.$t('api_test.automation.unplanned_scenario') : node.name
|
node.name = node.name === 'UNPLANNED' ? this.$t('api_test.automation.unplanned_scenario') : node.name
|
||||||
|
node.label = node.label === 'UNPLANNED' ? this.$t('api_test.automation.unplanned_scenario') : node.label
|
||||||
buildTree(node, {path: ''});
|
buildTree(node, {path: ''});
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
node.children.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('api_test.automation.unplanned_scenario') : node.name
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.$emit('setModuleOptions', this.data);
|
this.$emit('setModuleOptions', this.data);
|
||||||
this.$emit('setNodeTree', this.data);
|
this.$emit('setNodeTree', this.data);
|
||||||
|
|
|
@ -62,7 +62,6 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
filterText(val) {
|
filterText(val) {
|
||||||
this.$refs.tree.filter(val);
|
this.$refs.tree.filter(val);
|
||||||
console.log( this.treeNodes)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -179,8 +179,14 @@ export default {
|
||||||
if (response.data != undefined && response.data != null) {
|
if (response.data != undefined && response.data != null) {
|
||||||
this.data = response.data;
|
this.data = response.data;
|
||||||
this.data.forEach(node => {
|
this.data.forEach(node => {
|
||||||
node.name === 'UNPLANNED' ? node.name = this.$t('api_test.definition.unplanned_api') : node.name
|
node.name = node.name === 'UNPLANNED' ? this.$t('api_test.definition.unplanned_api') : node.name;
|
||||||
|
node.label = node.label === 'UNPLANNED' ? this.$t('api_test.definition.unplanned_api') : node.label
|
||||||
buildTree(node, {path: ''});
|
buildTree(node, {path: ''});
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
node.children.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('api_test.definition.unplanned_api') : node.name
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.$emit('setModuleOptions', this.data);
|
this.$emit('setModuleOptions', this.data);
|
||||||
this.$emit('setNodeTree', this.data);
|
this.$emit('setNodeTree', this.data);
|
||||||
|
|
|
@ -175,7 +175,8 @@ export default {
|
||||||
this.result = getTestCaseNodes(this.projectId, data => {
|
this.result = getTestCaseNodes(this.projectId, data => {
|
||||||
this.treeNodes = data;
|
this.treeNodes = data;
|
||||||
this.treeNodes.forEach(node => {
|
this.treeNodes.forEach(node => {
|
||||||
node.name === 'UNPLANNED' ? node.name = this.$t('test_track.unplanned_case') : node.name
|
node.name === 'UNPLANNED' ? node.name = this.$t('test_track.unplanned_case') : node.name;
|
||||||
|
node.label === 'UNPLANNED' ? node.label = this.$t('test_track.unplanned_case') : node.label;
|
||||||
buildTree(node, {path: ''});
|
buildTree(node, {path: ''});
|
||||||
});
|
});
|
||||||
this.setModuleOptions();
|
this.setModuleOptions();
|
||||||
|
@ -252,6 +253,7 @@ export default {
|
||||||
setModuleOptions() {
|
setModuleOptions() {
|
||||||
let moduleOptions = [];
|
let moduleOptions = [];
|
||||||
this.treeNodes.forEach(node => {
|
this.treeNodes.forEach(node => {
|
||||||
|
node.name === 'UNPLANNED' ? node.name = this.$t('test_track.unplanned_case') : node.name
|
||||||
buildNodePath(node, {path: ''}, moduleOptions);
|
buildNodePath(node, {path: ''}, moduleOptions);
|
||||||
});
|
});
|
||||||
this.$store.commit('setTestCaseModuleOptions', moduleOptions);
|
this.$store.commit('setTestCaseModuleOptions', moduleOptions);
|
||||||
|
|
|
@ -147,6 +147,13 @@ export default {
|
||||||
}
|
}
|
||||||
this.result = this.$get(url, response => {
|
this.result = this.$get(url, response => {
|
||||||
this.treeNodes = response.data;
|
this.treeNodes = response.data;
|
||||||
|
this.treeNodes.forEach(nodes => {
|
||||||
|
if (nodes.children && nodes.children.length > 0) {
|
||||||
|
nodes.children.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -87,6 +87,9 @@ export default {
|
||||||
vueObj.$refs.nodeTree.result = this.$post("/case/node/list/all/plan",
|
vueObj.$refs.nodeTree.result = this.$post("/case/node/list/all/plan",
|
||||||
{testPlanId: this.planId, projectId: vueObj.projectId}, response => {
|
{testPlanId: this.planId, projectId: vueObj.projectId}, response => {
|
||||||
vueObj.treeNodes = response.data;
|
vueObj.treeNodes = response.data;
|
||||||
|
vueObj.treeNodes.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name
|
||||||
|
});
|
||||||
});
|
});
|
||||||
vueObj.selectNodeIds = [];
|
vueObj.selectNodeIds = [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,6 +282,9 @@ export default {
|
||||||
};
|
};
|
||||||
this.result = this.$post("/case/node/list/all/plan", param, response => {
|
this.result = this.$post("/case/node/list/all/plan", param, response => {
|
||||||
this.treeNodes = response.data;
|
this.treeNodes = response.data;
|
||||||
|
this.treeNodes.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -156,6 +156,13 @@ export default {
|
||||||
if (this.reviewId) {
|
if (this.reviewId) {
|
||||||
this.result = this.$get("/case/node/list/review/" + this.reviewId, response => {
|
this.result = this.$get("/case/node/list/review/" + this.reviewId, response => {
|
||||||
this.treeNodes = response.data;
|
this.treeNodes = response.data;
|
||||||
|
this.treeNodes.forEach(nodes => {
|
||||||
|
if (nodes.children && nodes.children.length > 0) {
|
||||||
|
nodes.children.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -134,6 +134,13 @@ export default {
|
||||||
if (this.reviewId) {
|
if (this.reviewId) {
|
||||||
this.result = this.$get("/case/node/list/review/" + this.reviewId, response => {
|
this.result = this.$get("/case/node/list/review/" + this.reviewId, response => {
|
||||||
this.treeNodes = response.data;
|
this.treeNodes = response.data;
|
||||||
|
this.treeNodes.forEach(nodes => {
|
||||||
|
if (nodes.children && nodes.children.length > 0) {
|
||||||
|
nodes.children.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -92,6 +92,13 @@ export default {
|
||||||
if (this.planId) {
|
if (this.planId) {
|
||||||
this.result = this.$get("/case/node/list/plan/" + this.planId, response => {
|
this.result = this.$get("/case/node/list/plan/" + this.planId, response => {
|
||||||
this.treeNodes = response.data;
|
this.treeNodes = response.data;
|
||||||
|
this.treeNodes.forEach(nodes => {
|
||||||
|
if (nodes.children && nodes.children.length > 0) {
|
||||||
|
nodes.children.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
// 性能测试与模块无关,过滤项目下模块
|
// 性能测试与模块无关,过滤项目下模块
|
||||||
this.treeNodes.map(node => node.children = null);
|
this.treeNodes.map(node => node.children = null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -364,8 +364,10 @@ export default {
|
||||||
this.result = this.$post("/case/node/list/all/review",
|
this.result = this.$post("/case/node/list/all/review",
|
||||||
{reviewId: this.reviewId, projectId: this.projectId}, response => {
|
{reviewId: this.reviewId, projectId: this.projectId}, response => {
|
||||||
this.treeNodes = response.data;
|
this.treeNodes = response.data;
|
||||||
|
this.treeNodes.forEach(node => {
|
||||||
|
node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.selectNodeIds = [];
|
this.selectNodeIds = [];
|
||||||
},
|
},
|
||||||
getVersionOptions() {
|
getVersionOptions() {
|
||||||
|
|
Loading…
Reference in New Issue