| | |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import moment from 'moment' |
| | | import { Button, Modal, Collapse, notification, Switch, Icon } from 'antd' |
| | | import { Button, Modal, Collapse, notification, Switch } from 'antd' |
| | | import { SettingOutlined, LeftOutlined, SearchOutlined, PlusOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | * @description 表单编辑 |
| | | */ |
| | | handleForm = (_card) => { |
| | | const { group } = this.state |
| | | let card = fromJS(_card).toJS() |
| | | let linkableFields = [] |
| | | |
| | | group.fields.forEach(item => { |
| | | if (item.uuid === card.uuid) return |
| | | if (!['select', 'link', 'checkcard'].includes(item.type)) return |
| | | if (item.type === 'checkcard' && item.multiple === 'true') return |
| | | |
| | | linkableFields.push({ |
| | | value: item.field, |
| | | text: item.label |
| | | }) |
| | | }) |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | card: card, |
| | | formlist: getSearchForm(card, []) |
| | | formlist: getSearchForm(card, linkableFields) |
| | | }) |
| | | } |
| | | |
| | |
| | | let _g = { |
| | | uuid: Utils.getuuid(), |
| | | wrap: { name: 'name', icon: '' }, |
| | | setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden' }, |
| | | setting: { type: 'title', field: '', title: '', focus: 'true', btn: 'hidden', backgroundColor: sessionStorage.getItem('sysBgColor') }, |
| | | fields: [] |
| | | } |
| | | |
| | |
| | | </div> |
| | | <div className="setting"> |
| | | <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> |
| | | <div className="mob-shell-inner"> |
| | | <Icon className="setting-group" onClick={this.changeSetting} type="setting" /> |
| | | <div className="mob-shell-inner" style={{backgroundColor: group.setting.backgroundColor || '#ffffff'}}> |
| | | <SettingOutlined className="setting-group" onClick={this.changeSetting}/> |
| | | {group.setting.type === 'title' ? <div className="am-navbar"> |
| | | <Icon type="left" /> |
| | | <LeftOutlined /> |
| | | <div className="am-navbar-title">{group.setting.title}</div> |
| | | </div> : <div className="am-navbar"> |
| | | <Icon type="left" /> |
| | | <div className="search-bar"><Icon type="search" /></div> |
| | | {/* <LeftOutlined /> */} |
| | | <div className="search-bar"><SearchOutlined /></div> |
| | | <Button >取消</Button> |
| | | </div>} |
| | | {group.floor === 1 ? <Icon className="plus-group" type="plus" onClick={this.plusGroup} /> : null} |
| | | {group.floor === 1 ? <PlusOutlined className="plus-group" onClick={this.plusGroup} /> : null} |
| | | <div style={{minHeight: 'calc(100% - 100px)'}}> |
| | | {group.floor === 1 && group.groups.length > 0 ? <GDragElement |
| | | list={group.groups} |