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>
33 lines
1.0 KiB
Groovy
33 lines
1.0 KiB
Groovy
// === EIP4 P4 脚本迁移产出 ===
|
|
// template_id : 75fb9a46-b874-46b4-a6e5-c12c14ec54b6
|
|
// template_name: 培训签到
|
|
// seq : 1
|
|
// label : FULL_AUTO
|
|
// 处置 : 全自动改写完成,直接入 P4 转换流水线
|
|
|
|
import com.vaadin.ui.Notification;
|
|
import com.vaadin.ui.Notification.Type;
|
|
|
|
|
|
|
|
//将自定义的按钮添加至
|
|
addSubTableButton("SIGNDETAILS", "SELECT", 0);
|
|
addFieldButton("SIGNDETAILS", "全选签到", {
|
|
def signDetailsValue = getFieldValue("SIGNDETAILS");
|
|
if(signDetailsValue != null){
|
|
for(sign in signDetailsValue){
|
|
sign.put("ISSIGN",true);
|
|
}
|
|
setFieldValue("SIGNDETAILS", signDetailsValue);
|
|
}
|
|
}, 1)
|
|
addFieldButton("SIGNDETAILS", "取消全选", {
|
|
def signDetailsValue = getFieldValue("SIGNDETAILS");
|
|
if(signDetailsValue != null){
|
|
for(sign in signDetailsValue){
|
|
sign.put("ISSIGN",false);
|
|
}
|
|
setFieldValue("SIGNDETAILS", signDetailsValue);
|
|
}
|
|
}, 2)
|