Commit 81c90c4e authored by 涂伟's avatar 涂伟

fix: '二维码编辑默认样式显示优化'

parent fccda187
......@@ -165,7 +165,7 @@ const QRCodeDesign = (props, ref) => {
render: (r, t, i) => i + 1
},
{
title: '设备���称',
title: '设备称',
dataIndex: 'DeviceName',
key: 'DeviceName',
align: 'center',
......@@ -189,7 +189,7 @@ const QRCodeDesign = (props, ref) => {
key: 'Title',
align: 'center',
render: (_, row) => {
const Component = row.Template === 'default' ? QRCodeView : QRCodeViewSuzhou;
const Component = row.Template === 'default' || !row.Template ? QRCodeView : QRCodeViewSuzhou;
return (
<div
className={styles.qrCodeCell}
......@@ -208,7 +208,7 @@ const QRCodeDesign = (props, ref) => {
DeviceName: row.DeviceName,
DeviceCode: row.DeviceCode,
AccountName: row.AccountName,
Template: row.Template
Template: row.Template || 'default'
}}
isBatch={false}
style={{ width: '610px', height: '980px', zoom: 0.075, margin: '0 auto' }}
......@@ -450,7 +450,7 @@ const QRCodeDesign = (props, ref) => {
labelLogoUrl: values.LabelLogoUrl,
isSystemLogo: values.IsSystemLogo === '系统LOGO' ? 1 : 0,
isPandaLogo: values.IsPandaLogo ? 1 : 0,
Template: values.Template
Template: values.Template || 'default'
}
const { code, data } = await EditOrAddDeviceQRCodeConfig(params)
if (code === 0) {
......@@ -597,7 +597,7 @@ const QRCodeDesign = (props, ref) => {
</div>
<div className={styles.right}>
<div className={styles.box}>
{values.Template === 'default' ? (
{values.Template === 'default' || !values.Template ? (
<QRCodeView values={values} active={active} isBatch={isBatch} />
) : (
<QRCodeViewSuzhou values={values} active={active} isBatch={isBatch} />
......@@ -614,7 +614,7 @@ const QRCodeDesign = (props, ref) => {
bodyStyle={{ width: '100%', height: '980px', padding: '0' }}
>
{currentRow.Template === 'default' ? <QRCodeView
{currentRow.Template === 'default' || !currentRow.Template ? <QRCodeView
id={currentRow.DeviceCode}
values={{
CorporateName: currentRow.CorporateName || '熊猫水务',
......@@ -645,7 +645,7 @@ const QRCodeDesign = (props, ref) => {
<div id={'QRCodeBoxs'} style={{ position: 'fixed', left: '-1200px', top: '-1200px', background: '#fff' }}>
{
dataSource.map(row => {
const Component = row.Template === 'default' ? QRCodeView : QRCodeViewSuzhou;
const Component = row.Template === 'default' || !row.Template ? QRCodeView : QRCodeViewSuzhou;
return (
<Component
id={row.DeviceCode}
......
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