feat: 合并站点审核+页面配置到站点列表页(badge提示)
This commit is contained in:
@@ -18,18 +18,10 @@
|
||||
<el-icon><OfficeBuilding /></el-icon>
|
||||
<span>站点列表</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/sites/review">
|
||||
<el-icon><Checked /></el-icon>
|
||||
<span>站点审核</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/access-results">
|
||||
<el-icon><Connection /></el-icon>
|
||||
<span>适配验证</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/site-pages">
|
||||
<el-icon><Tickets /></el-icon>
|
||||
<span>页面配置</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/risk-rules">
|
||||
<el-icon><Warning /></el-icon>
|
||||
<span>风险规则</span>
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2>站点列表</h2>
|
||||
<div style="display:flex;justify-content:space-between;align-items:center">
|
||||
<h2>站点列表</h2>
|
||||
<div style="display:flex;gap:8px">
|
||||
<el-badge v-if="pendingCount > 0" :value="pendingCount" type="warning">
|
||||
<el-button size="small" @click="$router.push('/sites/review')">变更审核</el-button>
|
||||
</el-badge>
|
||||
<el-button v-else size="small" @click="$router.push('/sites/review')">变更审核</el-button>
|
||||
<el-button size="small" @click="$router.push('/site-pages')">页面配置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-card style="margin-top: 20px">
|
||||
<el-table :data="sites" v-loading="loading" stripe size="small" empty-text="暂无站点">
|
||||
<el-table-column prop="siteId" label="站点ID" width="120" />
|
||||
@@ -133,7 +142,7 @@
|
||||
<script setup>
|
||||
import api from '../api'
|
||||
|
||||
const sites = ref([])
|
||||
const sites = ref([]), pendingCount = ref(0)
|
||||
const loading = ref(false)
|
||||
const editVisible = ref(false), saving = ref(false)
|
||||
const editForm = reactive({ id: null, siteId: '', namesText: '', urlsText: '', siteType: '', status: '', description: '' })
|
||||
@@ -153,7 +162,11 @@ const highlightedJson = computed(() => {
|
||||
|
||||
const fetchAll = async () => {
|
||||
loading.value = true
|
||||
try { const r = await api.sites.adminList(); sites.value = r.data || [] }
|
||||
try {
|
||||
const r = await api.sites.adminList(); sites.value = r.data || []
|
||||
try { pendingCount.value = ((await api.sites.pendingChanges()).data || []).length }
|
||||
catch { pendingCount.value = 0 }
|
||||
}
|
||||
catch { ElMessage.error('获取站点列表失败') }
|
||||
finally { loading.value = false }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user