king
2022-07-20 ed7d889f7d9dfca77fd7f055ad8d6ec6ad85ae91
src/menu/components/search/main-search/dragsearch/index.jsx
@@ -7,7 +7,7 @@
import Card from './card'
import './index.scss'
const Container = ({list, showField, handleList, handleMenu, deleteMenu }) => {
const Container = ({list, setting, handleList, handleMenu, deleteMenu }) => {
  const [cards, setCards] = useState(list)
  const moveCard = (id, atIndex) => {
    const { card, index } = findCard(id)
@@ -84,42 +84,36 @@
    drop() {}
  })
  const appType = sessionStorage.getItem('appType')
  let labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3
  let advanceType = setting.advanceType || 'modal'
  return (
    <div ref={drop} className="ant-row">
      {cards.length > 0 ? <Col key="preaction" className="action pre-action" span={6}>
      {cards.map(card => {
        let _ratio = card.ratio || 6
        if (card.advanced === 'true' && advanceType !== 'pulldown') {
          _ratio = 6
        }
        return (
          <Col className="mk-search-item-wrap" key={card.uuid} span={_ratio}>
            <Card
              id={`${card.uuid}`}
              card={card}
              moveCard={moveCard}
              copyCard={copyCard}
              editCard={editCard}
              delCard={delCard}
              findCard={findCard}
            />
          </Col>
        )
      })}
      {cards.length > 0 ? <Col key="nextaction" className={'mk-search-item-wrap action' + (setting.show === 'false' ? ' hide-button' : '')} span={setting.searchRatio || 6}>
        <div className="ant-row ant-form-item" style={{lineHeight: '40px', height: '55px', marginBottom: 0}}>
          <div className="ant-col ant-form-item-label ant-col-xs-24 ant-col-sm-8">
          </div>
          <div className="ant-col ant-form-item-control-wrapper ant-col-xs-24 ant-col-sm-16" style={{whiteSpace: 'nowrap'}}>
        <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>
            {appType !== 'mob' ? <Button style={{ marginLeft: 8 }}>重置</Button> : null}
            <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div>
          </div>
        </div>
      </Col> : null}
      {cards.map(card => (
        <Col key={card.uuid} span={card.ratio || 6}>
          <Card
            id={`${card.uuid}`}
            card={card}
            showField={showField}
            moveCard={moveCard}
            copyCard={copyCard}
            editCard={editCard}
            delCard={delCard}
            findCard={findCard}
          />
        </Col>
      ))}
      {cards.length > 0 ? <Col key="nextaction" className="action next-action" span={6}>
        <div className="ant-row ant-form-item" style={{lineHeight: '40px', height: '55px', marginBottom: 0}}>
          <div className="ant-col ant-form-item-label ant-col-xs-24 ant-col-sm-8">
          </div>
          <div className="ant-col ant-form-item-control-wrapper ant-col-xs-24 ant-col-sm-16" style={{whiteSpace: 'nowrap'}}>
            <Button type="primary">搜索</Button>
            {appType !== 'mob' ? <Button style={{ marginLeft: 8 }}>重置</Button> : null}
            <Button style={{ marginLeft: 8 }}>重置</Button>
            <div style={{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0}}></div>
          </div>
        </div>