king
2020-11-23 f8c3c53f9e29541f8c0e3fcbf682c301fd17e06a
src/templates/sharecomponent/columncomponent/columnform/index.jsx
@@ -1,10 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, InputNumber, Radio, Tooltip, Icon, Cascader, notification } from 'antd'
import { Form, Row, Col, Input, Select, InputNumber, Radio, Tooltip, Icon, Cascader } from 'antd'
import { formRule } from '@/utils/option.js'
import options from '@/store/options.js'
import Api from '@/api'
import './index.scss'
const columnTypeOptions = {
@@ -289,7 +287,6 @@
              })(
                <Cascader
                  options={this.state.menulist}
                  loadData={this.loadData}
                  placeholder=""
                  getPopupContainer={() => document.getElementById('columnwinter')}
                />
@@ -300,57 +297,6 @@
      }
    })
    return fields
  }
  loadData = selectedOptions => {
    const { MenuID } = this.props
    const targetOption = selectedOptions[selectedOptions.length - 1]
    targetOption.loading = true
    let _param = {
      func: 'sPC_Get_FunMenu',
      ParentID: targetOption.value,
      systemType: options.sysType,
      debug: 'Y'
    }
    Api.getSystemConfig(_param).then(result => {
      if (result.status) {
        targetOption.loading = false
        targetOption.children = result.data.map(item => {
          let submenu = {
            value: item.ParentID,
            label: item.MenuNameP,
            children: item.FunMenu.map(cell => {
              return {
                value: cell.MenuID,
                label: cell.MenuName,
                MenuID: cell.MenuID,
                MenuName: cell.MenuName,
                MenuNo: cell.MenuNo,
                Ot: cell.Ot,
                PageParam: cell.PageParam,
                LinkUrl: cell.LinkUrl,
                disabled: cell.MenuID === MenuID
              }
            })
          }
          return submenu
        })
        this.setState({
          menulist: [...this.state.menulist]
        })
      } else {
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
        targetOption.loading = false
      }
    })
  }
  handleConfirm = () => {