diff --git a/web-admin/weight-management/action-overview-detail.html b/web-admin/weight-management/action-overview-detail.html index 7664084..bffe6d6 100644 --- a/web-admin/weight-management/action-overview-detail.html +++ b/web-admin/weight-management/action-overview-detail.html @@ -91,9 +91,10 @@ tbody tr:last-child td{border-bottom:none;} tbody tr:hover{background:#F8FBFF;} /* 日期列固定左侧 */ -thead th:nth-child(1),tbody td:nth-child(1){position:sticky;left:0;z-index:6;background:#fff;width:100px;min-width:100px;max-width:100px;} -thead th:nth-child(1){z-index:9;background:#FAFAFA;} -tbody tr:hover td:nth-child(1){background:#F8FBFF;} +thead th:nth-child(1),tbody td:nth-child(1){width:52px;min-width:52px;max-width:52px;} +thead th:nth-child(2),tbody td:nth-child(2){position:sticky;left:0;z-index:6;background:#fff;width:100px;min-width:100px;max-width:100px;} +thead th:nth-child(2){z-index:9;background:#FAFAFA;} +tbody tr:hover td:nth-child(2){background:#F8FBFF;} /* 吃动热量差列 */ .col-diet-last{border-right:2px solid var(--border) !important;} @@ -153,7 +154,7 @@ tbody tr:hover td:nth-child(1){background:#F8FBFF;} 体重排名 活动总览 活动统计 - 食谱记录 + 食堂食谱 @@ -218,8 +219,9 @@ tbody tr:hover td:nth-child(1){background:#F8FBFF;} - - + + + @@ -614,12 +616,12 @@ function renderTable(){ document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页'; if(filtered.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ var wcCls = d.weightChange < 0 ? 'change-down' : (d.weightChange > 0 ? 'change-up' : 'change-zero'); var bcCls = d.bmiChange < 0 ? 'change-down' : (d.bmiChange > 0 ? 'change-up' : 'change-zero'); var fcCls = d.fatChange < 0 ? 'change-down' : (d.fatChange > 0 ? 'change-up' : 'change-zero'); @@ -641,6 +643,7 @@ function renderTable(){ else rankHtml = ''+d.rank+''; html += ''; + html += ''; html += ''; html += ''; html += ''; diff --git a/web-admin/weight-management/action-overview.html b/web-admin/weight-management/action-overview.html index 5a421eb..5c29834 100644 --- a/web-admin/weight-management/action-overview.html +++ b/web-admin/weight-management/action-overview.html @@ -43,17 +43,6 @@ 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;} @@ -116,16 +105,19 @@ tbody td{padding:10px 6px;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(1),tbody td:nth-child(1){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(1){z-index:9;background:#FAFAFA;} -thead th:nth-child(2),tbody td:nth-child(2){position:sticky;left:200px;z-index:5;background:#fff;width:56px;min-width:56px;max-width:56px;} -thead th:nth-child(2){z-index:8;background:#FAFAFA;} -thead th:nth-child(3),tbody td:nth-child(3){position:sticky;left:256px;z-index:4;background:#fff;width:88px;min-width:88px;max-width:88px;} -thead th:nth-child(3){z-index:7;background:#FAFAFA;} -tbody tr:hover td:nth-child(1), +/* 序号列 — 不固定 */ +thead th:nth-child(1),tbody td:nth-child(1){width:52px;min-width:52px;max-width:52px;} + +/* 干预计划/姓名/员工编号固定左侧(原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;} +thead th:nth-child(3){z-index:8;background:#FAFAFA;} +thead th:nth-child(4),tbody td:nth-child(4){position:sticky;left:256px;z-index:4;background:#fff;width:88px;min-width:88px;max-width:88px;} +thead th:nth-child(4){z-index:7;background:#FAFAFA;} tbody tr:hover td:nth-child(2), -tbody tr:hover td:nth-child(3){background:#F8FBFF;} +tbody tr:hover td:nth-child(3), +tbody tr:hover td:nth-child(4){background:#F8FBFF;} /* 赛况明细列固定右侧 — 仅第一行表头(rowspan=2的th)和tbody最后一列 */ thead tr:first-child th:last-child,tbody td:last-child{position:sticky;right:0;z-index:2;background:#fff;box-shadow:-2px 0 4px rgba(0,0,0,0.04);} @@ -188,7 +180,7 @@ tbody tr:hover td:last-child{background:#F8FBFF;} 体重排名活动总览活动统计 - 食谱记录 + 食堂食谱 @@ -199,49 +191,18 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
体重管理 / 过程管理 / 活动总览
- -
-
-
干预计划
-
- - - -
-
-
- -
- - 可选择干预计划进行查看 -
- -
- - -
- + +
+ +
+ +
+ + +
+
+
+
@@ -294,6 +255,7 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
+ @@ -515,34 +477,25 @@ 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'); - document.getElementById('planInfoEmpty').style.display = 'none'; - document.getElementById('planInfo').style.display = 'flex'; - document.getElementById('piOrg').textContent = plan.org; - document.getElementById('piDate').textContent = plan.dateFrom + ' ~ ' + plan.dateTo; - document.getElementById('piDays').textContent = calcPlanDays(plan.dateFrom, plan.dateTo) + ' 天'; - document.getElementById('piCount').textContent = plan.totalCount + ' 人'; - document.getElementById('piActual').textContent = (plan.actualCount || 0) + ' 人'; - applyFilter(); -} + 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'); + applyFilter(); + } -/* [交互] 清空已选干预计划,恢复未选择状态 */ -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'); - document.getElementById('planInfoEmpty').style.display = ''; - document.getElementById('planInfo').style.display = 'none'; - applyFilter(); -} + /* [交互] 清空已选干预计划,恢复未选择状态 */ + 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'); + applyFilter(); + } /* ===== 单位部门双列面板 ===== */ var deptMap = { @@ -631,11 +584,11 @@ function renderTable(){ document.getElementById('pageInfo').textContent = '显示 ' + pageData.length + ' 条,共 ' + filteredData.length + ' 条记录'; document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页'; if(filteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ var wcCls = d.weightChange < 0 ? 'change-down' : (d.weightChange > 0 ? 'change-up' : 'change-zero'); var bcCls = d.bmiChange < 0 ? 'change-down' : (d.bmiChange > 0 ? 'change-up' : 'change-zero'); var fcCls = d.fatChange < 0 ? 'change-down' : (d.fatChange > 0 ? 'change-up' : 'change-zero'); @@ -645,6 +598,7 @@ function renderTable(){ var fcSign = d.fatChange > 0 ? '+' : ''; var wacSign = d.waistChange > 0 ? '+' : ''; html += ''; + html += ''; html += ''; html += ''; html += ''; diff --git a/web-admin/weight-management/action-record.html b/web-admin/weight-management/action-record.html index 7693d2f..b6732ab 100644 --- a/web-admin/weight-management/action-record.html +++ b/web-admin/weight-management/action-record.html @@ -42,18 +42,7 @@ 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:focus{border-color:var(--primary);} @@ -72,7 +61,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei .search-select--selected .search-select__input{background-image:none;padding-right:32px;} /* 统计卡片 */ -.stat-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:16px;} + .stat-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:16px;} .stat-card{background:#fff;border-radius:var(--radius-md);padding:14px 20px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:6px;} .stat-card__title{font-size:var(--font-xs);color:var(--text-secondary);font-weight:500;} .stat-card__body{display:flex;align-items:baseline;gap:6px;} @@ -94,16 +83,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei .stat-card__unrecorded--clickable{cursor:pointer;text-decoration:underline;text-underline-offset:2px;} .stat-card__unrecorded--clickable:hover{color:#FF7875;} -/* 累计卡片(一行三列布局) */ -.stat-card--cumulative .stat-card__body{flex-direction:row;justify-content:space-around;gap:0;} -.stat-card--cumulative .stat-card__col{display:flex;flex-direction:column;align-items:center;gap:4px;flex:1;} -.stat-card--cumulative .stat-card__col-label{font-size:var(--font-xs);color:var(--text-secondary);} -.stat-card--cumulative .stat-card__col-value{font-size:20px;font-weight:700;color:var(--primary);} -.stat-card--cumulative .stat-card__col-unit{font-size:var(--font-sm);font-weight:400;color:var(--text-secondary);} -.stat-card__col-value--clickable{cursor:pointer;text-decoration:underline;text-underline-offset:2px;} -.stat-card__col-value--clickable:hover{opacity:0.8;} - -/* Tab 切换 */ + /* Tab 切换 */ .tab-bar{display:flex;gap:0;padding:0 24px;border-bottom:1px solid var(--border);} .tab-item{padding:12px 20px;font-size:var(--font-sm);cursor:pointer;color:var(--text-secondary);border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .2s;font-weight:500;} .tab-item:hover{color:var(--primary);} @@ -161,38 +141,41 @@ body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei .table-card__count{font-size:var(--font-sm);color:var(--text-secondary);} .table-card__content{overflow-x:auto;-webkit-overflow-scrolling:touch;} .table-card__content table{min-width:100%;white-space:nowrap;} -#tab-panel-0 .table-card__content table{min-width:2600px;} +#tab-panel-0 .table-card__content table{min-width:2650px;} table{width:100%;border-collapse:collapse;} thead th{background:#FAFAFA;padding:10px 8px;text-align:center;font-size:var(--font-xs);color:var(--text-secondary);font-weight:500;border-bottom:1px solid var(--border);white-space:nowrap;} tbody td{padding:12px 8px;text-align:center;font-size:var(--font-sm);color:var(--text-primary);border-bottom:1px solid #F0F0F0;white-space:nowrap;} tbody tr:last-child td{border-bottom:none;} tbody tr:hover{background:#F8FBFF;} -/* 前三列固定(仅表头首行) */ -thead tr:first-child th:nth-child(1),tbody td:nth-child(1){position:sticky;left:0;z-index:6;background:#fff;width:220px;min-width:220px;max-width:220px;overflow:hidden;text-overflow:ellipsis;} -thead tr:first-child th:nth-child(1){z-index:8;background:#FAFAFA;} -thead tr:first-child th:nth-child(2),tbody td:nth-child(2){position:sticky;left:220px;z-index:5;background:#fff;width:64px;min-width:64px;max-width:64px;} -thead tr:first-child th:nth-child(2){z-index:7;background:#FAFAFA;} -thead tr:first-child th:nth-child(3),tbody td:nth-child(3){position:sticky;left:284px;z-index:4;background:#fff;width:100px;min-width:100px;max-width:100px;} -thead tr:first-child th:nth-child(3){z-index:6;background:#FAFAFA;} +/* 前四列固定(仅表头首行) */ +thead tr:first-child th:nth-child(1),tbody td:nth-child(1){position:sticky;left:0;z-index:6;background:#fff;width:52px;min-width:52px;max-width:52px;} +thead tr:first-child th:nth-child(1){z-index:9;background:#FAFAFA;} +thead tr:first-child th:nth-child(2),tbody td:nth-child(2){position:sticky;left:52px;z-index:5;background:#fff;width:220px;min-width:220px;max-width:220px;overflow:hidden;text-overflow:ellipsis;} +thead tr:first-child th:nth-child(2){z-index:8;background:#FAFAFA;} +thead tr:first-child th:nth-child(3),tbody td:nth-child(3){position:sticky;left:272px;z-index:4;background:#fff;width:64px;min-width:64px;max-width:64px;} +thead tr:first-child th:nth-child(3){z-index:7;background:#FAFAFA;} +thead tr:first-child th:nth-child(4),tbody td:nth-child(4){position:sticky;left:336px;z-index:3;background:#fff;width:100px;min-width:100px;max-width:100px;} +thead tr:first-child th:nth-child(4){z-index:6;background:#FAFAFA;} tbody tr:hover td:nth-child(1), tbody tr:hover td:nth-child(2), -tbody tr:hover td:nth-child(3){background:#F8FBFF;} +tbody tr:hover td:nth-child(3), +tbody tr:hover td:nth-child(4){background:#F8FBFF;} /* 每日记录最后三列固定右侧 */ -#tab-panel-0 thead th:nth-child(26), -#tab-panel-0 tbody td:nth-child(26){position:sticky;right:136px;z-index:2;background:#fff;} -#tab-panel-0 thead th:nth-child(26){z-index:4;background:#FAFAFA;} #tab-panel-0 thead th:nth-child(27), -#tab-panel-0 tbody td:nth-child(27){position:sticky;right:68px;z-index:2;background:#fff;} +#tab-panel-0 tbody td:nth-child(27){position:sticky;right:136px;z-index:2;background:#fff;} #tab-panel-0 thead th:nth-child(27){z-index:4;background:#FAFAFA;} #tab-panel-0 thead th:nth-child(28), -#tab-panel-0 tbody td:nth-child(28){position:sticky;right:0;z-index:2;background:#fff;} +#tab-panel-0 tbody td:nth-child(28){position:sticky;right:68px;z-index:2;background:#fff;} #tab-panel-0 thead th:nth-child(28){z-index:4;background:#FAFAFA;} -#tab-panel-0 tbody tr:hover td:nth-child(26), +#tab-panel-0 thead th:nth-child(29), +#tab-panel-0 tbody td:nth-child(29){position:sticky;right:0;z-index:2;background:#fff;} +#tab-panel-0 thead th:nth-child(29){z-index:4;background:#FAFAFA;} #tab-panel-0 tbody tr:hover td:nth-child(27), -#tab-panel-0 tbody tr:hover td:nth-child(28){background:#F8FBFF;} -#tab-panel-0 tbody td:nth-child(26), -#tab-panel-0 tbody td:nth-child(27){box-shadow:-2px 0 4px rgba(0,0,0,0.04);} +#tab-panel-0 tbody tr:hover td:nth-child(28), +#tab-panel-0 tbody tr:hover td:nth-child(29){background:#F8FBFF;} +#tab-panel-0 tbody td:nth-child(27), +#tab-panel-0 tbody td:nth-child(28){box-shadow:-2px 0 4px rgba(0,0,0,0.04);} .td-empty{text-align:center;padding:48px 0;color:var(--text-placeholder);font-size:var(--font-sm);} /* 标签 */ @@ -244,6 +227,10 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;} .record-dialog__title{font-size:var(--font-lg);font-weight:600;} .record-dialog__close{width:32px;height:32px;border:none;background:none;cursor:pointer;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;color:var(--text-secondary);font-size:20px;transition:all .15s;} .record-dialog__close:hover{background:#F5F7FA;color:var(--text-primary);} +/* 弹窗内表格取消全局固定列,避免重叠 */ +.record-overlay thead th,.record-overlay tbody td{position:static;width:auto;min-width:0;max-width:none;box-shadow:none;background:#fff;} +.record-overlay thead th{background:#FAFAFA;} +.record-overlay tbody tr:hover td{background:#F8FBFF;} .record-table{width:100%;border-collapse:collapse;table-layout:auto;} .record-table th,.record-table td{padding:10px 12px;text-align:center;font-size:var(--font-sm);border-bottom:1px solid #F0F0F0;white-space:nowrap;} .record-table thead th{background:#FAFAFA;color:var(--text-secondary);font-weight:500;font-size:var(--font-xs);} @@ -287,7 +274,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;} 体重排名活动总览活动统计 - 食谱记录 + 食堂食谱
@@ -297,47 +284,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
体重管理 / 过程管理 / 行动记录
- -
-
-
干预计划
-
- - - -
-
-
- -
- - 可选择干预计划进行查看 -
- -
- - +
今日饮食
@@ -359,25 +306,8 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;} 0 人已记录,未记录 0
-
-
-
活动期间累计
-
-
- 饮食记录 - - -
-
- 运动记录 - - -
-
- 体重记录 - - -
-
-
- + +
@@ -386,11 +316,19 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
-
- -
-
- +
+ +
+
+ +
+ + +
+
+
+
+ @@ -508,6 +446,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
日期
序号日期 身高
(cm)
初始
体重(kg)
初始
BMI
暂无匹配的每日明细数据
暂无匹配的每日明细数据
'+(i+1)+''+esc(d.date)+''+d.height+''+d.initWeight+'
序号 干预计划 姓名 员工编号
暂无匹配数据,请选择干预计划后查看
暂无匹配数据,请选择干预计划后查看
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
+ @@ -536,7 +475,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
序号 单位 总人数 三测人数
- +
序号餐次摄入时间总摄入(千卡)数据来源
序号记录时间餐次总摄入(千卡)数据来源
@@ -556,7 +495,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;} - +
序号运动类型运动数据消耗(千卡)来源
序号记录时间运动类型运动数据消耗(千卡)来源
@@ -584,6 +523,23 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;} + +
+
+
+ 打卡记录 + +
+
+
+ + + +
+
+
+
+
@@ -641,6 +597,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;} + @@ -710,6 +667,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
序号 干预计划 姓名 员工编号
+ @@ -785,6 +743,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
序号 干预计划 姓名 员工编号
+ @@ -859,6 +818,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
序号 干预计划 姓名 员工编号
+ @@ -911,6 +871,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
序号 干预计划 姓名 员工编号
+ @@ -984,6 +945,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
序号 单位 部门 姓名
+ @@ -1053,6 +1015,7 @@ tbody tr:hover td:nth-child(3){background:#F8FBFF;}
序号 干预计划 姓名 员工编号
+ @@ -1237,36 +1200,27 @@ 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'); - document.getElementById('planInfoEmpty').style.display = 'none'; - document.getElementById('planInfo').style.display = 'flex'; - document.getElementById('piOrg').textContent = plan.org; - document.getElementById('piDate').textContent = plan.dateFrom + ' ~ ' + plan.dateTo; - document.getElementById('piDays').textContent = calcPlanDays(plan.dateFrom, plan.dateTo) + ' 天'; - document.getElementById('piCount').textContent = plan.totalCount + ' 人'; - document.getElementById('piActual').textContent = (plan.actualCount || 0) + ' 人'; - applyFilter(); - updateStatCards(); -} + 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'); + applyFilter(); + updateStatCards(); + } /* [交互] 清空已选干预计划,恢复未选择状态 */ 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'); - document.getElementById('planInfoEmpty').style.display = ''; - document.getElementById('planInfo').style.display = 'none'; - applyFilter(); - updateStatCards(); -} + 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'); + applyFilter(); + updateStatCards(); + } /* ===== Tab 切换 ===== */ function switchTab(idx){ @@ -1529,12 +1483,13 @@ function renderUnitTable(){ var tbody = document.getElementById('unitTableBody'); document.getElementById('unitCount').textContent = '共 ' + unitFilteredData.length + ' 个单位'; if(unitFilteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - unitFilteredData.forEach(function(d){ + unitFilteredData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1561,12 +1516,9 @@ function updateStatCards(){ document.getElementById('dietNo').textContent = dietNo; document.getElementById('exerciseRecorded').textContent = exerciseYes; document.getElementById('exerciseNo').textContent = exerciseNo; - document.getElementById('weightRecorded').textContent = weightYes; - document.getElementById('weightNo').textContent = weightNo; - document.getElementById('cumDiet').textContent = selectedPlanId ? dietYes : '-'; - document.getElementById('cumExercise').textContent = selectedPlanId ? exerciseYes : '-'; - document.getElementById('cumWeight').textContent = selectedPlanId ? weightYes : '-'; -} + document.getElementById('weightRecorded').textContent = weightYes; + document.getElementById('weightNo').textContent = weightNo; + } /* ===== 渲染每日记录表格 ===== */ function renderDailyTable(){ @@ -1581,7 +1533,7 @@ function renderDailyTable(){ return; } var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ var wcCls = d.weightChange < 0 ? 'change-down' : (d.weightChange > 0 ? 'change-up' : 'change-zero'); var bcCls = d.bmiChange < 0 ? 'change-down' : (d.bmiChange > 0 ? 'change-up' : 'change-zero'); var fcCls = d.fatChange < 0 ? 'change-down' : (d.fatChange > 0 ? 'change-up' : 'change-zero'); @@ -1591,6 +1543,7 @@ function renderDailyTable(){ var fcSign = d.fatChange > 0 ? '+' : ''; var wacSign = d.waistChange > 0 ? '+' : ''; html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1632,6 +1585,7 @@ function renderOverviewHeader(){ var html = ''; if(currentSubTab === 'weight'){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1655,6 +1609,7 @@ function renderOverviewHeader(){ html += ''; } else { html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1680,14 +1635,15 @@ function renderOverviewTable(){ document.getElementById('pageInfo1').textContent = '显示 ' + pageData.length + ' 条,共 ' + filteredData.length + ' 条记录'; document.getElementById('pageNum1').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页'; var isWeight = currentSubTab === 'weight'; - var colCount = isWeight ? 17 : 11; + var colCount = isWeight ? 18 : 12; if(filteredData.length === 0){ tbody.innerHTML = ''; return; } var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1695,7 +1651,7 @@ function renderOverviewTable(){ html += ''; html += ''; html += ''; - html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1807,8 +1763,8 @@ function openDietDialog(empId, name, date){ var kcal = (Math.floor(Math.random()*6)+3)*100 + Math.floor(Math.random()*50); html += ''; html += ''; - html += ''; html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1838,24 +1794,30 @@ function openExerciseDialog(empId, name, date){ document.getElementById('exerciseInfo').innerHTML = infoHtml; // 模拟运动记录列表 var sportTypes = ['跑步','健走','骑行','游泳','健身','瑜伽','跳绳','羽毛球','篮球','爬山']; - // 根据来源匹配运动数据:微信→步数,穿戴→心率/距离,自记→自定义,器械→组次/时长 - var dataBySource = { - '微信': ['8,523步','12,100步','6,850步','15,200步','10,030步','9,450步','7,800步','11,600步'], - '自记': ['45分钟','45分钟','45分钟','45分钟','45分钟','45分钟'], - '穿戴': ['45分钟','45分钟','45分钟','45分钟','45分钟'], - '器械': ['45分钟','45分钟','45分钟','45分钟','60分钟'] - }; var sources = ['微信','自记','穿戴','器械']; var rows = Math.floor(Math.random()*4)+2; var html = ''; for(var i=0;i'; - html += ''; + html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -1924,6 +1886,105 @@ document.getElementById('weightOverlay').addEventListener('click',function(e){ if(e.target === this) closeWeightDialog(); }); +/* ===== 打卡记录弹窗 ===== */ +function openCheckinDialog(empId, name, org, dept){ + var emp = baseEmployees.find(function(e){return e.empId === empId;}) || {}; + // 基本信息卡片 + var infoHtml = ''; + infoHtml += '
姓名:'+esc(name)+'
'; + infoHtml += '
员工编号:'+esc(empId)+'
'; + infoHtml += '
单位:'+esc(org)+'
'; + infoHtml += '
部门:'+esc(dept)+'
'; + document.getElementById('checkinInfo').innerHTML = infoHtml; + + var type = currentSubTab; + var titleMap = {weight:'体重打卡记录', diet:'饮食打卡记录', exercise:'运动打卡记录'}; + document.getElementById('checkinTitle').textContent = titleMap[type] || '打卡记录'; + + // 根据类型调整弹窗宽度和表头 + var dialog = document.getElementById('checkinDialog'); + var thead = document.getElementById('checkinThead'); + var tbody = document.getElementById('checkinTbody'); + + if(type === 'weight'){ + dialog.style.width = '860px'; + thead.innerHTML = ''; + var sources = ['自记','身高称','蓝牙称','体脂仪']; + var baseW = emp.weight || 80; + var baseBmi = emp.bmi || 28.0; + var baseFat = emp.fat || 30.0; + var baseWaist = emp.waist || 95; + var rows = Math.floor(Math.random()*4)+3; + var html = ''; + for(var i=0;i'; + } + tbody.innerHTML = html; + } else if(type === 'diet'){ + dialog.style.width = '760px'; + thead.innerHTML = ''; + var meals = ['早餐','午餐','晚餐','加餐']; + var times = ['07:30','08:15','12:00','12:30','18:00','18:45','15:30','10:00']; + var srcs = ['智记','自记']; + var rows = Math.floor(Math.random()*5)+3; + var html = ''; + for(var i=0;i'; + } + tbody.innerHTML = html; + } else { + dialog.style.width = '900px'; + thead.innerHTML = ''; + var sportTypes = ['跑步','健走','骑行','游泳','健身','瑜伽','跳绳','羽毛球','篮球','爬山']; + var sources = ['微信','自记','穿戴','器械']; + var rows = Math.floor(Math.random()*4)+3; + var html = ''; + for(var i=0;i'; + } + tbody.innerHTML = html; + } + document.getElementById('checkinOverlay').classList.add('show'); +} + +function closeCheckinDialog(){ + document.getElementById('checkinOverlay').classList.remove('show'); +} + +document.getElementById('checkinOverlay').addEventListener('click',function(e){ + if(e.target === this) closeCheckinDialog(); +}); + /* ===== 今日饮食未记录弹窗 ===== */ var dietUnrecAllData = []; var dietUnrecFilteredData = []; @@ -2026,12 +2087,13 @@ function renderDietUnrecTable(){ var tbody = document.getElementById('dietUnrecTbody'); document.getElementById('dietUnrecCount').textContent = '共 ' + dietUnrecFilteredData.length + ' 人未记录'; if(dietUnrecFilteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - dietUnrecFilteredData.forEach(function(d){ + dietUnrecFilteredData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -2158,12 +2220,13 @@ function renderDietRecTable(){ var tbody = document.getElementById('dietRecTbody'); document.getElementById('dietRecCount').textContent = '共 ' + dietRecFilteredData.length + ' 人已记录'; if(dietRecFilteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - dietRecFilteredData.forEach(function(d){ + dietRecFilteredData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -2298,12 +2361,13 @@ function renderExRecTable(){ var tbody = document.getElementById('exRecTbody'); document.getElementById('exRecCount').textContent = '共 ' + exRecFilteredData.length + ' 人已记录'; if(exRecFilteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - exRecFilteredData.forEach(function(d){ + exRecFilteredData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -2429,12 +2493,13 @@ function renderWtRecTable(){ var tbody = document.getElementById('wtRecTbody'); document.getElementById('wtRecCount').textContent = '共 ' + wtRecFilteredData.length + ' 人已记录'; if(wtRecFilteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - wtRecFilteredData.forEach(function(d){ + wtRecFilteredData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -2528,13 +2593,14 @@ function renderCumTable(){ var count = cumAllData.length; document.getElementById('cumTableCount').textContent = '共 ' + count + ' 人'; if(count === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; var dayField = cumCurrentTab === 'diet' ? 'dietDays' : (cumCurrentTab === 'exercise' ? 'exerciseDays' : 'weightDays'); - cumAllData.forEach(function(d){ + cumAllData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -2649,12 +2715,13 @@ function renderExUnrecTable(){ var tbody = document.getElementById('exUnrecTbody'); document.getElementById('exUnrecCount').textContent = '共 ' + exUnrecFilteredData.length + ' 人未记录'; if(exUnrecFilteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - exUnrecFilteredData.forEach(function(d){ + exUnrecFilteredData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -2765,12 +2832,13 @@ function renderWtUnrecTable(){ var tbody = document.getElementById('wtUnrecTbody'); document.getElementById('wtUnrecCount').textContent = '共 ' + wtUnrecFilteredData.length + ' 人未记录'; if(wtUnrecFilteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - wtUnrecFilteredData.forEach(function(d){ + wtUnrecFilteredData.forEach(function(d,i){ html += ''; + html += ''; html += ''; html += ''; html += ''; diff --git a/web-admin/weight-management/activity-statistics.html b/web-admin/weight-management/activity-statistics.html index 2931ac9..6b95f6d 100644 --- a/web-admin/weight-management/activity-statistics.html +++ b/web-admin/weight-management/activity-statistics.html @@ -43,17 +43,6 @@ 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;} @@ -119,15 +108,15 @@ 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(1),tbody td:nth-child(1){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(1){z-index:7;background:#FAFAFA;} -tbody tr:hover td:nth-child(1){background:#F8FBFF;} - -/* 第二列(单位)固定左侧 */ -thead th:nth-child(2),tbody td:nth-child(2){position:sticky;left:240px;z-index:3;background:#fff;min-width:120px;max-width:120px;} -thead th:nth-child(2){z-index:6;background:#FAFAFA;} -tbody tr:hover td:nth-child(2){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;} + + /* 第三列(组织机构)固定左侧 */ + thead th:nth-child(3),tbody td:nth-child(3){position:sticky;left:240px;z-index:3;background:#fff;min-width:120px;max-width:120px;} + thead th:nth-child(3){z-index:6;background:#FAFAFA;} + tbody tr:hover td:nth-child(3){background:#F8FBFF;} .td-empty{text-align:center;padding:48px 0;color:var(--text-placeholder);font-size:var(--font-sm);} @@ -176,7 +165,7 @@ tbody tr:hover td:nth-child(2){background:#F8FBFF;} 体重排名活动总览活动统计 - 食谱记录 + 食堂食谱 @@ -187,49 +176,18 @@ tbody tr:hover td:nth-child(2){background:#F8FBFF;}
体重管理 / 过程管理 / 活动统计
- -
-
-
干预计划
-
- - - -
-
-
- -
- - 可选择干预计划进行查看 -
- -
- - -
- + +
+ +
+ +
+ + +
+
+
+
@@ -281,6 +239,7 @@ tbody tr:hover td:nth-child(2){background:#F8FBFF;}
序号 干预计划 姓名 员工编号
暂无匹配数据
暂无匹配数据
'+(i+1)+''+esc(d.org)+''+d.total+''+d.measured+'
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
序号干预计划姓名员工编号
序号干预计划姓名员工编号
暂无匹配数据
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+''+d.age+''+esc(d.org)+''+esc(d.dept)+''+d.checkinCount+''+d.checkinCount+''+d.checkinDays+''+esc(d.firstDate)+''+esc(d.lastDate)+'
'+(i+1)+''+meals[i % meals.length]+''+date+' '+times[i % times.length]+''+meals[i % meals.length]+''+kcal+''+sources[Math.floor(Math.random()*2)]+'
'+sportTypes[i % sportTypes.length]+''+timeStr2+''+type+''+sportData+''+kcal+''+source+'
序号记录时间体重(kg)BMI体脂率(%)腰围(cm)数据来源
'+timeStr+''+w+''+bmi+''+fat+''+(waist==='-'?'-':waist)+''+source+'
序号记录时间餐次总摄入(千卡)数据来源
'+dateStr+' '+times[i%8]+''+meals[i%4]+''+kcal+''+srcs[i%2]+'
序号记录时间运动类型运动数据消耗(千卡)来源
'+timeStr+''+type+''+data+''+kcal+''+source+'
暂无未记录员工
暂无未记录员工
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
暂无已记录员工
暂无已记录员工
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
暂无已记录员工
暂无已记录员工
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
暂无已记录员工
暂无已记录员工
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
暂无数据,请先选择干预计划
暂无数据,请先选择干预计划
'+(i+1)+''+esc(d.org)+''+esc(d.dept)+''+esc(d.name)+'
暂无未记录员工
暂无未记录员工
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
暂无未记录员工
暂无未记录员工
'+(i+1)+''+esc(d.planName)+''+esc(d.name)+''+esc(d.empId)+'
+ @@ -461,34 +420,25 @@ 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'); - document.getElementById('planInfoEmpty').style.display = 'none'; - document.getElementById('planInfo').style.display = 'flex'; - document.getElementById('piOrg').textContent = plan.org; - document.getElementById('piDate').textContent = plan.dateFrom + ' ~ ' + plan.dateTo; - document.getElementById('piDays').textContent = calcPlanDaysNum(plan.dateFrom, plan.dateTo) + ' 天'; - document.getElementById('piCount').textContent = plan.totalCount + ' 人'; - document.getElementById('piActual').textContent = (plan.actualCount || 0) + ' 人'; - applyFilter(); -} + 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'); + applyFilter(); + } -/* [交互] 清空已选干预计划,恢复未选择状态 */ -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'); - document.getElementById('planInfoEmpty').style.display = ''; - document.getElementById('planInfo').style.display = 'none'; - applyFilter(); -} + /* [交互] 清空已选干预计划,恢复未选择状态 */ + 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'); + applyFilter(); + } /* ===== 单位多选 ===== */ function toggleUnitMulti(){ @@ -580,16 +530,17 @@ function renderTable(){ document.getElementById('pageInfo').textContent = '显示 ' + pageData.length + ' 条,共 ' + filteredData.length + ' 条记录'; document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页'; if(filteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ var lossCls = d.avgWeightLoss < 0 ? 'change-up' : (d.avgWeightLoss > 0 ? 'change-down' : 'change-zero'); var bmiCls = d.avgBmiDrop < 0 ? 'change-up' : (d.avgBmiDrop > 0 ? 'change-down' : 'change-zero'); var lossSign = d.avgWeightLoss > 0 ? '-' : (d.avgWeightLoss < 0 ? '+' : ''); var bmiSign = d.avgBmiDrop > 0 ? '-' : (d.avgBmiDrop < 0 ? '+' : ''); html += ''; + html += ''; html += ''; html += ''; html += ''; diff --git a/web-admin/weight-management/archive-personal-weight-data.html b/web-admin/weight-management/archive-personal-weight-data.html index dc1b9ec..f356008 100644 --- a/web-admin/weight-management/archive-personal-weight-data.html +++ b/web-admin/weight-management/archive-personal-weight-data.html @@ -79,10 +79,10 @@ tbody td{padding:10px 7px;text-align:center;font-size:var(--font-sm);color:var(- tbody tr:last-child td{border-bottom:none;} tbody tr:hover{background:#F8FBFF;} -/* 第一列(姓名)固定左侧 — 仅第一行表头(避免rowspan第二行误匹配) */ -thead tr:first-child th:nth-child(1),tbody td:nth-child(1){position:sticky;left:0;z-index:5;background:#fff;min-width:80px;max-width:80px;box-shadow:2px 0 6px rgba(0,0,0,0.08);} -thead tr:first-child th:nth-child(1){z-index:8;background:#FAFAFA;} -tbody tr:hover td:nth-child(1){background:#F8FBFF;} +/* 第二列(姓名)固定左侧 — 仅第一行表头(避免rowspan第二行误匹配) */ +thead tr:first-child th:nth-child(2),tbody td:nth-child(2){position:sticky;left:0;z-index:5;background:#fff;min-width:80px;max-width:80px;box-shadow:2px 0 6px rgba(0,0,0,0.08);} +thead tr:first-child th:nth-child(2){z-index:8;background:#FAFAFA;} +tbody tr:hover td:nth-child(2){background:#F8FBFF;} /* 最后一列(详细数据)固定右侧 — 仅第一行表头(避免rowspan第二行误匹配到"变化"列) */ thead tr:first-child th:last-child,tbody td:last-child{position:sticky;right:0;z-index:5;background:#fff;min-width:80px;max-width:80px;box-shadow:-2px 0 6px rgba(0,0,0,0.08);} @@ -223,6 +223,7 @@ tbody tr:hover td:last-child{background:#F8FBFF;}
序号 干预计划 组织机构 起止日期
暂无匹配数据,请选择干预计划后查看
暂无匹配数据,请选择干预计划后查看
'+(i+1)+''+esc(d.planName)+''+esc(d.unit)+''+d.dateFrom+' ~ '+d.dateTo+'
+ @@ -406,16 +407,17 @@ function renderTable(){ document.getElementById('pageInfo').textContent = '显示 ' + pageData.length + ' 条,共 ' + filteredData.length + ' 条记录'; document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页'; if(filteredData.length === 0){ - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ var wCls = d.weightChange < 0 ? 'change-down' : (d.weightChange > 0 ? 'change-up' : 'change-zero'); var bCls = d.bmiChange < 0 ? 'change-down' : (d.bmiChange > 0 ? 'change-up' : 'change-zero'); var fCls = d.fatChange < 0 ? 'change-down' : (d.fatChange > 0 ? 'change-up' : 'change-zero'); var waCls = d.waistChange < 0 ? 'change-down' : (d.waistChange > 0 ? 'change-up' : 'change-zero'); html += ''; + html += ''; html += ''; html += ''; html += ''; diff --git a/web-admin/weight-management/archive-personal-weight-detail.html b/web-admin/weight-management/archive-personal-weight-detail.html index 8277585..9b1bdb7 100644 --- a/web-admin/weight-management/archive-personal-weight-detail.html +++ b/web-admin/weight-management/archive-personal-weight-detail.html @@ -199,7 +199,7 @@ tbody tr:hover{background:#F8FBFF;}
序号 姓名 员工编号 性别
暂无匹配数据
暂无匹配数据
'+(i+1)+''+esc(d.name)+''+esc(d.empId)+''+d.gender+'
- +
时间餐次摄入热量(千卡)来源
序号时间餐次摄入热量(千卡)来源
@@ -217,7 +217,7 @@ tbody tr:hover{background:#F8FBFF;}
- +
时间运动类型运动时长/数据消耗热量(千卡)来源
序号时间运动类型运动时长/数据消耗热量(千卡)来源
@@ -235,7 +235,7 @@ tbody tr:hover{background:#F8FBFF;}
- +
时间体重(kg)BMI体脂率(%)腰围(cm)来源
序号时间体重(kg)BMI体脂率(%)腰围(cm)来源
@@ -400,15 +400,16 @@ function renderDiet(){ document.getElementById('dietPageNum').textContent = '第 ' + (dietPage + 1) + '/' + totalPages + ' 页'; var srcTag = {智记:'tag-green',自记:'tag-gray'}; var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ html += ''; + html += ''+(i+1)+''; html += ''+d.time+''; html += ''+d.meal+''; html += ''+d.calories+''; html += ''+d.source+''; html += ''; }); - tbody.innerHTML = html || '暂无饮食记录'; + tbody.innerHTML = html || '暂无饮食记录'; } function dietGoPage(delta){ @@ -431,8 +432,9 @@ function renderSport(){ document.getElementById('sportPageNum').textContent = '第 ' + (sportPage + 1) + '/' + totalPages + ' 页'; var srcTag = {穿戴:'tag-blue',微信:'tag-green',自记:'tag-gray',器械:'tag-orange'}; var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ html += ''; + html += ''+(i+1)+''; html += ''+d.time+''; html += ''+d.type+''; html += ''+d.data+''; @@ -440,7 +442,7 @@ function renderSport(){ html += ''+d.source+''; html += ''; }); - tbody.innerHTML = html || '暂无运动记录'; + tbody.innerHTML = html || '暂无运动记录'; } function sportGoPage(delta){ @@ -463,8 +465,9 @@ function renderWeight(){ document.getElementById('weightPageNum').textContent = '第 ' + (weightPage + 1) + '/' + totalPages + ' 页'; var srcTag = {身高秤:'tag-blue',体脂仪:'tag-orange',蓝牙称:'tag-green',自记:'tag-gray'}; var html = ''; - pageData.forEach(function(d){ + pageData.forEach(function(d,i){ html += ''; + html += ''+(i+1)+''; html += ''+d.time+''; html += ''+d.weight.toFixed(1)+''; html += ''+d.bmi.toFixed(1)+''; @@ -473,7 +476,7 @@ function renderWeight(){ html += ''+d.source+''; html += ''; }); - tbody.innerHTML = html || '暂无体重记录'; + tbody.innerHTML = html || '暂无体重记录'; } function weightGoPage(delta){ diff --git a/web-admin/weight-management/archive-unit-report-detail.html b/web-admin/weight-management/archive-unit-report-detail.html index 758c084..dfc86aa 100644 --- a/web-admin/weight-management/archive-unit-report-detail.html +++ b/web-admin/weight-management/archive-unit-report-detail.html @@ -252,6 +252,7 @@ tbody tr:hover{background:#F8FBFF;} + @@ -424,13 +425,14 @@ function renderTable() { document.getElementById('pageNum').textContent = '第 ' + (currentPage + 1) + '/' + totalPages + ' 页'; if (filteredActivities.length === 0) { - tbody.innerHTML = ''; + tbody.innerHTML = ''; return; } var html = ''; - pageData.forEach(function(d) { + pageData.forEach(function(d,i) { html += ''; + html += ''; html += ''; html += ''; html += ''; diff --git a/web-admin/weight-management/bluetooth-device.html b/web-admin/weight-management/bluetooth-device.html index 8ee156d..c517f49 100644 --- a/web-admin/weight-management/bluetooth-device.html +++ b/web-admin/weight-management/bluetooth-device.html @@ -83,13 +83,14 @@ .member-table{width:100%;border-collapse:collapse;table-layout:fixed;} .member-table thead th{background:#FAFAFA;padding:10px 8px;text-align:left;font-size:var(--font-xs);color:var(--text-secondary);font-weight:500;border-bottom:1px solid var(--border);white-space:nowrap;} .member-table tbody td{padding:10px 8px;font-size:var(--font-sm);color:var(--text-primary);border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} - .member-table th:nth-child(1){width:60px;} - .member-table th:nth-child(2){width:180px;} - .member-table th:nth-child(3){width:44px;} + .member-table th:nth-child(1){width:40px;} + .member-table th:nth-child(2){width:60px;} + .member-table th:nth-child(3){width:180px;} .member-table th:nth-child(4){width:44px;} - .member-table th:nth-child(5){width:60px;} - .member-table th:nth-child(6){width:120px;} - .member-table th:nth-child(7){width:90px;} + .member-table th:nth-child(5){width:44px;} + .member-table th:nth-child(6){width:60px;} + .member-table th:nth-child(7){width:120px;} + .member-table th:nth-child(8){width:90px;} .member-table tbody tr:last-child td{border-bottom:none;} .tag-blue{background:var(--primary-light);color:var(--primary);display:inline-flex;align-items:center;padding:2px 8px;border-radius:10px;font-size:var(--font-xs);} /* 添加成员按钮 */ @@ -200,14 +201,14 @@
序号 干预计划 组织机构 组织部门
暂无活动数据
暂无活动数据
'+(i+1)+'' + esc(d.planName) + '' + esc(d.unit) + '' + esc(d.dept) + '
- - - - - - - - + + + + + + + +
设备编码设备名称设备厂商设备型号所属单位布放位置入库日期设备状态操作
BT-2024-001蓝牙称A1华为HW-S100采油一厂职工活动中心1F2024-03-15正常详情 成员管理 编辑 删除
BT-2024-002蓝牙称A2小米MI-Scale2采油一厂办公楼2F健身房2024-03-18正常详情 成员管理 编辑 删除
BT-2024-003蓝牙称B1乐心LX-Pro采油二厂员工食堂入口2024-04-02维护中详情 成员管理 编辑 删除
BT-2024-004蓝牙称B2华为HW-S100采油二厂宿舍楼大厅2024-04-10正常详情 成员管理 编辑 删除
BT-2024-005蓝牙称C1小米MI-Scale2采气厂综合办公楼1F2024-05-08已停用详情 成员管理 编辑 删除
序号设备编码设备名称设备厂商设备型号所属单位布放位置入库日期设备状态操作
1BT-2024-001蓝牙称A1华为HW-S100采油一厂职工活动中心1F2024-03-15正常详情 成员管理 编辑 删除
2BT-2024-002蓝牙称A2小米MI-Scale2采油一厂办公楼2F健身房2024-03-18正常详情 成员管理 编辑 删除
3BT-2024-003蓝牙称B1乐心LX-Pro采油二厂员工食堂入口2024-04-02维护中详情 成员管理 编辑 删除
4BT-2024-004蓝牙称B2华为HW-S100采油二厂宿舍楼大厅2024-04-10正常详情 成员管理 编辑 删除
5BT-2024-005蓝牙称C1小米MI-Scale2采气厂综合办公楼1F2024-05-08已停用详情 成员管理 编辑 删除
- +
姓名身份证性别年龄身高是否为CQ员工员工编号同步设备
序号姓名身份证性别年龄身高是否为CQ员工员工编号同步设备
diff --git a/web-admin/weight-management/bluetooth-monitor-detail.html b/web-admin/weight-management/bluetooth-monitor-detail.html index 7b0df1d..dd87f0c 100644 --- a/web-admin/weight-management/bluetooth-monitor-detail.html +++ b/web-admin/weight-management/bluetooth-monitor-detail.html @@ -182,15 +182,15 @@ - + - - - + + +
姓名员工编号所属单位所属部门性别年龄使用时间序号姓名员工编号所属单位所属部门性别年龄使用时间 监测数据更多信息
身高(cm)体重(kg)BMI基础代谢体脂肪量(kg)体脂肪率(%)
张三EMP001采油一厂生产部352026-05-13 08:3017572.523.71,68015.221.0查看
李四EMP002采油一厂技术部282026-05-13 09:1516255.021.01,32013.825.1查看
王五EMP003采油一厂安全部422026-05-13 10:0517078.027.01,58019.525.0查看
1张三EMP001采油一厂生产部352026-05-13 08:3017572.523.71,68015.221.0查看
2李四EMP002采油一厂技术部282026-05-13 09:1516255.021.01,32013.825.1查看
3王五EMP003采油一厂安全部422026-05-13 10:0517078.027.01,58019.525.0查看
@@ -212,6 +212,32 @@ function toggleSubgroup(h){var p=h.parentElement;var sidebar=p.closest("aside");if(sidebar)sidebar.querySelectorAll(".sidebar-subgroup.open").forEach(function(g){if(g!==p)g.classList.remove("open");});p.classList.toggle("open");} (function(){var a=document.querySelector('.sidebar-item.active');if(!a)return;var sidebar=document.querySelector('aside');if(sidebar)sidebar.querySelectorAll('.sidebar-subgroup.open').forEach(function(g){g.classList.remove('open');});var s=a.closest('.sidebar-subgroup');if(s)s.classList.add('open');})(); function closeDialog(){document.getElementById('dialogMask').classList.remove('show');} + +/* 根据URL参数period设置日期筛选 */ +(function(){ + var params = new URLSearchParams(location.search); + var period = params.get('period'); + if(!period) return; + function fd(d){ return d.getFullYear()+'-'+('0'+(d.getMonth()+1)).slice(-2)+'-'+('0'+d.getDate()).slice(-2); } + var today = new Date(); + var dateFrom = '', dateTo = ''; + if(period === 'week'){ + var day = today.getDay() || 7; + var monday = new Date(today); monday.setDate(today.getDate() - day + 1); + var sunday = new Date(today); sunday.setDate(today.getDate() - day + 7); + dateFrom = fd(monday); dateTo = fd(sunday); + } else if(period === 'month'){ + dateFrom = fd(new Date(today.getFullYear(), today.getMonth(), 1)); + dateTo = fd(new Date(today.getFullYear(), today.getMonth() + 1, 0)); + } else if(period === 'year'){ + dateFrom = today.getFullYear()+'-01-01'; + dateTo = today.getFullYear()+'-12-31'; + } + if(dateFrom){ + var inputs = document.querySelectorAll('.filter-input[type="date"]'); + if(inputs.length >= 2){ inputs[0].value = dateFrom; inputs[1].value = dateTo; } + } +})(); (function(){ var mask=document.getElementById('dialogMask'); var body=document.getElementById('dialogBody'); diff --git a/web-admin/weight-management/bluetooth-monitor.html b/web-admin/weight-management/bluetooth-monitor.html index 5f5dd3b..55a9fea 100644 --- a/web-admin/weight-management/bluetooth-monitor.html +++ b/web-admin/weight-management/bluetooth-monitor.html @@ -136,17 +136,17 @@
- - - - - - - - - - - + + + + + + + + + + +
设备名称设备编码设备所属单位布放位置本周使用次数本月使用次数本年使用次数累计使用次数操作
蓝牙体脂称A01BT-2024-001采油一厂办公楼1层大厅482051,1803,210数据明细
蓝牙体脂称A02BT-2024-002采油一厂健身房723121,8604,580数据明细
蓝牙体脂称B01BT-2024-003采油二厂职工活动中心351568901,920数据明细
蓝牙体脂称B02BT-2024-004采油二厂办公楼2层281287601,650数据明细
蓝牙体脂称C01BT-2024-005采气厂综合楼1层582451,4203,560数据明细
序号设备名称设备编码设备所属单位布放位置本周使用次数本月使用次数本年使用次数累计使用次数操作
1蓝牙体脂称A01BT-2024-001采油一厂办公楼1层大厅482051,1803,210数据明细
2蓝牙体脂称A02BT-2024-002采油一厂健身房723121,8604,580数据明细
3蓝牙体脂称B01BT-2024-003采油二厂职工活动中心351568901,920数据明细
4蓝牙体脂称B02BT-2024-004采油二厂办公楼2层281287601,650数据明细
5蓝牙体脂称C01BT-2024-005采气厂综合楼1层582451,4203,560数据明细