From 5e1d2b4c3ef2e9788602c2df05a0c6a6086f14ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=B9=B3=E5=B9=B3?= <1127623770@qq.com> Date: Thu, 25 Jul 2024 14:41:42 +0800 Subject: [PATCH] =?UTF-8?q?poterk-rfid=E6=89=93=E5=8D=B0=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E4=BF=AE=E6=94=B9=E5=8F=8A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/pageBuilder/elements/tools/rfid/posteCmd.ts | 3 +-- .../widgets/searchPage/TableContentWithGridData.tsx | 2 +- src/executor/open/form/detail/print.tsx | 8 ++++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/executor/design/pageBuilder/elements/tools/rfid/posteCmd.ts b/src/executor/design/pageBuilder/elements/tools/rfid/posteCmd.ts index cb3e9dbbe..22c909fb6 100644 --- a/src/executor/design/pageBuilder/elements/tools/rfid/posteCmd.ts +++ b/src/executor/design/pageBuilder/elements/tools/rfid/posteCmd.ts @@ -40,8 +40,7 @@ const getDetailCmd = ( ',' + data1 + `${data1 ? ':' : ''}` + - ' ' + - data2 + `${data2 ? data2.toString().trim() : data2}` ); }; const getContentCmd = (contentArr: IContent[], config: IConfig) => { diff --git a/src/executor/design/pageBuilder/elements/widgets/searchPage/TableContentWithGridData.tsx b/src/executor/design/pageBuilder/elements/widgets/searchPage/TableContentWithGridData.tsx index 3f282ce63..530e39eef 100644 --- a/src/executor/design/pageBuilder/elements/widgets/searchPage/TableContentWithGridData.tsx +++ b/src/executor/design/pageBuilder/elements/widgets/searchPage/TableContentWithGridData.tsx @@ -116,7 +116,7 @@ const View: React.FC = ({ ctx, ...props }) => { qrcodeConfig.forEach((conf: any) => { finDataAry.push({ title: conf.label, - text: fieldMapping(conf, item[conf.value]), + text: fieldMapping(conf, item['T' + conf.value]), id: conf.value, }); finDataObj.set(item[config['qrcodeSource']], finDataAry); diff --git a/src/executor/open/form/detail/print.tsx b/src/executor/open/form/detail/print.tsx index cd9a0de51..aa7fea514 100644 --- a/src/executor/open/form/detail/print.tsx +++ b/src/executor/open/form/detail/print.tsx @@ -62,8 +62,12 @@ const ThingPrint: React.FC = ({ card.forEach((templates) => { let dataStr = ''; templates.forEach((item) => { + const contain = item.field.includes('('); const wordField = item.field.replace(/\(/g, ''); - const fieldWidth = wordField.length * 12 > 26 ? wordField.length * 12 : 26; + const wordFieldLength = contain + ? wordField.length * 10.2 + : wordField.length * 11.6; + const fieldWidth = wordFieldLength > 26 ? wordFieldLength : 26; dataStr += `