|
|
@ -127,7 +127,7 @@ const handleExport = async () => { |
|
|
|
for (const car of carList) { |
|
|
|
try { |
|
|
|
// 生成二维码(使用车辆ID作为内容,与现有功能保持一致) |
|
|
|
const qrCodeDataUrl = await QRCode.toDataURL(String(car.id), { |
|
|
|
const qrCodeDataUrl = await QRCode.toDataURL(String(car.code), { |
|
|
|
width: 200, |
|
|
|
margin: 2, |
|
|
|
color: { |
|
|
@ -211,6 +211,7 @@ const createWordDocument = async (qrCodeImages: { dataUrl: string; carInfo: HjmC |
|
|
|
children: [ |
|
|
|
new Paragraph({ |
|
|
|
children: [ |
|
|
|
// @ts-ignore |
|
|
|
new ImageRun({ |
|
|
|
data: bytes, |
|
|
|
transformation: { |
|
|
@ -230,11 +231,8 @@ const createWordDocument = async (qrCodeImages: { dataUrl: string; carInfo: HjmC |
|
|
|
new TableCell({ |
|
|
|
children: [ |
|
|
|
new Paragraph({ |
|
|
|
text: `车辆编号: ${item.carInfo.code || '未设置'}`, |
|
|
|
alignment: AlignmentType.CENTER |
|
|
|
}), |
|
|
|
new Paragraph({ |
|
|
|
text: `ID: ${item.carInfo.id}`, |
|
|
|
// text: `车辆编号: ${item.carInfo.code || '未设置'}`, |
|
|
|
text: `${item.carInfo.code || '未设置'}`, |
|
|
|
alignment: AlignmentType.CENTER |
|
|
|
}) |
|
|
|
], |
|
|
|