Files
eip4-platform/转换产物-attach/schema/629463ae-81e7-4c03-9c6f-943cb0b175e1.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

483 lines
14 KiB
JSON

{
"type" : "page",
"title" : "用户管理",
"body" : {
"type" : "crud",
"api" : "/api/flow/SYS_USER_SEARCH",
"syncLocation" : false,
"selectable" : true,
"checkOnItemClick" : true,
"filter" : {
"title" : "查询",
"body" : [ {
"name" : "ACCOUNT",
"label" : "帐号",
"type" : "input-text"
}, {
"name" : "NAME",
"label" : "姓名",
"type" : "input-text"
}, {
"name" : "EMAIL",
"label" : "邮箱",
"type" : "input-text"
}, {
"name" : "MOBILE",
"label" : "手机",
"type" : "input-text"
}, {
"name" : "USERORGID",
"label" : "所属组织",
"type" : "tree-select",
"clearable" : true,
"source" : "/api/template/1ef49ca8-c023-4044-b389-f44d4ad7b577/tree",
"searchable" : true
}, {
"name" : "STATE",
"label" : "状态",
"type" : "select",
"clearable" : true,
"source" : "/api/poc/dict/USERSTATE",
"value" : "1"
}, {
"name" : "MASTERDEPART",
"label" : "主部门",
"type" : "tree-select",
"clearable" : true,
"source" : "/api/template/138b7ca7-befb-4a0c-bfc6-ed8fb4d4e434/tree",
"searchable" : true,
"onlyLeaf" : true
}, {
"name" : "MASTERPOSITION",
"label" : "主岗位",
"type" : "tree-select",
"clearable" : true,
"source" : "/api/template/feeee51d-d41b-410b-b7a4-67d61ec8c4df/tree",
"searchable" : true,
"onlyLeaf" : true
} ]
},
"columns" : [ {
"name" : "ACCOUNT",
"label" : "帐号",
"width" : 50
}, {
"name" : "PASSWORD",
"label" : "密码",
"width" : 200,
"toggled" : false
}, {
"name" : "NAME",
"label" : "姓名",
"width" : 80
}, {
"name" : "MOBILE",
"label" : "手机",
"width" : 80
}, {
"name" : "EMAIL",
"label" : "邮箱",
"width" : 150,
"toggled" : false
}, {
"name" : "USERORGID_DISPLAY__",
"label" : "所属组织",
"width" : 150
}, {
"name" : "STATE",
"label" : "状态",
"width" : 80,
"type" : "mapping",
"map" : {
"1" : "正常",
"2" : "禁止登录",
"3" : "禁用",
"4" : "删除"
}
}, {
"name" : "MASTERDEPARTDISPLAY",
"label" : "主部门",
"width" : 200
}, {
"name" : "MASTERPOSITIONDISPLAY",
"label" : "主岗位",
"width" : 100
}, {
"name" : "SYS_USER_ID",
"label" : "主键",
"width" : 200,
"toggled" : false
} ],
"headerToolbar" : [ {
"type" : "button",
"id" : "添加",
"label" : "添加",
"level" : "primary",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "添加",
"size" : "lg",
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/71de2065-3892-46dc-ae43-62f32e1e1778?format=amis",
"api" : {
"method" : "get",
"url" : "/api/form/SYS_USER/defaults?templateId=71de2065-3892-46dc-ae43-62f32e1e1778"
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/SYS_USER_ADD?__egtpl=71de2065-3892-46dc-ae43-62f32e1e1778",
"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/de3a815b-d8f3-4422-942c-c12c1ffe6061?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/SYS_USER_LOAD?__egtpl=de3a815b-d8f3-4422-942c-c12c1ffe6061",
"data" : {
"SYS_USER_ID" : "${SYS_USER_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/SYS_USER_UPDATE?__egtpl=de3a815b-d8f3-4422-942c-c12c1ffe6061",
"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/SYS_USER_DELETE",
"data" : {
"ids" : "${selectedItems|pick:SYS_USER_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/de3a815b-d8f3-4422-942c-c12c1ffe6061?format=amis",
"static" : true,
"api" : {
"method" : "post",
"url" : "/api/flow/SYS_USER_LOAD?__egtpl=de3a815b-d8f3-4422-942c-c12c1ffe6061",
"data" : {
"SYS_USER_ID" : "${SYS_USER_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/655d948b-4c84-4a17-a6cc-3d9166ffd537?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/SYS_USERLEADER_SEARCHONE?__egtpl=655d948b-4c84-4a17-a6cc-3d9166ffd537",
"data" : {
"SYS_USER_ID" : "${SYS_USER_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/SYS_USERLEADER_ADDORUPDATE?__egtpl=655d948b-4c84-4a17-a6cc-3d9166ffd537",
"close" : true
}, {
"type" : "button",
"label" : "取消",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "重置密码",
"label" : "重置密码",
"actionType" : "ajax",
"disabled" : true,
"confirmText" : "确认要重置密码吗?",
"api" : {
"method" : "post",
"url" : "/api/flow/SYS_USER_PASSWORD_RESET",
"data" : {
"SYS_USER_ID" : "${selectedItems[0].SYS_USER_ID}"
}
}
}, {
"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/2db910f2-a246-43b1-8e10-a02de1c2d359?format=amis",
"api" : {
"method" : "post",
"url" : "/api/flow/SYS_USER_LOAD?__egtpl=2db910f2-a246-43b1-8e10-a02de1c2d359",
"data" : {
"SYS_USER_ID" : "${SYS_USER_ID}"
},
"responseData" : {
"&" : "${result}"
}
}
},
"actions" : [ {
"type" : "button",
"label" : "保存",
"level" : "primary",
"actionType" : "submit",
"api" : "POST:/api/flow/SYS_USER_UPDATE_SETDEPART?__egtpl=2db910f2-a246-43b1-8e10-a02de1c2d359",
"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" : {
"SYS_USER_ID" : "${selectedItems[0].SYS_USER_ID}"
},
"body" : {
"type" : "service",
"schemaApi" : "get:/api/page/schema/8ba2f6a2-5fa3-43a7-b4e8-351b4bfcae02?format=amis"
},
"actions" : [ {
"type" : "button",
"label" : "关闭",
"actionType" : "close"
} ]
}
}, {
"type" : "button",
"id" : "设置主岗位",
"label" : "设置主岗位",
"icon" : "fa fa-user-tag",
"disabledOn" : "${!selectedItems || selectedItems.length !== 1}",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "设置主岗位",
"size" : "md",
"data" : {
"USERID" : "${selectedItems[0].SYS_USER_ID}"
},
"body" : {
"type" : "form",
"initApi" : {
"method" : "post",
"url" : "/api/flow/SYS_POSITIONUSER_SEARCH",
"data" : {
"USERID" : "${USERID}"
},
"responseData" : {
"MASTERPOSITION" : "${ARRAYFILTER(items, item => item.ISMASTER == true || item.ISMASTER == 1)[0].SYS_POSITIONUSER_ID}"
}
},
"body" : [ {
"type" : "radios",
"name" : "MASTERPOSITION",
"label" : "主岗位",
"source" : {
"method" : "post",
"url" : "/api/flow/SYS_POSITIONUSER_SEARCH",
"data" : {
"USERID" : "${USERID}"
},
"responseData" : {
"options" : "${items}"
}
},
"labelField" : "POSITIONID_DISPLAY__",
"valueField" : "SYS_POSITIONUSER_ID"
} ],
"api" : {
"method" : "post",
"url" : "/api/flow/SYS_POSITIONUSER_UPDATEMASTER",
"data" : {
"USERID" : "${USERID}",
"MASTERPOSITION" : "${MASTERPOSITION}"
}
}
}
}
}, {
"type" : "button",
"id" : "查看用户菜单",
"label" : "查看用户菜单",
"icon" : "fa fa-sitemap",
"disabledOn" : "${!selectedItems || selectedItems.length !== 1}",
"actionType" : "dialog",
"dialog" : {
"type" : "dialog",
"title" : "查看用户菜单",
"size" : "md",
"data" : {
"USERID" : "${selectedItems[0].SYS_USER_ID}"
},
"body" : {
"type" : "input-tree",
"name" : "__userMenu",
"label" : "",
"source" : {
"method" : "get",
"url" : "/api/admin/user/${USERID}/menu",
"responseData" : {
"options" : "${roots}"
}
},
"labelField" : "name",
"valueField" : "id",
"showOutline" : true,
"initiallyOpen" : true,
"searchable" : true,
"heightAuto" : true
},
"actions" : [ {
"type" : "button",
"actionType" : "close",
"label" : "关闭"
} ]
}
}, "pagination" ],
"primaryField" : "SYS_USER_ID",
"onEvent" : {
"selectedChange" : {
"actions" : [ {
"actionType" : "disabled",
"componentId" : "重置密码"
}, {
"actionType" : "ajax",
"api" : {
"method" : "post",
"url" : "/api/script/execute-template",
"data" : {
"seq" : 1,
"item" : "${event.data.selectedItems[0]}",
"templateId" : "629463ae-81e7-4c03-9c6f-943cb0b175e1"
}
},
"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" : "629463ae-81e7-4c03-9c6f-943cb0b175e1"
}
},
"outputVar" : "scriptResult2"
}, {
"actionType" : "replayScriptCommands",
"args" : {
"commands" : "${event.data.scriptResult2.commands}"
}
} ]
}
}
}
}