测试报告修改至测试计划
This commit is contained in:
parent
c7a927c78c
commit
9569be7d1f
|
@ -84,13 +84,22 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('commons.operating')">
|
:label="$t('commons.operating')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
|
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)" @deleteClick="handleDelete(scope.row)">
|
||||||
|
<template v-slot:middle>
|
||||||
|
<ms-table-operator-button type="success" v-if="!scope.row.reportId" :tip="$t('test_track.plan_view.create_report')" icon="el-icon-document" @exec="openTestReportTemplate(scope.row)"/>
|
||||||
|
<ms-table-operator-button type="success" v-if="scope.row.reportId" :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document" @exec="openReport(scope.row.id, scope.row.reportId)"/>
|
||||||
|
</template>
|
||||||
|
</ms-table-operator>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||||
:total="total"/>
|
:total="total"/>
|
||||||
|
|
||||||
|
<test-report-template-list @openReport="openReport" ref="testReporTtemplateList"/>
|
||||||
|
<test-case-report-view @refresh="initTableData" ref="testCaseReportView"/>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -104,10 +113,14 @@
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
||||||
import {_filter, _sort} from "../../../../../common/js/utils";
|
import {_filter, _sort} from "../../../../../common/js/utils";
|
||||||
|
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
||||||
|
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
components: {
|
components: {
|
||||||
|
TestCaseReportView,
|
||||||
|
TestReportTemplateList,
|
||||||
PlanStageTableItem,
|
PlanStageTableItem,
|
||||||
PlanStatusTableItem,
|
PlanStatusTableItem,
|
||||||
MsTableOperator, MsTableOperatorButton, MsDialogFooter, MsTableHeader, MsCreateBox, MsTablePagination},
|
MsTableOperator, MsTableOperatorButton, MsDialogFooter, MsTableHeader, MsCreateBox, MsTablePagination},
|
||||||
|
@ -198,7 +211,15 @@
|
||||||
sort(column) {
|
sort(column) {
|
||||||
_sort(column, this.condition);
|
_sort(column, this.condition);
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
}
|
},
|
||||||
|
openTestReportTemplate(data) {
|
||||||
|
this.$refs.testReporTtemplateList.open(data.id);
|
||||||
|
},
|
||||||
|
openReport(planId, reportId) {
|
||||||
|
if (reportId) {
|
||||||
|
this.$refs.testCaseReportView.open(planId, reportId);
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
<ms-table-button :is-tester-permission="true" icon="el-icon-unlock" :content="$t('test_track.plan_view.cancel_relevance')" @click="handleBatch('delete')"/>
|
<ms-table-button :is-tester-permission="true" icon="el-icon-unlock" :content="$t('test_track.plan_view.cancel_relevance')" @click="handleBatch('delete')"/>
|
||||||
<ms-table-button :is-tester-permission="true" icon="el-icon-edit-outline" :content="$t('test_track.plan_view.change_execution_results')" @click="handleBatch('status')"/>
|
<ms-table-button :is-tester-permission="true" icon="el-icon-edit-outline" :content="$t('test_track.plan_view.change_execution_results')" @click="handleBatch('status')"/>
|
||||||
<ms-table-button :is-tester-permission="true" icon="el-icon-user" :content="$t('test_track.plan_view.change_executor')" @click="handleBatch('executor')"/>
|
<ms-table-button :is-tester-permission="true" icon="el-icon-user" :content="$t('test_track.plan_view.change_executor')" @click="handleBatch('executor')"/>
|
||||||
<ms-table-button :is-tester-permission="true" v-if="!testPlan.reportId" icon="el-icon-document" :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"/>
|
|
||||||
</template>
|
</template>
|
||||||
</ms-table-header>
|
</ms-table-header>
|
||||||
</template>
|
</template>
|
||||||
|
@ -138,9 +136,6 @@
|
||||||
:is-read-only="isReadOnly"
|
:is-read-only="isReadOnly"
|
||||||
@refreshTable="search"/>
|
@refreshTable="search"/>
|
||||||
|
|
||||||
<test-report-template-list @openReport="openReport" :plan-id="planId" ref="testReporTtemplateList"/>
|
|
||||||
<test-case-report-view :plan-id="planId" ref="testCaseReportView"/>
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -169,8 +164,6 @@
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanTestCaseList",
|
name: "TestPlanTestCaseList",
|
||||||
components: {
|
components: {
|
||||||
TestCaseReportView,
|
|
||||||
TestReportTemplateList,
|
|
||||||
MsTableOperatorButton,
|
MsTableOperatorButton,
|
||||||
MsTableOperator,
|
MsTableOperator,
|
||||||
MethodTableItem,
|
MethodTableItem,
|
||||||
|
@ -351,9 +344,6 @@
|
||||||
}
|
}
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
},
|
},
|
||||||
openTestReport() {
|
|
||||||
this.$refs.testReporTtemplateList.open();
|
|
||||||
},
|
|
||||||
statusChange(param) {
|
statusChange(param) {
|
||||||
this.$post('/test/plan/case/edit' , param, () => {
|
this.$post('/test/plan/case/edit' , param, () => {
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
|
@ -372,13 +362,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openReport(id) {
|
|
||||||
this.getTestPlanById();
|
|
||||||
if (!id) {
|
|
||||||
id = this.testPlan.reportId;
|
|
||||||
}
|
|
||||||
this.$refs.testCaseReportView.open(id);
|
|
||||||
},
|
|
||||||
filter(filters) {
|
filter(filters) {
|
||||||
_filter(filters, this.condition);
|
_filter(filters, this.condition);
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
|
|
|
@ -21,12 +21,8 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
templateVisible: false,
|
templateVisible: false,
|
||||||
templates: []
|
templates: [],
|
||||||
}
|
planId: ''
|
||||||
},
|
|
||||||
props: {
|
|
||||||
planId: {
|
|
||||||
type: String
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -43,12 +39,13 @@
|
||||||
param.planId = this.planId;
|
param.planId = this.planId;
|
||||||
param.templateId = templateId;
|
param.templateId = templateId;
|
||||||
this.$post('/case/report/add', param, response => {
|
this.$post('/case/report/add', param, response => {
|
||||||
this.$emit('openReport', response.data);
|
this.$emit('openReport', param.planId, response.data);
|
||||||
this.templateVisible = false;
|
this.templateVisible = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
open() {
|
open(planId) {
|
||||||
this.templateVisible = true;
|
this.templateVisible = true;
|
||||||
|
this.planId = planId;
|
||||||
this.initData();
|
this.initData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
report: {},
|
report: {},
|
||||||
reportId: '',
|
reportId: '',
|
||||||
metric: {},
|
metric: {},
|
||||||
|
planId: '',
|
||||||
componentMap: new Map(
|
componentMap: new Map(
|
||||||
[
|
[
|
||||||
[1, { name: this.$t('test_track.plan_view.base_info'), id: 1 , type: 'system'}],
|
[1, { name: this.$t('test_track.plan_view.base_info'), id: 1 , type: 'system'}],
|
||||||
|
@ -72,11 +73,6 @@
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
planId: {
|
|
||||||
type: String
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
listenGoBack() {
|
listenGoBack() {
|
||||||
//监听浏览器返回操作,关闭该对话框
|
//监听浏览器返回操作,关闭该对话框
|
||||||
|
@ -88,7 +84,8 @@
|
||||||
goBack() {
|
goBack() {
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
},
|
},
|
||||||
open(id) {
|
open(planId, id) {
|
||||||
|
this.planId = planId;
|
||||||
if (id) {
|
if (id) {
|
||||||
this.reportId = id;
|
this.reportId = id;
|
||||||
}
|
}
|
||||||
|
@ -125,6 +122,7 @@
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
window.removeEventListener('popstate', this.goBack, false);
|
window.removeEventListener('popstate', this.goBack, false);
|
||||||
|
this.$emit('refresh');
|
||||||
this.showDialog = false;
|
this.showDialog = false;
|
||||||
},
|
},
|
||||||
handleEdit() {
|
handleEdit() {
|
||||||
|
|
Loading…
Reference in New Issue