From 95ccc1acc6d8ede1c839493e7aecc9c97fd34c8c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 24 九月 2021 15:55:39 +0800
Subject: [PATCH] 2021-09-24

---
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index b5fadc0..72cc3a2 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -49,7 +49,8 @@
         min: 5,
         max: 200,
         editable: true,
-        width: '20%'
+        width: '20%',
+        render: (text) => text || 20
       },
       {
         title: '绫诲瀷',
@@ -425,6 +426,27 @@
     })
   }
 
+  changeColumns = (columns) => {
+    const { verify } = this.state
+
+    if (columns[0] && (columns[0].type !== 'image' && columns[0].type !== 'text')) {
+      columns = columns.map(col => {
+        let _cell = {
+          uuid: Utils.getuuid(),
+          Column: col.Column,
+          Text: col.Text,
+          Width: 20,
+          abs: 'false',
+          type: 'text',
+        }
+
+        return _cell
+      })
+    }
+
+    this.setState({verify: {...verify, columns}})
+  }
+
   render() {
     const { card } = this.props
     const { verify, excelColumns, defaultscript } = this.state
@@ -457,7 +479,7 @@
               娓呯┖Excel鍒�
             </Button>
             <div style={{color: '#959595', fontSize: '13px', paddingLeft: '10px'}}>濡傞渶瀵煎嚭搴忓彿锛岃浣跨敤瀛楁 $Index銆�</div>
-            <EditTable actions={['edit', 'move', 'copy', 'del']} type="exceloutcolumn" data={verify.columns} columns={excelColumns} onChange={(columns) => this.setState({verify: {...verify, columns}})}/>
+            <EditTable actions={['edit', 'move', 'copy', 'del']} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/>
           </TabPane>
           {card.intertype === 'system' ? <TabPane tab={
             <span>

--
Gitblit v1.8.0