测试计划详情添加报告按钮

This commit is contained in:
chenjianxing 2020-06-10 10:31:01 +08:00
parent 7e6fecc09f
commit 4f13120d31
1 changed files with 20 additions and 0 deletions

View File

@ -13,6 +13,8 @@
<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,6 +140,9 @@
:is-read-only="isReadOnly" :is-read-only="isReadOnly"
@refreshTable="search"/> @refreshTable="search"/>
<test-report-template-list @openReport="openReport" ref="testReporTtemplateList"/>
<test-case-report-view @refresh="initTableData" ref="testCaseReportView"/>
</el-card> </el-card>
</div> </div>
</template> </template>
@ -173,6 +178,8 @@
export default { export default {
name: "TestPlanTestCaseList", name: "TestPlanTestCaseList",
components: { components: {
TestCaseReportView,
TestReportTemplateList,
MsTableOperatorButton, MsTableOperatorButton,
MsTableOperator, MsTableOperator,
MethodTableItem, MethodTableItem,
@ -356,6 +363,9 @@
} }
this.initTableData(); this.initTableData();
}, },
openTestReport() {
this.$refs.testReporTtemplateList.open(this.planId);
},
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++) {
@ -374,6 +384,16 @@
}); });
} }
}, },
openReport(planId, id) {
this.getTestPlanById();
if (!id) {
id = this.testPlan.reportId;
}
if (!planId) {
planId = this.planId;
}
this.$refs.testCaseReportView.open(planId, id);
},
filter(filters) { filter(filters) {
_filter(filters, this.condition); _filter(filters, this.condition);
this.initTableData(); this.initTableData();