king
2019-12-08 8c14d194348465710826ed5740173e64bd803f71
src/templates/modalconfig/transferform/index.jsx
@@ -5,7 +5,7 @@
class TransferForm extends Component {
  static propTypes = {
    columns: PropTypes.array,
    fields: PropTypes.array,
    selected: PropTypes.array,
    dict: PropTypes.object, // 字典项
  }
@@ -26,8 +26,8 @@
  
  UNSAFE_componentWillMount() {
    let datas = new Map()
    this.props.columns.forEach(item => {
      if (item.field) {
    this.props.fields.forEach(item => {
      if (!item.origin) {
        datas.set(item.uuid, item)
      }
    })
@@ -37,7 +37,6 @@
    this.props.selected.forEach(item => {
      if (datas.has(item)) {
        selecteds.push(item)
        // datas.delete(item)
      }
    })
@@ -54,11 +53,12 @@
  }
  render() {
    const { targetKeys, selectedKeys } = this.state
    const { data, targetKeys, selectedKeys } = this.state
    return (
      <div className="common-table-columns-transfer">
      <div className="modal-fields-transfer">
        <Transfer
          dataSource={this.state.data}
          dataSource={data}
          titles={[this.props.dict['header.form.column.source'], this.props.dict['header.form.column.target']]}
          targetKeys={targetKeys}
          locale={{itemUnit: this.props.dict['header.form.column.itemUnit'], itemsUnit: this.props.dict['header.form.column.itemsUnit']}}