性能测试报告筛选排序
This commit is contained in:
parent
2ac559519a
commit
32b77b5e2f
|
@ -16,7 +16,9 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table :data="tableData" class="test-content">
|
<el-table :data="tableData" class="test-content"
|
||||||
|
:default-sort="{prop: 'createTime', order: 'descending'}"
|
||||||
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
:label="$t('commons.name')"
|
:label="$t('commons.name')"
|
||||||
|
@ -36,21 +38,25 @@
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
sortable
|
||||||
width="250"
|
width="250"
|
||||||
:label="$t('commons.create_time')">
|
:label="$t('commons.create_time')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column-->
|
||||||
width="250"
|
<!-- width="250"-->
|
||||||
:label="$t('commons.update_time')">
|
<!-- :label="$t('commons.update_time')">-->
|
||||||
<template v-slot:default="scope">
|
<!-- <template v-slot:default="scope">-->
|
||||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
<!-- <span>{{ scope.row.updateTime | timestampFormatDate }}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="status"
|
prop="status"
|
||||||
|
:filter-method="filter"
|
||||||
|
:filters="statusFilters"
|
||||||
:label="$t('commons.status')">
|
:label="$t('commons.status')">
|
||||||
<template v-slot:default="{row}">
|
<template v-slot:default="{row}">
|
||||||
<ms-performance-report-status :row="row"/>
|
<ms-performance-report-status :row="row"/>
|
||||||
|
@ -98,6 +104,13 @@
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
testId: null,
|
testId: null,
|
||||||
|
statusFilters: [
|
||||||
|
{text: 'Starting', value: 'Starting'},
|
||||||
|
{text: 'Running', value: 'Running'},
|
||||||
|
{text: 'Reporting', value: 'Reporting'},
|
||||||
|
{text: 'Completed', value: 'Completed'},
|
||||||
|
{text: 'Error', value: 'Error'}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -148,6 +161,9 @@
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
filter(value, row) {
|
||||||
|
return row.status === value;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue