Files
CN_Tool_client/frontend/src/views/tools/index.vue
2026-04-16 08:15:46 +08:00

135 lines
2.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="tools-view">
<div class="tools-card">
<div class="page-header">
<div>
<h1 class="tools-title">工具中心</h1>
<p class="tools-description">当前工具页面统一从这里进入后续新增工具可继续在此扩展</p>
</div>
</div>
<div class="tool-grid">
<button class="tool-item" type="button" @click="handleNavigate('/tools/waveform')">
<div class="tool-name">波形查看</div>
<div class="tool-text">选择同名 cfg/dat 文件并查看波形RMS 和摘要信息</div>
</button>
<button class="tool-item" type="button" @click="handleNavigate('/tools/mmsMapping')">
<div class="tool-name">MMS 映射</div>
<div class="tool-text">进入 MMS 映射页面后续可继续补充映射配置和预览能力</div>
</button>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router'
defineOptions({
name: 'ToolsView'
})
const router = useRouter()
const handleNavigate = async (path: string) => {
if (!path) return
await router.push(path)
}
</script>
<style scoped lang="scss">
.tools-view {
min-height: 100%;
padding: 24px;
background: #f5f7fa;
}
.tools-card {
display: flex;
flex-direction: column;
gap: 24px;
padding: 32px;
border-radius: 12px;
background: #ffffff;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.page-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.tools-title {
margin: 0 0 12px;
font-size: 24px;
font-weight: 600;
color: #1f2937;
}
.tools-description {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: #4b5563;
}
.tool-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 20px;
}
.tool-item {
display: flex;
flex-direction: column;
gap: 10px;
padding: 20px;
border: 1px solid #dbe3f0;
border-radius: 12px;
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
cursor: pointer;
text-align: left;
transition:
transform 0.2s ease,
border-color 0.2s ease,
box-shadow 0.2s ease;
}
.tool-item:hover {
border-color: #94a3b8;
box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
transform: translateY(-2px);
}
.tool-name {
font-size: 18px;
font-weight: 600;
color: #172033;
}
.tool-text {
font-size: 13px;
line-height: 1.7;
color: #64748b;
}
@media (max-width: 992px) {
.tool-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.tools-view {
padding: 16px;
}
.tools-card {
padding: 20px;
}
}
</style>