From d5ce81026882ada34e5d49411be7c90ee96cc102 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 17 一月 2023 18:20:11 +0800
Subject: [PATCH] 2023-01-17

---
 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
index 555ed77..5973e2d 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -239,8 +239,10 @@
 
   UNSAFE_componentWillMount() {
     const { card } = this.props
-    let _verify = fromJS(card.verify || {range: 1}).toJS()
+    let _verify = fromJS(card.verify || {}).toJS()
     let _columns = _verify.columns || []
+
+    delete _verify.dataresource
 
     // 鏃ф暟鎹吋瀹�
     _columns = _columns.map(col => {
@@ -248,6 +250,12 @@
       col.type = col.type || 'Nvarchar(50)'
       col.import = col.import || 'true'
       col.required = col.required || 'true'
+
+      if (col.type === 'text' || col.type === 'image') {
+        col.type = 'Nvarchar(50)'
+      } else if (col.type === 'number') {
+        col.type = 'Decimal(18,2)'
+      }
       
       if (/^Nvarchar/ig.test(col.type)) {
         col.limit = col.type.match(/\d+/)[0]
@@ -260,6 +268,10 @@
       return col
     })
 
+    if (!_verify.hasOwnProperty('range')) {
+      _verify.range = 1
+    }
+
     this.setState({
       verify: {
         ..._verify,

--
Gitblit v1.8.0