diff --git a/employee-app/weight-management/diet-advice-v2.html b/employee-app/weight-management/diet-advice-v2.html
index 5b7a958..32719d4 100644
--- a/employee-app/weight-management/diet-advice-v2.html
+++ b/employee-app/weight-management/diet-advice-v2.html
@@ -95,7 +95,10 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
.advice-food-item:last-child { margin-bottom: 0; }
.advice-food-item__emoji { font-size: 22px; width: 28px; text-align: center; flex-shrink: 0; line-height: 1.2; }
.advice-food-item__info { flex: 1; min-width: 0; }
-.advice-food-item__name { font-size: 13px; font-weight: 600; color: #333; }
+.advice-food-item__name { font-size: 13px; font-weight: 600; color: #333; display: flex; align-items: center; gap: 6px; }
+.advice-food-item__tag { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: 6px; white-space: nowrap; line-height: 1.5; }
+.advice-food-item__tag--canteen { color: #d46b08; background: #fff7e6; }
+.advice-food-item__tag--ai { color: #0891b2; background: #ecfeff; }
.advice-food-item__meta { font-size: 11px; color: #bbb; margin-top: 2px; }
.advice-food-item__reason { font-size: 11px; color: #888; margin-top: 4px; line-height: 1.5; display: flex; align-items: flex-start; gap: 3px; }
.advice-food-item__reason svg { flex-shrink: 0; margin-top: 1px; }
@@ -621,21 +624,21 @@ var dayData = {
intake: 1050, summary: '今日热量摄入合理,营养素搭配均衡。早餐提供了充足蛋白质,午餐以碳水为主,晚餐清淡适中。',
meals: {
breakfast: { kcal: 280, time: '07:30', items: [
- { e: '🥚', n: '水煮鸡蛋', m: '×1 · 约50g', k: 80, reason: '优质蛋白质来源,富含卵磷脂,有助于大脑功能' },
- { e: '🥛', n: '纯牛奶', m: '×1 · 250ml', k: 120, reason: '补充钙质和蛋白质,250ml满足每日钙需求约30%' },
- { e: '🍞', n: '全麦面包', m: '×1', k: 80, reason: '全谷物碳水,富含膳食纤维,升糖指数低' }
+ { e: '🥚', n: '水煮鸡蛋', m: '×1 · 约50g', k: 80, tag: 'canteen', reason: '优质蛋白质来源,富含卵磷脂,有助于大脑功能' },
+ { e: '🥛', n: '纯牛奶', m: '×1 · 250ml', k: 120, tag: 'ai', reason: '补充钙质和蛋白质,250ml满足每日钙需求约30%' },
+ { e: '🍞', n: '全麦面包', m: '×1', k: 80, tag: 'canteen', reason: '全谷物碳水,富含膳食纤维,升糖指数低' }
]},
lunch: { kcal: 450, time: '12:00', items: [
- { e: '🍚', n: '白米饭', m: '×1 · 约200g', k: 232, reason: '主食碳水来源,提供午后能量' },
- { e: '🐔', n: '红烧鸡块', m: '×1 · 约150g', k: 140, reason: '鸡肉为低脂高蛋白,适合减脂期食用' },
- { e: '🥬', n: '炒青菜', m: '×1', k: 78, reason: '绿叶蔬菜补充维生素和膳食纤维' }
+ { e: '🍚', n: '白米饭', m: '×1 · 约200g', k: 232, tag: 'canteen', reason: '主食碳水来源,提供午后能量' },
+ { e: '🐔', n: '红烧鸡块', m: '×1 · 约150g', k: 140, tag: 'canteen', reason: '鸡肉为低脂高蛋白,适合减脂期食用' },
+ { e: '🥬', n: '炒青菜', m: '×1', k: 78, tag: 'canteen', reason: '绿叶蔬菜补充维生素和膳食纤维' }
]},
dinner: { kcal: 260, time: '18:00', items: [
- { e: '🥗', n: '蔬菜沙拉', m: '×1 · 约200g', k: 160, reason: '低热量高纤维,含多种维生素' },
- { e: '🍠', n: '蒸红薯', m: '×1', k: 100, reason: '复合碳水,富含β-胡萝卜素和膳食纤维' }
+ { e: '🥗', n: '蔬菜沙拉', m: '×1 · 约200g', k: 160, tag: 'canteen', reason: '低热量高纤维,含多种维生素' },
+ { e: '🍠', n: '蒸红薯', m: '×1', k: 100, tag: 'canteen', reason: '复合碳水,富含β-胡萝卜素和膳食纤维' }
]},
snack: { kcal: 60, time: '15:30', items: [
- { e: '🍌', n: '香蕉', m: '×1', k: 60, reason: '富含钾元素,有助于运动后恢复,天然甜味满足口欲' }
+ { e: '🍌', n: '香蕉', m: '×1', k: 60, tag: 'ai', reason: '富含钾元素,有助于运动后恢复,天然甜味满足口欲' }
]}
},
macros: { carb: 140, carbT: 260, protein: 52, proteinT: 82, fat: 28, fatT: 60 },
@@ -648,20 +651,20 @@ var dayData = {
intake: 1120, summary: '今日摄入略高,但蛋白质充足。午餐牛肉面碳水含量偏高,建议增加蔬菜比例。',
meals: {
breakfast: { kcal: 350, time: '08:00', items: [
- { e: '🥛', n: '豆浆', m: '×1 · 300ml', k: 90, reason: '植物蛋白来源,含大豆异黄酮,有益心血管' },
- { e: '🥮', n: '肉包', m: '×2', k: 180, reason: '提供碳水和蛋白质,但注意控制量' },
- { e: '🥚', n: '茶叶蛋', m: '×1', k: 80, reason: '便携蛋白来源,适合快节奏早餐' }
+ { e: '🥛', n: '豆浆', m: '×1 · 300ml', k: 90, tag: 'canteen', reason: '植物蛋白来源,含大豆异黄酮,有益心血管' },
+ { e: '🥮', n: '肉包', m: '×2', k: 180, tag: 'canteen', reason: '提供碳水和蛋白质,但注意控制量' },
+ { e: '🥚', n: '茶叶蛋', m: '×1', k: 80, tag: 'canteen', reason: '便携蛋白来源,适合快节奏早餐' }
]},
lunch: { kcal: 480, time: '12:20', items: [
- { e: '🍜', n: '牛肉面', m: '×1 · 约400g', k: 380, reason: '牛肉提供优质蛋白和铁,但面条碳水偏高' },
- { e: '🥒', n: '凉拌黄瓜', m: '×1', k: 100, reason: '爽口低卡蔬菜,平衡主食热量' }
+ { e: '🍜', n: '牛肉面', m: '×1 · 约400g', k: 380, tag: 'canteen', reason: '牛肉提供优质蛋白和铁,但面条碳水偏高' },
+ { e: '🥒', n: '凉拌黄瓜', m: '×1', k: 100, tag: 'canteen', reason: '爽口低卡蔬菜,平衡主食热量' }
]},
dinner: { kcal: 210, time: '18:30', items: [
- { e: '🐟', n: '清蒸鱼', m: '×1 · 约150g', k: 130, reason: '鱼肉富含Omega-3脂肪酸,清蒸法低脂健康' },
- { e: '🥦', n: '西兰花', m: '×1', k: 80, reason: '十字花科蔬菜,富含维生素C和抗氧化物质' }
+ { e: '🐟', n: '清蒸鱼', m: '×1 · 约150g', k: 130, tag: 'canteen', reason: '鱼肉富含Omega-3脂肪酸,清蒸法低脂健康' },
+ { e: '🥦', n: '西兰花', m: '×1', k: 80, tag: 'canteen', reason: '十字花科蔬菜,富含维生素C和抗氧化物质' }
]},
snack: { kcal: 80, time: '10:30', items: [
- { e: '🥜', n: '坚果', m: '×1把 · 约20g', k: 80, reason: '含健康不饱和脂肪酸,适量有益心血管' }
+ { e: '🥜', n: '坚果', m: '×1把 · 约20g', k: 80, tag: 'ai', reason: '含健康不饱和脂肪酸,适量有益心血管' }
]}
},
macros: { carb: 165, carbT: 260, protein: 44, proteinT: 82, fat: 34, fatT: 60 },
@@ -674,22 +677,22 @@ var dayData = {
intake: 980, summary: '今日热量控制优秀,蛋白质摄入充足,碳水偏低。饮食搭配非常健康,值得保持!',
meals: {
breakfast: { kcal: 220, time: '07:15', items: [
- { e: '🥚', n: '水煮蛋', m: '×2', k: 160, reason: '两颗蛋提供约12g蛋白质,蛋黄含胆碱有益大脑' },
- { e: '☕', n: '黑咖啡', m: '×1', k: 5, reason: '几乎零卡路里,咖啡因可提神并轻微促进代谢' },
- { e: '🍞', n: '全麦吐司', m: '×1', k: 55, reason: '全谷物提供缓释碳水,配合蛋白质延长饱腹感' }
+ { e: '🥚', n: '水煮蛋', m: '×2', k: 160, tag: 'canteen', reason: '两颗蛋提供约12g蛋白质,蛋黄含胆碱有益大脑' },
+ { e: '☕', n: '黑咖啡', m: '×1', k: 5, tag: 'ai', reason: '几乎零卡路里,咖啡因可提神并轻微促进代谢' },
+ { e: '🍞', n: '全麦吐司', m: '×1', k: 55, tag: 'canteen', reason: '全谷物提供缓释碳水,配合蛋白质延长饱腹感' }
]},
lunch: { kcal: 420, time: '11:50', items: [
- { e: '🍚', n: '杂粮饭', m: '×1 · 约180g', k: 200, reason: '杂粮升糖指数低于白米,膳食纤维更丰富' },
- { e: '🐔', n: '鸡胸肉', m: '×1 · 约120g', k: 120, reason: '极低脂高蛋白,减脂增肌首选蛋白质来源' },
- { e: '🥬', n: '蒜蓉菠菜', m: '×1', k: 100, reason: '菠菜富含铁和叶酸,蒜蓉增添风味且有益心血管' }
+ { e: '🍚', n: '杂粮饭', m: '×1 · 约180g', k: 200, tag: 'canteen', reason: '杂粮升糖指数低于白米,膳食纤维更丰富' },
+ { e: '🐔', n: '鸡胸肉', m: '×1 · 约120g', k: 120, tag: 'canteen', reason: '极低脂高蛋白,减脂增肌首选蛋白质来源' },
+ { e: '🥬', n: '蒜蓉菠菜', m: '×1', k: 100, tag: 'canteen', reason: '菠菜富含铁和叶酸,蒜蓉增添风味且有益心血管' }
]},
dinner: { kcal: 280, time: '17:40', items: [
- { e: '🥗', n: '凯撒沙拉', m: '×1 · 约250g', k: 220, reason: '多种蔬菜搭配,含膳食纤维和维生素' },
- { e: '🍎', n: '苹果', m: '×1', k: 60, reason: '苹果果胶有助于肠道健康,天然甜味代替甜点' }
+ { e: '🥗', n: '凯撒沙拉', m: '×1 · 约250g', k: 220, tag: 'canteen', reason: '多种蔬菜搭配,含膳食纤维和维生素' },
+ { e: '🍎', n: '苹果', m: '×1', k: 60, tag: 'ai', reason: '苹果果胶有助于肠道健康,天然甜味代替甜点' }
]},
snack: { kcal: 60, time: '15:00', items: [
- { e: '🥒', n: '黄瓜', m: '×1根', k: 15, reason: '极低热量,富含水分和膳食纤维' },
- { e: '🍅', n: '小番茄', m: '×5颗', k: 45, reason: '番茄红素抗氧化,天然维C补充' }
+ { e: '🥒', n: '黄瓜', m: '×1根', k: 15, tag: 'canteen', reason: '极低热量,富含水分和膳食纤维' },
+ { e: '🍅', n: '小番茄', m: '×5颗', k: 45, tag: 'ai', reason: '番茄红素抗氧化,天然维C补充' }
]}
},
macros: { carb: 120, carbT: 260, protein: 58, proteinT: 82, fat: 22, fatT: 60 },
@@ -702,21 +705,21 @@ var dayData = {
intake: 1086, summary: '今日三餐搭配合理,蛋白质和碳水分配均衡。加餐选择苹果是不错的低热量选择,有助于控制总摄入。',
meals: {
breakfast: { kcal: 320, time: '07:20', items: [
- { e: '🥚', n: '水煮鸡蛋', m: '×1 · 约50g', k: 80, reason: '优质完全蛋白质,含所有必需氨基酸,饱腹感强' },
- { e: '🥛', n: '纯牛奶', m: '×1 · 250ml', k: 120, reason: '补充钙质(约300mg)和维生素D,促进骨骼健康' },
- { e: '🍞', n: '全麦面包', m: '×2 · 约80g', k: 120, reason: '全谷物提供缓释能量,富含B族维生素和膳食纤维' }
+ { e: '🥚', n: '水煮鸡蛋', m: '×1 · 约50g', k: 80, tag: 'canteen', reason: '优质完全蛋白质,含所有必需氨基酸,饱腹感强' },
+ { e: '🥛', n: '纯牛奶', m: '×1 · 250ml', k: 120, tag: 'ai', reason: '补充钙质(约300mg)和维生素D,促进骨骼健康' },
+ { e: '🍞', n: '全麦面包', m: '×2 · 约80g', k: 120, tag: 'canteen', reason: '全谷物提供缓释能量,富含B族维生素和膳食纤维' }
]},
lunch: { kcal: 480, time: '12:10', items: [
- { e: '🍚', n: '白米饭', m: '×1 · 约200g', k: 232, reason: '提供充足碳水能量,满足午后工作和代谢需求' },
- { e: '🐔', n: '宫保鸡丁', m: '×1 · 约150g', k: 148, reason: '鸡肉低脂高蛋白,搭配花生提供健康不饱和脂肪' },
- { e: '🥬', n: '清炒时蔬', m: '×1 · 约200g', k: 100, reason: '足量蔬菜补充膳食纤维,促进肠道蠕动' }
+ { e: '🍚', n: '白米饭', m: '×1 · 约200g', k: 232, tag: 'canteen', reason: '提供充足碳水能量,满足午后工作和代谢需求' },
+ { e: '🐔', n: '宫保鸡丁', m: '×1 · 约150g', k: 148, tag: 'canteen', reason: '鸡肉低脂高蛋白,搭配花生提供健康不饱和脂肪' },
+ { e: '🥬', n: '清炒时蔬', m: '×1 · 约200g', k: 100, tag: 'canteen', reason: '足量蔬菜补充膳食纤维,促进肠道蠕动' }
]},
dinner: { kcal: 220, time: '18:15', items: [
- { e: '🥗', n: '鸡胸肉沙拉', m: '×1 · 约250g', k: 180, reason: '晚餐以蔬菜为主,鸡胸肉提供蛋白质但不过量' },
- { e: '🍠', n: '蒸红薯', m: '×1 · 约100g', k: 40, reason: '低GI碳水,蒸制方式无额外油脂,含丰富β-胡萝卜素' }
+ { e: '🥗', n: '鸡胸肉沙拉', m: '×1 · 约250g', k: 180, tag: 'canteen', reason: '晚餐以蔬菜为主,鸡胸肉提供蛋白质但不过量' },
+ { e: '🍠', n: '蒸红薯', m: '×1 · 约100g', k: 40, tag: 'canteen', reason: '低GI碳水,蒸制方式无额外油脂,含丰富β-胡萝卜素' }
]},
snack: { kcal: 66, time: '15:30', items: [
- { e: '🍎', n: '苹果', m: '×1 · 约200g', k: 66, reason: '天然果糖满足甜味需求,果胶增加饱腹感,热量可控' }
+ { e: '🍎', n: '苹果', m: '×1 · 约200g', k: 66, tag: 'ai', reason: '天然果糖满足甜味需求,果胶增加饱腹感,热量可控' }
]}
},
macros: { carb: 155, carbT: 260, protein: 47, proteinT: 82, fat: 31, fatT: 60 },
@@ -790,23 +793,23 @@ var DEFAULT_RECIPE_DATA = {
summary: '暂无当日饮食记录,以下为推荐的均衡饮食示例,可参考搭配安排今日三餐。',
meals: {
breakfast: { kcal: 320, items: [
- { e: '🥚', n: '水煮鸡蛋', m: '×1 · 约50g', k: 80, reason: '优质完全蛋白质,含所有必需氨基酸,饱腹感强' },
- { e: '🥛', n: '纯牛奶', m: '×1 · 250ml', k: 120, reason: '补充钙质(约300mg)和维生素D,促进骨骼健康' },
- { e: '🍞', n: '全麦面包', m: '×1 · 约40g', k: 120, reason: '全谷物提供缓释能量,富含B族维生素和膳食纤维' }
+ { e: '🥚', n: '水煮鸡蛋', m: '×1 · 约50g', k: 80, tag: 'canteen', reason: '优质完全蛋白质,含所有必需氨基酸,饱腹感强' },
+ { e: '🥛', n: '纯牛奶', m: '×1 · 250ml', k: 120, tag: 'ai', reason: '补充钙质(约300mg)和维生素D,促进骨骼健康' },
+ { e: '🍞', n: '全麦面包', m: '×1 · 约40g', k: 120, tag: 'canteen', reason: '全谷物提供缓释能量,富含B族维生素和膳食纤维' }
]},
lunch: { kcal: 480, items: [
- { e: '🍚', n: '杂粮饭', m: '×1 · 约150g', k: 180, reason: '杂粮升糖指数低,膳食纤维丰富,有助于血糖稳定' },
- { e: '🐔', n: '鸡胸肉', m: '×1 · 约120g', k: 150, reason: '极低脂高蛋白,是减脂增肌的首选蛋白来源' },
- { e: '🥬', n: '清炒时蔬', m: '×1 · 约200g', k: 100, reason: '足量蔬菜补充膳食纤维,促进肠道蠕动' },
- { e: '🍅', n: '小番茄', m: '×5颗', k: 50, reason: '番茄红素抗氧化,天然维C补充' }
+ { e: '🍚', n: '杂粮饭', m: '×1 · 约150g', k: 180, tag: 'canteen', reason: '杂粮升糖指数低,膳食纤维丰富,有助于血糖稳定' },
+ { e: '🐔', n: '鸡胸肉', m: '×1 · 约120g', k: 150, tag: 'canteen', reason: '极低脂高蛋白,是减脂增肌的首选蛋白来源' },
+ { e: '🥬', n: '清炒时蔬', m: '×1 · 约200g', k: 100, tag: 'canteen', reason: '足量蔬菜补充膳食纤维,促进肠道蠕动' },
+ { e: '🍅', n: '小番茄', m: '×5颗', k: 50, tag: 'ai', reason: '番茄红素抗氧化,天然维C补充' }
]},
dinner: { kcal: 280, items: [
- { e: '🐟', n: '清蒸鱼', m: '×1 · 约150g', k: 150, reason: '鱼肉富含Omega-3脂肪酸,清蒸法低脂健康' },
- { e: '🥦', n: '西兰花', m: '×1 · 约150g', k: 80, reason: '十字花科蔬菜,富含维生素C和抗氧化物质' },
- { e: '🍠', n: '蒸红薯', m: '×1 · 约100g', k: 50, reason: '低GI碳水,蒸制方式无额外油脂,富含β-胡萝卜素' }
+ { e: '🐟', n: '清蒸鱼', m: '×1 · 约150g', k: 150, tag: 'canteen', reason: '鱼肉富含Omega-3脂肪酸,清蒸法低脂健康' },
+ { e: '🥦', n: '西兰花', m: '×1 · 约150g', k: 80, tag: 'canteen', reason: '十字花科蔬菜,富含维生素C和抗氧化物质' },
+ { e: '🍠', n: '蒸红薯', m: '×1 · 约100g', k: 50, tag: 'canteen', reason: '低GI碳水,蒸制方式无额外油脂,富含β-胡萝卜素' }
]},
snack: { kcal: 60, items: [
- { e: '🍎', n: '苹果', m: '×1 · 约200g', k: 60, reason: '天然果糖满足甜味需求,果胶增加饱腹感,热量可控' }
+ { e: '🍎', n: '苹果', m: '×1 · 约200g', k: 60, tag: 'ai', reason: '天然果糖满足甜味需求,果胶增加饱腹感,热量可控' }
]}
}
};
@@ -827,10 +830,16 @@ function renderRecipeTab(data) {
kcalEl.textContent = md.kcal;
var h = '';
md.items.forEach(function(item) {
+ var tagHtml = '';
+ if (item.tag === 'canteen') {
+ tagHtml = '食堂提供';
+ } else if (item.tag === 'ai') {
+ tagHtml = 'AI推荐';
+ }
h += '
' +
'
' + item.e + '
' +
'
' +
- '
' + item.n + '
' +
+ '
' + item.n + tagHtml + '
' +
'
' + item.m + '
' +
'
' +
'
' +
diff --git a/employee-app/weight-management/eat-detail-v2.html b/employee-app/weight-management/eat-detail-v2.html
index 925d5ac..1077a55 100644
--- a/employee-app/weight-management/eat-detail-v2.html
+++ b/employee-app/weight-management/eat-detail-v2.html
@@ -85,7 +85,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
.recipe-btn { position: absolute; top: 44px; right: 8px; padding: 5px 12px; border-radius: 14px; border: none; background: linear-gradient(160deg, #36cfc9, #2db8b0); color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; z-index: 5; box-shadow: 0 2px 6px rgba(54,207,201,0.3); }
/* ===== 营养素三列 ===== */
-.macros-row { display: flex; gap: 10px; padding: 0 4px 8px; }
+.macros-row { display: flex; gap: 10px; padding: 0 4px 8px; margin-top: -20px; }
.macros-row.hidden { display: none; }
.macro-col { flex: 1; padding: 8px 10px; background: #f7f8fa; border-radius: 10px; text-align: center; }
.macro-col__name { font-size: 11px; color: #999; margin-bottom: 4px; }
@@ -114,6 +114,8 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
.meal-card__kcal--in span { color: #fa8c16; }
.meal-card__kcal--out { color: #52c41a; }
.meal-card__kcal--out span { color: #52c41a; }
+.meal-card__kcal .meal-card__kcal-target,
+.meal-card__kcal .meal-card__kcal-unit { font-size: 12px; font-weight: 400; color: #bbb; }
.meal-card__expand { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #bbb; transition: transform .25s; }
.meal-card__expand.open { transform: rotate(180deg); }
@@ -131,6 +133,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
.meal-item__src--wechat { color: #597ef7; background: #f0f5ff; }
.meal-item__meta { font-size: 11px; color: #bbb; margin-top: 1px; }
.meal-item__kcal { font-size: 13px; font-weight: 700; color: #fa8c16; white-space: nowrap; flex-shrink: 0; }
+.meal-item__kcal-unit { font-size: 11px; font-weight: 400; color: #bbb; }
.meal-item--exercise .meal-item__kcal { color: #52c41a; }
.meal-empty { text-align: center; padding: 16px 0; color: #ccc; font-size: 13px; }
@@ -241,18 +244,10 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
-
-
饮食摄入
-
1086/1950 千卡
-
-
-
运动消耗
-
820/1000 千卡
-
-
吃动热量差
-
-364
-
/ -500 千卡
+
总摄入
+
1086
+
/ 1950 千卡
@@ -284,7 +279,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
早餐
-
320 kcal
+
320/500 千卡
@@ -326,7 +321,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
午餐
-
480 kcal
+
480/650 千卡
@@ -368,7 +363,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
晚餐
-
220 kcal
+
220/550 千卡
@@ -402,7 +397,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
加餐
-
66 kcal
+
66/250 千卡
@@ -420,40 +415,6 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
-
-
-
@@ -483,10 +444,6 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
加餐
-
@@ -776,9 +733,8 @@ function selectDay(el) {
data = { intake: 0, consume: 0, gap: 0 };
}
- var gapAbs = Math.abs(data.gap);
- var maxGap = 500;
- var progress = data.gap === 0 ? 0 : Math.min(gapAbs / maxGap, 1);
+ var targetIntake = 1950;
+ var progress = data.intake === 0 ? 0 : Math.min(data.intake / targetIntake, 1);
var pt = arcPoint(progress);
var arcD = 'M 90 135 A 80 80 0 0 1 ' + pt.x + ' ' + pt.y;
@@ -786,21 +742,13 @@ function selectDay(el) {
var gapArc = document.getElementById('gapArc');
gapArc.setAttribute('d', arcD);
- document.getElementById('intakeText').textContent = data.intake === 0 ? '--' : data.intake;
- document.getElementById('consumeText').textContent = data.consume === 0 ? '--' : data.consume;
-
var gapCenter = document.getElementById('gapCenterVal');
- gapCenter.textContent = data.gap === 0 ? '--' : ('-' + Math.abs(data.gap));
+ gapCenter.textContent = data.intake === 0 ? '--' : data.intake;
- var colorIntake = data.intake === 0 ? '#bbb' : '#fa8c16';
- var colorConsume = data.consume === 0 ? '#bbb' : '#52c41a';
- var colorGap = data.gap === 0 ? '#bbb' : '#fa8c16';
- document.getElementById('intakeText').setAttribute('fill', colorIntake);
- document.getElementById('consumeText').setAttribute('fill', colorConsume);
- gapCenter.setAttribute('fill', colorGap);
+ gapCenter.setAttribute('fill', data.intake === 0 ? '#bbb' : '#fa8c16');
var rightDot = document.querySelector('.gauge-wrap svg circle[cy="135"][cx="250"]');
- rightDot.setAttribute('fill', data.gap === 0 ? '#bbb' : '#52c41a');
+ rightDot.setAttribute('fill', data.intake === 0 ? '#bbb' : '#52c41a');
// 更新餐食卡片
renderMeals(dateStr);
@@ -819,6 +767,9 @@ function renderMeals(dateStr) {
if (md && md.items && md.items.length > 0) hasAnyDiet = true;
});
+ // ===== 各餐推荐千卡 =====
+ var mealTargets = { breakfast: 500, lunch: 650, dinner: 550, snack: 250 };
+
if (hasAnyDiet) {
// 有饮食记录:逐卡片显示/隐藏
document.getElementById('cardEmptyDiet').style.display = 'none';
@@ -827,6 +778,7 @@ function renderMeals(dateStr) {
var card = document.getElementById('card' + cap);
var container = document.getElementById('group' + cap);
var kcalEl = document.getElementById('kcal' + cap);
+ var kcalTargetEl = document.getElementById('kcal' + cap + 'Target');
var md = meals ? meals[type] : null;
if (md && md.items && md.items.length > 0) {
@@ -839,11 +791,12 @@ function renderMeals(dateStr) {
html += '' +
'
' + item.e + '
' +
'
' + item.n + '' + srcLabel + '
' + item.m + '
' +
- '
' + item.k + ' kcal
';
+ '' + item.k + ' 千卡
';
});
container.innerHTML = html;
container.style.display = '';
kcalEl.textContent = md.kcal;
+ kcalTargetEl.textContent = '/' + mealTargets[type];
kcalEl.parentElement.style.display = '';
} else {
card.style.display = 'none';
@@ -857,32 +810,6 @@ function renderMeals(dateStr) {
document.getElementById('cardEmptyDiet').style.display = '';
}
- // 运动卡片独立处理
- var exCard = document.getElementById('cardExercise');
- var exContainer = document.getElementById('groupExercise');
- var exKcalEl = document.getElementById('kcalExercise');
- var exMd = meals ? meals['exercise'] : null;
- if (exMd && exMd.items && exMd.items.length > 0) {
- exCard.style.display = '';
- var html = '';
- exMd.items.forEach(function(item) {
- var srcTag = '';
- if (item.src) {
- srcTag = '' + ({wearable:'穿戴',equip:'器械',wechat:'微信',manual:'自记'}[item.src] || item.src) + '';
- }
- html += '' +
- '
' + item.e + '
' +
- '
' + item.n + srcTag + '
' + item.m + '
' +
- '
' + item.k + ' kcal
';
- });
- exContainer.innerHTML = html;
- exContainer.style.display = '';
- exKcalEl.textContent = exMd.kcal;
- exKcalEl.parentElement.style.display = '';
- } else {
- exCard.style.display = 'none';
- }
-
// 更新营养素三列
var macrosRow = document.getElementById('macrosRow');
var macros = data && data.macros;
diff --git a/employee-app/weight-management/eat-exercise-detail-v2.html b/employee-app/weight-management/eat-exercise-detail-v2.html
new file mode 100644
index 0000000..50bdada
--- /dev/null
+++ b/employee-app/weight-management/eat-exercise-detail-v2.html
@@ -0,0 +1,790 @@
+
+
+
+
+
+吃动平衡 - 员工端 | 健康CQ原型 v2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 日一二三四五六
+
+
+
+
+ 推荐热量差 完成进度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
暂无饮食记录
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/employee-app/weight-management/goal-history-v2.html b/employee-app/weight-management/goal-history-v2.html
index 939e8b3..5f2769d 100644
--- a/employee-app/weight-management/goal-history-v2.html
+++ b/employee-app/weight-management/goal-history-v2.html
@@ -28,7 +28,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
.scroll-content::-webkit-scrollbar { display: none; }
/* ===== 计划卡片 ===== */
-.plan-card { background: #fff; border-radius: 16px; margin: 12px 12px 0; padding: 16px; box-shadow: 0 4px 14px rgba(0,0,0,0.04); }
+.plan-card { background: #fff; border-radius: 16px; margin: 12px 12px 0; padding: 16px; box-shadow: 0 4px 14px rgba(0,0,0,0.04); cursor: pointer; transition: transform .15s; }
.plan-card__header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.plan-card__name { font-size: 15px; font-weight: 700; color: #1a1a1a; flex: 1; min-width: 0; line-height: 1.4; }
.plan-card__status { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; margin-left: 8px; }
@@ -94,12 +94,12 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
-
-
-
+
+
+
起止:2026-04-01 ~ 2026-09-30
机构:公司机关
@@ -122,14 +122,14 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
-
+
详情
+
+
-
-
+
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
当前体重
+
+
+
+
+
+ 62.6公斤
+ BMI 23.6
+ 体脂率:25.8%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
初始体重
+
73.5
+
BMI 28.6
+
+
+
体重变化
+
-10.9 ▼
+
还要减 6.6
+
+
+
目标体重
+
56.0
+
BMI 22.5
+
+
+
@@ -443,7 +481,7 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
-
+
diff --git a/employee-app/weight-management/weight-report.html b/employee-app/weight-management/weight-report.html
index 3c9ea8a..ebbb462 100644
--- a/employee-app/weight-management/weight-report.html
+++ b/employee-app/weight-management/weight-report.html
@@ -86,10 +86,13 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
.summary-compare th { padding: 8px 6px; text-align: center; font-weight: 700; color: #999; font-size: 11px; border-bottom: 2px solid #f0f0f0; }
.summary-compare td { padding: 9px 6px; text-align: center; color: #333; border-bottom: 1px solid #f5f5f5; }
.summary-compare td:first-child { text-align: left; font-weight: 600; color: #666; padding-left: 4px; }
- .summary-compare tr:last-child td { border-bottom: none; }
- .summary-compare .val-down { color: #36cfc9; font-weight: 700; }
- .summary-compare .val-target { color: #faad14; font-weight: 700; }
- .summary-compare .val-achieved { color: #36cfc9; font-weight: 700; }
+.summary-compare tr:last-child td { border-bottom: none; }
+.summary-compare .val-down { color: #36cfc9; font-weight: 700; }
+.summary-compare .val-target { color: #faad14; font-weight: 700; }
+.summary-compare .val-achieved { color: #36cfc9; font-weight: 700; }
+/* 隐藏目标列 */
+.summary-compare.hide-target th:nth-child(4),
+.summary-compare.hide-target td:nth-child(4) { display: none; }
/* 标签 */
.summary-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; margin-left: 4px; }
@@ -136,20 +139,34 @@ body { background: #f0f2f5; display: flex; justify-content: center; align-items:
截止至 2026-08-12
第 52 天(共 180 天)
-
+
+
@@ -357,21 +374,35 @@ function applyPageType(type) {
overviewEmpty.style.display = 'none';
if (ovInfoRow) ovInfoRow.style.display = '';
document.getElementById('ovDayWrap').style.display = '';
+ document.getElementById('ovMetricsActivity').style.display = '';
+ document.getElementById('ovMetricsNone').style.display = 'none';
document.getElementById('summarySection').style.display = '';
+ // 显示目标列
+ var tables = document.querySelectorAll('.summary-compare');
+ tables.forEach(function(t) { t.classList.remove('hide-target'); });
} else if (type === 'personal') {
navTitle.textContent = '个人减重目标标题';
overviewCard.style.display = '';
overviewEmpty.style.display = 'none';
if (ovInfoRow) ovInfoRow.style.display = '';
document.getElementById('ovDayWrap').style.display = '';
+ document.getElementById('ovMetricsActivity').style.display = '';
+ document.getElementById('ovMetricsNone').style.display = 'none';
document.getElementById('summarySection').style.display = '';
+ var tables2 = document.querySelectorAll('.summary-compare');
+ tables2.forEach(function(t) { t.classList.remove('hide-target'); });
} else {
navTitle.textContent = '体重报告';
overviewCard.style.display = '';
overviewEmpty.style.display = 'none';
- if (ovInfoRow) ovInfoRow.style.display = 'none';
+ if (ovInfoRow) ovInfoRow.style.display = '';
document.getElementById('ovDayWrap').style.display = 'none';
- document.getElementById('summarySection').style.display = 'none';
+ document.getElementById('ovMetricsActivity').style.display = 'none';
+ document.getElementById('ovMetricsNone').style.display = '';
+ document.getElementById('summarySection').style.display = '';
+ // 隐藏目标列
+ var tables3 = document.querySelectorAll('.summary-compare');
+ tables3.forEach(function(t) { t.classList.add('hide-target'); });
}
}