Merge branch 'dev' of https://github.com/metersphere/server into dev
This commit is contained in:
commit
db9d5643aa
|
@ -91,6 +91,7 @@
|
|||
reportRecent: {
|
||||
title: this.$t('report.recent'),
|
||||
url: "/performance/report/recent/5",
|
||||
showTime: true,
|
||||
index(item) {
|
||||
return '/performance/report/view/' + item.id;
|
||||
},
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<el-table :data="tableData" class="test-content">
|
||||
<el-table :data="tableData" class="test-content"
|
||||
:default-sort="{prop: 'createTime', order: 'descending'}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
|
@ -36,21 +38,25 @@
|
|||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
sortable
|
||||
width="250"
|
||||
:label="$t('commons.create_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="250"
|
||||
:label="$t('commons.update_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- width="250"-->
|
||||
<!-- :label="$t('commons.update_time')">-->
|
||||
<!-- <template v-slot:default="scope">-->
|
||||
<!-- <span>{{ scope.row.updateTime | timestampFormatDate }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
prop="status"
|
||||
:filter-method="filter"
|
||||
:filters="statusFilters"
|
||||
:label="$t('commons.status')">
|
||||
<template v-slot:default="{row}">
|
||||
<ms-performance-report-status :row="row"/>
|
||||
|
@ -98,6 +104,13 @@
|
|||
total: 0,
|
||||
loading: false,
|
||||
testId: null,
|
||||
statusFilters: [
|
||||
{text: 'Starting', value: 'Starting'},
|
||||
{text: 'Running', value: 'Running'},
|
||||
{text: 'Reporting', value: 'Reporting'},
|
||||
{text: 'Completed', value: 'Completed'},
|
||||
{text: 'Error', value: 'Error'}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -148,6 +161,9 @@
|
|||
this.initTableData();
|
||||
});
|
||||
},
|
||||
filter(value, row) {
|
||||
return row.status === value;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -61,6 +61,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
:filter-method="filter"
|
||||
:filters="statusFilters"
|
||||
:label="$t('commons.status')">
|
||||
<template v-slot:default="{row}">
|
||||
<ms-performance-test-status :row="row"/>
|
||||
|
@ -88,7 +90,7 @@
|
|||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsPerformanceTestStatus from "./PerformanceTestStatus";
|
||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||
import {_sort} from "../../../../common/js/utils";
|
||||
import {_filter, _sort} from "../../../../common/js/utils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -124,6 +126,14 @@
|
|||
tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger",
|
||||
exec: this.handleDelete
|
||||
}
|
||||
],
|
||||
statusFilters: [
|
||||
{text: 'Saved', value: 'Saved'},
|
||||
{text: 'Starting', value: 'Starting'},
|
||||
{text: 'Running', value: 'Running'},
|
||||
{text: 'Reporting', value: 'Reporting'},
|
||||
{text: 'Completed', value: 'Completed'},
|
||||
{text: 'Error', value: 'Error'}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -194,6 +204,9 @@
|
|||
// _sort(column, this.condition);
|
||||
// this.initTableData();
|
||||
// },
|
||||
filter(value, row) {
|
||||
return row.status === value;
|
||||
},
|
||||
link(row) {
|
||||
this.$router.push({
|
||||
path: '/performance/test/edit/' + row.id,
|
||||
|
|
Loading…
Reference in New Issue