| | |
| | | required: item.required, |
| | | message: item.label + '不可为空!' |
| | | }] |
| | | |
| | | if (item.rules) { |
| | | _rules.push(...item.rules) |
| | | } |
| | | |
| | | item.rules = _rules |
| | | } else if (item.type === 'number') { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | btnElement = (<Button style={_style}>{card.icon ? <MkIcon type={card.icon}/> : null}{card.label}{warning}</Button>) |
| | | } |
| | | |
| | | let _style_ = null |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | _style_ = {clear: 'left'} |
| | | } |
| | | |
| | | return ( |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}> |
| | |
| | | {hasProfile ? <ProfileOutlined className="profile" title="setting" onClick={() => profileCard(id)} /> : null} |
| | | </div> |
| | | } trigger="hover"> |
| | | <div ref={node => drag(drop(node))} className={'ant-col card-button-cell ant-col-' + card.width + (card.hidden === 'true' ? ' mk-hidden' : '')} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}> |
| | | <div style={{opacity: isDragging ? 0 : 1, ...card.wrapStyle}}> |
| | | <div ref={node => drag(drop(node))} style={_style_} className={'ant-col card-button-cell ant-col-' + card.width + (card.hidden === 'true' ? ' mk-hidden' : '')} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}> |
| | | <div style={{opacity: isDragging ? 0.3 : 1, ...card.wrapStyle}}> |
| | | {btnElement} |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | }) |
| | | |
| | | let _style = {opacity: isDragging ? 0 : 1} |
| | | let _style = {opacity: isDragging ? 0.3 : 1} |
| | | |
| | | if (card.style) { |
| | | _style = {...card.style, opacity: isDragging ? 0 : 1} |
| | | _style = {...card.style, opacity: isDragging ? 0.3 : 1} |
| | | _style = resetStyle(_style) |
| | | } |
| | | if (card.eleType === 'picture' && card.maxWidth) { |
| | |
| | | able = false |
| | | } |
| | | |
| | | let _style_ = null |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | _style_ = {clear: 'left'} |
| | | } |
| | | |
| | | return ( |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}> |
| | |
| | | {['text', 'number', 'slider', 'sequence', 'formula'].includes(card.eleType) ? <MarkColumn field={card.field || ''} columns={fields} type={card.eleType} marks={card.marks} onSubmit={(vals) => updateMarks({...card, marks: vals})} /> : null } |
| | | </div> |
| | | } trigger="hover"> |
| | | <div ref={node => drag(drop(node))} className={'ant-col card-cell ant-col-' + card.width}> |
| | | <div ref={node => drag(drop(node))} style={_style_} className={'ant-col card-cell ant-col-' + card.width}> |
| | | <div style={_style} onClick={clickComponent} onDoubleClick={() => able && editCard(id)} id={card.uuid}> |
| | | {getContent()} |
| | | </div> |
| | |
| | | options = ['padding', 'margin'] |
| | | } |
| | | |
| | | options.push('clear') |
| | | |
| | | this.setState({ |
| | | card: element |
| | | }) |
| | |
| | | const NodesWrap = asyncComponent(() => import('./node-wrap')) |
| | | const CardCellComponent = asyncComponent(() => import('../cardcellcomponent')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteController = asyncIconComponent(() => import('@/components/paste')) |
| | | |
| | | class CardBoxComponent extends Component { |
| | | static propTpyes = { |
| | |
| | | this.props.updateElement(_card) |
| | | } |
| | | |
| | | paste = (element, resolve) => { |
| | | const { card } = this.state |
| | | |
| | | let _uuid = Utils.getuuid() |
| | | |
| | | if (element.copyType === 'action') { |
| | | element.eleType = 'button' |
| | | } |
| | | |
| | | element.uuid = _uuid |
| | | element.focus = true |
| | | |
| | | resolve({status: true}) |
| | | |
| | | // 注册事件-添加元素 |
| | | MKEmitter.emit('cardAddElement', card.uuid, element) |
| | | } |
| | | |
| | | render() { |
| | | const { cards } = this.props |
| | | const { card } = this.state |
| | |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> : <NodesWrap card={card} updateMenus={this.updateNodes}/>} |
| | | {cards.type !== 'timeline' ? <CopyComponent type="cardcell" card={card}/> : null} |
| | | <PasteController options={['action', 'customCardElement']} updateConfig={this.paste} /> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/> |
| | | {control ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'height', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'height', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | controlFields: [ |
| | | {field: 'modalWidth', values: ['modal']}, |
| | | {field: 'modalContent', values: ['modal']}, |
| | | {field: 'code', values: ['modal']}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'code', |
| | | label: '消息编码', |
| | | initval: wrap.code || '', |
| | | tooltip: '用于记录消息是否已读的标识,如果不同页面中存在相同消息,可指定固定值。', |
| | | required: false, |
| | | rules: [{ |
| | | pattern: /^[0-9a-zA-Z_]*$/ig, |
| | | message: '只允许包含数字、字母以及_。' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'autoplay', |
| | | label: '自动切换', |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | style = { opacity: 0.3} |
| | | } |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | style.clear = 'left' |
| | | } |
| | | |
| | | const getCardComponent = () => { |
| | | if (card.type === 'bar' || card.type === 'line') { |
| | | return (<AntvBar card={card} updateConfig={updateConfig} deletecomponent={delCard} />) |
| | |
| | | |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) |
| | | const PasteComponent = asyncIconComponent(() => import('../paste')) |
| | | const GroupComponents = asyncComponent(() => import('../groupcomponents')) |
| | | |
| | |
| | | changeStyle = () => { |
| | | const { group } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], group.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], group.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | | this.updateComponent({...this.state.group, setting: res}) |
| | | let group = {...this.state.group, setting: res} |
| | | |
| | | if (res.title && !group.headerStyle) { |
| | | group.headerStyle = { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' } |
| | | } |
| | | |
| | | this.updateComponent(group) |
| | | } |
| | | |
| | | render() { |
| | |
| | | |
| | | return ( |
| | | <div className={'menu-group-edit-box ' + (paddingTop ? 'padding ' : '') + (group.setting.layout || '')} style={_style} id={group.uuid}> |
| | | <NormalHeader hideSearch="true" config={group} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <NormalForm title="分组设置" width={700} update={this.updateWrap} getForms={this.getWrapForms}> |
| | |
| | | const settingForm = [ |
| | | { |
| | | type: 'text', |
| | | field: 'title', |
| | | label: '标题', |
| | | initval: setting.title || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'name', |
| | | label: '组件名称', |
| | | initval: setting.name || '', |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | /** |
| | |
| | | changeStyle = () => { |
| | | const { config } = this.props |
| | | |
| | | let options = ['font', 'border', 'background'] |
| | | if (config.type === 'menubar') { |
| | | options.push('padding') |
| | | } |
| | | let options = ['font', 'border', 'background', 'padding'] |
| | | |
| | | MKEmitter.emit('changeStyle', options, config.headerStyle, this.getStyle) |
| | | } |
| | | |
| | | render() { |
| | | const { config, hideSearch } = this.props |
| | | // const { appType } = this.state |
| | | |
| | | let title = config.plot ? config.plot.title : config.wrap.title |
| | | let title = '' |
| | | let show = true |
| | | |
| | | // if (!title && appType === 'mob' && config.type === 'card' && config.subtype === 'datacard' && config.action && config.action.length) { |
| | | // title = ' ' |
| | | // } |
| | | if (config.plot) { |
| | | title = config.plot.title |
| | | } else if (config.type === 'group') { |
| | | title = config.setting.title || '' |
| | | } else if (config.wrap) { |
| | | title = config.wrap.title || '' |
| | | } |
| | | |
| | | if (!title && (!config.search || config.search.length === 0 || hideSearch === 'true')) { |
| | | show = false |
| | |
| | | overflow: hidden; |
| | | letter-spacing: 0px; |
| | | line-height: 45px; |
| | | box-sizing: content-box; |
| | | |
| | | .title { |
| | | text-decoration: inherit; |
| | |
| | | style.fontSize = card.wrap.fontSize || 14 |
| | | style.fontWeight = card.wrap.fontWeight || 'normal' |
| | | |
| | | MKEmitter.emit('changeStyle', ['font1', 'background', 'border', 'padding', 'margin', 'shadow'], style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['font1', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | style.fontSize = card.wrap.fontSize || 14 |
| | | style.fontWeight = card.wrap.fontWeight || 'normal' |
| | | |
| | | MKEmitter.emit('changeStyle', ['font1', 'background', 'border', 'padding', 'margin', 'shadow'], style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['font1', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { tabs } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], tabs.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], tabs.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | style = { opacity: 0.3} |
| | | } |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | style.clear = 'left' |
| | | } |
| | | |
| | | const getCardComponent = () => { |
| | | if (card.type === 'bar' || card.type === 'line') { |
| | | return (<AntvBar card={card} updateConfig={updateConfig} deletecomponent={delCard} />) |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | style = { opacity: 0.3} |
| | | } |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | style.clear = 'left' |
| | | } |
| | | |
| | | const getCardComponent = () => { |
| | | if (card.type === 'card' && card.subtype === 'datacard') { |
| | | return (<DataCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>) |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | </Panel> : null} |
| | | {options.includes('clear') ? <Panel header="浮动" key="clear"> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<SwapOutlined title="浮动"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} defaultValue={card.clear || 'none'} onChange={(e) => this.changeNormalStyle(e.target.value, 'clear')}> |
| | | <Radio value="none">左浮动</Radio> |
| | | <Radio value="left">不浮动</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | | </Panel> : null} |
| | | </Collapse> : null} |
| | | </Form> |
| | | <div style={{textAlign: 'right'}}> |
| | |
| | | } |
| | | |
| | | _colors.forEach(item => { |
| | | colors.push(item.linkurl) |
| | | if (!colors.includes(item.linkurl)) { |
| | | colors.push(item.linkurl) |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | /** |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | /** |
| | |
| | | changeStyle = () => { |
| | | const { tabs } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], tabs.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], tabs.style, this.getStyle) |
| | | } |
| | | |
| | | changeTabStyle = () => { |
| | |
| | | style = { opacity: 0.3} |
| | | } |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | style.clear = 'left' |
| | | } |
| | | |
| | | const getCardComponent = () => { |
| | | if (card.type === 'bar' || card.type === 'line') { |
| | | return (<AntvBar card={card} updateConfig={updateConfig} deletecomponent={delCard} />) |
| | |
| | | style = { opacity: 0.3} |
| | | } |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | style.clear = 'left' |
| | | } |
| | | |
| | | let col = 'ant-col-' + (card.width || 24) |
| | | if (card.type === 'login') { |
| | | let height = '' |
| | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', ['width', 'background', 'border', 'padding', 'margin'], card.style, this.getStyle) |
| | | MKEmitter.emit('changeStyle', ['width', 'background', 'border', 'padding', 'margin', 'clear'], card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | if (isDragging) { |
| | | style = { opacity: 0.3} |
| | | } |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | style.clear = 'left' |
| | | } |
| | | |
| | | let col = ' ant-col ant-col-' + (card.width || 24) |
| | | if (card.type === 'login') { |
| | | let height = '' |
| | |
| | | let contents = [] |
| | | |
| | | elements.forEach(card => { |
| | | let _style_ = null |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | _style_ = {clear: 'left'} |
| | | } |
| | | |
| | | if (card.eleType === 'sequence') { |
| | | let _style = {} |
| | | if (card.marks) { |
| | |
| | | _style = mark.style |
| | | } |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div> |
| | | </div> |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> |
| | | <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | </div> |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={_style}> |
| | | <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | </div> |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | {val ? <Tooltip title={val}> |
| | | <MkIcon className="ant-mk-icon" style={{height: height}} type={icon}/> |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <MkProgress value={val} config={card} color={color}/> |
| | | </div> |
| | |
| | | let urls = url ? url.split(',').filter(Boolean) : [''] |
| | | |
| | | urls.forEach((u, i) => { |
| | | contents.push(<Col key={card.uuid + i} span={card.width}> |
| | | contents.push(<Col key={card.uuid + i} style={_style_} span={card.width}> |
| | | <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> |
| | | <MkPicture style={_imagestyle} scale={scale} url={u} urls={urls}/> |
| | | </div> |
| | |
| | | }) |
| | | } else if (card.eleType === 'splitline') { |
| | | let _borderWidth = card.borderWidth === undefined ? 1 : card.borderWidth |
| | | _style_ = _style_ || {} |
| | | _style_.minHeight = _borderWidth |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width} style={{minHeight: _borderWidth}}> |
| | | <Col key={card.uuid} span={card.width} style={_style_}> |
| | | <div style={card.style}> |
| | | <div className="ant-mk-splitline" style={{borderColor: card.color, borderWidth: _borderWidth}}></div> |
| | | </div> |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div style={{height: card.innerHeight || 25}}> |
| | | {val ? <BarCode card={card} value={val}/> : null} |
| | |
| | | |
| | | urls.forEach((u, i) => { |
| | | contents.push( |
| | | <Col key={card.uuid + i} span={card.width}> |
| | | <Col key={card.uuid + i} style={_style_} span={card.width}> |
| | | <div className="video-wrap" style={card.style}> |
| | | <Video card={card} poster={poster} value={u}/> |
| | | </div> |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div style={{minHeight: card.qrWidth || 50}}> |
| | | {val ? <QrCode card={card} value={val}/> : null} |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={card.style}> |
| | | <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | </div> |
| | |
| | | } |
| | | |
| | | contents.push( |
| | | <Col key={card.uuid} span={card.width}> |
| | | <Col key={card.uuid} style={_style_} span={card.width}> |
| | | <div style={_style}> |
| | | <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | </div> |
| | |
| | | } else if (data.$$empty) { |
| | | _data = [] |
| | | } |
| | | |
| | | _style_ = _style_ || {} |
| | | if (card.wrapStyle) { |
| | | _style_ = {..._style_, ...card.wrapStyle} |
| | | } |
| | | |
| | | if (['exec', 'prompt', 'pop', 'form'].includes(card.OpenType)) { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <NormalButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.OpenType === 'excelIn') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <ExcelInButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.OpenType === 'excelOut') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <ExcelOutButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.OpenType === 'popview') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <PopupButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.OpenType === 'tab') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <TabButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.OpenType === 'innerpage') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <NewPageButton |
| | | btn={card} |
| | | BData={data.$$BData || ''} |
| | |
| | | } else if (card.OpenType === 'funcbutton') { |
| | | if (card.funcType === 'changeuser' || card.funcType === 'closetab') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <ChangeUserButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.funcType === 'print') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <PrintButton |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.funcType === 'megvii') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <FuncMegvii |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | ) |
| | | } else if (card.funcType === 'filezip') { |
| | | contents.push( |
| | | <Col key={card.uuid} className="mk-cell-btn" style={card.wrapStyle} span={card.width}> |
| | | <Col key={card.uuid} className="mk-cell-btn" style={_style_} span={card.width}> |
| | | <FuncZip |
| | | btn={card} |
| | | BID={data.$$BID} |
| | |
| | | |
| | | if (config.wrap.display !== 'modal' || !data || data.length === 0) return |
| | | |
| | | let tip = localStorage.getItem('modal' + config.uuid) |
| | | let code = config.wrap.code || ('modal' + config.uuid) |
| | | let tip = localStorage.getItem(code) |
| | | |
| | | if (!data[0].$$uuid || tip === data[0].$$uuid + data.length) return |
| | | |
| | | if (config.wrap.modalContent === 'update') { |
| | | localStorage.setItem('modal' + config.uuid, data[0].$$uuid + data.length) |
| | | localStorage.setItem(code, data[0].$$uuid + data.length) |
| | | |
| | | Api.getAppVersion(true) |
| | | } |
| | |
| | | onTipChange = (e) => { |
| | | const { config, data } = this.state |
| | | |
| | | let code = config.wrap.code || ('modal' + config.uuid) |
| | | if (e.target.checked) { |
| | | localStorage.setItem('modal' + config.uuid, data[0].$$uuid + data.length) |
| | | localStorage.setItem(code, data[0].$$uuid + data.length) |
| | | } else { |
| | | localStorage.removeItem('modal' + config.uuid) |
| | | localStorage.removeItem(code) |
| | | } |
| | | } |
| | | |
| | |
| | | openModal = () => { |
| | | const { config, data } = this.state |
| | | |
| | | let tip = localStorage.getItem('modal' + config.uuid) |
| | | let code = config.wrap.code || ('modal' + config.uuid) |
| | | let tip = localStorage.getItem(code) |
| | | |
| | | if ((data.$$uuid && tip === data.$$uuid) || (!data.$$uuid && tip)) return |
| | | |
| | | if (config.wrap.modalContent === 'update') { |
| | | localStorage.setItem('modal' + config.uuid, data.$$uuid || 'true') |
| | | localStorage.setItem(code, data.$$uuid || 'true') |
| | | |
| | | Api.getAppVersion(true) |
| | | } |
| | |
| | | onTipChange = (e) => { |
| | | const { config, data } = this.state |
| | | |
| | | let code = config.wrap.code || ('modal' + config.uuid) |
| | | if (e.target.checked) { |
| | | localStorage.setItem('modal' + config.uuid, data.$$uuid || 'true') |
| | | localStorage.setItem(code, data.$$uuid || 'true') |
| | | } else { |
| | | localStorage.removeItem('modal' + config.uuid) |
| | | localStorage.removeItem(code) |
| | | } |
| | | } |
| | | |
| | |
| | | const { mainSearch, data } = this.state |
| | | |
| | | return config.components.map(item => { |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | let style = null |
| | | |
| | | if (item.style && item.style.clear === 'left') { |
| | | style = {clear: 'left'} |
| | | } |
| | | |
| | | if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvBarAndLine data={data} config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvPie data={data} config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TabForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <DataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <PropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvBarAndLine data={data} config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvPie data={data} config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TabForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TableCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <EditTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tree') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTree config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <BraftEditor config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SandBox config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <Balcony config={item} data={data}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TimeLine config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CustomChart config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | |
| | | }) |
| | | } |
| | | |
| | | canvasToImage(canvas) { |
| | | let image = new Image() |
| | | image.src = canvas.toDataURL('image/jpg') |
| | | image.style = 'width:100%;height:100%;position:absolute;z-index:1;left:0px;top:0px;' |
| | | return image |
| | | } |
| | | |
| | | print = () => { |
| | | const { config } = this.props |
| | | const { printing } = this.state |
| | | |
| | | if (printing) return |
| | | this.setState({printing: true}) |
| | | |
| | | let qrcodes = document.getElementsByClassName('qrcode-box') |
| | | |
| | | for (let i = 0; i < qrcodes.length; i++) { |
| | | let canvas = qrcodes[i].getElementsByTagName('canvas')[0] |
| | | |
| | | if (canvas) { |
| | | let img = this.canvasToImage(canvas) |
| | | |
| | | canvas.remove() |
| | | qrcodes[i].append(img) |
| | | } |
| | | } |
| | | |
| | | let pageSize = ['A4', 'A3', 'A5'].includes(config.setting.pageSize) ? config.setting.pageSize : 'A4' |
| | | let pageLayout = config.setting.pageLayout !== 'horizontal' ? 'vertical' : 'horizontal' |
| | |
| | | |
| | | return ( |
| | | <div className={'normal-group-wrap ' + (config.setting.layout || '')} id={config.uuid} style={config.style}> |
| | | {config.setting && config.setting.title ? <div className="group-header" style={config.headerStyle}> |
| | | <span className="title">{config.setting.title}</span> |
| | | </div> : null} |
| | | {config.setting && config.setting.print === 'true' ? <Button className="print-button" icon="printer" loading={printing} onClick={this.print}></Button> : null} |
| | | <Row className="component-wrap">{this.getComponents()}</Row> |
| | | </div> |
| | |
| | | border: 0; |
| | | background: transparent; |
| | | } |
| | | |
| | | .group-header { |
| | | position: relative; |
| | | height: 45px; |
| | | padding-right: 8px; |
| | | border-bottom: 1px solid #e8e8e8; |
| | | overflow: hidden; |
| | | letter-spacing: 0px; |
| | | line-height: 45px; |
| | | box-sizing: content-box; |
| | | |
| | | .title { |
| | | text-decoration: inherit; |
| | | font-weight: inherit; |
| | | font-style: inherit; |
| | | float: left; |
| | | line-height: inherit; |
| | | margin-left: 10px; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .normal-group-wrap::after { |
| | |
| | | overflow: hidden; |
| | | letter-spacing: 0px; |
| | | line-height: 45px; |
| | | box-sizing: content-box; |
| | | |
| | | .title { |
| | | text-decoration: inherit; |
| | |
| | | if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) |
| | | |
| | | return config.components.map(item => { |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | let style = null |
| | | |
| | | if (item.style && item.style.clear === 'left') { |
| | | style = {clear: 'left'} |
| | | } |
| | | |
| | | if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <DataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <PropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvBarAndLine data={data} config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvPie data={data} config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | |
| | | BID = BData.$BID || '' |
| | | } |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvTabs config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <DataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <PropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TableCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'basetable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <MkBaseTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <EditTable config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'group' && item.subtype === 'normalgroup') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalGroup config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <StepForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TabForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tree') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTree config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <BraftEditor config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SandBox config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <Balcony config={item} data={data}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TimeLine config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CustomChart config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | |
| | | if (!config || !config.components) return |
| | | |
| | | return config.components.map(item => { |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | | let style = null |
| | | |
| | | if (item.style && item.style.clear === 'left') { |
| | | style = {clear: 'left'} |
| | | } |
| | | |
| | | if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvBarAndLine config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvPie config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <StepForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TabForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'search') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvTabs config={item} mainSearch={mainSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <DataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <PropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvBarAndLine config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvPie config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <StepForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TabForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'search') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | | return ( |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvTabs config={item} mainSearch={mainSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <Balcony config={item} data={data}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TimeLine config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TableCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <EditTable config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'group' && item.subtype === 'normalgroup') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalGroup config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <BraftEditor config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tree') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTree config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SandBox config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CustomChart config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'module' && item.subtype === 'voucher') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <Voucher config={item}/> |
| | | </Col> |
| | | ) |
| | |
| | | if (!config) return |
| | | |
| | | return config.components.map(item => { |
| | | let style = null |
| | | |
| | | if (item.style && item.style.clear === 'left') { |
| | | style = {clear: 'left'} |
| | | } |
| | | |
| | | if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <DataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <PropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'basetable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <BaseTable config={item}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'bar' || item.type === 'line') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvBarAndLine config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'pie') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvPie config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'scatter') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvScatter config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'dashboard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvDashboard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'simpleform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SimpleForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'stepform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <StepForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'form' && item.subtype === 'tabform') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TabForm config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'search') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <AntvTabs config={item} mainSearch={mainSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'balcony') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <Balcony config={item} data={data}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'timeline') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TimeLine config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <TableCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTable config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <EditTable config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'group' && item.subtype === 'normalgroup') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalGroup config={item} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'editor') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <BraftEditor config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tree') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <NormalTree config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'code') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <SandBox config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <CustomChart config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'module' && item.subtype === 'voucher') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <Col span={item.width} style={style} key={item.uuid}> |
| | | <Voucher config={item}/> |
| | | </Col> |
| | | ) |