| | |
| | | |
| | | let labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3 |
| | | let advanceType = setting.advanceType || 'modal' |
| | | let style = {} |
| | | if (setting.borderRadius) { |
| | | style.borderRadius = setting.borderRadius |
| | | } |
| | | |
| | | return ( |
| | | <div ref={drop} className="ant-row"> |
| | |
| | | <div className="ant-row ant-form-item" style={{lineHeight: '40px', height: '55px', marginBottom: 0}}> |
| | | <div className="ant-col ant-form-item-label" style={{width: labelwidth + '%'}}></div> |
| | | <div className="ant-col ant-form-item-control-wrapper" style={{whiteSpace: 'nowrap'}}> |
| | | <Button type="primary">搜索</Button> |
| | | <Button style={{ marginLeft: 8 }}>重置</Button> |
| | | <Button style={style} type="primary">搜索</Button> |
| | | <Button style={{ marginLeft: 8, ...style }}>重置</Button> |
| | | <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div> |
| | | </div> |
| | | </div> |
| | |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'borderRadius', values: ['true']} |
| | | ] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'borderRadius', |
| | | label: '按钮圆角', |
| | | initval: wrap.borderRadius || '', |
| | | tooltip: '搜索和重置按钮的圆角。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'permission', |
| | | label: '权限验证', |
| | |
| | | } |
| | | |
| | | openView = () => { |
| | | const { card, data, cards } = this.props |
| | | const { card, data, cards, onClick } = this.props |
| | | |
| | | onClick && onClick() |
| | | |
| | | if (!card.setting.click || data.$disabled) return |
| | | |
| | | if (card.setting.click === 'menus' && cards.subtype === 'datacard' && card.$cardType !== 'extendCard') { |
| | |
| | | } |
| | | |
| | | return ( |
| | | <div className={'card-item-box ' + (card.setting.btnControl || '')} style={style} onClick={this.openView} onDoubleClick={this.doubleClick}> |
| | | <div className={'card-item-box ' + (card.setting.btnControl || '') + (card.setting.click ? ' mk-pointer' : '')} style={style} onClick={this.openView} onDoubleClick={this.doubleClick}> |
| | | {bg} |
| | | {children} |
| | | <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.elements}/> |
| | |
| | | background-repeat: inherit; |
| | | } |
| | | } |
| | | .card-item-box.mk-pointer { |
| | | cursor: pointer; |
| | | } |
| | | .mk-disabled .card-item-box.mk-pointer { |
| | | cursor: not-allowed; |
| | | } |
| | | .card-item-box:hover { |
| | | .back-side.up, .back-side.down, .back-side.left, .back-side.right { |
| | | transform: translate(0, 0); |
| | |
| | | </Col> |
| | | ))} |
| | | {data && data.map((item, index) => { |
| | | let className = card.setting.click ? 'mk-card pointer ' : 'mk-card ' |
| | | let className = 'mk-card ' |
| | | if (config.wrap.parity === 'true') { |
| | | if (index % 2 === 1) { |
| | | className += 'mk-parity-bg ' |
| | |
| | | } |
| | | |
| | | return ( |
| | | <Col className={className} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}> |
| | | <CardItem card={card} cards={config} data={item}> |
| | | <Col className={className} key={index} span={card.setting.width}> |
| | | <CardItem card={card} cards={config} data={item} onClick={() => {this.changeCard(index, item)}}> |
| | | <span className="circle-select"></span> |
| | | </CardItem> |
| | | </Col> |
| | |
| | | } |
| | | .card-row-list { |
| | | flex: 10; |
| | | .mk-card.pointer { |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | .card-row-list.flex-layout { |
| | | display: flex; |
| | |
| | | background: var(--mk-sys-color); |
| | | } |
| | | .card-item-box { |
| | | width: 100%; |
| | | // width: 100%; |
| | | display: flex; |
| | | } |
| | | .card-cell-list { |
| | |
| | | <NormalHeader config={config}/> |
| | | <Row className={`card-row-list data-zoom ${config.wrap.wrapClass}`}> |
| | | {config.subcards.map((item, index) => { |
| | | let className = item.setting.click ? 'mk-card pointer ' : 'mk-card ' |
| | | let className = 'mk-card ' |
| | | if (activeKey === index) { |
| | | className += 'active' |
| | | } |
| | | |
| | | return ( |
| | | <Col className={className} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}> |
| | | <CardItem card={item} cards={config} data={data}/> |
| | | <Col className={className} key={index} span={item.setting.width || 6} offset={item.offset || 0}> |
| | | <CardItem card={item} cards={config} data={data} onClick={() => {this.changeCard(index, item)}}/> |
| | | </Col> |
| | | ) |
| | | })} |
| | |
| | | clear: both; |
| | | } |
| | | |
| | | .card-row-list { |
| | | .mk-card.pointer { |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | .card-row-list.flex-layout { |
| | | display: flex; |
| | | width: 100%; |
| | |
| | | _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3 |
| | | _setting.labelCol = {style: {width: _setting.labelwidth + '%'}} |
| | | _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}} |
| | | _setting.borderRadius = config.wrap.borderRadius |
| | | } |
| | | _setting.style = null |
| | | |
| | |
| | | }) |
| | | |
| | | if (setting.show || setting.showAdv) { |
| | | let style = {} |
| | | if (setting.borderRadius) { |
| | | style.borderRadius = setting.borderRadius |
| | | } |
| | | |
| | | fields.push( |
| | | <Col span={setting.ratio} style={{ whiteSpace: 'nowrap' }} className="mk-search-col search-button" key="actions"> |
| | | <Form.Item |
| | |
| | | labelCol={setting.labelCol} |
| | | wrapperCol={setting.wrapperCol} |
| | | > |
| | | {setting.show ? <Button type="primary" onClick={this.handleSubmit}> |
| | | {setting.show ? <Button style={style} type="primary" onClick={this.handleSubmit}> |
| | | 搜索 |
| | | </Button> : null} |
| | | {setting.show ? <Button style={{ marginLeft: 8 }} onClick={this.handleReset}> |
| | | {setting.show ? <Button style={{ marginLeft: 8, ...style }} onClick={this.handleReset}> |
| | | 重置 |
| | | </Button> : null} |
| | | {setting.showAdv ? <Button className={visible ? 'visible' : ''} type="link" onClick={this.handleAdvance}> |
| | |
| | | let radio = setting.searchRatio || 6 |
| | | let labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3 |
| | | let advanceType = setting.advanceType || 'modal' |
| | | let style = {} |
| | | if (setting.borderRadius) { |
| | | style.borderRadius = setting.borderRadius |
| | | } |
| | | |
| | | return ( |
| | | <div ref={drop} className="ant-row"> |
| | |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="ant-col ant-form-item-control-wrapper"> |
| | | <Button type="primary">搜索</Button> |
| | | <Button style={{ marginLeft: 8 }}>重置</Button> |
| | | <Button style={style} type="primary">搜索</Button> |
| | | <Button style={{ marginLeft: 8, ...style }}>重置</Button> |
| | | <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div> |
| | | </div> |
| | | </Popover> |
| | |
| | | })(<InputNumber min={0} max={100} precision={1} onPressEnter={this.props.inputSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="搜索和重置按钮的圆角。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 按钮圆角 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('borderRadius', { |
| | | initialValue: setting.borderRadius || '', |
| | | })(<InputNumber min={0} precision={0} onPressEnter={this.props.inputSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | | </Form> |
| | | ) |