add
This commit is contained in:
@@ -2,69 +2,13 @@
|
||||
* 系统菜单配置(支持多级菜单)
|
||||
*/
|
||||
window.MenuConfig = [
|
||||
{
|
||||
id: 'dashboard',
|
||||
icon: '📊',
|
||||
title: '数据概览',
|
||||
url: 'modules/dashboard.html',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
id: 'asset',
|
||||
icon: '💎',
|
||||
title: '资产管理',
|
||||
url: '',
|
||||
children: [
|
||||
{
|
||||
id: 'asset-list',
|
||||
icon: '📋',
|
||||
title: '资产列表',
|
||||
url: 'modules/asset-list.html',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
id: 'asset-detail',
|
||||
icon: '🔍',
|
||||
title: '资产详情',
|
||||
url: 'modules/asset-detail.html',
|
||||
children: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'transaction',
|
||||
icon: '💱',
|
||||
title: '交易记录',
|
||||
url: 'modules/transaction.html',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
id: 'report',
|
||||
icon: '📈',
|
||||
title: '报表分析',
|
||||
url: '',
|
||||
children: [
|
||||
{
|
||||
id: 'report-daily',
|
||||
icon: '📅',
|
||||
title: '日报表',
|
||||
url: 'modules/report-daily.html',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
id: 'report-monthly',
|
||||
icon: '📆',
|
||||
title: '月报表',
|
||||
url: 'modules/report-monthly.html',
|
||||
children: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'settings',
|
||||
icon: '⚙️',
|
||||
title: '系统设置',
|
||||
url: 'modules/settings.html',
|
||||
children: []
|
||||
children: [
|
||||
|
||||
]
|
||||
}
|
||||
];
|
||||
@@ -1,81 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>资产详情 - 资产辅助系统</title>
|
||||
<link rel="stylesheet" href="../../assets/css/common.css">
|
||||
<link rel="stylesheet" href="../../assets/css/dark-theme.css">
|
||||
<style>
|
||||
.asset-detail { margin-top: 20px; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
|
||||
.dark-theme .asset-detail { background: #2c3e50; }
|
||||
.detail-item { margin-bottom: 15px; display: flex; }
|
||||
.detail-label { width: 120px; font-weight: bold; }
|
||||
.btn-back { margin-top: 20px; padding: 8px 16px; background: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-content">
|
||||
<h2>资产详情</h2>
|
||||
<div class="asset-detail">
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">资产ID:</div>
|
||||
<div id="asset-id">--</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">资产名称:</div>
|
||||
<div id="asset-name">--</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">资产类型:</div>
|
||||
<div id="asset-type">--</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">购买日期:</div>
|
||||
<div>2024-01-15</div>
|
||||
</div>
|
||||
<div class="detail-item">
|
||||
<div class="detail-label">状态:</div>
|
||||
<div style="color: #27ae60;">运行中</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-back" onclick="goBack()">返回列表</button>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import { Router } from '../../assets/js/core/router.js';
|
||||
|
||||
// 获取资产ID参数
|
||||
function getAssetId() {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
return params.get('id') || '';
|
||||
}
|
||||
|
||||
// 初始化详情数据
|
||||
function initDetail() {
|
||||
const assetId = getAssetId();
|
||||
if (!assetId) return;
|
||||
|
||||
document.getElementById('asset-id').textContent = assetId;
|
||||
|
||||
// 模拟根据ID获取资产名称和类型
|
||||
const assetMap = {
|
||||
'ASSET-001': { name: '服务器-Web01', type: '服务器' },
|
||||
'ASSET-002': { name: '交换机-SW02', type: '网络设备' }
|
||||
};
|
||||
|
||||
const asset = assetMap[assetId] || { name: '未知资产', type: '未知类型' };
|
||||
document.getElementById('asset-name').textContent = asset.name;
|
||||
document.getElementById('asset-type').textContent = asset.type;
|
||||
}
|
||||
|
||||
function goBack() {
|
||||
Router.push('asset-list.html');
|
||||
}
|
||||
|
||||
// 初始化
|
||||
initDetail();
|
||||
</script>
|
||||
<script type="module" src="../../assets/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,59 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>资产列表 - 资产辅助系统</title>
|
||||
<link rel="stylesheet" href="../../assets/css/common.css">
|
||||
<link rel="stylesheet" href="../../assets/css/dark-theme.css">
|
||||
<style>
|
||||
.asset-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
|
||||
.asset-table th, .asset-table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
|
||||
.dark-theme .asset-table th, .dark-theme .asset-table td { border-bottom-color: #34495e; }
|
||||
.asset-table th { background: #f5f5f5; }
|
||||
.dark-theme .asset-table th { background: #34495e; }
|
||||
.btn { padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer; }
|
||||
.btn-detail { background: #3498db; color: white; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main-content">
|
||||
<h2>资产列表</h2>
|
||||
<table class="asset-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>资产ID</th>
|
||||
<th>资产名称</th>
|
||||
<th>资产类型</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>ASSET-001</td>
|
||||
<td>服务器-Web01</td>
|
||||
<td>服务器</td>
|
||||
<td>运行中</td>
|
||||
<td><button class="btn btn-detail" onclick="goToDetail('ASSET-001')">查看详情</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ASSET-002</td>
|
||||
<td>交换机-SW02</td>
|
||||
<td>网络设备</td>
|
||||
<td>运行中</td>
|
||||
<td><button class="btn btn-detail" onclick="goToDetail('ASSET-002')">查看详情</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import { Router } from '../../assets/js/core/router.js';
|
||||
window.goToDetail = function(assetId) {
|
||||
Router.push(`asset-detail.html?id=${assetId}`);
|
||||
}
|
||||
</script>
|
||||
<script type="module" src="../../assets/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,59 +0,0 @@
|
||||
<div class="dashboard-container">
|
||||
<div class="page-header">
|
||||
<h2>数据概览</h2>
|
||||
<p class="page-desc">实时监控您的资产状况</p>
|
||||
</div>
|
||||
|
||||
<div class="stats-grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px;">
|
||||
<div class="stat-card card">
|
||||
<div class="stat-header">
|
||||
<h3>总资产估值</h3>
|
||||
<span class="stat-icon" style="color: var(--primary-color); font-size: 20px;">💰</span>
|
||||
</div>
|
||||
<div class="stat-value" style="font-size: 24px; font-weight: bold; margin: 15px 0;">¥ 12,580,450.00</div>
|
||||
<div class="stat-trend" style="color: var(--success-color);">
|
||||
<span>↑ 2.3%</span>
|
||||
<span style="color: var(--text-secondary); font-size: 12px; margin-left: 5px;">较上月</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stat-card card">
|
||||
<div class="stat-header">
|
||||
<h3>可用现金</h3>
|
||||
<span class="stat-icon" style="color: var(--success-color); font-size: 20px;">💵</span>
|
||||
</div>
|
||||
<div class="stat-value" style="font-size: 24px; font-weight: bold; margin: 15px 0;">¥ 3,245,680.00</div>
|
||||
<div class="stat-trend" style="color: var(--success-color);">
|
||||
<span>↑ 1.8%</span>
|
||||
<span style="color: var(--text-secondary); font-size: 12px; margin-left: 5px;">较上月</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stat-card card">
|
||||
<div class="stat-header">
|
||||
<h3>投资资产</h3>
|
||||
<span class="stat-icon" style="color: var(--info-color); font-size: 20px;">📈</span>
|
||||
</div>
|
||||
<div class="stat-value" style="font-size: 24px; font-weight: bold; margin: 15px 0;">¥ 9,334,770.00</div>
|
||||
<div class="stat-trend" style="color: var(--success-color);">
|
||||
<span>↑ 2.5%</span>
|
||||
<span style="color: var(--text-secondary); font-size: 12px; margin-left: 5px;">较上月</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chart-container card">
|
||||
<h3>资产分布</h3>
|
||||
<div style="height: 300px; margin-top: 20px; display: flex; justify-content: center; align-items: center; border: 1px dashed var(--border-color); border-radius: 8px;">
|
||||
<p style="color: var(--text-secondary);">图表区域(实际项目可集成ECharts/Chart.js)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 页面加载完成后执行
|
||||
$(document).ready(() => {
|
||||
console.log('数据概览页面加载完成');
|
||||
// 实际项目中可在此初始化图表、加载数据等
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user