king
2020-12-10 84804b405cb88f659d055b16eb3bd00b813ccb4a
src/templates/subtableconfig/index.jsx
@@ -19,7 +19,6 @@
import ColumnComponent from '@/templates/sharecomponent/columncomponent'
import MenuForm from './menuform'
import EditComponent from '@/templates/zshare/editcomponent'
import SourceElement from '@/templates/zshare/dragsource'
import Source from './source'
import './index.scss'
@@ -27,6 +26,7 @@
const { Panel } = Collapse
const { confirm } = Modal
const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent'))
const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent'))
@@ -930,17 +930,7 @@
        config: res.config
      })
    } else if (res.type === 'paste') {
      let config = fromJS(this.state.config).toJS()
      if (res.content.copyType === 'search') {
        config.search.push(res.content)
      } else if (res.content.copyType === 'action') {
        config.action.push(res.content)
      } else if (res.content.copyType === 'columns' && res.content.columns && res.content.columns.length > 0) {
        config.columns = config.columns.filter(col => !col.origin)
        config.columns = [...config.columns, ...res.content.columns]
      }
      this.setState({config})
      this.setState({config: res.config})
    }
  }
@@ -1101,8 +1091,8 @@
              </div>
            } bordered={false} extra={
              <div>
                <EditComponent dict={this.state.dict} type="subtable" config={this.state.config} thawButtons={this.state.thawButtons} refresh={this.updateConfig}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <EditComponent dict={this.state.dict} options={['search', 'action', 'columns']} config={config} MenuID={config.uuid} thawButtons={this.state.thawButtons} refresh={this.updateConfig}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
              </div>