Преглед изворни кода

fix(S-cfc-78): admin.family.reportEntry 报告数改纯文本并移除代传报告入口

Agnes Agent пре 1 час
родитељ
комит
4e91d87801
1 измењених фајлова са 6 додато и 202 уклоњено
  1. 6 202
      cfc-web/src/views/Families.vue

+ 6 - 202
cfc-web/src/views/Families.vue

@@ -142,22 +142,10 @@
               <span v-else class="cell-zero">0</span>
               <span v-else class="cell-zero">0</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column prop="reportCount" label="上传报告数" width="110">
-            <template slot-scope="scope">
-              <el-link type="primary" :underline="false" @click.stop="openDetailDialog(scope.row.id, 'reports')">{{ scope.row.reportCount }}</el-link>
-            </template>
-          </el-table-column>
-          <el-table-column prop="planCount" label="方案数" width="100">
-            <template slot-scope="scope">
-              <el-link type="primary" :underline="false" @click.stop="openDetailDialog(scope.row.id, 'plans')">{{ scope.row.planCount }}</el-link>
-            </template>
-          </el-table-column>
-          <el-table-column prop="taskCount" label="任务数" width="100">
-            <template slot-scope="scope">
-              <el-link v-if="scope.row.taskCount > 0" type="primary" :underline="false" @click.stop="openDetailDialog(scope.row.id, 'tasks')">{{ scope.row.taskCount }}</el-link>
-              <span v-else class="cell-zero">0</span>
-            </template>
-          </el-table-column>
+          <!-- 统计数纯文本(FAMILY-WB-2026-11-13-V1 §S1-1):相关操作入口已迁移至单家庭工作台 -->
+          <el-table-column prop="reportCount" label="上传报告数" width="110"></el-table-column>
+          <el-table-column prop="planCount" label="方案数" width="100"></el-table-column>
+          <el-table-column prop="taskCount" label="任务数" width="100"></el-table-column>
           <el-table-column prop="couponCount" label="优惠券数量" width="100">
           <el-table-column prop="couponCount" label="优惠券数量" width="100">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-link type="primary" :underline="false" @click.stop="goCouponManage(scope.row.id)">{{ scope.row.couponCount }}</el-link>
               <el-link type="primary" :underline="false" @click.stop="goCouponManage(scope.row.id)">{{ scope.row.couponCount }}</el-link>
@@ -180,9 +168,6 @@
                 <el-dropdown-menu slot="dropdown">
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item command="workbench">进入工作台</el-dropdown-item>
                   <el-dropdown-item command="workbench">进入工作台</el-dropdown-item>
                   <el-dropdown-item command="members">查看成员</el-dropdown-item>
                   <el-dropdown-item command="members">查看成员</el-dropdown-item>
-                  <el-dropdown-item command="reports">报告明细</el-dropdown-item>
-                  <el-dropdown-item command="plans">方案明细</el-dropdown-item>
-                  <el-dropdown-item command="tasks">任务明细</el-dropdown-item>
                   <el-dropdown-item command="coupon">优惠券</el-dropdown-item>
                   <el-dropdown-item command="coupon">优惠券</el-dropdown-item>
                   <el-dropdown-item command="earnings">收益</el-dropdown-item>
                   <el-dropdown-item command="earnings">收益</el-dropdown-item>
                   <el-dropdown-item command="config">配置</el-dropdown-item>
                   <el-dropdown-item command="config">配置</el-dropdown-item>
@@ -285,99 +270,13 @@
       </div>
       </div>
     </el-dialog>
     </el-dialog>
 
 
-    <!-- 报告/方案/任务明细弹窗 -->
-    <el-dialog
-      :title="detailDialogTitle"
-      :visible.sync="detailDialogVisible"
-      width="900px"
-      top="6vh"
-      :close-on-click-modal="false"
-    >
-      <div v-loading="detailLoading">
-        <template v-if="detailType === 'reports'">
-          <div class="mb-12">
-            <el-button type="primary" size="mini" @click="goProxyReportUpload">代传报告</el-button>
-          </div>
-          <el-table :data="(detailOverview && detailOverview.reports) || []" border class="full-width" max-height="400">
-            <el-table-column label="类型">
-              <template slot-scope="{ row }">
-                <StatusTag :options="detailReportTypeOptions" :value="row.reportType" />
-              </template>
-            </el-table-column>
-            <el-table-column prop="reportNumber" label="报告编号" width="140" />
-            <el-table-column label="日期">
-              <template slot-scope="{ row }">{{ formatDate(row.reportDate) }}</template>
-            </el-table-column>
-            <el-table-column prop="personName" label="姓名" />
-            <el-table-column label="状态">
-              <template slot-scope="{ row }">
-                <StatusTag :options="detailReportStatusOptions" :value="row.status" />
-              </template>
-            </el-table-column>
-            <el-table-column prop="overallScore" label="总分" width="70" />
-            <el-table-column prop="gutHealthScore" label="肠道分" width="80" />
-          </el-table>
-          <el-empty v-if="!detailLoading && (!detailOverview || !detailOverview.reports || !detailOverview.reports.length)" description="暂无数据" :image-size="60" />
-        </template>
-
-        <template v-else-if="detailType === 'plans'">
-          <div class="mb-12">
-            <el-button type="primary" size="mini" @click="openPlanGen">代生成方案</el-button>
-          </div>
-          <el-table :data="(detailOverview && detailOverview.plans) || []" border class="full-width" max-height="400">
-            <el-table-column label="类型">
-              <template slot-scope="{ row }">
-                <StatusTag :options="detailPlanTypeOptions" :value="row.planType" />
-              </template>
-            </el-table-column>
-            <el-table-column prop="memberName" label="成员" />
-            <el-table-column prop="goal" label="目标" show-overflow-tooltip />
-            <el-table-column label="状态">
-              <template slot-scope="{ row }">
-                <StatusTag :options="detailPlanStatusOptions" :value="row.status" />
-              </template>
-            </el-table-column>
-            <el-table-column prop="totalDays" label="天数" width="70" />
-            <el-table-column label="创建时间">
-              <template slot-scope="{ row }">{{ formatDate(row.createdAt) }}</template>
-            </el-table-column>
-          </el-table>
-          <el-empty v-if="!detailLoading && (!detailOverview || !detailOverview.plans || !detailOverview.plans.length)" description="暂无数据" :image-size="60" />
-        </template>
-
-        <template v-else-if="detailType === 'tasks'">
-          <el-table :data="detailTasks" border class="full-width" max-height="400">
-            <el-table-column prop="title" label="标题" show-overflow-tooltip />
-            <el-table-column label="状态">
-              <template slot-scope="{ row }">
-                <StatusTag :options="detailTaskStatusOptions" :value="row.status" />
-              </template>
-            </el-table-column>
-            <el-table-column prop="category" label="分类" width="110" />
-            <el-table-column prop="points" label="积分" width="70" />
-            <el-table-column label="截止">
-              <template slot-scope="{ row }">{{ formatDate(row.deadline) }}</template>
-            </el-table-column>
-          </el-table>
-          <el-pagination
-            class="pagination-right-mt12"
-            @current-change="loadTasks"
-            :current-page="detailTaskPage"
-            :page-size="detailTaskSize"
-            :total="detailTaskTotal"
-            layout="total, prev, pager, next"
-          />
-          <el-empty v-if="!detailLoading && (!detailTasks || !detailTasks.length)" description="暂无数据" :image-size="60" />
-        </template>
-      </div>
-    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import SortMixin from '@/mixins/SortMixin'
 import SortMixin from '@/mixins/SortMixin'
 import ListStateMixin from '@/mixins/ListStateMixin'
 import ListStateMixin from '@/mixins/ListStateMixin'
-import { getFamilyList, getFamilyMembers, getFamilyOverview, getFamilyTasks, getFamilyStats, updateFamily, deleteFamily, setMemberAdminRole } from '@/api/admin'
+import { getFamilyList, getFamilyMembers, getFamilyStats, updateFamily, deleteFamily, setMemberAdminRole } from '@/api/admin'
 
 
 export default {
 export default {
   name: 'Families',
   name: 'Families',
@@ -386,10 +285,6 @@ export default {
     tableHeight() {
     tableHeight() {
       return window.innerHeight - 340
       return window.innerHeight - 340
     },
     },
-    detailDialogTitle() {
-      const titles = { reports: '报告列表', plans: '方案列表', tasks: '任务列表' }
-      return titles[this.detailType] || '家庭明细'
-    },
     // 统计带兜底:基于当前页 tableData 合计(仅降级时使用,勿删)
     // 统计带兜底:基于当前页 tableData 合计(仅降级时使用,勿删)
     // 注意:reports 为「本页累计」口径(sum reportCount),与全局「本月报告数」口径不同,
     // 注意:reports 为「本页累计」口径(sum reportCount),与全局「本月报告数」口径不同,
     // 故降级时该卡片单独标注「(本页累计)」,其余卡片仍为「(本页合计)」
     // 故降级时该卡片单独标注「(本页累计)」,其余卡片仍为「(本页合计)」
@@ -466,51 +361,7 @@ export default {
       membersData: {
       membersData: {
         family: null,
         family: null,
         members: []
         members: []
-      },
-      detailDialogVisible: false,
-      detailType: '',
-      detailFamilyId: null,
-      detailOverview: null,
-      detailLoading: false,
-      detailTasks: [],
-      detailTaskPage: 1,
-      detailTaskSize: 20,
-      detailTaskTotal: 0,
-      detailReportTypeOptions: [
-        { value: 'gut_flora', label: '菌群检测', type: 'success' },
-        { value: 'physical_exam', label: '体检报告', type: 'primary' },
-        { value: 'dan', label: 'DAN测评', type: 'warning' },
-        { value: 'brain_status', label: '脑状态', type: 'primary' },
-        { value: 'aptitude', label: '先天潜能', type: 'primary' },
-        { value: 'insurance', label: '保单', type: 'info' },
-        { value: 'fortune', label: '家庭周报', type: 'danger' }
-      ],
-      detailReportStatusOptions: [
-        { value: 'active', label: '生效', type: 'success' },
-        { value: 'archived', label: '已归档', type: 'warning' },
-        { value: 'deleted', label: '已删除', type: 'info' }
-      ],
-      detailPlanTypeOptions: [
-        { value: 'health_plan', label: '健康方案', type: 'primary' },
-        { value: 'family_attribution_plan', label: '家庭归因方案', type: 'warning' }
-      ],
-      detailPlanStatusOptions: [
-        { value: 'draft', label: '草稿', type: 'info' },
-        { value: 'pending_review', label: '待审核', type: 'warning' },
-        { value: 'published', label: '已发布', type: 'success' },
-        { value: 'rejected', label: '已驳回', type: 'danger' }
-      ],
-      detailTaskStatusOptions: [
-        { value: 'pending', label: '进行中', type: 'warning' },
-        { value: 'pending_review', label: '待审核', type: 'warning' },
-        { value: 'completed', label: '已完成', type: 'success' },
-        { value: 'locked', label: '前置锁定', type: 'info' },
-        { value: 'assigned', label: '待接受', type: 'info' },
-        { value: 'in_progress', label: '进行中', type: 'warning' },
-        { value: 'rejected', label: '已拒绝', type: 'danger' },
-        { value: 'overdue', label: '已过期', type: 'danger' },
-        { value: 'cancelled', label: '已取消', type: 'info' }
-      ]
+      }
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -569,9 +420,6 @@ export default {
       switch (cmd) {
       switch (cmd) {
         case 'workbench': this.goWorkbench(row); break
         case 'workbench': this.goWorkbench(row); break
         case 'members': this.handleViewMembers(row); break
         case 'members': this.handleViewMembers(row); break
-        case 'reports': this.openDetailDialog(row.id, 'reports'); break
-        case 'plans': this.openDetailDialog(row.id, 'plans'); break
-        case 'tasks': this.openDetailDialog(row.id, 'tasks'); break
         case 'coupon': this.goCouponManage(row.id); break
         case 'coupon': this.goCouponManage(row.id); break
         case 'earnings': this.$router.push({ path: '/family-earnings', query: { familyId: row.id } }); break
         case 'earnings': this.$router.push({ path: '/family-earnings', query: { familyId: row.id } }); break
         case 'config': this.$router.push({ path: '/family-metric-agg-config' }); break
         case 'config': this.$router.push({ path: '/family-metric-agg-config' }); break
@@ -701,50 +549,6 @@ export default {
     },
     },
     goCouponManage(familyId) {
     goCouponManage(familyId) {
       this.$router.push({ path: '/admin/family-coupon', query: { familyId } })
       this.$router.push({ path: '/admin/family-coupon', query: { familyId } })
-    },
-    openDetailDialog(familyId, type) {
-      this.detailFamilyId = familyId
-      this.detailType = type
-      this.detailOverview = null
-      this.detailTasks = []
-      this.detailTaskPage = 1
-      this.detailTaskTotal = 0
-      this.detailDialogVisible = true
-      this.loadDetail()
-    },
-    async loadDetail() {
-      if (!this.detailFamilyId) return
-      this.detailLoading = true
-      try {
-        if (this.detailType === 'tasks') {
-          await this.loadTasks(1)
-        } else {
-          const res = await getFamilyOverview(this.detailFamilyId)
-          this.detailOverview = res.data
-        }
-      } catch (error) {
-        this.$message.error(error.message || '加载明细失败')
-      } finally {
-        this.detailLoading = false
-      }
-    },
-    async loadTasks(page) {
-      this.detailTaskPage = page
-      try {
-        const res = await getFamilyTasks(this.detailFamilyId, { page, size: this.detailTaskSize })
-        this.detailTasks = res.data.records || []
-        this.detailTaskTotal = res.data.total || 0
-      } catch (error) {
-        this.$message.error(error.message || '加载任务列表失败')
-      }
-    },
-    goProxyReportUpload() {
-      if (!this.detailFamilyId) return
-      this.$router.push({ path: '/report-proxy-upload', query: { familyId: this.detailFamilyId } })
-    },
-    openPlanGen() {
-      if (!this.detailFamilyId) return
-      this.$router.push({ path: '/health-plan-manage', query: { familyId: this.detailFamilyId } })
     }
     }
   }
   }
 }
 }