|
@@ -12,6 +12,17 @@
|
|
|
@keyup.enter="handleSearch"
|
|
@keyup.enter="handleSearch"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item label="执行状态">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="searchForm.success"
|
|
|
|
|
+ placeholder="请选择状态"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 150px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option label="成功" :value="1" />
|
|
|
|
|
+ <el-option label="失败" :value="0" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="执行时间">
|
|
<el-form-item label="执行时间">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="searchForm.date_range"
|
|
v-model="searchForm.date_range"
|
|
@@ -163,6 +174,7 @@ const selectedIds = ref([])
|
|
|
|
|
|
|
|
const searchForm = reactive({
|
|
const searchForm = reactive({
|
|
|
name: '',
|
|
name: '',
|
|
|
|
|
+ success: null,
|
|
|
date_range: []
|
|
date_range: []
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -188,6 +200,9 @@ const getList = async () => {
|
|
|
list_rows: pagination.list_rows,
|
|
list_rows: pagination.list_rows,
|
|
|
name: searchForm.name
|
|
name: searchForm.name
|
|
|
}
|
|
}
|
|
|
|
|
+ if (searchForm.success !== null && searchForm.success !== '') {
|
|
|
|
|
+ params.success = searchForm.success
|
|
|
|
|
+ }
|
|
|
if (searchForm.date_range && searchForm.date_range.length === 2) {
|
|
if (searchForm.date_range && searchForm.date_range.length === 2) {
|
|
|
params.start_time = searchForm.date_range[0]
|
|
params.start_time = searchForm.date_range[0]
|
|
|
params.end_time = searchForm.date_range[1]
|
|
params.end_time = searchForm.date_range[1]
|
|
@@ -201,7 +216,7 @@ const getList = async () => {
|
|
|
stats.total = s.total || 0
|
|
stats.total = s.total || 0
|
|
|
stats.success_count = s.success_count || 0
|
|
stats.success_count = s.success_count || 0
|
|
|
stats.fail_count = s.fail_count || 0
|
|
stats.fail_count = s.fail_count || 0
|
|
|
- stats.success_rate = stats.total > 0 ? parseFloat((stats.success_count / stats.total * 100).toFixed(1)) : 0
|
|
|
|
|
|
|
+ stats.success_rate = stats.total > 0 ? parseFloat((stats.success_count / stats.total * 100).toFixed(4)) : 0
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('获取日志列表失败:', e)
|
|
console.error('获取日志列表失败:', e)
|
|
@@ -219,6 +234,7 @@ const handleSearch = () => {
|
|
|
// 重置
|
|
// 重置
|
|
|
const handleReset = () => {
|
|
const handleReset = () => {
|
|
|
searchForm.name = ''
|
|
searchForm.name = ''
|
|
|
|
|
+ searchForm.success = null
|
|
|
searchForm.date_range = []
|
|
searchForm.date_range = []
|
|
|
pagination.page = 1
|
|
pagination.page = 1
|
|
|
getList()
|
|
getList()
|