添加测试报告相关组件

This commit is contained in:
shiziyuan9527 2020-03-09 16:12:06 +08:00
parent 475ea93a6d
commit ceb8d200c5
9 changed files with 148 additions and 6 deletions

View File

@ -101,6 +101,10 @@ export default {
'recent': 'Recent Report',
'search_by_name': 'Search by Name',
'test_name': 'Test',
'test_overview': 'Test Overview',
'test_request_statistics': 'Test Request Statistics',
'test_error_log': 'Test Error Log',
'test_log_details': 'Test Log Details'
},
load_test: {
'recent': 'Recent Tests',

View File

@ -101,6 +101,10 @@ export default {
'recent': '最近的报告',
'search_by_name': '根据名称搜索',
'test_name': '所属测试',
'test_overview': '测试概览',
'test_request_statistics': '请求统计',
'test_error_log': '错误记录',
'test_log_details': '日志详情'
},
load_test: {
'recent': '最近的测试',

View File

@ -48,11 +48,11 @@
</template>
</el-table-column>
<el-table-column
width="150"
width="200"
:label="$t('commons.operating')">
<template slot-scope="scope">
<el-button @click="handleEdit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
<el-button @click="handleDelete(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
<el-button @click="handleEdit(scope.row)" type="primary" size="mini">查看</el-button>
<el-button @click="handleDelete(scope.row)" type="danger" size="mini">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -129,8 +129,10 @@
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleEdit() {
handleEdit(testPlan) {
this.$router.push({
path: '/reportView/' + testPlan.id
})
},
handleDelete(report) {
this.$alert(this.$t('load_test.delete_confirm') + report.name + "", '', {

View File

@ -0,0 +1,57 @@
<template>
<div v-loading="result.loading">
<div class="main-content">
<el-card>
<el-row>
</el-row>
<el-tabs v-model="active" type="border-card" :stretch="true">
<el-tab-pane :label="$t('report.test_overview')">
<ms-report-test-overview />
</el-tab-pane>
<el-tab-pane :label="$t('report.test_request_statistics')">
<ms-report-request-statistics />
</el-tab-pane>
<el-tab-pane :label="$t('report.test_error_log')">
<ms-report-error-log />
</el-tab-pane>
<el-tab-pane :label="$t('report.test_log_details')">
<ms-report-log-details />
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</div>
</template>
<script>
import MsReportErrorLog from './components/ErrorLog';
import MsReportLogDetails from './components/LogDetails';
import MsReportRequestStatistics from './components/RequestStatistics';
import MsReportTestOverview from './components/TestOverview';
export default {
name: "ReportView",
components: {
MsReportErrorLog,
MsReportLogDetails,
MsReportRequestStatistics,
MsReportTestOverview
},
data() {
return {
result: {},
active: '0'
}
},
methods: {
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
Errorlog
</div>
</template>
<script>
export default {
name: "ErrorLog"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
LogDetails
</div>
</template>
<script>
export default {
name: "LogDetails"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
RequestStatistics
</div>
</template>
<script>
export default {
name: "RequestStatistics"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,15 @@
<template>
<div>
TestOverview
</div>
</template>
<script>
export default {
name: "TestOverview"
}
</script>
<style scoped>
</style>

View File

@ -15,6 +15,7 @@ import PersonSetting from "../settings/personal/PersonSetting";
import SystemWorkspace from "../settings/system/SystemWorkspace";
import MsChart from "../project/MsChart";
import AllTestReport from "../report/AllTestReport";
import ReportView from "../report/ReportView";
Vue.use(VueRouter);
@ -115,7 +116,21 @@ const router = new VueRouter({
components: {
content: MsChart
}
}
},
{
path: "/reportView/:reportId",
name: "ReportView",
components: {
content: ReportView
},
props: {
content: (route) => {
return {
...route.params
}
}
}
},
]
});