ys_sms_sending_web/src/views/index.vue

420 lines
11 KiB
Vue
Raw Normal View History

2026-01-26 10:11:17 +08:00
<template>
<div class="home">
<section class="home-hero">
<div class="home-hero-main">
2026-01-27 15:17:28 +08:00
<p class="home-tag">短信发送系统 · 首页</p>
2026-01-26 10:11:17 +08:00
<h1 class="home-title">
欢迎进入<br />
2026-01-27 15:17:28 +08:00
短信发送管理系统
2026-01-26 10:11:17 +08:00
</h1>
<p class="home-subtitle">
2026-01-27 15:17:28 +08:00
高效便捷的短信发送管理平台支持单次发送和循环发送轻松管理短信任务和接收人员
2026-01-26 10:11:17 +08:00
</p>
</div>
2026-01-27 15:17:28 +08:00
<div class="home-hero-panel">
2026-01-26 10:11:17 +08:00
<div class="panel-header">今日概览</div>
<div class="panel-body">
<div class="panel-item">
2026-01-27 15:17:28 +08:00
<span class="panel-label">今日发送</span>
<span class="panel-value">{{ todayStats.sendCount || '—' }}</span>
2026-01-26 10:11:17 +08:00
</div>
<div class="panel-item">
2026-01-27 15:17:28 +08:00
<span class="panel-label">成功发送</span>
<span class="panel-value">{{ todayStats.successCount || '—' }}</span>
2026-01-26 10:11:17 +08:00
</div>
<div class="panel-item">
2026-01-27 15:17:28 +08:00
<span class="panel-label">待发送任务</span>
<span class="panel-value">{{ todayStats.pendingCount || '—' }}</span>
2026-01-26 10:11:17 +08:00
</div>
</div>
<div class="panel-footer">数据接入后将在此区域展示核心指标</div>
2026-01-27 15:17:28 +08:00
</div>
2026-01-26 10:11:17 +08:00
</section>
<section class="home-grid">
2026-01-27 15:17:28 +08:00
<el-card shadow="hover" class="home-card" @click="navigateTo('/sms/onceSend')">
<div class="card-icon">
<el-icon :size="32" color="#1677ff">
<Message />
</el-icon>
</div>
<h3>单次发送</h3>
<p>
快速发送单条短信支持选择接收人员和自定义短信内容适用于临时通知和紧急消息
</p>
2026-01-26 10:11:17 +08:00
</el-card>
2026-01-27 15:17:28 +08:00
<el-card shadow="hover" class="home-card" @click="navigateTo('/sms/loopSend')">
<div class="card-icon">
<el-icon :size="32" color="#52c41a">
<Refresh />
</el-icon>
</div>
<h3>循环发送</h3>
<p>
基于 Cron 表达式的定时发送任务支持按计划自动发送短信适用于定期通知和提醒
</p>
2026-01-26 10:11:17 +08:00
</el-card>
2026-01-27 15:17:28 +08:00
<el-card
shadow="hover"
class="home-card"
@click="navigateTo('/basicManage/personManage')"
>
<div class="card-icon">
<el-icon :size="32" color="#fa8c16">
<User />
</el-icon>
</div>
<h3>人员管理</h3>
<p>
管理系统中的接收人员信息包括姓名电话所属部门等基础数据为短信发送提供数据源
</p>
</el-card>
<el-card
shadow="hover"
class="home-card"
@click="navigateTo('/basicManage/groupManage')"
>
<div class="card-icon">
<el-icon :size="32" color="#eb2f96">
<UserFilled />
</el-icon>
</div>
<h3>分组管理</h3>
<p>创建和管理人员分组快速选择批量接收人员提高短信发送效率</p>
2026-01-26 10:11:17 +08:00
</el-card>
</section>
2026-01-27 15:17:28 +08:00
<section class="home-features">
<h2 class="features-title">核心功能</h2>
<div class="features-grid">
<div class="feature-item">
<el-icon :size="24" color="#1677ff">
<Clock />
</el-icon>
<div class="feature-content">
<h4>定时发送</h4>
<p>支持 Cron 表达式配置灵活设置发送时间</p>
</div>
</div>
<div class="feature-item">
<el-icon :size="24" color="#52c41a">
<User />
</el-icon>
<div class="feature-content">
<h4>批量选择</h4>
<p>支持按人员或分组批量选择接收人</p>
</div>
</div>
<div class="feature-item">
<el-icon :size="24" color="#fa8c16">
<Document />
</el-icon>
<div class="feature-content">
<h4>任务管理</h4>
<p>统一管理所有发送任务支持启用/停用</p>
</div>
</div>
<div class="feature-item">
<el-icon :size="24" color="#eb2f96">
<View />
</el-icon>
<div class="feature-content">
<h4>发送记录</h4>
<p>查看详细的发送记录和状态信息</p>
</div>
</div>
</div>
2026-01-26 10:11:17 +08:00
</section>
</div>
</template>
2026-01-27 15:17:28 +08:00
<script setup name="Index">
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { Message, Refresh, User, UserFilled, Clock, Document, View } from '@element-plus/icons-vue'
const router = useRouter()
// 今日统计数据(后续可从接口获取)
const todayStats = ref({
sendCount: null,
successCount: null,
pendingCount: null,
})
// 导航到指定路由
const navigateTo = (path) => {
router.push(path)
}
</script>
2026-01-26 10:11:17 +08:00
2026-01-27 15:17:28 +08:00
<style lang="scss" scoped>
2026-01-26 10:11:17 +08:00
.home {
2026-01-27 15:17:28 +08:00
gap: 40px;
2026-01-26 10:11:17 +08:00
display: flex;
min-height: 100%;
flex-direction: column;
2026-01-27 15:17:28 +08:00
padding: 40px 48px 48px;
background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 50%, #e6f4ff 100%);
2026-01-26 10:11:17 +08:00
}
.home-hero {
gap: 32px;
display: grid;
align-items: stretch;
2026-01-27 15:17:28 +08:00
grid-template-columns: minmax(0, 2fr) minmax(320px, 1.4fr);
2026-01-26 10:11:17 +08:00
}
.home-hero-main {
display: flex;
flex-direction: column;
justify-content: center;
2026-01-27 15:17:28 +08:00
max-width: 680px;
2026-01-26 10:11:17 +08:00
}
.home-tag {
display: inline-flex;
align-items: center;
2026-01-27 15:17:28 +08:00
padding: 6px 14px;
2026-01-26 10:11:17 +08:00
border-radius: 999px;
font-size: 13px;
2026-01-27 15:17:28 +08:00
letter-spacing: 0.1em;
2026-01-26 10:11:17 +08:00
text-transform: uppercase;
color: #1677ff;
2026-01-27 15:17:28 +08:00
background: rgba(22, 119, 255, 0.1);
margin-bottom: 20px;
width: fit-content;
font-weight: 500;
2026-01-26 10:11:17 +08:00
}
.home-title {
2026-01-27 15:17:28 +08:00
font-size: 42px;
2026-01-26 10:11:17 +08:00
line-height: 1.3;
font-weight: 700;
color: #1f2937;
2026-01-27 15:17:28 +08:00
margin: 0 0 20px;
background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
2026-01-26 10:11:17 +08:00
}
.home-subtitle {
margin: 0;
2026-01-27 15:17:28 +08:00
font-size: 16px;
2026-01-26 10:11:17 +08:00
line-height: 1.8;
color: #4b5563;
}
.home-hero-panel {
border-radius: 20px;
2026-01-27 15:17:28 +08:00
background: linear-gradient(145deg, #1677ff 0%, #4096ff 45%, #69b1ff 100%);
box-shadow: 0 20px 50px rgba(22, 119, 255, 0.3);
2026-01-26 10:11:17 +08:00
color: #ffffff;
display: flex;
flex-direction: column;
overflow: hidden;
2026-01-27 15:17:28 +08:00
transition: transform 0.3s ease, box-shadow 0.3s ease;
&:hover {
transform: translateY(-4px);
box-shadow: 0 24px 60px rgba(22, 119, 255, 0.4);
}
2026-01-26 10:11:17 +08:00
}
.panel-header {
2026-01-27 15:17:28 +08:00
padding: 20px 24px 12px;
font-size: 16px;
2026-01-26 10:11:17 +08:00
font-weight: 600;
opacity: 0.95;
}
.panel-body {
display: grid;
grid-template-columns: repeat(3, 1fr);
2026-01-27 15:17:28 +08:00
padding: 16px 24px 12px;
gap: 12px;
2026-01-26 10:11:17 +08:00
}
.panel-item {
2026-01-27 15:17:28 +08:00
padding: 16px 14px;
2026-01-26 10:11:17 +08:00
border-radius: 12px;
2026-01-27 15:17:28 +08:00
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(8px);
2026-01-26 10:11:17 +08:00
display: flex;
flex-direction: column;
2026-01-27 15:17:28 +08:00
gap: 8px;
2026-01-26 10:11:17 +08:00
min-width: 0;
2026-01-27 15:17:28 +08:00
transition: background 0.3s ease;
&:hover {
background: rgba(255, 255, 255, 0.2);
}
2026-01-26 10:11:17 +08:00
}
.panel-label {
font-size: 13px;
2026-01-27 15:17:28 +08:00
opacity: 0.9;
font-weight: 500;
2026-01-26 10:11:17 +08:00
}
.panel-value {
2026-01-27 15:17:28 +08:00
font-size: 24px;
font-weight: 700;
line-height: 1.2;
2026-01-26 10:11:17 +08:00
}
.panel-footer {
2026-01-27 15:17:28 +08:00
padding: 16px 24px 20px;
2026-01-26 10:11:17 +08:00
font-size: 13px;
2026-01-27 15:17:28 +08:00
opacity: 0.85;
border-top: 1px solid rgba(255, 255, 255, 0.2);
margin-top: auto;
2026-01-26 10:11:17 +08:00
}
.home-grid {
display: grid;
2026-01-27 15:17:28 +08:00
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
2026-01-26 10:11:17 +08:00
gap: 24px;
}
.home-card {
border-radius: 18px;
overflow: hidden;
2026-01-27 15:17:28 +08:00
cursor: pointer;
transition: all 0.3s ease;
border: 1px solid transparent;
&:hover {
transform: translateY(-6px);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
border-color: #e6f4ff;
}
2026-01-26 10:11:17 +08:00
}
.home-card :deep(.el-card__body) {
2026-01-27 15:17:28 +08:00
padding: 24px;
}
.card-icon {
margin-bottom: 16px;
display: inline-flex;
padding: 12px;
border-radius: 12px;
background: linear-gradient(135deg, #e6f4ff 0%, #f0f7ff 100%);
2026-01-26 10:11:17 +08:00
}
.home-card h3 {
2026-01-27 15:17:28 +08:00
margin: 0 0 12px;
font-size: 20px;
2026-01-26 10:11:17 +08:00
font-weight: 600;
color: #111827;
}
.home-card p {
margin: 0;
font-size: 14px;
line-height: 1.7;
color: #4b5563;
}
2026-01-27 15:17:28 +08:00
.home-features {
margin-top: 8px;
}
.features-title {
font-size: 24px;
font-weight: 600;
color: #1f2937;
margin: 0 0 24px;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 20px;
}
.feature-item {
display: flex;
align-items: flex-start;
gap: 16px;
padding: 20px;
border-radius: 12px;
background: #ffffff;
border: 1px solid #e5e7eb;
transition: all 0.3s ease;
&:hover {
border-color: #1677ff;
box-shadow: 0 4px 12px rgba(22, 119, 255, 0.1);
transform: translateY(-2px);
}
}
.feature-content {
flex: 1;
}
.feature-content h4 {
margin: 0 0 6px;
font-size: 16px;
font-weight: 600;
color: #1f2937;
}
.feature-content p {
margin: 0;
2026-01-26 10:11:17 +08:00
font-size: 13px;
2026-01-27 15:17:28 +08:00
line-height: 1.6;
2026-01-26 10:11:17 +08:00
color: #6b7280;
}
@media (max-width: 1024px) {
.home {
2026-01-27 15:17:28 +08:00
padding: 32px 32px 40px;
2026-01-26 10:11:17 +08:00
}
.home-hero {
2026-01-27 15:17:28 +08:00
grid-template-columns: 1fr;
}
.home-hero-panel {
order: -1;
}
.home-title {
font-size: 36px;
2026-01-26 10:11:17 +08:00
}
}
@media (max-width: 768px) {
.home {
2026-01-27 15:17:28 +08:00
padding: 24px 20px 32px;
gap: 32px;
2026-01-26 10:11:17 +08:00
}
.home-hero {
2026-01-27 15:17:28 +08:00
gap: 24px;
}
.home-title {
font-size: 28px;
}
.home-grid {
2026-01-26 10:11:17 +08:00
grid-template-columns: 1fr;
2026-01-27 15:17:28 +08:00
gap: 20px;
2026-01-26 10:11:17 +08:00
}
2026-01-27 15:17:28 +08:00
.features-grid {
grid-template-columns: 1fr;
gap: 16px;
2026-01-26 10:11:17 +08:00
}
2026-01-27 15:17:28 +08:00
.panel-body {
grid-template-columns: 1fr;
2026-01-26 10:11:17 +08:00
}
}
</style>