king
2022-10-26 fb64bcf1fab18b33d21470c83f28d4cda8d309ce
src/views/tabledesign/index.jsx
@@ -37,6 +37,7 @@
const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
const ModalController = asyncComponent(() => import('@/menu/modalconfig/controller'))
const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
const PasteBaseTable = asyncComponent(() => import('@/menu/components/share/pastebasetable'))
sessionStorage.setItem('isEditState', 'true')
sessionStorage.setItem('appType', '')          // 应用类型
@@ -626,16 +627,22 @@
  insert = (item) => {
    let config = fromJS(this.state.config).toJS()
    config.components.push(item)
    let tabs = {
      uuid: Utils.getuuid(),
      type: 'tabs',
      subtype: 'tabletabs',
      width: 24,
      setting: {},
      style: {},
      subtabs: [
        { uuid: Utils.getuuid(), label: item.name || '子表1', icon: '', components: [item] },
      ]
    }
    config.components.push(tabs)
    this.setState({config})
    window.GLOB.customMenu = config
    notification.success({
      top: 92,
      message: '粘贴成功!',
      duration: 2
    })
  }
  changeSetting = () => {
@@ -701,6 +708,7 @@
                    <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
                    <TableNodes config={config} />
                    <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                    <PasteBaseTable type="page" insert={this.insert}/>
                    <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} />
                    <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>保存</Button>
                    <Button type="default" onClick={this.closeView}>关闭</Button>