活动介绍
file-type

使用SM30生成Change Document的步骤

下载需积分: 31 | 594KB | 更新于2024-09-09 | 56 浏览量 | 3 下载量 举报 收藏
download 立即下载
"这篇文档是关于如何在SAP系统中使用SM30 transaction来生成Change Document,以便跟踪和审计数据库表的更改操作。Change Document在SAP中是一种记录对象更改历史的功能,对于合规性和审计需求至关重要。" 在SAP系统中,SM30是一个用于维护视图的事务码,而生成Change Document是为了跟踪数据库表中的增删改操作。以下是详细步骤和相关知识点: 1. 创建表: 要跟踪特定字段的更改,需要在表的设计阶段选择date element,并勾选"changeDocument"选项。这会确保每次该字段发生变化时,都会生成一个Change Document条目。 2. 设置Table Maintenance Generator (TMG): 在表创建后,通过SE11进入表维护生成器,填写必要的信息并点击新建按钮(对于已存在的表,此选项可能不可见)。TMG允许系统自动生成用于维护表的用户界面,并且可以与Change Document集成。 3. 配置事件处理: SAP提供了多种事件(events)来处理不同类型的变更操作。例如,event01通常用于处理插入、更新和删除操作。要详细了解每个事件的具体用途和参数,可以在SAP帮助文档中搜索"Table maintenance"。事件处理代码需要根据Unicode和非Unicode系统的差异进行调整。 - 对于非Unicode系统: 在event01事件处理中,需要定义一个名为`wa`的工作区,其结构与`total`相同,以便读取和处理字段。例如: ``` DATA: BEGIN OF total, INCLUDE STRUCTURE viewname, INCLUDE STRUCTURE vimflagtab, END OF total. DATA: wa LIKE total. LOOP AT total INTO wa. ... ENDLOOP. ``` - 对于Unicode系统: 这里处理方式略有不同,可以直接使用`<vim_total_struc>`来获取新数据。如果`<action>`标识为'U'(更新),则可以将`<vim_total_struc>`的值赋给其他变量。 4. 创建Change Document Object: 使用Tcode SCDO创建新的Change Document Object。输入对象名称(如`zsea_test`),并指定之前创建的表名。勾选相关选项以启用Change Document功能。 通过这些步骤,SAP系统将开始记录指定表的更改历史,从而方便审计和追踪操作。这对于保持数据的完整性和合规性至关重要,特别是在需要严格审计跟踪的业务环境中。在实际应用中,可能还需要配置更复杂的逻辑,例如根据特定业务规则触发Change Document的创建,或者定制Change Document的内容和格式。

相关推荐

filetype

E:\bysj\Food\Food_recommend\.venv\Scripts\python.exe E:\bysj\Food\Food_recommend\manage.py runserver 8000 Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). July 19, 2025 - 23:18:05 Django version 4.2.16, using settings 'Food_recommend.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. [19/Jul/2025 23:18:05] "GET /myapp/wordcloud/ HTTP/1.1" 200 26728 Not Found: /myapp/wordcloud/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:05] "GET /myapp/wordcloud/static/picture/logo-sm-dark.png HTTP/1.1" 404 4985 Not Found: /myapp/wordcloud/static/picture/logo-dark.png [19/Jul/2025 23:18:05] "GET /myapp/wordcloud/static/picture/logo-dark.png HTTP/1.1" 404 4976 Not Found: /myapp/wordcloud/static/picture/logo-sm-light.png [19/Jul/2025 23:18:05] "GET /myapp/wordcloud/static/picture/logo-sm-light.png HTTP/1.1" 404 4988 Not Found: /myapp/wordcloud/static/picture/logo-light.png [19/Jul/2025 23:18:05] "GET /myapp/wordcloud/static/picture/logo-light.png HTTP/1.1" 404 4979 [19/Jul/2025 23:18:05] "GET /static/picture/avatar.jpg HTTP/1.1" 404 1813 [19/Jul/2025 23:18:06] "GET /myapp/get_wordcloud_data/?type=%E5%85%A8%E9%83%A8 HTTP/1.1" 200 806057 [19/Jul/2025 23:18:25] "GET / HTTP/1.1" 200 5798 [19/Jul/2025 23:18:25] "GET / HTTP/1.1" 200 5798 Not Found: /favicon.ico [19/Jul/2025 23:18:25] "GET /favicon.ico HTTP/1.1" 404 2338 Not Found: /favicon.ico [19/Jul/2025 23:18:25] "GET /favicon.ico HTTP/1.1" 404 2338 123 321 [19/Jul/2025 23:18:31] "POST /myapp/login/ HTTP/1.1" 200 14 [19/Jul/2025 23:18:32] "GET /myapp/index/ HTTP/1.1" 200 21273 Not Found: /myapp/index/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:32] "GET /myapp/index/static/picture/logo-sm-dark.png HTTP/1.1" 404 4973 Not Found: /myapp/index/static/picture/logo-dark.png [19/Jul/2025 23:18:32] "GET /myapp/index/static/picture/logo-dark.png HTTP/1.1" 404 4964 Not Found: /myapp/index/static/picture/logo-sm-light.png Not Found: /myapp/index/static/picture/logo-light.png [19/Jul/2025 23:18:32] "GET /myapp/index/static/picture/logo-sm-light.png HTTP/1.1" 404 4976 [19/Jul/2025 23:18:32] "GET /myapp/index/static/picture/logo-light.png HTTP/1.1" 404 4967 [19/Jul/2025 23:18:34] "GET /myapp/user_view/ HTTP/1.1" 200 30993 Not Found: /myapp/user_view/static/picture/logo-dark.png Not Found: /myapp/user_view/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:34] "GET /myapp/user_view/static/picture/logo-dark.png HTTP/1.1" 404 4976 [19/Jul/2025 23:18:34] "GET /myapp/user_view/static/picture/logo-sm-dark.png HTTP/1.1" 404 4985 Not Found: /myapp/user_view/static/picture/logo-sm-light.png [19/Jul/2025 23:18:34] "GET /myapp/user_view/static/picture/logo-sm-light.png HTTP/1.1" 404 4988 Not Found: /myapp/user_view/static/picture/logo-light.png [19/Jul/2025 23:18:34] "GET /myapp/user_view/static/picture/logo-light.png HTTP/1.1" 404 4979 [19/Jul/2025 23:18:36] "GET /myapp/index/ HTTP/1.1" 200 21273 Not Found: /myapp/index/static/picture/logo-sm-dark.png Not Found: /myapp/index/static/picture/logo-dark.png [19/Jul/2025 23:18:36] "GET /myapp/index/static/picture/logo-sm-dark.png HTTP/1.1" 404 4973 [19/Jul/2025 23:18:36] "GET /myapp/index/static/picture/logo-dark.png HTTP/1.1" 404 4964 Not Found: /myapp/index/static/picture/logo-sm-light.png [19/Jul/2025 23:18:36] "GET /myapp/index/static/picture/logo-sm-light.png HTTP/1.1" 404 4976 Not Found: /myapp/index/static/picture/logo-light.png [19/Jul/2025 23:18:36] "GET /myapp/index/static/picture/logo-light.png HTTP/1.1" 404 4967 [19/Jul/2025 23:18:37] "GET /myapp/change_password/ HTTP/1.1" 200 25157 Not Found: /myapp/change_password/static/picture/logo-dark.png Not Found: /myapp/change_password/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:37] "GET /myapp/change_password/static/picture/logo-dark.png HTTP/1.1" 404 4994 [19/Jul/2025 23:18:37] "GET /myapp/change_password/static/picture/logo-sm-dark.png HTTP/1.1" 404 5003 Not Found: /myapp/change_password/static/picture/logo-sm-light.png [19/Jul/2025 23:18:37] "GET /myapp/change_password/static/picture/logo-sm-light.png HTTP/1.1" 404 5006 Not Found: /myapp/change_password/static/picture/logo-light.png [19/Jul/2025 23:18:37] "GET /myapp/change_password/static/picture/logo-light.png HTTP/1.1" 404 4997 E:\bysj\Food\Food_recommend\myapp\views.py:66: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'myapp.models.Foods'> QuerySet. paginator = Paginator(foodlist, items_per_page) [19/Jul/2025 23:18:38] "GET /myapp/foodlist/ HTTP/1.1" 200 65790 Not Found: /myapp/foodlist/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:38] "GET /myapp/foodlist/static/picture/logo-sm-dark.png HTTP/1.1" 404 4982 Not Found: /myapp/foodlist/static/picture/logo-dark.png [19/Jul/2025 23:18:38] "GET /myapp/foodlist/static/picture/logo-dark.png HTTP/1.1" 404 4973 Not Found: /myapp/foodlist/static/picture/logo-sm-light.png Not Found: /myapp/foodlist/static/picture/logo-light.png [19/Jul/2025 23:18:38] "GET /myapp/foodlist/static/picture/logo-sm-light.png HTTP/1.1" 404 4985 [19/Jul/2025 23:18:38] "GET /myapp/foodlist/static/picture/logo-light.png HTTP/1.1" 404 4976 [19/Jul/2025 23:18:41] "GET /myapp/foodlist/?category=all&page=2 HTTP/1.1" 200 66401 Not Found: /myapp/foodlist/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:41] "GET /myapp/foodlist/static/picture/logo-sm-dark.png HTTP/1.1" 404 4982 Not Found: /myapp/foodlist/static/picture/logo-dark.png [19/Jul/2025 23:18:41] "GET /myapp/foodlist/static/picture/logo-dark.png HTTP/1.1" 404 4973 Not Found: /myapp/foodlist/static/picture/logo-sm-light.png [19/Jul/2025 23:18:41] "GET /myapp/foodlist/static/picture/logo-sm-light.png HTTP/1.1" 404 4985 Not Found: /myapp/foodlist/static/picture/logo-light.png [19/Jul/2025 23:18:41] "GET /myapp/foodlist/static/picture/logo-light.png HTTP/1.1" 404 4976 [19/Jul/2025 23:18:46] "GET /myapp/detail/44/ HTTP/1.1" 200 35919 [19/Jul/2025 23:18:46] "GET /myapp/detail/45/ HTTP/1.1" 200 35804 [19/Jul/2025 23:18:46] "GET /myapp/detail/44/ HTTP/1.1" 200 35919 Not Found: /myapp/detail/44/static/picture/logo-dark.png [19/Jul/2025 23:18:46] "GET /myapp/detail/44/static/picture/logo-dark.png HTTP/1.1" 404 4976 Not Found: /myapp/detail/44/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:46] "GET /myapp/detail/44/static/picture/logo-sm-dark.png HTTP/1.1" 404 4985 Not Found: /myapp/detail/44/static/picture/logo-light.png Not Found: /myapp/detail/44/static/picture/logo-sm-light.png [19/Jul/2025 23:18:46] "GET /myapp/detail/44/static/picture/logo-sm-light.png HTTP/1.1" 404 4988 [19/Jul/2025 23:18:46] "GET /myapp/detail/44/static/picture/logo-light.png HTTP/1.1" 404 4979 [19/Jul/2025 23:18:57] "GET /myapp/keshihua HTTP/1.1" 301 0 [19/Jul/2025 23:18:57] "GET /myapp/keshihua/ HTTP/1.1" 200 28337 Not Found: /myapp/keshihua/static/picture/logo-sm-dark.png [19/Jul/2025 23:18:57] "GET /myapp/keshihua/static/picture/logo-sm-dark.png HTTP/1.1" 404 4982 Not Found: /myapp/keshihua/static/picture/logo-dark.png [19/Jul/2025 23:18:57] "GET /myapp/keshihua/static/picture/logo-dark.png HTTP/1.1" 404 4973 Not Found: /myapp/keshihua/static/picture/logo-sm-light.png Not Found: /myapp/keshihua/static/picture/logo-light.png [19/Jul/2025 23:18:57] "GET /myapp/keshihua/static/picture/logo-sm-light.png HTTP/1.1" 404 4985 [19/Jul/2025 23:18:57] "GET /myapp/keshihua/static/picture/logo-light.png HTTP/1.1" 404 4976 [19/Jul/2025 23:19:08] "GET /myapp/wordcloud/ HTTP/1.1" 200 26726 Not Found: /myapp/wordcloud/static/picture/logo-sm-dark.png [19/Jul/2025 23:19:08] "GET /myapp/wordcloud/static/picture/logo-sm-dark.png HTTP/1.1" 404 4985 Not Found: /myapp/wordcloud/static/picture/logo-dark.png [19/Jul/2025 23:19:08] "GET /myapp/wordcloud/static/picture/logo-dark.png HTTP/1.1" 404 4976 Not Found: /myapp/wordcloud/static/picture/logo-sm-light.png [19/Jul/2025 23:19:08] "GET /myapp/wordcloud/static/picture/logo-sm-light.png HTTP/1.1" 404 4988 Not Found: /myapp/wordcloud/static/picture/logo-light.png [19/Jul/2025 23:19:08] "GET /myapp/wordcloud/static/picture/logo-light.png HTTP/1.1" 404 4979 [19/Jul/2025 23:19:08] "GET /myapp/get_wordcloud_data/?type=%E5%85%A8%E9%83%A8 HTTP/1.1" 200 806057 [19/Jul/2025 23:19:48] "GET /myapp/get_wordcloud_data/?type=%E5%AE%B6%E5%B8%B8%E8%8F%9C HTTP/1.1" 200 82955 进程已结束,退出代码为 0 为什么出现这些错误

filetype

<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>关爱展厅</title> <script src="https://cdn.tailwindcss.com"></script> <link href="https://cdn.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css" rel="stylesheet"> <style> body { background: #0f172a; min-height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Inter', sans-serif; overflow: hidden; } .gallery-container { perspective: 1000px; width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; } .carousel { position: relative; width: 300px; height: 400px; transform-style: preserve-3d; /* 使用更平滑的过渡函数 */ transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); } .carousel-item { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* 使用will-change优化性能 */ will-change: transform, box-shadow; transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1); cursor: pointer; z-index: 5; } .carousel-item:hover { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5); transform: translateZ(calc(400px + 10px)); /* 悬停时向前移动 */ z-index: 20; /* 确保悬停项在最上层 */ } .carousel-item:active { transform: translateZ(calc(400px)) scale(0.98); transition-duration: 0.2s; } .carousel-item img { width: 100%; height: 100%; object-fit: cover; /* 使用will-change优化性能 */ will-change: transform; transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1); } .carousel-item:hover img { transform: scale(1.05); } .carousel-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); transform: translateY(20px); opacity: 0; /* 使用will-change优化性能 */ will-change: transform, opacity; transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1); z-index: 30; /* 提高信息卡片的z-index */ } .carousel-item:hover .carousel-info { transform: translateY(0); opacity: 1; } .carousel-title { font-size: 1.5rem; font-weight: bold; margin-bottom: 5px; color: white; } .carousel-desc { font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); } .controls { position: fixed; bottom: 50px; left: 50%; transform: translateX(-50%); display: flex; gap: 20px; z-index: 20; } .control-btn { background: rgba(255, 255, 255, 0.1); color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; /* 使用will-change优化性能 */ will-change: background; transition: background 0.3s ease; } .control-btn:hover { background: rgba(255, 255, 255, 0.2); } #activityBtn { position: fixed; top: 20px; right: 20px; background: rgba(255, 255, 255, 0.1); color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; /* 使用will-change优化性能 */ will-change: background; transition: background 0.3s ease; z-index: 20; } #activityBtn:hover { background: rgba(255, 255, 255, 0.2); } #activityModal { display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.7); /* 使用will-change优化性能 */ will-change: opacity; transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1); } .modal-content { background-color: #1e293b; margin: 10% auto; padding: 20px; border-radius: 10px; width: 80%; max-width: 600px; color: white; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* 使用will-change优化性能 */ will-change: transform, opacity; transform: translateY(20px); opacity: 0; transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1); } .modal-open .modal-content { transform: translateY(0); opacity: 1; } .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; /* 使用will-change优化性能 */ will-change: color; transition: color 0.3s ease; } .close:hover, .close:focus { color: white; text-decoration: none; cursor: pointer; } .activity-list { margin-top: 20px; } .activity-item { padding: 15px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 使用will-change优化性能 */ will-change: background; transition: background 0.2s ease; } .activity-item:hover { background: rgba(255, 255, 255, 0.03); } .activity-item:last-child { border-bottom: none; } .activity-date { font-weight: bold; color: #94a3b8; } @media (max-width: 600px) { .carousel { width: 250px; height: 350px; } .modal-content { width: 90%; margin: 5% auto; } #activityBtn { top: 10px; right: 10px; padding: 8px 15px; font-size: 0.9rem; } } </style> </head> <body>
<button id="prevBtn" class="control-btn"> 上一张 </button> <button id="nextBtn" class="control-btn"> 下一张 </button>
<button id="activityBtn" class="control-btn"> 活动清单 </button>
×

7月活动清单

<script> document.addEventListener('DOMContentLoaded', () => { const carousel = document.getElementById('carousel'); const prevBtn = document.getElementById('prevBtn'); const nextBtn = document.getElementById('nextBtn'); const activityBtn = document.getElementById('activityBtn'); const activityModal = document.getElementById('activityModal'); const closeBtn = document.querySelector('.close'); const itemsCount = 5; // 更新为5个项目 const radius = 400; let currentAngle = 0; const angleStep = 360 / itemsCount; // 重新计算角度步长 // 优化后的主题数据,添加了"新员工融入"和"任务分派" const communicationRecords = [ { id: 1001, title: "员工生病探望", participants: ["人力资源部: 王经理", "部门主管: 张主管"], content: "前往医院探望生病住院的员工,带去公司关怀和慰问品,了解康复情况并协调工作安排。", time: "2023-06-15", location: "市中心医院", followUp: "人力资源部持续跟进员工康复进度,部门安排同事临时接手相关工作。", topic: "生病看望", imageId: 1005 // 医疗相关图片 }, { id: 1003, title: "6月员工生日会", participants: ["行政部: 刘主管", "6月寿星: 全体成员"], content: "举办6月员工生日会,庆祝员工生日,分享蛋糕和礼物,增强团队凝聚力。", time: "2023-06-25", location: "公司会议室", followUp: "行政部收集员工反馈,持续优化生日关怀活动形式。", topic: "生日关怀", imageId: 1003 // 庆祝相关图片 }, { id: 1004, title: "端午节福利发放", participants: ["行政部: 全体成员", "各部门代表"], content: "为全体员工发放端午节福利,包括粽子、咸鸭蛋等传统节日礼品,表达节日问候。", time: "2023-06-22", location: "公司大厅", followUp: "行政部持续关注员工福利需求,准备其他节日福利方案。", topic: "节日福利", imageId: 1004 // 食物相关图片 }, { id: 1005, title: "新员工入职欢迎会", participants: ["人力资源部: 李主管", "新员工: 张明、王芳", "部门同事代表"], content: "为新员工举办入职欢迎会,介绍公司文化、规章制度,帮助新员工快速融入团队。", time: "2023-06-30", location: "公司培训室", followUp: "各部门安排导师指导新员工,定期跟进新员工适应情况。", topic: "新员工融入", imageId: 1006 // 团队合作相关图片 }, { id: 1006, title: "项目任务分派会议", participants: ["项目经理: 赵经理", "开发团队: 全体成员", "测试团队: 负责人"], content: "召开项目任务分派会议,明确各成员职责和任务,制定项目计划和时间节点。", time: "2023-07-05", location: "公司会议室B", followUp: "定期召开项目进度会议,及时解决遇到的问题,确保项目顺利进行。", topic: "任务分派", imageId: 1008 // 商务会议相关图片 } ]; // 更新活动列表,添加新员工融入和任务分派相关活动 const currentMonthActivities = [ { date: "2023-07-05", title: "新一期员工入职培训", type: "培训", location: "公司培训室", participants: "人力资源部、新入职员工" }, { date: "2023-07-10", title: "员工户外拓展训练", type: "团队活动", location: "城市郊外拓展基地", participants: "全体员工" }, { date: "2023-07-15", title: "客户满意度调研分析", type: "分析会", location: "公司会议室A", participants: "市场部、客服部" }, { date: "2023-07-20", title: "第三季度项目任务分派", type: "任务分配", location: "公司大会议室", participants: "各部门负责人、项目团队" }, { date: "2023-07-25", title: "产品创新头脑风暴", type: "研讨会", location: "公司创意空间", participants: "产品部、研发部、设计部" } ]; function createCarouselItems() { for (let i = 0; i < itemsCount; i++) { const angle = (i * angleStep) * (Math.PI / 180); const item = document.createElement('div'); item.className = 'carousel-item'; item.style.transform = `rotateY(${i * angleStep}deg) translateZ(${radius}px)`; item.dataset.index = i; item.dataset.topic = communicationRecords[i].topic; const img = document.createElement('img'); img.src = `https://picsum.photos/id/${communicationRecords[i].imageId}/600/800`; img.alt = communicationRecords[i].title; const info = document.createElement('div'); info.className = 'carousel-info'; const title = document.createElement('h3'); title.className = 'carousel-title'; title.textContent = communicationRecords[i].title; const desc = document.createElement('p'); desc.className = 'carousel-desc'; desc.textContent = communicationRecords[i].participants.join('、'); info.appendChild(title); info.appendChild(desc); item.appendChild(img); item.appendChild(info); carousel.appendChild(item); item.addEventListener('click', () => { const topic = encodeURIComponent(communicationRecords[i].topic); console.log(`跳转到主题: ${topic}`); item.style.transform = `rotateY(${i * angleStep}deg) translateZ(${radius - 10}px) scale(0.98)`; setTimeout(() => { item.style.transform = `rotateY(${i * angleStep}deg) translateZ(${radius}px)`; // 注意:这里使用了相对路径,实际使用时请根据你的项目结构调整 window.location.href = `./photo-wall.html?topic=${topic}`; }, 150); }); } } function createActivityList() { const activityList = document.querySelector('.activity-list'); activityList.innerHTML = ''; currentMonthActivities.forEach(activity => { const activityItem = document.createElement('div'); activityItem.className = 'activity-item'; const dateElement = document.createElement('div'); dateElement.className = 'activity-date'; dateElement.textContent = activity.date; const titleElement = document.createElement('h3'); titleElement.className = 'text-lg font-semibold mt-1'; titleElement.textContent = activity.title; const typeElement = document.createElement('div'); typeElement.className = 'text-sm text-blue-400 mt-1'; typeElement.textContent = activity.type; const locationElement = document.createElement('div'); locationElement.className = 'text-sm text-gray-300 mt-1'; locationElement.innerHTML = ` ${activity.location}`; const participantsElement = document.createElement('div'); participantsElement.className = 'text-sm text-gray-300 mt-1'; participantsElement.innerHTML = ` ${activity.participants}`; activityItem.appendChild(dateElement); activityItem.appendChild(titleElement); activityItem.appendChild(typeElement); activityItem.appendChild(locationElement); activityItem.appendChild(participantsElement); activityList.appendChild(activityItem); }); } function rotateCarousel(angle) { // 使用requestAnimationFrame优化动画性能 requestAnimationFrame(() => { carousel.style.transform = `rotateY(${angle}deg)`; }); } prevBtn.addEventListener('click', () => { currentAngle += angleStep; rotateCarousel(currentAngle); }); nextBtn.addEventListener('click', () => { currentAngle -= angleStep; rotateCarousel(currentAngle); }); let isDragging = false; let startX, startRotation; let lastAnimationFrameId = null; document.addEventListener('mousedown', (e) => { if (!e.target.closest('.carousel-item')) { isDragging = true; startX = e.clientX; startRotation = currentAngle; document.body.style.cursor = 'grabbing'; // 防止拖动时选择文本 document.body.style.userSelect = 'none'; } }); document.addEventListener('mousemove', (e) => { if (!isDragging) return; const diffX = e.clientX - startX; const newAngle = startRotation - diffX * 0.5; // 使用requestAnimationFrame优化性能 if (lastAnimationFrameId) { cancelAnimationFrame(lastAnimationFrameId); } lastAnimationFrameId = requestAnimationFrame(() => { currentAngle = newAngle; rotateCarousel(currentAngle); }); }); document.addEventListener('mouseup', () => { if (isDragging) { isDragging = false; document.body.style.cursor = 'default'; document.body.style.userSelect = ''; if (lastAnimationFrameId) { cancelAnimationFrame(lastAnimationFrameId); } } }); activityBtn.addEventListener('click', () => { createActivityList(); activityModal.style.display = 'block'; // 添加延迟以确保过渡效果生效 setTimeout(() => { activityModal.classList.add('modal-open'); }, 10); }); closeBtn.addEventListener('click', () => { activityModal.classList.remove('modal-open'); // 等待过渡完成后隐藏模态框 setTimeout(() => { activityModal.style.display = 'none'; }, 500); }); window.addEventListener('click', (e) => { if (e.target === activityModal) { activityModal.classList.remove('modal-open'); // 等待过渡完成后隐藏模态框 setTimeout(() => { activityModal.style.display = 'none'; }, 500); } }); createCarouselItems(); rotateCarousel(currentAngle); }); </script> </body> </html> 如何调整transform的值,使得所有的

端午节福利发放

行政部: 全体成员、各部门代表

都可以显示?

filetype

<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>关爱展厅</title> <script src="https://cdn.tailwindcss.com"></script> <link href="https://cdn.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css" rel="stylesheet"> <style> body { background: #0f172a; min-height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Inter', sans-serif; overflow: hidden; } .gallery-container { perspective: 1000px; width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; } .carousel { position: relative; width: 300px; height: 400px; transform-style: preserve-3d; transition: transform 0.5s ease; } .carousel-item { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); transition: transform 0.5s ease, box-shadow 0.5s ease; cursor: pointer; z-index: 5; } .carousel-item:hover { box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5); transform: translateZ(calc(400px + 10px)); /* 悬停时向前移动 */ } .carousel-item:active { transform: translateZ(calc(400px)) scale(0.98); } .carousel-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .carousel-item:hover img { transform: scale(1.05); } .carousel-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%); transform: translateY(20px); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; z-index: 10; } .carousel-item:hover .carousel-info { transform: translateY(0); opacity: 1; } .carousel-title { font-size: 1.5rem; font-weight: bold; margin-bottom: 5px; color: white; } .carousel-desc { font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); } .controls { position: fixed; bottom: 50px; left: 50%; transform: translateX(-50%); display: flex; gap: 20px; z-index: 20; } .control-btn { background: rgba(255, 255, 255, 0.1); color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; transition: background 0.3s ease; } .control-btn:hover { background: rgba(255, 255, 255, 0.2); } #activityBtn { position: fixed; top: 20px; right: 20px; background: rgba(255, 255, 255, 0.1); color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; transition: background 0.3s ease; z-index: 20; } #activityBtn:hover { background: rgba(255, 255, 255, 0.2); } #activityModal { display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.7); } .modal-content { background-color: #1e293b; margin: 10% auto; padding: 20px; border-radius: 10px; width: 80%; max-width: 600px; color: white; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); } .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: white; text-decoration: none; cursor: pointer; } .activity-list { margin-top: 20px; } .activity-item { padding: 15px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .activity-item:last-child { border-bottom: none; } .activity-date { font-weight: bold; color: #94a3b8; } @media (max-width: 600px) { .carousel { width: 250px; height: 350px; } .modal-content { width: 90%; margin: 5% auto; } #activityBtn { top: 10px; right: 10px; padding: 8px 15px; font-size: 0.9rem; } } </style> </head> <body>
<button id="prevBtn" class="control-btn"> 上一张 </button> <button id="nextBtn" class="control-btn"> 下一张 </button>
<button id="activityBtn" class="control-btn"> 活动清单 </button>
×

7月活动清单

<script> document.addEventListener('DOMContentLoaded', () => { const carousel = document.getElementById('carousel'); const prevBtn = document.getElementById('prevBtn'); const nextBtn = document.getElementById('nextBtn'); const activityBtn = document.getElementById('activityBtn'); const activityModal = document.getElementById('activityModal'); const closeBtn = document.querySelector('.close'); const itemsCount = 5; const radius = 400; let currentAngle = 0; const angleStep = 360 / itemsCount; // 优化后的主题数据,确保每个主题都有合适的图片和描述 const communicationRecords = [ { id: 1001, title: "员工生病探望", participants: ["人力资源部: 王经理", "部门主管: 张主管"], content: "前往医院探望生病住院的员工,带去公司关怀和慰问品,了解康复情况并协调工作安排。", time: "2023-06-15", location: "市中心医院", followUp: "人力资源部持续跟进员工康复进度,部门安排同事临时接手相关工作。", topic: "生病看望", imageId: 1005 // 医疗相关图片 }, { id: 1002, title: "新员工入职培训", participants: ["人力资源部: 李专员", "新员工: 陈新", "导师: 赵工"], content: "为新员工安排入职培训,介绍公司文化、规章制度和工作流程,导师制定个性化培养计划。", time: "2023-06-20", location: "公司培训室", followUp: "导师将在3个月内指导新员工,人力资源部1个月后进行培训效果评估。", topic: "新员工融入", imageId: 1006 // 教育相关图片 }, { id: 1003, title: "6月员工生日会", participants: ["行政部: 刘主管", "6月寿星: 全体成员"], content: "举办6月员工生日会,庆祝员工生日,分享蛋糕和礼物,增强团队凝聚力。", time: "2023-06-25", location: "公司会议室", followUp: "行政部收集员工反馈,持续优化生日关怀活动形式。", topic: "生日关怀", imageId: 1003 // 庆祝相关图片 }, { id: 1004, title: "端午节福利发放", participants: ["行政部: 全体成员", "各部门代表"], content: "为全体员工发放端午节福利,包括粽子、咸鸭蛋等传统节日礼品,表达节日问候。", time: "2023-06-22", location: "公司大厅", followUp: "行政部持续关注员工福利需求,准备其他节日福利方案。", topic: "节日福利", imageId: 1004 // 食物相关图片 }, { id: 1005, title: "Q3重点项目分工", participants: ["项目经理: 周经理", "开发团队: 王工", "测试团队: 孙工"], content: "分配第三季度重点项目任务,明确各成员职责和时间节点,确保项目顺利推进。", time: "2023-07-01", location: "公司会议室", followUp: "各负责人制定详细计划,每周进行项目进度汇报,及时解决遇到的问题。", topic: "任务分派", imageId: 1002 // 商务相关图片 } ]; const currentMonthActivities = [ { date: "2023-07-05", title: "下半年战略规划会议", type: "会议", location: "公司大会议室", participants: "全体部门经理" }, { date: "2023-07-10", title: "员工户外拓展训练", type: "团队活动", location: "城市郊外拓展基地", participants: "全体员工" }, { date: "2023-07-15", title: "客户满意度调研分析", type: "分析会", location: "公司会议室A", participants: "市场部、客服部" }, { date: "2023-07-20", title: "季度绩效考核评估", type: "评估", location: "各部门会议室", participants: "各部门主管及员工" }, { date: "2023-07-25", title: "产品创新头脑风暴", type: "研讨会", location: "公司创意空间", participants: "产品部、研发部、设计部" } ]; function createCarouselItems() { for (let i = 0; i < itemsCount; i++) { const angle = (i * angleStep) * (Math.PI / 180); const item = document.createElement('div'); item.className = 'carousel-item'; item.style.transform = `rotateY(${i * angleStep}deg) translateZ(${radius}px)`; item.dataset.index = i; item.dataset.topic = communicationRecords[i].topic; const img = document.createElement('img'); // 使用优化后的图片ID,确保每张图片都有意义 img.src = `https://picsum.photos/id/${communicationRecords[i].imageId}/600/800`; img.alt = communicationRecords[i].title; const info = document.createElement('div'); info.className = 'carousel-info'; const title = document.createElement('h3'); title.className = 'carousel-title'; title.textContent = communicationRecords[i].title; const desc = document.createElement('p'); desc.className = 'carousel-desc'; desc.textContent = communicationRecords[i].participants.join('、'); info.appendChild(title); info.appendChild(desc); item.appendChild(img); item.appendChild(info); carousel.appendChild(item); item.addEventListener('click', () => { const topic = encodeURIComponent(communicationRecords[i].topic); console.log(`跳转到主题: ${topic}`); item.style.transform = `rotateY(${i * angleStep}deg) translateZ(${radius - 10}px) scale(0.98)`; setTimeout(() => { item.style.transform = `rotateY(${i * angleStep}deg) translateZ(${radius}px)`; // 注意:这里使用了相对路径,实际使用时请根据你的项目结构调整 window.location.href = `./photo-wall.html?topic=${topic}`; }, 150); }); } } function createActivityList() { const activityList = document.querySelector('.activity-list'); activityList.innerHTML = ''; currentMonthActivities.forEach(activity => { const activityItem = document.createElement('div'); activityItem.className = 'activity-item'; const dateElement = document.createElement('div'); dateElement.className = 'activity-date'; dateElement.textContent = activity.date; const titleElement = document.createElement('h3'); titleElement.className = 'text-lg font-semibold mt-1'; titleElement.textContent = activity.title; const typeElement = document.createElement('div'); typeElement.className = 'text-sm text-blue-400 mt-1'; typeElement.textContent = activity.type; const locationElement = document.createElement('div'); locationElement.className = 'text-sm text-gray-300 mt-1'; locationElement.innerHTML = ` ${activity.location}`; const participantsElement = document.createElement('div'); participantsElement.className = 'text-sm text-gray-300 mt-1'; participantsElement.innerHTML = ` ${activity.participants}`; activityItem.appendChild(dateElement); activityItem.appendChild(titleElement); activityItem.appendChild(typeElement); activityItem.appendChild(locationElement); activityItem.appendChild(participantsElement); activityList.appendChild(activityItem); }); } function rotateCarousel(angle) { carousel.style.transform = `rotateY(${angle}deg)`; } prevBtn.addEventListener('click', () => { currentAngle += angleStep; rotateCarousel(currentAngle); }); nextBtn.addEventListener('click', () => { currentAngle -= angleStep; rotateCarousel(currentAngle); }); let isDragging = false; let startX, startRotation; document.addEventListener('mousedown', (e) => { if (!e.target.closest('.carousel-item')) { isDragging = true; startX = e.clientX; startRotation = currentAngle; document.body.style.cursor = 'grabbing'; } }); document.addEventListener('mousemove', (e) => { if (!isDragging) return; const diffX = e.clientX - startX; currentAngle = startRotation - diffX * 0.5; rotateCarousel(currentAngle); }); document.addEventListener('mouseup', () => { isDragging = false; document.body.style.cursor = 'default'; }); activityBtn.addEventListener('click', () => { createActivityList(); activityModal.style.display = 'block'; }); closeBtn.addEventListener('click', () => { activityModal.style.display = 'none'; }); window.addEventListener('click', (e) => { if (e.target === activityModal) { activityModal.style.display = 'none'; } }); createCarouselItems(); rotateCarousel(currentAngle); }); </script> </body> </html> 检查代码中存在的问题

filetype

<label class="col-sm-2 control-label"> 设置类型:</label>
<label class="radio-inline i-checks"> <input name="type" type="radio" value="byPersonnel" th:text="按人员设置" th:checked="true"> </label> <label class="radio-inline i-checks"> <input name="type" type="radio" value="byCategory" th:text="按分类设置"> </label>
我想给这个设置类型代码加一个选择事件,选择人员设置显示
这块代码,如果选择分类设置显示
<label class="col-sm-3 control-label">* 选择分类:</label>
<select id="productId" name="productId" class="form-control" > <option th:value="" disabled selected hidden="hidden">请选择分类</option> <option th:value="boarder">住宿生</option> <option th:value="extern">走读生</option> <option th:value="faculty">教职工</option> </select>
这块代码,该怎么弄

RobbinLong
  • 粉丝: 6
上传资源 快速赚钱