PageBlueprint 加 RECIPE_MASTER_DETAIL 常量与可空 child 组件(14-arg, 保留 13-arg 兼容构造);新增 PageBlueprintChild record。 PageBlueprintCompiler.masterDetail 复用 maintenance 列表骨架, 新增/编辑表单内联 house-style input-table 子表(name=listColumn, quickEdit 控件),编辑表单 initApi 走 _LOAD 回显主+子行。 validate 接受 master-detail 并要求 child 非空/childTable/listColumn 非空/fields 非空。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
391 lines
11 KiB
JSON
391 lines
11 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "考勤机设备",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/KQ_DEVICE_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "NAME",
|
|
"label" : "名称",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "DEVTYPE",
|
|
"label" : "设备型号",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "SN",
|
|
"label" : "序列号",
|
|
"type" : "input-text"
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "KQ_DEVICE_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "NAME",
|
|
"label" : "名称",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "DEVTYPE",
|
|
"label" : "考勤机类型",
|
|
"width" : 200,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "打卡考勤机",
|
|
"2" : "门禁考勤机"
|
|
}
|
|
}, {
|
|
"name" : "SN",
|
|
"label" : "序列号",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "ISACTIVE",
|
|
"label" : "是否有效",
|
|
"width" : 100,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
}
|
|
}, {
|
|
"name" : "ISONLINE",
|
|
"label" : "是否在线",
|
|
"width" : 100,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
}
|
|
} ],
|
|
"headerToolbar" : [ {
|
|
"type" : "button",
|
|
"id" : "添加",
|
|
"label" : "添加",
|
|
"level" : "primary",
|
|
"actionType" : "dialog",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "添加",
|
|
"size" : "lg",
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/00ba6b46-fbe1-4275-81c3-12279c039067?format=amis",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/form/KQ_DEVICE/defaults?templateId=00ba6b46-fbe1-4275-81c3-12279c039067"
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/KQ_DEVICE_ADD?__egtpl=00ba6b46-fbe1-4275-81c3-12279c039067",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "修改",
|
|
"label" : "修改",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "修改",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/00ba6b46-fbe1-4275-81c3-12279c039067?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/KQ_DEVICE_LOAD?__egtpl=00ba6b46-fbe1-4275-81c3-12279c039067",
|
|
"data" : {
|
|
"KQ_DEVICE_ID" : "${KQ_DEVICE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/KQ_DEVICE_UPDATE?__egtpl=00ba6b46-fbe1-4275-81c3-12279c039067",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "删除",
|
|
"label" : "删除",
|
|
"level" : "danger",
|
|
"actionType" : "ajax",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"confirmText" : "确认要删除此记录吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/KQ_DEVICE_DELETE",
|
|
"data" : {
|
|
"ids" : "${selectedItems|pick:KQ_DEVICE_ID|join:','}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "查看",
|
|
"label" : "查看",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "查看",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}",
|
|
"__readonly" : true
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/00ba6b46-fbe1-4275-81c3-12279c039067?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/KQ_DEVICE_LOAD?__egtpl=00ba6b46-fbe1-4275-81c3-12279c039067",
|
|
"data" : {
|
|
"KQ_DEVICE_ID" : "${KQ_DEVICE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "设置参数",
|
|
"label" : "设置参数",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "设置参数",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/11ef35b4-91f0-408a-b137-69aa87c8aa40?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/KQ_DEVICE_LOAD?__egtpl=11ef35b4-91f0-408a-b137-69aa87c8aa40",
|
|
"data" : {
|
|
"KQ_DEVICE_ID" : "${KQ_DEVICE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
},
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 3,
|
|
"item" : "${&}",
|
|
"templateId" : "dcff550a-dbfe-49d0-914b-35f6e16f4e72"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult3"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult3.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "设置",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/KQ_DEVICE_SETPARAM?__egtpl=11ef35b4-91f0-408a-b137-69aa87c8aa40",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "设备升级",
|
|
"label" : "设备升级",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "设备升级",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/3025fb53-b838-48bc-adf0-6291731f20ab?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/KQ_DEVICE_LOAD?__egtpl=3025fb53-b838-48bc-adf0-6291731f20ab",
|
|
"data" : {
|
|
"KQ_DEVICE_ID" : "${KQ_DEVICE_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "升级",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/KQ_DEVICE_UPGRADE?__egtpl=3025fb53-b838-48bc-adf0-6291731f20ab",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "管理用户",
|
|
"label" : "管理用户",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "考勤机用户管理",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"KQ_DEVICE_ID" : "${selectedItems[0].KQ_DEVICE_ID}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/1f076b2f-ac05-4846-bb8a-c6264f7eabd0?format=amis"
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "关闭",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "清空数据",
|
|
"label" : "清空数据",
|
|
"actionType" : "ajax",
|
|
"disabled" : true,
|
|
"confirmText" : "确认要清空考勤机中数据吗?清空数据要等待远程考勤机处理,请稍后查看结果。",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/VIEW_USER_KQ_CLEARUSER",
|
|
"data" : {
|
|
"KQ_DEVICE_ID" : "${selectedItems[0].KQ_DEVICE_ID}"
|
|
}
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "KQ_DEVICE_ID",
|
|
"onEvent" : {
|
|
"selectedChange" : {
|
|
"actions" : [ {
|
|
"actionType" : "disabled",
|
|
"componentId" : "清空数据"
|
|
}, {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 2,
|
|
"item" : "${event.data.selectedItems[0]}",
|
|
"templateId" : "dcff550a-dbfe-49d0-914b-35f6e16f4e72"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult2"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult2.commands}"
|
|
}
|
|
} ]
|
|
},
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 3,
|
|
"item" : "${&}",
|
|
"templateId" : "dcff550a-dbfe-49d0-914b-35f6e16f4e72"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult3"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult3.commands}"
|
|
}
|
|
}, {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${&}",
|
|
"templateId" : "dcff550a-dbfe-49d0-914b-35f6e16f4e72"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |