From 2c8620522b03f751342c25ec0fce5a496eb6cdbf Mon Sep 17 00:00:00 2001 From: geht <2947093423@qq.com> Date: Wed, 13 May 2026 12:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E6=9D=A1=E7=A0=81=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E5=92=8C=E8=87=AA=E7=94=B1=E8=A1=A8=E6=A0=BC=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E7=9A=84=E6=B8=B2=E6=9F=93=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=9B=B4=E5=A4=9A=E6=9D=A1=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=92=8C=E6=96=87=E6=9C=AC=E8=BE=B9=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E3=80=82=E6=96=B0=E5=A2=9E=E6=9D=A1=E7=A0=81=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E5=B7=A5=E5=85=B7=EF=BC=8C=E4=BC=98=E5=8C=96=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E9=A2=84=E8=A7=88=E7=AA=97=E5=8F=A3=E7=9A=84=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E6=9C=BA=E9=80=89=E6=8B=A9=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C=E5=92=8C?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BF=E7=9A=84=E7=81=B5=E6=B4=BB?= =?UTF-8?q?=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/native/NativePrintDesigner.vue | 7 + .../native/components/PropertiesPanel.vue | 303 +++++++++++++++++- .../components/elements/BarcodeElement.vue | 68 ++-- .../components/elements/FreeTableElement.vue | 201 ++++++++++-- .../components/elements/TextElement.vue | 44 ++- .../template/native/core/barcodeRenderer.ts | 146 +++++++++ .../template/native/core/printRenderer.ts | 88 ++++- .../views/print/template/native/core/types.ts | 4 + .../Service/Print/NativePrintRenderService.cs | 253 ++++++++++++++- .../Service/Print/PrintDotService.cs | 23 +- .../YY.Admin.Services.csproj | 2 + .../Print/PrintTemplateListViewModel.cs | 78 ++++- .../Views/Print/PrintPreviewWindow.xaml | 24 +- .../Views/Print/PrintPreviewWindow.xaml.cs | 268 +++++++++++++++- .../Views/Print/PrintTemplateListView.xaml | 62 +++- 15 files changed, 1446 insertions(+), 125 deletions(-) create mode 100644 jeecgboot-vue3/src/views/print/template/native/core/barcodeRenderer.ts diff --git a/jeecgboot-vue3/src/views/print/template/native/NativePrintDesigner.vue b/jeecgboot-vue3/src/views/print/template/native/NativePrintDesigner.vue index 6783f55..53fab09 100644 --- a/jeecgboot-vue3/src/views/print/template/native/NativePrintDesigner.vue +++ b/jeecgboot-vue3/src/views/print/template/native/NativePrintDesigner.vue @@ -1059,6 +1059,13 @@ } if (type === 'qrcode' || type === 'barcode') { base.value = payload.value || ''; + if (type === 'barcode') { + // 默认 Code128(自动),与 jsbarcode 默认一致;displayValue 默认显示底部文字 + base.format = payload.format || 'CODE128'; + base.displayValue = payload.displayValue !== false; + // 条码下文字对齐:center / left / right / justify(两端对齐),默认居中 + base.textAlign = payload.textAlign || 'center'; + } return base as NativeElement; } if (type === 'reportHeader' || type === 'reportFooter') { diff --git a/jeecgboot-vue3/src/views/print/template/native/components/PropertiesPanel.vue b/jeecgboot-vue3/src/views/print/template/native/components/PropertiesPanel.vue index 0ad3585..c14f03c 100644 --- a/jeecgboot-vue3/src/views/print/template/native/components/PropertiesPanel.vue +++ b/jeecgboot-vue3/src/views/print/template/native/components/PropertiesPanel.vue @@ -86,6 +86,47 @@