From 6d71b3fac75a35e8ebf08e71ba40c5be8a586024 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 08 九月 2021 18:10:17 +0800
Subject: [PATCH] 2021-09-08

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

diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx
index fe7b530..b97baf4 100644
--- a/src/menu/components/table/normal-table/index.jsx
+++ b/src/menu/components/table/normal-table/index.jsx
@@ -7,6 +7,7 @@
 import asyncIconComponent from '@/utils/asyncIconComponent'
 import { resetStyle } from '@/utils/utils-custom.js'
 import MKEmitter from '@/utils/events.js'
+import getWrapForm from './options'
 import Utils from '@/utils/utils.js'
 import zhCN from '@/locales/zh-CN/model.js'
 import enUS from '@/locales/en-US/model.js'
@@ -14,6 +15,7 @@
 import './index.scss'
 
 const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
+const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
 const SearchComponent = asyncComponent(() => import('@/templates/sharecomponent/searchcomponent'))
 const ActionComponent = asyncComponent(() => import('@/menu/components/share/actioncomponent'))
 const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
@@ -22,7 +24,6 @@
 const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
 const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
 const ColumnComponent = asyncComponent(() => import('./columns'))
-const WrapComponent = asyncIconComponent(() => import('./wrapsetting'))
 
 class TableCardEditComponent extends Component {
   static propTpyes = {
@@ -55,8 +56,7 @@
         width: card.width || 24,
         search: [
           { origin: true, uuid: Utils.getuuid(), label: 'label', type: 'text', match: 'like' },
-          { origin: true, uuid: Utils.getuuid(), label: 'label', type: 'select', match: 'equal' },
-          { origin: true, uuid: Utils.getuuid(), label: 'label', type: 'date', match: 'greater' }
+          { origin: true, uuid: Utils.getuuid(), label: 'label', type: 'select', match: 'equal' }
         ],
         action: [
           { origin: true, uuid: Utils.getuuid(), label: '娣诲姞', intertype: 'system', OpenType: 'pop', icon: 'plus', class: 'green', style: {color: 'rgb(255, 255, 255)', background: 'rgb(38, 194, 129)', marginRight: '15px'} },
@@ -375,6 +375,16 @@
     }
   }
 
+  getWrapForms = () => {
+    const { wrap, action } = this.state.card
+
+    return getWrapForm(wrap, action)
+  }
+
+  updateWrap = (res) => {
+    this.updateComponent({...this.state.card, wrap: res})
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()
@@ -394,7 +404,9 @@
             <Icon className="plus" title="娣诲姞鍒�" onClick={this.addColumns} type="plus" />
             {appType !== 'mob' ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null}
             <Icon className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} type="plus-square" />
-            <WrapComponent config={card} updateConfig={this.updateComponent} />
+            <NormalForm title="琛ㄦ牸璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
+              <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
+            </NormalForm>
             <CopyComponent type="normaltable" card={card}/>
             <PasteComponent config={card} options={['action', 'search', 'form', 'cols']} updateConfig={this.updateComponent} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />

--
Gitblit v1.8.0