king
2021-03-05 e36eb1999794bd71e76482b92a0b0b20f49d0032
src/templates/calendarconfig/index.jsx
@@ -16,7 +16,6 @@
import SearchComponent from '@/templates/sharecomponent/searchcomponent'
import MenuForm from '@/templates/comtableconfig/menuform'
import EditComponent from '@/templates/zshare/editcomponent'
import SourceElement from '@/templates/zshare/dragsource'
import Source from './source'
import './index.scss'
@@ -24,6 +23,7 @@
const { Panel } = Collapse
const { confirm } = Modal
const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent'))
const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcalcomponent'))
const TabComponent = asyncComponent(() => import('./tabcomponent'))
const CalComponent = asyncComponent(() => import('./calcomponent'))
@@ -39,10 +39,9 @@
  }
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,        // 字典
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,        // 字典
    config: null,            // 页面配置
    visible: false,          // 搜索条件、按钮、显示列,模态框显示控制
    tableFields: [],         // 已选表字段集
    fields: null,            // 搜索条件及显示列,可选字段
    formlist: null,          // 搜索条件、按钮、显示列表单字段
    menuloading: false,      // 菜单保存中
@@ -688,12 +687,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)
      }
      this.setState({config})
      this.setState({config: res.config})
    }
  }
@@ -713,18 +707,6 @@
  updateconfig = (config) => {
    this.setState({
      config: config
    })
  }
  /**
   * @description 更新常用表信息,快捷添加后更新配置信息
   */
  updatetable = (config, fields) => {
    const { tableFields } = this.state
    this.setState({
      config: config,
      tableFields: fields ? fields : tableFields
    })
  }
@@ -758,7 +740,7 @@
                <TableComponent
                  config={config}
                  containerId="subtable-basedata"
                  updatetable={this.updatetable}
                  updatetable={this.updateconfig}
                />
              </Panel>
              {/* 搜索条件添加 */}
@@ -771,7 +753,6 @@
                <FieldsComponent
                  config={config}
                  type="search"
                  tableFields={this.state.tableFields}
                  updatefield={this.updateconfig}
                />
              </Panel>
@@ -785,7 +766,7 @@
              </div>
            } bordered={false} extra={
              <div>
                <EditComponent dict={this.state.dict} type="calendar" config={this.state.config} refresh={this.updateConfig}/>
                <EditComponent dict={this.state.dict} options={['search']} config={this.state.config} refresh={this.updateConfig}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.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>
@@ -794,7 +775,6 @@
              <SettingComponent
                config={config}
                MenuID={menu.MenuID}
                tableFields={this.state.tableFields}
                updateConfig={this.updateconfig}
              />
              <SearchComponent