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>
378 lines
11 KiB
JSON
378 lines
11 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "数据导入配置管理",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/SYS_DATAIMPORTCONFIG_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "NAME",
|
|
"label" : "功能名称",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "ENTITYID",
|
|
"label" : "实体",
|
|
"type" : "picker",
|
|
"clearable" : true,
|
|
"source" : "/api/template/treegrid?treeRef=e6b69e2d-a8ab-49e9-8d79-e2bc4f2f45fd&gridTable=SYS_ENTITY&rcol=ENTITYTYPE&node=${ENTITYTYPE}&NAME=${NAME}&page=${page}&perPage=${perPage}",
|
|
"labelField" : "_label",
|
|
"valueField" : "_id",
|
|
"modalMode" : "dialog",
|
|
"modalSize" : "lg",
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"filter" : {
|
|
"title" : "",
|
|
"body" : [ {
|
|
"type" : "tree-select",
|
|
"name" : "ENTITYTYPE",
|
|
"label" : "分类",
|
|
"source" : "/api/template/e6b69e2d-a8ab-49e9-8d79-e2bc4f2f45fd/tree",
|
|
"searchable" : true,
|
|
"clearable" : true
|
|
}, {
|
|
"type" : "input-text",
|
|
"name" : "NAME",
|
|
"label" : "名称",
|
|
"clearable" : true
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "NAME",
|
|
"label" : "名称",
|
|
"width" : 300
|
|
}, {
|
|
"name" : "TABLENAME",
|
|
"label" : "数据库表名",
|
|
"width" : 300
|
|
}, {
|
|
"name" : "ISVIEW",
|
|
"label" : "视图",
|
|
"width" : 40,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
}
|
|
}, {
|
|
"name" : "ENTITYTYPE_DISPLAY__",
|
|
"label" : "实体模块分类",
|
|
"width" : 180
|
|
}, {
|
|
"name" : "TABLETYPE",
|
|
"label" : "表类型",
|
|
"width" : 60,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "主表",
|
|
"1" : "子表",
|
|
"2" : "中间表"
|
|
}
|
|
}, {
|
|
"name" : "ACCESSLEVEL",
|
|
"label" : "访问级别",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "系统",
|
|
"2" : "固有业务",
|
|
"3" : "自定义业务"
|
|
},
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "DESCRIPTION",
|
|
"label" : "描述",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "ISCHANGELOG",
|
|
"label" : "记录日志",
|
|
"width" : 50,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
},
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "ISDELETEABLE",
|
|
"label" : "是否可删除",
|
|
"width" : 50,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
},
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "ISVIEWDISPLAY",
|
|
"label" : "是否视图显示名称",
|
|
"width" : 80,
|
|
"toggled" : false
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
}
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "SYS_DATAIMPORTCONFIG_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "NAME",
|
|
"label" : "功能名称",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "ENTITYID",
|
|
"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/88a555fd-dbb5-424e-884d-5a918d3e3a63?format=amis",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/form/SYS_DATAIMPORTCONFIG/defaults?templateId=88a555fd-dbb5-424e-884d-5a918d3e3a63"
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/SYS_DATAIMPORTCONFIG_ADD?__egtpl=88a555fd-dbb5-424e-884d-5a918d3e3a63",
|
|
"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/88a555fd-dbb5-424e-884d-5a918d3e3a63?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/SYS_DATAIMPORTCONFIG_LOAD?__egtpl=88a555fd-dbb5-424e-884d-5a918d3e3a63",
|
|
"data" : {
|
|
"SYS_DATAIMPORTCONFIG_ID" : "${SYS_DATAIMPORTCONFIG_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/SYS_DATAIMPORTCONFIG_UPDATE?__egtpl=88a555fd-dbb5-424e-884d-5a918d3e3a63",
|
|
"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_DATAIMPORTCONFIG_DELETE",
|
|
"data" : {
|
|
"ids" : "${selectedItems|pick:SYS_DATAIMPORTCONFIG_ID|join:','}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "编辑转换脚本",
|
|
"label" : "编辑转换脚本",
|
|
"icon" : "fa fa-code",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length !== 1}",
|
|
"actionType" : "dialog",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "编辑转换脚本",
|
|
"size" : "xl",
|
|
"body" : {
|
|
"type" : "form",
|
|
"id" : "field-editor-sys_dataimportconfig-convertscript",
|
|
"wrapWithPanel" : false,
|
|
"initApi" : {
|
|
"method" : "post",
|
|
"url" : "/api/field-editor/load",
|
|
"data" : {
|
|
"tableName" : "SYS_DATAIMPORTCONFIG",
|
|
"idField" : "SYS_DATAIMPORTCONFIG_ID",
|
|
"id" : "${selectedItems[0].SYS_DATAIMPORTCONFIG_ID}",
|
|
"fieldName" : "CONVERTSCRIPT"
|
|
}
|
|
},
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/field-editor/save",
|
|
"data" : {
|
|
"tableName" : "SYS_DATAIMPORTCONFIG",
|
|
"idField" : "SYS_DATAIMPORTCONFIG_ID",
|
|
"id" : "${selectedItems[0].SYS_DATAIMPORTCONFIG_ID}",
|
|
"fieldName" : "CONVERTSCRIPT",
|
|
"value" : "${value}"
|
|
}
|
|
},
|
|
"body" : [ {
|
|
"type" : "editor",
|
|
"name" : "value",
|
|
"label" : "编辑转换脚本",
|
|
"language" : "java",
|
|
"value" : "",
|
|
"size" : "lg",
|
|
"options" : {
|
|
"minimap" : {
|
|
"enabled" : false
|
|
},
|
|
"wordWrap" : "on",
|
|
"fontSize" : 14
|
|
}
|
|
} ]
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "编辑保存脚本",
|
|
"label" : "编辑保存脚本",
|
|
"icon" : "fa fa-code",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length !== 1}",
|
|
"actionType" : "dialog",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "编辑保存脚本",
|
|
"size" : "xl",
|
|
"body" : {
|
|
"type" : "form",
|
|
"id" : "field-editor-sys_dataimportconfig-savescript",
|
|
"wrapWithPanel" : false,
|
|
"initApi" : {
|
|
"method" : "post",
|
|
"url" : "/api/field-editor/load",
|
|
"data" : {
|
|
"tableName" : "SYS_DATAIMPORTCONFIG",
|
|
"idField" : "SYS_DATAIMPORTCONFIG_ID",
|
|
"id" : "${selectedItems[0].SYS_DATAIMPORTCONFIG_ID}",
|
|
"fieldName" : "SAVESCRIPT"
|
|
}
|
|
},
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/field-editor/save",
|
|
"data" : {
|
|
"tableName" : "SYS_DATAIMPORTCONFIG",
|
|
"idField" : "SYS_DATAIMPORTCONFIG_ID",
|
|
"id" : "${selectedItems[0].SYS_DATAIMPORTCONFIG_ID}",
|
|
"fieldName" : "SAVESCRIPT",
|
|
"value" : "${value}"
|
|
}
|
|
},
|
|
"body" : [ {
|
|
"type" : "editor",
|
|
"name" : "value",
|
|
"label" : "编辑保存脚本",
|
|
"language" : "java",
|
|
"value" : "",
|
|
"size" : "lg",
|
|
"options" : {
|
|
"minimap" : {
|
|
"enabled" : false
|
|
},
|
|
"wordWrap" : "on",
|
|
"fontSize" : 14
|
|
}
|
|
} ]
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "下载模板",
|
|
"label" : "下载模板",
|
|
"icon" : "fa fa-download",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length !== 1}",
|
|
"actionType" : "download",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/dataimport/template?configId=${selectedItems[0].SYS_DATAIMPORTCONFIG_ID}"
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "下载基础数据",
|
|
"label" : "下载基础数据",
|
|
"icon" : "fa fa-download",
|
|
"actionType" : "download",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/dataimport/basedata"
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "SYS_DATAIMPORTCONFIG_ID"
|
|
}
|
|
} |