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>
339 lines
9.1 KiB
JSON
339 lines
9.1 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "实名制项目扬尘监控管理",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/GB_SENNOR_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "NAME",
|
|
"label" : "设备名称",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "DEVCODE",
|
|
"label" : "设备编码",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "ISONLINE",
|
|
"label" : "是否在线",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/YESNO"
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "GB_SENNOR_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "NAME",
|
|
"label" : "设备名称",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "DEVCODE",
|
|
"label" : "设备编码",
|
|
"width" : 100
|
|
}, {
|
|
"name" : "ISONLINE",
|
|
"label" : "是否在线",
|
|
"width" : 50,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"0" : "否",
|
|
"1" : "是",
|
|
"false" : "否",
|
|
"true" : "是"
|
|
}
|
|
}, {
|
|
"name" : "LASTTIME",
|
|
"label" : "最后更新时间",
|
|
"width" : 120
|
|
}, {
|
|
"name" : "DATA1",
|
|
"label" : "PM2.5(ug/m3)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DATA2",
|
|
"label" : "PM10(ug/m3)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DATA3",
|
|
"label" : "噪声(dB)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DATA4",
|
|
"label" : "温度(℃)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DATA5",
|
|
"label" : "湿度(%RH)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DATA6",
|
|
"label" : "风向",
|
|
"width" : 80,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "正北",
|
|
"2" : "东北偏北",
|
|
"3" : "东北",
|
|
"4" : "东北偏东",
|
|
"5" : "正东",
|
|
"6" : "东南偏东",
|
|
"7" : "东南",
|
|
"8" : "东南偏南",
|
|
"9" : "正南",
|
|
"10" : "西南偏南",
|
|
"11" : "西南",
|
|
"12" : "西南偏西",
|
|
"13" : "正西",
|
|
"14" : "西北偏西",
|
|
"15" : "西北",
|
|
"16" : "西北偏北"
|
|
}
|
|
}, {
|
|
"name" : "DATA7",
|
|
"label" : "风速(m/s)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DATA10",
|
|
"label" : "风级(级)",
|
|
"width" : 200
|
|
}, {
|
|
"name" : "DATA8",
|
|
"label" : "扬尘(TSP)(ug/m3)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DATA9",
|
|
"label" : "气压(Kpa)",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "GB_PROJECTINFOID_DISPLAY__",
|
|
"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/0cb8bd0f-63cb-467c-8f3b-5fc062713ff9?format=amis",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/form/GB_SENNOR/defaults?templateId=0cb8bd0f-63cb-467c-8f3b-5fc062713ff9"
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/GB_SENNOR_ADD?__egtpl=0cb8bd0f-63cb-467c-8f3b-5fc062713ff9",
|
|
"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/0cb8bd0f-63cb-467c-8f3b-5fc062713ff9?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/GB_SENNOR_LOAD?__egtpl=0cb8bd0f-63cb-467c-8f3b-5fc062713ff9",
|
|
"data" : {
|
|
"GB_SENNOR_ID" : "${GB_SENNOR_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/GB_SENNOR_UPDATE?__egtpl=0cb8bd0f-63cb-467c-8f3b-5fc062713ff9",
|
|
"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_SENNOR_DELETE",
|
|
"data" : {
|
|
"ids" : "${selectedItems|pick:GB_SENNOR_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/0cb8bd0f-63cb-467c-8f3b-5fc062713ff9?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/GB_SENNOR_LOAD?__egtpl=0cb8bd0f-63cb-467c-8f3b-5fc062713ff9",
|
|
"data" : {
|
|
"GB_SENNOR_ID" : "${GB_SENNOR_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/26c17ded-75ec-4fd1-a6b0-9f99968960c6?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/GB_SENNOR_LOAD?__egtpl=26c17ded-75ec-4fd1-a6b0-9f99968960c6",
|
|
"data" : {
|
|
"GB_SENNOR_ID" : "${GB_SENNOR_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "设置",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/GB_SENNOR_SETHEART?__egtpl=26c17ded-75ec-4fd1-a6b0-9f99968960c6",
|
|
"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_SENNOR_ID" : "${selectedItems[0].GB_SENNOR_ID}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/e981569f-d2e8-49d5-810c-3f5eb6515c34?format=amis"
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "关闭",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "设置路径",
|
|
"label" : "设置路径",
|
|
"actionType" : "ajax",
|
|
"confirmText" : "确认要改变路径吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/GB_SENNOR_SETURL",
|
|
"data" : {
|
|
"GB_SENNOR_ID" : "${selectedItems[0].GB_SENNOR_ID}"
|
|
}
|
|
},
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}"
|
|
}, "pagination" ],
|
|
"primaryField" : "GB_SENNOR_ID",
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${&}",
|
|
"templateId" : "6bd7e62e-cfc2-44fd-86b7-278dcbb454ee"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |