Commit 2789b7be authored by 田翔's avatar 田翔

fix: 解决未知打印二维码异常问题

parent ada095e6
Pipeline #92394 failed with stages
...@@ -121,7 +121,6 @@ const QRCodeDesign = (props, ref) => { ...@@ -121,7 +121,6 @@ const QRCodeDesign = (props, ref) => {
}} }}
> >
<QRCodeView <QRCodeView
id={row.DeviceCode}
values={{ values={{
CorporateName: row.CorporateName || '熊猫水务', CorporateName: row.CorporateName || '熊猫水务',
Title: row.Title || '设备二维码', Title: row.Title || '设备二维码',
...@@ -229,7 +228,8 @@ const QRCodeDesign = (props, ref) => { ...@@ -229,7 +228,8 @@ const QRCodeDesign = (props, ref) => {
allowTaint: false, allowTaint: false,
useCORS: true, useCORS: true,
width: 610, width: 610,
scale: 6, height: 980,
scale: 1,
}) })
let a = document.createElement('a'); let a = document.createElement('a');
a.setAttribute('href', can.toDataURL()); //toDataUrl:将canvas画布信息转化为base64格式图片 a.setAttribute('href', can.toDataURL()); //toDataUrl:将canvas画布信息转化为base64格式图片
...@@ -510,6 +510,29 @@ const QRCodeDesign = (props, ref) => { ...@@ -510,6 +510,29 @@ const QRCodeDesign = (props, ref) => {
isBatch={false} isBatch={false}
/> />
</Modal> </Modal>
<div id={'QRCodeBoxs'} style={{ position: 'fixed', left: '-1200px', top: '-1200px', background: '#fff' }}>
{
dataSource.map(row => {
return (
<QRCodeView
id={row.DeviceCode}
values={{
CorporateName: row.CorporateName || '熊猫水务',
Title: row.Title || '设备二维码',
IsSystemLogo: Boolean(row.IsSystemLogo) ? '系统LOGO' : '自定义LOGO',
IsPandaLogo: Boolean(row.IsPandaLogo),
LabelLogoUrl: row.LabelLogoUrl,
DeviceName: row.DeviceName,
DeviceCode: row.DeviceCode,
AccountName: row.AccountName,
}}
isBatch={false}
style={{ width: '610px', height: '980px', margin: '0 auto' }}
/>
)
})
}
</div>
</Modal> </Modal>
) )
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment