feat(测试跟踪): 测试计划执行页 点击用列标题新打开一个浏览器窗口
This commit is contained in:
parent
180ae0f5f8
commit
9afb9c9300
|
@ -172,6 +172,7 @@ export default {
|
|||
let redirectParam = this.$route.params.dataSelectRange;
|
||||
return redirectParam;
|
||||
},
|
||||
|
||||
projectId() {
|
||||
return this.$store.state.projectId
|
||||
},
|
||||
|
@ -300,11 +301,13 @@ export default {
|
|||
}
|
||||
},
|
||||
editTestCase(testCase) {
|
||||
this.type="edit"
|
||||
this.type = "edit";
|
||||
this.testCaseReadOnly = false;
|
||||
if (this.treeNodes.length < 1) {
|
||||
this.$warning(this.$t('test_track.case.create_module_first'));
|
||||
return;
|
||||
if (testCase.label != "redirect") {
|
||||
if (this.treeNodes.length < 1) {
|
||||
this.$warning(this.$t('test_track.case.create_module_first'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.addTab({name: 'edit', testCaseInfo: testCase});
|
||||
},
|
||||
|
|
|
@ -310,19 +310,23 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
projectId() {
|
||||
return this.$store.state.projectId
|
||||
return this.$store.state.projectId;
|
||||
},
|
||||
selectNodeIds() {
|
||||
return this.$store.state.testCaseSelectNodeIds;
|
||||
},
|
||||
moduleOptions() {
|
||||
return this.$store.state.testCaseModuleOptions;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
created: function () {
|
||||
this.$emit('setCondition', this.condition);
|
||||
this.condition.filters = {reviewStatus: ["Prepare", "Pass", "UnPass"]};
|
||||
this.initTableData();
|
||||
let redirectParam = this.$route.query.dataSelectRange;
|
||||
this.checkRedirectEditPage(redirectParam);
|
||||
|
||||
},
|
||||
activated() {
|
||||
|
@ -340,8 +344,17 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
checkRedirectEditPage(redirectParam) {
|
||||
if (redirectParam != null) {
|
||||
this.$get('test/case/get/' + redirectParam, response => {
|
||||
let testCase = response.data;
|
||||
testCase.label = "redirect";
|
||||
this.$emit('testCaseEdit', testCase);
|
||||
});
|
||||
}
|
||||
},
|
||||
customHeader() {
|
||||
this.$refs.headerCustom.open(this.tableLabel)
|
||||
this.$refs.headerCustom.open(this.tableLabel);
|
||||
},
|
||||
getSelectDataRange() {
|
||||
let dataRange = this.$route.params.dataSelectRange;
|
||||
|
|
|
@ -32,9 +32,11 @@
|
|||
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 0;">
|
||||
<el-row class="head-bar">
|
||||
<el-col>
|
||||
<el-divider content-position="left">{{ testCase.name }}</el-divider>
|
||||
<el-divider content-position="left">
|
||||
<el-button type="text" @click="openTestTestCase(testCase)">{{ testCase.name }}</el-button>
|
||||
</el-divider>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-header>
|
||||
|
@ -427,12 +429,21 @@ export default {
|
|||
break;
|
||||
}
|
||||
case "automation": {
|
||||
let automationData = this.$router.resolve({name:'ApiAutomation',params:{redirectID:getUUID(),dataType:"scenario",dataSelectRange:'edit:'+id}});
|
||||
let automationData = this.$router.resolve({
|
||||
name: 'ApiAutomation',
|
||||
params: {redirectID: getUUID(), dataType: "scenario", dataSelectRange: 'edit:' + id}
|
||||
});
|
||||
window.open(automationData.href, '_blank');
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
openTestTestCase(item) {
|
||||
let TestCaseData = this.$router.resolve(
|
||||
{path: '/track/case/all', query: {redirectID: getUUID(), dataType: "testCase", dataSelectRange: item.caseId}}
|
||||
);
|
||||
window.open(TestCaseData.href, '_blank');
|
||||
},
|
||||
addPLabel(str) {
|
||||
return "<p>" + str + "</p>";
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue