| | |
| | | } |
| | | |
| | | render () { |
| | | // let logourl = window.GLOB.logo |
| | | const menu = ( |
| | | <Menu overlayclassname="header-dropdown"> |
| | | {this.props.debug && <Menu.Item key="0"> |
| | | {this.state.dict['header.edit']} |
| | | <Switch size="small" className="edit-switch" disabled={!!this.props.editLevel} onChange={this.changeEditState} /> |
| | | </Menu.Item>} |
| | | {/* <Menu.Item key="1" onClick={this.changePassword}>{this.state.dict['header.password']}</Menu.Item> */} |
| | | <Menu.Item key="1" onClick={this.changePassword}>{this.state.dict['header.password']}</Menu.Item> |
| | | <Menu.Item key="2" onClick={this.logout}>{this.state.dict['header.logout']}</Menu.Item> |
| | | </Menu> |
| | | ) |
| | |
| | | const { setting, searchlist, actions, columns, loadingview, viewlost } = this.state |
| | | |
| | | return ( |
| | | <div className="commontable"> |
| | | <div className="commontable" id={'commontable' + this.props.MenuID}> |
| | | {loadingview && <Loading />} |
| | | {searchlist && searchlist.length > 0 ? |
| | | <MainSearch |
| | |
| | | .commontable { |
| | | position: relative; |
| | | min-height: calc(100vh - 94px); |
| | | padding-top: 16px; |
| | | .box404 { |
| | | padding-top: 30px; |
| | | } |
| | | .ant-modal-mask { |
| | | position: absolute; |
| | | } |
| | | .ant-modal-wrap { |
| | | position: absolute; |
| | | } |
| | | .action-modal .ant-modal { |
| | | top: 40px; |
| | | max-width: 95%; |
| | | .ant-modal-body { |
| | | max-height: calc(100vh - 250px); |
| | | } |
| | | } |
| | | } |
| | | .ant-back-top { |
| | | bottom: 30px; |
| | |
| | | |
| | | getModels = () => { |
| | | const { execAction } = this.state |
| | | |
| | | if (!execAction || !this.state.visible) return |
| | | |
| | | let title = '' |
| | | let width = '62vw' |
| | | let container = document.body |
| | | if (execAction && execAction.setting) { |
| | | title = execAction.setting.title |
| | | width = execAction.setting.width + 'vw' |
| | | |
| | | if (execAction.setting.container === 'tab') { |
| | | width = execAction.setting.width + '%' |
| | | container = () => document.getElementById('commontable' + this.props.MenuID) |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <Modal |
| | | getContainer={container} |
| | | wrapClassName='action-modal' |
| | | title={title} |
| | | visible={this.state.visible} |
| | |
| | | |
| | | if (item.type === 'title') { |
| | | fields.push( |
| | | <Col span={24 / cols} key={index}> |
| | | <Col span={24} key={index}> |
| | | <p>{item.label}</p> |
| | | </Col> |
| | | ) |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <DatePicker getCalendarContainer={() => document.getElementById('form-box')} /> |
| | | <DatePicker /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <MonthPicker getCalendarContainer={() => document.getElementById('form-box')} /> |
| | | <MonthPicker /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <DatePicker showTime getCalendarContainer={() => document.getElementById('form-box')} /> |
| | | // <DatePicker showTime getCalendarContainer={() => document.getElementById('form-box')} /> |
| | | <DatePicker showTime /> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | } |
| | | } |
| | | return ( |
| | | <Form {...formItemLayout} className="ant-advanced-search-form" id="form-box"> |
| | | <Form {...formItemLayout} className="ant-advanced-search-form main-form-field" id="form-box"> |
| | | <Row gutter={24}>{this.getFields()}</Row> |
| | | </Form> |
| | | ) |
| | |
| | | .ant-advanced-search-form.main-search { |
| | | .ant-advanced-search-form.main-form-field { |
| | | position: relative; |
| | | padding: 0px 24px 20px; |
| | | border-bottom: 1px solid #d9d9d9; |
| | | .ant-form-item { |
| | | display: flex; |
| | | margin-bottom: 10px; |
| | |
| | | flex: 1; |
| | | } |
| | | .ant-form-item-label { |
| | | width: 100px; |
| | | min-width: 100px; |
| | | } |
| | | } |
| | | .ant-advanced-search-form { |
| | | position: relative; |
| | | } |
| | | .ant-advanced-search-form .ant-input-number { |
| | | width: 100%; |
| | | .ant-input-number { |
| | | width: 100%; |
| | | } |
| | | p { |
| | | color: #1890ff; |
| | | border-bottom: 1px solid #d9d9d9; |
| | | } |
| | | } |
| | |
| | | handleSubmit = () => { |
| | | this.formRef.handleConfirm().then(res => { |
| | | let _config = JSON.parse(JSON.stringify(this.state.config)) |
| | | console.log(res) |
| | | |
| | | if ((res.type === 'select' || res.type === 'link') && res.resourceType === '1') { |
| | | let sql = 'select ' + res.valueField + ',' + res.valueText + ' from (' + res.dataSource + ')' |
| | | if (res.orderBy) { |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="宽度"> |
| | | {getFieldDecorator('width', { |
| | | initialValue: data.width |
| | | })(<InputNumber min={30} max={90} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="列数"> |
| | | {getFieldDecorator('cols', { |
| | | initialValue: data.cols |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label="宽度"> |
| | | {getFieldDecorator('width', { |
| | | initialValue: data.width |
| | | })(<InputNumber min={30} max={90} precision={0} />)} |
| | | <Form.Item label="挂载对象"> |
| | | {getFieldDecorator('container', { |
| | | initialValue: data.container || 'view' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="view">页面</Radio> |
| | | <Radio value="tab">标签页</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | setting: { |
| | | title: '', |
| | | width: 60, |
| | | cols: '2' |
| | | cols: '2', |
| | | container: 'view' |
| | | }, |
| | | tables: [], |
| | | groups: [], |