| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Select, notification, Switch, Radio } from 'antd' |
| | | import { Form, Row, Col, Input, Select, notification, Switch, Radio, Tooltip } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | | |
| | | const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) |
| | | const SysColorSketch = asyncComponent(() => import('@/menu/stylecontroller/syscolorsketch')) |
| | | |
| | | class CustomMenuForm extends Component { |
| | | static propTpyes = { |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="是否检验后端sql的权限,使用后端sql脚本时有效。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | sql验证 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('sqlperm', { |
| | | initialValue: config.sqlperm || 'true' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('sqlperm', e.target.value)}}> |
| | | <Radio value="true">使用</Radio> |
| | | <Radio value="false">不使用</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="工作流"> |
| | | {getFieldDecorator('process', { |
| | | initialValue: config.process || 'false' |
| | |
| | | })(<TextArea rows={2} placeholder={''} onChange={this.changeRemark} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item style={{marginBottom: '0px'}} label="菜单颜色"> |
| | | <ColorSketch allowClear={true} value={config.menuColor || ''} onChange={(val) => {this.selectChange('menuColor', val)}} /> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item style={{marginBottom: '0px'}} label="系统色"> |
| | | <SysColorSketch onChange={(val) => {this.selectChange('menuColor', val)}} /> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | ) |