| | |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { Button, Card, Modal, Collapse, notification, Spin, Select, List, Icon, Empty, Switch } from 'antd' |
| | | import { Button, Card, Modal, Collapse, notification, Spin, Select, List, Icon, Empty, Switch, Tooltip } from 'antd' |
| | | import moment from 'moment' |
| | | import DragElement from './dragelement' |
| | | import SourceElement from './dragelement/source' |
| | |
| | | key: 'innerFunc', |
| | | label: this.state.dict['header.form.innerFunc'], |
| | | initVal: card.innerFunc, |
| | | tooltip: <div> |
| | | <p>内部接口: 可自定义数据处理函数,未设置时会调用系统函数,使用系统函数需完善数据源及操作类型;</p> |
| | | <p>外部接口: 可自定义数据处理函数,提交数据经过内部函数处理后,传入外部接口,未设置时,数据会直接传入外部接口。</p> |
| | | </div>, |
| | | tooltipClass: 'middle', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | |
| | | key: 'sql', |
| | | label: this.state.dict['header.form.datasource'], |
| | | initVal: card.sql || this.state.config.setting.tableName || '', |
| | | tooltip: this.state.dict['header.form.actionhelp.datasource'], |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | key: 'sqlType', |
| | | label: this.state.dict['header.form.action.type'], |
| | | initVal: card.sqlType || 'insert', |
| | | tooltip: this.state.dict['header.form.actionhelp.sqlType'], |
| | | required: false, |
| | | options: [{ |
| | | MenuID: 'insert', |
| | |
| | | /> |
| | | {/* 表名添加 */} |
| | | <div className="ant-col ant-form-item-label"> |
| | | <label title={this.state.dict['header.menu.table.add']}> |
| | | {this.state.dict['header.menu.table.add']} |
| | | <label> |
| | | <Tooltip placement="topLeft" title="此处可以添加配置相关的常用表,在添加搜索条件和显示列时,可通过工具栏中的添加按钮,批量添加表格相关字段。"> |
| | | <Icon type="question-circle" /> |
| | | {this.state.dict['header.menu.table.add']} |
| | | </Tooltip> |
| | | </label> |
| | | </div> |
| | | <Select |
| | |
| | | })} |
| | | </div> |
| | | {configAction.length > 0 ? |
| | | <p className="config-btn-title">{this.state.dict['header.menu.action.configurable']}</p> : null |
| | | <p className="config-btn-title"> |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看按钮配置信息。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | {this.state.dict['header.menu.action.configurable']} |
| | | </p> : null |
| | | } |
| | | {configAction.map((item, index) => { |
| | | return ( |
| | |
| | | <div className="setting"> |
| | | <Card title={this.state.dict['header.menu.page.configurable']} bordered={false} extra={ |
| | | <div> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="关" defaultChecked={this.state.config.enabled} onChange={this.onEnabledChange} /> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" defaultChecked={this.state.config.enabled} onChange={this.onEnabledChange} /> |
| | | <Button type="primary" onClick={this.changeTemplate}>{this.state.dict['header.menu.template.change']}</Button> |
| | | <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['header.save']}</Button> |
| | | <Button onClick={this.cancelConfig}>{this.state.dict['header.return']}</Button> |
| | |
| | | } style={{ width: '100%' }}> |
| | | <Icon type="setting" onClick={this.changeSetting} /> |
| | | <div className="search-list"> |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《搜索》中,选择对应搜索框拖至此处添加;或点击按钮《添加搜索条件》批量添加,选择批量添加时,需提前选择使用表。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | {!this.state.searchloading ? |
| | | <DragElement |
| | | list={this.state.config.search} |
| | |
| | | } |
| | | </div> |
| | | <div className="action-list"> |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《按钮》中,选择对应类型的按钮拖至此处添加,如选择按钮类型为表单、新标签页等含有配置页面的按钮,可在左侧工具栏-按钮-可配置按钮处,点击按钮完成相关配置。注:当设置按钮显示位置为表格时,显示列会增加操作列。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | {!this.state.actionloading ? |
| | | <DragElement |
| | | list={this.state.config.action} |
| | |
| | | } |
| | | </div> |
| | | <div className="column-list"> |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《显示列》中,选择对应类型的显示列拖至此处添加;或点击《添加显示列》按钮批量添加,选择批量添加时,需提前选择使用表。注:添加合并列时,需设置可选列。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | {!this.state.columnsloading ? |
| | | <DragElement |
| | | list={this.state.config.columns} |