king
2023-08-31 1795b3d924b95da49cf22003f4a4f8ffaa2dbda3
src/views/tabledesign/menuform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Select, notification, Switch } from 'antd'
import { Form, Row, Col, Input, Select, notification, Switch, Radio } from 'antd'
import Api from '@/api'
import './index.scss'
@@ -24,11 +24,15 @@
  }
  UNSAFE_componentWillMount () {
    const { config } = this.props
    if (sessionStorage.getItem('thdMenuList') && sessionStorage.getItem('fstMenuList')) {
      this.setMenus()
    } else {
      this.getMenus()
    }
    window.GLOB.process = config.process === 'true'
  }
  setMenus = () => {
@@ -191,12 +195,12 @@
        this.props.form.setFieldsValue({parentId: _id})
        this.props.updateConfig({...config, fstMenuId: value, parentId: _id})
      })
    } else if (key === 'parentId') {
      this.props.updateConfig({...config, parentId: value})
    } else if (key === 'OpenType') {
      this.props.updateConfig({...config, OpenType: value})
    } else if (key === 'hidden') {
      this.props.updateConfig({...config, hidden: value})
    } else {
      if (key === 'process') {
        window.GLOB.process = value === 'true'
      }
      this.props.updateConfig({...config, [key]: value})
    }
  }
@@ -332,6 +336,18 @@
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label="工作流">
              {getFieldDecorator('process', {
                initialValue: config.process || 'false'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('process', e.target.value)}}>
                  <Radio value="true">使用</Radio>
                  <Radio value="false">不使用</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={24}>
            <Form.Item label={'隐藏菜单'}>
              <Switch checkedChildren={'是'} checked={config.hidden === 'true'} unCheckedChildren={'否'} onChange={(value) => {
                this.selectChange('hidden', value + '')