From 7d206112a4ca1930639907a7cb131d0c1e6525a6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 24 十一月 2019 12:23:08 +0800
Subject: [PATCH] 2019-11-24-01

---
 src/templates/comtableconfig/index.jsx |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index c6c3636..e9c705f 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -64,11 +64,14 @@
    * 2銆佽缃搷浣滅被鍨嬨�佸師濮嬭彍鍗曚俊鎭紙姣忔淇濆瓨鍚庨噸缃級銆佸凡浣跨敤琛ㄥ強鍩烘湰淇℃伅琛ㄥ崟
    */
   UNSAFE_componentWillMount () {
-    const { menu } = this.props
+    const { menu, type } = this.props
 
     let _LongParam = menu.LongParam
     let _config = ''
-    if (this.props.type === 'add' || !_LongParam) {
+    let _type = type
+
+    if (_type === 'add' || !_LongParam) {
+      _type = 'add'
       _config = JSON.parse(JSON.stringify((Source.baseConfig)))
     } else {
       let _setting = Source.baseConfig.setting
@@ -81,7 +84,7 @@
 
     this.setState({
       config: _config,
-      operaType: this.props.type,
+      operaType: _type,
       originMenu: JSON.parse(JSON.stringify({...menu})),
       selectedTables: _config.tables || [],
       menuformlist: [
@@ -292,8 +295,8 @@
             value: 'datemonth',
             text: this.state.dict['header.form.datemonth']
           }, {
-            value: 'dateyear',
-            text: this.state.dict['header.form.dateyear']
+            value: 'daterange',
+            text: this.state.dict['header.form.daterange']
           }]
         },
         {
@@ -693,7 +696,7 @@
             return item
           }
         })
-        _config[res.type] = _config[res.type].filter(item => !item.origin)
+        // _config[res.type] = _config[res.type].filter(item => !item.origin)
       }
 
       this.setState({
@@ -1017,9 +1020,11 @@
               item.match = textmatch[cell.datatype]
             } else if (cell.type === 'select') {
               item.match = selectmatch[cell.datatype]
-            } else if (cell.type === 'date') {
+            } else if (cell.type === 'daterange') {
               item.match = datematch[cell.datatype]
             }
+            
+            item.type = cell.type
             item.initval = ''
             items.push(item)
           }
@@ -1040,7 +1045,7 @@
             _match = textmatch[item.datatype]
           } else if (item.type === 'select') {
             _match = selectmatch[item.datatype]
-          } else if (item.type === 'date') {
+          } else if (item.type === 'daterange') {
             _match = datematch[item.datatype]
           }
 

--
Gitblit v1.8.0