| | |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import { getModalForm } from '@/templates/zshare/formconfig' |
| | | |
| | | import ModalForm from '@/templates/zshare/modalform' |
| | | import SourceElement from './dragelement/source' |
| | | import SettingForm from './settingform' |
| | | import MenuForm from './menuform' |
| | |
| | | const { Panel } = Collapse |
| | | const { confirm } = Modal |
| | | const CommonDict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const ModalForm = asyncComponent(() => import('@/templates/zshare/modalform')) |
| | | const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent')) |
| | | const DragElement = asyncComponent(() => import('./dragelement')) |
| | | const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) |
| | |
| | | if (card.uuid === item.uuid) { |
| | | index = i |
| | | } |
| | | if (item.type !== 'select' && item.type !== 'link' && item.type !== 'radio') return |
| | | if (!['select', 'link', 'radio', ''].includes(item.type)) return |
| | | if (item.field && !uniq.has(item.field)) { |
| | | uniq.set(item.field, true) |
| | | |
| | |
| | | |
| | | _config.fields = _config.fields.filter(item => !item.origin) |
| | | |
| | | if ((res.type === 'select' || res.type === 'multiselect' || res.type === 'link') && res.resourceType === '1' && /\s/.test(res.dataSource)) { |
| | | if (['select', 'multiselect', 'link', 'checkbox', 'radio', 'checkcard'].includes(res.type) && res.resourceType === '1' && /\s/.test(res.dataSource)) { |
| | | this.setState({ |
| | | sqlVerifing: true |
| | | }) |
| | |
| | | <div className="setting"> |
| | | <Card title={dict['header.menu.form.configurable']} bordered={false} extra={ |
| | | <div> |
| | | <ReplaceField type="form" config={config} updateConfig={this.updateconfig}/> |
| | | <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={this.updateEditConfig}/> |
| | | <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{dict['model.save']}</Button> |
| | | <Button onClick={this.cancelConfig}>{dict['model.back']}</Button> |
| | |
| | | <Modal |
| | | title={dict['model.edit']} |
| | | visible={this.state.settingVisible} |
| | | width={700} |
| | | width={850} |
| | | maskClosable={false} |
| | | onOk={this.settingSave} |
| | | onCancel={() => { this.setState({ settingVisible: false }) }} |