king
2020-04-29 4edbf8871d037354662c6683add27808c471948b
src/templates/subtableconfig/index.jsx
@@ -22,7 +22,7 @@
import SettingForm from './settingform'
import MenuForm from '@/templates/zshare/menuform'
import EditComponent from '@/templates/zshare/editcomponent'
import SourceElement from '@/templates/zshare/dragelement/source'
import SourceElement from '@/templates/zshare/dragsource'
import CreateFunc from '@/templates/zshare/createfunc'
import CreateInterface from '@/templates/zshare/createinterface'
import ChartComponent from '@/templates/zshare/chartcomponent'
@@ -54,21 +54,16 @@
    fields: null,            // 搜索条件及显示列,可选字段
    menuformlist: null,      // 基本信息表单字段
    formlist: null,          // 搜索条件、按钮、显示列表单字段
    formtemp: '',            // 表单类型,显示列、按钮、搜索条件
    card: null,              // 编辑元素
    menuloading: false,      // 菜单保存中
    menucloseloading: false, // 菜单关闭时,选择保存
    loading: false,          // 加载中,页面spin
    settingVisible: false,   // 全局配置模态框
    closeVisible: false,     // 关闭模态框
    tables: [],              // 可用表名
    selectedTables: [],      // 已选表名
    originConfig: null,      // 原配置
    originActions: null,     // 原始按钮信息,使用已有用户模板
    delActions: [],          // 删除按钮列表
    copyActions: [],         // 复制按钮组
    tabviews: [],            // 所有标签页
    profileVisible: false,   // 验证信息模态框
    optionLibs: null,        // 自定义下拉选项库
    thawButtons: [],         // 已选择要解冻的按钮
    activeKey: '0',          // 默认展开基本信息
@@ -132,7 +127,7 @@
    let _activeKey =  editSubTab ? editSubTab.activeKey : editTab.activeKey
    // 兼容
    // 兼容图表
    if (!_config.charts) {
      _config.expand = false
      _config.charts = [{
@@ -153,7 +148,6 @@
      config: _config,
      activeKey: _activeKey || '0',
      originConfig: _config,
      selectedTables: _config.tables || [],
      menuformlist: [
        {
          type: 'text',
@@ -347,7 +341,7 @@
      }
      let _LongParam = ''
      let _config = {...config, tables: this.state.selectedTables, ...res}
      let _config = {...config, ...res}
      // 未设置数据源或主键时,启用状态为false
      if (_config.setting.interType === 'inner' && !_config.setting.innerFunc && !_config.setting.dataresource) {
@@ -803,7 +797,7 @@
      })
    } else {
      this.menuformRef.handleConfirm().then(res => {
        let _config = {...config, tables: this.state.selectedTables, ...res}
        let _config = {...config, ...res}
        if (!is(fromJS(originConfig), fromJS(_config))) {
          this.setState({
@@ -930,7 +924,7 @@
      })
    } else {
      this.menuformRef.handleConfirm().then(res => {
        let _config = {...config, tables: this.state.selectedTables, ...res}
        let _config = {...config, ...res}
        if (!is(fromJS(originConfig), fromJS(_config))) {
          notification.warning({
@@ -1290,7 +1284,7 @@
              <Icon type="setting" onClick={this.changeSetting} />
              <SearchComponent
                menu={{MenuID: this.state.config.uuid, MenuName: this.state.config.tabName}}
                config={this.state.config}
                config={config}
                pasteContent={this.state.pasteContent}
                sysRoles={this.props.sysRoles}
                optionLibs={this.state.optionLibs}