| | |
| | | const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | const SearchComponent = asyncComponent(() => import('@/templates/sharecomponent/searchcomponent')) |
| | | const ActionComponent = asyncComponent(() => import('@/menu/components/share/actioncomponent')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) |
| | | const CalendarBoard = asyncComponent(() => import('./board')) |
| | |
| | | const { card } = this.props |
| | | |
| | | if (card.isNew) { |
| | | let btnId = Utils.getuuid() |
| | | let _card = { |
| | | uuid: card.uuid, |
| | | type: card.type, |
| | |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { title: '', name: card.name, width: card.width || 24, levels: ['day', 'month'] }, |
| | | wrap: { title: '', name: card.name, width: card.width || 24, levels: ['day', 'month', 'year'] }, |
| | | style: { marginLeft: '0px', marginRight: '0px', marginTop: '0px', marginBottom: '0px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | search: [], |
| | | columns: [], |
| | | scripts: [], |
| | | action: [{ |
| | | $fixed: true, |
| | | uuid: btnId, |
| | | label: '添加', |
| | | OpenType: 'popview', |
| | | popClose: 'grid', |
| | | display: 'modal', |
| | | icon: '', |
| | | class: 'green', |
| | | ratio: 85, |
| | | style: { |
| | | color: 'rgb(255, 255, 255)', |
| | | background: 'rgb(38, 194, 129)', |
| | | marginRight: '15px' |
| | | }, |
| | | config: { |
| | | uuid: btnId, |
| | | MenuID: btnId, |
| | | ParentId: card.uuid, |
| | | enabled: false, |
| | | MenuName: '添加', |
| | | tables: [], |
| | | Template: 'CustomPage', |
| | | components: [], |
| | | viewType: 'popview', |
| | | style: { backgroundColor: '#ffffff', paddingTop: '16px', paddingBottom: '40px', paddingLeft: '16px', paddingRight: '16px' } |
| | | } |
| | | }] |
| | | } |
| | | |
| | | if (card.config) { |
| | |
| | | this.updateComponent({...card, wrap: res}) |
| | | } |
| | | |
| | | setSubConfig = (item) => { |
| | | const { card } = this.state |
| | | let btn = fromJS(item).toJS() |
| | | |
| | | if (btn.OpenType === 'popview') { |
| | | MKEmitter.emit('changePopview', card, btn) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { card } = this.state |
| | | |
| | |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <SearchComponent config={card} updatesearch={this.updateComponent}/> |
| | | <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> |
| | | <CalendarBoard config={card} /> |
| | | <div className="component-name"> |
| | | <div className="center"> |