补充页面内容

This commit is contained in:
2026-02-11 19:51:32 +08:00
parent 50ddf01e7c
commit 53820a4654
30 changed files with 5915 additions and 259 deletions

View File

@@ -1,12 +1,236 @@
<template>
<AdminLayout currentPage="security-online-upgrade">
<view class="page">
<view class="header">
<text class="title">在线升级</text>
</view>
<view class="content">
<text class="tip">TODO: 在线升级</text>
</view>
</view>
</AdminLayout>
<view class="admin-page">
<view class="admin-sections">
<!-- 提示栏 -->
<view class="alert-info">
<text class="alert-text">温馨提示:检查更新需要授权码,请先授权后再检查更新!</text>
</view>
<!-- 选项卡 -->
<view class="admin-tabs">
<view
v-for="tab in tabs"
:key="tab.value"
:class="['tab-item', activeTab === tab.value ? 'active' : '']"
@click="activeTab = tab.value"
>
<text class="tab-label">{{ tab.label }}</text>
</view>
</view>
<!-- 升级内容 -->
<view v-if="activeTab === 'upgrade'" class="admin-card">
<view class="upgrade-status">
<view class="status-item">
<text class="label">当前版本:</text>
<text class="value version-tag">v3.1.2</text>
</view>
<view class="status-item">
<text class="label">授权状态:</text>
<text class="value unauthorized">未授权</text>
</view>
<view class="status-item">
<button class="btn primary" @click="checkUpdates">检查更新</button>
</view>
</view>
</view>
<!-- 升级日志内容 -->
<view v-if="activeTab === 'log'" class="admin-card">
<view class="table-container list-table">
<view class="table-header">
<view class="col col-id"><text>ID</text></view>
<view class="col col-version"><text>版本号</text></view>
<view class="col col-content"><text>更新内容</text></view>
<view class="col col-time"><text>升级时间</text></view>
</view>
<view class="table-body">
<view v-for="item in logList" :key="item.id" class="table-row">
<view class="col col-id"><text>{{ item.id }}</text></view>
<view class="col col-version"><text>{{ item.version }}</text></view>
<view class="col col-content"><text>{{ item.content }}</text></view>
<view class="col col-time"><text>{{ item.time }}</text></view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const activeTab = ref('upgrade')
const tabs = [
{ label: '系统升级', value: 'upgrade' },
{ label: '升级日志', value: 'log' }
]
const logList = ref([
{ id: 1, version: 'v3.1.2', content: '优化核心库性能修复已知Bug', time: '2026-02-10 10:00' },
{ id: 2, version: 'v3.1.1', content: '修复支付接口异常,增加权限校验', time: '2026-01-25 15:30' },
{ id: 3, version: 'v3.1.0', content: '大版本发布优化UI界面支持多级路由', time: '2026-01-10 09:20' }
])
function checkUpdates() {
uni.showLoading({ title: '检查中...' })
setTimeout(() => {
uni.hideLoading()
uni.showToast({ title: '您已是最新版本', icon: 'success' })
}, 1500)
}
</script>
<style scoped lang="scss">
.admin-page {
padding: 20px;
background-color: #f5f7f9;
min-height: 100vh;
}
.alert-info {
background-color: #fffbe6;
border: 1px solid #ffe58f;
padding: 12px 16px;
border-radius: 4px;
margin-bottom: 20px;
}
.alert-text {
color: #856404;
font-size: 14px;
}
.admin-tabs {
display: flex;
flex-direction: row;
border-bottom: 1px solid #e8e8e8;
margin-bottom: 20px;
}
.tab-item {
padding: 12px 24px;
cursor: pointer;
position: relative;
}
.tab-item.active {
background-color: #fff;
}
.tab-item.active::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background-color: #1890ff;
}
.tab-label {
font-size: 14px;
color: #666;
}
.tab-item.active .tab-label {
color: #1890ff;
font-weight: bold;
}
.admin-card {
background-color: #fff;
border-radius: 4px;
padding: 30px;
}
.upgrade-status {
display: flex;
flex-direction: column;
gap: 20px;
}
.status-item {
display: flex;
flex-direction: row;
align-items: center;
}
.label {
font-size: 16px;
color: #666;
width: 100px;
}
.value {
font-size: 16px;
color: #333;
}
.version-tag {
background-color: #e6f7ff;
color: #1890ff;
padding: 2px 8px;
border-radius: 4px;
font-weight: bold;
}
.unauthorized {
color: #ff4d4f;
font-weight: bold;
}
.btn {
height: 38px;
padding: 0 30px;
border-radius: 4px;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: 1px solid #d9d9d9;
background-color: #fff;
}
.btn.primary {
background-color: #1890ff;
border-color: #1890ff;
color: #fff;
}
.table-container {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #fafafa;
border-bottom: 1px solid #f0f0f0;
}
.table-row {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.col {
padding: 12px 16px;
display: flex;
align-items: center;
font-size: 14px;
color: #333;
}
.col-id { width: 80px; }
.col-version { width: 150px; }
.col-content { flex: 1; }
.col-time { width: 200px; }
</style>

View File

@@ -1,12 +1,116 @@
<template>
<AdminLayout currentPage="security-refresh-cache">
<view class="page">
<view class="header">
<text class="title">刷新缓存</text>
</view>
<view class="content">
<text class="tip">TODO: 刷新缓存</text>
</view>
</view>
</AdminLayout>
<view class="admin-page">
<view class="admin-sections">
<view class="admin-grid-2">
<!-- 清除缓存 -->
<view class="admin-card cache-card">
<view class="cache-header">
<text class="cache-title">清除缓存</text>
<text class="cache-desc">清除系统的所有缓存</text>
</view>
<button class="btn primary full" @click="onClearCache">立即清除</button>
</view>
<!-- 清除日志 -->
<view class="admin-card cache-card">
<view class="cache-header">
<text class="cache-title">清除日志</text>
<text class="cache-desc">清除系统的所有日志文件</text>
</view>
<button class="btn primary full" @click="onClearLog">立即清除</button>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
function onClearCache() {
uni.showModal({
title: '提示',
content: '确定要清除所有缓存吗?',
success: (res) => {
if (res.confirm) {
uni.showToast({ title: '缓存已清除', icon: 'none' })
}
}
})
}
function onClearLog() {
uni.showModal({
title: '提示',
content: '确定要清除所有日志吗?',
success: (res) => {
if (res.confirm) {
uni.showToast({ title: '日志已清除', icon: 'none' })
}
}
})
}
</script>
<style scoped lang="scss">
.admin-page {
padding: 20px;
background-color: #f5f7f9;
min-height: 100vh;
}
.admin-grid-2 {
display: flex;
flex-direction: row;
gap: 20px;
}
.admin-card {
background-color: #fff;
border-radius: 4px;
padding: 40px;
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.cache-header {
margin-bottom: 24px;
}
.cache-title {
font-size: 18px;
color: #333;
font-weight: bold;
display: block;
margin-bottom: 12px;
}
.cache-desc {
font-size: 14px;
color: #999;
}
.btn {
height: 32px;
padding: 0 20px;
border-radius: 2px;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.btn.primary {
background-color: #1890ff;
color: #fff;
border: none;
}
.btn.full {
width: 120px;
}
</style>

View File

@@ -1,12 +1,242 @@
<template>
<AdminLayout currentPage="security-system-log">
<view class="page">
<view class="header">
<text class="title">系统日志</text>
</view>
<view class="content">
<text class="tip">TODO: 系统日志</text>
</view>
</view>
</AdminLayout>
<view class="admin-page">
<view class="admin-sections">
<!-- 搜索栏 -->
<view class="admin-card filter-card">
<view class="filter-row">
<view class="filter-item">
<text class="label">选择时间:</text>
<view class="filter-date-range">
<input class="filter-input date-input" placeholder="开始日期" />
<text class="date-sep">-</text>
<input class="filter-input date-input" placeholder="结束日期" />
</view>
</view>
<view class="filter-item">
<text class="label">名称:</text>
<view class="filter-select">
<text class="select-placeholder">请选择</text>
<text class="arrow">▼</text>
</view>
</view>
<view class="filter-item">
<text class="label">链接:</text>
<input class="filter-input" placeholder="请输入链接" />
</view>
<view class="filter-item">
<text class="label">IP</text>
<input class="filter-input" placeholder="请输入IP" />
</view>
<button class="btn primary" @click="onSearch">搜索</button>
</view>
</view>
<!-- 内容区 -->
<view class="admin-card content-card">
<!-- 表格 -->
<view class="table-container list-table">
<view class="table-header">
<view class="col col-id"><text>ID</text></view>
<view class="col col-user"><text>ID/名称</text></view>
<view class="col col-action"><text>操作</text></view>
<view class="col col-link"><text>链接</text></view>
<view class="col col-ip"><text>操作IP</text></view>
<view class="col col-type"><text>类型</text></view>
<view class="col col-time"><text>操作时间</text></view>
</view>
<view class="table-body">
<view v-for="item in dataList" :key="item.id" class="table-row">
<view class="col col-id"><text>{{ item.id }}</text></view>
<view class="col col-user"><text>{{ item.user }}</text></view>
<view class="col col-action"><text>{{ item.action }}</text></view>
<view class="col col-link"><text>{{ item.link }}</text></view>
<view class="col col-ip"><text>{{ item.ip }}</text></view>
<view class="col col-type"><text>{{ item.type }}</text></view>
<view class="col col-time"><text>{{ item.time }}</text></view>
</view>
</view>
</view>
<!-- 分页 -->
<view class="pagination">
<text class="page-info">共 583387 条 15条/页</text>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref } from 'vue'
const dataList = ref([
{ id: 585387, user: '5 / demo', action: '系统日志', link: 'system/log', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:49' },
{ id: 585386, user: '5 / demo', action: '系统日志管理员搜索条件', link: 'system/log/search_admin', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:49' },
{ id: 585385, user: '5 / demo', action: '自定义事件类型', link: 'system/event/mark', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:49' },
{ id: 585384, user: '5 / demo', action: '自定义事件列表', link: 'system/event/list', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:49' },
{ id: 585383, user: '5 / demo', action: '积分配置编辑表单', link: 'marketing/integral_config/edit_basics', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:48' },
{ id: 585382, user: '5 / demo', action: '基本配置编辑头部数据', link: 'setting/config/header_basics', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:48' },
{ id: 585381, user: '5 / demo', action: '保存权限菜单', link: 'setting/menus', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:48' },
{ id: 585380, user: '5 / demo', action: '定时任务类型', link: 'system/crontab/mark', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:47' },
{ id: 585379, user: '5 / demo', action: '定时任务列表', link: 'system/crontab/list', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:47' },
{ id: 585378, user: '5 / demo', action: '保存组合数据', link: 'setting/group', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:47' },
{ id: 585377, user: '5 / demo', action: '保存系统配置分类', link: 'setting/config_class', ip: '223.104.72.77', type: 'system', time: '2026-02-11 18:47' }
])
function onSearch() {
uni.showToast({ title: '搜索中...', icon: 'none' })
}
</script>
<style scoped lang="scss">
.admin-page {
padding: 20px;
background-color: #f5f7f9;
min-height: 100vh;
}
.admin-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
margin-bottom: 20px;
}
.filter-row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
gap: 16px;
}
.filter-item {
display: flex;
flex-direction: row;
align-items: center;
}
.label {
font-size: 14px;
color: #333;
white-space: nowrap;
}
.filter-date-range {
display: flex;
flex-direction: row;
align-items: center;
border: 1px solid #d9d9d9;
border-radius: 2px;
padding: 0 10px;
height: 32px;
}
.date-input {
width: 100px;
border: none;
height: 100%;
}
.date-sep {
margin: 0 8px;
color: #bfbfbf;
}
.filter-select {
width: 120px;
height: 32px;
border: 1px solid #d9d9d9;
border-radius: 2px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 10px;
}
.select-placeholder {
color: #bfbfbf;
font-size: 14px;
}
.arrow {
font-size: 10px;
color: #bfbfbf;
}
.filter-input {
width: 150px;
height: 32px;
border: 1px solid #d9d9d9;
border-radius: 2px;
padding: 0 10px;
font-size: 14px;
}
.btn {
height: 32px;
padding: 0 20px;
border-radius: 2px;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: 1px solid #d9d9d9;
background-color: #fff;
}
.btn.primary {
background-color: #1890ff;
border-color: #1890ff;
color: #fff;
}
.table-container {
width: 100%;
border: 1px solid #f0f0f0;
}
.table-header {
display: flex;
flex-direction: row;
background-color: #fafafa;
border-bottom: 1px solid #f0f0f0;
}
.table-row {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.col {
padding: 12px 16px;
display: flex;
align-items: center;
font-size: 14px;
color: #333;
}
.col-id { width: 80px; }
.col-user { width: 120px; }
.col-action { flex: 2; }
.col-link { flex: 2; }
.col-ip { width: 150px; }
.col-type { width: 100px; }
.col-time { width: 180px; }
.pagination {
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
.page-info {
font-size: 14px;
color: #999;
}
</style>