From 42fae277ae5ebe794fc070bf38482a919eb661fc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 25 十一月 2020 14:36:02 +0800
Subject: [PATCH] 2020-11-25

---
 src/menu/components/table/normal-table/index.jsx |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx
index b30ea71..4f408e0 100644
--- a/src/menu/components/table/normal-table/index.jsx
+++ b/src/menu/components/table/normal-table/index.jsx
@@ -4,18 +4,20 @@
 import { is, fromJS } from 'immutable'
 import { Icon, Popover, Modal } from 'antd'
 
-import asyncComponent from '@/utils/asyncComponent'
+// import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
 
 import MKEmitter from '@/utils/events.js'
 import Utils from '@/utils/utils.js'
 import zhCN from '@/locales/zh-CN/model.js'
 import enUS from '@/locales/en-US/model.js'
+
+import SearchComponent from '@/templates/sharecomponent/searchcomponent'
 import './index.scss'
 
 const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
 // const WrapComponent = asyncIconComponent(() => import('../data-card/wrapsetting'))
-const SearchComponent = asyncComponent(() => import('@/menu/searchcomponent'))
+// const SearchComponent = asyncComponent(() => import('@/menu/searchcomponent'))
 
 const { confirm } = Modal
 
@@ -241,11 +243,24 @@
     MKEmitter.emit('addSearch', card.uuid, newcard)
   }
 
+  /**
+   * @description 鏇存柊鎼滅储鏉′欢閰嶇疆淇℃伅
+   */
+  updatesearch = (config) => {
+    this.setState({
+      card: config
+    })
+  }
+
   render() {
     const { card } = this.state
 
     return (
-      <div className="menu-table-card-edit-box" style={{...card.style, height: card.wrap.height}}>
+      <div className="menu-normal-table-edit-box" style={{...card.style, height: card.wrap.height}}>
+        <SearchComponent
+          config={card}
+          updatesearch={this.updatesearch}
+        />
         <div className="table-header" style={card.headerStyle}>
           <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
             <div className="mk-popover-control">
@@ -254,13 +269,13 @@
           } trigger="hover">
             <span className="table-title">{card.wrap.title || ''}</span>
           </Popover>
-          <SearchComponent config={card} updatesearch={this.updateComponent}/>
+          {/* <SearchComponent config={card} updatesearch={this.updateComponent}/> */}
         </div>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
             <Icon className="plus" title="娣诲姞鍗$墖" onClick={this.addCard} type="plus" />
             <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" />
-            {/* {menu ? <WrapComponent config={card} sysRoles={menu.sysRoles} MenuType={menu.MenuType} updateConfig={this.updateComponent} /> : null} */}
+            {/* {menu ? <WrapComponent config={card} MenuType={menu.MenuType} updateConfig={this.updateComponent} /> : null} */}
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <Icon className="close" title="鍒犻櫎缁勪欢" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
             {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}

--
Gitblit v1.8.0