2026-02-24 23:26:41 +08:00
|
|
|
<template>
|
2026-03-03 17:35:54 +08:00
|
|
|
<div class="search-list-page">
|
|
|
|
|
<div class="search-section">
|
|
|
|
|
<div class="search-wrapper">
|
|
|
|
|
<el-input
|
2026-03-03 23:05:02 +08:00
|
|
|
v-model="searchForm.websiteName"
|
|
|
|
|
placeholder="请输入搜索网站名称"
|
2026-03-03 17:35:54 +08:00
|
|
|
class="search-input"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter="handleSearch"
|
|
|
|
|
/>
|
|
|
|
|
<div class="search-btn-group">
|
|
|
|
|
<el-button type="primary" icon="Search" @click="handleSearch">查询</el-button>
|
|
|
|
|
<el-button icon="Refresh" @click="handleReset">重置</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="list-wrapper">
|
|
|
|
|
<div class="list-section">
|
|
|
|
|
<div v-if="listData.length === 0" class="empty-tip">
|
|
|
|
|
<el-empty description="暂无数据" />
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="card-list">
|
|
|
|
|
<el-card
|
|
|
|
|
v-for="item in listData"
|
2026-03-03 23:05:02 +08:00
|
|
|
:key="item.websiteId"
|
2026-03-03 17:35:54 +08:00
|
|
|
class="list-card"
|
|
|
|
|
shadow="hover"
|
|
|
|
|
>
|
|
|
|
|
<div class="card-top">
|
|
|
|
|
<div class="site-main">
|
2026-03-03 23:05:02 +08:00
|
|
|
<el-tooltip :content="item.websiteName" placement="top">
|
|
|
|
|
<div class="site-name">{{ item.websiteName }}</div>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip :content="item.websiteUrl" placement="top">
|
|
|
|
|
<div class="site-url">{{ item.websiteUrl }}</div>
|
2026-03-03 17:35:54 +08:00
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-divider"></div>
|
|
|
|
|
<div class="card-bottom">
|
2026-03-03 23:05:02 +08:00
|
|
|
<span class="card-date">{{ item.createTime }}</span>
|
2026-03-03 17:35:54 +08:00
|
|
|
<div class="card-actions">
|
|
|
|
|
<el-button size="small" type="primary" link @click="handleVisit(item)">
|
|
|
|
|
<el-icon><Link /></el-icon>
|
|
|
|
|
访问
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pagination-footer">
|
|
|
|
|
<el-pagination
|
|
|
|
|
v-model:current-page="pagination.pageNum"
|
|
|
|
|
v-model:page-size="pagination.pageSize"
|
2026-03-03 23:05:02 +08:00
|
|
|
:page-sizes="[20, 50, 99]"
|
2026-03-03 17:35:54 +08:00
|
|
|
:total="pagination.total"
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
@size-change="handleSizeChange"
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
background
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2026-02-24 23:26:41 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-03-03 17:35:54 +08:00
|
|
|
import { ref, reactive, onMounted } from 'vue'
|
|
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
import { Link } from '@element-plus/icons-vue'
|
2026-03-03 23:05:02 +08:00
|
|
|
import { getWebsiteStorageList } from '@/api/bizWebsiteStorage'
|
2026-03-03 17:35:54 +08:00
|
|
|
|
|
|
|
|
const searchForm = reactive({
|
2026-03-03 23:05:02 +08:00
|
|
|
websiteName: ''
|
2026-03-03 17:35:54 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const pagination = reactive({
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
total: 0
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const listData = ref([])
|
2026-03-03 23:05:02 +08:00
|
|
|
const getDataList = async () => {
|
|
|
|
|
try {
|
|
|
|
|
const reqParmas = {
|
|
|
|
|
...searchForm,
|
|
|
|
|
pageNum: pagination.pageNum,
|
|
|
|
|
pageSize: pagination.pageSize,
|
|
|
|
|
}
|
|
|
|
|
const res = await getWebsiteStorageList(reqParmas)
|
|
|
|
|
listData.value = res.list || []
|
|
|
|
|
pagination.total = res.total
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error)
|
|
|
|
|
}
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleVisit = (item) => {
|
2026-03-03 23:05:02 +08:00
|
|
|
window.open(item.websiteUrl, '_blank')
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleSearch = () => {
|
|
|
|
|
pagination.pageNum = 1
|
2026-03-03 23:05:02 +08:00
|
|
|
getDataList()
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleReset = () => {
|
2026-03-03 23:05:02 +08:00
|
|
|
Object.assign(searchForm, {
|
|
|
|
|
websiteName: ''
|
|
|
|
|
})
|
2026-03-03 17:35:54 +08:00
|
|
|
pagination.pageNum = 1
|
2026-03-03 23:05:02 +08:00
|
|
|
getDataList()
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleSizeChange = (val) => {
|
|
|
|
|
pagination.pageSize = val
|
2026-03-03 23:05:02 +08:00
|
|
|
getDataList()
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleCurrentChange = (val) => {
|
|
|
|
|
pagination.pageNum = val
|
2026-03-03 23:05:02 +08:00
|
|
|
getDataList()
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
2026-03-03 23:05:02 +08:00
|
|
|
getDataList()
|
2026-03-03 17:35:54 +08:00
|
|
|
})
|
2026-02-24 23:26:41 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-03-03 17:35:54 +08:00
|
|
|
.search-list-page {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: hidden !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search-section {
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
padding-bottom: 12px;
|
|
|
|
|
border-bottom: 1px solid #e5e7eb;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search-wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search-input {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.search-btn-group {
|
|
|
|
|
display: flex;
|
2026-03-03 23:05:02 +08:00
|
|
|
gap: 2px;
|
2026-03-03 17:35:54 +08:00
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-wrapper {
|
|
|
|
|
flex: 1;
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-section {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow-y: auto !important;
|
|
|
|
|
overflow-x: hidden !important;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.empty-tip {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-list {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
|
|
|
gap: 16px;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-card {
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
border: 1px solid #f0f0f0 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-card:hover {
|
|
|
|
|
transform: translateY(-4px);
|
|
|
|
|
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
|
|
|
|
|
border-color: #409eff !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-top {
|
|
|
|
|
display: flex;
|
2026-03-03 23:05:02 +08:00
|
|
|
align-items: flex-start;
|
2026-03-03 17:35:54 +08:00
|
|
|
gap: 12px;
|
2026-03-03 23:05:02 +08:00
|
|
|
padding: 6px 12px 4px;
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.site-main {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.site-name {
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #1f2937;
|
2026-03-03 23:05:02 +08:00
|
|
|
margin-bottom: 2px;
|
2026-03-03 17:35:54 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.site-url {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: #9ca3af;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.site-url:hover {
|
|
|
|
|
color: #409eff;
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-divider {
|
|
|
|
|
height: 1px;
|
|
|
|
|
background: #f0f0f0;
|
2026-03-03 23:05:02 +08:00
|
|
|
margin: 0 12px;
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-bottom {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
2026-03-03 23:05:02 +08:00
|
|
|
padding: 8px 12px 8px;
|
2026-03-03 17:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-date {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #9ca3af;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pagination-footer {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
background: #fff;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-section::-webkit-scrollbar {
|
|
|
|
|
width: 6px;
|
|
|
|
|
height: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-section::-webkit-scrollbar-track {
|
|
|
|
|
background: #f1f5f9;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-section::-webkit-scrollbar-thumb {
|
|
|
|
|
background: #cbd5e1;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-section::-webkit-scrollbar-thumb:hover {
|
|
|
|
|
background: #94a3b8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.card-list {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
2026-02-24 23:26:41 +08:00
|
|
|
}
|
|
|
|
|
</style>
|