king
2020-05-19 89949fc82a0194f985cb542abb7118724804bd5b
src/templates/subtableconfig/index.jsx
@@ -67,7 +67,8 @@
    thawButtons: [],         // 已选择要解冻的按钮
    activeKey: '0',          // 默认展开基本信息
    chartview: null,         // 当前视图
    pasteContent: null       // 粘贴内容
    pasteContent: null,      // 粘贴内容
    openEdition: ''          // 编辑版本标记,防止多人操作
  }
  /**
@@ -140,6 +141,7 @@
    }
    this.setState({
      openEdition: editSubTab ? (editSubTab.open_edition || '') : (editTab.open_edition || ''),
      chartview: _config.charts[0].uuid,
      originActions: _oriActions,
      optionLibs: optionLibs,
@@ -265,7 +267,7 @@
   * @description 标签页保存
   */
  submitConfig = () => {
    const { delActions, thawButtons, originConfig } = this.state
    const { delActions, thawButtons, originConfig, openEdition } = this.state
    let config = JSON.parse(JSON.stringify(this.state.config))
    let copyreg = /\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/ig
@@ -465,6 +467,10 @@
          LongParam: _LongParam
        }
        if (openEdition) {
          param.open_edition = openEdition
        }
        // 有按钮或标签删除时,先进行删除操作
        // 删除成功后,保存页面配置
        new Promise(resolve => {
@@ -569,6 +575,7 @@
          Api.getSystemConfig(param).then(response => {
            if (response.status) {
              this.setState({
                openEdition: response.open_edition || '',
                config: _config,
                originConfig: _config
              }, () => {
@@ -848,6 +855,12 @@
                param.subConfig = _LongParam
              }
              if (param.editAction) {
                param.editAction.open_edition = res.open_edition || ''
              } else if (param.editSubTab) {
                param.editSubTab.open_edition = res.open_edition || ''
              }
              this.props.handleView(param)
            } else {
              this.setState({
@@ -1085,6 +1098,7 @@
              <SettingComponent
                type="subtable"
                config={config}
                mainsearch={!this.props.editSubTab && this.props.editTab.mainsearch ? this.props.editTab.mainsearch : ''}
                MenuID={config.uuid}
                menuformRef={this.menuformRef}
                permFuncField={this.props.permFuncField}