| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378 |
- <template>
- <div class="emergency-home-page">
- <!-- 模块标题 -->
- <div class="module-header">
- <div class="header-content">
- <el-icon class="header-icon" :size="40"><FirstAidKit /></el-icon>
- <div>
- <h1 class="module-title">急救平台</h1>
- <p class="module-subtitle">Emergency Management Platform</p>
- </div>
- </div>
- <el-button @click="$router.push('/index')">
- <el-icon><HomeFilled /></el-icon>
- 返回门户
- </el-button>
- </div>
- <!-- 核心指标 -->
- <div class="stats-grid">
- <div v-for="(s, idx) in stats" :key="idx" class="stat-card" :class="s.color">
- <div class="stat-icon">
- <el-icon :size="32"><component :is="s.icon" /></el-icon>
- </div>
- <div class="stat-content">
- <div class="stat-value">{{ s.value }}</div>
- <div class="stat-label">{{ s.label }}</div>
- <div class="stat-extra">{{ s.extra }}</div>
- </div>
- </div>
- </div>
- <!-- 功能导航 -->
- <div class="nav-section">
- <h2 class="section-title">功能导航 ({{ navItems.length }} 个功能)</h2>
- <div class="nav-grid">
- <div
- v-for="item in navItems"
- :key="item.path"
- class="nav-card"
- @click="navigateTo(item.path)"
- >
- <div class="nav-icon" :style="{ background: item.bgColor, color: item.iconColor }">
- <el-icon :size="28"><component :is="item.icon" /></el-icon>
- </div>
- <div class="nav-body">
- <h3 class="nav-title">{{ item.title }}</h3>
- <p class="nav-desc">{{ item.desc }}</p>
- </div>
- </div>
- </div>
- </div>
- <!-- 常用快捷 -->
- <div class="quick-section">
- <h2 class="section-title">常用快捷</h2>
- <div class="quick-grid">
- <div
- v-for="item in navItems"
- :key="item.path"
- class="quick-item"
- @click="navigateTo(item.path)"
- >
- <el-icon :size="18" :style="{ color: item.iconColor }">
- <component :is="item.icon" />
- </el-icon>
- <span>{{ item.title }}</span>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup lang="ts">
- import { useRouter } from 'vue-router';
- import {
- HomeFilled,
- Monitor,
- DataAnalysis,
- SetUp,
- Connection,
- Search,
- FirstAidKit
- } from '@element-plus/icons-vue';
- const router = useRouter();
- const stats = [
- { label: '在线救护车', value: '86', extra: '全市 118 辆', icon: Monitor, color: 'primary' },
- { label: '今日急救任务', value: '186', extra: '较昨日 +8.1%', icon: FirstAidKit, color: 'success' },
- { label: '平均出车响应', value: '03:21', extra: '目标 ≤ 04:00', icon: SetUp, color: 'warning' },
- { label: '待处置告警', value: '3', extra: '需及时关注', icon: Monitor, color: 'danger' },
- ];
- const navItems = [
- {
- title: '急救概览',
- path: '/emergency/overview',
- icon: Monitor,
- desc: '核心运行指标、地图工作台、实时任务',
- bgColor: 'linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)',
- iconColor: '#409eff'
- },
- {
- title: '核心数据汇聚',
- path: '/emergency/data-hub',
- icon: DataAnalysis,
- desc: '数据接收链路、县区上传状态、实时监测',
- bgColor: 'linear-gradient(135deg, #f0f9eb 0%, #e1f3d8 100%)',
- iconColor: '#67c23a'
- },
- {
- title: '资源管理',
- path: '/emergency/resources',
- icon: SetUp,
- desc: '资源运行态势、车辆台账、设备配备',
- bgColor: 'linear-gradient(135deg, #fdf6ec 0%, #faecd8 100%)',
- iconColor: '#e6a23c'
- },
- {
- title: '网络布局',
- path: '/emergency/network',
- icon: Connection,
- desc: '三级网络示意图与完成度',
- bgColor: 'linear-gradient(135deg, #f0e6ff 0%, #e4d5f7 100%)',
- iconColor: '#9b59b6'
- },
- {
- title: '记录查询',
- path: '/emergency/records',
- icon: Search,
- desc: '急救任务记录检索与详情',
- bgColor: 'linear-gradient(135deg, #e8f8f5 0%, #d5f5e3 100%)',
- iconColor: '#1abc9c'
- },
- ];
- const navigateTo = (path: string) => {
- router.push(path);
- };
- </script>
- <style scoped lang="scss">
- .emergency-home-page {
- padding: 24px;
- background: #f5f7fa;
- min-height: 100vh;
- }
- .module-header {
- background: white;
- border-radius: 8px;
- padding: 24px;
- margin-bottom: 20px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
- .header-content {
- display: flex;
- align-items: center;
- gap: 16px;
- .header-icon {
- color: #409eff;
- }
- .module-title {
- font-size: 28px;
- font-weight: 600;
- margin: 0 0 4px;
- color: #2c3e50;
- }
- .module-subtitle {
- font-size: 14px;
- color: #95a5a6;
- margin: 0;
- }
- }
- }
- .stats-grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 16px;
- margin-bottom: 20px;
- }
- .stat-card {
- background: white;
- border-radius: 8px;
- padding: 20px;
- display: flex;
- align-items: center;
- gap: 16px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
- border-left: 4px solid;
- &.primary {
- border-left-color: #409eff;
- .stat-icon { background: #ecf5ff; color: #409eff; }
- }
- &.success {
- border-left-color: #67c23a;
- .stat-icon { background: #f0f9eb; color: #67c23a; }
- }
- &.warning {
- border-left-color: #e6a23c;
- .stat-icon { background: #fdf6ec; color: #e6a23c; }
- }
- &.danger {
- border-left-color: #f56c6c;
- .stat-icon { background: #fef0f0; color: #f56c6c; }
- }
- .stat-icon {
- width: 56px;
- height: 56px;
- border-radius: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- }
- .stat-content {
- flex: 1;
- min-width: 0;
- }
- .stat-value {
- font-size: 24px;
- font-weight: 700;
- color: #2c3e50;
- margin-bottom: 2px;
- }
- .stat-label {
- font-size: 13px;
- color: #909399;
- margin-bottom: 4px;
- }
- .stat-extra {
- font-size: 11px;
- color: #67c23a;
- }
- }
- .nav-section {
- background: white;
- border-radius: 8px;
- padding: 24px;
- margin-bottom: 20px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
- .section-title {
- font-size: 18px;
- font-weight: 600;
- margin: 0 0 20px;
- color: #2c3e50;
- padding-left: 10px;
- border-left: 4px solid #409eff;
- }
- }
- .nav-grid {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
- gap: 14px;
- }
- .nav-card {
- border: 1px solid #e4e7ed;
- border-radius: 8px;
- padding: 16px;
- cursor: pointer;
- transition: all 0.3s ease;
- display: flex;
- align-items: center;
- gap: 14px;
- &:hover {
- border-color: #409eff;
- box-shadow: 0 4px 14px rgba(64, 158, 255, 0.18);
- transform: translateY(-2px);
- }
- .nav-icon {
- width: 50px;
- height: 50px;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-shrink: 0;
- transition: all 0.3s;
- }
- .nav-body {
- flex: 1;
- min-width: 0;
- }
- .nav-title {
- font-size: 15px;
- font-weight: 600;
- margin: 0 0 4px;
- color: #2c3e50;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .nav-desc {
- font-size: 12px;
- color: #909399;
- margin: 0;
- line-height: 1.5;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
- .quick-section {
- background: white;
- border-radius: 8px;
- padding: 24px;
- margin-bottom: 20px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
- .section-title {
- font-size: 18px;
- font-weight: 600;
- margin: 0 0 20px;
- color: #2c3e50;
- padding-left: 10px;
- border-left: 4px solid #409eff;
- }
- }
- .quick-grid {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
- gap: 12px;
- }
- .quick-item {
- display: flex;
- align-items: center;
- gap: 10px;
- padding: 14px 16px;
- border: 1px solid #e4e7ed;
- border-radius: 8px;
- cursor: pointer;
- transition: all 0.3s ease;
- background: #fafbfc;
- span {
- font-size: 14px;
- color: #2c3e50;
- font-weight: 500;
- }
- &:hover {
- border-color: #409eff;
- background: #ecf5ff;
- transform: translateY(-2px);
- box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
- span {
- color: #409eff;
- }
- }
- }
- </style>
|