| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import { getSearchForm } from '@/templates/zshare/formconfig' |
| | | import SourceElement from '@/templates/modalconfig/dragelement/source' |
| | | import SettingForm from './settingform' |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, // 字典 |
| | | config: null, // 页面配置,包括模板类型、模态框设置、添加表名、表单列表 |
| | | visible: false, // 表单编辑模态框,显示控制 |
| | | formlist: null, // 表单编辑模态框,可编辑字段 |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { dict, group, editGroup, saving } = this.state |
| | | const { group, editGroup, saving } = this.state |
| | | |
| | | return ( |
| | | <div className="mob-search-board"> |
| | | <DndProvider backend={HTML5Backend}> |
| | | <div className="tools"> |
| | | <Collapse accordion defaultActiveKey="1" bordered={false}> |
| | | <Panel header={dict['header.menu.form']} key="1"> |
| | | <Panel header="搜索条件" key="1"> |
| | | <div className="search-element"> |
| | | {SearchItems.map((item, index) => { |
| | | return (<SourceElement key={index} content={item}/>) |
| | |
| | | <Button onClick={this.cancelConfig}>关闭</Button> |
| | | {!group.floor ? <Button onClick={this.returnUp}>返回上级</Button> : null} |
| | | <PasteComponent insert={this.insert} /> |
| | | <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> |
| | | </div> |
| | | <div className="setting"> |
| | | <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> |
| | |
| | | </div> |
| | | </DndProvider> |
| | | <Modal |
| | | title={this.state.dict['model.edit']} |
| | | title="编辑" |
| | | visible={this.state.visible} |
| | | width={850} |
| | | onCancel={this.editModalCancel} |
| | |
| | | destroyOnClose |
| | | > |
| | | <SearchForm |
| | | dict={this.state.dict} |
| | | card={this.state.card} |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleSubmit} |
| | |
| | | /> |
| | | </Modal> |
| | | <Modal |
| | | title={this.state.dict['model.edit']} |
| | | title="编辑" |
| | | visible={this.state.settingVisible} |
| | | width={850} |
| | | maskClosable={false} |
| | |
| | | /> |
| | | </Modal> |
| | | <Modal |
| | | title={this.state.dict['model.edit']} |
| | | title="编辑" |
| | | visible={this.state.gVisible} |
| | | width={600} |
| | | maskClosable={false} |