| | |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | let _LongParam = res.LongParam && window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | } catch (e) { |
| | | _LongParam = '' |
| | | let _LongParam = '' |
| | | if (res.LongParam) { |
| | | try { |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | | |
| | | _menu.LongParam = _LongParam |
| | |
| | | let _config = '' |
| | | if (result.LongParam) { |
| | | try { |
| | | _config = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _config = JSON.parse(_config) |
| | | _config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | _config.type = 'user' |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _config = '' |
| | | } |
| | | } |
| | |
| | | 'header.form.func.print': '打印', |
| | | 'header.form.execMode': '执行方式', |
| | | 'header.form.thawbutton': '解冻按钮', |
| | | 'header.form.maxRows': '最大行数', |
| | | 'header.form.paste': '粘贴', |
| | | 'header.modal.form.edit': '表单-编辑', |
| | | 'header.modal.search.edit': '搜索条件-编辑', |
| | | 'header.modal.action.edit': '按钮-编辑', |
| | |
| | | 'header.form.func.print': '打印', |
| | | 'header.form.execMode': '执行方式', |
| | | 'header.form.thawbutton': '解冻按钮', |
| | | 'header.form.maxRows': '最大行数', |
| | | 'header.form.paste': '粘贴', |
| | | 'header.modal.form.edit': '表单-编辑', |
| | | 'header.modal.search.edit': '搜索条件-编辑', |
| | | 'header.modal.action.edit': '按钮-编辑', |
| | |
| | | let config = '' |
| | | |
| | | try { // 配置信息解析 |
| | | config = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | config = JSON.parse(config) |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = '' |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | const { datatype } = this.state |
| | | if (nextProps.data && !is(fromJS(this.props.data), fromJS(nextProps.data))) { |
| | | |
| | | let _fieldsvalue = {} |
| | | let _record = {} |
| | | Object.keys(nextProps.data).forEach(key => { |
| | | if (this.props.form.getFieldValue(key) !== undefined) { |
| | | _fieldsvalue[key] = nextProps.data[key] |
| | | if (datatype[key] === 'multiselect') { |
| | | let _val = nextProps.data[key] ? nextProps.data[key].split(',').filter(Boolean) : [] |
| | | _fieldsvalue[key] = _val |
| | | } else if (datatype[key] === 'date') { |
| | | let _val = nextProps.data[key] ? nextProps.data[key] : null |
| | | |
| | | if (_val) { |
| | | _val = moment(_val, 'YYYY-MM-DD') |
| | | } |
| | | |
| | | _fieldsvalue[key] = _val |
| | | } else if (datatype[key] === 'datemonth') { |
| | | let _val = nextProps.data[key] ? nextProps.data[key] : null |
| | | |
| | | if (_val) { |
| | | _val = moment(_val, 'YYYY-MM') |
| | | } |
| | | |
| | | _fieldsvalue[key] = _val |
| | | } else if (datatype[key] === 'datetime') { |
| | | let _val = nextProps.data[key] ? nextProps.data[key] : null |
| | | |
| | | if (_val) { |
| | | _val = moment(_val, 'YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | |
| | | _fieldsvalue[key] = _val |
| | | } else if (datatype[key] === 'fileupload') { |
| | | let _val = nextProps.data[key] ? nextProps.data[key] : '' |
| | | |
| | | if (_val) { |
| | | try { |
| | | _val = _val.split(',').map((url, index) => { |
| | | return { |
| | | uid: `${index}`, |
| | | name: url.slice(url.lastIndexOf('/') + 1), |
| | | status: 'done', |
| | | url: url, |
| | | origin: true |
| | | } |
| | | }) |
| | | } catch { |
| | | _val = [] |
| | | } |
| | | } else { |
| | | _val = [] |
| | | } |
| | | |
| | | _fieldsvalue[key] = _val |
| | | } else { |
| | | _fieldsvalue[key] = nextProps.data[key] |
| | | } |
| | | } else { |
| | | _record[key] = nextProps.data[key] |
| | | } |
| | |
| | | ) |
| | | } else if (item.type === 'datetime') { |
| | | let _initval = this.props.data ? this.props.data[item.field] : '' |
| | | |
| | | if (_initval && this.state.readin[item.field]) { |
| | | _initval = moment(_initval, 'YYYY-MM-DD HH:mm:ss') |
| | | } else { |
| | |
| | | message: formRule.textarea.message |
| | | } |
| | | ] |
| | | })(<TextArea autosize={{ minRows: 2, maxRows: 6 }} disabled={item.readonly === 'true'} />)} |
| | | })(<TextArea autosize={{ minRows: 2, maxRows: item.maxRows || 6 }} disabled={item.readonly === 'true'} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | let config = '' |
| | | |
| | | try { // 配置信息解析 |
| | | config = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | config = JSON.parse(config) |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = '' |
| | | } |
| | | |
| | |
| | | let config = '' |
| | | |
| | | try { // 配置信息解析 |
| | | config = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | config = JSON.parse(config) |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = '' |
| | | } |
| | | |
| | |
| | | let config = '' |
| | | |
| | | try { // 配置信息解析 |
| | | config = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | config = JSON.parse(config) |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = '' |
| | | } |
| | | |
| | |
| | | let config = '' |
| | | |
| | | try { // 配置信息解析 |
| | | config = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | config = JSON.parse(config) |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = '' |
| | | } |
| | | |
| | |
| | | message: res.ErrMesg || this.props.dict['main.action.confirm.success'], |
| | | duration: btn.verify && btn.verify.stime ? btn.verify.stime : 2 |
| | | }) |
| | | } else if (res && res.ErrCode === 'Y') { // 执行成功 |
| | | Modal.success({ |
| | | title: res.ErrMesg || this.props.dict['main.action.confirm.success'] |
| | | }) |
| | | } else if (res && res.ErrCode === '-1') { // 完成后不提示 |
| | | |
| | | // } else if (res.Relogin === 'true') { // 切换用户功能 |
| | |
| | | let _LongParam = '' |
| | | |
| | | if (res.status && res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | message: formRule.input.formMessage.replace('@max', _max) |
| | | } |
| | | ] |
| | | })(<TextArea autosize={{ minRows: 2, maxRows: 6 }} disabled={item.readonly === 'true'} />)} |
| | | })(<TextArea autosize={{ minRows: 2, maxRows: item.maxRows || 6 }} disabled={item.readonly === 'true'} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | setting: PropTypes.object, // 页面设置 |
| | | formlist: PropTypes.any, // 表单信息 |
| | | card: PropTypes.any, // 按钮信息 |
| | | tabs: PropTypes.array // 所有标签页 |
| | | dict: PropTypes.object, // 字典项 |
| | | setting: PropTypes.object, // 页面设置 |
| | | formlist: PropTypes.any, // 表单信息 |
| | | card: PropTypes.any, // 按钮信息 |
| | | tabs: PropTypes.array, // 所有标签页 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | |
| | | }, |
| | | ..._rules |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | import TabForm from '@/templates/tableshare/tabform' |
| | | import SearchForm from '@/templates/tableshare/searchform' |
| | | import ColumnForm from '@/templates/tableshare/columnform' |
| | | import PasteForm from '@/templates/tableshare/pasteform' |
| | | import DragElement from '@/templates/tableshare/dragelement' |
| | | import ColspanForm from '@/templates/tableshare/colspanform' |
| | | import GridBtnForm from '@/templates/tableshare/gridbtnform' |
| | |
| | | // 解析配置,修改模态框标题名称 |
| | | if (result.LongParam) { |
| | | try { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | _LongParam.setting.title = res.label |
| | | _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam))) |
| | | } catch { |
| | | console.warn('Stringify Failure') |
| | | _LongParam = '' |
| | | } |
| | | } else { |
| | |
| | | // 解析配置,修改模态框标题名称 |
| | | if (result.LongParam) { |
| | | try { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam))) |
| | | _temp = 'FormTab' |
| | | } catch { |
| | | console.warn('Stringify Failure') |
| | | _LongParam = '' |
| | | } |
| | | } else { |
| | |
| | | }).then(res => { |
| | | let _LongParam = '' |
| | | if (res.status && res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | |
| | | if (result.LongParam) { |
| | | try { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | |
| | | let tabParam = { // 添加菜单tab页 |
| | | func: 'sPC_sMenusTab_AddUpt', |
| | | MenuID: menu.MenuID, |
| | | LText: _config.tabs.map((item, index) => { |
| | | return `select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort` |
| | | }) |
| | | MenuID: menu.MenuID |
| | | } |
| | | |
| | | tabParam.LText = tabParam.LText.join(' union all ') |
| | | tabParam.LText = Utils.formatOptions(tabParam.LText) |
| | | let _LText = [] |
| | | let _index = 1 |
| | | |
| | | _config.tabgroups.forEach(groupId => { |
| | | _config[groupId].forEach(item => { |
| | | _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_index * 10}' as Sort`) |
| | | _index++ |
| | | }) |
| | | }) |
| | | |
| | | _LText = _LText.join(' union all ') |
| | | |
| | | tabParam.LText = Utils.formatOptions(_LText) |
| | | tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp) |
| | | |
| | |
| | | try { |
| | | _ParentParam = window.btoa(window.encodeURIComponent(JSON.stringify(item.card))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | | _ParentParam = null |
| | | } |
| | | |
| | |
| | | if (result.LongParam) { |
| | | let _subconfig = '' |
| | | try { |
| | | _subconfig = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _subconfig = JSON.parse(_subconfig) |
| | | _subconfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | _temp = _subconfig.type |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _subconfig = '' |
| | | } |
| | | |
| | |
| | | }) |
| | | _subconfig = window.btoa(window.encodeURIComponent(JSON.stringify(_subconfig))) |
| | | } catch { |
| | | console.warn('Stringify Failure') |
| | | _subconfig = '' |
| | | } |
| | | |
| | |
| | | }) |
| | | let _LongParam = '' |
| | | if (res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | try { |
| | | _conf = JSON.parse(window.decodeURIComponent(window.atob(menu.ParentParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _conf = '' |
| | | } |
| | | } |
| | |
| | | Api.getSystemConfig(_param) |
| | | }) |
| | | this.props.handleView() |
| | | } |
| | | |
| | | pasteSubmit = () => { |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | | if (res.copyType !== 'action') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '配置信息格式错误!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | | modaltype: '' |
| | | }, () => { |
| | | this.handleAction(res, 'copy') |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | render () { |
| | |
| | | placeholder={this.state.dict['header.form.search.placeholder']} |
| | | /> |
| | | </div> |
| | | <div className="action-list"> |
| | | <div className="action-list" id="action-list"> |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《按钮》中,选择对应类型的按钮拖至此处添加,如选择按钮类型为表单、新标签页等含有配置页面的按钮,可在左侧工具栏-按钮-可配置按钮处,点击按钮完成相关配置。注:当设置按钮显示位置为表格时,显示列会增加操作列。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | {/* <div className="thawbutton" title={this.state.dict['header.form.thawbutton']} onClick={this.handleThaw}> |
| | | <Icon type="unlock" /> |
| | | </div> */} |
| | | <div className="copybutton" title={this.state.dict['header.form.paste']} onClick={() => {this.setState({modaltype: 'paste'})}}> |
| | | <Icon type="snippets" /> |
| | | </div> |
| | | <DragElement |
| | | type="action" |
| | | list={this.state.config.action} |
| | |
| | | <SearchForm |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | inputSubmit={this.handleSubmit} |
| | | optionLibs={this.state.optionLibs} |
| | | formlist={this.state.formlist} |
| | | wrappedComponentRef={(inst) => this.searchFormRef = inst} |
| | |
| | | card={this.state.card} |
| | | tabs={this.state.tabviews} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | | setting={this.state.config.setting} |
| | | wrappedComponentRef={(inst) => this.actionFormRef = inst} |
| | | /> |
| | |
| | | <ColumnForm |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | inputSubmit={this.handleSubmit} |
| | | formlist={this.state.formlist} |
| | | wrappedComponentRef={(inst) => this.columnFormRef = inst} |
| | | /> |
| | |
| | | <ColspanForm |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | inputSubmit={this.handleSubmit} |
| | | columns={this.state.config.columns} |
| | | wrappedComponentRef={(inst) => this.columnFormRef = inst} |
| | | /> |
| | |
| | | > |
| | | <GridBtnForm |
| | | dict={this.state.dict} |
| | | inputSubmit={this.handleSubmit} |
| | | card={this.state.config.gridBtn} |
| | | wrappedComponentRef={(inst) => this.gridBtnFormRef = inst} |
| | | /> |
| | |
| | | > |
| | | <TabForm |
| | | type="tabs" |
| | | tabs={this.state.tabviews} |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | tabs={this.state.tabviews} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | | wrappedComponentRef={(inst) => this.tabsFormRef = inst} |
| | | /> |
| | | </Modal> |
| | |
| | | <SettingForm |
| | | dict={this.state.dict} |
| | | menu={this.props.menu} |
| | | inputSubmit={this.settingSave} |
| | | data={this.state.config.setting} |
| | | columns={this.state.config.columns} |
| | | usefulFields={this.props.permFuncField} |
| | |
| | | {!this.state.thawbtnlist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />} |
| | | {this.state.thawbtnlist && <TransferForm ref="trawmenu" dict={this.state.dict} menulist={this.state.thawbtnlist}/>} |
| | | </Modal> |
| | | {/* 按钮配置信息粘贴复制 */} |
| | | <Modal |
| | | title={this.state.dict['header.form.paste']} |
| | | visible={modaltype === 'paste'} |
| | | width={600} |
| | | maskClosable={false} |
| | | onOk={this.pasteSubmit} |
| | | onCancel={() => {this.setState({modaltype: ''})}} |
| | | destroyOnClose |
| | | > |
| | | <PasteForm |
| | | dict={this.state.dict} |
| | | wrappedComponentRef={(inst) => this.pasteFormRef = inst} |
| | | /> |
| | | </Modal> |
| | | {this.state.loading && <Spin size="large" />} |
| | | </div> |
| | | ) |
| | |
| | | display: inline-block; |
| | | } |
| | | } |
| | | .thawbutton { |
| | | .copybutton { |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 5px; |
| | | z-index: 2; |
| | | padding: 5px; |
| | | cursor: pointer; |
| | | i { |
| | | font-size: 18px; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | } |
| | |
| | | > .anticon-setting { |
| | | position: absolute; |
| | | font-size: 18px; |
| | | right: 5px; |
| | | right: 7px; |
| | | top: 10px; |
| | | padding: 10px; |
| | | z-index: 1; |
| | |
| | | menu: PropTypes.object, |
| | | data: PropTypes.object, |
| | | columns: PropTypes.array, |
| | | usefulFields: PropTypes.array |
| | | usefulFields: PropTypes.array, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { data, dict, menu, usefulFields } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType === 'outer' ? <Col span={12}> |
| | |
| | | message: formRule.func.maxMessage |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType !== 'outer' ? <Col span={12}> |
| | |
| | | message: formRule.func.maxMessage |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType !== 'outer' ? <Col span={24} style={{paddingLeft: '7px'}}> |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="ID asc, UID desc" autoComplete="off" />)} |
| | | })(<Input placeholder="ID asc, UID desc" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, // 表单信息 |
| | | card: PropTypes.any, // 按钮信息 |
| | | tabs: PropTypes.array // 所有标签页 |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, // 表单信息 |
| | | card: PropTypes.any, // 按钮信息 |
| | | tabs: PropTypes.array, // 所有标签页 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | |
| | | }, |
| | | ..._rules |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | const { MonthPicker } = DatePicker |
| | | const { TextArea } = Input |
| | | |
| | | const Card = ({ id, type, cols, card, moveCard, findCard, editCard, delCard, profileCard, hasDrop }) => { |
| | | const Card = ({ id, type, cols, card, moveCard, findCard, editCard, delCard, profileCard, hasDrop, copyCard }) => { |
| | | const originalIndex = findCard(id).index |
| | | const [{ isDragging }, drag] = useDrag({ |
| | | item: { type: ItemTypes[type], id, originalIndex }, |
| | |
| | | |
| | | const del = () => { |
| | | delCard(id) |
| | | } |
| | | |
| | | const copy = () => { |
| | | copyCard(id) |
| | | } |
| | | |
| | | const profile = () => { |
| | |
| | | <div className={'ant-col ant-form-item-label ant-col-xs-24 ' + labelCol}> |
| | | <label title={card.label}>{card.label}</label> |
| | | <Icon className="edit" title="编辑" type="edit" onClick={edit} /> |
| | | <Icon className="edit copy" title="复制" type="copy" onClick={copy} /> |
| | | <Icon className="edit close" title="删除" type="close" onClick={del} /> |
| | | </div> |
| | | <div className={'ant-col ant-form-item-control-wrapper ant-col-xs-24 ' + wrapCol}> |
| | |
| | | const { card } = findCard(id) |
| | | handleMenu(card) |
| | | } |
| | | |
| | | const copyCard = id => { |
| | | const { card } = findCard(id) |
| | | |
| | | let _card = JSON.parse(JSON.stringify(card)) |
| | | |
| | | _card.originUuid = _card.uuid |
| | | _card.uuid = Utils.getuuid() |
| | | _card.iscopy = true |
| | | _card.focus = true |
| | | |
| | | handleMenu(_card) |
| | | } |
| | | |
| | | const profileCard = id => { |
| | | const { card } = findCard(id) |
| | |
| | | moveCard={moveCard} |
| | | editCard={editCard} |
| | | delCard={delCard} |
| | | copyCard={copyCard} |
| | | findCard={findCard} |
| | | hasDrop={hasDrop} |
| | | /> |
| | |
| | | |
| | | class GroupForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | group: PropTypes.object, // 字典项 |
| | | groups: PropTypes.array |
| | | dict: PropTypes.object, // 字典项 |
| | | group: PropTypes.object, // 当前分组 |
| | | groups: PropTypes.array, // 所有分组 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { group, groups } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off"/>)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | } |
| | | |
| | | handleSearch = (card) => { |
| | | const {menu} = this.props |
| | | const { menu } = this.props |
| | | const { config } = this.state |
| | | let _inputfields = [] |
| | | let _linkableFields = [] |
| | |
| | | */ |
| | | handleSubmit = () => { |
| | | const { btnTab } = this.props |
| | | const { config, modaltype, optionLibs } = this.state |
| | | const { config, modaltype, optionLibs, card } = this.state |
| | | |
| | | if (modaltype === 'search') { |
| | | this.modalFormRef.handleConfirm().then(res => { |
| | |
| | | options: res.options |
| | | }) |
| | | } |
| | | let _groups = config.groups.map(group => { |
| | | group.sublist = group.sublist.map(item => { |
| | | if (item.uuid === res.uuid) { |
| | | return res |
| | | } else { |
| | | return item |
| | | |
| | | let _groups = null |
| | | |
| | | if (card.iscopy) { |
| | | _groups = config.groups.map(group => { |
| | | let _index = null |
| | | group.sublist.forEach((item, index) => { |
| | | if (item.uuid === card.originUuid) { |
| | | _index = index |
| | | } |
| | | }) |
| | | |
| | | if (_index !== null) { |
| | | group.sublist.splice(_index + 1, 0, res) |
| | | } |
| | | |
| | | if (group.isDefault) { |
| | | group.sublist = group.sublist.filter(item => !item.origin) |
| | | } |
| | | return group |
| | | }) |
| | | if (group.isDefault) { |
| | | group.sublist = group.sublist.filter(item => !item.origin) |
| | | } |
| | | return group |
| | | }) |
| | | } else { |
| | | _groups = config.groups.map(group => { |
| | | group.sublist = group.sublist.map(item => { |
| | | if (item.uuid === res.uuid) { |
| | | return res |
| | | } else { |
| | | return item |
| | | } |
| | | }) |
| | | if (group.isDefault) { |
| | | group.sublist = group.sublist.filter(item => !item.origin) |
| | | } |
| | | return group |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | | config: {...config, groups: _groups}, |
| | |
| | | }).then(res => { |
| | | let _LongParam = '' |
| | | if (res.status && res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | |
| | | if (result.LongParam) { |
| | | try { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | |
| | | let tabParam = { // 添加菜单tab页 |
| | | func: 'sPC_sMenusTab_AddUpt', |
| | | MenuID: btnTab.uuid, |
| | | LText: config.tabs.map((item, index) => { |
| | | return `select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort` |
| | | }) |
| | | MenuID: btnTab.uuid |
| | | } |
| | | tabParam.LText = tabParam.LText.join(' union all ') |
| | | tabParam.LText = Utils.formatOptions(tabParam.LText) |
| | | |
| | | let _LText = [] |
| | | let _index = 1 |
| | | |
| | | config.tabgroups.forEach(groupId => { |
| | | config[groupId].forEach(item => { |
| | | _LText.push(`select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_index * 10}' as Sort`) |
| | | _index++ |
| | | }) |
| | | }) |
| | | |
| | | _LText = _LText.join(' union all ') |
| | | |
| | | tabParam.LText = Utils.formatOptions(_LText) |
| | | |
| | | tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' |
| | | tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp) |
| | | |
| | |
| | | }) |
| | | let _LongParam = '' |
| | | if (res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | </DndProvider> |
| | | {/* 编辑表单 */} |
| | | <Modal |
| | | title={this.state.dict['header.modal.form.edit']} |
| | | title={this.state.card && this.state.card.iscopy ? this.state.dict['header.modal.form.copy'] : this.state.dict['header.modal.form.edit']} |
| | | visible={modaltype === 'search'} |
| | | width={700} |
| | | maskClosable={false} |
| | |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | | optionLibs={this.state.optionLibs} |
| | | wrappedComponentRef={(inst) => this.modalFormRef = inst} |
| | | /> |
| | |
| | | card={this.state.card} |
| | | tabs={this.state.tabviews} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | | wrappedComponentRef={(inst) => this.actionFormRef = inst} |
| | | /> |
| | | </Modal> |
| | |
| | | card={this.state.card} |
| | | tabs={this.state.tabviews} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | | wrappedComponentRef={(inst) => this.tabsFormRef = inst} |
| | | /> |
| | | </Modal> |
| | |
| | | dict={this.state.dict} |
| | | menu={this.props.menu} |
| | | config={this.state.config} |
| | | inputSubmit={this.settingSave} |
| | | usefulFields={this.props.permFuncField} |
| | | wrappedComponentRef={(inst) => this.settingRef = inst} |
| | | /> |
| | |
| | | > |
| | | <GroupForm |
| | | groups={config.groups} |
| | | group={this.state.editgroup} |
| | | dict={this.state.dict} |
| | | group={this.state.editgroup} |
| | | inputSubmit={this.handleGroupSave} |
| | | wrappedComponentRef={(inst) => this.groupRef = inst} |
| | | /> |
| | | </Modal> |
| | |
| | | } |
| | | .edit { |
| | | position: absolute; |
| | | // left: calc(34% - 100px); |
| | | right: 100px; |
| | | top: -5px; |
| | | color: #1890ff; |
| | |
| | | display: none; |
| | | } |
| | | .edit.close { |
| | | // left: calc(34% - 80px); |
| | | right: 80px; |
| | | right: 60px; |
| | | color: #ff4d4f; |
| | | } |
| | | .edit.copy { |
| | | right: 80px; |
| | | color: #26C281; |
| | | } |
| | | } |
| | | .page-card:hover { |
| | |
| | | > .anticon-setting { |
| | | position: absolute; |
| | | font-size: 18px; |
| | | right: 5px; |
| | | right: 7px; |
| | | top: 10px; |
| | | padding: 10px; |
| | | z-index: 1; |
| | |
| | | dict: PropTypes.object, // 字典项 |
| | | menu: PropTypes.object, |
| | | config: PropTypes.object, |
| | | usefulFields: PropTypes.array |
| | | usefulFields: PropTypes.array, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { dict, usefulFields, menu } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {datatype === 'query' && interType !== 'outer' ? <Col span={12}> |
| | |
| | | message: formRule.func.maxMessage |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {datatype === 'query' && interType !== 'outer' ? <Col span={24}> |
| | |
| | | message: formRule.func.maxMessage |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | group: PropTypes.object, // 字典项 |
| | | config: PropTypes.object |
| | | config: PropTypes.object, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { group, config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off"/>)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | formlist={this.state.formlist} |
| | | optionLibs={this.state.optionLibs} |
| | | inputSubmit={this.handleSubmit} |
| | | optionLibs={this.state.optionLibs} |
| | | wrappedComponentRef={(inst) => this.formRef = inst} |
| | | />} |
| | | </Modal> |
| | |
| | | destroyOnClose |
| | | > |
| | | <SettingForm |
| | | dict={this.state.dict} |
| | | config={config} |
| | | dict={this.state.dict} |
| | | inputSubmit={this.settingSave} |
| | | wrappedComponentRef={(inst) => this.settingRef = inst} |
| | | /> |
| | | </Modal> |
| | |
| | | > |
| | | <GroupForm |
| | | config={config} |
| | | group={this.state.curgroup} |
| | | dict={this.state.dict} |
| | | group={this.state.curgroup} |
| | | inputSubmit={this.handleGroupSave} |
| | | wrappedComponentRef={(inst) => this.groupRef = inst} |
| | | /> |
| | | </Modal> |
| | |
| | | > .anticon-setting { |
| | | position: absolute; |
| | | font-size: 16px; |
| | | right: 10px; |
| | | right: 15px; |
| | | top: 10px; |
| | | } |
| | | } |
| | |
| | | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | config: PropTypes.object // 表单配置信息 |
| | | dict: PropTypes.object, // 字典项 |
| | | config: PropTypes.object, // 表单配置信息 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { config, dict } = this.props |
| | | const { fields } = this.state |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off"/>)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | setting: PropTypes.object, // 页面设置 |
| | | formlist: PropTypes.any, // 表单信息 |
| | | card: PropTypes.any, // 按钮信息 |
| | | tabs: PropTypes.array // 所有标签页 |
| | | dict: PropTypes.object, // 字典项 |
| | | setting: PropTypes.object, // 页面设置 |
| | | formlist: PropTypes.any, // 表单信息 |
| | | card: PropTypes.any, // 按钮信息 |
| | | tabs: PropTypes.array, // 所有标签页 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | |
| | | }, |
| | | ..._rules |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | import SearchForm from '@/templates/tableshare/searchform' |
| | | import ColumnForm from '@/templates/tableshare/columnform' |
| | | import DragElement from '@/templates/tableshare/dragelement' |
| | | import PasteForm from '@/templates/tableshare/pasteform' |
| | | import ColspanForm from '@/templates/tableshare/colspanform' |
| | | import GridBtnForm from '@/templates/tableshare/gridbtnform' |
| | | import EditCard from '@/templates/tableshare/editcard' |
| | |
| | | // 解析配置,修改模态框标题名称 |
| | | if (result.LongParam) { |
| | | try { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | _LongParam.setting.title = res.label |
| | | _LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(_LongParam))) |
| | | } catch { |
| | | console.warn('Stringify Failure') |
| | | _LongParam = '' |
| | | } |
| | | } else { |
| | |
| | | }).then(res => { |
| | | let _LongParam = '' |
| | | if (res.status && res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | |
| | | if (result.LongParam) { |
| | | try { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | try { |
| | | _ParentParam = window.btoa(window.encodeURIComponent(JSON.stringify(item.card))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | | _ParentParam = null |
| | | } |
| | | |
| | |
| | | let _LongParam = '' |
| | | |
| | | if (result.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | }) |
| | | let _LongParam = '' |
| | | if (res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | try { |
| | | _conf = JSON.parse(window.decodeURIComponent(window.atob(menu.ParentParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _conf = '' |
| | | } |
| | | } |
| | |
| | | thawBtnVisible: false |
| | | }) |
| | | } |
| | | } |
| | | |
| | | pasteSubmit = () => { |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | | if (res.copyType !== 'action') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '配置信息格式错误!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } else if (!['pop', 'prompt', 'exec', 'excelIn', 'excelOut', 'popview'].includes(res.OpenType)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '不支持此打开方式!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | | modaltype: '' |
| | | }, () => { |
| | | this.handleAction(res, 'copy') |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | render () { |
| | |
| | | <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《按钮》中,选择对应类型的按钮拖至此处添加,如选择按钮类型为表单、新标签页等含有配置页面的按钮,可在左侧工具栏-按钮-可配置按钮处,点击按钮完成相关配置。注:当设置按钮显示位置为表格时,显示列会增加操作列。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | <div className="copybutton" title={this.state.dict['header.form.paste']} onClick={() => {this.setState({modaltype: 'paste'})}}> |
| | | <Icon type="snippets" /> |
| | | </div> |
| | | <DragElement |
| | | type="action" |
| | | list={this.state.config.action} |
| | |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | | optionLibs={this.state.optionLibs} |
| | | wrappedComponentRef={(inst) => this.searchFormRef = inst} |
| | | /> |
| | |
| | | card={this.state.card} |
| | | tabs={this.state.tabviews} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | | setting={this.state.config.setting} |
| | | wrappedComponentRef={(inst) => this.actionFormRef = inst} |
| | | /> |
| | |
| | | <ColumnForm |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | inputSubmit={this.handleSubmit} |
| | | formlist={this.state.formlist} |
| | | wrappedComponentRef={(inst) => this.columnFormRef = inst} |
| | | /> |
| | |
| | | <ColspanForm |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | inputSubmit={this.handleSubmit} |
| | | columns={this.state.config.columns} |
| | | wrappedComponentRef={(inst) => this.columnFormRef = inst} |
| | | /> |
| | |
| | | > |
| | | <GridBtnForm |
| | | dict={this.state.dict} |
| | | inputSubmit={this.handleSubmit} |
| | | card={this.state.config.gridBtn} |
| | | wrappedComponentRef={(inst) => this.gridBtnFormRef = inst} |
| | | /> |
| | |
| | | <SettingForm |
| | | dict={this.state.dict} |
| | | tabId={this.state.config.uuid} |
| | | inputSubmit={this.settingSave} |
| | | data={this.state.config.setting} |
| | | columns={this.state.config.columns} |
| | | usefulFields={this.props.permFuncField} |
| | |
| | | {!this.state.thawbtnlist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />} |
| | | {this.state.thawbtnlist && <TransferForm ref="trawmenu" dict={this.state.dict} menulist={this.state.thawbtnlist}/>} |
| | | </Modal> |
| | | {/* 按钮配置信息粘贴复制 */} |
| | | <Modal |
| | | title={this.state.dict['header.form.paste']} |
| | | visible={modaltype === 'paste'} |
| | | width={600} |
| | | maskClosable={false} |
| | | onOk={this.pasteSubmit} |
| | | onCancel={() => {this.setState({modaltype: ''})}} |
| | | destroyOnClose |
| | | > |
| | | <PasteForm |
| | | dict={this.state.dict} |
| | | wrappedComponentRef={(inst) => this.pasteFormRef = inst} |
| | | /> |
| | | </Modal> |
| | | {this.state.loading && <Spin size="large" />} |
| | | </div> |
| | | ) |
| | |
| | | display: inline-block; |
| | | } |
| | | } |
| | | .copybutton { |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 5px; |
| | | z-index: 2; |
| | | padding: 5px; |
| | | cursor: pointer; |
| | | i { |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | } |
| | | .column-list { |
| | | position: relative; |
| | |
| | | } |
| | | } |
| | | } |
| | | .tab-list { |
| | | position: relative; |
| | | padding: 30px 20px 0px; |
| | | .ant-switch { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 20px; |
| | | } |
| | | > .ant-row { |
| | | min-height: 47px; |
| | | .page-card { |
| | | position: relative; |
| | | padding: 0px; |
| | | > div { |
| | | padding: 12px 0px 0px; |
| | | cursor: move; |
| | | } |
| | | } |
| | | .ant-tabs-tab { |
| | | .edit { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0px; |
| | | color: #1890ff; |
| | | cursor: pointer; |
| | | display: none; |
| | | } |
| | | .edit.close { |
| | | left: 20px; |
| | | color: #ff4d4f; |
| | | } |
| | | } |
| | | .ant-tabs-bar { |
| | | min-height: 55px; |
| | | } |
| | | .ant-tabs-tab:hover { |
| | | .edit { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | } |
| | | > .anticon-setting { |
| | | position: absolute; |
| | | font-size: 18px; |
| | | right: 15px; |
| | | top: 30px; |
| | | } |
| | | } |
| | | > .anticon-setting { |
| | | position: absolute; |
| | | font-size: 18px; |
| | | right: 15px; |
| | | right: 7px; |
| | | top: 10px; |
| | | } |
| | | } |
| | |
| | | tabId: PropTypes.string, |
| | | data: PropTypes.object, |
| | | columns: PropTypes.array, |
| | | usefulFields: PropTypes.array |
| | | usefulFields: PropTypes.array, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { data, dict, tabId, usefulFields } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={this.state.interReadonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType === 'outer' ? <Col span={12}> |
| | |
| | | message: formRule.func.maxMessage |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType !== 'outer' ? <Col span={12}> |
| | |
| | | message: formRule.func.maxMessage |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType !== 'outer' ? <Col span={24}> |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="ID asc, UID desc" autoComplete="off" />)} |
| | | })(<Input placeholder="ID asc, UID desc" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | columns: PropTypes.array, |
| | | card: PropTypes.any |
| | | } |
| | | |
| | | state = { |
| | | |
| | | card: PropTypes.any, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | componentDidMount () { |
| | |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const formItemLayout = { |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, |
| | | card: PropTypes.any |
| | | card: PropTypes.any, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | |
| | | }, |
| | | ...rules |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | const copyCard = id => { |
| | | const { card } = findCard(id) |
| | | let copycard = JSON.parse(JSON.stringify(card)) |
| | | |
| | | copycard.uuid = Utils.getuuid() |
| | | copycard.origin = false |
| | | copycard.label = copycard.label + '(copy)' |
| | | copycard.focus = true |
| | | |
| | | copycard.originCard = card |
| | | |
| | | let _val = '' |
| | | |
| | | try { |
| | | copycard.copyType = 'action' |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(copycard))) |
| | | } catch { |
| | | console.warn('Stringify Failure') |
| | | _val = '' |
| | | } |
| | | |
| | | if (_val) { |
| | | let oInput = document.createElement('input') |
| | | oInput.value = _val |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | } |
| | | |
| | | copyElement(copycard) |
| | | } |
| | |
| | | initVal: '', |
| | | required: false, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'maxRows', |
| | | label: Formdict['header.form.maxRows'], |
| | | initVal: card.maxRows || 6, |
| | | required: false |
| | | } |
| | | ] |
| | | } |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | card: PropTypes.any |
| | | dict: PropTypes.object, // 字典项 |
| | | card: PropTypes.any, |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | ] |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, notification } from 'antd' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object // 字典项 |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | // 表单提交时检查输入值是否正确 |
| | | return new Promise((resolve, reject) => { |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | let _config = values.config |
| | | |
| | | try { |
| | | _config = JSON.parse(window.decodeURIComponent(window.atob(_config))) |
| | | } catch (e) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '解析错误', |
| | | duration: 10 |
| | | }) |
| | | _config = '' |
| | | } |
| | | |
| | | if (_config) { |
| | | resolve(_config) |
| | | } |
| | | } else { |
| | | reject(err) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 24 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 24 } |
| | | } |
| | | } |
| | | return ( |
| | | <Form {...formItemLayout} className="config-paste-form"> |
| | | <Row gutter={24}> |
| | | <Col span={24}> |
| | | <Form.Item label="配置信息" className="textarea"> |
| | | {getFieldDecorator('config', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['form.required.input'] + '配置信息!' |
| | | } |
| | | ] |
| | | })(<TextArea autosize={{ minRows: 4, maxRows: 8 }} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default Form.create()(MainSearch) |
New file |
| | |
| | | .config-paste-form { |
| | | min-height: 150px; |
| | | |
| | | .ant-form-item-label { |
| | | text-align: left; |
| | | } |
| | | } |
| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, // 表单 |
| | | optionLibs: PropTypes.any, // 自定义下拉集 |
| | | card: PropTypes.object // 搜索条件信息 |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, // 表单 |
| | | optionLibs: PropTypes.any, // 自定义下拉集 |
| | | card: PropTypes.object, // 搜索条件信息 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | |
| | | }, |
| | | ...rules |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | |
| | | class MainTab extends Component { |
| | | static propTpyes = { |
| | | tabs: PropTypes.array, // 类型 |
| | | type: PropTypes.string, // 类型 |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, // 表单 |
| | | card: PropTypes.object // 标签页信息 |
| | | tabs: PropTypes.array, // 可关联标签集 |
| | | type: PropTypes.string, // 类型 |
| | | dict: PropTypes.object, // 字典项 |
| | | formlist: PropTypes.any, // 表单 |
| | | card: PropTypes.object, // 标签页信息 |
| | | inputSubmit: PropTypes.any // 回车提交事件 |
| | | } |
| | | |
| | | state = { |
| | |
| | | const { formlist } = this.props |
| | | |
| | | let type = formlist.filter(cell => cell.key === 'type')[0].initVal |
| | | // let _initval = formlist.filter(cell => cell.key === 'linkTab')[0].initVal |
| | | |
| | | let _tabs = this.props.tabs.filter(tab => tab.type === type) |
| | | // let initTab = _tabs.filter(tab => tab.uuid === _initval)[0] |
| | | |
| | | this.setState({ |
| | | formlist: formlist.map(item => { |
| | |
| | | }, |
| | | ..._tabs |
| | | ] |
| | | // if (!initTab) { |
| | | // item.initVal = '' |
| | | // } |
| | | } |
| | | |
| | | return item |
| | |
| | | } |
| | | } |
| | | |
| | | handleSubmit = (e) => { |
| | | e.preventDefault() |
| | | |
| | | if (this.props.inputSubmit) { |
| | | this.props.inputSubmit() |
| | | } |
| | | } |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const fields = [] |
| | |
| | | message: formRule.input.message |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)} |
| | | })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | if (res.status) { |
| | | let _LongParam = '' |
| | | if (res.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(res.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | } |
| | |
| | | message: '执行成功!', |
| | | duration: 2 |
| | | }) |
| | | } else if (errorType === 'Y') { |
| | | Modal.success({ |
| | | title: '执行成功!' |
| | | }) |
| | | } else if (errorType === 'F') { |
| | | notification.error({ |
| | | className: 'notification-custom-error', |
| | |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | <span className="errorval"> Y </span> |
| | | <Button onClick={() => {this.showError('Y')}} type="primary" size="small"> |
| | | 查看 |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | </TabPane> |
| | | </Tabs> |
| | |
| | | message: '执行成功!', |
| | | duration: 2 |
| | | }) |
| | | } else if (errorType === 'Y') { |
| | | Modal.success({ |
| | | title: '执行成功!' |
| | | }) |
| | | } else if (errorType === 'F') { |
| | | notification.error({ |
| | | className: 'notification-custom-error', |
| | |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | <span className="errorval"> Y </span> |
| | | <Button onClick={() => {this.showError('Y')}} type="primary" size="small"> |
| | | 查看 |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | </TabPane> |
| | | </Tabs> |
| | |
| | | message: '执行成功!', |
| | | duration: 2 |
| | | }) |
| | | } else if (errorType === 'Y') { |
| | | Modal.success({ |
| | | title: '执行成功!' |
| | | }) |
| | | } else if (errorType === 'F') { |
| | | notification.error({ |
| | | className: 'notification-custom-error', |
| | |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | <span className="errorval"> Y </span> |
| | | <Button onClick={() => {this.showError('Y')}} type="primary" size="small"> |
| | | 查看 |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | </TabPane> |
| | | </Tabs> |
| | |
| | | message: '执行成功!', |
| | | duration: 2 |
| | | }) |
| | | } else if (errorType === 'Y') { |
| | | Modal.success({ |
| | | title: '执行成功!' |
| | | }) |
| | | } else if (errorType === 'F') { |
| | | notification.error({ |
| | | className: 'notification-custom-error', |
| | |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | <span className="errorval"> Y </span> |
| | | <Button onClick={() => {this.showError('Y')}} type="primary" size="small"> |
| | | 查看 |
| | | </Button> |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | <Row gutter={24}> |
| | | <Col offset={6} span={6}> |
| | | <Form.Item label={'提示编码'}> |
| | | <span className="errorval"> -1 </span> |
| | | 不提示 |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | </TabPane> |
| | | </Tabs> |
| | |
| | | } else if (type === 'fileupload') { |
| | | _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength'] |
| | | } else if (type === 'textarea') { |
| | | _options = [..._options, 'fieldlength'] |
| | | _options = [..._options, 'fieldlength', 'maxRows'] |
| | | } else if (type === 'text') { |
| | | _options = [..._options, 'fieldlength', 'regular'] |
| | | } |
| | |
| | | } else if (value === 'fileupload') { |
| | | _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength'] |
| | | } else if (value === 'textarea') { |
| | | _options = [..._options, 'fieldlength'] |
| | | _options = [..._options, 'fieldlength', 'maxRows'] |
| | | } else if (value === 'text') { |
| | | _options = [..._options, 'fieldlength', 'regular'] |
| | | } |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={0} max={18} precision={0} onPressEnter={this.handleSubmit} />)} |
| | | })(<InputNumber min={0} max={18} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={1} precision={0} onPressEnter={this.handleSubmit} />)} |
| | | })(<InputNumber min={1} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.key === 'maxRows') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={2} max={100} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber onPressEnter={this.handleSubmit} />)} |
| | | })(<InputNumber />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | try { |
| | | _user = JSON.parse(window.decodeURIComponent(window.atob(_user))) |
| | | } catch { |
| | | console.warn('Parse Failure') |
| | | _user = '' |
| | | } |
| | | } |