F2-3:运行时动词闭包子指令机制 + staging 晋级(FULL_AUTO 507/HARD 74)

ScriptFacade:addFieldButton 扩第3参闭包(onClick 子指令数组)+ showConfirm
新动词,服务端急切求值闭包,子指令收进子缓冲,输出嵌套指令 JSON。
前端 scriptCommands.ts/registerReplayAction.ts:处理 addButton onClick/
confirmDialog onOk 嵌套重放,onClickActions/onOkActions 透传给 amis。
ScriptFacadeTest 补 7 个正反例(24/24 全绿)。
staging 晋级:FULL_AUTO 507(+10)/HARD 74(-12)/自动化率 82.7%,
双库各更新 801 条,e2e 30/30 全绿。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 22:24:08 +08:00
parent bc23909feb
commit 43fdfd1830
190 changed files with 2625 additions and 2454 deletions

View File

@@ -1,40 +0,0 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : fe20a392-d4fd-402f-bbf8-be8cd41ab932
// template_name: 项目人员配置(五建定制)
// seq : 3
// label : HARD
// 硬 S3 原因 : 动态创建 Vaadin 组件
// 处置 : 原文保留,进人工排期(amis dialog/service 重写)
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Notification;
import com.vaadin.ui.Notification.Type;
final user = group.getField("PM_PROJECT_USERS");
final Button cb = new Button("删除");
final Object table = user?.table;
table?.setImmediate(true);//设置验证
final group1 = group;
cb?.addClickListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
Object o = table?.getValue();
if (o == null){
Notification.show("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def isLock = getFieldValue(o, "ISLOCK");
if(isLock == 1){
Notification.show("已备案人员无法删除!", Type.ERROR_MESSAGE);
}else{
table.removeItem(o);
table.select(null);
user.fireValueChange(true);
}
}
});
//将自定义的按钮添加至
user?.addButton(cb,"delete.png", 1);
user?.deleteButton.setVisible(false);

View File

@@ -0,0 +1,32 @@
// === EIP4 P4 脚本迁移产出 ===
// template_id : fe20a392-d4fd-402f-bbf8-be8cd41ab932
// template_name: 项目人员配置(五建定制)
// seq : 3
// label : PARTIAL
// 余留模式 : raw .table 组件访问; 残留字段句柄链(未覆盖动词)
// 处置 : 大部分已自动改写,余留行人工补全(见作业单)
import com.vaadin.ui.Notification;
import com.vaadin.ui.Notification.Type;
final Object table = group.getField("PM_PROJECT_USERS")?.table;
table?.setImmediate(true);//设置验证
final group1 = group;
//将自定义的按钮添加至
addFieldButton("PM_PROJECT_USERS", "删除", {
Object o = table?.getValue();
if (o == null){
showToast("请选择一条记录!", Type.ERROR_MESSAGE);
return;
}
def isLock = getFieldValue(o, "ISLOCK");
if(isLock == 1){
showToast("已备案人员无法删除!", Type.ERROR_MESSAGE);
}else{
table.removeItem(o);
table.select(null);
group.getField("PM_PROJECT_USERS").fireValueChange(true);
}
})
group.getField("PM_PROJECT_USERS")?.deleteButton.setVisible(false);