refactor: extract image form to standalone page and implement tags view store

- Created ImageForm.vue as standalone page for add/edit image functionality
- Removed dialog-based image form from VmImages.vue
- Implemented tagsViewStore for global tab state management
- Added automatic tab closing on form cancel/back
- Fixed data persistence issue when switching between image edits
- Removed quick actions section from ImageForm
- Updated router configuration for new image form route
This commit is contained in:
2025-11-28 14:15:29 +08:00
parent 067e0539ba
commit f7c3be1d30
45 changed files with 8776 additions and 6881 deletions
+200 -193
View File
@@ -1,17 +1,5 @@
<template>
<div class="all-sites-container">
<!-- 页面头部 -->
<div class="page-header">
<div class="left">
<h2 class="title">所有站点</h2>
<el-tag type="info" effect="plain" class="count-tag"> {{ pagination.total }} 个站点</el-tag>
</div>
<div class="actions">
<el-button type="primary" @click="handleRefresh" :icon="Refresh" class="action-btn">刷新</el-button>
<!-- <el-button type="success" @click="handleExport" :icon="Download" class="action-btn">导出数据</el-button> -->
</div>
</div>
<!-- 统计卡片 -->
<div class="stats-panel">
<div class="stat-card total-card">
@@ -44,102 +32,115 @@
</div>
</div>
<!-- 搜索和筛选 -->
<el-card class="filter-container" shadow="never">
<el-form :inline="true" :model="queryParams" class="search-form">
<el-form-item label="搜索容器">
<el-input v-model="queryParams.domain" placeholder="请输入容器id或服务器id" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery" :icon="Search">查询</el-button>
<el-button @click="resetQuery" :icon="Delete">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card class="main-container" shadow="never">
<!-- 搜索和筛选 -->
<div class="filter-section">
<div class="filter-content">
<el-form :inline="true" :model="queryParams" class="search-form">
<el-form-item label="搜索容器">
<el-input v-model="queryParams.domain" placeholder="请输入容器id或服务器id" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">
<el-icon><Search /></el-icon>查询
</el-button>
<el-button @click="resetQuery">
<el-icon><Delete /></el-icon>重置
</el-button>
</el-form-item>
</el-form>
<div class="action-bar">
<el-button type="primary" @click="handleRefresh">
<el-icon><Refresh /></el-icon>刷新
</el-button>
</div>
</div>
</div>
<!-- 站点列表 -->
<el-card class="table-container" shadow="never">
<el-table
v-loading="loading"
:data="siteList"
@selection-change="handleSelectionChange"
style="width: 100%"
border
stripe
>
<el-table-column type="selection" width="55" />
<el-table-column prop="container_id" label="容器ID" width="280" show-overflow-tooltip />
<el-table-column prop="url" label="访问地址" min-width="200" show-overflow-tooltip>
<template #default="{ row }">
<el-link :href="row.url" target="_blank" type="primary" v-if="row.url">
{{ row.url }}
</el-link>
<span v-else class="text-muted">无访问地址</span>
</template>
</el-table-column>
<el-table-column label="连接类型" width="120" align="center">
<template #default="{ row }">
<el-tag :type="getConnectTypeColor(row.connect_type)" size="small">
{{ getConnectTypeText(row.connect_type) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="连接状态" width="100" align="center">
<template #default="{ row }">
<el-tag
:type="getConnectionStatusType(row.connect)"
effect="plain"
size="small"
>
{{ getConnectionStatusText(row.connect) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="违规状态" width="100" align="center">
<template #default="{ row }">
<el-tag
:type="row.is_violation ? 'danger' : 'success'"
effect="plain"
size="small"
>
{{ row.is_violation ? '违规' : '正常' }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" />
<el-table-column label="操作" fixed="right" align="center">
<template #default="{ row }">
<div class="action-buttons">
<!-- 站点列表 -->
<div class="table-section">
<el-table
v-loading="loading"
:data="siteList"
@selection-change="handleSelectionChange"
style="width: 100%"
:header-cell-style="{ background: '#fafafa', color: '#333', fontWeight: 600 }"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="container_id" label="容器ID" width="280" show-overflow-tooltip />
<el-table-column prop="url" label="访问地址" min-width="200" show-overflow-tooltip>
<template #default="{ row }">
<el-link :href="row.url" target="_blank" type="primary" v-if="row.url">
{{ row.url }}
</el-link>
<span v-else class="text-muted">无访问地址</span>
</template>
</el-table-column>
<el-table-column label="连接类型" width="120" align="center">
<template #default="{ row }">
<el-tag :type="getConnectTypeColor(row.connect_type)" size="small">
{{ getConnectTypeText(row.connect_type) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="连接状态" width="100" align="center">
<template #default="{ row }">
<el-tag
:type="getConnectionStatusType(row.connect)"
effect="plain"
size="small"
>
{{ getConnectionStatusText(row.connect) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="违规状态" width="100" align="center">
<template #default="{ row }">
<el-tag
:type="row.is_violation ? 'danger' : 'success'"
effect="plain"
size="small"
>
{{ row.is_violation ? '违规' : '正常' }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" />
<el-table-column label="操作" fixed="right" align="center" width="180">
<template #default="{ row }">
<el-tooltip content="重新检查" placement="top">
<el-button type="warning" :icon="Refresh" circle size="small" @click="handleRecheck(row)" />
<el-button type="warning" link @click="handleRecheck(row)">
<el-icon><Refresh /></el-icon>检查
</el-button>
</el-tooltip>
<el-tooltip content="标记违规" placement="top" v-if="row.status !== 'violation'">
<el-button type="danger" :icon="Warning" circle size="small" @click="handleMarkViolation(row)" />
<el-button type="danger" link @click="handleMarkViolation(row)">
<el-icon><Warning /></el-icon>违规
</el-button>
</el-tooltip>
<el-tooltip content="标记正常" placement="top" v-if="row.status === 'violation'">
<el-button type="success" :icon="CircleCheck" circle size="small" @click="handleMarkNormal(row)" />
<el-button type="success" link @click="handleMarkNormal(row)">
<el-icon><CircleCheck /></el-icon>正常
</el-button>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
background
class="pagination"
/>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
background
class="pagination"
/>
</div>
</el-card>
</div>
</template>
@@ -650,42 +651,7 @@ onMounted(() => {
<style scoped>
.all-sites-container {
padding: 20px;
min-height: calc(100vh - 120px);
background-color: #f5f7fa;
}
/* 页面标题样式 */
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 1px solid #ebeef5;
}
.page-header .left {
display: flex;
align-items: center;
gap: 12px;
}
.page-header .title {
margin: 0;
font-size: 24px;
font-weight: 600;
color: #303133;
}
.count-tag {
font-size: 13px;
}
.page-header .actions {
display: flex;
gap: 12px;
align-items: center;
padding: 0;
}
/* 统计卡片 */
@@ -698,18 +664,18 @@ onMounted(() => {
.stat-card {
background: white;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
padding: 20px;
display: flex;
align-items: center;
transition: all 0.3s;
border: 1px solid #ebeef5;
border: 1px solid #e1e8ed;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.stat-icon {
@@ -753,88 +719,129 @@ onMounted(() => {
font-weight: 600;
margin-bottom: 4px;
line-height: 1.1;
color: #303133;
}
.stat-label {
font-size: 14px;
color: #606266;
color: #909399;
}
/* 筛选容器 */
.filter-container {
margin-bottom: 20px;
.main-container {
border: 1px solid #e1e8ed;
background: #ffffff;
}
.filter-section {
padding: 0;
border-bottom: 1px solid #e1e8ed;
background: #fafbfc;
}
.filter-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
gap: 20px;
flex-wrap: wrap;
}
.search-form {
margin: 0;
flex: 1;
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.search-form :deep(.el-form-item) {
margin-bottom: 0;
margin-right: 12px;
}
/* 表格容器 */
.table-container {
margin-bottom: 20px;
}
.action-buttons {
.action-bar {
display: flex;
justify-content: center;
gap: 8px;
gap: 12px;
flex-shrink: 0;
}
.table-section {
padding: 0;
}
/* 分页 */
.pagination {
margin-top: 15px;
display: flex;
justify-content: flex-end;
}
/* 站点详情 */
.site-detail {
padding: 10px 0;
}
.detail-section {
margin-top: 20px;
}
.detail-section h4 {
margin-bottom: 12px;
color: #303133;
font-weight: 600;
}
/* 对话框底部 */
.dialog-footer {
display: flex;
padding: 16px 20px;
border-top: 1px solid #e1e8ed;
background: #fafbfc;
justify-content: flex-end;
}
/* 表格样式优化 */
:deep(.el-table) {
border: none;
color: #2c3e50;
}
:deep(.el-table__header) {
background: #f8f9fa;
}
:deep(.el-table th) {
background: #f8f9fa !important;
border-bottom: 2px solid #e1e8ed;
color: #2c3e50;
font-weight: 600;
font-size: 13px;
}
:deep(.el-table td) {
border-bottom: 1px solid #f0f2f5;
color: #34495e;
}
:deep(.el-table tr:hover > td) {
background-color: #f8f9fa !important;
}
:deep(.el-card__body) {
padding: 0;
}
/* 响应式设计 */
@media screen and (max-width: 1200px) {
@media screen and (max-width: 992px) {
.stats-panel {
grid-template-columns: repeat(2, 1fr);
}
.stat-card:last-child {
grid-column: span 2;
}
}
@media screen and (max-width: 768px) {
.page-header {
flex-direction: column;
align-items: flex-start;
gap: 16px;
}
.page-header .actions {
width: 100%;
flex-wrap: wrap;
}
.stats-panel {
grid-template-columns: 1fr;
}
}
/* 自定义样式 */
.text-muted {
color: #909399;
font-style: italic;
.stat-card:last-child {
grid-column: auto;
}
.filter-content {
flex-direction: column;
align-items: stretch;
}
.search-form {
width: 100%;
}
.action-bar {
width: 100%;
justify-content: flex-start;
}
}
</style>
+199 -282
View File
@@ -1,158 +1,101 @@
<template>
<div class="violation-sites-container">
<!-- 页面头部 -->
<div class="page-header">
<div class="left">
<h2 class="title">违规站点</h2>
<el-tag type="danger" effect="plain" class="count-tag"> {{ pagination.total }} 个违规站点</el-tag>
<el-card class="main-container" shadow="never">
<!-- 搜索和筛选 -->
<div class="filter-section">
<div class="filter-content">
<el-form :inline="true" :model="queryParams" class="search-form">
<el-form-item label="搜索容器">
<el-input v-model="queryParams.domain" placeholder="请输入容器id或服务器id" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">
<el-icon><Search /></el-icon>查询
</el-button>
<el-button @click="resetQuery">
<el-icon><Delete /></el-icon>重置
</el-button>
</el-form-item>
</el-form>
<div class="action-bar">
<el-button type="primary" @click="handleRefresh">
<el-icon><Refresh /></el-icon>刷新
</el-button>
</div>
</div>
</div>
<div class="actions">
<el-button type="primary" @click="handleRefresh" :icon="Refresh" class="action-btn">刷新</el-button>
<!-- <el-button type="warning" @click="handleBatchProcess" :disabled="!selectedRows.length" :icon="Warning" class="action-btn">
批量处理
</el-button>
<el-button type="success" @click="handleExport" :icon="Download" class="action-btn">导出违规报告</el-button> -->
</div>
</div>
<!-- 违规统计卡片 -->
<!-- <div class="stats-panel">
<div class="stat-card total-card">
<div class="stat-icon"><el-icon><Warning /></el-icon></div>
<div class="stat-content">
<div class="stat-value">{{ violationStats.total }}</div>
<div class="stat-label">总违规站点</div>
</div>
</div>
<div class="stat-card severe-card">
<div class="stat-icon"><el-icon><CircleClose /></el-icon></div>
<div class="stat-content">
<div class="stat-value">{{ violationStats.severe }}</div>
<div class="stat-label">严重违规</div>
</div>
</div>
<div class="stat-card moderate-card">
<div class="stat-icon"><el-icon><WarningFilled /></el-icon></div>
<div class="stat-content">
<div class="stat-value">{{ violationStats.moderate }}</div>
<div class="stat-label">中度违规</div>
</div>
</div>
<div class="stat-card pending-card">
<div class="stat-icon"><el-icon><Clock /></el-icon></div>
<div class="stat-content">
<div class="stat-value">{{ violationStats.pending }}</div>
<div class="stat-label">待处理</div>
</div>
</div>
</div> -->
<!-- 搜索和筛选 -->
<el-card class="filter-container" shadow="never">
<el-form :inline="true" :model="queryParams" class="search-form">
<el-form-item label="搜索容器">
<el-input v-model="queryParams.domain" placeholder="请输入容器id或服务器id" clearable />
</el-form-item>
<!-- <el-form-item label="违规类型">
<el-select v-model="queryParams.violationType" placeholder="请选择违规类型" clearable>
<el-option label="全部" value="" />
<el-option label="内容违规" value="content" />
<el-option label="版权侵犯" value="copyright" />
<el-option label="恶意软件" value="malware" />
<el-option label="钓鱼网站" value="phishing" />
<el-option label="其他违规" value="other" />
</el-select>
</el-form-item>
<el-form-item label="违规等级">
<el-select v-model="queryParams.severity" placeholder="请选择违规等级" clearable>
<el-option label="全部" value="" />
<el-option label="轻微" value="light" />
<el-option label="中度" value="moderate" />
<el-option label="严重" value="severe" />
</el-select>
</el-form-item>
<el-form-item label="处理状态">
<el-select v-model="queryParams.processStatus" placeholder="请选择处理状态" clearable>
<el-option label="全部" value="" />
<el-option label="待处理" value="pending" />
<el-option label="处理中" value="processing" />
<el-option label="已处理" value="processed" />
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="handleQuery" :icon="Search">查询</el-button>
<el-button @click="resetQuery" :icon="Delete">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<!-- 违规站点列表 -->
<el-card class="table-container" shadow="never">
<el-table
v-loading="loading"
:data="violationList"
@selection-change="handleSelectionChange"
style="width: 100%"
border
stripe
>
<el-table-column type="selection" width="55" />
<el-table-column prop="container_id" label="容器ID" width="280" show-overflow-tooltip />
<el-table-column prop="url" label="违规地址" min-width="200" show-overflow-tooltip>
<template #default="{ row }">
<el-link :href="row.url" target="_blank" type="danger" v-if="row.url">
{{ row.url }}
</el-link>
<span v-else class="text-muted">无访问地址</span>
</template>
</el-table-column>
<el-table-column label="违规类型" width="120" align="center">
<template #default="{ row }">
<el-tag type="danger" size="small" v-if="row.violation_keys && row.violation_keys.length > 0">
{{ row.violation_keys.join(', ') }}
</el-tag>
<el-tag type="warning" size="small" v-else>
检测到违规
</el-tag>
</template>
</el-table-column>
<el-table-column label="连接类型" width="100" align="center">
<template #default="{ row }">
<el-tag :type="getConnectTypeColor(row.connect_type)" size="small">
{{ getConnectTypeText(row.connect_type) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" />
<el-table-column label="操作" fixed="right" align="center">
<template #default="{ row }">
<div class="action-buttons">
<!-- 违规站点列表 -->
<div class="table-section">
<el-table
v-loading="loading"
:data="violationList"
@selection-change="handleSelectionChange"
style="width: 100%"
:header-cell-style="{ background: '#fafafa', color: '#333', fontWeight: 600 }"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="container_id" label="容器ID" width="280" show-overflow-tooltip />
<el-table-column prop="url" label="违规地址" min-width="200" show-overflow-tooltip>
<template #default="{ row }">
<el-link :href="row.url" target="_blank" type="danger" v-if="row.url">
{{ row.url }}
</el-link>
<span v-else class="text-muted">无访问地址</span>
</template>
</el-table-column>
<el-table-column label="违规类型" width="120" align="center">
<template #default="{ row }">
<el-tag type="danger" size="small" v-if="row.violation_keys && row.violation_keys.length > 0">
{{ row.violation_keys.join(', ') }}
</el-tag>
<el-tag type="warning" size="small" v-else>
检测到违规
</el-tag>
</template>
</el-table-column>
<el-table-column label="连接类型" width="100" align="center">
<template #default="{ row }">
<el-tag :type="getConnectTypeColor(row.connect_type)" size="small">
{{ getConnectTypeText(row.connect_type) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" />
<el-table-column label="操作" fixed="right" align="center" width="180">
<template #default="{ row }">
<el-tooltip content="重新检查" placement="top">
<el-button type="warning" :icon="Refresh" circle size="small" @click="handleRecheck(row)" />
<el-button type="warning" link @click="handleRecheck(row)">
<el-icon><Refresh /></el-icon>检查
</el-button>
</el-tooltip>
<el-tooltip content="标记违规" placement="top" v-if="row.status !== 'violation'">
<el-button type="danger" :icon="Warning" circle size="small" @click="handleMarkViolation(row)" />
<el-button type="danger" link @click="handleMarkViolation(row)">
<el-icon><Warning /></el-icon>违规
</el-button>
</el-tooltip>
<el-tooltip content="标记正常" placement="top" v-if="row.status === 'violation'">
<el-button type="success" :icon="CircleCheck" circle size="small" @click="handleMarkNormal(row)" />
<el-button type="success" link @click="handleMarkNormal(row)">
<el-icon><CircleCheck /></el-icon>正常
</el-button>
</el-tooltip>
</div>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
background
class="pagination"
/>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
v-model:current-page="queryParams.pageNum"
v-model:page-size="queryParams.pageSize"
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
background
class="pagination"
/>
</div>
</el-card>
<!-- 违规详情对话框 -->
@@ -799,7 +742,13 @@ const handleBatchProcess = () => {
// 导出数据
const handleExport = () => {
ElMessage.success('违规报告导出功能开发中...')
ElMessage.success('导出功能开发中...')
}
// 查看详情
const handleView = (row) => {
currentSite.value = row
detailDialogVisible.value = true
}
// 重新检查
@@ -893,12 +842,6 @@ const handleMarkNormal = (row) => {
}).catch(() => {})
}
// 查看详情
const handleView = (row) => {
currentSite.value = row
detailDialogVisible.value = true
}
// 处理违规
const handleProcess = (row) => {
currentSite.value = row
@@ -907,49 +850,14 @@ const handleProcess = (row) => {
processDialogVisible.value = true
}
// 封禁站点
const handleBlock = (row) => {
ElMessageBox.confirm(
`确定要封禁站点 "${row.domain}" 吗?`,
'封禁确认',
{
confirmButtonText: '确定封禁',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
// 模拟API调用
row.isBlocked = true
ElMessage.success('站点已封禁')
getList()
}).catch(() => {})
}
// 解封站点
const handleUnblock = (row) => {
ElMessageBox.confirm(
`确定要解封站点 "${row.domain}" 吗?`,
'解封确认',
{
confirmButtonText: '确定解封',
cancelButtonText: '取消',
type: 'success'
}
).then(() => {
// 模拟API调用
row.isBlocked = false
ElMessage.success('站点已解封')
getList()
}).catch(() => {})
}
// 提交处理
const submitProcess = () => {
if (!processFormRef.value) return
processFormRef.value.validate((valid) => {
if (valid) {
ElMessage.success('违规处理提交成功')
// 模拟提交处理
ElMessage.success('处理成功')
processDialogVisible.value = false
getList()
}
@@ -964,42 +872,7 @@ onMounted(() => {
<style scoped>
.violation-sites-container {
padding: 20px;
min-height: calc(100vh - 120px);
background-color: #f5f7fa;
}
/* 页面标题样式 */
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 1px solid #ebeef5;
}
.page-header .left {
display: flex;
align-items: center;
gap: 12px;
}
.page-header .title {
margin: 0;
font-size: 24px;
font-weight: 600;
color: #303133;
}
.count-tag {
font-size: 13px;
}
.page-header .actions {
display: flex;
gap: 12px;
align-items: center;
padding: 0;
}
/* 统计卡片 */
@@ -1012,18 +885,18 @@ onMounted(() => {
.stat-card {
background: white;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
padding: 20px;
display: flex;
align-items: center;
transition: all 0.3s;
border: 1px solid #ebeef5;
border: 1px solid #e1e8ed;
}
.stat-card:hover {
transform: translateY(-3px);
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.stat-icon {
@@ -1039,8 +912,8 @@ onMounted(() => {
}
.total-card .stat-icon {
background-color: rgba(230, 162, 60, 0.1);
color: #E6A23C;
background-color: rgba(64, 158, 255, 0.1);
color: #409EFF;
}
.severe-card .stat-icon {
@@ -1049,8 +922,8 @@ onMounted(() => {
}
.moderate-card .stat-icon {
background-color: rgba(255, 193, 7, 0.1);
color: #FFC107;
background-color: rgba(230, 162, 60, 0.1);
color: #E6A23C;
}
.pending-card .stat-icon {
@@ -1067,56 +940,67 @@ onMounted(() => {
font-weight: 600;
margin-bottom: 4px;
line-height: 1.1;
color: #303133;
}
.stat-label {
font-size: 14px;
color: #606266;
color: #909399;
}
/* 筛选容器 */
.filter-container {
margin-bottom: 20px;
.main-container {
border: 1px solid #e1e8ed;
background: #ffffff;
}
.filter-section {
padding: 0;
border-bottom: 1px solid #e1e8ed;
background: #fafbfc;
}
.filter-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
gap: 20px;
flex-wrap: wrap;
}
.search-form {
margin-bottom: 0;
}
/* 表格容器 */
.table-container {
margin-bottom: 20px;
}
.domain-cell {
margin: 0;
flex: 1;
display: flex;
align-items: center;
gap: 8px;
gap: 12px;
flex-wrap: wrap;
}
.blocked-tag {
margin-left: 8px;
.search-form :deep(.el-form-item) {
margin-bottom: 0;
margin-right: 12px;
}
.action-buttons {
.action-bar {
display: flex;
justify-content: center;
gap: 8px;
gap: 12px;
flex-shrink: 0;
}
.report-count {
color: #606266;
font-size: 14px;
.table-section {
padding: 0;
}
/* 分页 */
.pagination {
margin-top: 15px;
display: flex;
margin-top: 20px;
padding: 16px 20px;
border-top: 1px solid #e1e8ed;
background: #fafbfc;
justify-content: flex-end;
}
/* 违规详情 */
/* 详情样式 */
.violation-detail {
padding: 10px 0;
}
@@ -1127,43 +1011,76 @@ onMounted(() => {
.detail-section h4 {
margin-bottom: 12px;
color: #303133;
font-size: 16px;
font-weight: 600;
color: #303133;
border-left: 4px solid #409EFF;
padding-left: 10px;
}
/* 对话框底部 */
.dialog-footer {
display: flex;
justify-content: flex-end;
/* 表格样式优化 */
:deep(.el-table) {
border: none;
color: #2c3e50;
}
:deep(.el-table__header) {
background: #f8f9fa;
}
:deep(.el-table th) {
background: #f8f9fa !important;
border-bottom: 2px solid #e1e8ed;
color: #2c3e50;
font-weight: 600;
font-size: 13px;
}
:deep(.el-table td) {
border-bottom: 1px solid #f0f2f5;
color: #34495e;
}
:deep(.el-table tr:hover > td) {
background-color: #f8f9fa !important;
}
:deep(.el-card__body) {
padding: 0;
}
/* 响应式设计 */
@media screen and (max-width: 1200px) {
@media screen and (max-width: 992px) {
.stats-panel {
grid-template-columns: repeat(2, 1fr);
}
.stat-card:last-child {
grid-column: span 2;
}
}
@media screen and (max-width: 768px) {
.page-header {
flex-direction: column;
align-items: flex-start;
gap: 16px;
}
.page-header .actions {
width: 100%;
flex-wrap: wrap;
}
.stats-panel {
grid-template-columns: 1fr;
}
}
/* 自定义样式 */
.text-muted {
color: #909399;
font-style: italic;
.stat-card:last-child {
grid-column: auto;
}
.filter-content {
flex-direction: column;
align-items: stretch;
}
.search-form {
width: 100%;
}
.action-bar {
width: 100%;
justify-content: flex-start;
}
}
</style>