This commit is contained in:
那些花儿
2025-08-04 08:59:38 +08:00
parent ad3be9603b
commit dca6d841ba
+607 -6
View File
@@ -2,17 +2,618 @@
layout("/layouts/v4/baseLayout.html"){
#-->
<div id="v4-home-app"></div>
<style>
/* 主容器 */
.oa-container {
position: relative;
}
/* 主要内容区域 */
.oa-main-content {
margin: 0 auto;
}
/* 背景图和搜索统计区域容器 */
.oa-hero-section {
position: relative;
height: 350px;
overflow: hidden;
}
.oa-background-image {
width: 100%;
height: 100%;
}
.oa-background-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* 搜索和统计区域 */
.oa-search-stats-section {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: grid;
grid-template-columns: 1fr 500px;
gap: 40px;
align-items: center;
width: 1500px;
z-index: 10;
}
/* 搜索区域 */
.oa-search-section {
text-align: left;
border-radius: 20px;
padding: 40px;
}
.oa-search-title {
color: white;
font-size: 48px;
font-weight: 300;
margin-bottom: 20px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.oa-search-container {
display: flex;
max-width: 600px;
background: white;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.oa-search-input {
flex: 1;
padding: 15px 25px;
border: none;
outline: none;
font-size: 16px;
background: transparent;
}
.oa-search-btn {
background: #ff6b35;
color: white;
border: none;
padding: 15px 30px;
font-size: 16px;
cursor: pointer;
transition: background 0.3s;
}
.oa-search-btn:hover {
background: #e55a2b;
}
/* 数字提醒区域 */
.oa-stats-section {
background: rgba(0, 109, 185, 0.7);
padding: 20px 25px;
}
.oa-stats-title {
color: white;
font-size: 18px;
font-weight: 600;
margin: 0 0 15px 0;
text-align: left;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.oa-stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
}
.oa-stat-card {
background: white;
padding: 20px 15px;
text-align: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
border: none;
}
.oa-stat-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
cursor: pointer;
}
.oa-stat-icon {
display: none;
}
.oa-stat-number {
font-size: 28px;
font-weight: bold;
color: #4a90e2;
margin-bottom: 8px;
line-height: 1;
}
.oa-stat-label {
color: #666;
font-size: 14px;
font-weight: 400;
line-height: 1.2;
}
/* 待办中心 */
.oa-todo-section {
display: grid;
grid-template-columns: 300px 1fr;
gap: 30px;
border-radius: 12px;
overflow: hidden;
width: 1500px;
margin: 20px auto 0;
}
/* 左侧用户信息 */
.oa-user-panel {
background: rgba(0, 109, 185, 0.9);
color: white;
padding: 25px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
position: relative;
overflow: hidden;
}
.oa-user-panel::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
z-index: 0;
}
.oa-user-panel > * {
position: relative;
z-index: 1;
}
.oa-user-avatar {
width: 90px;
height: 90px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
margin-bottom: 15px;
border: 3px solid rgba(255, 255, 255, 0.3);
transition: all 0.3s ease;
}
.oa-user-avatar:hover {
transform: scale(1.05);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.oa-user-name {
font-size: 20px;
font-weight: 600;
margin-bottom: 8px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.oa-user-id {
font-size: 13px;
opacity: 0.9;
margin-bottom: 20px;
background: rgba(255, 255, 255, 0.1);
padding: 5px 12px;
border-radius: 15px;
backdrop-filter: blur(5px);
}
.oa-user-info {
font-size: 12px;
opacity: 0.8;
line-height: 1.6;
margin-bottom: 20px;
background: rgba(255, 255, 255, 0.05);
padding: 15px;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.oa-user-homepage-btn {
background: rgba(255, 255, 255, 0.2);
color: white;
border: 2px solid rgba(255, 255, 255, 0.3);
padding: 10px 20px;
border-radius: 25px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 8px;
}
.oa-user-homepage-btn:hover {
background: rgba(255, 255, 255, 0.3);
border-color: rgba(255, 255, 255, 0.5);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
color: white;
text-decoration: none;
}
/* 右侧待办列表 */
.oa-todo-content {
padding: 30px;
background: #ffffff;
}
.oa-todo-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
border-bottom: 1px solid #eee;
padding-bottom: 15px;
}
.oa-todo-tabs {
display: flex;
gap: 20px;
}
.oa-todo-tab {
padding: 8px 16px;
background: #f0f0f0;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: background 0.3s;
}
.oa-todo-tab.active {
background: #4a90e2;
color: white;
}
.oa-todo-actions {
display: flex;
gap: 10px;
font-size: 12px;
}
.oa-todo-actions span {
color: #666;
cursor: pointer;
}
.oa-todo-list {
list-style: none;
}
.oa-todo-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
border-bottom: 1px solid #f0f0f0;
}
.oa-todo-item:last-child {
border-bottom: none;
}
.oa-todo-info {
flex: 1;
}
.oa-todo-title {
font-size: 14px;
color: #333;
margin-bottom: 5px;
}
.oa-todo-meta {
font-size: 12px;
color: #999;
}
.oa-todo-date {
font-size: 12px;
color: #666;
}
/* 响应式设计 */
@media (max-width: 768px) {
.oa-nav {
flex-direction: column;
gap: 15px;
}
.oa-nav-menu {
display: none;
}
.oa-search-stats-section {
grid-template-columns: 1fr;
gap: 30px;
width: 90%;
max-width: 500px;
}
.oa-search-section {
text-align: center;
padding: 30px 20px;
}
.oa-search-title {
font-size: 32px;
}
.oa-stats-section {
padding: 0;
margin: 0 10px 15px 10px;
}
.oa-stats-title {
font-size: 16px;
margin-bottom: 12px;
}
.oa-stats-grid {
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}
.oa-stat-card {
padding: 15px 10px;
}
.oa-stat-number {
font-size: 24px;
}
.oa-stat-label {
font-size: 12px;
}
.oa-todo-section {
grid-template-columns: 1fr;
}
.oa-user-panel {
padding: 20px;
margin-bottom: 20px;
}
.oa-user-avatar {
width: 70px;
height: 70px;
font-size: 28px;
margin-bottom: 12px;
}
.oa-user-name {
font-size: 18px;
margin-bottom: 6px;
}
.oa-user-id {
font-size: 12px;
margin-bottom: 15px;
padding: 4px 10px;
}
.oa-user-info {
font-size: 11px;
padding: 12px;
margin-bottom: 15px;
}
.oa-user-homepage-btn {
padding: 8px 16px;
font-size: 13px;
}
}
</style>
<div class="oa-container" id="v4-home-app">
<!-- 顶部导航 -->
<!-- 主要内容 -->
<div class="oa-main-content">
<!-- 背景图和搜索统计区域容器 -->
<div class="oa-hero-section">
<!-- 背景图 -->
<div class="oa-background-image">
<img
src="https://i.cpu.edu.cn/mnews/_upload/article/images/ed/dc/eff0e4b84ee6b2d7e770ed1de071/0f515087-45e3-4dbf-acf4-e7096d6cbdc0.jpg"
alt=""
/>
</div>
<!-- 搜索和统计区域 -->
<div class="oa-search-stats-section">
<!-- 搜索区域 -->
<div class="oa-search-section">
<!-- <h1 class="oa-search-title">精业济群</h1>-->
<div class="oa-search-container">
<input type="text" class="oa-search-input" placeholder="请输入您要查询的关键字" v-model="searchQuery" />
<button class="oa-search-btn" @click="performSearch">搜索</button>
</div>
</div>
<!-- 数字提醒 -->
<div class="oa-stats-section">
<h3 class="oa-stats-title">数字提醒</h3>
<div class="oa-stats-grid">
<div class="oa-stat-card">
<div class="oa-stat-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="oa-stat-number">{{ stats.pending }}</div>
<div class="oa-stat-label">待办</div>
</div>
<div class="oa-stat-card">
<div class="oa-stat-icon">
<i class="fa fa-check-circle"></i>
</div>
<div class="oa-stat-number">{{ stats.completed }}</div>
<div class="oa-stat-label">已办</div>
</div>
<div class="oa-stat-card">
<div class="oa-stat-icon">
<i class="fa fa-bell"></i>
</div>
<div class="oa-stat-number">{{ stats.notifications }}</div>
<div class="oa-stat-label">消息通知</div>
</div>
<div class="oa-stat-card">
<div class="oa-stat-icon">
<i class="fa fa-file-text"></i>
</div>
<div class="oa-stat-number">{{ stats.applications }}</div>
<div class="oa-stat-label">申请</div>
</div>
</div>
</div>
</div>
</div>
<!-- 待办中心 -->
<div class="oa-todo-section">
<!-- 左侧用户信息 -->
<div class="oa-user-panel">
<div class="oa-user-avatar">
<i class="fa fa-user"></i>
</div>
<div class="oa-user-name">李学生</div>
<div class="oa-user-id">1019918454 工学工程人员</div>
<div class="oa-user-info">
单位信息:教师工
<br />
登录人员:1019918454
<br />
上次登录:2005-04-01 16:54:47
</div>
<a href="#" class="oa-user-homepage-btn">
<i class="fa fa-home"></i>
个人主页
</a>
</div>
<!-- 右侧待办内容 -->
<div class="oa-todo-content">
<div class="oa-todo-header">
<div class="oa-todo-tabs">
<button class="oa-todo-tab" :class="{active: activeTab === 'pending'}" @click="setActiveTab('pending')">待办事务</button>
<button class="oa-todo-tab" :class="{active: activeTab === 'completed'}" @click="setActiveTab('completed')">已办事务</button>
<button class="oa-todo-tab" :class="{active: activeTab === 'initiated'}" @click="setActiveTab('initiated')">我发起的</button>
<button class="oa-todo-tab" :class="{active: activeTab === 'internal'}" @click="setActiveTab('internal')">内部事务</button>
</div>
<div class="oa-todo-actions">
<span>发起人</span>
<span>发起日期</span>
</div>
</div>
<ul class="oa-todo-list">
<li class="oa-todo-item" v-for="item in currentTodoList" :key="item.id">
<div class="oa-todo-info">
<div class="oa-todo-title">{{ item.title }}</div>
<div class="oa-todo-meta">{{ item.type }} | {{ item.description }}</div>
</div>
<div class="oa-todo-date">{{ item.date }}</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<script>
var app = new Vue({
new Vue({
el: "#v4-home-app",
data() {
return {}
return {
searchQuery: "",
activeTab: "pending",
stats: {
pending: 3,
completed: 0,
notifications: 7,
applications: 9
},
todoLists: {
pending: [
{
id: 1,
title: "关于中科大教师岗位聘任经费管理办法的通知",
type: "校办OA",
description: "关于中科大教师岗位聘任经费管理办法的通知 (2024-08-11 15:46)",
date: "2025-07-01"
},
{
id: 2,
title: "关于印发《中国科技大学岗位聘任经费管理办法》的通知",
type: "校办OA",
description: "关于印发《中国科技大学岗位聘任经费管理办法》的通知",
date: "2025-06-17"
},
{
id: 3,
title: "临时人员人事档案管理办法(学字 2022-03-21 16:21)",
type: "校办OA",
description: "临时人员人事档案管理办法",
date: "2025-03-21"
}
],
completed: [],
initiated: [],
internal: []
}
}
},
computed: {
currentTodoList() {
return this.todoLists[this.activeTab] || []
}
},
mounted() {
// 初始化数据
},
methods: {
performSearch() {
if (this.searchQuery.trim()) {
console.log("搜索:", this.searchQuery)
// 实现搜索逻辑
}
},
setActiveTab(tab) {
this.activeTab = tab
}
}
})
</script>
<!--#
}
#-->
<!--#}#-->