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