king
2020-11-25 42fae277ae5ebe794fc070bf38482a919eb661fc
src/templates/sharecomponent/columncomponent/index.jsx
@@ -20,8 +20,6 @@
  static propTpyes = {
    menu: PropTypes.object,          // 三级菜单信息
    config: PropTypes.object,        // 配置信息
    pasteContent: PropTypes.object,  // 粘贴配置信息
    sysRoles: PropTypes.array,       // 角色列表,权限分配
    updatecolumn: PropTypes.func     // 更新
  }
@@ -50,18 +48,7 @@
    const { config } = this.props
    const { columnlist } = this.state
    if (
      nextProps.pasteContent &&
      nextProps.pasteContent.columns &&
      nextProps.pasteContent.copyType === 'columns' &&
      nextProps.pasteContent.columns.length > 0
    ) {
      if (columnlist.filter(col => !col.origin).length === 0) {
        this.setState({columnlist: nextProps.pasteContent.columns}, () => {
          this.props.updatecolumn({...config, columns: nextProps.pasteContent.columns})
        })
      }
    } else if (!is(fromJS(nextProps.config.columns), fromJS(config.columns)) && !is(fromJS(nextProps.config.columns), fromJS(columnlist))) {
    if (!is(fromJS(nextProps.config.columns), fromJS(config.columns)) && !is(fromJS(nextProps.config.columns), fromJS(columnlist))) {
      this.setState({columnlist: fromJS(nextProps.config.columns).toJS()})
    }
  }
@@ -117,7 +104,7 @@
      this.setState({
        modaltype: 'columns',
        card: card,
        formlist: getColumnForm(card, this.props.sysRoles, menulist)
        formlist: getColumnForm(card, menulist)
      })
    } else {
      this.setState({