feat: 体重管理模块页面更新,新增人员测量记录/概览记录页面

This commit is contained in:
liuyunqin
2026-08-07 17:12:40 +08:00
parent d28f71ef9f
commit fdeb8a2d09
46 changed files with 4246 additions and 867 deletions
+12 -6
View File
@@ -65,13 +65,19 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
</div>
<div class="scroll-content">
<!-- [交互] 紧急联系人入口,跳转 emergency-contacts.html -->
<div class="app-record" onclick="location.href='emergency-contacts.html'" style="cursor:pointer;">
<span class="app-record__label">🆘 紧急联系人</span>
<svg width="7" height="12" viewBox="0 0 7 12" fill="none" stroke="#ccc" stroke-width="1.5"><path d="M1 1l5 5-5 5"/></svg>
</div>
<!-- [交互] 紧急联系人入口,跳转 emergency-contacts.html -->
<div class="app-record" onclick="location.href='emergency-contacts.html'" style="cursor:pointer;">
<span class="app-record__label">🆘 紧急联系人</span>
<svg width="7" height="12" viewBox="0 0 7 12" fill="none" stroke="#ccc" stroke-width="1.5"><path d="M1 1l5 5-5 5"/></svg>
</div>
<!-- 功能菜单 -->
<!-- [交互] 健康画像入口,跳转 health-profile.html -->
<div class="app-record" onclick="location.href='health-profile.html'" style="cursor:pointer;">
<span class="app-record__label">🩺 健康画像</span>
<svg width="7" height="12" viewBox="0 0 7 12" fill="none" stroke="#ccc" stroke-width="1.5"><path d="M1 1l5 5-5 5"/></svg>
</div>
<!-- 功能菜单 -->
<div style="margin:12px 16px 0;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,0.05);">
<!-- [交互] 应用记录 -->
<div style="display:flex;align-items:center;padding:16px;cursor:pointer;border-bottom:1px solid #f5f5f5;">
@@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>应急就医 - 正在应急 | 健康CQ原型</title>
<style>
html,body{height:100%;overflow:hidden;}
/* 全局重置 */
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;background:#F5F7FA;color:#333;min-width:1280px;}
@@ -17,6 +18,23 @@
.top-bar__right{display:flex;align-items:center;gap:16px;color:rgba(255,255,255,0.65);font-size:var(--font-sm);margin-left:auto;}
.btn-back{color:rgba(255,255,255,0.65);cursor:pointer;display:flex;align-items:center;gap:4px;text-decoration:none;}
.btn-back:hover{color:#fff;}
/* 救护车支援横幅 */
.amb-banner{display:none;align-items:center;height:48px;padding:0 24px;background:linear-gradient(90deg,#FFF7E6,#FFFBE6);border-bottom:2px solid #FFD666;gap:16px;font-size:var(--font-sm);flex-shrink:0;}
.amb-banner.show{display:flex;}
.amb-banner__icon{display:flex;align-items:center;gap:6px;color:var(--warning);font-weight:600;white-space:nowrap;}
.amb-banner__icon svg{width:22px;height:22px;animation:ambBounce 0.6s ease-in-out infinite;}
@keyframes ambBounce{0%,100%{transform:translateY(0);}50%{transform:translateY(-3px);}}
.amb-banner__info{display:flex;align-items:center;gap:20px;flex:1;color:var(--text-secondary);font-size:var(--font-xs);}
.amb-banner__info strong{color:var(--text-primary);}
.amb-banner__eta{display:flex;align-items:center;gap:8px;margin-left:auto;}
.amb-banner__eta-time{font-size:var(--font-xl);font-weight:700;color:var(--warning);min-width:70px;text-align:right;}
.amb-banner__eta-label{font-size:var(--font-xs);color:var(--text-placeholder);}
/* 救护车地图标记 */
.amb-track-marker{position:absolute;z-index:13;transform:translate(-50%,-100%);transition:left 2s linear,top 2s linear;pointer-events:none;}
.amb-track-marker__pin{width:32px;height:40px;filter:drop-shadow(0 2px 4px rgba(0,0,0,0.3));}
.amb-track-marker__label{position:absolute;top:-22px;left:50%;transform:translateX(-50%);white-space:nowrap;
font-size:9px;font-weight:600;background:rgba(250,173,20,0.9);color:#fff;padding:2px 8px;border-radius:10px;}
.amb-track-route{stroke:#FAAD14;stroke-width:0.5;stroke-dasharray:4,3;opacity:0.7;}
.avatar{width:32px;height:32px;border-radius:50%;background:#1890FF;display:flex;align-items:center;justify-content:center;color:#fff;font-size:var(--font-sm);}
.top-bar__nav{display:flex;align-items:center;gap:4px;flex:1;}
.top-bar__nav a{color:rgba(255,255,255,0.65);text-decoration:none;padding:6px 16px;border-radius:var(--radius-sm);font-size:var(--font-sm);transition:all .2s;}
@@ -24,6 +42,7 @@
.top-bar__nav a.active{color:#fff;background:var(--primary);}
/* 主内容区 - IM布局 */
.main{margin-top:56px;height:calc(100vh - 56px);display:flex;overflow:hidden;}
.main--with-banner{height:calc(100vh - 56px - 48px);}
/* IM左侧面板 */
.im-left{width:320px;background:#fff;border-right:1px solid var(--border);display:flex;flex-direction:column;flex-shrink:0;}
.im-left__search{padding:16px;border-bottom:1px solid var(--border);}
@@ -38,7 +57,11 @@
.contact-item{display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;transition:background .15s;border-bottom:1px solid #f5f5f5;position:relative;}
.contact-item:hover{background:#F8FBFF;}
.contact-item.active{background:var(--primary-light);}
.contact-avatar{width:40px;height:40px;border-radius:50%;background:#E6F7FF;display:flex;align-items:center;justify-content:center;color:var(--primary);font-size:var(--font-sm);font-weight:500;flex-shrink:0;}
.contact-avatar{width:40px;height:40px;position:relative;flex-shrink:0;}
.contact-avatar__img{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:10px;font-weight:500;position:absolute;border:2px solid #fff;box-sizing:border-box;}
.contact-avatar__img:nth-child(1){top:0;left:50%;transform:translateX(-50%);z-index:3;}
.contact-avatar__img:nth-child(2){bottom:0;left:0;z-index:2;}
.contact-avatar__img:nth-child(3){bottom:0;right:0;z-index:1;}
.contact-info{flex:1;min-width:0;}
.contact-info__top{display:flex;align-items:center;justify-content:space-between;}
.contact-name{font-size:var(--font-sm);font-weight:500;color:var(--text-primary);}
@@ -47,11 +70,12 @@
.contact-msg{font-size:var(--font-xs);color:var(--text-secondary);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.contact-badge{position:absolute;top:12px;right:16px;width:18px;height:18px;border-radius:50%;background:var(--danger);color:#fff;font-size:10px;display:flex;align-items:center;justify-content:center;}
/* IM右侧面板 */
.im-right{flex:1;display:flex;flex-direction:column;background:#fff;min-width:0;border-right:1px solid var(--border);}
.im-right{width:800px;display:flex;flex-direction:column;background:#fff;min-width:0;border-right:1px solid var(--border);flex-shrink:0;}
.im-right__header{padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;}
.im-right__patient{display:flex;align-items:center;gap:16px;}
.im-right__patient{display:flex;flex-direction:column;gap:2px;}
.im-right__patient-name{font-size:var(--font-base);font-weight:600;}
.im-right__patient-info{font-size:var(--font-xs);color:var(--text-secondary);}
.im-right__patient-basic{font-weight:400;color:var(--text-secondary);font-size:var(--font-xs);margin-left:8px;}
.im-right__patient-dept{font-size:var(--font-xs);color:var(--text-secondary);}
/* 聊天消息区 */
.im-right__messages{flex:1;overflow-y:auto;padding:20px 24px;background:#F9FAFB;}
.chat-time{font-size:var(--font-xs);color:var(--text-placeholder);text-align:center;margin:16px 0 12px;}
@@ -230,48 +254,67 @@
.end-card__icon svg{width:24px;height:24px;}
.end-card__text{font-size:var(--font-base);color:var(--text-primary);font-weight:600;margin-top:4px;}
.end-card__time{font-size:var(--font-xs);color:var(--text-secondary);}
/* 右侧值班面板 */
.duty-panel{width:320px;flex-shrink:0;background:#fff;display:flex;flex-direction:column;overflow-y:auto;}
.duty-panel__title{padding:16px 16px 12px;font-size:var(--font-sm);font-weight:600;color:var(--text-primary);border-bottom:1px solid var(--border);}
.duty-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px 16px;}
.duty-stat{background:#FAFAFA;border-radius:var(--radius-md);padding:12px;text-align:center;border:1px solid #f0f0f0;}
.duty-stat__value{font-size:var(--font-xl);font-weight:700;color:var(--primary);line-height:1.2;}
.duty-stat__value--danger{color:var(--danger);}
.duty-stat__value--success{color:var(--success);}
.duty-stat__value--warning{color:var(--warning);}
.duty-stat__label{font-size:var(--font-xs);color:var(--text-secondary);margin-top:4px;}
.duty-stat__unit{font-size:var(--font-xs);color:var(--text-placeholder);}
.duty-calendar{padding:12px 16px 16px;}
.cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.cal-header__month{font-size:var(--font-sm);font-weight:600;color:var(--text-primary);}
.cal-header__nav{display:flex;gap:4px;}
.cal-header__btn{width:24px;height:24px;border:1px solid var(--border);border-radius:var(--radius-sm);background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text-secondary);font-size:12px;transition:all .15s;}
.cal-header__btn:hover{border-color:var(--primary);color:var(--primary);}
.cal-week{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:var(--font-xs);color:var(--text-placeholder);margin-bottom:4px;}
.cal-week span{padding:4px 0;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;gap:2px;}
.cal-day{position:relative;padding:5px 0;font-size:var(--font-xs);color:var(--text-primary);border-radius:var(--radius-sm);cursor:default;line-height:1;width:32px;height:32px;display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0 auto;}
.cal-day--other{color:var(--text-placeholder);}
.cal-day--duty{background:#E6F7FF;border:1px solid #BAE7FF;border-radius:var(--radius-sm);color:var(--primary);font-weight:500;}
.cal-day--today{background:var(--primary);color:#fff;border-radius:var(--radius-sm);font-weight:600;border:none;}
.cal-day--today.cal-day--duty{background:var(--primary);color:#fff;border:none;}
.cal-day--today .cal-dot{background:#fff;}
.cal-dot{width:4px;height:4px;border-radius:50%;background:var(--primary);margin:2px auto 0;display:block;}
.cal-day--duty .cal-dot{background:var(--primary);}
.cal-day--today .cal-dot{background:#fff;}
.cal-day--selected{background:#BAE7FF;border:1px solid var(--primary);border-radius:var(--radius-sm);color:var(--primary);font-weight:600;cursor:pointer;}
.cal-day--today.cal-day--selected{background:var(--primary);color:#fff;border:none;}
.cal-legend{display:flex;align-items:center;gap:16px;padding:8px 16px 0;font-size:var(--font-xs);color:var(--text-secondary);}
.cal-legend__item{display:flex;align-items:center;gap:4px;}
.cal-legend__dot{width:8px;height:8px;border-radius:50%;}
.cal-legend__dot--today{background:var(--primary);}
.cal-legend__dot--duty{background:#91D5FF;}
.duty-detail{padding:0 16px 16px;}
.duty-detail__title{font-size:var(--font-xs);color:var(--text-secondary);margin-bottom:8px;}
.duty-detail__item{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#FAFAFA;border-radius:var(--radius-sm);margin-bottom:6px;font-size:var(--font-xs);}
.duty-detail__avatar{width:28px;height:28px;border-radius:50%;background:var(--primary-light);color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:500;flex-shrink:0;}
.duty-detail__name{color:var(--text-primary);font-weight:500;}
.duty-detail__role{color:var(--text-placeholder);margin-left:auto;}
/* 右侧地图面板 */
.map-panel{flex:1;background:#fff;display:flex;flex-direction:column;overflow:hidden;min-width:0;position:relative;}
.map-panel__map-area{flex:1;position:relative;overflow:hidden;background:#E8F4FD;}
.map-panel__info{position:absolute;bottom:0;left:0;right:0;padding:6px 14px;font-size:var(--font-xs);display:flex;flex-wrap:wrap;gap:2px 16px;background:rgba(255,255,255,0.92);backdrop-filter:blur(4px);border-top:1px solid var(--border);z-index:10;}
/* 资源抽屉 */
.map-drawer{position:absolute;top:0;right:0;bottom:0;width:280px;background:#fff;box-shadow:-2px 0 12px rgba(0,0,0,0.12);z-index:20;display:flex;flex-direction:column;transform:translateX(100%);transition:transform 0.3s ease;}
.map-drawer.open{transform:translateX(0);}
.map-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border);flex-shrink:0;}
.map-drawer__title{font-size:var(--font-sm);font-weight:600;}
.map-drawer__close{width:28px;height:28px;border-radius:50%;background:rgba(0,0,0,0.04);border:none;font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#999;transition:all .15s;font-weight:700;line-height:1;}
.map-drawer__close:hover{background:rgba(0,0,0,0.08);color:#333;}
.map-drawer__body{flex:1;display:flex;flex-direction:column;overflow:hidden;}
.map-drawer__res-list{flex:1;overflow-y:auto;padding:0 12px 10px;}
/* 抽屉触发按钮 */
.map-drawer-toggle{position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:18;width:28px;height:64px;background:rgba(0,0,0,0.4);color:#fff;border:none;border-radius:6px 0 0 6px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;transition:all 0.2s;}
.map-drawer-toggle:hover{background:rgba(0,0,0,0.55);width:32px;}
.map-drawer-toggle.hidden{display:none;}
/* 地图上救护车支援卡片 */
.map-amb-card{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:19;display:none;
background:#fff;border:2px solid #FFD666;border-radius:var(--radius-md);padding:10px 16px;
box-shadow:0 3px 12px rgba(0,0,0,0.12);min-width:280px;animation:ambCardIn .3s ease;}
.map-amb-card.show{display:flex;align-items:center;gap:14px;}
@keyframes ambCardIn{0%{opacity:0;transform:translateX(-50%) translateY(-8px);}100%{opacity:1;transform:translateX(-50%) translateY(0);}}
.map-amb-card__icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:#FFF7E6;flex-shrink:0;}
.map-amb-card__icon svg{width:20px;height:20px;color:var(--warning);}
.map-amb-card__body{flex:1;min-width:0;}
.map-amb-card__title{font-size:var(--font-sm);font-weight:600;color:var(--text-primary);margin-bottom:2px;}
.map-amb-card__info{font-size:var(--font-xs);color:var(--text-secondary);line-height:1.5;}
.map-amb-card__info b{color:var(--text-primary);}
.map-amb-card__eta{text-align:center;flex-shrink:0;}
.map-amb-card__eta-time{font-size:18px;font-weight:700;color:var(--warning);line-height:1;}
.map-amb-card__eta-label{font-size:10px;color:var(--text-placeholder);margin-top:2px;}
/* 路线规划 */
.route-overlay{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:15;}
.route-line{stroke-dasharray:6,3;animation:dashMove 0.6s linear infinite;}
@keyframes dashMove{to{stroke-dashoffset:-9;}}
.route-mid-label{position:absolute;font-size:10px;background:rgba(24,144,255,0.92);color:#fff;padding:3px 8px;border-radius:10px;white-space:nowrap;transform:translate(-50%,-50%);pointer-events:none;z-index:16;box-shadow:0 1px 4px rgba(0,0,0,0.18);}
.route-end-icon{position:absolute;z-index:14;transform:translate(-50%,-50%);pointer-events:none;display:none;}
.route-end-icon.show{display:block;}
.res-marker--clickable{cursor:pointer;}
/* 标记弹出气泡 */
.marker-popup{position:absolute;z-index:25;display:none;
background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);
padding:12px 16px;min-width:180px;max-width:240px;pointer-events:none;
box-shadow:0 4px 16px rgba(0,0,0,0.15);transform:translate(-50%,-100%);}
.marker-popup::after{content:'';position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);
width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;
border-top:6px solid #fff;}
.marker-popup--show{display:block;animation:popupIn .2s ease;}
@keyframes popupIn{0%{opacity:0;transform:translate(-50%,calc(-100% - 6px));}100%{opacity:1;transform:translate(-50%,-100%);}}
.marker-popup--below{transform:translate(-50%,0);}
.marker-popup--below::after{top:-6px;bottom:auto;border-top:none;border-bottom:6px solid #fff;}
.marker-popup--below.marker-popup--show{animation:popupInBelow .2s ease;}
@keyframes popupInBelow{0%{opacity:0;transform:translate(-50%,6px);}100%{opacity:1;transform:translate(-50%,0);}}
.marker-popup__name{font-size:var(--font-sm);font-weight:600;color:var(--text-primary);margin-bottom:4px;}
.marker-popup__cat{font-size:var(--font-xs);color:var(--text-secondary);margin-bottom:6px;}
.marker-popup__cat span{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;vertical-align:middle;}
.marker-popup__row{font-size:var(--font-xs);color:var(--text-secondary);margin-bottom:2px;display:flex;gap:6px;}
.marker-popup__row-label{color:var(--text-placeholder);flex-shrink:0;}
.marker-popup__row-value{color:var(--text-primary);}
.marker-popup__phone{font-size:var(--font-sm);color:var(--primary);font-weight:600;margin-top:2px;}
</style>
</head>
<body>
@@ -299,61 +342,97 @@
</div>
</div>
<!-- 救护车支援横幅 -->
<div class="amb-banner" id="ambBanner">
<div class="amb-banner__icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="1" y="6" width="15" height="13" rx="1.5"/><path d="M16 11h4l3 4.5v5h-7"/><circle cx="6" cy="20" r="2"/><circle cx="18" cy="20" r="2"/><path d="M9 13v4M7 15h4"/>
</svg>
已派救护车支援
</div>
<div class="amb-banner__info">
<span>车牌 <strong id="ambBannerPlate">--</strong></span>
<span>驾驶人 <strong id="ambBannerDriver">--</strong></span>
<span>医院 <strong id="ambBannerHospital">--</strong></span>
<span>电话 <strong style="color:var(--primary);" id="ambBannerTel">--</strong></span>
</div>
<div class="amb-banner__eta">
<span class="amb-banner__eta-label">预计到达时间</span>
<span class="amb-banner__eta-time" id="ambBannerEta">--</span>
</div>
</div>
<!-- 主内容区:IM对话界面 -->
<main class="main">
<!-- 左侧联系人面板 -->
<div class="im-left">
<div class="im-left__search">
<div class="im-left__search-row">
<input type="text" placeholder="搜索应急员">
<input type="text" placeholder="搜索应急员">
<button class="btn-refresh" title="刷新列表" onclick="this.classList.add('spinning');var b=this;setTimeout(function(){b.classList.remove('spinning')},500)">
<svg viewBox="0 0 16 16" fill="none"><path d="M13.5 8a5.5 5.5 0 1 1-1.3-3.6" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.5 2.5v3h-3" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
</button>
</div>
</div>
<div class="im-left__list">
<div class="contact-item active">
<div class="contact-avatar"></div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">张伟 <span>男 45岁</span></div>
<div class="contact-time">09:15</div>
</div>
<div class="contact-msg">我现在胸口很闷,呼吸困难...</div>
</div>
</div>
<div class="contact-item">
<div class="contact-avatar"></div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">李明 <span>男 38岁</span></div>
<div class="contact-time">09:02</div>
</div>
<div class="contact-msg">头部受伤,有流血情况</div>
</div>
<div class="contact-badge">2</div>
</div>
<div class="contact-item">
<div class="contact-avatar"></div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">王芳 <span>女 52岁</span></div>
<div class="contact-time">08:45</div>
</div>
<div class="contact-msg">好的,我已经按照您说的做了</div>
</div>
</div>
<div class="contact-item">
<div class="contact-avatar"></div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">赵刚 <span>男 29岁</span></div>
<div class="contact-time">08:30</div>
</div>
<div class="contact-msg">现在感觉好一些了</div>
</div>
<div class="contact-badge">5</div>
</div>
<div class="contact-item active">
<div class="contact-avatar">
<div class="contact-avatar__img" style="background:#1890FF;"></div>
<div class="contact-avatar__img" style="background:#52C41A;"></div>
<div class="contact-avatar__img" style="background:#FAAD14;"></div>
</div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">张伟 <span>男 45岁</span></div>
<div class="contact-time">09:15</div>
</div>
<div class="contact-msg">我现在胸口很闷,呼吸困难...</div>
</div>
</div>
<div class="contact-item">
<div class="contact-avatar">
<div class="contact-avatar__img" style="background:#1890FF;"></div>
<div class="contact-avatar__img" style="background:#52C41A;"></div>
<div class="contact-avatar__img" style="background:#FF4D4F;"></div>
</div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">李明 <span>男 38岁</span></div>
<div class="contact-time">09:02</div>
</div>
<div class="contact-msg">头部受伤,有流血情况</div>
</div>
<div class="contact-badge">2</div>
</div>
<div class="contact-item">
<div class="contact-avatar">
<div class="contact-avatar__img" style="background:#1890FF;"></div>
<div class="contact-avatar__img" style="background:#52C41A;"></div>
<div class="contact-avatar__img" style="background:#722ED1;"></div>
</div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">王芳 <span>女 52岁</span></div>
<div class="contact-time">08:45</div>
</div>
<div class="contact-msg">好的,我已经按照您说的做了</div>
</div>
</div>
<div class="contact-item">
<div class="contact-avatar">
<div class="contact-avatar__img" style="background:#1890FF;"></div>
<div class="contact-avatar__img" style="background:#52C41A;"></div>
<div class="contact-avatar__img" style="background:#FF4D4F;"></div>
</div>
<div class="contact-info">
<div class="contact-info__top">
<div class="contact-name">赵刚 <span>男 29岁</span></div>
<div class="contact-time">08:30</div>
</div>
<div class="contact-msg">现在感觉好一些了</div>
</div>
<div class="contact-badge">5</div>
</div>
</div>
</div>
@@ -362,8 +441,8 @@
<!-- 患者信息栏 -->
<div class="im-right__header">
<div class="im-right__patient">
<div class="im-right__patient-name">张伟</div>
<div class="im-right__patient-info">男 45岁 | 员工编号: EMP001 | 采油一厂 · 生产部</div>
<div class="im-right__patient-name">张伟 <span class="im-right__patient-basic">男 45岁 | 员工编号: EMP001</span></div>
<div class="im-right__patient-dept">采油一厂 · 生产部</div>
</div>
<div style="display:flex;gap:8px;flex-shrink:0;">
<button class="btn btn-warning btn-sm" onclick="openDispatch()">
@@ -435,7 +514,7 @@
<!-- 操作按钮行 -->
<div class="im-right__actions">
<button class="btn btn-default" onclick="document.getElementById('mapModal').classList.add('open');document.body.style.overflow='hidden'">查看员工求助位置</button>
<button class="btn btn-default" onclick="document.getElementById('mapModal').classList.add('open');document.body.style.overflow='hidden'" style="display:none;">查看员工求助位置</button>
<!-- <button class="btn btn-default" onclick="alert('【交互说明】查看应急详情')">应急详情</button>-->
<!-- <button class="btn btn-default" onclick="alert('【交互说明】查看员工档案')">员工档案</button>-->
</div>
@@ -467,61 +546,122 @@
</div>
</div>
<!-- 右侧值班面板 -->
<div class="duty-panel">
<div class="duty-panel__title">值班信息</div>
<div class="duty-stats">
<div class="duty-stat">
<div class="duty-stat__value duty-stat__value--danger">3</div>
<div class="duty-stat__label">当日应急人数</div>
<!-- <div class="duty-stat__unit">人</div>-->
<!-- 右侧地图面板 -->
<div class="map-panel">
<div class="map-panel__map-area" id="inlineMapArea">
<div class="map-grid"></div>
<div class="map-road map-road--h" style="top:35%"></div>
<div class="map-road map-road--h" style="top:65%"></div>
<div class="map-road map-road--v" style="left:30%"></div>
<div class="map-road map-road--v" style="left:70%"></div>
<div class="map-building" style="top:12%;left:8%;width:80px;height:50px;">住宅区</div>
<div class="map-building" style="top:40%;left:35%;width:100px;height:60px;">采油一厂<br>办公楼</div>
<div class="map-building" style="top:15%;left:55%;width:70px;height:45px;">食堂</div>
<div class="map-building" style="top:70%;left:60%;width:90px;height:50px;">设备库房</div>
<div class="map-building" style="top:72%;left:12%;width:75px;height:45px;">宿舍楼</div>
<div class="map-label" style="top:32%;left:42%;">CQ大道</div>
<div class="map-label" style="top:62%;left:15%;">兴隆路</div>
<div class="map-label" style="top:18%;left:28%;transform:rotate(90deg);">能源北路</div>
<!-- 员工位置 -->
<div class="map-pin" style="top:42%;left:52%;"></div>
<!-- 救护车实时位置 -->
<div class="amb-track-marker" id="ambTrackMarker" style="top:15%;left:65%;display:none;">
<svg class="amb-track-marker__pin" viewBox="0 0 32 40" fill="none">
<path d="M16 1C8.8 1 3 6.3 3 13c0 11 13 26 13 26s13-15 13-26c0-6.7-5.8-12-12-12z" fill="#FAAD14" stroke="#fff" stroke-width="1.5"/>
<rect x="8" y="11" width="16" height="9" rx="2" fill="#fff"/>
<path d="M10 14h2M20 14h2" stroke="#FAAD14" stroke-width="1.5"/>
<path d="M14 16h4" stroke="#FAAD14" stroke-width="1"/>
</svg>
<div class="amb-track-marker__label">🚑 赶往中</div>
</div>
<div class="duty-stat">
<div class="duty-stat__value">47</div>
<div class="duty-stat__label">当月应急人数</div>
<!-- <div class="duty-stat__unit">人</div>-->
</div>
<div class="duty-stat">
<div class="duty-stat__value duty-stat__value--success">96.8%</div>
<div class="duty-stat__label">应急响应及时率</div>
</div>
<div class="duty-stat">
<div class="duty-stat__value duty-stat__value--warning">91.5%</div>
<div class="duty-stat__label">应急任务完成率</div>
</div>
</div>
<div class="duty-calendar">
<div class="cal-header">
<span class="cal-header__month" id="calMonth"></span>
<div class="cal-header__nav">
<button class="cal-header__btn" onclick="changeMonth(-1)"></button>
<button class="cal-header__btn" onclick="changeMonth(1)"></button>
<!-- 地图上救护车支援卡片 -->
<div class="map-amb-card" id="mapAmbCard">
<div class="map-amb-card__icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="1" y="6" width="15" height="13" rx="1.5"/><path d="M16 11h4l3 4.5v5h-7"/><circle cx="6" cy="20" r="2"/><circle cx="18" cy="20" r="2"/><path d="M9 13v4M7 15h4"/>
</svg>
</div>
<div class="map-amb-card__body">
<div class="map-amb-card__title">已派救护车支援</div>
<div class="map-amb-card__info" id="mapAmbCardInfo"></div>
</div>
<div class="map-amb-card__eta">
<div class="map-amb-card__eta-time" id="mapAmbCardEta">--</div>
<div class="map-amb-card__eta-label">预计到达</div>
</div>
</div>
<div class="cal-week"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div>
<div class="cal-grid" id="calGrid"></div>
<div class="cal-legend">
<div class="cal-legend__item"><span class="cal-legend__dot cal-legend__dot--today"></span>今天</div>
<div class="cal-legend__item"><span class="cal-legend__dot cal-legend__dot--duty"></span>排班日</div>
<!-- 资源标记容器 -->
<div id="inlineResMarkers"></div>
<!-- 路线SVG -->
<svg class="route-overlay" id="routeOverlay" viewBox="0 0 100 100" preserveAspectRatio="none"></svg>
<!-- 标记气泡 -->
<div class="marker-popup" id="markerPopup">
<div class="marker-popup__name" id="popupName"></div>
<div class="marker-popup__cat" id="popupCat"></div>
<div class="marker-popup__row"><span class="marker-popup__row-label">所属单位</span><span class="marker-popup__row-value" id="popupUnit"></span></div>
<div class="marker-popup__row"><span class="marker-popup__row-label">详细地址</span><span class="marker-popup__row-value" id="popupAddr"></span></div>
<div class="marker-popup__row"><span class="marker-popup__row-label">联系电话</span><span class="marker-popup__phone" id="popupPhone"></span></div>
<div class="marker-popup__row" id="popupRowExtra" style="display:none;"><span class="marker-popup__row-label" id="popupExtraLabel"></span><span class="marker-popup__row-value" id="popupExtraVal"></span></div>
</div>
</div>
<!-- 今日值班详情 -->
<div class="duty-detail">
<div class="duty-detail__title">今日值班人员</div>
<div class="duty-detail__item">
<div class="duty-detail__avatar"></div>
<span class="duty-detail__name">李想</span>
<span class="duty-detail__role">操作人员</span>
<!-- 员工信息(地图底部浮层) -->
<div class="map-panel__info">
<span style="font-weight:600;">张伟</span>
<span style="color:var(--text-secondary);">男·45岁</span>
<span style="color:var(--text-placeholder);">采油一厂3号楼办公室</span>
<span style="color:var(--danger);margin-left:auto;">● 求助中</span>
</div>
<div class="duty-detail__item">
<div class="duty-detail__avatar"></div>
<span class="duty-detail__name">陈旭 · 主治医师</span>
<span class="duty-detail__role">专业人员</span>
</div>
<div class="duty-detail__item">
<div class="duty-detail__avatar"></div>
<span class="duty-detail__name">王旭</span>
<span class="duty-detail__role">操作人员</span>
<!-- 资源抽屉触发按钮 -->
<button class="map-drawer-toggle" id="mapDrawerToggle" onclick="toggleDrawer()" title="附近医疗资源"></button>
<!-- 资源抽屉 -->
<div class="map-drawer" id="mapDrawer">
<div class="map-drawer__header">
<span class="map-drawer__title">附近医疗资源</span>
<button class="map-drawer__close" onclick="closeDrawer()" title="收起"></button>
</div>
<div class="map-drawer__body">
<div class="res-panel__tabs" style="padding:8px 12px 8px;flex-shrink:0;">
<span class="res-tab active" onclick="switchInlineTab('all',this)">全部资源</span>
<span class="res-tab" onclick="switchInlineTab('hospital',this)">医院</span>
<span class="res-tab" onclick="switchInlineTab('clinic',this)">医疗点</span>
<span class="res-tab" onclick="switchInlineTab('ambulance',this)">救护车</span>
<span class="res-tab" onclick="switchInlineTab('aed',this)">AED</span>
<span class="res-tab" onclick="switchInlineTab('kit',this)">急救包</span>
</div>
<div class="map-drawer__res-list" id="inlineResList">
<div class="res-card" data-res="hospital" data-key="hospital1" data-pos="22%;78%" data-label="CQ能源职工医院" data-color="#1890FF" data-dist="1.2 km" data-eta="约5分钟" onclick="onResCardClick(this)">
<div class="res-card__img"><svg viewBox="0 0 24 24" fill="none"><path d="M3 21V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14" stroke="currentColor" stroke-width="1.5"/><path d="M9 21V13h6v8" stroke="currentColor" stroke-width="1.5"/><path d="M12 5v4M10 7h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">CQ能源职工医院</div><div class="res-card__unit">CQ能源分公司</div><div class="res-card__dist">距离 1.2 km</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:029-86831120">029-86831120</a></div><div class="res-card__addr">西安市未央区CQ路68号</div></div>
</div>
<div class="res-card" data-res="hospital" data-key="hospital2" data-pos="80%;20%" data-label="采油一厂卫生所" data-color="#1890FF" data-dist="0.3 km" data-eta="约1分钟" onclick="onResCardClick(this)">
<div class="res-card__img"><svg viewBox="0 0 24 24" fill="none"><path d="M3 21V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14" stroke="currentColor" stroke-width="1.5"/><path d="M9 21V13h6v8" stroke="currentColor" stroke-width="1.5"/><path d="M12 5v4M10 7h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">采油一厂卫生所</div><div class="res-card__unit">采油一厂</div><div class="res-card__dist">距离 0.3 km</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:029-86835678">029-86835678</a></div><div class="res-card__addr">采油一厂生活区A栋1层</div></div>
</div>
<div class="res-card" data-res="hospital" data-key="partner1" data-pos="8%;88%" data-label="西安交大一附院" data-color="#722ED1" data-dist="8.5 km" data-eta="约25分钟" onclick="onResCardClick(this)">
<div class="res-card__img"><svg viewBox="0 0 24 24" fill="none"><path d="M3 21V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14" stroke="currentColor" stroke-width="1.5"/><path d="M9 21V13h6v8" stroke="currentColor" stroke-width="1.5"/><path d="M12 5v4M10 7h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">西安交通大学第一附属医院</div><div class="res-card__unit">西安交大医学部</div><div class="res-card__dist">距离 8.5 km</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:029-85323112">029-85323112</a></div><div class="res-card__addr">西安市雁塔区雁塔西路277号</div></div>
</div>
<div class="res-card" data-res="hospital" data-key="partner2" data-pos="88%;85%" data-label="陕西省人民医院" data-color="#722ED1" data-dist="12.3 km" data-eta="约35分钟" onclick="onResCardClick(this)">
<div class="res-card__img"><svg viewBox="0 0 24 24" fill="none"><path d="M3 21V7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14" stroke="currentColor" stroke-width="1.5"/><path d="M9 21V13h6v8" stroke="currentColor" stroke-width="1.5"/><path d="M12 5v4M10 7h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">陕西省人民医院</div><div class="res-card__unit">陕西省卫健委</div><div class="res-card__dist">距离 12.3 km</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:029-85251331">029-85251331</a></div><div class="res-card__addr">西安市碑林区友谊西路256号</div></div>
</div>
<div class="res-card" data-res="ambulance" data-key="ambulance1" data-pos="30%;62%" data-label="陕A·120-03" data-color="#FAAD14" data-dist="1.5 km" data-eta="约3分钟" onclick="onResCardClick(this)">
<div class="res-card__img" style="background:#FFF7E6;"><svg viewBox="0 0 24 24" fill="none" style="color:var(--warning);"><rect x="1" y="6" width="15" height="12" rx="1" stroke="currentColor" stroke-width="1.5"/><path d="M16 10h4l3 4v4h-7" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><circle cx="6" cy="19" r="2" stroke="currentColor" stroke-width="1.5"/><circle cx="18" cy="19" r="2" stroke="currentColor" stroke-width="1.5"/><path d="M9 10v4M7 12h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">陕A·120-03 急救车</div><div class="res-card__unit">CQ能源职工医院</div><div class="res-card__dist">距离 1.5 km · 预计3分钟到达</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:13891012003">138-9101-2003</a></div><div class="res-card__addr">当前位置:CQ大道与能源北路交叉口</div></div>
</div>
<div class="res-card" data-res="aed" data-key="aed1" data-pos="47%;42%" data-label="AED-001" data-color="#FF4D4F" data-dist="0.05 km" data-eta="约1分钟" onclick="onResCardClick(this)">
<div class="res-card__img" style="background:#FFF1F0;"><svg viewBox="0 0 24 24" fill="none" style="color:var(--danger);"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">AED-001 办公楼大厅</div><div class="res-card__unit">采油一厂</div><div class="res-card__dist">距离 0.05 km</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:029-86836110">029-86836110</a></div><div class="res-card__addr">采油一厂办公楼1层前台右侧</div></div>
</div>
<div class="res-card" data-res="kit" data-key="kit1" data-pos="40%;48%" data-label="3层急救箱" data-color="#52C41A" data-dist="0.02 km" data-eta="约1分钟" onclick="onResCardClick(this)">
<div class="res-card__img" style="background:#F6FFED;"><svg viewBox="0 0 24 24" fill="none" style="color:var(--success);"><rect x="2" y="6" width="20" height="14" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" stroke="currentColor" stroke-width="1.5"/><path d="M12 10v6M9 13h6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">3层走廊急救箱</div><div class="res-card__unit">采油一厂办公楼</div><div class="res-card__dist">距离 0.02 km</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:029-86836112">029-86836112</a></div><div class="res-card__addr">办公楼3层电梯间旁</div></div>
</div>
<div class="res-card" data-res="clinic" data-key="clinic1" data-pos="48%;40%" data-label="医疗急救站" data-color="#13C2C2" data-dist="0.15 km" data-eta="约1分钟" onclick="onResCardClick(this)">
<div class="res-card__img"><svg viewBox="0 0 24 24" fill="none"><path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg></div>
<div class="res-card__info"><div class="res-card__name">采油一厂医疗急救站</div><div class="res-card__unit">采油一厂安全环保部</div><div class="res-card__dist">距离 0.15 km</div><div class="res-card__tel"><svg viewBox="0 0 12 12" fill="none"><path d="M4.6 5.5a4.8 4.8 0 0 0 1.9 1.9l.6-.6a.5.5 0 0 1 .5-.1c.6.2 1.2.3 1.8.3a.5.5 0 0 1 .5.5v1.8a.5.5 0 0 1-.5.5A8.5 8.5 0 0 1 1 1.4.5.5 0 0 1 1.5 1h1.7a.5.5 0 0 1 .5.5c0 .6.1 1.2.3 1.8a.5.5 0 0 1-.1.5l-.3.7z" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"/></svg><a href="tel:029-86836120">029-86836120</a></div><div class="res-card__addr">采油一厂办公楼1层大厅</div></div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -916,7 +1056,117 @@ function submitAmb(){
dest:document.getElementById('ambDest').value.trim(),remark:document.getElementById('ambRemark').value.trim()};
_ambFormCache=null;
closeAmb();
startAmbTracking();
}
/* 救护车实时追踪 */
var _ambTrackTimer=null;
var _ambTrackStart=null;
var _ambTrackDuration=180000;
var _ambArrivalTime='';
function startAmbTracking(){
if(!_ambData)return;
// 显示顶部横幅
document.getElementById('ambBannerPlate').textContent=_ambData.plate;
document.getElementById('ambBannerDriver').textContent=_ambData.driver;
document.getElementById('ambBannerHospital').textContent=_ambData.org;
document.getElementById('ambBannerTel').textContent=_ambData.driverTel;
document.getElementById('ambBanner').classList.add('show');
document.querySelector('.main').classList.add('main--with-banner');
// 显示地图救护车卡片
document.getElementById('mapAmbCardInfo').innerHTML='<b>'+escapeHtml(_ambData.plate)+'</b> · '+escapeHtml(_ambData.driver)+' · '+escapeHtml(_ambData.org);
document.getElementById('mapAmbCard').classList.add('show');
// 计算ETA
var etaMin=3;
if(_ambData.plate.indexOf('120-01')>=0)etaMin=2;
else if(_ambData.plate.indexOf('120-05')>=0)etaMin=5;
else if(_ambData.plate.indexOf('120-06')>=0)etaMin=8;
_ambTrackDuration=etaMin*60000;
_ambTrackStart=Date.now();
var arrival=new Date(Date.now()+_ambTrackDuration);
_ambArrivalTime=String(arrival.getHours()).padStart(2,'0')+':'+String(arrival.getMinutes()).padStart(2,'0');
// 设置静态到达时间
var etaText='预计 '+_ambArrivalTime+' 到达';
document.getElementById('ambBannerEta').textContent=etaText;
document.getElementById('ambBannerEta').style.color='var(--warning)';
document.getElementById('mapAmbCardEta').textContent=_ambArrivalTime;
document.getElementById('mapAmbCardEta').style.color='var(--warning)';
// 显示救护车标记 + 路线
var marker=document.getElementById('ambTrackMarker');
marker.style.display='';
marker.style.top='15%';marker.style.left='65%';
var empTop=42,empLeft=52;
drawAmbRoute(15,65);
if(_ambTrackTimer)clearInterval(_ambTrackTimer);
_ambTrackTimer=setInterval(function(){
var elapsed=Date.now()-_ambTrackStart;
var progress=Math.min(elapsed/_ambTrackDuration,1);
var curTop=15+(empTop-15)*progress;
var curLeft=65+(empLeft-65)*progress;
marker.style.top=curTop+'%';
marker.style.left=curLeft+'%';
drawAmbRoute(curTop,curLeft);
if(progress>=1){
clearInterval(_ambTrackTimer);_ambTrackTimer=null;
marker.querySelector('.amb-track-marker__label').textContent='🚑 已到达';
document.getElementById('ambBannerEta').textContent='已到达';
document.getElementById('ambBannerEta').style.color='var(--success)';
document.getElementById('mapAmbCardEta').textContent='已到达';
document.getElementById('mapAmbCardEta').style.color='var(--success)';
clearAmbRoute();
addAmbArrivalMsg();
}
},2000);
}
function dismissAmbBanner(){
document.getElementById('ambBanner').classList.remove('show');
document.querySelector('.main').classList.remove('main--with-banner');
document.getElementById('ambTrackMarker').style.display='none';
document.getElementById('mapAmbCard').classList.remove('show');
clearAmbRoute();
if(_ambTrackTimer){clearInterval(_ambTrackTimer);_ambTrackTimer=null;}
}
function dismissMapAmbCard(){
document.getElementById('mapAmbCard').classList.remove('show');
}
/* 救护车路线 */
function drawAmbRoute(ambTop,ambLeft){
var overlay=document.getElementById('routeOverlay');
// 保留已有资源路线,追加救护车路线
var existing=overlay.innerHTML;
// 清除旧救护车路线
existing=existing.replace(/<!--amb-route-->[\s\S]*?<!--\/amb-route-->/g,'');
var empTop=42,empLeft=52;
var ambRoute='<!--amb-route--><line x1="'+ambLeft+'" y1="'+ambTop+'" x2="'+empLeft+'" y2="'+empTop+'" stroke="#FAAD14" stroke-width="0.6" class="amb-track-route"/><!--/amb-route-->';
overlay.innerHTML=existing+ambRoute;
// 救护车路线中点标签
var oldLbl=document.getElementById('ambRouteLabel');
if(oldLbl)oldLbl.remove();
var midTop=((ambTop+empTop)/2).toFixed(1);
var midLeft=((ambLeft+empLeft)/2).toFixed(1);
var lbl=document.createElement('div');
lbl.id='ambRouteLabel';
lbl.className='route-mid-label';
lbl.style.top=midTop+'%';lbl.style.left=midLeft+'%';
lbl.style.background='rgba(250,173,20,0.9)';
lbl.innerHTML='🚑 救护车赶往中';
document.getElementById('inlineMapArea').appendChild(lbl);
}
function clearAmbRoute(){
var overlay=document.getElementById('routeOverlay');
overlay.innerHTML=overlay.innerHTML.replace(/<!--amb-route-->[\s\S]*?<!--\/amb-route-->/g,'');
var lbl=document.getElementById('ambRouteLabel');
if(lbl)lbl.remove();
}
function addAmbArrivalMsg(){
var msgArea=document.querySelector('.im-right__messages');
var now=new Date();
var ts=now.getFullYear()+'-'+String(now.getMonth()+1).padStart(2,'0')+'-'+String(now.getDate()).padStart(2,'0')+' '+String(now.getHours()).padStart(2,'0')+':'+String(now.getMinutes()).padStart(2,'0');
var html='<div class="chat-message right"><div class="chat-avatar">操</div><div class="chat-body"><div class="chat-name">系统通知</div>'
+'<div class="chat-bubble" style="background:#FFF7E6;color:#8C6D00;border:1px solid #FFD666;">🚑 救护车 <b>'+(_ambData?escapeHtml(_ambData.plate):'')+'</b> 已到达现场<br><span style="font-size:11px;">'+ts+'</span></div></div></div>';
msgArea.insertAdjacentHTML('beforeend',html);
msgArea.scrollTop=msgArea.scrollHeight;
}
function escapeHtml(s){var d=document.createElement('div');d.textContent=s;return d.innerHTML;}
function editAmb(){
document.getElementById('ambInfo').style.display='none';
document.getElementById('ambInfoFooter').style.display='none';
@@ -1039,58 +1289,178 @@ function toggleDispatchStatus(){
document.addEventListener('click',function(e){
if(!e.target.closest('#personSelect'))document.getElementById('personDrop').classList.remove('open');
});
/* 月视图日历 */
var _calYear,_calMonth;
var _calSelectedDay=null;
var _dutyDays={2026:{4:[1,2,3,7,8,9,10,14,15,16,17,21,22,23,24,28,29,30],5:[5,6,7,8,9,12,13,14,15,16,19,20,21,22,23,26,27,28,29,30]}};
function initCalendar(){
var d=new Date();_calYear=d.getFullYear();_calMonth=d.getMonth()+1;
renderCalendar();
/* 内嵌地图面板:资源数据 */
var RESOURCE_DATA = {
hospital1: {name:'CQ能源职工医院', cat:'医院', catColor:'#1890FF', unit:'CQ能源分公司', addr:'西安市未央区CQ路68号', phone:'029-86831120', dist:'1.2 km', time:'约5分钟'},
hospital2: {name:'采油一厂卫生所', cat:'医院', catColor:'#1890FF', unit:'采油一厂', addr:'采油一厂生活区A栋1层', phone:'029-86835678', dist:'0.3 km', time:'约1分钟'},
partner1: {name:'西安交通大学第一附属医院', cat:'医院', catColor:'#722ED1', unit:'西安交大医学部', addr:'西安市雁塔区雁塔西路277号', phone:'029-85323112', dist:'8.5 km', time:'约25分钟'},
partner2: {name:'陕西省人民医院', cat:'医院', catColor:'#722ED1', unit:'陕西省卫健委', addr:'西安市碑林区友谊西路256号', phone:'029-85251331', dist:'12.3 km', time:'约35分钟'},
ambulance1:{name:'陕A·120-03 急救车', cat:'救护车', catColor:'#FAAD14', unit:'CQ能源职工医院', addr:'CQ大道与能源北路交叉口', phone:'138-9101-2003', dist:'1.5 km', time:'约3分钟'},
aed1: {name:'AED-001 办公楼大厅', cat:'AED设备', catColor:'#FF4D4F', unit:'采油一厂', addr:'采油一厂办公楼1层前台右侧', phone:'029-86836110', dist:'0.05 km', time:'约1分钟'},
kit1: {name:'3层走廊急救箱', cat:'急救包', catColor:'#52C41A', unit:'采油一厂办公楼', addr:'办公楼3层电梯间旁', phone:'029-86836112', dist:'0.02 km', time:'约1分钟', d1Label:'急救物品', d1:'止血带×5、创可贴×20、碘伏棉签×10、三角巾×2'},
clinic1: {name:'采油一厂医疗急救站', cat:'医疗点', catColor:'#13C2C2', unit:'采油一厂安全环保部', addr:'采油一厂办公楼1层大厅', phone:'029-86836120', dist:'0.15 km', time:'约1分钟'}
};
var _routeCard=null;
var _activeMarkerKey=null;
/* Tab切换:过滤抽屉卡片 */
function switchInlineTab(cat,el){
var tabs=document.querySelectorAll('.map-drawer .res-tab');
tabs.forEach(function(t){t.classList.remove('active');});
el.classList.add('active');
document.querySelectorAll('#inlineResList .res-card').forEach(function(c){
if(cat==='all'){c.style.display='';}
else{c.style.display=c.getAttribute('data-res')===cat?'':'none';}
c.classList.remove('active');
});
// 同步过滤地图标记
renderAllMarkers(cat);
}
function changeMonth(dir){
_calMonth+=dir;
if(_calMonth<1){_calMonth=12;_calYear--;}
if(_calMonth>12){_calMonth=1;_calYear++;}
renderCalendar();
/* 渲染资源标记(可按类型过滤) */
function renderAllMarkers(cat){
cat=cat||'all';
var container=document.getElementById('inlineResMarkers');
container.innerHTML='';
document.querySelectorAll('#inlineResList .res-card').forEach(function(card,i){
if(cat!=='all'&&card.getAttribute('data-res')!==cat)return;
var pos=card.getAttribute('data-pos');if(!pos)return;
var pos=card.getAttribute('data-pos');if(!pos)return;
var parts=pos.split(';');
var color=card.getAttribute('data-color')||'#1890FF';
var label=card.getAttribute('data-label')||'';
var key=card.getAttribute('data-key')||'';
var m=document.createElement('div');
m.className='res-marker res-marker--clickable';
m.style.top=parts[0];m.style.left=parts[1];
m.innerHTML='<svg class="res-marker__pin" viewBox="0 0 28 36" fill="none"><path d="M14 0C6.27 0 0 6.27 0 14c0 10.5 14 22 14 22s14-11.5 14-22C28 6.27 21.73 0 14 0z" fill="'+color+'"/><circle cx="14" cy="14" r="5" fill="#fff"/></svg><div class="res-marker__label">'+label+'</div>';
m.setAttribute('data-key',key);
(function(cardEl,keyVal){m.onclick=function(e){e.stopPropagation();onMarkerClick(cardEl,keyVal);};})(card,key);
container.appendChild(m);
});
}
function renderCalendar(){
document.getElementById('calMonth').textContent=_calYear+'年'+_calMonth+'月';
var grid=document.getElementById('calGrid');grid.innerHTML='';
var firstDay=new Date(_calYear,_calMonth-1,1).getDay();
var daysInMonth=new Date(_calYear,_calMonth,0).getDate();
var prevDays=new Date(_calYear,_calMonth-1,0).getDate();
var today=new Date();var isThisMonth=(_calYear===today.getFullYear()&&_calMonth===today.getMonth()+1);
var duties=(_dutyDays[_calYear]&&_dutyDays[_calYear][_calMonth])||[];
for(var i=firstDay-1;i>=0;i--){
var el=document.createElement('div');el.className='cal-day cal-day--other';el.textContent=prevDays-i;grid.appendChild(el);
/* 标记点击:弹窗 + 路线 */
function onMarkerClick(card,key){
var d=RESOURCE_DATA[key];if(!d)return;
highlightInlineResCardByKey(key);
drawRoute(card);
var marker=document.querySelector('#inlineResMarkers .res-marker[data-key="'+key+'"]');
if(marker)showPopup(marker,d);
_activeMarkerKey=key;
}
function highlightInlineResCardByKey(key){
document.querySelectorAll('#inlineResList .res-card').forEach(function(c){c.classList.remove('active');});
document.querySelectorAll('#inlineResMarkers .res-marker').forEach(function(m){m.classList.remove('active');});
var card=document.querySelector('#inlineResList .res-card[data-key="'+key+'"]');
if(card){
card.classList.add('active');
var drawer=document.getElementById('mapDrawer');
if(drawer.classList.contains('open')){card.scrollIntoView({block:'nearest',behavior:'smooth'});}
}
for(var d=1;d<=daysInMonth;d++){
var el=document.createElement('div');el.className='cal-day';
var isDuty=duties.indexOf(d)>=0;
var isToday=isThisMonth&&d===today.getDate();
if(isDuty)el.className+=' cal-day--duty';
if(isToday){el.className+=' cal-day--today cal-day--selected';_calSelectedDay=d;}
el.textContent=d;
if(isDuty){
var dot=document.createElement('span');dot.className='cal-dot';el.appendChild(dot);
}
el.style.cursor='pointer';
el.setAttribute('data-day',d);
el.addEventListener('click',function(){selectCalDay(parseInt(this.getAttribute('data-day')));});
grid.appendChild(el);
}
var total=firstDay+daysInMonth;var remain=total%7===0?0:7-total%7;
for(var i=1;i<=remain;i++){
var el=document.createElement('div');el.className='cal-day cal-day--other';el.textContent=i;grid.appendChild(el);
var marker=document.querySelector('#inlineResMarkers .res-marker[data-key="'+key+'"]');
if(marker)marker.classList.add('active');
}
/* 卡片点击 */
function onResCardClick(card){
var key=card.getAttribute('data-key');
if(!key)return;
onMarkerClick(card,key);
}
/* 路线规划 */
function drawRoute(card){
clearRoute();
var mapArea=document.getElementById('inlineMapArea');
var overlay=document.getElementById('routeOverlay');
var empTop=42,empLeft=52;
var pos=card.getAttribute('data-pos');
var parts=pos.split(';');
var resTop=parseFloat(parts[0]),resLeft=parseFloat(parts[1]);
var color=card.getAttribute('data-color')||'#1890FF';
var dist=card.getAttribute('data-dist')||'';
var eta=card.getAttribute('data-eta')||'';
var label=card.getAttribute('data-label')||'';
overlay.innerHTML='<line x1="'+empLeft+'" y1="'+empTop+'" x2="'+resLeft+'" y2="'+resTop+'" stroke="'+color+'" stroke-width="0.6" class="route-line"/><circle cx="'+resLeft+'" cy="'+resTop+'" r="1.2" fill="'+color+'" stroke="#fff" stroke-width="0.3"/>';
var midTop=((empTop+resTop)/2).toFixed(1);
var midLeft=((empLeft+resLeft)/2).toFixed(1);
var lbl=document.createElement('div');
lbl.className='route-mid-label';
lbl.style.top=midTop+'%';lbl.style.left=midLeft+'%';
lbl.innerHTML='<span style="font-weight:600;">'+label+'</span> '+dist+' · '+eta;
mapArea.appendChild(lbl);
lbl.setAttribute('data-route-label','1');
_routeCard=card;
}
function clearRoute(){
var overlay=document.getElementById('routeOverlay');
overlay.innerHTML='';
var labels=document.querySelectorAll('[data-route-label]');
labels.forEach(function(l){l.remove();});
_routeCard=null;
_activeMarkerKey=null;
hidePopup();
document.querySelectorAll('#inlineResList .res-card').forEach(function(c){c.classList.remove('active');});
document.querySelectorAll('#inlineResMarkers .res-marker').forEach(function(m){m.classList.remove('active');});
}
/* 气泡弹窗 */
function showPopup(el,d){
var popup=document.getElementById('markerPopup');
var mapArea=document.getElementById('inlineMapArea');
var mRect=el.getBoundingClientRect();
var mapRect=mapArea.getBoundingClientRect();
var left=mRect.left-mapRect.left+mRect.width/2;
// 先尝试上方
popup.classList.remove('marker-popup--below','marker-popup--show');
popup.style.top='auto';popup.style.left=left+'px';
popup.style.bottom='';popup.style.top='';
document.getElementById('popupName').textContent=d.name;
document.getElementById('popupCat').innerHTML='<span style="background:'+d.catColor+';box-shadow:0 0 6px '+d.catColor+';"></span>'+d.cat;
document.getElementById('popupUnit').textContent=d.unit||'--';
document.getElementById('popupAddr').textContent=d.addr||'--';
document.getElementById('popupPhone').textContent=d.phone||'--';
var extraRow=document.getElementById('popupRowExtra');
if(d.d1Label){extraRow.style.display='';document.getElementById('popupExtraLabel').textContent=d.d1Label;document.getElementById('popupExtraVal').textContent=d.d1||'';
}else{extraRow.style.display='none';}
// 先强制布局,测量高度
popup.classList.add('marker-popup--show');
var popH=popup.offsetHeight;
var aboveTop=mRect.top-mapRect.top-10-popH;
if(aboveTop<0){
// 上方空间不够,显示在下方
popup.classList.remove('marker-popup--show');
popup.classList.add('marker-popup--below');
popup.style.top=(mRect.bottom-mapRect.top+10)+'px';
popup.classList.add('marker-popup--show');
}else{
popup.style.top=(mRect.top-mapRect.top-10)+'px';
}
}
initCalendar();
function selectCalDay(day){
_calSelectedDay=day;
document.querySelectorAll('#calGrid .cal-day').forEach(function(el){el.classList.remove('cal-day--selected');});
var target=document.querySelector('#calGrid .cal-day[data-day="'+day+'"]');
if(target)target.classList.add('cal-day--selected');
function hidePopup(){
document.getElementById('markerPopup').classList.remove('marker-popup--show');
}
/* 地图空白区点击 */
document.getElementById('inlineMapArea').addEventListener('click',function(e){
if(e.target.closest('.res-marker')||e.target.closest('.map-drawer-toggle')||e.target.closest('.map-drawer'))return;
clearRoute();
});
/* 抽屉开关 */
function toggleDrawer(){
var drawer=document.getElementById('mapDrawer');
if(drawer.classList.contains('open')){closeDrawer();}else{openDrawer();}
}
function openDrawer(){
var drawer=document.getElementById('mapDrawer');
var toggle=document.getElementById('mapDrawerToggle');
drawer.classList.add('open');
toggle.classList.add('hidden');
}
function closeDrawer(){
var drawer=document.getElementById('mapDrawer');
var toggle=document.getElementById('mapDrawerToggle');
drawer.classList.remove('open');
toggle.classList.remove('hidden');
}
/* 页面初始化:渲染全部标记,抽屉默认打开 */
renderAllMarkers();
document.getElementById('mapDrawer').classList.add('open');
document.getElementById('mapDrawerToggle').classList.add('hidden');
/* 救助信息弹窗 */
var _summaryId=2;
function openSummaryModal(){document.getElementById('summaryModal').classList.add('open');document.body.style.overflow='hidden';updateSummaryCount();}
@@ -1148,11 +1518,11 @@ function deleteSummary(btn){
btn.closest('.summary-item').remove();
updateSummaryCount();
}
/* 资源Tab切换 */
/* 资源Tab切换(弹窗内) */
function switchResTab(cat,el){
document.querySelectorAll('.res-tab').forEach(function(t){t.classList.remove('active');});
document.querySelectorAll('#mapModal .res-tab').forEach(function(t){t.classList.remove('active');});
el.classList.add('active');
document.querySelectorAll('.res-card').forEach(function(c){
document.querySelectorAll('#mapModal .res-card').forEach(function(c){
c.style.display=c.getAttribute('data-res')===cat?'':'none';
c.classList.remove('active');
});
@@ -1161,7 +1531,7 @@ function switchResTab(cat,el){
function renderResMarkers(cat){
var container=document.getElementById('resMarkers');
container.innerHTML='';
document.querySelectorAll('.res-card[data-res="'+cat+'"]').forEach(function(card,i){
document.querySelectorAll('#mapModal .res-card[data-res="'+cat+'"]').forEach(function(card,i){
var pos=card.getAttribute('data-pos');if(!pos)return;
var parts=pos.split(';');
var color=card.getAttribute('data-color')||'#1890FF';
@@ -1176,18 +1546,18 @@ function renderResMarkers(cat){
});
}
function highlightResCard(cat,idx){
document.querySelectorAll('.res-card').forEach(function(c){c.classList.remove('active');});
document.querySelectorAll('.res-marker').forEach(function(m){m.classList.remove('active');});
var cards=document.querySelectorAll('.res-card[data-res="'+cat+'"]');
document.querySelectorAll('#mapModal .res-card').forEach(function(c){c.classList.remove('active');});
document.querySelectorAll('#resMarkers .res-marker').forEach(function(m){m.classList.remove('active');});
var cards=document.querySelectorAll('#mapModal .res-card[data-res="'+cat+'"]');
if(cards[idx]){cards[idx].classList.add('active');cards[idx].scrollIntoView({block:'nearest',behavior:'smooth'});}
var markers=document.querySelectorAll('.res-marker');
var markers=document.querySelectorAll('#resMarkers .res-marker');
if(markers[idx])markers[idx].classList.add('active');
}
document.addEventListener('click',function(e){
var card=e.target.closest('.res-card');
var card=e.target.closest('#mapModal .res-card');
if(!card)return;
var cat=card.getAttribute('data-res');
var cards=Array.prototype.slice.call(document.querySelectorAll('.res-card[data-res="'+cat+'"]'));
var cards=Array.prototype.slice.call(document.querySelectorAll('#mapModal .res-card[data-res="'+cat+'"]'));
var idx=cards.indexOf(card);
if(idx>=0)highlightResCard(cat,idx);
});
@@ -128,10 +128,11 @@ tbody tr:hover td:nth-child(2){background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html" class="active">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -163,12 +164,12 @@ tbody tr:hover td:nth-child(2){background:#F8FBFF;}
<div class="page-header__breadcrumb"><a href="action-overview.html">活动总览</a> / <span>赛况明细</span></div>
</div>
<!-- [交互] 干预计划 + 员工基本信息卡片 -->
<!-- [交互] 干预活动 + 员工基本信息卡片 -->
<div class="info-cards">
<div class="info-card">
<div class="info-card__title">干预计划</div>
<div class="info-card__title">活动名称</div>
<div class="info-card__body" id="planCard">
<div class="info-item"><span class="info-item__label">计划名称:</span><span class="info-item__value" id="ciPlanName">-</span></div>
<div class="info-item"><span class="info-item__label">活动名称:</span><span class="info-item__value" id="ciPlanName">-</span></div>
<div class="info-item"><span class="info-item__label">组织机构:</span><span class="info-item__value" id="ciOrg">-</span></div>
<div class="info-item"><span class="info-item__label">起止日期:</span><span class="info-item__value" id="ciDate">-</span></div>
<div class="info-item"><span class="info-item__label">进行天数:</span><span class="info-item__value" id="ciDays">-</span></div>
@@ -269,14 +270,14 @@ tbody tr:hover td:nth-child(2){background:#F8FBFF;}
/* ===== 数据 ===== */
var plans = [
{id:1,name:'第四采油厂2026年超重健康干预计划',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:1,name:'第四采油厂2026年超重健康干预活动',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:2,name:'采油一厂2026年体重管理专项行动',org:'采油一厂',dateFrom:'2026-04-01',dateTo:'2026-09-30',totalCount:186,actualCount:180},
{id:3,name:'采油二厂2026年健康减重计划',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理计划',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预计划',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重计划',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预计划',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项计划',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
{id:3,name:'采油二厂2026年健康减重活动',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理活动',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预活动',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重活动',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预活动',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项活动',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
];
var baseEmployees = [
@@ -327,7 +328,7 @@ function getParam(name){
/* ===== 生成每日明细Mock数据 ===== */
function buildDetailData(emp){
var data = [];
// 使用计划起止日期生成每日数据
// 使用活动起止日期生成每日数据
var dateFrom = new Date(plan.dateFrom);
var dateTo = new Date(plan.dateTo);
var today = new Date();
@@ -407,7 +408,7 @@ function buildDetailData(emp){
/* ===== 渲染信息卡片 ===== */
function renderInfoCards(){
if(!employee || !plan) return;
// 计划信息
// 活动信息
document.getElementById('ciPlanName').textContent = plan.name;
document.getElementById('ciOrg').textContent = plan.org;
document.getElementById('ciDate').textContent = plan.dateFrom + ' ~ ' + plan.dateTo;
@@ -695,7 +696,7 @@ function showToast(msg){
var planId = getParam('planId');
var empId = getParam('empId');
// 查找计划和员工
// 查找活动和员工
plan = plans.find(function(p){return p.id === parseInt(planId);}) || plans[0];
employee = baseEmployees.find(function(e){return e.empId === empId;}) || baseEmployees[0];
@@ -45,7 +45,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
/* 搜索下拉 */
.search-select{position:relative;width:100%;}
.search-select__input{width:100%;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-sm);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input{width:100%;height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-xs);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input:focus{border-color:var(--primary);}
.search-select__input::placeholder{color:var(--text-placeholder);}
.search-select__panel{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:500;display:none;max-height:280px;overflow-y:auto;}
@@ -108,7 +108,7 @@ tbody tr:hover{background:#F8FBFF;}
/* 序号列 — 不固定 */
thead th:nth-child(1),tbody td:nth-child(1){width:52px;min-width:52px;max-width:52px;}
/* 干预计划/姓名/员工编号固定左侧(原1/2/3 → 现2/3/4 */
/* 干预活动/姓名/员工编号固定左侧(原1/2/3 → 现2/3/4 */
thead th:nth-child(2),tbody td:nth-child(2){position:sticky;left:0;z-index:6;background:#fff;width:200px;min-width:200px;max-width:200px;overflow:hidden;text-overflow:ellipsis;}
thead th:nth-child(2){z-index:9;background:#FAFAFA;}
thead th:nth-child(3),tbody td:nth-child(3){position:sticky;left:200px;z-index:5;background:#fff;width:56px;min-width:56px;max-width:56px;}
@@ -157,10 +157,11 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html" class="active">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -190,18 +191,9 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<div class="page-header__breadcrumb">体重管理 / 过程管理 / <span>活动总览</span></div>
</div>
<!-- [交互] 筛选栏 — 干预计划、单位部门、姓名、员工编号 -->
<!-- [交互] 筛选栏 — 干预活动、单位部门、姓名、员工编号 -->
<div class="filter-bar">
<!-- [交互] 干预计划下拉搜索 -->
<div class="filter-item">
<label>干预计划</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="搜索计划名称或组织机构" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空计划">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<!-- [交互] 双列面板:左选单位→右选部门 -->
<!-- [交互] 双列面板:左选单位→右选部门 -->
<div class="filter-item">
<label>单位部门</label>
<div class="org-select-wrap" id="orgWrap">
@@ -222,6 +214,15 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
</div>
</div>
</div>
<!-- [交互] 干预活动下拉搜索 -->
<div class="filter-item">
<label>活动名称</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="输入活动名称" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空活动">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:100px;">
@@ -255,7 +256,7 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<!-- [交互] 表头第一行:父级分类(饮食总览、运动总览为合并单元格) -->
<tr>
<th rowspan="2">序号</th>
<th rowspan="2">干预计划</th>
<th rowspan="2">活动名称</th>
<th rowspan="2">姓名</th>
<th rowspan="2">员工编号</th>
<th rowspan="2">性别</th>
@@ -323,16 +324,16 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
});
})();
/* ===== 干预计划数据 ===== */
/* ===== 干预活动数据 ===== */
var plans = [
{id:1,name:'第四采油厂2026年超重健康干预计划',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:1,name:'第四采油厂2026年超重健康干预活动',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:2,name:'采油一厂2026年体重管理专项行动',org:'采油一厂',dateFrom:'2026-04-01',dateTo:'2026-09-30',totalCount:186,actualCount:180},
{id:3,name:'采油二厂2026年健康减重计划',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理计划',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预计划',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重计划',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预计划',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项计划',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
{id:3,name:'采油二厂2026年健康减重活动',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理活动',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预活动',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重活动',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预活动',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项活动',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
];
/* ===== 基础员工数据 ===== */
@@ -383,7 +384,7 @@ function buildOverviewData(){
var fatChange = +(curFat - e.fat).toFixed(1);
var waistChange = +(curWaist - e.waist).toFixed(1);
// 模拟计划已进行天数
// 模拟活动已进行天数
var planDays = Math.floor(Math.random() * 120) + 30;
// 饮食总览 - 缺天:随机0-5天
var dietMissDays = Math.floor(Math.random() * 6);
@@ -391,7 +392,7 @@ function buildOverviewData(){
var dietMissMeals = dietMissDays > 0 ? Math.floor(Math.random() * 8) + 1 : 0;
// 日均摄入:1200-2200千卡
var dietAvgDaily = Math.floor(Math.random() * 1000) + 1200;
// 累计摄入 = 日均 * (计划天数 - 缺天)
// 累计摄入 = 日均 * (活动天数 - 缺天)
var dietTotal = dietAvgDaily * (planDays - dietMissDays);
// 运动总览 - 缺天:随机0-5天
@@ -400,7 +401,7 @@ function buildOverviewData(){
var exAvgSteps = Math.floor(Math.random() * 10000) + 5000;
// 日均消耗:200-600千卡
var exAvgDaily = Math.floor(Math.random() * 400) + 200;
// 累计消耗 = 日均 * (计划天数 - 缺天)
// 累计消耗 = 日均 * (活动天数 - 缺天)
var exTotal = exAvgDaily * (planDays - exMissDays);
data.push({
@@ -422,7 +423,7 @@ function buildOverviewData(){
var overviewData = buildOverviewData();
var selectedPlanId = null;
/* ===== 计算排名:按计划内排序 ===== */
/* ===== 计算排名:按活动内排序 ===== */
(function computeRanks(){
var planGroups = {};
overviewData.forEach(function(d){
@@ -445,7 +446,7 @@ var pageSize = 10;
var currentPage = 0;
var filteredData = overviewData.slice();
/* ===== 计划搜索选择 ===== */
/* ===== 活动搜索选择 ===== */
function searchPlan(){
var keyword = document.getElementById('planSearchInput').value.trim().toLowerCase();
var panel = document.getElementById('planPanel');
@@ -456,7 +457,7 @@ function searchPlan(){
});
}
if(filtered.length === 0){
panel.innerHTML = '<div class="search-select__empty">无匹配计划</div>';
panel.innerHTML = '<div class="search-select__empty">无匹配活动</div>';
} else {
var html = '';
filtered.forEach(function(p){
@@ -486,7 +487,7 @@ function selectPlan(planId){
applyFilter();
}
/* [交互] 清空已选干预计划,恢复未选择状态 */
/* [交互] 清空已选干预活动,恢复未选择状态 */
function clearPlan(){
selectedPlanId = null;
document.getElementById('planSearchInput').value = '';
@@ -583,7 +584,7 @@ function renderTable(){
document.getElementById('pageInfo').textContent = '显示 ' + pageData.length + ' 条,共 ' + filteredData.length + ' 条记录';
document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页';
if(filteredData.length === 0){
tbody.innerHTML = '<tr><td colspan="36" class="td-empty">暂无匹配数据,请选择干预计划后查看</td></tr>';
tbody.innerHTML = '<tr><td colspan="36" class="td-empty">暂无匹配数据,请选择干预活动后查看</td></tr>';
return;
}
var html = '';
@@ -687,7 +688,7 @@ document.addEventListener('click',function(e){
/* ===== 初始化 ===== */
(function init(){
// 预填充计划下拉数据
// 预填充活动下拉数据
var html = '';
plans.forEach(function(p){
html += '<div class="search-select__option" onclick="selectPlan('+p.id+')">';
+173 -82
View File
@@ -44,7 +44,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
/* 搜索下拉 */
.search-select{position:relative;width:100%;}
.search-select__input{width:100%;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-sm);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input{width:100%;height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-xs);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input:focus{border-color:var(--primary);}
.search-select__input::placeholder{color:var(--text-placeholder);}
.search-select__panel{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:500;display:none;max-height:280px;overflow-y:auto;}
@@ -252,10 +252,11 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html" class="active">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -283,7 +284,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<div class="page-header__breadcrumb">体重管理 / 过程管理 / <span>行动记录</span></div>
</div>
<!-- [交互] 统计卡片 — 根据筛选的计划范围实时更新 -->
<!-- [交互] 统计卡片 — 根据筛选的活动范围实时更新 -->
<div class="stat-cards" id="statCards">
<div class="stat-card">
<div class="stat-card__title">今日饮食</div>
@@ -319,39 +320,39 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<!-- 筛选栏 — 三测记录 -->
<div class="filter-bar" style="border-radius:var(--radius-md) var(--radius-md) 0 0;box-shadow:var(--shadow-sm);">
<div class="filter-item">
<label>干预计划</label>
<label>单位部门</label>
<div class="org-select-wrap" id="orgWrap1">
<div class="org-trigger" id="orgTrigger1" onclick="toggleOrg1()">全部单位/部门</div>
<div class="org-panel" id="orgPanel1">
<div class="org-col" id="orgUnitCol1">
<div class="org-col__title">单位</div>
<div class="org-item active" data-unit="" onclick="selectUnit1(this,'全部单位/部门','')">全部单位/部门</div>
<div class="org-item" data-unit="第四采油厂" onclick="selectUnit1(this,'第四采油厂','第四采油厂')">第四采油厂</div>
<div class="org-item" data-unit="采油一厂" onclick="selectUnit1(this,'采油一厂','采油一厂')">采油一厂</div>
<div class="org-item" data-unit="采油二厂" onclick="selectUnit1(this,'采油二厂','采油二厂')">采油二厂</div>
<div class="org-item" data-unit="采气一厂" onclick="selectUnit1(this,'采气一厂','采气一厂')">采气一厂</div>
</div>
<div class="org-col" id="orgDeptCol1">
<div class="org-col__title">部门</div>
<div class="org-item active" data-dept="" onclick="selectDept1(this,'全部部门','')">全部部门</div>
</div>
</div>
</div>
</div>
<div class="filter-item">
<label>活动名称</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="搜索计划名称或组织机构" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空计划">×</button>
<input class="search-select__input" id="planSearchInput" placeholder="输入活动名称" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空活动">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<div class="filter-item">
<label>日期范围</label>
<input class="filter-date" type="date" id="filterDateFrom1">
<span style="font-size:var(--font-xs);color:var(--text-placeholder);"></span>
<input class="filter-date" type="date" id="filterDateTo1">
</div>
<div class="filter-item">
<label>单位部门</label>
<div class="org-select-wrap" id="orgWrap1">
<div class="org-trigger" id="orgTrigger1" onclick="toggleOrg1()">全部单位/部门</div>
<div class="org-panel" id="orgPanel1">
<div class="org-col" id="orgUnitCol1">
<div class="org-col__title">单位</div>
<div class="org-item active" data-unit="" onclick="selectUnit1(this,'全部单位/部门','')">全部单位/部门</div>
<div class="org-item" data-unit="第四采油厂" onclick="selectUnit1(this,'第四采油厂','第四采油厂')">第四采油厂</div>
<div class="org-item" data-unit="采油一厂" onclick="selectUnit1(this,'采油一厂','采油一厂')">采油一厂</div>
<div class="org-item" data-unit="采油二厂" onclick="selectUnit1(this,'采油二厂','采油二厂')">采油二厂</div>
<div class="org-item" data-unit="采气一厂" onclick="selectUnit1(this,'采气一厂','采气一厂')">采气一厂</div>
</div>
<div class="org-col" id="orgDeptCol1">
<div class="org-col__title">部门</div>
<div class="org-item active" data-dept="" onclick="selectDept1(this,'全部部门','')">全部部门</div>
</div>
</div>
</div>
</div>
<input class="filter-date" type="date" id="filterDateFrom1">
<span style="font-size:var(--font-xs);color:var(--text-placeholder);"></span>
<input class="filter-date" type="date" id="filterDateTo1">
</div>
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName1" placeholder="请输入姓名" style="width:100px;">
@@ -412,22 +413,22 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<div class="data-tab-panel" data-data-panel="unit" id="dataTabUnit">
<!-- 筛选栏 — 单位数据 -->
<div class="filter-bar" style="border-radius:var(--radius-md) var(--radius-md) 0 0;box-shadow:var(--shadow-sm);">
<div class="filter-item">
<label>日期范围</label>
<input class="filter-date" type="date" id="unitDateFrom">
<span style="font-size:var(--font-xs);color:var(--text-placeholder);"></span>
<input class="filter-date" type="date" id="unitDateTo">
</div>
<div class="filter-item">
<label>单位</label>
<select class="filter-select" id="unitSelect" style="min-width:140px;">
<option value="">全部单位</option>
<option value="第四采油厂">第四采油厂</option>
<option value="采油一厂">采油一厂</option>
<option value="采油二厂">采油二厂</option>
<option value="采气一厂">采气一厂</option>
</select>
</div>
<div class="filter-item">
<label>单位</label>
<select class="filter-select" id="unitSelect" style="min-width:140px;">
<option value="">全部单位</option>
<option value="第四采油厂">第四采油厂</option>
<option value="采油一厂">采油一厂</option>
<option value="采油二厂">采油二厂</option>
<option value="采气一厂">采气一厂</option>
</select>
</div>
<div class="filter-item">
<label>日期范围</label>
<input class="filter-date" type="date" id="unitDateFrom">
<span style="font-size:var(--font-xs);color:var(--text-placeholder);"></span>
<input class="filter-date" type="date" id="unitDateTo">
</div>
<button class="btn btn-primary" onclick="applyUnitFilter()">
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><circle cx="6" cy="6" r="4.5" stroke="#fff" stroke-width="1.3"/><path d="M9.5 9.5L13 13" stroke="#fff" stroke-width="1.3" stroke-linecap="round"/></svg>查询
</button>
@@ -447,7 +448,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<tr>
<th>序号</th>
<th>单位</th>
<th>人数</th>
<th>活动人数</th>
<th>三测人数</th>
<th>三测率</th>
</tr>
@@ -597,7 +598,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -667,7 +668,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -743,7 +744,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -818,7 +819,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -848,7 +849,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<button class="record-dialog__close" onclick="closeCumulativeDialog()"></button>
</div>
<div class="record-dialog__body">
<!-- 干预计划基本信息 -->
<!-- 干预活动基本信息 -->
<div class="record-info" id="cumPlanInfo" style="margin-bottom:16px;"></div>
<!-- Tab 切换 -->
<div style="display:flex;align-items:center;gap:0;padding:0 0 8px 0;border-bottom:1px solid var(--border);">
@@ -945,7 +946,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -1015,7 +1016,7 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -1030,6 +1031,29 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
</div>
</div>
<!-- [弹窗] 单位详情 -->
<div class="record-overlay" id="unitDetailOverlay">
<div class="record-dialog" style="width:1100px;">
<div class="record-dialog__header">
<span class="record-dialog__title" id="unitDetailTitle">单位详情</span>
<button class="record-dialog__close" onclick="closeUnitDetailDialog()"></button>
</div>
<div class="record-dialog__body">
<div class="record-info" id="unitDetailInfo"></div>
<div style="display:flex;gap:8px;margin-bottom:12px;">
<button class="btn btn-default" onclick="showToast('导出功能开发中')">导出列表数据</button>
<button class="btn btn-default" onclick="showToast('导出任务列表开发中')">查看导出任务</button>
</div>
<table class="record-table">
<thead id="unitDetailThead">
<tr><th>序号</th><th>活动名称</th><th>姓名</th><th>员工编号</th><th>单位</th><th>部门</th><th>体重记录</th><th>饮食记录</th><th>运动记录</th><th>三测完成</th></tr>
</thead>
<tbody id="unitDetailTbody"></tbody>
</table>
</div>
</div>
</div>
<!-- Toast -->
<div class="toast" id="toast"></div>
@@ -1043,16 +1067,16 @@ tbody tr:hover td:nth-child(4){background:#F8FBFF;}
});
})();
/* ===== 干预计划数据 ===== */
/* ===== 干预活动数据 ===== */
var plans = [
{id:1,name:'第四采油厂2026年超重健康干预计划',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:1,name:'第四采油厂2026年超重健康干预活动',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:2,name:'采油一厂2026年体重管理专项行动',org:'采油一厂',dateFrom:'2026-04-01',dateTo:'2026-09-30',totalCount:186,actualCount:180},
{id:3,name:'采油二厂2026年健康减重计划',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理计划',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预计划',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重计划',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预计划',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项计划',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
{id:3,name:'采油二厂2026年健康减重活动',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理活动',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预活动',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重活动',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预活动',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项活动',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
];
/* ===== 基础员工数据 ===== */
@@ -1128,11 +1152,11 @@ function buildMeasureData(){
var monthAgo = new Date(); monthAgo.setMonth(monthAgo.getMonth()-3);
var today = new Date();
baseEmployees.forEach(function(e,i){
// 部分员工未参加干预计划
var noPlan = i % 6 === 0;
var p = noPlan ? null : plans[i % plans.length];
var planIdVal = p ? p.id : null;
var planNameVal = p ? p.name : '-';
// 跳过未参加干预活动的员工
if (i % 6 === 0) return;
var p = plans[i % plans.length];
var planIdVal = p.id;
var planNameVal = p.name;
var daysSinceStart = Math.floor(Math.random()*80)+10;
types.forEach(function(t){
var hasRecord = i % 5 !== 4;
@@ -1168,7 +1192,7 @@ var currentPage = 0;
var filteredData = [];
var selectedPlanId = null;
/* ===== 计划搜索选择 ===== */
/* ===== 活动搜索选择 ===== */
function searchPlan(){
var keyword = document.getElementById('planSearchInput').value.trim().toLowerCase();
var panel = document.getElementById('planPanel');
@@ -1179,7 +1203,7 @@ function searchPlan(){
});
}
if(filtered.length === 0){
panel.innerHTML = '<div class="search-select__empty">无匹配计划</div>';
panel.innerHTML = '<div class="search-select__empty">无匹配活动</div>';
} else {
var html = '';
filtered.forEach(function(p){
@@ -1210,7 +1234,7 @@ function selectPlan(planId){
updateStatCards();
}
/* [交互] 清空已选干预计划,恢复未选择状态 */
/* [交互] 清空已选干预活动,恢复未选择状态 */
function clearPlan(){
selectedPlanId = null;
document.getElementById('planSearchInput').value = '';
@@ -1490,8 +1514,8 @@ function renderUnitTable(){
html += '<tr>';
html += '<td>'+(i+1)+'</td>';
html += '<td>'+esc(d.org)+'</td>';
html += '<td>'+d.total+'</td>';
html += '<td>'+d.measured+'</td>';
html += '<td><a class="link" href="javascript:void(0)" onclick="openUnitDetailDialog(\''+esc(d.org)+'\',\'total\')">'+d.total+'</a></td>';
html += '<td><a class="link" href="javascript:void(0)" onclick="openUnitDetailDialog(\''+esc(d.org)+'\',\'measured\')">'+d.measured+'</a></td>';
html += '<td>'+d.rate+'%</td>';
html += '</tr>';
});
@@ -1585,7 +1609,7 @@ function renderOverviewHeader(){
if(currentSubTab === 'weight'){
html += '<tr>';
html += '<th rowspan="2">序号</th>';
html += '<th rowspan="2">干预计划</th>';
html += '<th rowspan="2">活动名称</th>';
html += '<th rowspan="2">姓名</th>';
html += '<th rowspan="2">员工编号</th>';
html += '<th rowspan="2">性别</th>';
@@ -1609,7 +1633,7 @@ function renderOverviewHeader(){
} else {
html += '<tr>';
html += '<th>序号</th>';
html += '<th>干预计划</th>';
html += '<th>活动名称</th>';
html += '<th>姓名</th>';
html += '<th>员工编号</th>';
html += '<th>性别</th>';
@@ -2524,23 +2548,23 @@ var cumAllData = [];
function openCumulativeDialog(tab){
cumCurrentTab = tab || 'diet';
// 检查是否选择了计划,未选则提示
// 检查是否选择了活动,未选则提示
if(!selectedPlanId){
showToast('请先选择干预计划');
showToast('请先选择干预活动');
return;
}
var plan = plans.find(function(p){return p.id === selectedPlanId;});
if(!plan) return;
// 计算已进行天数
var elapsedDays = calcPlanDays(plan.dateFrom, plan.dateTo);
// 渲染计划基本信息
// 渲染活动基本信息
var infoHtml = '';
infoHtml += '<div class="record-info__item"><span class="record-info__label">干预计划</span><span class="record-info__value">'+esc(plan.name)+'</span></div>';
infoHtml += '<div class="record-info__item"><span class="record-info__label">干预活动</span><span class="record-info__value">'+esc(plan.name)+'</span></div>';
infoHtml += '<div class="record-info__item"><span class="record-info__label">组织机构:</span><span class="record-info__value">'+esc(plan.org)+'</span></div>';
infoHtml += '<div class="record-info__item"><span class="record-info__label">起止日期:</span><span class="record-info__value">'+plan.dateFrom+' ~ '+plan.dateTo+'</span></div>';
infoHtml += '<div class="record-info__item"><span class="record-info__label">已进行天数:</span><span class="record-info__value">'+elapsedDays+' 天</span></div>';
document.getElementById('cumPlanInfo').innerHTML = infoHtml;
// 生成累计数据:筛选当前计划的员工
// 生成累计数据:筛选当前活动的员工
var planEmployees = baseEmployees.filter(function(e){return e.org === plan.org;});
cumAllData = planEmployees.map(function(emp, i){
// 累计记录天数:模拟为已进行天数的 50%~95%
@@ -2592,7 +2616,7 @@ function renderCumTable(){
var count = cumAllData.length;
document.getElementById('cumTableCount').textContent = '共 ' + count + ' 人';
if(count === 0){
tbody.innerHTML = '<tr><td colspan="12" class="td-empty">暂无数据,请先选择干预计划</td></tr>';
tbody.innerHTML = '<tr><td colspan="12" class="td-empty">暂无数据,请先选择干预活动</td></tr>';
return;
}
var html = '';
@@ -2899,7 +2923,7 @@ document.addEventListener('click',function(e){
/* ===== 初始化 ===== */
(function init(){
// 预填充计划下拉数据
// 预填充活动下拉数据
var html = '';
plans.forEach(function(p){
html += '<div class="search-select__option" onclick="selectPlan('+p.id+')">';
@@ -2926,6 +2950,73 @@ document.addEventListener('click',function(e){
applyFilter1();
updateStatCards();
})();
/* ===== 单位详情弹窗 ===== */
function openUnitDetailDialog(org, type){
var dateFrom = document.getElementById('unitDateFrom').value || '-';
var dateTo = document.getElementById('unitDateTo').value || '-';
var typeLabel = type === 'total' ? '活动人数' : (type === 'measured' ? '三测人数' : '三测率');
document.getElementById('unitDetailTitle').textContent = org + ' - ' + typeLabel;
var infoHtml = '';
infoHtml += '<div class="record-info__item"><span class="record-info__label">单位:</span><span class="record-info__value">'+esc(org)+'</span></div>';
infoHtml += '<div class="record-info__item"><span class="record-info__label">日期范围:</span><span class="record-info__value">'+dateFrom+' ~ '+dateTo+'</span></div>';
document.getElementById('unitDetailInfo').innerHTML = infoHtml;
var empMap = {};
measureData.weight.forEach(function(w,i){
if(w.org !== org) return;
if(selectedPlanId && w.planId !== selectedPlanId) return;
var dRec = measureData.diet[i], exRec = measureData.exercise[i];
var key = w.empId;
if(!empMap[key]){
empMap[key] = {planName:w.planName,name:w.name,empId:w.empId,org:w.org,dept:w.dept,hasWeight:false,hasDiet:false,hasExercise:false};
}
function inRange(rec){
if(!rec.hasRecord) return false;
if(dateFrom && rec.lastDate !== '-' && rec.lastDate < dateFrom) return false;
if(dateTo && rec.firstDate > dateTo) return false;
return true;
}
if(inRange(w)) empMap[key].hasWeight = true;
if(inRange(dRec)) empMap[key].hasDiet = true;
if(inRange(exRec)) empMap[key].hasExercise = true;
});
var empList = [];
for(var k in empMap){ empMap[k].allDone = empMap[k].hasWeight && empMap[k].hasDiet && empMap[k].hasExercise; empList.push(empMap[k]); }
// 三测人数弹窗只显示三测完成的员工
if(type === 'measured'){ empList = empList.filter(function(e){ return e.allDone; }); }
var tbody = document.getElementById('unitDetailTbody');
if(empList.length === 0){
tbody.innerHTML = '<tr><td colspan="10" class="td-empty">暂无数据</td></tr>';
} else {
var html = '';
empList.forEach(function(e,i){
html += '<tr>';
html += '<td>'+(i+1)+'</td>';
html += '<td>'+esc(e.planName)+'</td>';
html += '<td>'+esc(e.name)+'</td>';
html += '<td>'+e.empId+'</td>';
html += '<td>'+esc(e.org)+'</td>';
html += '<td>'+esc(e.dept)+'</td>';
html += '<td>'+(e.hasWeight?'<span style="color:var(--success);">●</span>':'<span style="color:var(--danger);">○</span>')+'</td>';
html += '<td>'+(e.hasDiet?'<span style="color:var(--success);">●</span>':'<span style="color:var(--danger);">○</span>')+'</td>';
html += '<td>'+(e.hasExercise?'<span style="color:var(--success);">●</span>':'<span style="color:var(--danger);">○</span>')+'</td>';
html += '<td>'+(e.allDone?'<span class="tag tag-green">是</span>':'<span class="tag tag-default">否</span>')+'</td>';
html += '</tr>';
});
tbody.innerHTML = html;
}
document.getElementById('unitDetailOverlay').classList.add('show');
}
function closeUnitDetailDialog(){
document.getElementById('unitDetailOverlay').classList.remove('show');
}
document.getElementById('unitDetailOverlay').addEventListener('click',function(e){
if(e.target === this) closeUnitDetailDialog();
});
</script>
</body>
</html>
@@ -45,7 +45,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
/* 搜索下拉 */
.search-select{position:relative;width:100%;}
.search-select__input{width:100%;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-sm);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input{width:100%;height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-xs);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input:focus{border-color:var(--primary);}
.search-select__input::placeholder{color:var(--text-placeholder);}
.search-select__panel{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:500;display:none;max-height:280px;overflow-y:auto;}
@@ -108,7 +108,7 @@ tbody td{padding:10px 8px;text-align:center;font-size:var(--font-sm);color:var(-
tbody tr:last-child td{border-bottom:none;}
tbody tr:hover{background:#F8FBFF;}
/* 第二列(干预计划)固定左侧 */
/* 第二列(干预活动)固定左侧 */
thead th:nth-child(2),tbody td:nth-child(2){position:sticky;left:0;z-index:4;background:#fff;min-width:240px;max-width:240px;text-align:left;overflow:hidden;text-overflow:ellipsis;}
thead th:nth-child(2){z-index:7;background:#FAFAFA;}
tbody tr:hover td:nth-child(2){background:#F8FBFF;}
@@ -142,10 +142,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html" class="active">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -175,18 +176,9 @@ tbody tr:hover{background:#F8FBFF;}
<div class="page-header__breadcrumb">体重管理 / 过程管理 / <span>活动统计</span></div>
</div>
<!-- [交互] 筛选栏 — 干预计划、单位多选 -->
<!-- [交互] 筛选栏 — 干预活动、单位多选 -->
<div class="filter-bar">
<!-- [交互] 干预计划下拉搜索 -->
<div class="filter-item">
<label>干预计划</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="搜索计划名称或组织机构" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空计划">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<!-- [交互] 多选下拉:勾选单位,支持全选/清空 -->
<!-- [交互] 多选下拉:勾选单位,支持全选/清空 -->
<div class="filter-item">
<label>单位</label>
<div class="unit-multi-select" id="unitMultiWrap">
@@ -215,6 +207,15 @@ tbody tr:hover{background:#F8FBFF;}
</div>
</div>
</div>
<!-- [交互] 干预活动下拉搜索 -->
<div class="filter-item">
<label>活动名称</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="输入活动名称" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空活动">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<!-- [交互] 点击查询按钮筛选列表 -->
<button class="btn btn-primary" onclick="applyFilter()">
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><circle cx="6" cy="6" r="4.5" stroke="#fff" stroke-width="1.3"/><path d="M9.5 9.5L13 13" stroke="#fff" stroke-width="1.3" stroke-linecap="round"/></svg>查询
@@ -239,7 +240,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>组织机构</th>
<th>起止日期</th>
<th>应参加<br>人数</th>
@@ -285,16 +286,16 @@ tbody tr:hover{background:#F8FBFF;}
});
})();
/* ===== 干预计划数据 ===== */
/* ===== 干预活动数据 ===== */
var plans = [
{id:1,name:'第四采油厂2026年超重健康干预计划',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:1,name:'第四采油厂2026年超重健康干预活动',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:2,name:'采油一厂2026年体重管理专项行动',org:'采油一厂',dateFrom:'2026-04-01',dateTo:'2026-09-30',totalCount:186,actualCount:180},
{id:3,name:'采油二厂2026年健康减重计划',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理计划',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预计划',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重计划',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预计划',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项计划',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
{id:3,name:'采油二厂2026年健康减重活动',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理活动',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预活动',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重活动',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预活动',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项活动',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
];
/* ===== 单位列表 ===== */
@@ -303,9 +304,9 @@ var allUnits = ['第四采油厂','采油一厂','采油二厂','采气一厂'];
/* ===== 生成统计Mock数据 ===== */
function buildStatsData(){
var data = [];
// 每个计划 + 每个相关单位 生成一行聚合统计
// 每个活动 + 每个相关单位 生成一行聚合统计
plans.forEach(function(p){
// 每个计划关联其所属单位 + 随机1-2个其他单位
// 每个活动关联其所属单位 + 随机1-2个其他单位
var planUnits = [p.org];
var otherUnits = allUnits.filter(function(u){return u !== p.org;});
// 随机选 1-2 个其他单位
@@ -316,7 +317,7 @@ function buildStatsData(){
}
}
planUnits.forEach(function(unit, ui){
// 该单位在此计划中的参与人数
// 该单位在此活动中的参与人数
var shouldCount, actualCount;
if(unit === p.org){
shouldCount = p.totalCount;
@@ -388,7 +389,7 @@ var pageSize = 10;
var currentPage = 0;
var filteredData = statsData.slice();
/* ===== 计划搜索选择 ===== */
/* ===== 活动搜索选择 ===== */
function searchPlan(){
var keyword = document.getElementById('planSearchInput').value.trim().toLowerCase();
var panel = document.getElementById('planPanel');
@@ -399,7 +400,7 @@ function searchPlan(){
});
}
if(filtered.length === 0){
panel.innerHTML = '<div class="search-select__empty">无匹配计划</div>';
panel.innerHTML = '<div class="search-select__empty">无匹配活动</div>';
} else {
var html = '';
filtered.forEach(function(p){
@@ -429,7 +430,7 @@ function selectPlan(planId){
applyFilter();
}
/* [交互] 清空已选干预计划,恢复未选择状态 */
/* [交互] 清空已选干预活动,恢复未选择状态 */
function clearPlan(){
selectedPlanId = null;
document.getElementById('planSearchInput').value = '';
@@ -500,7 +501,7 @@ function resetUnitFilter(){
/* ===== 筛选 ===== */
function applyFilter(){
var data = statsData.slice();
// 按计划筛选(选中时只展示该计划数据,未选中时展示全部)
// 按活动筛选(选中时只展示该活动数据,未选中时展示全部)
if(selectedPlanId){
data = data.filter(function(d){return d.planId === selectedPlanId;});
}
@@ -529,7 +530,7 @@ function renderTable(){
document.getElementById('pageInfo').textContent = '显示 ' + pageData.length + ' 条,共 ' + filteredData.length + ' 条记录';
document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页';
if(filteredData.length === 0){
tbody.innerHTML = '<tr><td colspan="19" class="td-empty">暂无匹配数据,请选择干预计划后查看</td></tr>';
tbody.innerHTML = '<tr><td colspan="19" class="td-empty">暂无匹配数据,请选择干预活动后查看</td></tr>';
return;
}
var html = '';
@@ -602,7 +603,7 @@ document.addEventListener('click',function(e){
/* ===== 初始化 ===== */
(function init(){
// 预填充计划下拉数据
// 预填充活动下拉数据
var html = '';
plans.forEach(function(p){
html += '<div class="search-select__option" onclick="selectPlan('+p.id+')">';
@@ -38,10 +38,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html" class="active">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -129,10 +129,11 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html" class="active">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -162,14 +163,6 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<!-- [交互] 筛选栏 — 姓名 + 员工编号 + 单位部门 + 年份 -->
<div class="filter-bar">
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:110px;">
</div>
<div class="filter-item">
<label>员工编号</label>
<input class="filter-input" id="filterEmpId" placeholder="请输入编号" style="width:120px;">
</div>
<div class="filter-item">
<label>单位部门</label>
<div class="org-wrap" id="orgWrap">
@@ -189,6 +182,14 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
</div>
</div>
</div>
</div>
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:110px;">
</div>
<div class="filter-item">
<label>员工编号</label>
<input class="filter-input" id="filterEmpId" placeholder="请输入编号" style="width:120px;">
</div>
<div class="filter-item">
<label>年份</label>
@@ -114,10 +114,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html" class="active">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -116,10 +116,11 @@ tbody tr:hover{background:#F8FBFF;}
</div>
<div class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -218,11 +219,11 @@ tbody tr:hover{background:#F8FBFF;}
</div>
</div>
<!-- 活动计划列表 -->
<!-- 活动活动列表 -->
<div class="filter-bar">
<div class="filter-item">
<label>计划名称</label>
<input class="filter-input" type="text" placeholder="请输入计划名称" id="filterPlanName">
<label>活动名称</label>
<input class="filter-input" type="text" placeholder="请输入活动名称" id="filterPlanName">
</div>
<div class="filter-item">
<label>年份</label>
@@ -253,7 +254,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>组织机构</th>
<th>组织部门</th>
<th>起止日期</th>
@@ -298,37 +299,37 @@ function getParam(name) {
/* ===== Mock 活动数据 ===== */
var unitActivityData = {
'第四采油厂': [
{id:1,planName:'第四采油厂2024年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2024-03-01',dateTo:'2024-08-31',staffScope:'全厂员工',shouldCount:220,actualCount:205,notCount:15,weightGoalDone:168,fatGoalDone:152,waistGoalDone:145,avgWeightLoss:3.8,avgLossRate:4.5,avgWaistLoss:4.2,avgDailyIntake:1850,avgDailyConsume:520,avgDailyGap:330,avgScore:82.5,avgActionScore:76.3,responsible:'王建国'},
{id:2,planName:'第四采油厂2025年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'全厂员工',shouldCount:267,actualCount:251,notCount:16,weightGoalDone:198,fatGoalDone:185,waistGoalDone:172,avgWeightLoss:4.2,avgLossRate:5.1,avgWaistLoss:4.8,avgDailyIntake:1780,avgDailyConsume:560,avgDailyGap:380,avgScore:85.3,avgActionScore:79.1,responsible:'王建国'},
{id:3,planName:'第四采油厂2026年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'全厂员工',shouldCount:234,actualCount:218,notCount:16,weightGoalDone:92,fatGoalDone:78,waistGoalDone:71,avgWeightLoss:2.1,avgLossRate:2.5,avgWaistLoss:2.3,avgDailyIntake:1920,avgDailyConsume:490,avgDailyGap:280,avgScore:74.8,avgActionScore:68.2,responsible:'王建国'},
{id:1,planName:'第四采油厂2024年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2024-03-01',dateTo:'2024-08-31',staffScope:'全厂员工',shouldCount:220,actualCount:205,notCount:15,weightGoalDone:168,fatGoalDone:152,waistGoalDone:145,avgWeightLoss:3.8,avgLossRate:4.5,avgWaistLoss:4.2,avgDailyIntake:1850,avgDailyConsume:520,avgDailyGap:330,avgScore:82.5,avgActionScore:76.3,responsible:'王建国'},
{id:2,planName:'第四采油厂2025年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'全厂员工',shouldCount:267,actualCount:251,notCount:16,weightGoalDone:198,fatGoalDone:185,waistGoalDone:172,avgWeightLoss:4.2,avgLossRate:5.1,avgWaistLoss:4.8,avgDailyIntake:1780,avgDailyConsume:560,avgDailyGap:380,avgScore:85.3,avgActionScore:79.1,responsible:'王建国'},
{id:3,planName:'第四采油厂2026年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'全厂员工',shouldCount:234,actualCount:218,notCount:16,weightGoalDone:92,fatGoalDone:78,waistGoalDone:71,avgWeightLoss:2.1,avgLossRate:2.5,avgWaistLoss:2.3,avgDailyIntake:1920,avgDailyConsume:490,avgDailyGap:280,avgScore:74.8,avgActionScore:68.2,responsible:'王建国'},
{id:4,planName:'第四采油厂2025年秋季健步走活动',unit:'第四采油厂',dept:'工会办公室',dateFrom:'2025-09-01',dateTo:'2025-10-31',staffScope:'一线员工',shouldCount:150,actualCount:138,notCount:12,weightGoalDone:89,fatGoalDone:76,waistGoalDone:70,avgWeightLoss:2.8,avgLossRate:3.2,avgWaistLoss:3.0,avgDailyIntake:1950,avgDailyConsume:510,avgDailyGap:290,avgScore:78.2,avgActionScore:72.5,responsible:'张翠花'},
{id:5,planName:'第四采油厂2026年春季健康训练营',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-04-01',dateTo:'2026-06-30',staffScope:'管理部门',shouldCount:96,actualCount:82,notCount:14,weightGoalDone:35,fatGoalDone:28,waistGoalDone:25,avgWeightLoss:1.5,avgLossRate:1.8,avgWaistLoss:1.6,avgDailyIntake:2010,avgDailyConsume:460,avgDailyGap:220,avgScore:69.5,avgActionScore:63.8,responsible:'王建国'}
],
'采油一厂': [
{id:6,planName:'采油一厂2024年健康体重专项计划',unit:'采油一厂',dept:'安全环保科',dateFrom:'2024-04-01',dateTo:'2024-09-30',staffScope:'管理部门',shouldCount:156,actualCount:142,notCount:14,weightGoalDone:110,fatGoalDone:98,waistGoalDone:89,avgWeightLoss:3.5,avgLossRate:4.2,avgWaistLoss:3.9,avgDailyIntake:1900,avgDailyConsume:480,avgDailyGap:300,avgScore:80.1,avgActionScore:73.5,responsible:'李明辉'},
{id:7,planName:'采油一厂2025年员工健康体重计划',unit:'采油一厂',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',staffScope:'全厂员工',shouldCount:420,actualCount:398,notCount:22,weightGoalDone:310,fatGoalDone:285,waistGoalDone:268,avgWeightLoss:3.9,avgLossRate:4.8,avgWaistLoss:4.3,avgDailyIntake:1820,avgDailyConsume:540,avgDailyGap:360,avgScore:83.7,avgActionScore:77.8,responsible:'李明辉'},
{id:6,planName:'采油一厂2024年健康体重专项活动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2024-04-01',dateTo:'2024-09-30',staffScope:'管理部门',shouldCount:156,actualCount:142,notCount:14,weightGoalDone:110,fatGoalDone:98,waistGoalDone:89,avgWeightLoss:3.5,avgLossRate:4.2,avgWaistLoss:3.9,avgDailyIntake:1900,avgDailyConsume:480,avgDailyGap:300,avgScore:80.1,avgActionScore:73.5,responsible:'李明辉'},
{id:7,planName:'采油一厂2025年员工健康体重活动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',staffScope:'全厂员工',shouldCount:420,actualCount:398,notCount:22,weightGoalDone:310,fatGoalDone:285,waistGoalDone:268,avgWeightLoss:3.9,avgLossRate:4.8,avgWaistLoss:4.3,avgDailyIntake:1820,avgDailyConsume:540,avgDailyGap:360,avgScore:83.7,avgActionScore:77.8,responsible:'李明辉'},
{id:8,planName:'采油一厂2026年体重管理专项行动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2026-04-01',dateTo:'2026-09-30',staffScope:'全厂员工',shouldCount:186,actualCount:180,notCount:6,weightGoalDone:65,fatGoalDone:52,waistGoalDone:48,avgWeightLoss:1.8,avgLossRate:2.1,avgWaistLoss:2.0,avgDailyIntake:1950,avgDailyConsume:470,avgDailyGap:250,avgScore:72.3,avgActionScore:65.8,responsible:'李明辉'},
{id:9,planName:'采油一厂2025年减脂达人挑战赛',unit:'采油一厂',dept:'工会办公室',dateFrom:'2025-06-01',dateTo:'2025-08-31',staffScope:'一线员工',shouldCount:78,actualCount:72,notCount:6,weightGoalDone:55,fatGoalDone:48,waistGoalDone:42,avgWeightLoss:5.2,avgLossRate:6.0,avgWaistLoss:5.5,avgDailyIntake:1700,avgDailyConsume:620,avgDailyGap:420,avgScore:88.5,avgActionScore:84.2,responsible:'李明辉'}
],
'采气一厂': [
{id:10,planName:'采气一厂2024年健康体重计划',unit:'采气一厂',dept:'生产技术部',dateFrom:'2024-06-01',dateTo:'2024-11-30',staffScope:'全厂员工',shouldCount:135,actualCount:118,notCount:17,weightGoalDone:92,fatGoalDone:78,waistGoalDone:72,avgWeightLoss:3.6,avgLossRate:4.3,avgWaistLoss:4.0,avgDailyIntake:1860,avgDailyConsume:510,avgDailyGap:340,avgScore:81.4,avgActionScore:74.9,responsible:'赵铁柱'},
{id:11,planName:'采气一厂2025年度体重管理计划',unit:'采气一厂',dept:'生产技术部',dateFrom:'2025-06-01',dateTo:'2025-12-01',staffScope:'全厂员工',shouldCount:158,actualCount:142,notCount:16,weightGoalDone:115,fatGoalDone:98,waistGoalDone:90,avgWeightLoss:4.1,avgLossRate:5.0,avgWaistLoss:4.6,avgDailyIntake:1790,avgDailyConsume:570,avgDailyGap:390,avgScore:86.0,avgActionScore:80.2,responsible:'赵铁柱'},
{id:12,planName:'采气一厂2026下半年体重干预计划',unit:'采气一厂',dept:'生产技术部',dateFrom:'2026-09-01',dateTo:'2026-12-31',staffScope:'全厂员工',shouldCount:89,actualCount:72,notCount:17,weightGoalDone:0,fatGoalDone:0,waistGoalDone:0,avgWeightLoss:0,avgLossRate:0,avgWaistLoss:0,avgDailyIntake:0,avgDailyConsume:0,avgDailyGap:0,avgScore:0,avgActionScore:0,responsible:'赵铁柱'}
{id:10,planName:'采气一厂2024年健康体重活动',unit:'采气一厂',dept:'生产技术部',dateFrom:'2024-06-01',dateTo:'2024-11-30',staffScope:'全厂员工',shouldCount:135,actualCount:118,notCount:17,weightGoalDone:92,fatGoalDone:78,waistGoalDone:72,avgWeightLoss:3.6,avgLossRate:4.3,avgWaistLoss:4.0,avgDailyIntake:1860,avgDailyConsume:510,avgDailyGap:340,avgScore:81.4,avgActionScore:74.9,responsible:'赵铁柱'},
{id:11,planName:'采气一厂2025年度体重管理活动',unit:'采气一厂',dept:'生产技术部',dateFrom:'2025-06-01',dateTo:'2025-12-01',staffScope:'全厂员工',shouldCount:158,actualCount:142,notCount:16,weightGoalDone:115,fatGoalDone:98,waistGoalDone:90,avgWeightLoss:4.1,avgLossRate:5.0,avgWaistLoss:4.6,avgDailyIntake:1790,avgDailyConsume:570,avgDailyGap:390,avgScore:86.0,avgActionScore:80.2,responsible:'赵铁柱'},
{id:12,planName:'采气一厂2026下半年体重干预活动',unit:'采气一厂',dept:'生产技术部',dateFrom:'2026-09-01',dateTo:'2026-12-31',staffScope:'全厂员工',shouldCount:89,actualCount:72,notCount:17,weightGoalDone:0,fatGoalDone:0,waistGoalDone:0,avgWeightLoss:0,avgLossRate:0,avgWaistLoss:0,avgDailyIntake:0,avgDailyConsume:0,avgDailyGap:0,avgScore:0,avgActionScore:0,responsible:'赵铁柱'}
]
};
/* 部门活动数据(三级单位) */
var deptActivityData = {
'第四采油厂|作业一区': [
{id:1,planName:'第四采油厂2025年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'作业一区',shouldCount:85,actualCount:80,notCount:5,weightGoalDone:62,fatGoalDone:55,waistGoalDone:50,avgWeightLoss:4.8,avgLossRate:5.5,avgWaistLoss:5.2,avgDailyIntake:1750,avgDailyConsume:580,avgDailyGap:400,avgScore:87.2,avgActionScore:81.5,responsible:'王建国'},
{id:2,planName:'第四采油厂2026年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'作业一区',shouldCount:78,actualCount:72,notCount:6,weightGoalDone:32,fatGoalDone:28,waistGoalDone:25,avgWeightLoss:2.5,avgLossRate:3.0,avgWaistLoss:2.8,avgDailyIntake:1900,avgDailyConsume:500,avgDailyGap:300,avgScore:76.5,avgActionScore:70.2,responsible:'王建国'}
{id:1,planName:'第四采油厂2025年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'作业一区',shouldCount:85,actualCount:80,notCount:5,weightGoalDone:62,fatGoalDone:55,waistGoalDone:50,avgWeightLoss:4.8,avgLossRate:5.5,avgWaistLoss:5.2,avgDailyIntake:1750,avgDailyConsume:580,avgDailyGap:400,avgScore:87.2,avgActionScore:81.5,responsible:'王建国'},
{id:2,planName:'第四采油厂2026年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'作业一区',shouldCount:78,actualCount:72,notCount:6,weightGoalDone:32,fatGoalDone:28,waistGoalDone:25,avgWeightLoss:2.5,avgLossRate:3.0,avgWaistLoss:2.8,avgDailyIntake:1900,avgDailyConsume:500,avgDailyGap:300,avgScore:76.5,avgActionScore:70.2,responsible:'王建国'}
],
'第四采油厂|作业二区': [
{id:3,planName:'第四采油厂2025年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'作业二区',shouldCount:92,actualCount:88,notCount:4,weightGoalDone:70,fatGoalDone:65,waistGoalDone:60,avgWeightLoss:4.0,avgLossRate:4.8,avgWaistLoss:4.5,avgDailyIntake:1800,avgDailyConsume:550,avgDailyGap:370,avgScore:84.0,avgActionScore:78.3,responsible:'王建国'},
{id:4,planName:'第四采油厂2026年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'作业二区',shouldCount:82,actualCount:76,notCount:6,weightGoalDone:30,fatGoalDone:25,waistGoalDone:22,avgWeightLoss:1.8,avgLossRate:2.2,avgWaistLoss:2.0,avgDailyIntake:1950,avgDailyConsume:480,avgDailyGap:260,avgScore:73.2,avgActionScore:66.8,responsible:'王建国'}
{id:3,planName:'第四采油厂2025年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'作业二区',shouldCount:92,actualCount:88,notCount:4,weightGoalDone:70,fatGoalDone:65,waistGoalDone:60,avgWeightLoss:4.0,avgLossRate:4.8,avgWaistLoss:4.5,avgDailyIntake:1800,avgDailyConsume:550,avgDailyGap:370,avgScore:84.0,avgActionScore:78.3,responsible:'王建国'},
{id:4,planName:'第四采油厂2026年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'作业二区',shouldCount:82,actualCount:76,notCount:6,weightGoalDone:30,fatGoalDone:25,waistGoalDone:22,avgWeightLoss:1.8,avgLossRate:2.2,avgWaistLoss:2.0,avgDailyIntake:1950,avgDailyConsume:480,avgDailyGap:260,avgScore:73.2,avgActionScore:66.8,responsible:'王建国'}
],
'采油一厂|采油一队': [
{id:5,planName:'采油一厂2025年员工健康体重计划',unit:'采油一厂',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',staffScope:'采油一队',shouldCount:130,actualCount:125,notCount:5,weightGoalDone:98,fatGoalDone:90,waistGoalDone:85,avgWeightLoss:3.5,avgLossRate:4.2,avgWaistLoss:3.8,avgDailyIntake:1850,avgDailyConsume:520,avgDailyGap:340,avgScore:82.0,avgActionScore:76.5,responsible:'李明辉'},
{id:5,planName:'采油一厂2025年员工健康体重活动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',staffScope:'采油一队',shouldCount:130,actualCount:125,notCount:5,weightGoalDone:98,fatGoalDone:90,waistGoalDone:85,avgWeightLoss:3.5,avgLossRate:4.2,avgWaistLoss:3.8,avgDailyIntake:1850,avgDailyConsume:520,avgDailyGap:340,avgScore:82.0,avgActionScore:76.5,responsible:'李明辉'},
{id:6,planName:'采油一厂2026年体重管理专项行动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2026-04-01',dateTo:'2026-09-30',staffScope:'采油一队',shouldCount:62,actualCount:60,notCount:2,weightGoalDone:22,fatGoalDone:18,waistGoalDone:16,avgWeightLoss:2.0,avgLossRate:2.4,avgWaistLoss:2.2,avgDailyIntake:1920,avgDailyConsume:480,avgDailyGap:270,avgScore:74.0,avgActionScore:67.5,responsible:'李明辉'}
]
};
@@ -123,10 +123,11 @@ tbody tr:hover{background:#F8FBFF;}
</div>
<div class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -75,10 +75,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -129,10 +129,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -180,8 +181,8 @@
<main class="main">
<!-- 筛选条件 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>设备厂商</label><select class="filter-select"><option value="">全部</option><option>华为</option><option>小米</option><option>乐心</option></select></div>
<div class="filter-item"><label>设备型号</label><select class="filter-select"><option value="">全部</option><option>HW-S100</option><option>MI-Scale2</option><option>LX-Pro</option></select></div>
<button class="btn btn-primary">查询</button>
@@ -97,10 +97,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -166,9 +167,9 @@
</div>
<!-- 员工实名列表 -->
<div class="filter-bar">
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>单位部门</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option></select></div>
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>使用日期</label><input class="filter-input" type="date" style="min-width:130px;"> ~ <input class="filter-input" type="date" style="min-width:130px;"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
@@ -71,10 +71,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -122,8 +123,8 @@
<main class="main">
<!-- 筛选栏 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
+11 -10
View File
@@ -114,10 +114,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -174,10 +175,6 @@
<!-- 二级单位筛选栏 -->
<div class="filter-bar" id="filter-level2">
<div class="filter-item">
<label>日期范围</label>
<input class="filter-input" type="date" id="filterDateFrom" style="min-width:130px;"> ~ <input class="filter-input" type="date" id="filterDateTo" style="min-width:130px;">
</div>
<div class="filter-item">
<label>单位</label>
<div class="multi-select">
@@ -192,16 +189,16 @@
</div>
</div>
</div>
<div class="filter-item">
<label>日期范围</label>
<input class="filter-input" type="date" id="filterDateFrom" style="min-width:130px;"> ~ <input class="filter-input" type="date" id="filterDateTo" style="min-width:130px;">
</div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
<!-- 三级单位筛选栏 -->
<div class="filter-bar" id="filter-level3" style="display:none;">
<div class="filter-item">
<label>日期范围</label>
<input class="filter-input" type="date" id="filterDateFrom3" style="min-width:130px;"> ~ <input class="filter-input" type="date" id="filterDateTo3" style="min-width:130px;">
</div>
<div class="filter-item">
<label>单位</label>
<div class="multi-select">
@@ -216,6 +213,10 @@
</div>
</div>
</div>
<div class="filter-item">
<label>日期范围</label>
<input class="filter-input" type="date" id="filterDateFrom3" style="min-width:130px;"> ~ <input class="filter-input" type="date" id="filterDateTo3" style="min-width:130px;">
</div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
@@ -100,10 +100,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -71,10 +71,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -125,9 +126,9 @@
<main class="main">
<!-- 筛选条件 -->
<div class="filter-bar">
<div class="filter-item"><label>单位部门</label><select class="filter-select" style="min-width:120px;"><option value="">全部单位</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select><select class="filter-select" style="min-width:120px;"><option value="">全部部门</option><option>生产运行科</option><option>安全环保科</option><option>综合管理科</option></select></div>
<div class="filter-item"><label>姓名</label><input class="filter-input" placeholder="请输入姓名" style="min-width:120px;"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入员工编号" style="min-width:140px;"></div>
<div class="filter-item"><label>单位部门</label><select class="filter-select" style="min-width:120px;"><option value="">全部单位</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select><select class="filter-select" style="min-width:120px;"><option value="">全部部门</option><option>生产运行科</option><option>安全环保科</option><option>综合管理科</option></select></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
@@ -95,10 +95,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -149,12 +150,6 @@
<main class="main">
<!-- 筛选条件 -->
<div class="filter-bar">
<div class="filter-item">
<label>日期范围</label>
<input class="filter-input" type="date" id="filterDateFrom" style="min-width:130px;"> ~ <input class="filter-input" type="date" id="filterDateTo" style="min-width:130px;">
</div>
<div class="filter-item"><label>姓名</label><input class="filter-input" placeholder="请输入姓名" style="min-width:120px;"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入员工编号" style="min-width:140px;"></div>
<div class="filter-item">
<label>单位部门</label>
<select class="filter-select" style="min-width:180px;">
@@ -170,6 +165,12 @@
<option>天然气处理厂 / 综合管理科</option>
</select>
</div>
<div class="filter-item">
<label>日期范围</label>
<input class="filter-input" type="date" id="filterDateFrom" style="min-width:130px;"> ~ <input class="filter-input" type="date" id="filterDateTo" style="min-width:130px;">
</div>
<div class="filter-item"><label>姓名</label><input class="filter-input" placeholder="请输入姓名" style="min-width:120px;"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入员工编号" style="min-width:140px;"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
@@ -102,10 +102,11 @@ tbody tr:hover{background:#F8FBFF;}
</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html" class="active">异常事件</a>
@@ -129,14 +130,6 @@ tbody tr:hover{background:#F8FBFF;}
<!-- 筛选栏 -->
<div class="filter-bar">
<div class="filter-item">
<label>员工名称</label>
<input class="filter-input" type="text" placeholder="请输入员工名称">
</div>
<div class="filter-item">
<label>员工编号</label>
<input class="filter-input" type="text" placeholder="请输入员工编号">
</div>
<div class="filter-item">
<label>单位部门</label>
<!-- [交互] 单位部门双列面板:左选单位→右侧部门联动加载 -->
@@ -158,15 +151,23 @@ tbody tr:hover{background:#F8FBFF;}
</div>
</div>
</div>
<div class="filter-item">
<label>员工名称</label>
<input class="filter-input" type="text" placeholder="请输入员工名称">
</div>
<div class="filter-item">
<label>员工编号</label>
<input class="filter-input" type="text" placeholder="请输入员工编号">
</div>
<div class="filter-item">
<label>业务模块</label>
<select class="filter-select">
<option>全部</option>
<option>档案管理</option>
<option>计划管理</option>
<option>活动管理</option>
<option>报名管理</option>
<option>过程管理</option>
<option>历史干预</option>
<option>历史活动</option>
<option>个人体重管理</option>
<option>设备管理</option>
</select>
@@ -264,7 +265,7 @@ tbody tr:hover{background:#F8FBFF;}
<td>EMP-10004</td>
<td>采油二厂</td>
<td>生产运行科</td>
<td>计划管理</td>
<td>活动管理</td>
<td>目标值偏差</td>
<td>距目标差8.5kg</td>
<td><span class="tag tag-orange">中等</span></td>
@@ -323,7 +324,7 @@ tbody tr:hover{background:#F8FBFF;}
<td>EMP-10104</td>
<td>天然气处理厂</td>
<td>综合管理科</td>
<td>计划管理</td>
<td>活动管理</td>
<td>目标值偏差</td>
<td>距目标差6.3kg</td>
<td><span class="tag tag-orange">中等</span></td>
@@ -89,10 +89,11 @@ tbody tr:hover{background:#F8FBFF;}
</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html" class="active">异常事件</a>
@@ -121,10 +122,10 @@ tbody tr:hover{background:#F8FBFF;}
<select class="filter-select">
<option>全部</option>
<option>档案管理</option>
<option>计划管理</option>
<option>活动管理</option>
<option>报名管理</option>
<option>过程管理</option>
<option>历史干预</option>
<option>历史活动</option>
<option>个人体重管理</option>
<option>设备管理</option>
</select>
@@ -197,7 +198,7 @@ tbody tr:hover{background:#F8FBFF;}
</tr>
<tr>
<td>2</td>
<td>计划管理</td>
<td>活动管理</td>
<td><span class="tag tag-orange">格式错误</span></td>
<td>目标起止日期格式非法,无法解析为有效日期范围</td>
<td>2026-05-13 14:56</td>
@@ -257,7 +258,7 @@ tbody tr:hover{background:#F8FBFF;}
</tr>
<tr>
<td>7</td>
<td>历史干预</td>
<td>历史活动</td>
<td><span class="tag tag-orange">格式错误</span></td>
<td>干预记录时间戳格式不符合标准ISO格式</td>
<td>2026-05-08 15:38</td>
@@ -280,7 +281,7 @@ tbody tr:hover{background:#F8FBFF;}
<td>2026-05-07 08:30</td>
</tr>
<tr>
<td>计划管理</td>
<td>活动管理</td>
<td><span class="tag tag-red">范围越界</span></td>
<td>目标体重值低于40kg,超出合理设定范围</td>
<td>2026-05-06 12:18</td>
@@ -75,10 +75,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
+4 -3
View File
@@ -79,10 +79,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -130,8 +131,8 @@
<main class="main">
<!-- 筛选条件 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>设备厂商</label><select class="filter-select"><option value="">全部</option><option>华为</option><option>小米</option><option>乐心</option></select></div>
<div class="filter-item"><label>设备型号</label><select class="filter-select"><option value="">全部</option><option>HW-S100</option><option>MI-Scale2</option><option>LX-Pro</option></select></div>
<button class="btn btn-primary">查询</button>
@@ -106,10 +106,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -181,9 +182,9 @@
<!-- 员工实名 -->
<div class="tab-content active" id="tab-0">
<div class="filter-bar">
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>单位部门</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option></select></div>
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>使用日期</label><input class="filter-input" type="date" style="min-width:130px;"> ~ <input class="filter-input" type="date" style="min-width:130px;"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
+4 -3
View File
@@ -71,10 +71,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -122,8 +123,8 @@
<main class="main">
<!-- 筛选栏 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>人员详情 | 历史干预 | 体重管理</title>
<title>人员详情 | 历史活动 | 体重管理</title>
<style>
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;background:#F5F7FA;color:#333;min-width:1280px;}
@@ -115,10 +115,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html" class="active">历史干预</a>
<a href="history-plan-list.html" class="active">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -132,8 +133,8 @@ tbody tr:hover{background:#F8FBFF;}
<!-- 侧边栏 -->
<aside class="sidebar">
<div class="sidebar-menu__title">历史干预</div>
<a href="history-plan-list.html" class="sidebar-item">计划列表</a>
<div class="sidebar-menu__title">历史活动</div>
<a href="history-plan-list.html" class="sidebar-item">活动列表</a>
<a href="history-personnel-list.html" class="sidebar-item active">人员列表</a>
</aside>
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>计划详情 | 历史干预 | 体重管理</title>
<title>活动详情 | 历史活动 | 体重管理</title>
<style>
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;background:#F5F7FA;color:#333;min-width:1280px;}
@@ -45,7 +45,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
.page-header__breadcrumb a:hover{color:#40a9ff;}
.page-header__breadcrumb span{color:var(--text-primary);}
/* 干预计划概览卡片 */
/* 干预活动概览卡片 */
.plan-card{background:#fff;border-radius:var(--radius-md);padding:24px;margin-bottom:16px;box-shadow:var(--shadow-sm);}
.plan-card__title{font-size:var(--font-lg);font-weight:600;color:var(--text-primary);margin-bottom:20px;}
.plan-card__grid{display:grid;grid-template-columns:repeat(8,1fr);gap:16px 20px;}
@@ -295,10 +295,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html" class="active">历史干预</a>
<a href="history-plan-list.html" class="active">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -312,9 +313,8 @@ tbody tr:hover{background:#F8FBFF;}
<!-- 侧边栏 -->
<aside class="sidebar">
<div class="sidebar-menu__title">历史干预</div>
<a href="history-plan-list.html" class="sidebar-item active">计划列表</a>
<a href="history-personnel-list.html" class="sidebar-item">人员列表</a>
<div class="sidebar-menu__title">历史活动</div>
<a href="history-plan-list.html" class="sidebar-item active">活动列表</a>
</aside>
<!-- 主内容 -->
@@ -322,10 +322,11 @@ tbody tr:hover{background:#F8FBFF;}
<!-- 页面标题 -->
<div class="page-header">
<div class="page-header__breadcrumb">体重管理 / <a href="history-plan-list.html">历史干预</a> / <span id="breadcrumbPlan">计划详情</span></div>
<div class="page-header__breadcrumb">体重管理 / <a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a> / <span id="breadcrumbPlan">活动详情</span></div>
</div>
<!-- 干预计划概览卡片 -->
<!-- 干预活动概览卡片 -->
<div class="plan-card">
<div class="plan-card__title" id="planTitle">-</div>
<div class="plan-card__grid" id="planGrid"></div>
@@ -419,27 +420,27 @@ tbody tr:hover{background:#F8FBFF;}
<!-- 每日记录 筛选栏 -->
<div class="filter-bar" id="actionFilterBar0" style="border-radius:0;">
<div class="filter-item"><label>日期范围</label><input class="filter-date" type="date" id="actDateFrom"><span style="font-size:var(--font-xs);color:var(--text-placeholder);"></span><input class="filter-date" type="date" id="actDateTo"></div>
<div class="filter-item">
<label>单位部门</label>
<div class="org-select-wrap" id="actOrgWrap">
<div class="org-trigger" id="actOrgTrigger" onclick="toggleActOrg()">全部单位/部门</div>
<div class="org-panel" id="actOrgPanel">
<div class="org-col" id="actUnitCol">
<div class="org-col__title">单位</div>
<div class="org-item active" data-unit="" onclick="selectActUnit(this,'全部单位/部门','')">全部单位/部门</div>
<div class="org-item" data-unit="第四采油厂" onclick="selectActUnit(this,'第四采油厂','第四采油厂')">第四采油厂</div>
<div class="org-item" data-unit="采油厂" onclick="selectActUnit(this,'采油厂','采油厂')">采油</div>
<div class="org-item" data-unit="采油二厂" onclick="selectActUnit(this,'采油二厂','采油二厂')">油二</div>
<div class="org-item" data-unit="采气一厂" onclick="selectActUnit(this,'采气一厂','采气一厂')">采气一厂</div>
</div>
<div class="org-col" id="actDeptCol">
<div class="org-col__title">部门</div>
<div class="org-item active" data-dept="" onclick="selectActDept(this,'全部部门','')">全部部门</div>
</div>
</div>
</div>
</div>
<div class="filter-item">
<label>单位部门</label>
<div class="org-select-wrap" id="actOrgWrap">
<div class="org-trigger" id="actOrgTrigger" onclick="toggleActOrg()">全部单位/部门</div>
<div class="org-panel" id="actOrgPanel">
<div class="org-col" id="actUnitCol">
<div class="org-col__title">单位</div>
<div class="org-item active" data-unit="" onclick="selectActUnit(this,'全部单位/部门','')">全部单位/部门</div>
<div class="org-item" data-unit="第四采油厂" onclick="selectActUnit(this,'第四采油厂','第四采油厂')">第四采油厂</div>
<div class="org-item" data-unit="采油厂" onclick="selectActUnit(this,'采油厂','采油厂')">采油</div>
<div class="org-item" data-unit="采油厂" onclick="selectActUnit(this,'采油厂','采油厂')">采油</div>
<div class="org-item" data-unit="采气一厂" onclick="selectActUnit(this,'采气一厂','采气一厂')">气一</div>
</div>
<div class="org-col" id="actDeptCol">
<div class="org-col__title">部门</div>
<div class="org-item active" data-dept="" onclick="selectActDept(this,'全部部门','')">全部部门</div>
</div>
</div>
</div>
</div>
<div class="filter-item"><label>日期范围</label><input class="filter-date" type="date" id="actDateFrom"><span style="font-size:var(--font-xs);color:var(--text-placeholder);"></span><input class="filter-date" type="date" id="actDateTo"></div>
<div class="filter-item"><label>姓名</label><input class="filter-input" id="actFilterName" placeholder="请输入姓名" style="width:100px;"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" id="actFilterEmpId" placeholder="请输入编号" style="width:110px;"></div>
<button class="btn btn-primary" onclick="applyActFilter()"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><circle cx="6" cy="6" r="4.5" stroke="#fff" stroke-width="1.3"/><path d="M9.5 9.5L13 13" stroke="#fff" stroke-width="1.3" stroke-linecap="round"/></svg>查询</button>
@@ -719,13 +720,13 @@ tbody tr:hover{background:#F8FBFF;}
<div class="tab-panel" id="tab-panel-4">
<div class="info-card">
<div class="info-card__section">
<div class="info-row"><span class="info-row__label">干预计划名称</span><span class="info-row__value" id="infoPlanName">-</span></div>
<div class="info-row"><span class="info-row__label">干预活动名称</span><span class="info-row__value" id="infoPlanName">-</span></div>
<div class="info-row"><span class="info-row__label">人员筛选</span><span class="info-row__value" id="infoPersonType">-</span></div>
<div class="info-row" id="infoDeptRow"><span class="info-row__label">指定部门</span><span class="info-row__value" id="infoDepts">-</span></div>
<div class="info-row" id="infoEmpRow"><span class="info-row__label">指定员工</span><span class="info-row__value" id="infoEmps">-</span></div>
<div class="info-row"><span class="info-row__label">是否自动提醒签订承诺书</span><span class="info-row__value" id="infoAutoRemind">-</span></div>
<div class="info-row"><span class="info-row__label">大病员工过滤</span><span class="info-row__value"><span id="infoFilterSerious">-</span> <a class="link" style="color:#FA8C16;" onclick="openSeriousModal()">查看</a></span></div>
<div class="info-row"><span class="info-row__label">计划起止日期</span><span class="info-row__value" id="infoDateRange">-</span></div>
<div class="info-row"><span class="info-row__label">活动起止日期</span><span class="info-row__value" id="infoDateRange">-</span></div>
<div class="info-row"><span class="info-row__label">组织部门</span><span class="info-row__value" id="infoPlanDept">-</span></div>
<div class="info-row"><span class="info-row__label">负责人</span><span class="info-row__value" id="infoLeader">-</span></div>
<div class="info-row"><span class="info-row__label">审核人</span><span class="info-row__value" id="infoReviewer">-</span></div>
@@ -877,9 +878,9 @@ tbody tr:hover{background:#F8FBFF;}
</div>
<script>
/* ===== 干预计划详情 ===== */
/* ===== 干预活动详情 ===== */
var plan = {
planName: '采气一厂2026下半年体重干预计划',
planName: '采气一厂2026下半年体重干预活动',
dateFrom: '2026-09-01',
dateTo: '2026-12-31',
unit: '采气一厂',
@@ -921,7 +922,7 @@ var planFields = [
{label:'人均行动得分', key:'avgActionScore'}
];
/* 填充计划卡片 */
/* 填充活动卡片 */
(function fillPlanCard(){
document.getElementById('breadcrumbPlan').textContent = plan.planName;
document.getElementById('planTitle').textContent = plan.planName + '' + plan.dateFrom + ' ~ ' + plan.dateTo + '';
@@ -1533,7 +1534,7 @@ document.addEventListener('click',function(e){
/* ===== 初始化 ===== */
/* ===== 活动信息数据 ===== */
var activityInfo = {
planName: '采气一厂2026下半年体重干预计划',
planName: '采气一厂2026下半年体重干预活动',
personType: '指定人员',
depts: ['生产技术部', '信息中心'],
emps: ['何婷(CQ001253)、马超(CQ001254)、赵鑫(CQ002101)、陈娟(CQ002102)、刘明(CQ002103)、王芳(CQ002104)、孙勇(CQ002105)、周丽(CQ002106'],
@@ -1544,7 +1545,7 @@ var activityInfo = {
leader: '赵铁柱',
reviewer: '冯审核(采气一厂卫生站)',
files: [
{name:'采气一厂2026下半年体重干预计划通知.pdf', size:'2.3 MB'},
{name:'采气一厂2026下半年体重干预活动通知.pdf', size:'2.3 MB'},
{name:'体重管理活动方案.docx', size:'1.1 MB'}
],
reward: '一、个人奖励\n1. 减重达标奖:活动结束时BMI降低≥2或体重降低≥5kg,奖励500元健康基金\n2. 最佳进步奖:减重比例前3名,分别奖励1000/800/500元\n\n二、团队奖励\n1. 部门参与率≥80%且人均减重≥2kg,奖励部门活动经费2000元'
@@ -1852,7 +1853,7 @@ var ovSortAsc = true;
var targetBmi = +(e.initBmi * 0.85).toFixed(1);
var targetFat = +(e.initFat * 0.80).toFixed(1);
var targetWaist = Math.round(e.initWaist * 0.88);
// 最终数据 — 计划结束时的状态
// 最终数据 — 活动结束时的状态
var progress = 0.6 + Math.random() * 0.4;
var finalWeight = +(e.initWeight - (e.initWeight - targetWeight) * progress).toFixed(1);
var finalBmi = +(finalWeight / ((e.height/100) * (e.height/100))).toFixed(1);
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>计划列表 | 历史干预 | 体重管理</title>
<title>活动列表 | 历史活动 | 体重管理</title>
<style>
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;background:#F5F7FA;color:#333;min-width:1280px;}
@@ -77,7 +77,7 @@ tbody tr:hover{background:#F8FBFF;}
thead th:nth-child(1){z-index:8;background:#FAFAFA;}
tbody tr:hover td:nth-child(1){background:#F8FBFF;}
/* 第二列(干预计划)固定左侧 */
/* 第二列(干预活动)固定左侧 */
thead th:nth-child(2),tbody td:nth-child(2){position:sticky;left:52px;z-index:4;background:#fff;min-width:240px;max-width:240px;text-align:left;overflow:hidden;text-overflow:ellipsis;}
thead th:nth-child(2){z-index:7;background:#FAFAFA;}
tbody tr:hover td:nth-child(2){background:#F8FBFF;}
@@ -163,10 +163,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html" class="active">历史干预</a>
<a href="history-plan-list.html" class="active">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -180,9 +181,8 @@ tbody tr:hover{background:#F8FBFF;}
<!-- 侧边栏 -->
<aside class="sidebar">
<div class="sidebar-menu__title">历史干预</div>
<a href="history-plan-list.html" class="sidebar-item active">计划列表</a>
<a href="history-personnel-list.html" class="sidebar-item">人员列表</a>
<div class="sidebar-menu__title">历史活动</div>
<a href="history-plan-list.html" class="sidebar-item active">活动列表</a>
</aside>
<!-- 主内容 -->
@@ -190,7 +190,7 @@ tbody tr:hover{background:#F8FBFF;}
<!-- 页面标题 -->
<div class="page-header">
<div class="page-header__breadcrumb">体重管理 / 历史干预 / <span>计划列表</span></div>
<div class="page-header__breadcrumb">体重管理 / 历史活动 / <span>活动列表</span></div>
</div>
<!-- [交互] 筛选栏 — 组织机构二级联动 + 年份下拉 -->
@@ -249,9 +249,9 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>组织机构</th>
<th>组织部门</th>
<th>负责部门</th>
<th>起止日期</th>
<th>人员范围</th>
<th>应参加<br>人数</th>
@@ -371,20 +371,20 @@ tbody tr:hover{background:#F8FBFF;}
});
})();
/* ===== Mock 数据:历史干预计划列表 ===== */
/* ===== Mock 数据:历史活动活动列表 ===== */
var historyPlans = [
{id:1,planName:'第四采油厂2024年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2024-03-01',dateTo:'2024-08-31',staffScope:'全厂员工',shouldCount:220,actualCount:205,notCount:15,weightGoalDone:168,fatGoalDone:152,waistGoalDone:145,avgWeightLoss:3.8,avgLossRate:4.5,avgWaistLoss:4.2,avgDailyIntake:1850,avgDailyConsume:520,avgDailyGap:330,avgScore:82.5,avgActionScore:76.3,responsible:'王建国'},
{id:2,planName:'第四采油厂2025年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'全厂员工',shouldCount:267,actualCount:251,notCount:16,weightGoalDone:198,fatGoalDone:185,waistGoalDone:172,avgWeightLoss:4.2,avgLossRate:5.1,avgWaistLoss:4.8,avgDailyIntake:1780,avgDailyConsume:560,avgDailyGap:380,avgScore:85.3,avgActionScore:79.1,responsible:'王建国'},
{id:3,planName:'第四采油厂2026年超重健康干预计划',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'全厂员工',shouldCount:234,actualCount:218,notCount:16,weightGoalDone:92,fatGoalDone:78,waistGoalDone:71,avgWeightLoss:2.1,avgLossRate:2.5,avgWaistLoss:2.3,avgDailyIntake:1920,avgDailyConsume:490,avgDailyGap:280,avgScore:74.8,avgActionScore:68.2,responsible:'王建国'},
{id:4,planName:'采油一厂2024年健康体重专项计划',unit:'采油一厂',dept:'安全环保科',dateFrom:'2024-04-01',dateTo:'2024-09-30',staffScope:'管理部门',shouldCount:156,actualCount:142,notCount:14,weightGoalDone:110,fatGoalDone:98,waistGoalDone:89,avgWeightLoss:3.5,avgLossRate:4.2,avgWaistLoss:3.9,avgDailyIntake:1900,avgDailyConsume:480,avgDailyGap:300,avgScore:80.1,avgActionScore:73.5,responsible:'李明辉'},
{id:5,planName:'采油一厂2025年员工健康体重计划',unit:'采油一厂',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',staffScope:'全厂员工',shouldCount:420,actualCount:398,notCount:22,weightGoalDone:310,fatGoalDone:285,waistGoalDone:268,avgWeightLoss:3.9,avgLossRate:4.8,avgWaistLoss:4.3,avgDailyIntake:1820,avgDailyConsume:540,avgDailyGap:360,avgScore:83.7,avgActionScore:77.8,responsible:'李明辉'},
{id:1,planName:'第四采油厂2024年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2024-03-01',dateTo:'2024-08-31',staffScope:'全厂员工',shouldCount:220,actualCount:205,notCount:15,weightGoalDone:168,fatGoalDone:152,waistGoalDone:145,avgWeightLoss:3.8,avgLossRate:4.5,avgWaistLoss:4.2,avgDailyIntake:1850,avgDailyConsume:520,avgDailyGap:330,avgScore:82.5,avgActionScore:76.3,responsible:'王建国'},
{id:2,planName:'第四采油厂2025年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',staffScope:'全厂员工',shouldCount:267,actualCount:251,notCount:16,weightGoalDone:198,fatGoalDone:185,waistGoalDone:172,avgWeightLoss:4.2,avgLossRate:5.1,avgWaistLoss:4.8,avgDailyIntake:1780,avgDailyConsume:560,avgDailyGap:380,avgScore:85.3,avgActionScore:79.1,responsible:'王建国'},
{id:3,planName:'第四采油厂2026年超重健康干预活动',unit:'第四采油厂',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',staffScope:'全厂员工',shouldCount:234,actualCount:218,notCount:16,weightGoalDone:92,fatGoalDone:78,waistGoalDone:71,avgWeightLoss:2.1,avgLossRate:2.5,avgWaistLoss:2.3,avgDailyIntake:1920,avgDailyConsume:490,avgDailyGap:280,avgScore:74.8,avgActionScore:68.2,responsible:'王建国'},
{id:4,planName:'采油一厂2024年健康体重专项活动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2024-04-01',dateTo:'2024-09-30',staffScope:'管理部门',shouldCount:156,actualCount:142,notCount:14,weightGoalDone:110,fatGoalDone:98,waistGoalDone:89,avgWeightLoss:3.5,avgLossRate:4.2,avgWaistLoss:3.9,avgDailyIntake:1900,avgDailyConsume:480,avgDailyGap:300,avgScore:80.1,avgActionScore:73.5,responsible:'李明辉'},
{id:5,planName:'采油一厂2025年员工健康体重活动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',staffScope:'全厂员工',shouldCount:420,actualCount:398,notCount:22,weightGoalDone:310,fatGoalDone:285,waistGoalDone:268,avgWeightLoss:3.9,avgLossRate:4.8,avgWaistLoss:4.3,avgDailyIntake:1820,avgDailyConsume:540,avgDailyGap:360,avgScore:83.7,avgActionScore:77.8,responsible:'李明辉'},
{id:6,planName:'采油一厂2026年体重管理专项行动',unit:'采油一厂',dept:'安全环保科',dateFrom:'2026-04-01',dateTo:'2026-09-30',staffScope:'全厂员工',shouldCount:186,actualCount:180,notCount:6,weightGoalDone:65,fatGoalDone:52,waistGoalDone:48,avgWeightLoss:1.8,avgLossRate:2.1,avgWaistLoss:2.0,avgDailyIntake:1950,avgDailyConsume:470,avgDailyGap:250,avgScore:72.3,avgActionScore:65.8,responsible:'李明辉'},
{id:7,planName:'采油二厂2024年体重控制专项计划',unit:'采油二厂',dept:'工会办公室',dateFrom:'2024-07-01',dateTo:'2024-12-31',staffScope:'一线员工',shouldCount:145,actualCount:130,notCount:15,weightGoalDone:102,fatGoalDone:89,waistGoalDone:82,avgWeightLoss:3.2,avgLossRate:3.8,avgWaistLoss:3.5,avgDailyIntake:1880,avgDailyConsume:500,avgDailyGap:320,avgScore:78.9,avgActionScore:72.1,responsible:'张翠花'},
{id:8,planName:'采油二厂2025年健康减重计划',unit:'采油二厂',dept:'工会办公室',dateFrom:'2025-05-15',dateTo:'2025-11-15',staffScope:'全厂员工',shouldCount:312,actualCount:295,notCount:17,weightGoalDone:228,fatGoalDone:202,waistGoalDone:195,avgWeightLoss:4.0,avgLossRate:4.6,avgWaistLoss:4.5,avgDailyIntake:1800,avgDailyConsume:550,avgDailyGap:370,avgScore:84.2,avgActionScore:78.6,responsible:'张翠花'},
{id:9,planName:'采油二厂2026年健康减重计划',unit:'采油二厂',dept:'工会办公室',dateFrom:'2026-05-15',dateTo:'2026-11-15',staffScope:'全厂员工',shouldCount:312,actualCount:295,notCount:17,weightGoalDone:58,fatGoalDone:42,waistGoalDone:35,avgWeightLoss:1.2,avgLossRate:1.5,avgWaistLoss:1.4,avgDailyIntake:1980,avgDailyConsume:460,avgDailyGap:220,avgScore:68.5,avgActionScore:61.2,responsible:'张翠花'},
{id:10,planName:'采气一厂2024年健康体重计划',unit:'采气一厂',dept:'生产技术部',dateFrom:'2024-06-01',dateTo:'2024-11-30',staffScope:'全厂员工',shouldCount:135,actualCount:118,notCount:17,weightGoalDone:92,fatGoalDone:78,waistGoalDone:72,avgWeightLoss:3.6,avgLossRate:4.3,avgWaistLoss:4.0,avgDailyIntake:1860,avgDailyConsume:510,avgDailyGap:340,avgScore:81.4,avgActionScore:74.9,responsible:'赵铁柱'},
{id:11,planName:'采气一厂2025年度体重管理计划',unit:'采气一厂',dept:'生产技术部',dateFrom:'2025-06-01',dateTo:'2025-12-01',staffScope:'全厂员工',shouldCount:158,actualCount:142,notCount:16,weightGoalDone:115,fatGoalDone:98,waistGoalDone:90,avgWeightLoss:4.1,avgLossRate:5.0,avgWaistLoss:4.6,avgDailyIntake:1790,avgDailyConsume:570,avgDailyGap:390,avgScore:86.0,avgActionScore:80.2,responsible:'赵铁柱'},
{id:12,planName:'采气一厂2026下半年体重干预计划',unit:'采气一厂',dept:'生产技术部',dateFrom:'2026-09-01',dateTo:'2026-12-31',staffScope:'全厂员工',shouldCount:89,actualCount:72,notCount:17,weightGoalDone:0,fatGoalDone:0,waistGoalDone:0,avgWeightLoss:0,avgLossRate:0,avgWaistLoss:0,avgDailyIntake:0,avgDailyConsume:0,avgDailyGap:0,avgScore:0,avgActionScore:0,responsible:'赵铁柱'}
{id:7,planName:'采油二厂2024年体重控制专项活动',unit:'采油二厂',dept:'工会办公室',dateFrom:'2024-07-01',dateTo:'2024-12-31',staffScope:'一线员工',shouldCount:145,actualCount:130,notCount:15,weightGoalDone:102,fatGoalDone:89,waistGoalDone:82,avgWeightLoss:3.2,avgLossRate:3.8,avgWaistLoss:3.5,avgDailyIntake:1880,avgDailyConsume:500,avgDailyGap:320,avgScore:78.9,avgActionScore:72.1,responsible:'张翠花'},
{id:8,planName:'采油二厂2025年健康减重活动',unit:'采油二厂',dept:'工会办公室',dateFrom:'2025-05-15',dateTo:'2025-11-15',staffScope:'全厂员工',shouldCount:312,actualCount:295,notCount:17,weightGoalDone:228,fatGoalDone:202,waistGoalDone:195,avgWeightLoss:4.0,avgLossRate:4.6,avgWaistLoss:4.5,avgDailyIntake:1800,avgDailyConsume:550,avgDailyGap:370,avgScore:84.2,avgActionScore:78.6,responsible:'张翠花'},
{id:9,planName:'采油二厂2026年健康减重活动',unit:'采油二厂',dept:'工会办公室',dateFrom:'2026-05-15',dateTo:'2026-11-15',staffScope:'全厂员工',shouldCount:312,actualCount:295,notCount:17,weightGoalDone:58,fatGoalDone:42,waistGoalDone:35,avgWeightLoss:1.2,avgLossRate:1.5,avgWaistLoss:1.4,avgDailyIntake:1980,avgDailyConsume:460,avgDailyGap:220,avgScore:68.5,avgActionScore:61.2,responsible:'张翠花'},
{id:10,planName:'采气一厂2024年健康体重活动',unit:'采气一厂',dept:'生产技术部',dateFrom:'2024-06-01',dateTo:'2024-11-30',staffScope:'全厂员工',shouldCount:135,actualCount:118,notCount:17,weightGoalDone:92,fatGoalDone:78,waistGoalDone:72,avgWeightLoss:3.6,avgLossRate:4.3,avgWaistLoss:4.0,avgDailyIntake:1860,avgDailyConsume:510,avgDailyGap:340,avgScore:81.4,avgActionScore:74.9,responsible:'赵铁柱'},
{id:11,planName:'采气一厂2025年度体重管理活动',unit:'采气一厂',dept:'生产技术部',dateFrom:'2025-06-01',dateTo:'2025-12-01',staffScope:'全厂员工',shouldCount:158,actualCount:142,notCount:16,weightGoalDone:115,fatGoalDone:98,waistGoalDone:90,avgWeightLoss:4.1,avgLossRate:5.0,avgWaistLoss:4.6,avgDailyIntake:1790,avgDailyConsume:570,avgDailyGap:390,avgScore:86.0,avgActionScore:80.2,responsible:'赵铁柱'},
{id:12,planName:'采气一厂2026下半年体重干预活动',unit:'采气一厂',dept:'生产技术部',dateFrom:'2026-09-01',dateTo:'2026-12-31',staffScope:'全厂员工',shouldCount:89,actualCount:72,notCount:17,weightGoalDone:0,fatGoalDone:0,waistGoalDone:0,avgWeightLoss:0,avgLossRate:0,avgWaistLoss:0,avgDailyIntake:0,avgDailyConsume:0,avgDailyGap:0,avgScore:0,avgActionScore:0,responsible:'赵铁柱'}
];
var pageSize = 10;
@@ -482,7 +482,7 @@ function renderTable(){
var waistCls = d.avgWaistLoss > 0 ? 'change-down' : (d.avgWaistLoss < 0 ? 'change-up' : 'change-zero');
html += '<tr>';
html += '<td>'+(start+i+1)+'</td>';
// [交互] 干预计划蓝色链接,点击跳转至二级详情页 history-plan-detail.html
// [交互] 干预活动蓝色链接,点击跳转至二级详情页 history-plan-detail.html
html += '<td><a class="link" href="history-plan-detail.html?id='+d.id+'">'+esc(d.planName)+'</a></td>';
html += '<td>'+esc(d.unit)+'</td>';
html += '<td>'+esc(d.dept)+'</td>';
@@ -566,7 +566,7 @@ function buildStaffData(plan){
function showStaffScope(scope, planName){
staffModalPlanName = planName;
document.getElementById('staffModalTitle').textContent = planName;
// 找到对应计划
// 找到对应活动
var plan = historyPlans.find(function(p){return p.planName === planName;});
if(plan){
staffModalPlanId = plan.id;
@@ -100,10 +100,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html" class="active">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -61,7 +61,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
.overview-card__info-label{color:var(--text-secondary);white-space:nowrap;}
.overview-card__info-value{color:var(--text-primary);}
/* 中列:计划下拉 + 初始/目标/现三列指标 */
/* 中列:活动下拉 + 初始/目标/现三列指标 */
.overview-card__plan-select{margin-bottom:6px;display:flex;align-items:center;gap:16px;}
.overview-card__plan-select .search-select{flex:1;min-width:0;}
.overview-card__plan-info{display:flex;align-items:center;gap:16px;font-size:var(--font-xs);color:var(--text-secondary);white-space:nowrap;flex-shrink:0;}
@@ -93,9 +93,9 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
.overview-card__stat-val{font-size:22px;font-weight:700;color:var(--text-primary);line-height:1.2;}
.overview-card__stat-label{font-size:var(--font-xs);color:var(--text-secondary);}
/* 搜索下拉(干预计划选择) */
/* 搜索下拉(干预活动选择) */
.search-select{position:relative;width:100%;}
.search-select__input{width:100%;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-sm);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input{width:100%;height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-xs);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input:focus{border-color:var(--primary);}
.search-select__input::placeholder{color:var(--text-placeholder);}
.search-select__panel{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:500;display:none;max-height:280px;overflow-y:auto;}
@@ -168,10 +168,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html" class="active">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -201,7 +202,7 @@ tbody tr:hover{background:#F8FBFF;}
<div class="page-header__breadcrumb">体重管理 / 个人体重管理 / <a href="personal-target-data.html">个人目标数据</a> / <span id="pageTitle">-</span></div>
</div>
<!-- [交互] 顶部三列信息卡片:左=个人信息 | 中=目标信息+计划选择 | 右=累计记录天数 -->
<!-- [交互] 顶部三列信息卡片:左=个人信息 | 中=目标信息+活动选择 | 右=累计记录天数 -->
<div class="overview-card">
<!-- 左列:个人信息 -->
<div class="overview-card__col overview-card__col--left">
@@ -215,7 +216,7 @@ tbody tr:hover{background:#F8FBFF;}
<span class="overview-card__info-label">部门</span><span class="overview-card__info-value" id="empDept">-</span>
</div>
</div>
<!-- 中列:个人目标信息 + 干预计划下拉 -->
<!-- 中列:个人目标信息 + 干预活动下拉 -->
<div class="overview-card__col overview-card__col--mid" id="midCol">
<div class="overview-card__title">个人目标信息</div>
<!-- [交互] 未设置目标时显示缺省提示 -->
@@ -228,7 +229,7 @@ tbody tr:hover{background:#F8FBFF;}
<div class="overview-card__plan-select">
<div class="search-select" id="planSelect">
<input class="search-select__input" id="planSearchInput" placeholder="选择个人目标" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空计划">×</button>
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空活动">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
<div class="overview-card__plan-info" id="planDateInfo" style="display:none;">
@@ -323,7 +324,7 @@ function getParam(name){
/* ===== 个人目标数据(员工自己创建的目标标题) ===== */
var targets = [
{id:1,title:'减重10kg计划',targetWeight:75,targetBmi:24.5,targetFat:20.0,targetWaist:85,dateFrom:'2026-03-01',dateTo:'2026-09-01'},
{id:1,title:'减重10kg活动',targetWeight:75,targetBmi:24.5,targetFat:20.0,targetWaist:85,dateFrom:'2026-03-01',dateTo:'2026-09-01'},
{id:2,title:'体脂率控制目标',targetWeight:78,targetBmi:25.5,targetFat:18.0,targetWaist:88,dateFrom:'2026-04-15',dateTo:'2026-10-15'},
{id:3,title:'腰围缩减方案',targetWeight:80,targetBmi:26.1,targetFat:22.0,targetWaist:82,dateFrom:'2026-05-01',dateTo:'2026-11-01'}
];
@@ -423,7 +424,7 @@ function renderEmployeeCard(){
document.getElementById('pageTitle').textContent = currentEmployee.name + ' 的每日记录';
}
/* ===== 计划搜索选择 ===== */
/* ===== 活动搜索选择 ===== */
function searchPlan(){
var keyword = document.getElementById('planSearchInput').value.trim().toLowerCase();
var panel = document.getElementById('planPanel');
@@ -593,7 +594,7 @@ function renderTable(){
document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页';
if(filteredData.length === 0){
tbody.innerHTML = '<tr><td colspan="8" class="td-empty">暂无匹配数据,请选择干预计划后查看</td></tr>';
tbody.innerHTML = '<tr><td colspan="8" class="td-empty">暂无匹配数据,请选择干预活动后查看</td></tr>';
return;
}
File diff suppressed because it is too large Load Diff
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>人员列表 | 历史干预 | 体重管理</title>
<title>总览记录 | 体重管理</title>
<style>
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;background:#F5F7FA;color:#333;min-width:1280px;}
@@ -129,10 +129,11 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html" class="active">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html" class="active">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -146,9 +147,9 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<!-- 侧边栏 -->
<aside class="sidebar">
<div class="sidebar-menu__title">历史干预</div>
<a href="history-plan-list.html" class="sidebar-item">计划列表</a>
<a href="history-personnel-list.html" class="sidebar-item active">人员列表</a>
<div class="sidebar-menu__title">人员数据</div>
<a href="personnel-measure-record.html" class="sidebar-item">三测记录</a>
<a href="personnel-overview-record.html" class="sidebar-item active">总览记录</a>
</aside>
<!-- 主内容 -->
@@ -156,39 +157,39 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
<!-- 页面标题 -->
<div class="page-header">
<div class="page-header__breadcrumb">体重管理 / 历史干预 / <span>人员列表</span></div>
<div class="page-header__breadcrumb">体重管理 / 历史活动 / <span>人员列表</span></div>
</div>
<!-- [交互] 筛选栏 — 姓名 + 员工编号 + 单位部门 + 日期范围 -->
<div class="filter-bar">
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:110px;">
</div>
<div class="filter-item">
<label>员工编号</label>
<input class="filter-input" id="filterEmpId" placeholder="请输入编号" style="width:120px;">
</div>
<div class="filter-item">
<label>单位部门</label>
<div class="org-wrap" id="orgWrap">
<div class="org-trigger" id="orgTrigger" onclick="toggleOrg()">全部单位/部门</div>
<div class="org-panel" id="orgPanel">
<div class="org-col" id="unitCol">
<div class="org-col__title">单位</div>
<div class="org-item active" data-unit="" onclick="selectUnit(this,'全部单位/部门','')">全部单位/部门</div>
<div class="org-item" data-unit="第四采油厂" onclick="selectUnit(this,'第四采油厂','第四采油厂')">第四采油厂</div>
<div class="org-item" data-unit="采油一厂" onclick="selectUnit(this,'采油一厂','采油一厂')">采油一厂</div>
<div class="org-item" data-unit="采油二厂" onclick="selectUnit(this,'采油二厂','采油二厂')">采油二厂</div>
<div class="org-item" data-unit="采气一厂" onclick="selectUnit(this,'采气一厂','采气一厂')">采气一厂</div>
</div>
<div class="org-col" id="deptCol">
<div class="org-col__title">部门</div>
<div class="org-item active" data-dept="" onclick="selectDept(this,'全部部门','')">全部部门</div>
</div>
</div>
</div>
</div>
<div class="filter-item">
<label>单位部门</label>
<div class="org-wrap" id="orgWrap">
<div class="org-trigger" id="orgTrigger" onclick="toggleOrg()">全部单位/部门</div>
<div class="org-panel" id="orgPanel">
<div class="org-col" id="unitCol">
<div class="org-col__title">单位</div>
<div class="org-item active" data-unit="" onclick="selectUnit(this,'全部单位/部门','')">全部单位/部门</div>
<div class="org-item" data-unit="第四采油厂" onclick="selectUnit(this,'第四采油厂','第四采油厂')">第四采油厂</div>
<div class="org-item" data-unit="采油一厂" onclick="selectUnit(this,'采油一厂','采油一厂')">采油一厂</div>
<div class="org-item" data-unit="采油二厂" onclick="selectUnit(this,'采油二厂','采油二厂')">采油二厂</div>
<div class="org-item" data-unit="采气一厂" onclick="selectUnit(this,'采气一厂','采气一厂')">采气一厂</div>
</div>
<div class="org-col" id="deptCol">
<div class="org-col__title">部门</div>
<div class="org-item active" data-dept="" onclick="selectDept(this,'全部部门','')">全部部门</div>
</div>
</div>
</div>
</div>
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:110px;">
</div>
<div class="filter-item">
<label>员工编号</label>
<input class="filter-input" id="filterEmpId" placeholder="请输入编号" style="width:120px;">
</div>
<div class="filter-item">
<label>日期范围</label>
<input class="filter-date" type="date" id="filterDateFrom">
+25 -24
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title id="pageTitle">新增计划 | 体重管理</title>
<title id="pageTitle">新增活动 | 体重管理</title>
<style>
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;background:#F5F7FA;color:#333;min-width:1280px;}
@@ -202,10 +202,11 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html" class="active">计划管理</a>
<a href="plan-list.html" class="active">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -218,15 +219,15 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
</div>
<!-- 侧边栏 -->
<aside class="sidebar">
<div class="sidebar-menu__title">计划管理</div>
<a href="plan-list.html" class="sidebar-item active">计划列表</a>
<div class="sidebar-menu__title">活动管理</div>
<a href="plan-list.html" class="sidebar-item active">活动列表</a>
</aside>
<!-- 主内容 -->
<main class="main">
<div class="form-card">
<div class="form-card__title">
<svg viewBox="0 0 22 22" fill="none"><path d="M11 2v18M2 11h18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
<span id="formCardTitle">新增计划</span>
<span id="formCardTitle">新增活动</span>
</div>
<!-- 活动组织机构 -->
@@ -290,10 +291,10 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
</div>
</div>
<!-- 计划名称 -->
<!-- 活动名称 -->
<div class="form-group">
<label>计划名称 <span class="req">*</span></label>
<input class="form-input" id="planName" placeholder="请输入计划名称">
<label>活动名称 <span class="req">*</span></label>
<input class="form-input" id="planName" placeholder="请输入活动名称">
</div>
<!-- 人员筛选 -->
@@ -352,9 +353,9 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
</label>
</div>
<!-- 计划起止日期 -->
<!-- 活动起止日期 -->
<div class="form-group">
<label>计划起止日期 <span class="req">*</span></label>
<label>活动起止日期 <span class="req">*</span></label>
<div class="date-range">
<input class="form-date" type="date" id="dateFrom">
<span></span>
@@ -577,10 +578,10 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
<!-- 底部保存栏 -->
<div class="save-bar">
<!-- [交互] 点击取消返回计划列表 -->
<!-- [交互] 点击取消返回活动列表 -->
<button class="btn btn-default" onclick="location.href='plan-list.html'">取消</button>
<!-- [交互] 点击保存校验表单后提交 -->
<button class="btn btn-primary" onclick="savePlan()">保存计划</button>
<button class="btn btn-primary" onclick="savePlan()">保存活动</button>
</div>
<!-- toast -->
@@ -1095,14 +1096,14 @@ function savePlan(){
var org = document.getElementById('planOrg').value.trim();
if(!org){showToast('请选择活动组织机构');return;}
var name = document.getElementById('planName').value.trim();
if(!name){showToast('请输入计划名称');return;}
if(!name){showToast('请输入活动名称');return;}
var personType = document.querySelector('input[name="personType"]:checked').value;
if(personType==='specific'){
if(selectedDepts.length===0 && selectedEmployees.length===0){showToast('请选择指定部门或指定员工');return;}
}
var dateFrom = document.getElementById('dateFrom').value;
var dateTo = document.getElementById('dateTo').value;
if(!dateFrom||!dateTo){showToast('请选择计划起止日期');return;}
if(!dateFrom||!dateTo){showToast('请选择活动起止日期');return;}
var dept = document.getElementById('planDept').value.trim();
if(!dept){showToast('请选择组织部门');return;}
if(!selectedLeader){showToast('请选择负责人');return;}
@@ -1139,19 +1140,19 @@ document.getElementById('empModal').addEventListener('click',function(e){
if(!id) return;
// 切换为编辑模式
document.getElementById('pageTitle').textContent = '编辑计划 | 体重管理';
document.getElementById('formCardTitle').textContent = '编辑计划';
document.getElementById('pageTitle').textContent = '编辑活动 | 体重管理';
document.getElementById('formCardTitle').textContent = '编辑活动';
// 模拟数据(实际项目中根据id请求后端)
var editData = {
1:{org:'第四采油厂',name:'第四采油厂2026年超重健康干预计划',personType:'specific',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',leader:'宋喜宁',reviewer:'李健康'},
1:{org:'第四采油厂',name:'第四采油厂2026年超重健康干预活动',personType:'specific',dept:'健康管理部',dateFrom:'2026-03-01',dateTo:'2026-08-31',leader:'宋喜宁',reviewer:'李健康'},
2:{org:'采油一厂',name:'采油一厂2026年体重管理专项行动',personType:'specific',dept:'安全环保科',dateFrom:'2026-04-01',dateTo:'2026-09-30',leader:'刘建华',reviewer:'张体检'},
3:{org:'采油二厂',name:'采油二厂2026年健康减重计划',personType:'all',dept:'工会办公室',dateFrom:'2026-05-15',dateTo:'2026-11-15',leader:'周明远',reviewer:'陈管理'},
4:{org:'采气一厂',name:'采气一厂2025年度体重管理计划',personType:'specific',dept:'健康管理部',dateFrom:'2025-06-01',dateTo:'2025-12-01',leader:'王志强',reviewer:'冯审核'},
5:{org:'第四采油厂',name:'第四采油厂2025年超重健康干预计划',personType:'all',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',leader:'宋喜宁',reviewer:'李健康'},
6:{org:'采油一厂',name:'采油一厂2025年员工健康体重计划',personType:'all',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',leader:'刘建华',reviewer:'赵预防'},
7:{org:'采气一厂',name:'采气一厂2026下半年体重干预计划',personType:'specific',dept:'健康管理部',dateFrom:'2026-09-01',dateTo:'2026-12-31',leader:'王志强',reviewer:'杨体检'},
8:{org:'采油二厂',name:'采油二厂2024年体重控制专项计划',personType:'specific',dept:'工会办公室',dateFrom:'2024-07-01',dateTo:'2024-12-31',leader:'周明远',reviewer:'陈管理'}
3:{org:'采油二厂',name:'采油二厂2026年健康减重活动',personType:'all',dept:'工会办公室',dateFrom:'2026-05-15',dateTo:'2026-11-15',leader:'周明远',reviewer:'陈管理'},
4:{org:'采气一厂',name:'采气一厂2025年度体重管理活动',personType:'specific',dept:'健康管理部',dateFrom:'2025-06-01',dateTo:'2025-12-01',leader:'王志强',reviewer:'冯审核'},
5:{org:'第四采油厂',name:'第四采油厂2025年超重健康干预活动',personType:'all',dept:'健康管理部',dateFrom:'2025-03-01',dateTo:'2025-08-31',leader:'宋喜宁',reviewer:'李健康'},
6:{org:'采油一厂',name:'采油一厂2025年员工健康体重活动',personType:'all',dept:'安全环保科',dateFrom:'2025-04-15',dateTo:'2025-10-15',leader:'刘建华',reviewer:'赵预防'},
7:{org:'采气一厂',name:'采气一厂2026下半年体重干预活动',personType:'specific',dept:'健康管理部',dateFrom:'2026-09-01',dateTo:'2026-12-31',leader:'王志强',reviewer:'杨体检'},
8:{org:'采油二厂',name:'采油二厂2024年体重控制专项活动',personType:'specific',dept:'工会办公室',dateFrom:'2024-07-01',dateTo:'2024-12-31',leader:'周明远',reviewer:'陈管理'}
};
var data = editData[id];
if(!data) return;
+52 -51
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>计划列表 | 体重管理</title>
<title>活动列表 | 体重管理</title>
<style>
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;background:#F5F7FA;color:#333;min-width:1280px;}
@@ -172,10 +172,11 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html" class="active">计划管理</a>
<a href="plan-list.html" class="active">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -187,22 +188,18 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
</div>
</div>
<aside class="sidebar">
<div class="sidebar-menu__title">计划管理</div>
<a href="plan-list.html" class="sidebar-item active">计划列表</a>
<div class="sidebar-menu__title">活动管理</div>
<a href="plan-list.html" class="sidebar-item active">活动列表</a>
</aside>
<main class="main">
<!-- 页面标题 -->
<div class="page-header">
<div class="page-header__breadcrumb">体重管理 / 计划管理 / <span>计划列表</span></div>
<div class="page-header__breadcrumb">体重管理 / 活动管理 / <span>活动列表</span></div>
</div>
<!-- [交互] 筛选条件区:输入/选择后点击查询按钮刷新列表 -->
<div class="filter-bar">
<div class="filter-item">
<label>计划名称</label>
<input class="filter-input" type="text" placeholder="请输入计划名称">
</div>
<div class="filter-item">
<label>组织机构</label>
<div class="org-select-wrap" id="filterOrgWrap">
@@ -223,6 +220,10 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
</div>
</div>
</div>
<div class="filter-item">
<label>活动名称</label>
<input class="filter-input" type="text" placeholder="请输入活动名称">
</div>
<div class="filter-item">
<label>活动状态</label>
<select class="filter-select">
@@ -246,9 +247,9 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<!-- [交互] 操作按钮区 -->
<div class="action-bar">
<!-- [交互] 点击跳转至: plan-edit.html 新增计划 -->
<!-- [交互] 点击跳转至: plan-edit.html 新增活动 -->
<button class="btn btn-primary" onclick="location.href='plan-edit.html'">
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M7 2v10M2 7h10" stroke="#fff" stroke-width="1.6" stroke-linecap="round"/></svg>新增计划
<svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M7 2v10M2 7h10" stroke="#fff" stroke-width="1.6" stroke-linecap="round"/></svg>新增活动
</button>
<!-- [交互] 点击导出当前筛选条件下的列表数据 -->
<button class="btn btn-default">
@@ -263,7 +264,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<!-- 数据表格 -->
<div class="table-card">
<div class="table-card__header">
<div class="table-card__title">计划列表</div>
<div class="table-card__title">活动列表</div>
<div class="table-card__count"><strong>8</strong> 条记录</div>
</div>
<div class="table-card__content">
@@ -272,7 +273,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<tr>
<th>序号</th>
<th>组织机构</th>
<th>计划名称</th>
<th>活动名称</th>
<th>起止日期</th>
<th>人员筛选</th>
<th>审核人员</th>
@@ -289,7 +290,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<tr>
<td>1</td>
<td>第四采油厂</td>
<td>第四采油厂2026年超重健康干预计划</td>
<td>第四采油厂2026年超重健康干预活动</td>
<td>2026/03/01 2026/08/31</td>
<td><a class="link" onclick="openPersonFilterDialog(1)">234人</a></td>
<td><a class="link" onclick="openReviewerDialog(1)">2人</a></td>
@@ -300,7 +301,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<!-- [交互] 编辑打开新增弹窗并回填数据;删除弹出二次确认 -->
<td class="td-actions">
<span style="color:var(--text-placeholder);cursor:not-allowed;">编辑</span>
<a class="link" style="color:var(--danger);" onclick="confirmDelete('第四采油厂2026年超重健康干预计划')">删除</a>
<a class="link" style="color:var(--danger);" onclick="confirmDelete('第四采油厂2026年超重健康干预活动')">删除</a>
</td>
</tr>
<tr>
@@ -322,7 +323,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<tr>
<td>3</td>
<td>采油二厂</td>
<td>采油二厂2026年健康减重计划</td>
<td>采油二厂2026年健康减重活动</td>
<td>2026/05/15 2026/11/15</td>
<td><a class="link" onclick="openPersonFilterDialog(3)">312人</a></td>
<td><a class="link" onclick="openReviewerDialog(3)">2人</a></td>
@@ -332,13 +333,13 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<td>137-6523-7890</td>
<td class="td-actions">
<span style="color:var(--text-placeholder);cursor:not-allowed;">编辑</span>
<a class="link" style="color:var(--danger);" onclick="confirmDelete('采油二厂2026年健康减重计划')">删除</a>
<a class="link" style="color:var(--danger);" onclick="confirmDelete('采油二厂2026年健康减重活动')">删除</a>
</td>
</tr>
<tr>
<td>4</td>
<td>采气一厂</td>
<td>采气一厂2026下半年体重干预计划</td>
<td>采气一厂2026下半年体重干预活动</td>
<td>2026/09/01 2026/12/31</td>
<td><a class="link" onclick="openPersonFilterDialog(7)">89人</a></td>
<td><a class="link" onclick="openReviewerDialog(7)">2人</a></td>
@@ -348,7 +349,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<td>136-8901-2345</td>
<td class="td-actions">
<a class="link" onclick="location.href='plan-edit.html?id=7'">编辑</a>
<a class="link" style="color:var(--danger);" onclick="confirmDelete('采气一厂2026下半年体重干预计划')">删除</a>
<a class="link" style="color:var(--danger);" onclick="confirmDelete('采气一厂2026下半年体重干预活动')">删除</a>
</td>
</tr>
</tbody>
@@ -366,18 +367,18 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
</main>
<!-- [弹窗] 新增/编辑计划表单 -->
<!-- [弹窗] 新增/编辑活动表单 -->
<!-- 关联文件: 本页内嵌弹窗 -->
<div class="dialog-overlay" id="addDialog">
<div class="dialog">
<div class="dialog__header">
<span id="dialogTitle">新增计划</span>
<span id="dialogTitle">新增活动</span>
<button class="dialog__close" onclick="closeAddDialog()"></button>
</div>
<div class="dialog__body">
<div class="form-group">
<label>计划名称 <span style="color:var(--danger);">*</span></label>
<input class="form-input" type="text" placeholder="请输入计划名称" id="formName">
<label>活动名称 <span style="color:var(--danger);">*</span></label>
<input class="form-input" type="text" placeholder="请输入活动名称" id="formName">
</div>
<div class="form-group">
<label>组织机构 <span style="color:var(--danger);">*</span></label>
@@ -445,7 +446,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<div class="modal-mask" id="personFilterModal">
<div class="modal modal-xl">
<div class="modal__header">
<h3 id="personFilterTitle">人员筛选 - 第四采油厂2026年超重健康干预计划</h3>
<h3 id="personFilterTitle">人员筛选 - 第四采油厂2026年超重健康干预活动</h3>
<button class="modal__close" onclick="closePersonFilter()">×</button>
</div>
<div class="modal__body">
@@ -619,7 +620,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
<div class="modal-mask" id="reviewerModal">
<div class="modal" style="width:900px;">
<div class="modal__header">
<h3 id="reviewerTitle">审核人员 - 第四采油厂2026年超重健康干预计划</h3>
<h3 id="reviewerTitle">审核人员 - 第四采油厂2026年超重健康干预活动</h3>
<button class="modal__close" onclick="closeReviewerDialog()">×</button>
</div>
<div class="modal__body">
@@ -693,7 +694,7 @@ tbody tr:hover td.td-actions{background:#F8FBFF;}
</div>
<div class="dialog__footer">
<button class="btn btn-default" onclick="closeAddPersonDialog()">取消</button>
<!-- [交互] 点击确定,将选中人员加入计划列表并关闭弹窗 -->
<!-- [交互] 点击确定,将选中人员加入活动列表并关闭弹窗 -->
<button class="btn btn-primary" id="apConfirmBtn" disabled onclick="confirmAddPerson()">确定</button>
</div>
</div>
@@ -837,7 +838,7 @@ document.addEventListener('click', function(e){
/* 新增弹窗 */
function openAddDialog() {
document.getElementById('dialogTitle').textContent = '新增计划';
document.getElementById('dialogTitle').textContent = '新增活动';
// 清空表单
document.getElementById('formName').value = '';
document.getElementById('formOrgTrigger').textContent = '请选择组织机构';
@@ -855,9 +856,9 @@ function openAddDialog() {
/* 编辑弹窗 — 回填示例数据 */
function openEditDialog(id) {
document.getElementById('dialogTitle').textContent = '编辑计划';
document.getElementById('dialogTitle').textContent = '编辑活动';
// 模拟回填(实际项目中根据id请求数据)
document.getElementById('formName').value = '第四采油厂2026年超重健康干预计划';
document.getElementById('formName').value = '第四采油厂2026年超重健康干预活动';
document.getElementById('formOrgTrigger').textContent = '第四采油厂';
formUnitCode = '第四采油厂'; formUnitName = '第四采油厂'; formDeptCode = ''; formDeptName = '';
document.getElementById('formStartDate').value = '2026-03-01';
@@ -878,7 +879,7 @@ function closeAddDialog() {
/* 提交表单 — 模拟保存 */
function submitForm() {
var name = document.getElementById('formName').value;
if (!name.trim()) { alert('请输入计划名称'); return; }
if (!name.trim()) { alert('请输入活动名称'); return; }
// 模拟保存成功
alert('保存成功');
closeAddDialog();
@@ -886,7 +887,7 @@ function submitForm() {
/* 删除确认 */
function confirmDelete(name) {
if (confirm('确定要删除计划"' + name + '"吗?删除后数据不可恢复。')) {
if (confirm('确定要删除活动"' + name + '"吗?删除后数据不可恢复。')) {
// 模拟删除
alert('已删除');
}
@@ -921,18 +922,18 @@ var currentPlanId = 0;
/* 打开人员筛选弹窗 */
function openPersonFilterDialog(planId) {
currentPlanId = planId;
// 根据planId更新标题(示例数据,实际项目中根据id获取计划信息)
// 根据planId更新标题(示例数据,实际项目中根据id获取活动信息)
var planNames = {
1:'第四采油厂2026年超重健康干预计划',
1:'第四采油厂2026年超重健康干预活动',
2:'采油一厂2026年体重管理专项行动',
3:'采油二厂2026年健康减重计划',
4:'采气一厂2025年度体重管理计划',
5:'第四采油厂2025年超重健康干预计划',
6:'采油一厂2025年员工健康体重计划',
7:'采气一厂2026下半年体重干预计划',
8:'采油二厂2024年体重控制专项计划'
3:'采油二厂2026年健康减重活动',
4:'采气一厂2025年度体重管理活动',
5:'第四采油厂2025年超重健康干预活动',
6:'采油一厂2025年员工健康体重活动',
7:'采气一厂2026下半年体重干预活动',
8:'采油二厂2024年体重控制专项活动'
};
document.getElementById('personFilterTitle').textContent = '人员筛选 - ' + (planNames[planId] || '计划');
document.getElementById('personFilterTitle').textContent = '人员筛选 - ' + (planNames[planId] || '活动');
resetPersonFilter();
document.getElementById('personFilterModal').classList.add('show');
}
@@ -1077,7 +1078,7 @@ function renderPersonTable(data) {
/* 移除人员 */
function removePerson(empId) {
if (!confirm('确定要从该计划中移除此人员吗?')) return;
if (!confirm('确定要从该活动中移除此人员吗?')) return;
allPersons = allPersons.filter(function(p) { return p.empId !== empId; });
filterPersons();
}
@@ -1108,16 +1109,16 @@ var allReviewers = [
/* 打开审核人员弹窗 */
function openReviewerDialog(planId) {
var planNames = {
1:'第四采油厂2026年超重健康干预计划',
1:'第四采油厂2026年超重健康干预活动',
2:'采油一厂2026年体重管理专项行动',
3:'采油二厂2026年健康减重计划',
4:'采气一厂2025年度体重管理计划',
5:'第四采油厂2025年超重健康干预计划',
6:'采油一厂2025年员工健康体重计划',
7:'采气一厂2026下半年体重干预计划',
8:'采油二厂2024年体重控制专项计划'
3:'采油二厂2026年健康减重活动',
4:'采气一厂2025年度体重管理活动',
5:'第四采油厂2025年超重健康干预活动',
6:'采油一厂2025年员工健康体重活动',
7:'采气一厂2026下半年体重干预活动',
8:'采油二厂2024年体重控制专项活动'
};
document.getElementById('reviewerTitle').textContent = '审核人员 - ' + (planNames[planId] || '计划');
document.getElementById('reviewerTitle').textContent = '审核人员 - ' + (planNames[planId] || '活动');
renderReviewerTable(allReviewers);
document.getElementById('reviewerModal').classList.add('show');
}
@@ -1160,7 +1161,7 @@ document.getElementById('reviewerModal').addEventListener('click', function(e) {
/* ===== 新增人员弹窗 ===== */
/* 待选人员库(不在当前计划中的人员) */
/* 待选人员库(不在当前活动中的人员) */
var candidatePersons = [
{org:'第四采油厂',dept:'财务部',name:'何强',empId:'CQ001250',height:169,weight:78,bmi:27.3},
{org:'第四采油厂',dept:'信息中心',name:'马超',empId:'CQ001251',height:182,weight:92,bmi:27.8},
@@ -129,10 +129,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html" class="active">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -42,20 +42,10 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
.page-header__breadcrumb{font-size:var(--font-sm);color:var(--text-placeholder);}
.page-header__breadcrumb span{color:var(--text-primary);}
/* 计划选择区 */
.plan-selector{background:#fff;border-radius:var(--radius-md);padding:20px 24px;margin-bottom:16px;box-shadow:var(--shadow-sm);display:flex;align-items:flex-start;gap:24px;}
.plan-selector__left{flex:1;min-width:0;max-width:400px;}
.plan-selector__label{font-size:var(--font-sm);color:var(--text-secondary);margin-bottom:8px;font-weight:500;}
.plan-selector__right{flex:1;display:flex;gap:28px;padding:18px 20px;background:#FAFAFA;border-radius:var(--radius-md);border:1px solid var(--border);min-height:78px;align-items:center;}
.plan-selector__right--empty{justify-content:center;color:var(--text-placeholder);font-size:var(--font-sm);}
.plan-info-item{display:flex;flex-direction:column;gap:6px;}
.plan-info-item__label{font-size:var(--font-xs);color:var(--text-secondary);}
.plan-info-item__value{font-size:var(--font-base);color:var(--text-primary);font-weight:600;}
.plan-info-item__value strong{color:var(--primary);font-size:var(--font-lg);}
/* 搜索下拉 */
.search-select{position:relative;width:100%;}
.search-select__input{width:100%;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-sm);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input{width:100%;height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-xs);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input:focus{border-color:var(--primary);}
.search-select__input::placeholder{color:var(--text-placeholder);}
.search-select__panel{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:500;display:none;max-height:280px;overflow-y:auto;}
@@ -209,10 +199,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html" class="active">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -237,45 +228,6 @@ tbody tr:hover{background:#F8FBFF;}
<div class="page-header__breadcrumb">体重管理 / 报名管理 / <span>报名跟踪</span></div>
</div>
<!-- [交互] 干预计划选择区 — 搜索下拉选择计划,选中后右侧展示基本信息 -->
<div class="plan-selector">
<div class="plan-selector__left">
<div class="plan-selector__label">干预计划</div>
<div class="search-select" id="planSelect">
<input class="search-select__input" id="planSearchInput" placeholder="搜索计划名称或组织机构" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<!-- [交互] 点击清空已选计划,恢复未选择状态 -->
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空计划">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<!-- [交互] 选中计划后此处展示基本信息;未选中时显示占位提示 -->
<div class="plan-selector__right plan-selector__right--empty" id="planInfoEmpty">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" style="margin-right:6px;flex-shrink:0;"><circle cx="9" cy="9" r="8" stroke="#999" stroke-width="1.2" stroke-dasharray="3 2"/><path d="M9 5v4M9 11v.5" stroke="#999" stroke-width="1.2" stroke-linecap="round"/></svg>
可选择干预计划进行查看
</div>
<div class="plan-selector__right" id="planInfo" style="display:none;">
<div class="plan-info-item">
<span class="plan-info-item__label">组织机构</span>
<span class="plan-info-item__value" id="piOrg">-</span>
</div>
<div class="plan-info-item">
<span class="plan-info-item__label">起止日期</span>
<span class="plan-info-item__value" id="piDate">-</span>
</div>
<div class="plan-info-item">
<span class="plan-info-item__label">进行天数</span>
<span class="plan-info-item__value" id="piDays">-</span>
</div>
<div class="plan-info-item">
<span class="plan-info-item__label">应参加人数</span>
<span class="plan-info-item__value"><strong id="piCount">-</strong></span>
</div>
<div class="plan-info-item">
<span class="plan-info-item__label">实际参加人数</span>
<span class="plan-info-item__value"><strong id="piActual">-</strong></span>
</div>
</div>
</div>
<!-- Tab 切换 + 筛选栏(组合为一个视觉卡片) -->
<div class="tab-bar" style="background:#fff;border-radius:var(--radius-md) var(--radius-md) 0 0;box-shadow:var(--shadow-sm);margin-bottom:0;">
@@ -320,6 +272,14 @@ tbody tr:hover{background:#F8FBFF;}
</div>
</div>
</div>
<div class="filter-item">
<label>活动名称</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="输入活动名称" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空活动">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:100px;">
@@ -391,7 +351,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>计划名称</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -428,7 +388,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>计划名称</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -460,7 +420,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>计划名称</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -493,7 +453,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>计划名称</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -527,7 +487,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>计划名称</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -620,19 +580,19 @@ tbody tr:hover{background:#F8FBFF;}
});
})();
/* ===== 干预计划数据 ===== */
/* ===== 干预活动数据 ===== */
var plans = [
{id:1,name:'第四采油厂2026年超重健康干预计划',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:1,name:'第四采油厂2026年超重健康干预活动',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:2,name:'采油一厂2026年体重管理专项行动',org:'采油一厂',dateFrom:'2026-04-01',dateTo:'2026-09-30',totalCount:186,actualCount:180},
{id:3,name:'采油二厂2026年健康减重计划',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理计划',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预计划',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重计划',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预计划',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项计划',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
{id:3,name:'采油二厂2026年健康减重活动',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理活动',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预活动',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重活动',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预活动',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项活动',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
];
/* ===== 模拟报名数据(4个状态分组,关联不同计划 ===== */
/* ===== 模拟报名数据(4个状态分组,关联不同活动 ===== */
function buildMockData(){
var baseEmployees = [
{org:'第四采油厂',dept:'健康管理部',name:'张伟',empId:'CQ001234',gender:'男',age:42,height:172,weight:85,bmi:28.7,waist:96,fat:28.5},
@@ -658,7 +618,7 @@ function buildMockData(){
{org:'采气一厂',dept:'信息中心',name:'马超',empId:'CQ001254',gender:'男',age:36,height:179,weight:95,bmi:29.6,waist:107,fat:32.0}
];
// 4个Tab的数据 — 为每个员工分配状态和计划
// 4个Tab的数据 — 为每个员工分配状态和活动
var data = [[],[],[],[],[]];
baseEmployees.forEach(function(e,i){
var status = i % 4; // 轮换分配到4个tab
@@ -720,7 +680,7 @@ var filteredData = [];
var selectedPlanId = null;
var selectedPlanName = '';
/* ===== 计划搜索选择 ===== */
/* ===== 活动搜索选择 ===== */
function searchPlan(){
var keyword = document.getElementById('planSearchInput').value.trim().toLowerCase();
var panel = document.getElementById('planPanel');
@@ -731,14 +691,14 @@ function searchPlan(){
});
}
if(filtered.length === 0){
panel.innerHTML = '<div class="search-select__empty">无匹配计划</div>';
panel.innerHTML = '<div class="search-select__empty">无匹配活动</div>';
} else {
var html = '';
filtered.forEach(function(p){
var sel = selectedPlanId === p.id ? ' selected' : '';
html += '<div class="search-select__option'+sel+'" onclick="selectPlan('+p.id+')">';
html += '<div style="font-weight:500;">'+esc(p.name)+'</div>';
html += '<div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+' | 应参加 '+p.totalCount+' 人</div>';
html += '<div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+'</div>';
html += '</div>';
});
panel.innerHTML = html;
@@ -778,7 +738,7 @@ function selectPlan(planId){
applyFilter();
}
/* [交互] 清空已选干预计划,恢复未选择状态 */
/* [交互] 清空已选干预活动,恢复未选择状态 */
function clearPlan(){
selectedPlanId = null;
document.getElementById('planSearchInput').value = '';
@@ -914,7 +874,7 @@ function applyFilter(){
var data = tabData[currentTab];
// 如果选择了计划,按计划过滤
// 如果选择了活动,按活动过滤
if(selectedPlanId){
data = data.filter(function(d){return d.planId === selectedPlanId;});
}
@@ -1072,7 +1032,7 @@ document.addEventListener('click',function(e){
plans.forEach(function(p){
html += '<div class="search-select__option" onclick="selectPlan('+p.id+')">';
html += '<div style="font-weight:500;">'+esc(p.name)+'</div>';
html += '<div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+' | 应参加 '+p.totalCount+' 人</div>';
html += '<div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+'</div>';
html += '</div>';
});
document.getElementById('planPanel').innerHTML = html;
@@ -75,10 +75,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -79,10 +79,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -130,8 +131,8 @@
<main class="main">
<!-- 筛选条件 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>设备厂商</label><select class="filter-select"><option value="">全部</option><option>华为</option><option>小米</option><option>乐心</option></select></div>
<div class="filter-item"><label>设备型号</label><select class="filter-select"><option value="">全部</option><option>HW-S100</option><option>MI-Scale2</option><option>LX-Pro</option></select></div>
<button class="btn btn-primary">查询</button>
@@ -106,10 +106,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -181,9 +182,9 @@
<!-- 员工实名 -->
<div class="tab-content active" id="tab-0">
<div class="filter-bar">
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>单位部门</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option></select></div>
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>使用日期</label><input class="filter-input" type="date" style="min-width:130px;"> ~ <input class="filter-input" type="date" style="min-width:130px;"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
@@ -71,10 +71,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -122,8 +123,8 @@
<main class="main">
<!-- 筛选栏 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
@@ -75,10 +75,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -81,10 +81,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -132,8 +133,8 @@
<main class="main">
<!-- 筛选条件 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>设备厂商</label><select class="filter-select"><option value="">全部</option><option>舒华</option><option>岱宇</option><option>康乐佳</option></select></div>
<div class="filter-item"><label>设备型号</label><select class="filter-select"><option value="">全部</option><option>SH-T5170</option><option>DY-E600</option><option>KLJ-R800</option></select></div>
<button class="btn btn-primary">查询</button>
@@ -84,10 +84,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -159,9 +160,9 @@
<!-- 员工实名 -->
<div class="tab-content active" id="tab-0">
<div class="filter-bar">
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>单位部门</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option></select></div>
<div class="filter-item"><label>员工姓名</label><input class="filter-input" placeholder="请输入姓名"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" placeholder="请输入编号"></div>
<div class="filter-item"><label>运动日期</label><input class="filter-input" type="date" style="min-width:130px;"> ~ <input class="filter-input" type="date" style="min-width:130px;"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
@@ -71,10 +71,11 @@
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html" class="active">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -122,8 +123,8 @@
<main class="main">
<!-- 筛选栏 -->
<div class="filter-bar">
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<div class="filter-item"><label>所属单位</label><select class="filter-select"><option value="">全部</option><option>采油一厂</option><option>采油二厂</option><option>采气厂</option></select></div>
<div class="filter-item"><label>设备编码</label><input class="filter-input" placeholder="请输入设备编码"></div>
<button class="btn btn-primary">查询</button>
<button class="btn btn-default">重置</button>
</div>
@@ -42,20 +42,11 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
.page-header__breadcrumb{font-size:var(--font-sm);color:var(--text-placeholder);}
.page-header__breadcrumb span{color:var(--text-primary);}
/* 计划选择区 */
.plan-selector{background:#fff;border-radius:var(--radius-md);padding:20px 24px;margin-bottom:16px;box-shadow:var(--shadow-sm);display:flex;align-items:flex-start;gap:24px;}
.plan-selector__left{flex:1;min-width:0;max-width:400px;}
.plan-selector__label{font-size:var(--font-sm);color:var(--text-secondary);margin-bottom:8px;font-weight:500;}
.plan-selector__right{flex:1;display:flex;gap:28px;padding:18px 20px;background:#FAFAFA;border-radius:var(--radius-md);border:1px solid var(--border);min-height:78px;align-items:center;}
.plan-selector__right--empty{justify-content:center;color:var(--text-placeholder);font-size:var(--font-sm);}
.plan-info-item{display:flex;flex-direction:column;gap:6px;}
.plan-info-item__label{font-size:var(--font-xs);color:var(--text-secondary);}
.plan-info-item__value{font-size:var(--font-base);color:var(--text-primary);font-weight:600;}
.plan-info-item__value strong{color:var(--primary);font-size:var(--font-lg);}
/* 活动选择区 */
/* 搜索下拉 */
.search-select{position:relative;width:100%;}
.search-select__input{width:100%;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-sm);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input{width:100%;height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-xs);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input:focus{border-color:var(--primary);}
.search-select__input::placeholder{color:var(--text-placeholder);}
.search-select__panel{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:500;display:none;max-height:280px;overflow-y:auto;}
@@ -244,10 +235,11 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html" class="active">报名管理</a>
<a href="action-record.html">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -273,31 +265,6 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
<div class="page-header__breadcrumb">体重管理 / 报名管理 / <span>目标体重审核</span></div>
</div>
<!-- [交互] 干预计划选择区 -->
<div class="plan-selector">
<div class="plan-selector__left">
<div class="plan-selector__label">干预计划</div>
<div class="search-select" id="planSelect">
<input class="search-select__input" id="planSearchInput" placeholder="搜索计划名称或组织机构" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<!-- [交互] 点击清空已选计划,恢复未选择状态 -->
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空计划">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<div class="plan-selector__right plan-selector__right--empty" id="planInfoEmpty">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" style="margin-right:6px;flex-shrink:0;"><circle cx="9" cy="9" r="8" stroke="#999" stroke-width="1.2" stroke-dasharray="3 2"/><path d="M9 5v4M9 11v.5" stroke="#999" stroke-width="1.2" stroke-linecap="round"/></svg>
可选择干预计划进行查看
</div>
<div class="plan-selector__right" id="planInfo" style="display:none;">
<div class="plan-info-item"><span class="plan-info-item__label">组织机构</span><span class="plan-info-item__value" id="piOrg">-</span></div>
<div class="plan-info-item"><span class="plan-info-item__label">起止日期</span><span class="plan-info-item__value" id="piDate">-</span></div>
<div class="plan-info-item"><span class="plan-info-item__label">进行天数</span><span class="plan-info-item__value" id="piDays">-</span></div>
<div class="plan-info-item"><span class="plan-info-item__label">应参加人数</span><span class="plan-info-item__value"><strong id="piCount">-</strong></span></div>
<div class="plan-info-item"><span class="plan-info-item__label">实际参加人数</span><span class="plan-info-item__value"><strong id="piActual">-</strong></span></div>
</div>
</div>
<!-- Tab 切换 -->
<div class="tab-bar" style="background:#fff;border-radius:var(--radius-md) var(--radius-md) 0 0;box-shadow:var(--shadow-sm);margin-bottom:0;">
<div class="tab-item active" data-tab="0" onclick="switchTab(0)">全部<span class="tab-item__badge" id="tabBadge0">0</span></div>
<div class="tab-item" data-tab="1" onclick="switchTab(1)">待审核<span class="tab-item__badge" id="tabBadge1">0</span></div>
@@ -328,6 +295,14 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
</div>
</div>
</div>
<div class="filter-item">
<label>活动名称</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="输入活动名称" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空活动">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<div class="filter-item"><label>姓名</label><input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:100px;"></div>
<div class="filter-item"><label>员工编号</label><input class="filter-input" id="filterEmpId" placeholder="请输入编号" style="width:110px;"></div>
<div class="filter-item">
@@ -362,7 +337,7 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
<div class="tab-panel active" id="tab-panel-0">
<div class="table-card__content">
<table>
<thead><tr><th>序号</th><th>计划名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>驳回时间</th><th>审核人</th><th>驳回原因</th><th>状态</th></tr></thead>
<thead><tr><th>序号</th><th>活动名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>驳回时间</th><th>审核人</th><th>驳回原因</th><th>状态</th></tr></thead>
<tbody id="tableBody0"></tbody>
</table>
</div>
@@ -371,7 +346,7 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
<div class="tab-panel" id="tab-panel-1">
<div class="table-card__content">
<table>
<thead><tr><th>序号</th><th>计划名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th class="th-actions">操作</th></tr></thead>
<thead><tr><th>序号</th><th>活动名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th class="th-actions">操作</th></tr></thead>
<tbody id="tableBody1"></tbody>
</table>
</div>
@@ -380,7 +355,7 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
<div class="tab-panel" id="tab-panel-2">
<div class="table-card__content">
<table>
<thead><tr><th>序号</th><th>计划名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>审核时间</th><th>审核人</th></tr></thead>
<thead><tr><th>序号</th><th>活动名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>审核时间</th><th>审核人</th></tr></thead>
<tbody id="tableBody2"></tbody>
</table>
</div>
@@ -389,7 +364,7 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
<div class="tab-panel" id="tab-panel-3">
<div class="table-card__content">
<table>
<thead><tr><th>序号</th><th>计划名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>审核时间</th><th>审核人</th></tr></thead>
<thead><tr><th>序号</th><th>活动名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>审核时间</th><th>审核人</th></tr></thead>
<tbody id="tableBody3"></tbody>
</table>
</div>
@@ -398,7 +373,7 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
<div class="tab-panel" id="tab-panel-4">
<div class="table-card__content">
<table>
<thead><tr><th>序号</th><th>计划名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>驳回时间</th><th>审核人</th><th>驳回原因</th></tr></thead>
<thead><tr><th>序号</th><th>活动名称</th><th>姓名</th><th>员工编号</th><th>性别</th><th>年龄</th><th>所属单位</th><th>所属部门</th><th>身高(cm)</th><th>体重(kg)</th><th>BMI</th><th>腰围(cm)</th><th>体脂(%)</th><th>提交时间</th><th>驳回时间</th><th>审核人</th><th>驳回原因</th></tr></thead>
<tbody id="tableBody4"></tbody>
</table>
</div>
@@ -467,14 +442,14 @@ tbody tr:hover .td-actions{background:#F8FBFF;}
})();
var plans = [
{id:1,name:'第四采油厂2026年超重健康干预计划',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:1,name:'第四采油厂2026年超重健康干预活动',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:2,name:'采油一厂2026年体重管理专项行动',org:'采油一厂',dateFrom:'2026-04-01',dateTo:'2026-09-30',totalCount:186,actualCount:180},
{id:3,name:'采油二厂2026年健康减重计划',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理计划',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预计划',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重计划',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预计划',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项计划',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
{id:3,name:'采油二厂2026年健康减重活动',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理活动',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预活动',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重活动',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预活动',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项活动',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
];
function buildMockData(){
@@ -548,15 +523,15 @@ var selectedPlanId = null;
var pendingAuditRow = null;
var auditDecision = '';
/* 计划搜索 */
/* 活动搜索 */
function searchPlan(){
var keyword = document.getElementById('planSearchInput').value.trim().toLowerCase();
var panel = document.getElementById('planPanel');
var filtered = keyword ? plans.filter(function(p){ return p.name.toLowerCase().indexOf(keyword)>-1 || p.org.toLowerCase().indexOf(keyword)>-1; }) : plans;
if(!filtered.length){ panel.innerHTML = '<div class="search-select__empty">无匹配计划</div>'; return; }
if(!filtered.length){ panel.innerHTML = '<div class="search-select__empty">无匹配活动</div>'; return; }
var html = '';
filtered.forEach(function(p){
html += '<div class="search-select__option'+(selectedPlanId===p.id?' selected':'')+'" onclick="selectPlan('+p.id+')"><div style="font-weight:500;">'+esc(p.name)+'</div><div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+' | 应参加 '+p.totalCount+' 人</div></div>';
html += '<div class="search-select__option'+(selectedPlanId===p.id?' selected':'')+'" onclick="selectPlan('+p.id+')"><div style="font-weight:500;">'+esc(p.name)+'</div><div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+'</div></div>';
});
panel.innerHTML = html;
}
@@ -579,7 +554,7 @@ function selectPlan(planId){
applyFilter();
}
/* [交互] 清空已选干预计划,恢复未选择状态 */
/* [交互] 清空已选干预活动,恢复未选择状态 */
function clearPlan(){
selectedPlanId = null;
document.getElementById('planSearchInput').value = '';
@@ -710,7 +685,7 @@ function showToast(msg){var t=document.getElementById('toast');t.textContent=msg
dateRange = plan.dateFrom + ' ~ ' + plan.dateTo + ' (' + totalDays + '天)';
}
var items = [
{label:'计划名称',value:row.planName,span:4},
{label:'活动名称',value:row.planName,span:4},
{label:'姓名',value:row.name},
{label:'员工编号',value:row.empId},
{label:'性别',value:row.gender},
@@ -809,7 +784,7 @@ document.addEventListener('click',function(e){
(function init(){
var html='';
plans.forEach(function(p){html+='<div class="search-select__option" onclick="selectPlan('+p.id+')"><div style="font-weight:500;">'+esc(p.name)+'</div><div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+' | 应参加 '+p.totalCount+' 人</div></div>';});
plans.forEach(function(p){html+='<div class="search-select__option" onclick="selectPlan('+p.id+')"><div style="font-weight:500;">'+esc(p.name)+'</div><div class="ss-org">'+esc(p.org)+' | '+p.dateFrom+' ~ '+p.dateTo+'</div></div>';});
document.getElementById('planPanel').innerHTML=html; applyFilter();
})();
</script>
+45 -52
View File
@@ -45,7 +45,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei
/* 搜索下拉 */
.search-select{position:relative;width:100%;}
.search-select__input{width:100%;height:40px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-sm);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input{width:100%;height:32px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:0 36px 0 12px;font-size:var(--font-xs);outline:none;transition:border-color .2s;box-sizing:border-box;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;}
.search-select__input:focus{border-color:var(--primary);}
.search-select__input::placeholder{color:var(--text-placeholder);}
.search-select__panel{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:500;display:none;max-height:280px;overflow-y:auto;}
@@ -245,10 +245,11 @@ tbody tr:hover{background:#F8FBFF;}
<div class="top-bar__logo"><svg viewBox="0 0 28 28" fill="none"><rect width="28" height="28" rx="6" fill="#1890FF"/><path d="M7 14h14M14 7v14" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/></svg> 体重管理</div>
<nav class="top-bar__nav">
<a href="archive-personal-weight-data.html">档案</a>
<a href="plan-list.html">计划管理</a>
<a href="plan-list.html">活动管理</a>
<a href="registration-tracking.html">报名管理</a>
<a href="action-record.html" class="active">过程管理</a>
<a href="history-plan-list.html">历史干预</a>
<a href="history-plan-list.html">历史活动</a>
<a href="personnel-measure-record.html">人员数据</a>
<a href="personal-target-data.html">个人体重管理</a>
<a href="scale-device.html">设备管理</a>
<a href="exception-system-dirty.html">异常事件</a>
@@ -286,18 +287,10 @@ tbody tr:hover{background:#F8FBFF;}
<!-- ===== 个人排名 Tab ===== -->
<div class="tab-panel active" id="tabPerson">
<!-- [交互] 筛选栏 — 干预计划、单位部门、姓名、员工编号 -->
<!-- [交互] 筛选栏 — 干预活动、单位部门、姓名、员工编号 -->
<div class="filter-bar">
<div class="filter-item">
<label>干预计划</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="搜索计划名称或组织机构" oninput="searchPlan()" onfocus="showPlanPanel()" autocomplete="off">
<button class="search-select__clear" id="planClearBtn" onclick="clearPlan()" title="清空计划">×</button>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<div class="filter-item">
<label>单位部门</label>
<div class="filter-item">
<label>单位部门</label>
<div class="org-select-wrap" id="orgWrap">
<div class="org-trigger" id="orgTrigger" onclick="toggleOrg()">全部单位/部门</div>
<div class="org-panel" id="orgPanel">
@@ -316,6 +309,13 @@ tbody tr:hover{background:#F8FBFF;}
</div>
</div>
</div>
<div class="filter-item">
<label>活动名称</label>
<div class="search-select" id="planSelect" style="width:280px;">
<input class="search-select__input" id="planSearchInput" placeholder="输入活动名称" onfocus="showPlanPanel()" autocomplete="off" readonly>
<div class="search-select__panel" id="planPanel"></div>
</div>
</div>
<div class="filter-item">
<label>姓名</label>
<input class="filter-input" id="filterName" placeholder="请输入姓名" style="width:100px;">
@@ -348,7 +348,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>姓名</th>
<th>员工编号</th>
<th>性别</th>
@@ -426,7 +426,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>单位</th>
<th>参与人数</th>
<th>人均减重量<br>(kg)</th>
@@ -458,7 +458,7 @@ tbody tr:hover{background:#F8FBFF;}
<thead>
<tr>
<th>序号</th>
<th>干预计划</th>
<th>活动名称</th>
<th>单位</th>
<th>部门</th>
<th>参与人数</th>
@@ -500,16 +500,16 @@ tbody tr:hover{background:#F8FBFF;}
});
})();
/* ===== 干预计划数据 ===== */
/* ===== 干预活动数据 ===== */
var plans = [
{id:1,name:'第四采油厂2026年超重健康干预计划',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:1,name:'第四采油厂2026年超重健康干预活动',org:'第四采油厂',dateFrom:'2026-03-01',dateTo:'2026-08-31',totalCount:234,actualCount:218},
{id:2,name:'采油一厂2026年体重管理专项行动',org:'采油一厂',dateFrom:'2026-04-01',dateTo:'2026-09-30',totalCount:186,actualCount:180},
{id:3,name:'采油二厂2026年健康减重计划',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理计划',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预计划',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重计划',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预计划',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项计划',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
{id:3,name:'采油二厂2026年健康减重活动',org:'采油二厂',dateFrom:'2026-05-15',dateTo:'2026-11-15',totalCount:312,actualCount:295},
{id:4,name:'采气一厂2025年度体重管理活动',org:'采气一厂',dateFrom:'2025-06-01',dateTo:'2025-12-01',totalCount:158,actualCount:142},
{id:5,name:'第四采油厂2025年超重健康干预活动',org:'第四采油厂',dateFrom:'2025-03-01',dateTo:'2025-08-31',totalCount:267,actualCount:251},
{id:6,name:'采油一厂2025年员工健康体重活动',org:'采油一厂',dateFrom:'2025-04-15',dateTo:'2025-10-15',totalCount:420,actualCount:398},
{id:7,name:'采气一厂2026下半年体重干预活动',org:'采气一厂',dateFrom:'2026-09-01',dateTo:'2026-12-31',totalCount:89,actualCount:72},
{id:8,name:'采油二厂2024年体重控制专项活动',org:'采油二厂',dateFrom:'2024-07-01',dateTo:'2024-12-31',totalCount:145,actualCount:130}
];
/* ===== 基础员工数据 ===== */
@@ -591,16 +591,16 @@ function buildPersonRankData(){
}
var personRankData = buildPersonRankData();
var selectedPlanId = null;
var selectedPlanId = 1;
/* ===== 单位排名Mock数据 ===== */
function buildUnitRankData(){
var units = ['第四采油厂','采油一厂','采油二厂','采气一厂'];
var data = [];
// 为每个计划生成二级单位数据
// 为每个活动生成二级单位数据
plans.forEach(function(p){
units.forEach(function(u){
// 按计划和单位汇总
// 按活动和单位汇总
var members = personRankData.filter(function(d){return d.org === u && d.planId === p.id;});
if(members.length === 0) return;
var count = members.length;
@@ -690,7 +690,7 @@ function switchMainTab(tab){
else { renderUnitTable(); renderUnitTable3(); }
}
/* ===== 计划搜索选择 ===== */
/* ===== 活动搜索选择 ===== */
function searchPlan(){
var keyword = document.getElementById('planSearchInput').value.trim().toLowerCase();
var panel = document.getElementById('planPanel');
@@ -701,7 +701,7 @@ function searchPlan(){
});
}
if(filtered.length === 0){
panel.innerHTML = '<div class="search-select__empty">无匹配计划</div>';
panel.innerHTML = '<div class="search-select__empty">无匹配活动</div>';
} else {
var html = '';
filtered.forEach(function(p){
@@ -721,26 +721,18 @@ function showPlanPanel(){
}
function selectPlan(planId){
selectedPlanId = planId;
var plan = plans.find(function(p){return p.id === planId;});
if(!plan) return;
document.getElementById('planSearchInput').value = plan.name;
document.getElementById('planPanel').classList.remove('show');
document.getElementById('planClearBtn').classList.add('show');
document.getElementById('planSelect').classList.add('search-select--selected');
if(mainTab === 'person'){ applyPersonFilter(); }
else { applyUnitFilter(); }
}
selectedPlanId = planId;
var plan = plans.find(function(p){return p.id === planId;});
if(!plan) return;
document.getElementById('planSearchInput').value = plan.name;
document.getElementById('planPanel').classList.remove('show');
if(mainTab === 'person'){ applyPersonFilter(); }
else { applyUnitFilter(); }
}
function clearPlan(){
selectedPlanId = null;
document.getElementById('planSearchInput').value = '';
document.getElementById('planClearBtn').classList.remove('show');
document.getElementById('planSelect').classList.remove('search-select--selected');
document.getElementById('planPanel').classList.remove('show');
if(mainTab === 'person'){ applyPersonFilter(); }
else { applyUnitFilter(); }
}
// 活动筛选为必选,不允许清空
}
/* ===== 单位部门双列面板 ===== */
var deptMap = {
@@ -872,7 +864,7 @@ function renderPersonTable(){
document.getElementById('personPageInfo').textContent = '显示 ' + pageData.length + ' 条,共 ' + personFiltered.length + ' 条记录';
document.getElementById('personPageNum').textContent = '第 ' + (personPage + 1) + '/' + totalPages + ' 页';
if(personFiltered.length === 0){
tbody.innerHTML = '<tr><td colspan="16" class="td-empty">暂无匹配数据,请选择干预计划后查看</td></tr>';
tbody.innerHTML = '<tr><td colspan="16" class="td-empty">暂无匹配数据,请选择干预活动后查看</td></tr>';
return;
}
var html = '';
@@ -953,7 +945,7 @@ function renderUnitTable(){
// 修正page超出范围
if(unitPage >= totalPages){ unitPage = Math.max(0, totalPages - 1); return renderUnitTable(); }
if(data.length === 0){
tbody.innerHTML = '<tr><td colspan="13" class="td-empty">暂无匹配数据,请选择干预计划后查看</td></tr>';
tbody.innerHTML = '<tr><td colspan="13" class="td-empty">暂无匹配数据,请选择干预活动后查看</td></tr>';
return;
}
var html = '';
@@ -1030,7 +1022,7 @@ function renderUnitTable3(){
document.getElementById('unitPageNum3').textContent = '第 ' + (unitPage3 + 1) + '/' + totalPages + ' 页';
if(unitPage3 >= totalPages){ unitPage3 = Math.max(0, totalPages - 1); return renderUnitTable3(); }
if(data.length === 0){
tbody.innerHTML = '<tr><td colspan="12" class="td-empty">暂无匹配数据,请选择干预计划后查看</td></tr>';
tbody.innerHTML = '<tr><td colspan="12" class="td-empty">暂无匹配数据,请选择干预活动后查看</td></tr>';
return;
}
var html = '';
@@ -1175,7 +1167,7 @@ document.addEventListener('click',function(e){
/* ===== 初始化 ===== */
(function init(){
// 预填充计划下拉数据
// 预填充活动下拉数据
var html = '';
plans.forEach(function(p){
html += '<div class="search-select__option" onclick="selectPlan('+p.id+')">';
@@ -1184,6 +1176,7 @@ document.addEventListener('click',function(e){
html += '</div>';
});
document.getElementById('planPanel').innerHTML = html;
selectPlan(1);
renderPersonTable();
renderUnitTable();
renderUnitTable3();