king
2021-12-30 7cdc8fa2ed47233c32ed9e1e969999684a3a5e04
src/tabviews/zshare/mutilform/mkCheckCard/index.jsx
@@ -36,7 +36,7 @@
  componentDidMount () {
    const { config } = this.state
    if (config.multiple !== 'true' && config.linkField) {
    if (config.linkField) {
      MKEmitter.addListener('mkFP', this.mkFormHandle)
    }
  }
@@ -69,33 +69,42 @@
    const { config } = this.state
    let options = config.oriOptions.filter(option => option.ParentID === parentId)
    let _option = options[0] && !options[0].$disabled ? options[0] : null
    let val = _option ? _option.$value : ''
    this.setState({
      options,
      value: val
    })
    let other = {}
    if (config.subFields && _option) {
      config.subFields.forEach((n, i) => {
        other[n.field] = _option[n.field]
        setTimeout(() => {
          MKEmitter.emit('mkFC', 'input', n.uuid, _option[n.field])
        }, i * 5)
    if (config.multiple === 'true') {
      this.setState({
        options,
        selectKeys: []
      })
    }
      this.props.onChange('')
    } else {
      let _option = options[0] && !options[0].$disabled ? options[0] : null
      let val = _option ? _option.$value : ''
    this.props.onChange(val, other)
    if (level < 7 && config.linkFields) {
      config.linkFields.forEach((m, i) => {
        setTimeout(() => {
          MKEmitter.emit('mkFP', m.uuid, val, level + 1)
        }, (i + 1) * 70)
      this.setState({
        options,
        selectKeys: val
      })
      let other = {}
      if (config.subFields && _option) {
        config.subFields.forEach((n, i) => {
          other[n.field] = _option[n.field]
          setTimeout(() => {
            MKEmitter.emit('mkFC', 'input', n.uuid, _option[n.field])
          }, i * 5)
        })
      }
      this.props.onChange(val, other)
      if (level < 7 && config.linkFields) {
        config.linkFields.forEach((m, i) => {
          setTimeout(() => {
            MKEmitter.emit('mkFP', m.uuid, val, level + 1)
          }, (i + 1) * 70)
        })
      }
    }
  }