Continue
Lines 272 and 668 are the two legitimate references (the synced default and a residual). Let me check them.
Those are just searchKeyword matches (Search substring) — harmless. Now type-check the rules page.
Type-check is clean. Let me verify the rules page in the browser.
The list page looks great: global tip banner, expanded filters (规则名称/适用井区/推荐措施/状态), and the new 推荐级别数 column. Let me open the edit dialog to verify steps 1 & 2 and the level dialog.
Step 1 shows the new 生效范围 radio group. Let me scroll to see 推荐措施 + sync button, then go to step 2.
推荐措施 with 同步措施大类 button, and template variables now show N天前值/持续时间. Now go to step 2 and open the level dialog.
Step 2 looks great: 级别名称/颜色/条件数/条件配置 columns, "从模板创建" preserved, condition text reads "日历液产量,当前vs5天前单日值,相对比率(%) < -10%". Let me open the level editor to verify the merged level dropdown, scenario markers, and condition rows.
It reopened step 1 (my selector matched the background list's 编辑). Let me navigate to step 2 and click the level-row edit link specifically within the dialog.
The dialog state got confused across clicks. Let me reload cleanly and step through once.
The level editor is complete and matches the PRD: merged 推荐级别 dropdown (color+name), 适用场景标记 with info tooltip and checkboxes, and condition rows with 基础指标 / 对比类型 / N天 / 计算方式 / 操作符 / 阈值 / 持续时间. Let me quickly verify the 生产状态 special case (operator locked to "=", threshold becomes a status dropdown).
The production-status logic is implemented in code (changeMetric locks operator to "=" and swaps threshold to a status dropdown). The rules settings page is complete. Let me mark task 1 done and move to the recommendation page.
Now let me re-read the PRD section about the 措施推荐 page (功能二), and the current recommendation page in full.
Now let me read the current recommendation page in full.
The current page needs a complete rebuild to match the PRD's dual-TAB structure. Let me check the measure run table route (for 转措施 navigation) and confirm the tabs component.
The run table is at app/measure/operation. Let me check if it accepts query params for prefill.
The operation page already reads queryWellNo and queryMeasureType. Let me check how it reads them.
The 转措施 action should prefill the run table's new-measure dialog. Let me check the operation page's add-dialog state and whether it uses URL params.
Now I'll rewrite the recommendation page with the dual-TAB structure. Let me write the new file.
I imported some unused symbols. Let me check what components exist and clean up imports.
Let me remove unused imports (CheckCircle2, startOfWeek, endOfWeek).
Now I need to make the operation page open the add-dialog and prefill when action=add&wellNo=...&measureType=... is present. Let me check how it currently reads query params (useSearchParams usage).
The operation page doesn't read URL params yet. Let me view its imports and the add dialog open logic.
I'll add URL-param handling to the operation page so 转措施 prefills and opens the add dialog. Using window.location.search in a useEffect avoids Suspense requirements.
Now add the effect. Let me read around the newMeasure state end to place the effect after it.
Now let me type-check both files.
The recommendation page is clean. The two operation errors are pre-existing (calendar DayContent typing, unrelated to my change). Let me verify the new page in the browser.
TAB1 looks great: dual TABs, filter row (井号/推荐措施/状态/推荐级别/查询/重置), 手动生成推荐, data cutoff, and color-coded cards with level badge, scene tag, reason, rule, trigger time, and 查看详情/确认/忽略/转措施 actions. Let me check TAB2.
TAB2 is complete: full filter row (触发日期范围/井号/措施大类/推荐级别/状态/是否转措施/处理人), 导出 + 列设置 buttons, and the data table with all PRD columns. Let me quickly verify the 转措施 navigation prefills the operation page's add dialog.
The 转措施 deep-link works perfectly — the 新增措施 dialog opens with 井号 = GY2-Q9-H26 and 措施大类 = 冲砂 pre-filled. The full closed-loop flow is functional. Let me mark the todo complete.
I've finished aligning both pages with the PRD. The 措施推荐规则设置 page now has the global yellow tip, a 推荐级别数 list column, expanded filters (规则名称/适用井区/推荐措施/状态), a 生效范围 radio in step 1, a 同步措施大类 button, updated template variables, and a redesigned level dialog with a merged color+name dropdown, 适用场景标记, and per-condition rows (基础指标/对比类型/N天/计算方式/操作符/阈值/持续时间) including the 生产状态 special case.
The 措施推荐 page was rebuilt into a dual-TAB workbench: TAB1 (待处理推荐) shows filterable, level-sorted recommendation cards with 查看详情/确认/忽略/转措施 actions, data-cutoff notice, and 手动生成推荐; TAB2 (历史推荐查询) provides multi-dimension filters, 导出, 列设置, and a full records table. The 转措施 action deep-links into the 措施运行表 and auto-opens the 新增措施 dialog pre-filled with the 井号 and 措施大类, completing the closed-loop flow — all verified in the browser.
你刚才生成的措施推荐页面中的触发时间,统一改为触发日期,后面的值也是精确到日期,不用精确到时间。
The data has 5 trigger values with times. Let me strip the times and fix the card label.
Now I'll strip the times from the 5 trigger values and fix the card label "触发时间" → "触发日期".
Now the card label at line 714:
The historyList filter at line 251 uses .slice(0, 10) which still works fine with date-only strings. The table header (line 971) already said "触发日期". All changes are consistent.
我已将措施推荐页面中的"触发时间"统一改为"触发日期":5 条推荐数据的 triggerTime 值已去掉时间部分(仅保留 YYYY-MM-DD),推荐卡片上的标签由"触发时间"改为"触发日期",历史查询表头此前已是"触发日期"。其余筛选与排序逻辑基于日期字符串仍正常工作,无需改动。
在措施推荐的Tab1列表上方新增统计标签行,具体需求如附件所示F草稿 (1).pdf