From 316877c1d9e5b6d92334f30b03d97d7e833cd934 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 二月 2021 16:01:57 +0800
Subject: [PATCH] 2021-02-02

---
 src/views/billprint/index.jsx |   46 ++++++++++++++++++++++++++++++++--------------
 1 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx
index 56f813f..97a31d7 100644
--- a/src/views/billprint/index.jsx
+++ b/src/views/billprint/index.jsx
@@ -21,6 +21,8 @@
 const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card'))
 const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card'))
 const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table'))
+const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor'))
+const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box'))
 
 class BillPrint extends Component {
   state = {
@@ -119,26 +121,26 @@
           A4: {
             vertical: 980,
             horizontal: 1200,
-            verticaldefault: 1.45789,
-            verticalwithout: 1.41428,
-            horizontaldefault: 0.683,
-            horizontalwithout: 0.705,
+            verticaldefault: 1.455,
+            verticalwithout: 1.411,
+            horizontaldefault: 0.679,
+            horizontalwithout: 0.701,
           },
           A3: {
             vertical: 1200,
             horizontal: 1600,
-            verticaldefault: 1.44404,
-            verticalwithout: 1.41414,
-            horizontaldefault: 0.6923,
-            horizontalwithout: 0.707,
+            verticaldefault: 1.441,
+            verticalwithout: 1.410,
+            horizontaldefault: 0.688,
+            horizontalwithout: 0.703,
           },
           A5: {
             vertical: 700,
             horizontal: 1000,
-            verticaldefault: 1.482,
-            verticalwithout: 1.417,
-            horizontaldefault: 0.6736,
-            horizontalwithout: 0.7047,
+            verticaldefault: 1.478,
+            verticalwithout: 1.413,
+            horizontaldefault: 0.669,
+            horizontalwithout: 0.700,
           }
         }
 
@@ -153,9 +155,13 @@
           if (component.action) component.action = []
           if (component.search) component.search = []
           component.data = [] // 鍒濆鍖栨暟鎹负绌�
+
+          if (['propcard', 'brafteditor', 'sandbox'].includes(component.subtype) && component.wrap.datatype === 'static') {
+            component.format = ''
+          }
     
           if (!component.setting) return component // 涓嶄娇鐢ㄧ郴缁熷嚱鏁版椂
-          if (!component.format || (component.subtype === 'propcard' && component.wrap.datatype === 'static')) return component // 娌℃湁鍔ㄦ�佹暟鎹�  鏁版嵁鏍煎紡 array 鎴� object
+          if (!component.format) return component  // 娌℃湁鍔ㄦ�佹暟鎹�  鏁版嵁鏍煎紡 array 鎴� object
           if (component.setting.interType !== 'system') { // 涓嶄娇鐢ㄧ郴缁熷嚱鏁版椂
             component.setting.sync = 'false'
             return component
@@ -350,7 +356,7 @@
       let _results = results.filter(Boolean)
 
       let comps = components.map(item => {
-        if (item.subtype === 'propcard' && item.wrap.datatype === 'static') return item
+        if (!item.format) return item
 
         _results.forEach(res => {
           if (res.componentId === item.uuid && res.data) {
@@ -566,6 +572,18 @@
             <NormalTable config={item} initdata={item.data} mainSearch={[]} menuType="" />
           </Col>
         )
+      } else if (item.type === 'editor') {
+        return (
+          <Col span={item.width} key={item.uuid}>
+            <BraftEditor config={item} initdata={item.data} mainSearch={[]} menuType="" />
+          </Col>
+        )
+      } else if (item.type === 'code') {
+        return (
+          <Col span={item.width} key={item.uuid}>
+            <SandBox config={item} initdata={item.data} mainSearch={[]} menuType="" />
+          </Col>
+        )
       } else {
         return null
       }

--
Gitblit v1.8.0