|
@@ -27,13 +27,13 @@
|
|
|
<el-tag size="mini" style="margin-right:4px;" :color="dimColor('action')">{{ row.dimension_scores.action || '-' }}</el-tag>
|
|
<el-tag size="mini" style="margin-right:4px;" :color="dimColor('action')">{{ row.dimension_scores.action || '-' }}</el-tag>
|
|
|
<el-tag size="mini" :color="dimColor('wealth')">{{ row.dimension_scores.wealth || '-' }}</el-tag>
|
|
<el-tag size="mini" :color="dimColor('wealth')">{{ row.dimension_scores.wealth || '-' }}</el-tag>
|
|
|
</span>
|
|
</span>
|
|
|
- <span v-else style="color:#bbb">暂无</span>
|
|
|
|
|
|
|
+ <span v-else style="color:var(--adm-text-25)">暂无</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="问题域" width="160">
|
|
<el-table-column label="问题域" width="160">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
<el-tag v-for="d in (row.problem_domains || [])" :key="d" size="mini" style="margin-right:4px;">{{ domainLabel(d) }}</el-tag>
|
|
<el-tag v-for="d in (row.problem_domains || [])" :key="d" size="mini" style="margin-right:4px;">{{ domainLabel(d) }}</el-tag>
|
|
|
- <span v-if="!row.problem_domains || row.problem_domains.length === 0" style="color:#bbb">-</span>
|
|
|
|
|
|
|
+ <span v-if="!row.problem_domains || row.problem_domains.length === 0" style="color:var(--adm-text-25)">-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="computed_at" label="更新时间" width="160">
|
|
<el-table-column prop="computed_at" label="更新时间" width="160">
|
|
@@ -68,7 +68,7 @@
|
|
|
<el-descriptions-item label="年龄">{{ currentProfile.member && currentProfile.member.age }}</el-descriptions-item>
|
|
<el-descriptions-item label="年龄">{{ currentProfile.member && currentProfile.member.age }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
- <h4 style="margin:16px 0 8px;color:#333;">五维评分</h4>
|
|
|
|
|
|
|
+ <h4 style="margin:16px 0 8px;color:var(--adm-text-88);">五维评分</h4>
|
|
|
<el-row :gutter="12" v-if="currentProfile.dimension_scores">
|
|
<el-row :gutter="12" v-if="currentProfile.dimension_scores">
|
|
|
<el-col :span="4" v-for="(score, dim) in currentProfile.dimension_scores" :key="dim">
|
|
<el-col :span="4" v-for="(score, dim) in currentProfile.dimension_scores" :key="dim">
|
|
|
<el-progress type="dashboard" :percentage="score" :color="dimColor(dim)" :width="70" :stroke-width="8" />
|
|
<el-progress type="dashboard" :percentage="score" :color="dimColor(dim)" :width="70" :stroke-width="8" />
|
|
@@ -76,7 +76,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
- <h4 style="margin:16px 0 8px;color:#333;">身体指标</h4>
|
|
|
|
|
|
|
+ <h4 style="margin:16px 0 8px;color:var(--adm-text-88);">身体指标</h4>
|
|
|
<el-descriptions :column="3" border size="small" v-if="currentProfile.body_metrics">
|
|
<el-descriptions :column="3" border size="small" v-if="currentProfile.body_metrics">
|
|
|
<el-descriptions-item label="平均睡眠(h)">{{ currentProfile.body_metrics.sleep_dur_avg || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="平均睡眠(h)">{{ currentProfile.body_metrics.sleep_dur_avg || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="深睡占比(%)">{{ currentProfile.body_metrics.deep_sleep_pct || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="深睡占比(%)">{{ currentProfile.body_metrics.deep_sleep_pct || '-' }}</el-descriptions-item>
|
|
@@ -85,7 +85,7 @@
|
|
|
<el-descriptions-item label="月饮食记录数">{{ currentProfile.body_metrics.meal_records_count || 0 }}</el-descriptions-item>
|
|
<el-descriptions-item label="月饮食记录数">{{ currentProfile.body_metrics.meal_records_count || 0 }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
- <h4 style="margin:16px 0 8px;color:#333;">心理指标</h4>
|
|
|
|
|
|
|
+ <h4 style="margin:16px 0 8px;color:var(--adm-text-88);">心理指标</h4>
|
|
|
<el-descriptions :column="3" border size="small" v-if="currentProfile.mind_metrics">
|
|
<el-descriptions :column="3" border size="small" v-if="currentProfile.mind_metrics">
|
|
|
<el-descriptions-item label="正向情绪占比">{{ currentProfile.mind_metrics.emotion_joy_ratio != null ? (currentProfile.mind_metrics.emotion_joy_ratio * 100).toFixed(0) + '%' : '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="正向情绪占比">{{ currentProfile.mind_metrics.emotion_joy_ratio != null ? (currentProfile.mind_metrics.emotion_joy_ratio * 100).toFixed(0) + '%' : '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="平均压力(1-10)">{{ currentProfile.mind_metrics.stress_avg || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="平均压力(1-10)">{{ currentProfile.mind_metrics.stress_avg || '-' }}</el-descriptions-item>
|
|
@@ -94,20 +94,20 @@
|
|
|
<el-descriptions-item label="平均心情效价">{{ currentProfile.mind_metrics.mood_score_avg || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="平均心情效价">{{ currentProfile.mind_metrics.mood_score_avg || '-' }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
- <h4 style="margin:16px 0 8px;color:#333;">行为活跃</h4>
|
|
|
|
|
|
|
+ <h4 style="margin:16px 0 8px;color:var(--adm-text-88);">行为活跃</h4>
|
|
|
<el-descriptions :column="3" border size="small" v-if="currentProfile.action_metrics">
|
|
<el-descriptions :column="3" border size="small" v-if="currentProfile.action_metrics">
|
|
|
<el-descriptions-item label="任务完成率">{{ currentProfile.action_metrics.task_completion_rate != null ? (currentProfile.action_metrics.task_completion_rate * 100).toFixed(0) + '%' : '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="任务完成率">{{ currentProfile.action_metrics.task_completion_rate != null ? (currentProfile.action_metrics.task_completion_rate * 100).toFixed(0) + '%' : '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="连续打卡(天)">{{ currentProfile.action_metrics.checkin_streak || 0 }}</el-descriptions-item>
|
|
<el-descriptions-item label="连续打卡(天)">{{ currentProfile.action_metrics.checkin_streak || 0 }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="7日积分">{{ currentProfile.action_metrics.points_velocity_7d || 0 }}</el-descriptions-item>
|
|
<el-descriptions-item label="7日积分">{{ currentProfile.action_metrics.points_velocity_7d || 0 }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
- <h4 style="margin:16px 0 8px;color:#333;">推荐内容</h4>
|
|
|
|
|
|
|
+ <h4 style="margin:16px 0 8px;color:var(--adm-text-88);">推荐内容</h4>
|
|
|
<div v-if="currentProfile.tasks && currentProfile.tasks.length > 0" style="margin-bottom:8px;">
|
|
<div v-if="currentProfile.tasks && currentProfile.tasks.length > 0" style="margin-bottom:8px;">
|
|
|
- <span style="font-size:13px;color:#666;">任务:</span>
|
|
|
|
|
|
|
+ <span style="font-size:13px;color:var(--adm-text-65);">任务:</span>
|
|
|
<el-tag v-for="t in currentProfile.tasks" :key="t.id" size="small" style="margin-right:4px;">{{ t.title }}</el-tag>
|
|
<el-tag v-for="t in currentProfile.tasks" :key="t.id" size="small" style="margin-right:4px;">{{ t.title }}</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="currentProfile.articles && currentProfile.articles.length > 0" style="margin-bottom:8px;">
|
|
<div v-if="currentProfile.articles && currentProfile.articles.length > 0" style="margin-bottom:8px;">
|
|
|
- <span style="font-size:13px;color:#666;">文章:</span>
|
|
|
|
|
|
|
+ <span style="font-size:13px;color:var(--adm-text-65);">文章:</span>
|
|
|
<el-tag v-for="a in currentProfile.articles" :key="a.id" size="small" style="margin-right:4px;">{{ a.title }}</el-tag>
|
|
<el-tag v-for="a in currentProfile.articles" :key="a.id" size="small" style="margin-right:4px;">{{ a.title }}</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
dimColor(dim) {
|
|
dimColor(dim) {
|
|
|
var m = { body: '#FF8C42', wisdom: '#1677FF', mind: '#FF6B9D', action: '#10B981', wealth: '#F59E0B' }
|
|
var m = { body: '#FF8C42', wisdom: '#1677FF', mind: '#FF6B9D', action: '#10B981', wealth: '#F59E0B' }
|
|
|
- return m[dim] || '#999'
|
|
|
|
|
|
|
+ return m[dim] || 'var(--adm-text-45)'
|
|
|
},
|
|
},
|
|
|
domainLabel(d) {
|
|
domainLabel(d) {
|
|
|
var m = { sleep: '睡眠', attention: '注意力', emotion: '情绪' }
|
|
var m = { sleep: '睡眠', attention: '注意力', emotion: '情绪' }
|
|
@@ -189,8 +189,6 @@ export default {
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.admin-page { padding: 16px; }
|
|
.admin-page { padding: 16px; }
|
|
|
-.admin-page-header { display: flex; justify-content: space-between; align-items: center; }
|
|
|
|
|
-.admin-page-title { font-size: 16px; font-weight: bold; }
|
|
|
|
|
.filter-bar { display: flex; align-items: center; }
|
|
.filter-bar { display: flex; align-items: center; }
|
|
|
.el-progress { margin: 0 auto; }
|
|
.el-progress { margin: 0 auto; }
|
|
|
</style>
|
|
</style>
|