|
@@ -1,18 +1,15 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="health-plan-manage">
|
|
|
|
|
- <div class="page-header">
|
|
|
|
|
- <h2>健康方案管理</h2>
|
|
|
|
|
- <div class="filters">
|
|
|
|
|
- <el-input v-model="keyword" placeholder="搜索成员名/目标" style="width:200px" clearable @keyup.enter="loadPlans" />
|
|
|
|
|
- <el-select v-model="statusFilter" placeholder="状态筛选" clearable style="width:140px;margin-left:10px" @change="loadPlans">
|
|
|
|
|
- <el-option label="草稿" value="draft" />
|
|
|
|
|
- <el-option label="待审核" value="pending_review" />
|
|
|
|
|
- <el-option label="已发布" value="published" />
|
|
|
|
|
- <el-option label="已驳回" value="rejected" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- <el-button type="primary" @click="loadPlans" style="margin-left:10px">查询</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="health-plan-manage admin-page">
|
|
|
|
|
+ <PageHeader title="健康方案管理">
|
|
|
|
|
+ <el-input v-model="keyword" placeholder="搜索成员名/目标" style="width:200px" clearable @keyup.enter="loadPlans" />
|
|
|
|
|
+ <el-select v-model="statusFilter" placeholder="状态筛选" clearable style="width:140px;margin-left:10px" @change="loadPlans">
|
|
|
|
|
+ <el-option label="草稿" value="draft" />
|
|
|
|
|
+ <el-option label="待审核" value="pending_review" />
|
|
|
|
|
+ <el-option label="已发布" value="published" />
|
|
|
|
|
+ <el-option label="已驳回" value="rejected" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <el-button type="primary" @click="loadPlans" style="margin-left:10px">查询</el-button>
|
|
|
|
|
+ </PageHeader>
|
|
|
|
|
|
|
|
<div class="adm-table-wrap">
|
|
<div class="adm-table-wrap">
|
|
|
<el-table :data="plans" border stripe style="width:100%" v-loading="loading" height="100%">
|
|
<el-table :data="plans" border stripe style="width:100%" v-loading="loading" height="100%">
|
|
@@ -31,7 +28,7 @@
|
|
|
</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, i) in (row.dimensions || '').split(',')" :key="i" size="mini" style="margin-right:3px">{{ d }}</el-tag>
|
|
|
|
|
|
|
+ <StatusTag v-for="(d, i) in (row.dimensions || '').split(',')" :key="i" type="primary" :text="d" size="mini" style="margin-right:3px" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="目标" min-width="200">
|
|
<el-table-column label="目标" min-width="200">
|
|
@@ -41,7 +38,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" width="100">
|
|
<el-table-column label="状态" width="100">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag :type="statusType(row.status)">{{ statusLabel(row.status) }}</el-tag>
|
|
|
|
|
|
|
+ <StatusTag :type="statusType(row.status)" :text="statusLabel(row.status)" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="reviewComment" label="审核意见" width="150">
|
|
<el-table-column prop="reviewComment" label="审核意见" width="150">
|
|
@@ -85,7 +82,7 @@
|
|
|
<el-descriptions-item label="维度">{{ currentPlan.dimensions || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="维度">{{ currentPlan.dimensions || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="目标" :span="2">{{ currentPlan.goal || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="目标" :span="2">{{ currentPlan.goal || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="状态">
|
|
<el-descriptions-item label="状态">
|
|
|
- <el-tag :type="statusType(currentPlan.status)">{{ statusLabel(currentPlan.status) }}</el-tag>
|
|
|
|
|
|
|
+ <StatusTag :type="statusType(currentPlan.status)" :text="statusLabel(currentPlan.status)" />
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="规划师ID">{{ currentPlan.teacherId || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="规划师ID">{{ currentPlan.teacherId || '-' }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="审核人ID">{{ currentPlan.reviewedBy || '-' }}</el-descriptions-item>
|
|
<el-descriptions-item label="审核人ID">{{ currentPlan.reviewedBy || '-' }}</el-descriptions-item>
|
|
@@ -94,10 +91,10 @@
|
|
|
<el-descriptions-item label="创建时间" :span="2">{{ formatTime(currentPlan.createdAt) }}</el-descriptions-item>
|
|
<el-descriptions-item label="创建时间" :span="2">{{ formatTime(currentPlan.createdAt) }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
- <el-divider content-position="left">方案内容</el-divider>
|
|
|
|
|
|
|
+ <SectionTitle title="方案内容" />
|
|
|
<div class="plan-content" v-html="renderPlanContent(currentPlan.planContent)"></div>
|
|
<div class="plan-content" v-html="renderPlanContent(currentPlan.planContent)"></div>
|
|
|
|
|
|
|
|
- <el-divider content-position="left">分解任务</el-divider>
|
|
|
|
|
|
|
+ <SectionTitle title="分解任务" />
|
|
|
<el-table :data="tasks" border stripe size="small" v-loading="tasksLoading">
|
|
<el-table :data="tasks" border stripe size="small" v-loading="tasksLoading">
|
|
|
<el-table-column prop="title" label="任务标题" min-width="180" />
|
|
<el-table-column prop="title" label="任务标题" min-width="180" />
|
|
|
<el-table-column prop="actionType" label="类型" width="100">
|
|
<el-table-column prop="actionType" label="类型" width="100">
|
|
@@ -105,7 +102,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="dimension" label="维度" width="80">
|
|
<el-table-column prop="dimension" label="维度" width="80">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag size="mini">{{ dimensionLabel(row.dimension) }}</el-tag>
|
|
|
|
|
|
|
+ <StatusTag type="primary" :text="dimensionLabel(row.dimension)" size="mini" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="frequency" label="频率" width="80">
|
|
<el-table-column prop="frequency" label="频率" width="80">
|
|
@@ -114,7 +111,7 @@
|
|
|
<el-table-column prop="notes" label="备注" width="150" />
|
|
<el-table-column prop="notes" label="备注" width="150" />
|
|
|
<el-table-column prop="status" label="状态" width="80">
|
|
<el-table-column prop="status" label="状态" width="80">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag :type="taskStatusType(row.status)" size="mini">{{ taskStatusLabel(row.status) }}</el-tag>
|
|
|
|
|
|
|
+ <StatusTag :type="taskStatusType(row.status)" :text="taskStatusLabel(row.status)" size="mini" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
@@ -273,9 +270,6 @@ export default {
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.health-plan-manage { padding: 20px; }
|
|
.health-plan-manage { padding: 20px; }
|
|
|
-.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
|
|
|
|
-.page-header h2 { margin: 0; font-size: 20px; }
|
|
|
|
|
-.filters { display: flex; align-items: center; }
|
|
|
|
|
.plan-content {
|
|
.plan-content {
|
|
|
background: #f5f7fa;
|
|
background: #f5f7fa;
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
@@ -292,11 +286,6 @@ export default {
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
}
|
|
}
|
|
|
.sort-header:hover {
|
|
.sort-header:hover {
|
|
|
- color: #409eff;
|
|
|
|
|
-}
|
|
|
|
|
-.sort-tag {
|
|
|
|
|
- margin-left: 8px;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
|
|
+ color: var(--adm-primary);
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|