From f36141f3075edf9d41928d64f759ad6bd1b1ac60 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 七月 2020 17:43:34 +0800
Subject: [PATCH] 2020-07-14

---
 src/mob/datasource/index.jsx |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/mob/datasource/index.jsx b/src/mob/datasource/index.jsx
index 3b1cfd1..f40dd17 100644
--- a/src/mob/datasource/index.jsx
+++ b/src/mob/datasource/index.jsx
@@ -18,6 +18,7 @@
   state = {
     dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     sourcelist: [],
+    searches: [],
     visible: false,
     source: null
   }
@@ -31,15 +32,21 @@
   }
 
   editDataSource = (item) => {
+    // const { config } = this.props
+
     if (!item) {
       item = {
-        uuid: Utils.getuuid()
+        uuid: Utils.getuuid(),
+        setting: {},
+        columns: [],
+        scripts: []
       }
     }
 
     this.setState({
       visible: true,
-      source: item
+      source: item,
+      searches: []
     })
   }
 
@@ -48,7 +55,7 @@
   }
 
   render () {
-    const { sourcelist, visible, source, dict } = this.state
+    const { sourcelist, visible, source, dict, searches } = this.state
 
     return (
       <div className="mob-datasource">
@@ -78,13 +85,16 @@
           maskClosable={false}
           style={{minWidth: '900px', maxWidth: '1200px'}}
           okText={dict['mob.submit']}
+          cancelText={dict['mob.cancel']}
           onOk={this.verifySubmit}
           onCancel={() => { this.setState({ visible: false }) }}
           destroyOnClose
         >
           <VerifyCard
-            card={source}
             dict={dict}
+            card={source}
+            menuId={this.props.config.uuid}
+            searches={searches}
             wrappedComponentRef={(inst) => this.verifyRef = inst}
           />
         </Modal>

--
Gitblit v1.8.0