Files
XplorePlane/ExternalLibraries/Templates/StandardReportTemplate.json
T
XplorePlane Developer 957157ae80 fix: 修复编译错误、BGA向导预览、算子重复插入及状态栏消息
## Compilation fixes
- Fix XAML namespace reference XplorePlane.Converters → XplorePlane.Helpers (EventLogView, StateDisplayView)
- Add missing using for ISampleTypeRepository / JsonSampleTypeRepository in App.xaml.cs
- Fix ILoggerService.Warn() calls using Exception as first arg instead of message string
- Serialize CncProgram to JSON when passing to MatrixLayout (expects string, not CncProgram object)
- Suppress CS8632 nullable annotation warnings project-wide

## BGA wizard fixes
- Fix preview not showing on step 3: force RefreshBgaPreview() when entering final step
- Add step validation in CanNext() to prevent skipping to preview with invalid inputs
- Notify NextCommand.CanExecuteChanged when inputs change
- Fix RunProgress runtime binding error: set Mode=OneWay for ProgressBar.Value

## Operator toolbox: prevent duplicate insertion
- Add static OperatorTarget property for direct dispatch to active pipeline
- PipelineEditorView registers as toolbox target on load (floating window only)
- CNC page sets initial target; PipelineEditorWindow resets to CNC pipeline on close
- '+' button inserts only to the active pipeline instead of broadcasting to all subscribers

## Pipeline editor status bar messages
- Add StatusBarMessageEvent / StatusBarMessagePayload to CommonEvents.cs
- PipelineEditorViewModel publishes status on all ops (add/remove/reorder/save/execute)
- MainViewModel subscribes and displays on main window bottom status bar
- Auto-clear after timeout (3s info, 5s error)

## docs
- Merge three architecture docs into consolidated XplorePlane-架构与结构说明.md
2026-07-24 15:59:16 +08:00

223 lines
13 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"document": {
"pageSize": "A4",
"orientation": "Portrait",
"margins": { "top": 40, "bottom": 20, "left": 20, "right": 20 },
"header": {
"enabled": true,
"left": [
"${loc:Report_Title}",
"${loc:Report_Id}${metadata.reportId} | ${loc:Report_Date}${formatDate(metadata.inspectionDate)} | ${loc:Report_Sample}${metadata.sampleName}"
],
"rightImageKey": "companyLogo",
"fontSize": 7,
"color": "#666666",
"showLine": true
},
"footer": {
"enabled": true,
"left": ["${CompanyName}"],
"right": ["{currentPage} / {totalPages}"],
"fontSize": 8,
"color": "#666666",
"showLine": true
}
},
"pages": [
{
"type": "homepage",
"elements": [
{
"type": "row", "size": [170, 40], "positioning": "flow",
"children": [
{
"type": "column", "align": "left",
"children": [
{ "type": "image", "dataKey": "companyLogo", "size": [50, 30], "align": "left" },
{ "type": "text", "content": "${CompanyName}", "style": "companyName", "align": "left" }
]
},
{
"type": "column", "align": "right",
"children": [
{ "type": "image", "dataKey": "softwareLogo", "size": [15, 20], "align": "right" },
{ "type": "text", "content": "${SoftwareName}", "style": "companyName", "align": "right" }
]
}
]
},
{ "type": "spacer", "size": [170, 15], "positioning": "flow" },
{ "type": "text", "content": "${loc:Report_Title}", "style": "title", "positioning": "flow" },
{ "type": "spacer", "size": [170, 10], "positioning": "flow" },
{ "type": "text", "content": "${loc:Report_Id}${metadata.reportId}", "style": "homepageInfo", "positioning": "flow" },
{ "type": "text", "content": "${loc:Report_Sample}${metadata.sampleName}", "style": "homepageInfo", "positioning": "flow" },
{ "type": "text", "content": "${loc:Report_Description}${metadata.description}", "style": "homepageInfo", "positioning": "flow" },
{ "type": "image", "dataKey": "workpieceImage", "size": [160, 110], "border": true, "align": "center", "style": "imageDefault", "positioning": "flow" },
{ "type": "text", "content": "${loc:Report_Operator}${metadata.operatorName}", "style": "homepageFooter", "positioning": "flow" },
{ "type": "text", "content": "${loc:Report_Date}${formatDate(metadata.inspectionDate)}", "style": "homepageFooter", "positioning": "flow" }
]
},
{
"type": "summary",
"elements": [
{ "type": "text", "content": "${loc:Report_Summary}", "style": "homepageHeading", "positioning": "flow" },
{
"type": "table", "dataKey": "summaryTable", "positioning": "flow", "size": [170, 0], "style": "tableDefault",
"columns": [
{ "header": "${loc:Field_InspectionType}", "field": "inspectionType", "width": 50, "align": "left" },
{ "header": "${loc:Field_Result}", "field": "classification", "width": 30, "align": "center", "colorRules": { "Pass": "#008000", "Fail": "#FF0000" } },
{ "header": "${loc:Field_Status}", "field": "status", "width": 30, "align": "center", "colorRules": { "合格": "#008000", "PASS": "#008000", "不合格": "#FF0000", "FAIL": "#FF0000" } }
]
}
]
},
{
"type": "metricData",
"elements": [
{ "type": "text", "content": "${loc:Page_MetricData}", "style": "heading", "positioning": "flow" },
{
"type": "row", "size": [170, 100], "widths": [6, 4], "positioning": "flow",
"children": [
{
"type": "column", "align": "left",
"children": [
{ "type": "image", "dataKey": "lineMeasurementImage", "size": [110, 90], "border": true, "align": "left" }
]
},
{
"type": "column", "align": "left",
"children": [
{ "type": "text", "content": "${loc:Measurement_Type}${measurementType}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Field_Point1}${point1}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Field_Point2}${point2}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Measurement_Distance}${actualDistance} ${unit}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Measurement_Angle}${angle}°", "style": "body", "align": "left" }
]
}
]
}
]
},
{
"type": "bgaInspection",
"elements": [
{ "type": "text", "content": "${loc:Page_BgaInspection}", "style": "heading", "positioning": "flow" },
{
"type": "row", "size": [170, 100], "widths": [6, 4], "positioning": "flow",
"children": [
{
"type": "column", "align": "left",
"children": [
{ "type": "image", "dataKey": "bgaInspectionImage", "size": [110, 90], "border": true, "align": "left" }
]
},
{
"type": "column", "align": "left",
"children": [
{ "type": "text", "content": "${loc:Bga_Count}${bgaCount}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Measurement_VoidRate}${formatPercent(voidRate)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Measurement_FillRate}${formatPercent(fillRate)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Bga_TotalArea}${formatNumber(totalBgaArea, 2)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Bga_TotalVoidArea}${formatNumber(totalVoidArea, 2)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Bga_VoidLimit}${formatPercent(voidLimit)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Table_Classification}${classification}", "style": "conclusion", "align": "left", "colorRules": { "Pass": "#008000", "Fail": "#FF0000" } }
]
}
]
},
{
"type": "table", "dataKey": "bgaBallsTable", "positioning": "flow", "size": [170, 0], "style": "tableDefault",
"columns": [
{ "header": "${loc:Bga_BallIndex}", "field": "index", "width": 25, "align": "center" },
{ "header": "${loc:Table_VoidRate}", "field": "voidRate", "width": 40, "align": "center" },
{ "header": "${loc:Table_Area}", "field": "area", "width": 40, "align": "center" },
{ "header": "${loc:Table_Classification}", "field": "classification", "width": 35, "align": "center", "colorRules": { "Pass": "#008000", "Fail": "#FF0000" } }
]
}
]
},
{
"type": "voidInspection",
"elements": [
{ "type": "text", "content": "${loc:Page_VoidInspection}", "style": "heading", "positioning": "flow" },
{
"type": "row", "size": [170, 100], "widths": [6, 4], "positioning": "flow",
"children": [
{
"type": "column", "align": "left",
"children": [
{ "type": "image", "dataKey": "voidInspectionImage", "size": [110, 90], "border": true, "align": "left" }
]
},
{
"type": "column", "align": "left",
"children": [
{ "type": "text", "content": "${loc:Void_RoiArea}${formatNumber(roiArea, 2)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Void_TotalArea}${formatNumber(totalVoidArea, 2)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Measurement_VoidRate}${formatPercent(voidRate)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Void_Limit}${formatPercent(voidLimit)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Void_Count}${voidCount}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Void_MaxArea}${formatNumber(maxVoidArea, 2)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Table_Classification}${classification}", "style": "conclusion", "align": "left", "colorRules": { "Pass": "#008000", "Fail": "#FF0000" } }
]
}
]
},
{
"type": "table", "dataKey": "voidsTable", "positioning": "flow", "size": [170, 0], "style": "tableDefault",
"columns": [
{ "header": "${loc:Table_Index}", "field": "index", "width": 20, "align": "center" },
{ "header": "${loc:Table_Area}", "field": "area", "width": 35, "align": "center" },
{ "header": "${loc:Table_AreaPercent}", "field": "areaPercent", "width": 35, "align": "center" },
{ "header": "${loc:Table_CenterX}", "field": "centerX", "width": 30, "align": "center" },
{ "header": "${loc:Table_CenterY}", "field": "centerY", "width": 30, "align": "center" }
]
}
]
},
{
"type": "viaFillInspection",
"elements": [
{ "type": "text", "content": "${loc:Page_ViaFillInspection}", "style": "heading", "positioning": "flow" },
{
"type": "row", "size": [170, 100], "widths": [6, 4], "positioning": "flow",
"children": [
{
"type": "column", "align": "left",
"children": [
{ "type": "image", "dataKey": "viaFillImage", "size": [110, 90], "border": true, "align": "left" }
]
},
{
"type": "column", "align": "left",
"children": [
{ "type": "text", "content": "${loc:Fill_Rate}${formatPercent(fillRate)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Measurement_VoidRate}${formatPercent(voidRate)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Fill_FullDistance}${formatNumber(fullDistance, 2)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Fill_FillDistance}${formatNumber(fillDistance, 2)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Fill_THTLimit}${formatPercent(thtLimit)}", "style": "body", "align": "left" },
{ "type": "text", "content": "${loc:Table_Classification}${classification}", "style": "conclusion", "align": "left", "colorRules": { "Pass": "#008000", "Fail": "#FF0000" } }
]
}
]
}
]
}
],
"styles": {
"title": { "font": "auto", "size": 28, "bold": true, "italic": false, "color": "#1a1a1a", "align": "center" },
"companyName": { "font": "auto", "size": 10, "bold": false, "italic": false, "color": "#333333", "align": "center" },
"homepageInfo": { "font": "auto", "size": 12, "bold": false, "italic": false, "color": "#333333", "align": "left", "paddingLeft": 10 },
"homepageFooter": { "font": "auto", "size": 12, "bold": false, "italic": false, "color": "#333333", "align": "center" },
"homepageHeading": { "font": "auto", "size": 14, "bold": true, "italic": false, "color": "#333333", "align": "left" },
"heading": { "font": "auto", "size": 16, "bold": true, "italic": false, "color": "#333333", "align": "left", "marginBottom": 3 },
"body": { "font": "auto", "size": 11, "bold": false, "italic": false, "color": "#333333", "align": "left" },
"bodyBold": { "font": "auto", "size": 11, "bold": true, "italic": false, "color": "#1a1a1a", "align": "left" },
"conclusion": { "font": "auto", "size": 12, "bold": true, "italic": false, "color": "#333333", "align": "left", "marginTop": 3 },
"imageDefault": { "font": "auto", "size": 12, "bold": false, "italic": false, "color": "#333333", "align": "center", "marginTop": 5, "marginBottom": 5 },
"tableHeader": { "font": "auto", "size": 10, "bold": true, "italic": false, "color": "#ffffff", "align": "center", "backgroundColor": "#4472C4" },
"tableDefault": { "font": "auto", "size": 10, "bold": false, "italic": false, "color": "#333333", "align": "center", "marginTop": 5 },
"tableCell": { "font": "auto", "size": 10, "bold": false, "italic": false, "color": "#333333", "align": "center" }
}
}