| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input } from 'antd' |
| | | // import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | import { Form, Row, Col, Input, Tooltip, Cascader } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | // import './index.scss' |
| | | const { TextArea } = Input |
| | | |
| | |
| | | onChange: PropTypes.func |
| | | } |
| | | |
| | | state = {} |
| | | state = { |
| | | modules: [], |
| | | menulist: [], |
| | | appType: sessionStorage.getItem('appType') |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | const { verify } = this.props |
| | | let menu = window.GLOB.customMenu |
| | | |
| | | let modules = MenuUtils.getSubModules(menu.components, verify.parId, '', menu.interfaces || null) |
| | | |
| | | let menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | } catch (e) { |
| | | menulist = [] |
| | | } |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | |
| | | this.setState({modules, menulist}) |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | const { verify } = this.props |
| | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const { verify } = this.props |
| | | const { modules, menulist, appType } = this.state |
| | | |
| | | return ( |
| | | <Form className="base-form"> |
| | |
| | | <Input value={verify.label} disabled={true}/> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title="执行成功后需要刷新的组件。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 刷新组件 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('syncComponent', { |
| | | initialValue: verify.syncComponent || [] |
| | | })( |
| | | <Cascader allowClear={true} options={modules} expandTrigger="hover"/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {!appType ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title="执行成功后需要刷新的菜单。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 刷新菜单 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('refreshTab', { |
| | | initialValue: verify.refreshTab || [] |
| | | })( |
| | | <Cascader allowClear={true} options={menulist} expandTrigger="hover"/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {/* <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title=""> |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {verify.type === 'billout' ? <Col span={8}> |
| | | <Form.Item label="回调表名"> |
| | | {getFieldDecorator('cbTable', { |
| | | initialValue: verify.cbTable || '', |
| | | rules: [ |
| | | { required: true, message: '请输入表名!' } |
| | | ] |
| | | })( |
| | | <Input autoComplete="off"/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | ) |