| | |
| | | import ItemTypes from './itemtypes' |
| | | import './index.scss' |
| | | |
| | | const Container = ({list, type, placeholder, handleList, handleMenu }) => { |
| | | const Container = ({list, setting, type, placeholder, handleList, handleMenu }) => { |
| | | let target = null |
| | | const [cards, setCards] = useState(list) |
| | | const moveCard = (id, atIndex) => { |
| | |
| | | |
| | | let newcard = {} |
| | | if (item.type === 'search') { |
| | | let _match = 'like' |
| | | if (item.subType === 'select' || item.subType === 'link') { |
| | | _match = '=' |
| | | } else if (item.subType === 'date' || item.subType === 'datemonth') { |
| | | _match = '>=' |
| | | } else if (item.subType === 'dateweek' || item.subType === 'daterange') { |
| | | _match = 'between' |
| | | } |
| | | newcard.uuid = Utils.getuuid() |
| | | newcard.label = 'fieldName' |
| | | newcard.field = '' |
| | |
| | | newcard.valueText = '' |
| | | newcard.orderBy = '' |
| | | newcard.orderType = 'asc' |
| | | newcard.match = _match |
| | | newcard.display = 'dropdown' |
| | | } else if (item.type === 'action') { |
| | | newcard.uuid = Utils.getuuid() |
| | |
| | | newcard.class = 'default' |
| | | newcard.intertype = 'inner' |
| | | newcard.interface = '' |
| | | newcard.position = 'toolbar' |
| | | newcard.execSuccess = 'grid' |
| | | newcard.execError = 'never' |
| | | newcard.callbackFunc = '' |
| | | newcard.pageTemplate = '' |
| | | } else if (item.type === 'columns') { |
| | |
| | | {type === 'columns' && cards.length > 0 && |
| | | columns.map((column, i) => ( |
| | | <div key={i} className="column-box"> |
| | | {i === 0 && |
| | | {/* 多选 */} |
| | | {i === 0 && setting.tableType === 'checkbox' ? |
| | | <div className="page-card" style={{flex: 60}}> |
| | | <span className="ant-checkbox-inner"></span> |
| | | </div> |
| | | </div> : null |
| | | } |
| | | {/* 单选 */} |
| | | {i === 0 && setting.tableType === 'radio' ? |
| | | <div className="page-card" style={{flex: 60}}></div> : null |
| | | } |
| | | {column.map(card => ( |
| | | <Card |