Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
6aa1701e2e
|
@ -7,12 +7,9 @@
|
|||
:title="$t('commons.test')"
|
||||
@create="create" :createTip="$t('load_test.create')"/>
|
||||
</template>
|
||||
<el-table :data="tableData" class="table-content" @sort-change="sort"
|
||||
<el-table :data="tableData" class="table-content" @sort-change="sort" @row-click="handleEdit"
|
||||
@filter-change="filter">
|
||||
<el-table-column :label="$t('commons.name')" width="250" show-overflow-tooltip>
|
||||
<template v-slot:default="scope">
|
||||
<el-link type="info" @click="handleEdit(scope.row)">{{ scope.row.name }}</el-link>
|
||||
</template>
|
||||
<el-table-column prop="name" :label="$t('commons.name')" width="250" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectName" :label="$t('load_test.project_name')" width="200" show-overflow-tooltip/>
|
||||
<el-table-column prop="userName" :label="$t('api_test.creator')" width="150" show-overflow-tooltip/>
|
||||
|
@ -153,9 +150,6 @@
|
|||
}
|
||||
this.search();
|
||||
},
|
||||
/* filter(value, row) {
|
||||
return row.status === value;
|
||||
}*/
|
||||
sort(column) {
|
||||
_sort(column, this.condition);
|
||||
this.init();
|
||||
|
@ -176,4 +170,8 @@
|
|||
.table-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
break;
|
||||
case "logout":
|
||||
this.$get("/signout", function () {
|
||||
alert("signout");
|
||||
localStorage.clear();
|
||||
window.location.href = "/login";
|
||||
});
|
||||
|
|
|
@ -19,15 +19,13 @@
|
|||
<el-table :data="tableData" class="test-content"
|
||||
@sort-change="sort"
|
||||
@filter-change="filter"
|
||||
@row-click="link"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
width="150"
|
||||
show-overflow-tooltip>
|
||||
<template v-slot:default="scope">
|
||||
<el-link type="info" @click="link(scope.row)">{{ scope.row.name }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="projectName"
|
||||
|
@ -228,4 +226,8 @@
|
|||
margin-right: -9px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
cursor:pointer;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -6,12 +6,8 @@
|
|||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="search" @create="create"
|
||||
:create-tip="btnTips" :title="title"/>
|
||||
</template>
|
||||
<el-table :data="items" style="width: 100%" @sort-change="sort">
|
||||
<el-table-column prop="name" :label="$t('commons.name')">
|
||||
<template v-slot:default="scope">
|
||||
<el-link type="info" @click="link(scope.row)">{{ scope.row.name }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table @row-click="link" :data="items" style="width: 100%" @sort-change="sort">
|
||||
<el-table-column prop="name" :label="$t('commons.name')"/>
|
||||
<el-table-column prop="description" :label="$t('commons.description')"/>
|
||||
<!--<el-table-column prop="workspaceName" :label="$t('project.owning_workspace')"/>-->
|
||||
<el-table-column
|
||||
|
@ -231,6 +227,10 @@
|
|||
this.$router.push({
|
||||
path: '/api/test/list/' + row.id
|
||||
})
|
||||
} else if (this.$route.name ==='trackProject') {
|
||||
this.$router.push({
|
||||
path: '/track/case/' + row.id
|
||||
})
|
||||
}
|
||||
},
|
||||
sort(column) {
|
||||
|
@ -243,4 +243,8 @@
|
|||
|
||||
<style scoped>
|
||||
|
||||
.el-table {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -84,13 +84,22 @@
|
|||
<el-table-column
|
||||
:label="$t('commons.operating')">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
|
||||
<test-report-template-list @openReport="openReport" ref="testReporTtemplateList"/>
|
||||
<test-case-report-view @refresh="initTableData" ref="testCaseReportView"/>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -104,10 +113,14 @@
|
|||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
||||
import {_filter, _sort} from "../../../../../common/js/utils";
|
||||
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
||||
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
||||
|
||||
export default {
|
||||
name: "TestPlanList",
|
||||
components: {
|
||||
TestCaseReportView,
|
||||
TestReportTemplateList,
|
||||
PlanStageTableItem,
|
||||
PlanStatusTableItem,
|
||||
MsTableOperator, MsTableOperatorButton, MsDialogFooter, MsTableHeader, MsCreateBox, MsTablePagination},
|
||||
|
@ -198,7 +211,15 @@
|
|||
sort(column) {
|
||||
_sort(column, this.condition);
|
||||
this.initTableData();
|
||||
}
|
||||
},
|
||||
openTestReportTemplate(data) {
|
||||
this.$refs.testReporTtemplateList.open(data.id);
|
||||
},
|
||||
openReport(planId, reportId) {
|
||||
if (reportId) {
|
||||
this.$refs.testCaseReportView.open(planId, reportId);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</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-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" 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>
|
||||
</ms-table-header>
|
||||
</template>
|
||||
|
@ -138,9 +136,6 @@
|
|||
:is-read-only="isReadOnly"
|
||||
@refreshTable="search"/>
|
||||
|
||||
<test-report-template-list @openReport="openReport" :plan-id="planId" ref="testReporTtemplateList"/>
|
||||
<test-case-report-view :plan-id="planId" ref="testCaseReportView"/>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -169,8 +164,6 @@
|
|||
export default {
|
||||
name: "TestPlanTestCaseList",
|
||||
components: {
|
||||
TestCaseReportView,
|
||||
TestReportTemplateList,
|
||||
MsTableOperatorButton,
|
||||
MsTableOperator,
|
||||
MethodTableItem,
|
||||
|
@ -351,9 +344,6 @@
|
|||
}
|
||||
this.initTableData();
|
||||
},
|
||||
openTestReport() {
|
||||
this.$refs.testReporTtemplateList.open();
|
||||
},
|
||||
statusChange(param) {
|
||||
this.$post('/test/plan/case/edit' , param, () => {
|
||||
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, this.condition);
|
||||
this.initTableData();
|
||||
|
|
|
@ -21,12 +21,8 @@
|
|||
data() {
|
||||
return {
|
||||
templateVisible: false,
|
||||
templates: []
|
||||
}
|
||||
},
|
||||
props: {
|
||||
planId: {
|
||||
type: String
|
||||
templates: [],
|
||||
planId: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -43,12 +39,13 @@
|
|||
param.planId = this.planId;
|
||||
param.templateId = templateId;
|
||||
this.$post('/case/report/add', param, response => {
|
||||
this.$emit('openReport', response.data);
|
||||
this.$emit('openReport', param.planId, response.data);
|
||||
this.templateVisible = false;
|
||||
});
|
||||
},
|
||||
open() {
|
||||
open(planId) {
|
||||
this.templateVisible = true;
|
||||
this.planId = planId;
|
||||
this.initData();
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
report: {},
|
||||
reportId: '',
|
||||
metric: {},
|
||||
planId: '',
|
||||
componentMap: new Map(
|
||||
[
|
||||
[1, { name: this.$t('test_track.plan_view.base_info'), id: 1 , type: 'system'}],
|
||||
|
@ -72,11 +73,6 @@
|
|||
)
|
||||
}
|
||||
},
|
||||
props: {
|
||||
planId: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
listenGoBack() {
|
||||
//监听浏览器返回操作,关闭该对话框
|
||||
|
@ -88,7 +84,8 @@
|
|||
goBack() {
|
||||
this.handleClose();
|
||||
},
|
||||
open(id) {
|
||||
open(planId, id) {
|
||||
this.planId = planId;
|
||||
if (id) {
|
||||
this.reportId = id;
|
||||
}
|
||||
|
@ -125,6 +122,7 @@
|
|||
},
|
||||
handleClose() {
|
||||
window.removeEventListener('popstate', this.goBack, false);
|
||||
this.$emit('refresh');
|
||||
this.showDialog = false;
|
||||
},
|
||||
handleEdit() {
|
||||
|
|
Loading…
Reference in New Issue