Files
eip4-platform/转换产物-attach/schema/a90a5eb4-4d25-4898-822d-9ed157bce4de.json
zhengwr 8fe377b0c8 feat(blueprint): master-detail-v1 编译器分支 + PageBlueprintChild
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>
2026-06-20 15:16:30 +08:00

672 lines
20 KiB
JSON

{
"type" : "page",
"title" : "实名制考勤机管理",
"body" : {
"type" : "crud",
"api" : "/api/flow/GB_DEVICE_SEARCH",
"syncLocation" : false,
"selectable" : true,
"checkOnItemClick" : true,
"filter" : {
"title" : "查询",
"body" : [ {
"name" : "NAME",
"label" : "名称",
"type" : "input-text"
}, {
"name" : "SN",
"label" : "序列号",
"type" : "input-text"
}, {
"name" : "DEVTYPE",
"label" : "设备类型",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/GB_DEVICE_DEVTYPE"
}, {
"name" : "INOROUT",
"label" : "进出类型",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/KQ_GB_CLOCK_INOUT"
}, {
"name" : "GB_PROJECTINFOID",
"label" : "GB_PROJECTINFOID",
"hidden" : true,
"type" : "picker",
"clearable" : true,
"source" : "/api/picker/0d674631-7a53-44b0-bb41-6aa201ede8ec/list",
"labelField" : "_label",
"valueField" : "_id",
"modalMode" : "dialog",
"modalSize" : "lg",
"pickerSchema" : {
"mode" : "table",
"headerToolbar" : [ {
"type" : "search-box",
"name" : "q",
"placeholder" : "输入关键字搜索"
} ],
"footerToolbar" : [ "pagination" ]
}
} ]
},
"columns" : [ {
"name" : "GB_DEVICE_ID",
"label" : "主键",
"width" : 200,
"toggled" : false
}, {
"name" : "GB_PROJECTINFOID_DISPLAY__",
"label" : "实名制项目",
"width" : 200
}, {
"name" : "NAME",
"label" : "名称",
"width" : 200
}, {
"name" : "SN",
"label" : "序列号",
"width" : 200
}, {
"name" : "DEVTYPE",
"label" : "设备类型",
"width" : 200,
"type" : "mapping",
"map" : {
"1" : "打卡考勤机",
"2" : "数据采集考勤机"
}
}, {
"name" : "INOROUT",
"label" : "进出类型",
"width" : 200,
"type" : "mapping",
"map" : {
"1" : "进门",
"2" : "出门"
}
}, {
"name" : "TAG",
"label" : "设备标识",
"width" : 200
}, {
"name" : "ISACTIVE",
"label" : "是否有效",
"width" : 200,
"type" : "mapping",
"map" : {
"0" : "否",
"1" : "是",
"false" : "否",
"true" : "是"
}
}, {
"name" : "ISONLINE",
"label" : "是否在线",
"width" : 200,
"type" : "mapping",
"map" : {
"0" : "否",
"1" : "是",
"false" : "否",
"true" : "是"
}
}, {
"name" : "LASTSYC",
"label" : "最后一次同步时间",
"width" : 200
} ],
"headerToolbar" : [ {
"type" : "button",
"id" : "添加",
"label" : "添加",
"level" : "primary",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "添加",
"size" : "lg",
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/c4420a88-7dd3-48cf-8413-eaa4fa10313a?format=amis",
"api" : {
"method" : "get",
"url" : "/api/form/GB_DEVICE/defaults?templateId=c4420a88-7dd3-48cf-8413-eaa4fa10313a"
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/GB_DEVICE_ADD?__egtpl=c4420a88-7dd3-48cf-8413-eaa4fa10313a",
"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/c4420a88-7dd3-48cf-8413-eaa4fa10313a?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_LOAD?__egtpl=c4420a88-7dd3-48cf-8413-eaa4fa10313a",
"data" : {
"GB_DEVICE_ID" : "${GB_DEVICE_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/GB_DEVICE_UPDATE?__egtpl=c4420a88-7dd3-48cf-8413-eaa4fa10313a",
"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/GB_DEVICE_DELETE",
"data" : {
"ids" : "${selectedItems|pick:GB_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/c4420a88-7dd3-48cf-8413-eaa4fa10313a?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_LOAD?__egtpl=c4420a88-7dd3-48cf-8413-eaa4fa10313a",
"data" : {
"GB_DEVICE_ID" : "${GB_DEVICE_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
}
}
}, {
"type" : "button",
"id" : "清空数据",
"label" : "清空数据",
"actionType" : "ajax",
"disabled" : true,
"confirmText" : "确认要清空这台考勤机人员数据吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_DELETEALLUSER",
"data" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
}
}
}, {
"type" : "button",
"id" : "获取全部人员",
"label" : "获取全部人员",
"actionType" : "ajax",
"disabled" : true,
"confirmText" : "确认要全部人员吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_GETALLUSER",
"data" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
}
}
}, {
"type" : "button",
"id" : "设置超级管理员",
"label" : "设置超级管理员",
"actionType" : "ajax",
"confirmText" : "确认要设置超级管理员吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_SENDMANAGERUSER",
"data" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, {
"type" : "button",
"id" : "获取一代机信息",
"label" : "获取一代机信息",
"actionType" : "ajax",
"confirmText" : "确认要删除此记录吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_OLDINFO",
"data" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, {
"type" : "button",
"id" : "升级一代机器",
"label" : "升级一代机器",
"actionType" : "ajax",
"confirmText" : "确认要升级设备吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_OLDUPDATE",
"data" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, {
"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/148958ff-7fb9-4f22-9012-14714cbc2db1?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_LOAD?__egtpl=148958ff-7fb9-4f22-9012-14714cbc2db1",
"data" : {
"GB_DEVICE_ID" : "${GB_DEVICE_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
}
}
}, {
"type" : "button",
"id" : "升级建造师新款",
"label" : "升级建造师新款",
"actionType" : "ajax",
"confirmText" : "确认要升级吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_JZSUPDATE",
"data" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, {
"type" : "button",
"id" : "7200机设置",
"label" : "7200机设置",
"actionType" : "dialog",
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
"dialog" : {
"type" : "dialog",
"title" : "7200机设置",
"size" : "lg",
"data" : {
"&" : "${selectedItems[0]}"
},
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/db8bd9f1-6c21-40e5-8788-98e757bfdc98?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_LOAD?__egtpl=db8bd9f1-6c21-40e5-8788-98e757bfdc98",
"data" : {
"GB_DEVICE_ID" : "${GB_DEVICE_ID}"
},
"responseData" : {
"&" : "${result}"
}
},
"onEvent" : {
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 2,
"item" : "${&}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult2"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult2.commands}"
}
} ]
}
}
},
"actions" : [ {
"type" : "button",
"label" : "设置",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/GB_DEVICE_ZZJCONFIG?__egtpl=db8bd9f1-6c21-40e5-8788-98e757bfdc98",
"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/088dc123-505d-425a-8cec-7324c3f998b4?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_LOAD?__egtpl=088dc123-505d-425a-8cec-7324c3f998b4",
"data" : {
"GB_DEVICE_ID" : "${GB_DEVICE_ID}"
},
"responseData" : {
"&" : "${result}"
}
},
"onEvent" : {
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 4,
"item" : "${&}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult4"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult4.commands}"
}
} ]
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/GB_DEVICE_CHANGEPLANES?__egtpl=088dc123-505d-425a-8cec-7324c3f998b4",
"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/73d07650-10f0-4e20-9d28-dfc5f88a97fa?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_LOAD?__egtpl=73d07650-10f0-4e20-9d28-dfc5f88a97fa",
"data" : {
"GB_DEVICE_ID" : "${GB_DEVICE_ID}"
},
"responseData" : {
"&" : "${result}"
}
},
"onEvent" : {
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 3,
"item" : "${&}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult3"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult3.commands}"
}
} ]
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/GB_DEVICE_TELEPHONERELPCATION?__egtpl=73d07650-10f0-4e20-9d28-dfc5f88a97fa",
"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" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
},
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/4e73896d-e5a8-488e-9785-28e5bbd3c060?format=amis"
},
"actions" : [ {
"type" : "button",
"label" : "关闭",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "获取设备参数",
"label" : "获取设备参数",
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/flow/GB_DEVICE_GETCONFIGINFO",
"data" : {
"GB_DEVICE_ID" : "${selectedItems[0].GB_DEVICE_ID}"
}
},
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
}, "pagination" ],
"primaryField" : "GB_DEVICE_ID",
"onEvent" : {
"selectedChange" : {
"actions" : [ {
"actionType" : "disabled",
"componentId" : "清空数据"
}, {
"actionType" : "disabled",
"componentId" : "获取全部人员"
}, {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 1,
"item" : "${event.data.selectedItems[0]}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult1"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult1.commands}"
}
} ]
},
"inited" : {
"actions" : [ {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 2,
"item" : "${&}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult2"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult2.commands}"
}
}, {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 4,
"item" : "${&}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult4"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult4.commands}"
}
}, {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 3,
"item" : "${&}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult3"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult3.commands}"
}
}, {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 5,
"item" : "${&}",
"templateId" : "a90a5eb4-4d25-4898-822d-9ed157bce4de"
}
},
"outputVar" : "scriptResult5"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult5.commands}"
}
} ]
}
}
}
}