Ver Fonte

feat(health): 调研页多成员 tab 页签样式 + 进入问卷时初始化当前成员表单

iwt há 2 semanas atrás
pai
commit
59c1977d9c
1 ficheiros alterados com 48 adições e 0 exclusões
  1. 48 0
      cfc-frontend/pages/health/health-plan-summary.vue

+ 48 - 0
cfc-frontend/pages/health/health-plan-summary.vue

@@ -532,6 +532,12 @@ selectedMembers: function() {
       if (this.expandedGroups.length === 0) {
         this.expandedGroups = DISEASE_GROUPS.slice(0, 3).map(function(g) { return g.key })
       }
+      // 多成员调研:确保 activeFormMemberId 指向第一个选中成员,并加载其表单
+      if (!this.activeFormMemberId && this.selectedMemberIds.length > 0) {
+        this.activeFormMemberId = String(this.selectedMemberIds[0])
+        var self = this
+        setTimeout(function() { self.loadHealthForm(self.activeFormMemberId) }, 100)
+      }
       this.step = 2
     },
     skipToGenerate: function() {
@@ -1523,6 +1529,48 @@ selectedMembers: function() {
 .success-title { font-size: 36rpx; font-weight: bold; color: #333; margin-bottom: 12rpx; }
 .success-sub { font-size: 28rpx; color: #888; margin-bottom: 40rpx; }
 
+/* ===== 多成员调研 tab 页签 ===== */
+.member-tabs {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 16rpx;
+  margin-bottom: 16rpx;
+}
+.member-tab {
+  padding: 14rpx 32rpx;
+  border-radius: 32rpx;
+  background: #F1F5F9;
+  border: 2rpx solid transparent;
+  font-size: 26rpx;
+  color: #334155;
+  font-weight: 500;
+  transition: all 0.2s;
+}
+.member-tab.active {
+  background: #FFF7ED;
+  border-color: #F97316;
+  color: #F97316;
+  font-weight: 600;
+}
+.form-member-hint {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 20rpx;
+  padding: 16rpx 20rpx;
+  background: #FFF7ED;
+  border-radius: 12rpx;
+}
+.form-member-label {
+  font-size: 26rpx;
+  color: #92400E;
+  font-weight: 600;
+}
+.form-member-save {
+  font-size: 22rpx;
+  color: #B45309;
+}
+
 /* ===== 健康问卷样式 (从 health-status-form.vue 移植) ===== */
 .form-section {
   margin: 0 0 24rpx;