71 lines
2.6 KiB
Vue
71 lines
2.6 KiB
Vue
<template>
|
|
<div>
|
|
<h2>适配验证</h2>
|
|
<el-card style="margin-top: 20px">
|
|
<div style="margin-bottom: 12px">
|
|
<el-button @click="fetchAll" :icon="Refresh">刷新</el-button>
|
|
</div>
|
|
|
|
<el-table :data="sites" v-loading="loading" stripe size="small" empty-text="暂无访问记录">
|
|
<el-table-column prop="siteId" label="站点ID" width="130" />
|
|
<el-table-column label="页面数" width="100">
|
|
<template #default="scope">
|
|
<el-tag size="small" type="info">{{ scope.row.pages?.length || 0 }}</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="总次数" width="80">
|
|
<template #default="scope">
|
|
<span class="text-xs">{{ scope.row.totalResults }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="验证进度" min-width="220">
|
|
<template #default="scope">
|
|
<div style="display:flex;gap:6px;align-items:center;flex-wrap:wrap">
|
|
<el-tag size="small" type="success">{{ scope.row.validCount }} 有效</el-tag>
|
|
<el-tag size="small" type="danger">{{ scope.row.invalidCount }} 无效</el-tag>
|
|
<el-tag size="small" type="warning">{{ scope.row.uncheckedCount }} 待验</el-tag>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="待审核" width="80">
|
|
<template #default="scope">
|
|
<el-tag v-if="scope.row.pendingConfigCount" size="small" type="danger">{{ scope.row.pendingConfigCount }}</el-tag>
|
|
<span v-else class="text-xs" style="color:#909399">0</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="最近提交" width="160">
|
|
<template #default="scope">
|
|
<span class="text-xs">{{ scope.row.lastSubmitted || '-' }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="180">
|
|
<template #default="scope">
|
|
<el-button size="small" type="primary" @click="$router.push(`/access-results/check/${scope.row.siteId}`)">
|
|
进入校验
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-card>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import api from '../api'
|
|
import { Refresh } from '@element-plus/icons-vue'
|
|
|
|
const loading = ref(false)
|
|
const sites = ref([])
|
|
|
|
const fetchAll = async () => {
|
|
loading.value = true
|
|
try {
|
|
const r = await api.accessResults.summary()
|
|
sites.value = r.data || []
|
|
} catch { ElMessage.error('获取汇总失败') }
|
|
finally { loading.value = false }
|
|
}
|
|
|
|
onMounted(fetchAll)
|
|
</script>
|