king
2021-04-07 f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2
src/templates/sharecomponent/columncomponent/index.jsx
@@ -24,7 +24,7 @@
  }
  state = {
    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    columnlist: null,    // 显示列
    showField: false,    // 显示列字段
    modaltype: '',       // 模态框控制
@@ -73,6 +73,7 @@
   */
  handleColumn = (card) => {
    const { menu } = this.props
    const { columnlist } = this.state
    if (card.type !== 'colspan') {
      let menulist = []
@@ -100,10 +101,19 @@
        })
      }
      
      let fields = []
      columnlist.forEach(col => {
        if (!col.field) return
        fields.push({
          value: col.field,
          text: col.label
        })
      })
      this.setState({
        modaltype: 'columns',
        card: card,
        formlist: getColumnForm(card, menulist)
        formlist: getColumnForm(card, menulist, fields)
      })
    } else {
      this.setState({
@@ -176,7 +186,7 @@
        _columnlist = _columnlist.filter(item => !item.origin || item.uuid === res.uuid) // 去除初始列
        _columnlist = _columnlist.map(item => {
          if (item.uuid !== res.uuid && res.field && item.field) {
            if (item.field === res.field) {
            if (item.field.toLowerCase() === res.field.toLowerCase()) {
              fieldrepet = true
            }
          }
@@ -549,7 +559,6 @@
          visible={modaltype === 'mark'}
          width={'75vw'}
          maskClosable={false}
          style={{minWidth: '900px', maxWidth: '1200px'}}
          okText={dict['model.submit']}
          onOk={this.markSubmit}
          onCancel={() => { this.setState({ modaltype: '' }) }}