king
2022-01-15 2f71678db0378c7c841e721dfebaea6d159e13b2
src/components/normalform/modalform/mkTable/index.jsx
@@ -297,6 +297,29 @@
            })
          })
        })
      } else if (col.inputType === 'cascader') {
        let keys = record[col.dataIndex]
        let _options = []
        let rematch = (options, level) => {
          options.some(m => {
            if (!m.value || m.value !== keys[level]) return false
            _options.push(m)
            if (m.children && keys[level + 1]) {
              rematch(m.children, level + 1)
            }
            return true
          })
        }
        rematch(col.options, 0)
        if (_options.length) {
          col.extends.forEach(n => {
            record[n.value] = _options.map(o => o[n.key]).join(' / ')
          })
        }
      } else {
        let key = record[col.dataIndex]
        let option = col.options.filter(m => m.value === key)[0]