diff --git a/docs/development/CURRENT_STATUS.md b/docs/development/CURRENT_STATUS.md index dd1df68..9de162e 100644 --- a/docs/development/CURRENT_STATUS.md +++ b/docs/development/CURRENT_STATUS.md @@ -39,6 +39,7 @@ | 隐患台账 | `src/views/hazard/ledger/index.vue` | `hazard/ledger/index` | 已完成新版 Card Table、五态筛选/Tag、分页、详情弹窗和审核入口;列表已切换为 `/flowable/hazard/todoList`;单位筛选按角色使用 `factoryList`/`myFactory`;附件九宫格支持大图预览;平台同步列暂时隐藏;同步重试等待后端接口 | | 积分管理 | `src/views/points/management/index.vue` | `points/management/index` | 已完成积分规则 Tab、统一 Card 列表、厂区列、分页、详情、新增、启停和删除;超管可筛选/选择厂区,厂区管理员可管理本厂区规则。**流水冲正 Tab 已开发(2026-10-15,待测试)**;申诉处理 Tab 已启用(复用独立「申诉台账」页同一组件 `AppealLedgerPanel`);手动调整 Tab 因 `balance/adjust` 接口定义不完整暂缓 | | 申诉台账 | `src/views/points/appeal/index.vue` | `points/appeal/index` | 已开发(2026-10-15),待测试。独立页(抄隐患台账 + 审批):列表 `appeal/todoList`、详情 `appeal/detail/{id}`、审批 `appeal/completeFlow`(taskId 由 `flowable/busiInfo/getProcessDetail` 补全)。待联调确认:completeFlow 的 taskId 来源、改判补分 `adjustPoints` 传参 | +| 安全兑换管理 | `src/views/exchange/security/index.vue` | `exchange/security/index` | 已开发(2026-10-15),待测试。安全校验总开关 + 兑换限额 + 预警与大额审批 + 防刷配置;接口 `exchange/config/*`、`anti/farm/*`。“校验配置”为前端本地一致性校验 | | 隐患流程配置 | `src/views/flowable/hazardConfig/index.vue` | `flowable/hazardConfig/index` | 已完成列表、筛选、分页、新增、修改、状态 Tag、删除和厂区权限展示;新增“流程类型”字段(`bizType`,字典 `flow_biz_type`)并在列表以 Tag 展示;分页按真实 `data.list/data.total` 解析 | | 切换日志 | `src/views/flowable/switchLog/index.vue` | `flowable/switchLog/index` | 空白页面,无明确列表接口 | diff --git a/docs/development/DEVELOPMENT_LOG.md b/docs/development/DEVELOPMENT_LOG.md index fc68532..b0224cf 100644 --- a/docs/development/DEVELOPMENT_LOG.md +++ b/docs/development/DEVELOPMENT_LOG.md @@ -1,5 +1,13 @@ # 开发日志 +## 2026-10-15:新增 Web 安全兑换管理页面(W5) + +- 新增 `src/views/exchange/security/index.vue`:安全校验总开关(`switch/status` + `switch/toggle`)、兑换限额(每日/每月/每年/次数/单笔最小最大)、预警与大额审批(快速兑换阈值+窗口、大额阈值、大额审批开关)、防刷配置(上报/积分获取/兑换/自报自审)。 +- 新增 `src/api/exchange/config.js`:`exchange/config/active`·`switch/status`·`switch/toggle`·`add`·`updateById`、`anti/farm/active`·`updateById`。 +- “保存配置”:有记录走 `updateById`,无记录提示后走 `add`;“校验配置”为**前端本地一致性校验**(单笔最小≤最大、每日≤每月≤每年),无后端校验配置接口。 +- 菜单(需后端配置):一级「安全兑换管理」,路由 `exchange/security`,组件 `exchange/security/index`(`/exchange/security`)。 +- 验证:`eslint --no-ignore` 通过、`npm run build:prod` 通过(仅既有 warning)。 + ## 2026-10-15:申诉处理 Tab 复用申诉台账组件 - 将申诉台账核心逻辑抽成可复用组件 `src/views/points/appeal/components/AppealLedgerPanel.vue`(列表/详情/审批)。 diff --git a/docs/development/PAGES_TODO.md b/docs/development/PAGES_TODO.md index e42beb0..1ea4b66 100644 --- a/docs/development/PAGES_TODO.md +++ b/docs/development/PAGES_TODO.md @@ -38,7 +38,7 @@ | 14 | 积分与商城 | 商城运营 › 纯积分兑换管理 | ❌ | ⛔ | ⛔ | 同上 | | 15 | 积分与商城 | 商城运营 › 日常积分兑换管理 | ❌ | ⛔ | ⛔ | 同上 | | 16 | 积分与商城 | 商城运营 › 日常积分兑换专区 | ❌ | ⛔ | ⛔ | 同上 | -| 17 | 积分与商城 | 安全兑换管理(限额/大额审批/防刷 4 维度/校验) | ❌ | ✅ | ✅ | `exchange/config/active`、`validate`、`switch/status`、`switch/toggle`、`updateById`([兑换安全配置](../api/modules/11-exchange-config.md));防刷 `anti/farm/active`、`detectAll`、`detectSelfAudit`([防刷分管控](../api/modules/13-anti-farm-config.md)) | +| 17 | 安全兑换管理 | 安全兑换管理(总开关/限额/大额审批/防刷配置) | ⚠️ 待测试 | ✅ | ✅ | **已开发(2026-10-15)**:`src/views/exchange/security/index.vue` + `src/api/exchange/config.js`。接口 `exchange/config/active`·`switch/status`·`switch/toggle`·`add`·`updateById`、`anti/farm/active`·`updateById`。注:“校验配置”为前端本地一致性校验(无后端校验配置接口) | | 18 | 分析与风控 | 数据分析(时效漏斗/排行/分类分布/导出;**无热力图、无顶部筛选列**) | ❌ | ✅ | ✅ | 20 个接口齐全([数据分析](../api/modules/15-data-analysis.md));“超期未处理表”可用隐患待办列表拼接。**页面调整(2026-10-15 甲方)**:去掉隐患热力图、去掉顶部筛选列;“处理时效漏斗”与“积分排行”改为左右布局占一行 | | 19 | 分析与风控 | 风控与审计(Tab1 风控预警 + Tab2 审计日志) | ❌ | ⚠️ | ⚠️ | 审计日志 ✅:`audit/log/getListByPage`、`audit/log/biz/{bizId}`([操作审计日志](../api/modules/16-audit-log.md));**风控预警列表 + 处置(放行/冻结 24h/黑名单)无接口**,Tab1 需等后端 | | 20 | 流程管理 | 隐患流程配置 | ✅ | ✅ | — | [flowable/hazardConfig](../../src/views/flowable/hazardConfig/index.vue) | @@ -202,7 +202,7 @@ | W2 | Web | 申诉台账(独立页,抄隐患台账 + 审批) | `appeal/todoList`、`appeal/detail/{id}`、`appeal/completeFlow`、`flowable/busiInfo/getProcessDetail` | `src/views/points/appeal/index.vue` + `src/api/points/appeal.js` | 高 | ◐ 待测试 | **已开发(2026-10-15)**,待测试。菜单:一级「积分与商城」→「申诉台账」,路由 `points/appeal`,组件 `points/appeal/index`(`/points/appeal`)。待联调确认:completeFlow 的 taskId 来源、改判补分 `adjustPoints` 传参(当前放 `variables`) | | W3 | Web | 积分管理 · 手动调整 Tab | `balance/adjust`、`balance/getByUserId/{userId}` | `src/views/points/management/index.vue` + `src/api/points/balance.js` | 高 | ⛔ 需确认 | **接口定义不完整**:`balance/adjust` 文档仅声明 `application/x-www-form-urlencoded` + 单个整数,缺 `userId`/`points`/原因字段结构,无法开工;**后端计划 2026-10-16 更新该接口并补参数**,更新后即可开发 | | W4 | Web | 积分管理 · 流水冲正 Tab | `transaction/getListByPage`、`transaction/reverse/{logId}` | `src/views/points/management/components/TransactionReversePanel.vue` + `src/api/points/transaction.js` | 中 | ◐ 待测试 | **已开发(2026-10-15)**,待测试。积分管理第 4 个 Tab;仅 status=1(有效)可冲正,二次确认。流水无用户姓名字段,列表显示 userId | -| W5 | Web | 安全兑换管理 | `exchange/config/active`·`validate`·`switch/status`·`switch/toggle`·`updateById`、`anti/farm/active`·`detectAll`·`detectSelfAudit` | `src/views/exchange/security/index.vue` + `src/api/exchange/config.js` | 中 | ☐ | 字段见 `ExchangeConfig` / `AntiFarmConfig` | +| W5 | Web | 安全兑换管理 | `exchange/config/active`·`switch/status`·`switch/toggle`·`add`·`updateById`、`anti/farm/active`·`updateById` | `src/views/exchange/security/index.vue` + `src/api/exchange/config.js` | 中 | ◐ 待测试 | **已开发(2026-10-15)**,待测试。菜单:一级「安全兑换管理」,路由 `exchange/security`,组件 `exchange/security/index`(`/exchange/security`) | | W6 | Web | 数据分析 | `analysis/stats/*`、`ranking/*`、`timeliness/level`、`report/monthly`(+`/export`)、`stats/category`·`stats/level` | `src/views/analysis/index.vue` + `src/api/analysis/index.js` | 中 | ☐ | **页面调整(2026-10-15)**:① 去掉隐患热力图(`heatmap/*` 接口暂不接);② 去掉顶部筛选列;③「处理时效漏斗」与「积分排行」改为左右布局占一行。图表用已装 `echarts` | | A1 | APP | 设置(推送/声音/震动/关于/清缓存/退出) | 纯本地(AsyncStorage) | `src/screens/home/SettingsScreen.tsx` | 中 | ☐ | 参考原型 `scr-settings` | | A2 | APP | 我的兑换 | `exchange/order/myList` | `src/screens/home/MyExchangeScreen.tsx` + `src/api/exchange.ts` | 中 | ☐ | 入口:我的 → 我的兑换 | diff --git a/src/api/exchange/config.js b/src/api/exchange/config.js new file mode 100644 index 0000000..4df97e0 --- /dev/null +++ b/src/api/exchange/config.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +// 获取当前启用的兑换安全配置(无记录时后端返回默认配置;安全开关关闭时返回 null) +export function getActiveExchangeConfig() { + return request({ url: '/business/points/exchange/config/active', method: 'get' }) +} + +// 查询兑换安全开关状态(true-启用,false-关闭) +export function getExchangeSwitchStatus() { + return request({ url: '/business/points/exchange/config/switch/status', method: 'get' }) +} + +// 切换兑换安全开关(管理端) +export function toggleExchangeSwitch(enabled) { + return request({ + url: '/business/points/exchange/config/switch/toggle', + method: 'post', + params: { enabled } + }) +} + +// 新增兑换安全配置 +export function addExchangeConfig(data) { + return request({ url: '/business/points/exchange/config/add', method: 'post', data }) +} + +// 修改兑换安全配置(需包含 id) +export function updateExchangeConfig(data) { + return request({ url: '/business/points/exchange/config/updateById', method: 'post', data }) +} + +// 获取启用的防刷分管控配置 +export function getActiveAntiFarmConfig() { + return request({ url: '/business/points/anti/farm/active', method: 'get' }) +} + +// 修改防刷分管控配置(需包含 id) +export function updateAntiFarmConfig(data) { + return request({ url: '/business/points/anti/farm/updateById', method: 'post', data }) +} diff --git a/src/views/exchange/security/index.vue b/src/views/exchange/security/index.vue new file mode 100644 index 0000000..0b89721 --- /dev/null +++ b/src/views/exchange/security/index.vue @@ -0,0 +1,333 @@ + + + + +