# Project Upload File Delete Trigger Retag Frontend Implementation Plan

> **For agentic workers:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** 在项目详情上传数据页删除文件时，确认框明确提示“即将重新打标”，删除成功后明确提示项目已开始重新打标。

**Architecture:** 不改动现有删除按钮、列表刷新和轮询逻辑，只在 `UploadData.vue` 中更新删除确认文案和成功提示文案。继续沿用现有 `deleteFileUploadRecord` 接口，由后端实际触发异步重新打标，前端只负责明确告知用户影响。

**Tech Stack:** Vue 2, Element UI, Node.js, npm

---

### Task 1: 为删除确认和成功提示补齐失败测试

**Files:**
- Create: `ruoyi-ui/tests/unit/upload-data-delete-retag-copy.test.js`
- Modify: `ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue`

- [ ] **Step 1: Write the failing test**

新增一个轻量源码断言测试，验证删除交互文案：

```javascript
assert(
  source.includes("删除后将即将重新打标"),
  "删除确认框应明确提示即将重新打标"
);
assert(
  source.includes("删除成功，已开始项目重新打标"),
  "删除成功提示应明确告知已开始项目重新打标"
);
```

实现时可用正则放宽空白和换行，不依赖运行 Vue 环境。

- [ ] **Step 2: Run test to verify it fails**

Run:

```bash
node ruoyi-ui/tests/unit/upload-data-delete-retag-copy.test.js
```

Expected:

- `FAIL`
- 原因是当前确认框和成功提示还没有“重新打标”文案

- [ ] **Step 3: Write minimal implementation**

在 `handleDeleteFile` 中把确认框改为明确提示会重新打标，例如：

```javascript
await this.$confirm(
  "删除该文件后将重新打标项目内流水，是否继续？",
  "提示",
  { type: "warning" }
);
```

把成功提示改为：

```javascript
this.$message.success("删除成功，已开始项目重新打标");
```

- [ ] **Step 4: Run test to verify it passes**

Run:

```bash
node ruoyi-ui/tests/unit/upload-data-delete-retag-copy.test.js
```

Expected:

- `PASS`

- [ ] **Step 5: Commit**

```bash
git add ruoyi-ui/src/views/ccdiProject/components/detail/UploadData.vue ruoyi-ui/tests/unit/upload-data-delete-retag-copy.test.js
git commit -m "补充上传文件删除重打标提示"
```
