# 项目管理页面重构实施计划 > **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. **Goal:** 重构项目管理页面,100%匹配原型图设计,包括简化标题、标签页筛选、圆形图标快捷方式、调整列表列顺序和背景色。 **Architecture:** 完全重写前端组件,采用 Vue 2 + Element UI,严格遵循设计规范。页面分为四个区域:标题区、搜索筛选区、项目列表区、快捷方式区。 **Tech Stack:** Vue 2.6.12, Element UI 2.15.14, Sass 1.32.13 --- ## Task 1: 备份现有文件 **目的:** 创建当前文件的备份,以便在需要时恢复。 **Step 1: 备份主组件文件** Run: ```bash cp ruoyi-ui/src/views/ccdiProject/index.vue ruoyi-ui/src/views/ccdiProject/index.vue.backup ``` Expected: 文件已复制 **Step 2: 备份 SearchBar 组件** Run: ```bash cp ruoyi-ui/src/views/ccdiProject/components/SearchBar.vue ruoyi-ui/src/views/ccdiProject/components/SearchBar.vue.backup ``` Expected: 文件已复制 **Step 3: 备份 QuickEntry 组件** Run: ```bash cp ruoyi-ui/src/views/ccdiProject/components/QuickEntry.vue ruoyi-ui/src/views/ccdiProject/components/QuickEntry.vue.backup ``` Expected: 文件已复制 **Step 4: 提交备份** Run: ```bash git add ruoyi-ui/src/views/ccdiProject/*.backup ruoyi-ui/src/views/ccdiProject/components/*.backup git commit -m "chore: 备份项目管理页面相关组件" ``` Expected: 备份文件已提交 --- ## Task 2: 修改页面标题区域 **目的:** 移除副标题,简化页面标题区域。 **Files:** - Modify: `ruoyi-ui/src/views/ccdiProject/index.vue:4-7` **Step 1: 修改页面标题HTML** Open `ruoyi-ui/src/views/ccdiProject/index.vue`, find lines 4-7: ```vue ``` Replace with: ```vue ``` **Step 2: 修改页面标题样式** In the same file, find the ` ``` **Step 4: 验证 SearchBar 组件** Run: ```bash cd ruoyi-ui && npm run dev ``` Expected: 搜索框和标签页在同一行,标签页显示"全部项目(0)"、"进行中(0)"等 **Step 5: 提交修改** Run: ```bash git add ruoyi-ui/src/views/ccdiProject/components/SearchBar.vue git commit -m "feat: 重写搜索栏组件,添加标签页筛选功能" ``` Expected: 提交成功 --- ## Task 4: 更新主组件 - 适配新的 SearchBar **目的:** 更新主组件以适配新的 SearchBar 组件,传递标签页数量数据。 **Files:** - Modify: `ruoyi-ui/src/views/ccdiProject/index.vue` **Step 1: 更新 SearchBar 使用方式** In `index.vue`, find line 10-15: ```vue ``` Replace with: ```vue ``` **Step 2: 添加 tabCounts 数据** In the `data()` function (line 83-109), add after `currentArchiveProject`: ```javascript // 标签页数量统计 tabCounts: { all: 0, ongoing: 0, completed: 0, archived: 0 } ``` **Step 3: 更新 getList 方法** Find the `getList()` method (lines 116-126), add tabCounts calculation: ```javascript /** 查询项目列表 */ getList() { this.loading = true listProject(this.queryParams).then(response => { this.projectList = response.rows this.total = response.total this.loading = false // 计算标签页数量 this.calculateTabCounts() }).catch(() => { this.loading = false }) }, /** 计算标签页数量 */ calculateTabCounts() { // 注意:这里需要后端API返回所有状态的数量统计 // 目前暂时使用当前页的数据进行计算 this.tabCounts = { all: this.total, ongoing: this.projectList.filter(p => p.status === '0').length, completed: this.projectList.filter(p => p.status === '1').length, archived: this.projectList.filter(p => p.status === '2').length } } ``` **Step 4: 验证标签页数量** Run: ```bash cd ruoyi-ui && npm run dev ``` Expected: 标签页显示正确的项目数量 **Step 5: 提交修改** Run: ```bash git add ruoyi-ui/src/views/ccdiProject/index.vue git commit -m "feat: 添加标签页数量统计功能" ``` Expected: 提交成功 --- ## Task 5: 重写 QuickEntry 组件 - 圆形图标 **目的:** 将快捷入口改为快捷方式,使用圆形图标,调整描述文字。 **Files:** - Modify: `ruoyi-ui/src/views/ccdiProject/components/QuickEntry.vue` **Step 1: 重写 QuickEntry 模板** Replace entire `