king
2022-09-15 20fda7434c88eae3237399a008f6ae0db50d0eab
2022-09-15
43个文件已修改
4个文件已添加
1011 ■■■■ 已修改文件
src/menu/components/card/balcony/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/action.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/card.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.jsx 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-scatter/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/dragsearch/card.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/dragsearch/index.jsx 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/dragaction/index.jsx 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/searchcomponent/dragsearch/card.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/searchcomponent/dragsearch/index.jsx 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/columns/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.jsx 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulecell/dragsource/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulecell/dragsource/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulecell/index.jsx 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modulecell/index.scss 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecombcontrolbutton/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/formdragelement/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/popdesign/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.jsx
@@ -209,7 +209,7 @@
    newcard.height = 1
    // 注册事件-添加元素
    MKEmitter.emit('cardAddElement', [card.uuid, card.uuid], newcard)
    MKEmitter.emit('cardAddElement', card.uuid, newcard)
  }
  addButton = () => {
@@ -220,7 +220,7 @@
    newcard.focus = true
    // 注册事件-添加元素
    MKEmitter.emit('cardAddElement', [card.uuid, card.uuid], newcard)
    MKEmitter.emit('cardAddElement', card.uuid, newcard)
  }
  pasteComponent = (res, resolve) => {
@@ -233,10 +233,10 @@
    res.focus = true
    if (type === 'customCardElement') {
      MKEmitter.emit('cardAddElement', [card.uuid, card.uuid], res)
      MKEmitter.emit('cardAddElement', card.uuid, res)
    } else {
      res.eleType = 'button'
      MKEmitter.emit('cardAddElement', [card.uuid, card.uuid], res)
      MKEmitter.emit('cardAddElement', card.uuid, res)
    }
    resolve({status: true})
  }
src/menu/components/card/cardcellcomponent/dragaction/action.jsx
@@ -18,7 +18,13 @@
  const [, drop] = useDrop({
    accept: 'action',
    canDrop: () => true,
    drop({ id: draggedId }) {
    drop(item) {
      const { id: draggedId } = item
      if (item.$init) {
        item.overIndex = id
      }
      if (!draggedId || draggedId === id) return
      const { index: originIndex } = findCard(draggedId)
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -40,7 +40,13 @@
  const [, drop] = useDrop({
    accept: 'action',
    canDrop: () => true,
    drop({ id: draggedId }) {
    drop(item) {
      const { id: draggedId } = item
      if (item.$init) {
        item.overIndex = id
      }
      if (!draggedId || draggedId === id) return
      const { index: originIndex } = findCard(draggedId)
@@ -71,7 +77,7 @@
  const getContent = () => {
    if (card.eleType === 'sequence') {
      return (
        <div className={'ant-mk-text'}>1</div>
        <div style={{height: card.innerHeight || 'auto'}} className="ant-mk-text">1</div>
      )
    } else if (card.eleType === 'text' || card.eleType === 'number') {
      let val = `${card.prefix || ''}${card.datatype === 'static' ? (card.value || '') : (card.field || '')}${card.postfix || ''}`
@@ -83,18 +89,7 @@
        <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div>
      )
    } else if (card.eleType === 'icon') {
      let fontSize = 14
      let lineHeight = 1.5
      if (card.style.fontSize) {
        fontSize = parseInt(card.style.fontSize)
      }
      if (card.style.lineHeight) {
        lineHeight = parseFloat(card.style.lineHeight)
      }
      let innerHeight = fontSize * lineHeight
      return (<MkIcon style={{height: innerHeight}} className="ant-mk-icon" type={card.icon}/>)
      return (<MkIcon style={{height: card.innerHeight || 'auto'}} className="ant-mk-icon" type={card.icon}/>)
    } else if (card.eleType === 'slider') {
      let val = card.value ? (card.value / card.maxValue) * 100 : 30
      return <MkProgress value={val} config={card}/>
@@ -165,7 +160,7 @@
        val = <><span style={_s}>{card.prefix || ''}</span>{moment().format(card.dateFormat)}<span style={_s}>{card.postfix || ''}</span></>
      }
      return (
        <div className="ant-mk-date">
        <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}>
          {val}
        </div>
      )
@@ -176,7 +171,7 @@
        val = <><span style={_s}>{card.prefix || ''}</span>{card.formula}<span style={_s}>{card.postfix || ''}</span></>
      }
      return (
        <div className="ant-mk-date">
        <div className="ant-mk-text" style={{height: card.innerHeight || 'auto'}}>
          {val}
        </div>
      )
@@ -191,8 +186,7 @@
  }
  let able = true
  if ((appType === 'mob' || appType === 'pc') && parent && (parent.setting.click === 'menu' || parent.setting.click === 'menus')) {
  // if ((appType === 'mob' || appType === 'pc') && parent && parent.setting.click === 'menu') {
  if ((appType === 'mob' || appType === 'pc') && (parent.setting.click === 'menu' || parent.setting.click === 'menus')) {
    able = false
  }
src/menu/components/card/cardcellcomponent/dragaction/index.jsx
@@ -112,6 +112,58 @@
  const [, drop] = useDrop({
    accept: 'action',
    drop(item) {
      if (item.$init) { // 拖拽添加
        let newcard = {}
        newcard.uuid = Utils.getuuid()
        newcard.focus = true
        // 显示列过滤
        if (parent.type === 'custom' && item.class !== 'element') {
          delete item.overIndex
          return
        } else if (parent.type === 'action' && item.class === 'element') {
          delete item.overIndex
          return
        }
        if (item.class === 'element') {
          newcard.eleType = item.value
          newcard.datatype = 'dynamic'
          newcard.height = 1
        } else {
          newcard.eleType = 'button'
          newcard.label = 'button'
          newcard.verify = null
          newcard.show = 'link'
          newcard.Ot = 'requiredSgl'
          newcard.OpenType = item.value
          newcard.class = 'primary'
          if (newcard.OpenType === 'excelIn') {
            newcard.label = item.text
            newcard.class = 'dgreen'
            newcard.Ot = 'notRequired'
          } else if (item.subType === 'excelOut') {
            newcard.label = item.text
            newcard.execSuccess = 'never'
            newcard.class = 'dgreen'
          }
        }
        if (item.overIndex) {
          const { index } = findCard(item.overIndex)
          const _cards = update(cards, { $splice: [[index + 1, 0, newcard]] })
          handleList(_cards)
        } else {
          handleList([...cards, newcard])
        }
        handleMenu(newcard)
        delete item.overIndex
        return
      }
      const { index } = findCard(item.id)
      if (index > -1) return
      dropButton(item.id)
@@ -127,7 +179,6 @@
              id={card.uuid}
              key={card.uuid}
              card={card}
              parent={parent}
              copyCard={copyCard}
              moveCard={moveCard}
              editCard={editCard}
src/menu/components/card/cardcellcomponent/dragaction/index.scss
@@ -93,14 +93,6 @@
    border-left: 0;
    border-right: 0;
  }
  .ant-mk-date {
    white-space: nowrap;
    overflow: hidden;
    word-break: break-word;
    text-overflow: ellipsis;
    font-weight: inherit;
    font-style: inherit;
  }
  .ant-mk-check {
    white-space: nowrap;
    overflow: hidden;
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -25,6 +25,8 @@
  if (type === 'table' || (type === 'card' && subtype === 'datacard')) {
    _options.push({value: 'sequence', text: '序号'})
  } else if (card.eleType === 'sequence') { // 拖拽添加类型转换
    card.eleType = 'text'
  }
  let appMenus = []
src/menu/components/card/cardcellcomponent/index.jsx
@@ -68,19 +68,16 @@
  componentDidMount () {
    MKEmitter.addListener('submitModal', this.handleSave)
    MKEmitter.addListener('cardAddElement', this.cardAddElement)
    MKEmitter.addListener('cardDelElement', this.cardDelElement)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props.cards), fromJS(nextProps.cards)) || !is(fromJS(this.state), fromJS(nextState))
    return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props.cards), fromJS(nextProps.cards))
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.props.side !== nextProps.side) {
      this.setState({
        elements: fromJS(nextProps.elements).toJS()
      })
    } else if (!is(fromJS(this.props.elements), fromJS(nextProps.elements)) && nextProps.elements.length !== this.state.elements.length) {
      this.setState({
        elements: fromJS(nextProps.elements).toJS()
      })
@@ -96,13 +93,14 @@
    }
    MKEmitter.removeListener('submitModal', this.handleSave)
    MKEmitter.removeListener('cardAddElement', this.cardAddElement)
    MKEmitter.removeListener('cardDelElement', this.cardDelElement)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
  updateComponentStyle = (parentId, keys, style) => {
    const { cardCell } = this.props
    if (!cardCell || cardCell.uuid !== parentId) return
    if (cardCell.uuid !== parentId) return
    const { elements } = this.state
@@ -120,10 +118,18 @@
    })
  }
  cardAddElement = (ids, element) => {
    const { cards, cardCell } = this.props
  cardDelElement = (id, eleId) => {
    const { cardCell } = this.props
    if (!ids || ids.length !== 2 || ids[0] !== cards.uuid || ids[1] !== cardCell.uuid) return
    if (id !== cardCell.uuid) return
    this.setState({elements: this.state.elements.filter(item => item.uuid !== eleId)})
  }
  cardAddElement = (id, element) => {
    const { cardCell } = this.props
    if (id !== cardCell.uuid) return
    if (window.GLOB.$lock) return
    window.GLOB.$lock = true
@@ -193,35 +199,30 @@
  resetCardStyle = (card, style) => {
    let _card = fromJS(card).toJS()
    if (['text', 'number', 'formula'].includes(_card.eleType)) {
      _card.style = style
      let fontSize = 14
      let lineHeight = 1.5
    if (['text', 'number', 'formula', 'currentDate', 'sequence', 'icon'].includes(_card.eleType)) {
      _card.style = style
      let line = _card.height || null
      if (_card.style.fontSize) {
        fontSize = parseInt(_card.style.fontSize)
      }
      if (_card.style.lineHeight) {
        lineHeight = parseFloat(_card.style.lineHeight)
      if (['currentDate', 'sequence', 'icon'].includes(_card.eleType)) {
        line = 1
      }
      if (line) {
        let fontSize = 14
        let lineHeight = 1.5
        if (_card.style.fontSize) {
          fontSize = parseInt(_card.style.fontSize)
        }
        if (_card.style.lineHeight) {
          lineHeight = parseFloat(_card.style.lineHeight)
        }
        _card.innerHeight = fontSize * lineHeight * line
      } else {
        _card.innerHeight = 'auto'
      }
    } else if (_card.eleType === 'sequence') {
      _card.style = style
      let fontSize = 14
      let lineHeight = 1.5
      if (_card.style.fontSize) {
        fontSize = parseInt(_card.style.fontSize)
      }
      _card.innerHeight = fontSize * lineHeight
    } else if (_card.eleType === 'barcode') {
      _card.style = style
@@ -323,7 +324,7 @@
    this.setState({
      actvisible: true,
      card: card,
      formlist: getActionForm(card, functip, cards, usefulFields, 'card', menulist, modules, anchors)
      formlist: getActionForm(card, functip, cards, usefulFields, menulist, modules, anchors)
    })
  }
@@ -364,23 +365,30 @@
      let _elements = elements.map(cell => {
        if (cell.uuid === res.uuid) {
          res.style = cell.style || {}
          if (res.eleType === 'splitline' && cell.eleType !== 'splitline') {
          if (res.eleType === 'splitline' && (cell.eleType !== 'splitline' || cell.focus)) {
            res.style.paddingTop = '5px'
            res.style.paddingBottom = '5px'
          } else if (['text', 'number', 'formula'].includes(res.eleType)) {
            let fontSize = 14
            let lineHeight = 1.5
          } else if (['text', 'number', 'formula', 'currentDate', 'sequence', 'icon'].includes(res.eleType)) {
            let line = res.height || null
            if (res.style && res.style.fontSize) {
              fontSize = parseInt(res.style.fontSize)
            }
            if (res.style && res.style.lineHeight) {
              lineHeight = parseFloat(res.style.lineHeight)
            if (['currentDate', 'sequence', 'icon'].includes(res.eleType)) {
              line = 1
            }
            if (line) {
              let fontSize = 14
              let lineHeight = 1.5
              if (res.style && res.style.fontSize) {
                fontSize = parseInt(res.style.fontSize)
              }
              if (res.style && res.style.lineHeight) {
                lineHeight = parseFloat(res.style.lineHeight)
              }
              res.innerHeight = fontSize * lineHeight * line
            } else {
              res.innerHeight = 'auto'
            }
            if (res.eleType === 'text' && res.link && !res.style.color) {
@@ -605,9 +613,10 @@
  }
  dropButton = (id) => {
    const { cards } = this.props
    const { cards, cardCell } = this.props
    if (!cards.action) return
    if (cardCell.type === 'custom') return
    let index = cards.action.findIndex(item => item.uuid === id)
@@ -690,7 +699,7 @@
      <div className="model-menu-card-cell-list">
        <DragElement
          list={elements}
          parent={{...cardCell, components: elements}}
          parent={cardCell}
          fields={cards.columns}
          updateMarks={this.updateMarks}
          handleList={this.handleList}
src/menu/components/card/cardcomponent/index.jsx
@@ -119,7 +119,6 @@
  }
  
  addElement = () => {
    const { cards } = this.props
    const { card } = this.state
    let newcard = {}
@@ -131,11 +130,10 @@
    newcard.height = 1
    // 注册事件-添加元素
    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], newcard)
    MKEmitter.emit('cardAddElement', card.uuid, newcard)
  }
  addButton = () => {
    const { cards } = this.props
    const { card } = this.state
    let newcard = {eleType: 'button', label: 'button', verify: null, show: 'link', sqlType: '', Ot: 'requiredSgl', OpenType: 'prompt', icon: '', class: 'primary', intertype: 'system', execSuccess: 'grid', execError: 'never', popClose: 'never'}
@@ -143,7 +141,7 @@
    newcard.focus = true
    // 注册事件-添加元素
    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], newcard)
    MKEmitter.emit('cardAddElement', card.uuid, newcard)
  }
  changeStyle = () => {
@@ -235,7 +233,6 @@
  }
  paste = (element, resolve) => {
    const { cards } = this.props
    const { card } = this.state
    let _uuid = Utils.getuuid()
@@ -256,14 +253,7 @@
    resolve({status: true})
    // 注册事件-添加元素
    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], element)
  }
  clickComponent = (e) => {
    if ((sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'propcard') && this.props.cards.subtype === 'propcard') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card, this.props.cards, 'propcard')
    }
    MKEmitter.emit('cardAddElement', card.uuid, element)
  }
  doubleClickCard = () => {
@@ -329,7 +319,7 @@
    return (
      <Col span={card.setting.width || 6}>
        <div className={'card-item ' + (card.setting.btnControl || '')} style={_style} onClick={this.clickComponent} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}>
        <div className={'card-item ' + (card.setting.btnControl || '')} style={_style} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}>
          <CardCellComponent cards={cards} cardCell={card} side={side} elements={elements} updateElement={this.updateCard}/>
          <div className="card-control" onDoubleClick={(e) => e.stopPropagation()}>
            <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
src/menu/components/card/cardsimplecomponent/index.jsx
@@ -82,7 +82,6 @@
  }
  
  addElement = () => {
    const { cards } = this.props
    const { card } = this.state
    let newcard = {}
@@ -98,11 +97,10 @@
    window.GLOB.$lock = false
    // 注册事件-添加元素
    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], newcard)
    MKEmitter.emit('cardAddElement', card.uuid, newcard)
  }
  addButton = () => {
    const { cards } = this.props
    const { card } = this.state
    let newcard = {eleType: 'button', label: 'button', verify: null, show: 'link', sqlType: '', Ot: 'requiredSgl', OpenType: 'prompt', icon: '', class: 'primary', intertype: 'system', execSuccess: 'grid', execError: 'never', popClose: 'never'}
@@ -111,7 +109,7 @@
    
    // 注册事件-添加元素
    MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], newcard)
    MKEmitter.emit('cardAddElement', card.uuid, newcard)
  }
  changeStyle = () => {
src/menu/components/card/data-card/index.jsx
@@ -786,7 +786,7 @@
        } trigger="hover">
          <ToolOutlined />
        </Popover>
        <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <div className={'float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}>
          {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
        </div>
src/menu/components/card/table-card/index.jsx
@@ -596,7 +596,7 @@
        } trigger="hover">
          <ToolOutlined />
        </Popover>
        <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <div style={{minHeight: 'calc(100% - 90px)'}}>
          {card.subcards.map(subcard => (<CardSimpleComponent key={subcard.uuid} cards={card} card={subcard} updateElement={this.updateCard} move={this.move} deleteElement={this.deleteCard}/>))}
        </div>
src/menu/components/chart/antv-bar/index.jsx
@@ -1402,7 +1402,6 @@
        <NormalHeader config={card} updateComponent={this.updateComponent}/>
        <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
        {appType !== 'mob' ? <ActionComponent
          type="chart"
          config={card}
          updateaction={this.updateComponent}
        /> : null}
src/menu/components/chart/antv-scatter/index.jsx
@@ -419,7 +419,7 @@
        </Popover>
        <NormalHeader config={card} updateComponent={this.updateComponent}/>
        <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
        {appType !== 'mob' ? <ActionComponent type="chart" config={card} updateaction={this.updateComponent}/> : null}
        {appType !== 'mob' ? <ActionComponent config={card} updateaction={this.updateComponent}/> : null}
        <div className="component-name">
          <div className="center">
            <div className="title">{card.name}</div>
src/menu/components/search/main-search/dragsearch/card.jsx
@@ -23,13 +23,19 @@
  const [, drop] = useDrop({
    accept: 'search',
    canDrop: () => true,
    drop: ({ id: draggedId }) => {
      if (!draggedId || draggedId === id) return
      const { index: originIndex } = findCard(draggedId)
      if (originIndex === -1) return
    drop: (item) => {
      const { id: draggedId, originalIndex } = item
      if (originalIndex === undefined) {
        item.dropTargetId = id
      } else {
        if (!draggedId || draggedId === id) return
        const { index: originIndex } = findCard(draggedId)
        if (originIndex === -1) return
      const { index: overIndex } = findCard(id)
      moveCard(draggedId, overIndex)
        const { index: overIndex } = findCard(id)
        moveCard(draggedId, overIndex)
      }
    },
  })
  const opacity = isDragging ? 0.5 : 1
src/menu/components/search/main-search/dragsearch/index.jsx
@@ -81,7 +81,56 @@
  const [, drop] = useDrop({
    accept: 'search',
    drop() {}
    drop(item) {
      if (item.hasOwnProperty('originalIndex')) {
        return
      }
      let newcard = {}
      newcard.uuid = Utils.getuuid()
      newcard.focus = true
      newcard.label = 'label'
      newcard.initval = ''
      newcard.type = item.subType
      newcard.resourceType = '0'
      newcard.options = []
      newcard.orderType = 'asc'
      let _match = 'like'
      if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') {
        _match = '='
      } else if (item.subType === 'date' || item.subType === 'datemonth') {
        _match = '>='
      } else if (item.subType === 'dateweek' || item.subType === 'daterange') {
        _match = 'between'
      } else if (item.subType === 'group') {
        _match = 'between'
        newcard.items = ['day', 'week', 'month', 'quarter', 'year', 'customized']
      }
      newcard.match = _match
      let targetId = ''
      if (item.dropTargetId) {
        targetId = item.dropTargetId
        delete item.dropTargetId
      } else if (cards.length > 0) {
        targetId = cards[cards.length - 1].uuid
      }
      const { index: overIndex, card } = findCard(`${targetId}`)
      if (card) {
        newcard.ratio = card.ratio || 6
        newcard.labelwidth = card.labelwidth || 33.3
      }
      const _cards = update(cards, { $splice: [[overIndex + 1, 0, newcard]] })
      handleList(_cards, newcard)
    }
  })
  let labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3
src/menu/components/search/main-search/index.jsx
@@ -162,7 +162,7 @@
    let linkableFields = []
    card.search.forEach(item => {
      if (item.uuid === card.uuid) return
      if (item.uuid === cell.uuid) return
      if (!['select', 'link', 'checkcard'].includes(item.type)) return
      if (item.type === 'checkcard' && item.multiple === 'true') return
src/menu/components/share/actioncomponent/dragaction/index.jsx
@@ -104,6 +104,45 @@
  const [, drop] = useDrop({
    accept: 'action',
    drop(item) {
      if (item.$init) { // 拖拽添加
        let newcard = {}
        newcard.uuid = Utils.getuuid()
        newcard.focus = true
        if (item.class === 'element') {
          delete item.overIndex
          return
        } else {
          newcard.label = 'button'
          newcard.verify = null
          newcard.show = 'link'
          newcard.Ot = 'requiredSgl'
          newcard.OpenType = item.value
          newcard.class = 'primary'
          if (newcard.OpenType === 'excelIn') {
            newcard.label = item.text
            newcard.class = 'dgreen'
            newcard.Ot = 'notRequired'
          } else if (item.subType === 'excelOut') {
            newcard.label = item.text
            newcard.execSuccess = 'never'
            newcard.class = 'dgreen'
          }
        }
        if (item.overIndex) {
          const { index } = findCard(item.overIndex)
          const _cards = update(cards, { $splice: [[index + 1, 0, newcard]] })
          handleList(_cards, newcard)
        } else {
          handleList([...cards, newcard], newcard)
        }
        delete item.overIndex
        return
      }
      const { index } = findCard(item.id)
      if (index > -1) return
      dropButton(item.id)
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -12,7 +12,7 @@
 * @param {*} usefulFields   存储过程可用的开始字段
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = [], anchors = []) {
export function getActionForm (card, functip, config, usefulFields, menulist = [], modules = [], anchors = []) {
  let appType = sessionStorage.getItem('appType')
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let printTemps = sessionStorage.getItem('printTemps')
@@ -20,34 +20,44 @@
  let setting = config.setting || {}
  let columns = config.columns || []
  let appMenus = []
  let type = ''
  if (card.eleType === 'button') {
    type = 'card'
  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') {
    type = 'datacard'
  } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') {
    type = 'chart'
  }
  let opentypes = [
    {
      value: 'pop',
      text: Formdict['model.form.popform']
      text: '弹窗(表单)'
    }, {
      value: 'prompt',
      text: Formdict['model.form.prompt']
      text: '提示框'
    }, {
      value: 'exec',
      text: Formdict['model.form.exec']
      text: '直接执行'
    }, {
      value: 'excelIn',
      text: Formdict['model.form.excelIn']
      text: '导入Excel'
    }, {
      value: 'excelOut',
      text: Formdict['model.form.excelOut']
      text: '导出Excel'
    }, {
      value: 'popview',
      text: Formdict['model.form.popview']
      text: '弹窗(标签)'
    }, {
      value: 'tab',
      text: Formdict['model.form.tab']
      text: '标签页'
    }, {
      value: 'innerpage',
      text: Formdict['model.form.newpage']
      text: '新页面'
    }, {
      value: 'funcbutton',
      text: Formdict['model.form.funcbutton']
      text: '功能按钮'
    }
  ]
@@ -76,17 +86,6 @@
    return _list
  }
  // if (type === 'editable') {
  //   opentypes = [
  //     {
  //       value: 'excelIn',
  //       text: Formdict['model.form.excelIn']
  //     }, {
  //       value: 'excelOut',
  //       text: Formdict['model.form.excelOut']
  //     }
  //   ]
  // }
  let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components)))
  let pageTemps = [
@@ -152,6 +151,10 @@
  
  if (type === 'chart' && appType !== 'mob') {
    opentypes = opentypes.filter(item => item.value === 'excelIn' || item.value === 'excelOut')
    if (card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut') { // 拖拽添加类型转换
      card.OpenType = 'excelOut'
    }
  }
  let refresh = []
@@ -172,6 +175,8 @@
      value: 'form',
      text: '表单(开关或勾选框)'
    })
  } else if (card.OpenType === 'form') { // 拖拽添加类型转换
    card.OpenType = 'pop'
  }
  if (!card.control && card.controlField) {
@@ -309,7 +314,7 @@
    {
      type: 'text',
      key: 'sql',
      label: Formdict['model.form.tablename'],
      label: '表名',
      initVal: card.sql || setting.tableName || '',
      required: true
    },
src/menu/components/share/actioncomponent/index.jsx
@@ -25,7 +25,6 @@
class ActionComponent extends Component {
  static propTpyes = {
    type: PropTypes.string,          // 菜单类型,主表或子表
    config: PropTypes.object,        // 菜单配置信息
    setSubConfig: PropTypes.func,    // 设置子配置信息
    updateaction: PropTypes.func     // 菜单配置更新
@@ -199,7 +198,7 @@
    this.setState({
      visible: true,
      card: card,
      formlist: getActionForm(card, functip, config, usefulFields, this.props.type, menulist, modules, anchors)
      formlist: getActionForm(card, functip, config, usefulFields, menulist, modules, anchors)
    })
  }
@@ -246,9 +245,8 @@
        if (item.uuid === btn.uuid) {
          btn.style = item.style || {}
          if (btn.class !== item.class || btn.show !== item.show || !btn.style.color) {
            if (btn.show === 'link' || btn.show === 'icon') {
          if (btn.class !== item.class || btn.show !== item.show || !btn.style.color || item.focus) {
            if (btn.show === 'icon') {
              btn.style.color = color[btn.class]
              btn.style.backgroundColor = 'transparent'
            } else {
@@ -436,13 +434,15 @@
    let config = fromJS(this.props.config).toJS()
    let btn = null
    if (config.subtype === 'normaltable') {
    let _col = null
    if (config.subtype === 'normaltable' || config.subtype === 'editable') {
      config.cols.forEach(col => {
        if (col.type !== 'action') return
        col.elements = col.elements.filter(item => {
          if (item.uuid === id) {
            btn = item
            _col = col
          }
          return item.uuid !== id
        })
@@ -451,8 +451,9 @@
    if (!btn) return
    btn.Ot = 'requiredSgl'
    config.action.push(btn)
    MKEmitter.emit('cardDelElement', _col.uuid, btn.uuid)
    this.setState({
      actionlist: config.action
@@ -507,14 +508,14 @@
  }
  render() {
    const { config, type } = this.props
    const { config } = this.props
    const { actionlist, visible, appType, card, dict, profVisible, record } = this.state
    return (
      <div className={'model-menu-action-list length' + actionlist.length}>
        <DragElement
          list={actionlist}
          type={appType === 'mob' ? (type || '') : ''}
          type={appType === 'mob' ? config.subtype : ''}
          handleList={this.handleList}
          dropButton={this.dropButton}
          handleMenu={this.handleAction}
src/menu/components/share/searchcomponent/dragsearch/card.jsx
@@ -21,14 +21,20 @@
  const [, drop] = useDrop({
    accept: 'search',
    canDrop: () => true,
    drop: ({ id: draggedId }) => {
      if (!draggedId || draggedId === id) return
      const { index: originIndex } = findCard(draggedId)
      if (originIndex === -1) return
      const { index: overIndex } = findCard(id)
      moveCard(draggedId, overIndex)
    drop: (item) => {
      const { id: draggedId, originalIndex } = item
      if (originalIndex === undefined) {
        item.dropTargetId = id
      } else {
        if (!draggedId || draggedId === id) return
        const { index: originIndex } = findCard(draggedId)
        if (originIndex === -1) return
        const { index: overIndex } = findCard(id)
        moveCard(draggedId, overIndex)
      }
    }
  })
  const opacity = isDragging ? 0.5 : 1
src/menu/components/share/searchcomponent/dragsearch/index.jsx
@@ -81,7 +81,56 @@
  const [, drop] = useDrop({
    accept: 'search',
    drop() {}
    drop(item) {
      if (item.hasOwnProperty('originalIndex')) {
        return
      }
      let newcard = {}
      newcard.uuid = Utils.getuuid()
      newcard.focus = true
      newcard.label = 'label'
      newcard.initval = ''
      newcard.type = item.subType
      newcard.resourceType = '0'
      newcard.options = []
      newcard.orderType = 'asc'
      let _match = 'like'
      if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') {
        _match = '='
      } else if (item.subType === 'date' || item.subType === 'datemonth') {
        _match = '>='
      } else if (item.subType === 'dateweek' || item.subType === 'daterange') {
        _match = 'between'
      } else if (item.subType === 'group') {
        _match = 'between'
        newcard.items = ['day', 'week', 'month', 'quarter', 'year', 'customized']
      }
      newcard.match = _match
      let targetId = ''
      if (item.dropTargetId) {
        targetId = item.dropTargetId
        delete item.dropTargetId
      } else if (cards.length > 0) {
        targetId = cards[cards.length - 1].uuid
      }
      const { index: overIndex, card } = findCard(`${targetId}`)
      if (card) {
        newcard.ratio = card.ratio || 6
        newcard.labelwidth = card.labelwidth || 33.3
      }
      const _cards = update(cards, { $splice: [[overIndex + 1, 0, newcard]] })
      handleList(_cards, newcard)
    }
  })
  return (
src/menu/components/table/base-table/columns/index.jsx
@@ -313,11 +313,10 @@
    cell.uuid = Utils.getuuid()
    cell.focus = true
    
    MKEmitter.emit('cardAddElement', [this.props.config.uuid, col.uuid], cell)
    MKEmitter.emit('cardAddElement', col.uuid, cell)
  }
  addElement = (col) => {
    const { config } = this.props
    let column = fromJS(col).toJS()
    if (column.type === 'colspan') {
@@ -333,7 +332,7 @@
      let newcard = {uuid: Utils.getuuid(), focus: true, width: 24, eleType: 'text', datatype: 'dynamic', style: {paddingLeft: '4px'}}
  
      // 注册事件-添加元素
      MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard)
      MKEmitter.emit('cardAddElement', column.uuid, newcard)
    } else if (column.type === 'action') {
      let newcard = {
        uuid: Utils.getuuid(),
@@ -349,7 +348,7 @@
      }
      // 注册事件-添加元素
      MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard)
      MKEmitter.emit('cardAddElement', column.uuid, newcard)
    }
  }
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -25,13 +25,13 @@
  let options = [{
    value: 'text',
    text: Formdict['model.form.text']
    text: '文本'
  }, {
    value: 'number',
    text: Formdict['model.form.number']
    text: '数字'
  }, {
    value: 'textarea',
    text: Formdict['model.form.textarea']
    text: '多行文本'
  }, {
    value: 'custom',
    text: '自定义列'
src/menu/components/table/edit-table/columns/index.jsx
@@ -53,7 +53,7 @@
  }
  render() {
    const { connectDragSource, connectDropTarget, moveCol, addElement, updateCol, editColumn, pasteCell, changeStyle, deleteCol, index, column, align, fields, children, ...restProps } = this.props
    const { connectDragSource, connectDropTarget, moveCol, dropCol, addElement, updateCol, editColumn, pasteCell, changeStyle, deleteCol, index, column, align, fields, children, ...restProps } = this.props
    if (!column) return (
      <th {...restProps} index={index}>
@@ -93,10 +93,14 @@
const ColTarget = {
  drop(props, monitor) {
    const dragIndex = monitor.getItem().index
    const item = monitor.getItem()
    const dragIndex = item.index
    const hoverIndex = props.index
    if (dragIndex === undefined || hoverIndex === undefined || dragIndex === hoverIndex) {
    if (item.$init) {
      props.dropCol(item, hoverIndex)
      return
    } else if (dragIndex === undefined || hoverIndex === undefined || dragIndex === hoverIndex) {
      return
    }
@@ -259,6 +263,25 @@
    })
  }
  dropCol = (item, hoverIndex) => {
    let _columns = fromJS(this.state.columns).toJS()
    let type = item.subType
    if (item.subType === 'link' || item.subType === 'colspan' || item.subType === 'picture') {
      type = 'text'
    }
    let col = { focus: true, uuid: Utils.getuuid(), label: 'label', field: '', type: type, elements: [] }
    _columns.splice(hoverIndex, 0, col)
    this.setState({
      columns: _columns
    }, () => {
      this.editColumn(col)
    })
  }
  updateCol = (col, btn) => {
    let _columns = fromJS(this.state.columns).toJS()
    _columns = _columns.map(column => {
@@ -293,18 +316,17 @@
    cell.uuid = Utils.getuuid()
    cell.focus = true
    
    MKEmitter.emit('cardAddElement', [this.props.config.uuid, col.uuid], cell)
    MKEmitter.emit('cardAddElement', col.uuid, cell)
  }
  addElement = (col) => {
    const { config } = this.props
    let column = fromJS(col).toJS()
    if (column.type === 'custom') {
      let newcard = {uuid: Utils.getuuid(), focus: true, width: 24, eleType: 'text', datatype: 'dynamic', style: {paddingLeft: '4px'}}
  
      // 注册事件-添加元素
      MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard)
      MKEmitter.emit('cardAddElement', column.uuid, newcard)
    } else if (column.type === 'action') {
      let newcard = {
        uuid: Utils.getuuid(),
@@ -320,7 +342,7 @@
      }
      // 注册事件-添加元素
      MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard)
      MKEmitter.emit('cardAddElement', column.uuid, newcard)
    }
  }
@@ -563,6 +585,7 @@
          fields: fields,
          align: col.Align,
          moveCol: this.moveCol,
          dropCol: this.dropCol,
          updateCol: this.updateCol,
          addElement: this.addElement,
          editColumn: this.editColumn,
src/menu/components/table/edit-table/columns/index.scss
@@ -75,6 +75,12 @@
    }
  }
  .model-menu-card-cell-list {
    .card-detail-row {
      min-height: 21px;
    }
  }
  .ant-table-thead {
    th {
      position: relative;
src/menu/components/table/edit-table/index.jsx
@@ -423,7 +423,7 @@
          <ToolOutlined />
        </Popover>
        <SearchComponent config={card} updatesearch={this.updateComponent}/>
        <ActionComponent type="editable" config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <ColumnComponent config={card} updatecolumn={this.updateComponent}/>
        <div className="component-name">
          <div className="center">
src/menu/components/table/edit-table/index.scss
@@ -39,7 +39,15 @@
      bottom: 0;
    }
    >.ant-row {
      display: none;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      min-height: 10px;
      .common-drawarea-placeholder {
        display: none;
      }
    }
    >.ant-switch {
      display: none;
src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx
@@ -40,19 +40,19 @@
  let options = [{
    value: 'text',
    text: Formdict['model.form.text']
    text: '文本'
  }, {
    value: 'number',
    text: Formdict['model.form.number']
    text: '数字'
  }, {
    value: 'picture',
    text: Formdict['model.form.picture']
    text: '图片'
  }, {
    value: 'link',
    text: Formdict['model.form.href']
    text: '链接'
  }, {
    value: 'textarea',
    text: Formdict['model.form.textarea']
    text: '多行文本'
  }, {
    value: 'custom',
    text: '自定义列'
src/menu/components/table/normal-table/columns/index.jsx
@@ -53,7 +53,7 @@
  }
  render() {
    const { connectDragSource, connectDropTarget, moveCol, addElement, updateCol, editColumn, pasteCell, changeStyle, deleteCol, index, column, align, fields, children, ...restProps } = this.props
    const { connectDragSource, connectDropTarget, moveCol, dropCol, addElement, updateCol, editColumn, pasteCell, changeStyle, deleteCol, index, column, align, fields, children, ...restProps } = this.props
    if (index !== undefined) {
      return connectDragSource(
@@ -109,10 +109,14 @@
const ColTarget = {
  drop(props, monitor) {
    const dragIndex = monitor.getItem().index
    const item = monitor.getItem()
    const dragIndex = item.index
    const hoverIndex = props.index
    if (dragIndex === undefined || hoverIndex === undefined || dragIndex === hoverIndex) {
    if (item.$init) {
      props.dropCol(item, hoverIndex)
      return
    } else if (dragIndex === undefined || hoverIndex === undefined || dragIndex === hoverIndex) {
      return
    }
@@ -274,6 +278,20 @@
    })
  }
  dropCol = (item, hoverIndex) => {
    let _columns = fromJS(this.state.columns).toJS()
    let col = { focus: true, uuid: Utils.getuuid(), label: 'label', field: '', type: item.subType, elements: [] }
    _columns.splice(hoverIndex, 0, col)
    this.setState({
      columns: _columns
    }, () => {
      this.editColumn(col)
    })
  }
  loopCol = (columns, col) => {
    return columns.map(column => {
      if (column.type === 'colspan') {
@@ -315,11 +333,10 @@
    cell.uuid = Utils.getuuid()
    cell.focus = true
    
    MKEmitter.emit('cardAddElement', [this.props.config.uuid, col.uuid], cell)
    MKEmitter.emit('cardAddElement', col.uuid, cell)
  }
  addElement = (col) => {
    const { config } = this.props
    let column = fromJS(col).toJS()
    if (column.type === 'colspan') {
@@ -335,7 +352,7 @@
      let newcard = {uuid: Utils.getuuid(), focus: true, width: 24, eleType: 'text', datatype: 'dynamic', style: {paddingLeft: '4px'}}
  
      // 注册事件-添加元素
      MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard)
      MKEmitter.emit('cardAddElement', column.uuid, newcard)
    } else if (column.type === 'action') {
      let newcard = {
        uuid: Utils.getuuid(),
@@ -351,7 +368,7 @@
      }
      // 注册事件-添加元素
      MKEmitter.emit('cardAddElement', [config.uuid, column.uuid], newcard)
      MKEmitter.emit('cardAddElement', column.uuid, newcard)
    }
  }
@@ -492,6 +509,7 @@
          fields: fields,
          align: col.Align,
          moveCol: this.moveCol,
          dropCol: this.dropCol,
          updateCol: this.updateCol,
          addElement: this.addElement,
          editColumn: this.editColumn,
src/menu/components/table/normal-table/columns/index.scss
@@ -65,6 +65,11 @@
      background: #ffffff!important;
    }
  }
  .model-menu-card-cell-list {
    .card-detail-row {
      min-height: 21px;
    }
  }
  .ant-table-thead {
    th {
src/menu/components/table/normal-table/index.scss
@@ -39,7 +39,15 @@
      bottom: 0;
    }
    >.ant-row {
      display: none;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      min-height: 10px;
      .common-drawarea-placeholder {
        display: none;
      }
    }
    >.ant-switch {
      display: none;
src/menu/modulecell/dragsource/index.jsx
New file
@@ -0,0 +1,14 @@
import React from 'react'
import { useDrag } from 'react-dnd'
// import './index.scss'
const SourceCell = ({item}) => {
  const [, drag] = useDrag({ item })
  return (
    <div className="element-source-item">
      <div ref={drag} className="property"><span>{item.text}</span></div>
    </div>
  )
}
export default SourceCell
src/menu/modulecell/dragsource/index.scss
src/menu/modulecell/index.jsx
New file
@@ -0,0 +1,152 @@
import React, {Component} from 'react'
import { is, fromJS } from 'immutable'
import SourceWrap from './dragsource'
import './index.scss'
class ElementSource extends Component {
  state = {
    options: [
      {
        title: '卡片元素',
        span: 8,
        children: [
          { value: 'text', text: '文本', type: 'action', class: 'element', $init: true},
          { value: 'number', text: '数值', type: 'action', class: 'element', $init: true},
          { value: 'picture', text: '图片', type: 'action', class: 'element', $init: true},
          { value: 'video', text: '视频', type: 'action', class: 'element', $init: true},
          { value: 'icon', text: '图标', type: 'action', class: 'element', $init: true},
          { value: 'slider', text: '进度条', type: 'action', class: 'element', $init: true},
          { value: 'splitline', text: '分割线', type: 'action', class: 'element', $init: true},
          { value: 'barcode', text: '条形码', type: 'action', class: 'element', $init: true},
          { value: 'qrcode', text: '二维码', type: 'action', class: 'element', $init: true},
          { value: 'currentDate', text: '当前时间', type: 'action', class: 'element', $init: true},
          { value: 'formula', text: '公式', type: 'action', class: 'element', $init: true},
          { value: 'sequence', text: '序号', type: 'action', class: 'element', $init: true }
        ]
      },
      {
        title: '按钮元素',
        span: 12,
        children: [
          { value: 'pop', text: '弹窗(表单)', type: 'action', class: 'button', $init: true },
          { value: 'prompt', text: '提示框', type: 'action', class: 'button', $init: true },
          { value: 'exec', text: '直接执行', type: 'action', class: 'button', $init: true },
          { value: 'excelIn', text: '导入Excel', type: 'action', class: 'button', $init: true },
          { value: 'excelOut', text: '导出Excel', type: 'action', class: 'button', $init: true },
          { value: 'popview', text: '弹窗(标签)', type: 'action', class: 'button', $init: true },
          { value: 'tab', text: '标签页', type: 'action', class: 'button', $init: true },
          { value: 'innerpage', text: '新页面', type: 'action', class: 'button', $init: true },
          { value: 'funcbutton', text: '功能按钮', type: 'action', class: 'button', $init: true },
          { value: 'form', text: '表单(开关)', type: 'action', class: 'button', $init: true }
        ]
      },
      {
        title: '表单元素',
        span: 12,
        children: [
          { subType: 'text', text: '文本', type: 'form' },
          { subType: 'number', text: '数字', type: 'form' },
          { subType: 'select', text: '下拉选择', type: 'form' },
          { subType: 'textarea', text: '多行文本', type: 'form' },
          { subType: 'multiselect', text: '下拉多选', type: 'form' },
          { subType: 'link', text: '联动菜单', type: 'form' },
          { subType: 'switch', text: '开关', type: 'form' },
          { subType: 'checkbox', text: '多选框', type: 'form' },
          { subType: 'radio', text: '单选框', type: 'form' },
          { subType: 'checkcard', text: '选项卡', type: 'form' },
          { subType: 'fileupload', text: '文件上传', type: 'form' },
          { subType: 'date', text: '日期(天)', type: 'form' },
          { subType: 'datemonth', text: '日期(月)', type: 'form' },
          { subType: 'cascader', text: '级联菜单', type: 'form' },
          { subType: 'rate', text: '评分', type: 'form' },
          { subType: 'color', text: '颜色', type: 'form' },
          { subType: 'brafteditor', text: '富文本', type: 'form' },
          { subType: 'funcvar', text: '函数变量', type: 'form' },
          { subType: 'hint', text: '提示', type: 'form' },
          { subType: 'split', text: '分隔线', type: 'form' },
          { subType: 'linkMain', text: '关联主表', type: 'form' },
          { subType: 'formula', text: '公式', type: 'form' }
        ]
      },
      {
        title: '搜索元素',
        span: 12,
        children: [
          { subType: 'text', text: '文本', type: 'search' },
          { subType: 'select', text: '下拉选择', type: 'search' },
          { subType: 'multiselect', text: '下拉多选', type: 'search' },
          { subType: 'link', text: '联动菜单', type: 'search' },
          { subType: 'checkcard', text: '选项卡', type: 'search' },
          { subType: 'date', text: '日期(天)', type: 'search' },
          { subType: 'dateweek', text: '日期(周)', type: 'search' },
          { subType: 'datemonth', text: '日期(月)', type: 'search' },
          { subType: 'daterange', text: '日期(区间)', type: 'search' },
          { subType: 'group', text: '日期(组合)', type: 'search' }
        ]
      },
      {
        title: '显示列元素',
        span: 12,
        children: [
          { subType: 'text', text: '文本', type: 'col', $init: true },
          { subType: 'number', text: '数字', type: 'col', $init: true },
          { subType: 'picture', text: '图片', type: 'col', $init: true },
          { subType: 'link', text: '链接', type: 'col', $init: true },
          { subType: 'textarea', text: '多行文本', type: 'col', $init: true },
          { subType: 'custom', text: '自定义列', type: 'col', $init: true },
          { subType: 'colspan', text: '合并列', type: 'col', $init: true },
          { subType: 'formula', text: '公式', type: 'col', $init: true },
          { subType: 'index', text: '序号', type: 'col', $init: true },
          { subType: 'action', text: '操作', type: 'col', $init: true }
        ]
      }
    ]
  }
  UNSAFE_componentWillMount() {
    let appType = sessionStorage.getItem('appType')
    let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
    let options = fromJS(this.state.options).toJS()
    if (appType === 'mob') {
      options[1].children = options[1].children.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
      options[2].children = options[2].children.filter(item => {
        if (item.subType === 'select') {
          item.text = '选择器'
        }
        return item.subType !== 'brafteditor' && item.subType !== 'multiselect'
      })
      options = options.filter(option => option.title !== '搜索元素')
    } else if (appType === 'pc') {
      options[1].children = options[1].children.filter(item => item.value !== 'tab')
    }
    if (viewType === 'popview') { // 弹窗标签
      options[1].children = options[1].children.filter(item => item.value !== 'popview' && item.value !== 'funcbutton')
    }
    this.setState({options})
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  render() {
    const { options } = this.state
    return (
      <div className="mk-source-box">
        <div className="tip">注:当拖动类型不受支持时会被重置。</div>
        {options.map((item, index) => (<div className="mk-class" span={item.span} key={index}>
          <div className="title">{item.title}</div>
          {item.children.map(cell => <SourceWrap key={cell.value || cell.subType} item={cell}/>)}
        </div>))}
      </div>
    )
  }
}
export default ElementSource
src/menu/modulecell/index.scss
New file
@@ -0,0 +1,42 @@
.mk-source-box {
  .tip {
    height: 10px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
  }
  .mk-class {
    margin-left: -5px;
    margin-right: -5px;
    padding-top: 10px;
    .title {
      color: #1890ff;
      font-size: 15px;
      padding: 5px 0px;
      border-bottom: 1px solid #e9e9e9;
      margin-bottom: 10px;
    }
    .element-source-item {
      display: inline-block;
      .property {
        padding: 3px;
        margin: 5px;
        border: 1px solid #d9d9d9;
        border-radius: 5px;
        text-align: center;
        cursor: move;
        white-space: nowrap;
      }
    }
  }
  .mk-class[span="8"] {
    .element-source-item {
      width: 33.33%;
    }
  }
  .mk-class[span="12"] {
    .element-source-item {
      width: 50%;
    }
  }
}
src/menu/stylecombcontrolbutton/index.jsx
@@ -58,10 +58,7 @@
    if (!parent) {
      let _parent = null
      if (_type === 'propcard') {
        _parent = _p
        MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background', 'shadow'])
      } else if (_type === 'cardcell') {
      if (_type === 'cardcell') {
        _parent = _p
        MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background', 'font'])
      } else {
@@ -105,10 +102,7 @@
      if (components.findIndex(cell => cell.uuid === card.uuid) > -1) {
        components = components.filter(cell => cell.uuid !== card.uuid)
        document.getElementById(card.uuid).classList.remove('selected-control-element')
      } else if (type !== 'propcard' && parent.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
        components.push(card)
        document.getElementById(card.uuid).classList.add('selected-control-element')
      } else if (type === 'propcard' && parent.subcards.findIndex(cell => cell.uuid === card.uuid) > -1) {
      } else if (type === 'cardcell' && parent.elements.findIndex(cell => cell.uuid === card.uuid) > -1) {
        components.push(card)
        document.getElementById(card.uuid).classList.add('selected-control-element')
      }
src/mob/components/formdragelement/index.jsx
@@ -99,6 +99,7 @@
      newcard.options = []
      newcard.readonly = 'false'
      newcard.required = 'true'
      newcard.span = 24
      newcard.focus = true
      let targetId = ''
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -243,7 +243,7 @@
        contents.push(
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              <div className="ant-mk-text"><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div>
              <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}><span className="sequence-wrap" style={_style}>{data.$Index || ''}</span></div>
            </div>
          </Col>
        )
@@ -454,6 +454,21 @@
        )
      } else if (card.eleType === 'icon') {
        let val = ''
        let height = card.innerHeight
        if (!height) { // 兼容
          let fontSize = 14
          let lineHeight = 1.5
          if (card.style.fontSize) {
            fontSize = parseInt(card.style.fontSize)
          }
          if (card.style.lineHeight) {
            lineHeight = parseFloat(card.style.lineHeight)
          }
          height = fontSize * lineHeight
        }
  
        if (card.datatype === 'static') {
          val = card.tooltip
@@ -465,8 +480,8 @@
          <Col key={card.uuid} span={card.width}>
            <div style={card.style}>
              {val ? <Tooltip title={val}>
                <MkIcon className="ant-mk-icon" style={{height: card.innerHeight || 'auto'}} type={card.icon}/>
              </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: card.innerHeight || 'auto'}} type={card.icon}/>}
                <MkIcon className="ant-mk-icon" style={{height: height}} type={card.icon}/>
              </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: height}} type={card.icon}/>}
            </div>
          </Col>
        )
@@ -660,8 +675,8 @@
  
        contents.push(
          <Col key={card.uuid} span={card.width}>
            <div className="ant-mk-date" style={card.style}>
              {val}
            <div style={card.style}>
              <div className="ant-mk-text line1" style={{height: card.innerHeight || 'auto'}}>{val}</div>
            </div>
          </Col>
        )
src/tabviews/custom/components/card/cardcellList/index.scss
@@ -23,12 +23,13 @@
    text-decoration: inherit;
    .sequence-wrap {
      display: inline-block;
      width: 22px;
      height: 22px;
      line-height: 22px;
      width: 21px;
      height: 21px;
      line-height: 21px;
      white-space: nowrap;
      border-radius: 50%;
      overflow: visible;
      text-align: center;
    }
    span {
      text-indent: 0px;
@@ -133,12 +134,6 @@
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
  }
  .ant-mk-date {
    white-space: nowrap;
    overflow: hidden;
    word-break: break-word;
    text-overflow: ellipsis;
  }
  .ant-mk-check {
    white-space: nowrap;
src/tabviews/custom/index.jsx
@@ -608,18 +608,6 @@
                      cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0
                    }
                  }
                } else if (cell.eleType === 'icon') {
                  let fontSize = 14
                  let lineHeight = 1.5
                  if (cell.style.fontSize) {
                    fontSize = parseInt(cell.style.fontSize)
                  }
                  if (cell.style.lineHeight) {
                    lineHeight = parseFloat(cell.style.lineHeight)
                  }
                  cell.innerHeight = fontSize * lineHeight
                }
                return cell
              })
@@ -728,18 +716,6 @@
                  cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0
                }
              }
            } else if (cell.eleType === 'icon') {
              let fontSize = 14
              let lineHeight = 1.5
              if (cell.style.fontSize) {
                fontSize = parseInt(cell.style.fontSize)
              }
              if (cell.style.lineHeight) {
                lineHeight = parseFloat(cell.style.lineHeight)
              }
              cell.innerHeight = fontSize * lineHeight
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
@@ -778,20 +754,8 @@
                  cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0
                }
              }
            } else if (cell.eleType === 'icon') {
              let fontSize = 14
              let lineHeight = 1.5
              if (cell.style.fontSize) {
                fontSize = parseInt(cell.style.fontSize)
              }
              if (cell.style.lineHeight) {
                lineHeight = parseFloat(cell.style.lineHeight)
              }
              cell.innerHeight = fontSize * lineHeight
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          })
        })
@@ -832,18 +796,6 @@
                cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0
              }
            }
          } else if (cell.eleType === 'icon') {
            let fontSize = 14
            let lineHeight = 1.5
            if (cell.style.fontSize) {
              fontSize = parseInt(cell.style.fontSize)
            }
            if (cell.style.lineHeight) {
              lineHeight = parseFloat(cell.style.lineHeight)
            }
            cell.innerHeight = fontSize * lineHeight
          }
          return cell.eleType !== 'button' || skip || permAction[cell.uuid]
@@ -884,18 +836,6 @@
                  cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0
                }
              }
            } else if (cell.eleType === 'icon') {
              let fontSize = 14
              let lineHeight = 1.5
              if (cell.style.fontSize) {
                fontSize = parseInt(cell.style.fontSize)
              }
              if (cell.style.lineHeight) {
                lineHeight = parseFloat(cell.style.lineHeight)
              }
              cell.innerHeight = fontSize * lineHeight
            }
            return cell.eleType !== 'button' || skip || permAction[cell.uuid]
          })
src/templates/modalconfig/dragelement/index.jsx
@@ -114,7 +114,13 @@
        targetId = cards[cards.length - 1].uuid
      }
      const { index: overIndex } = findCard(`${targetId}`) // cards为空时 overIndex 为 -1
      const { index: overIndex, card } = findCard(`${targetId}`) // cards为空时 overIndex 为 -1
      if (card) {
        newcard.span = card.span || 12
        newcard.labelwidth = card.labelwidth || 33.3
      }
      const _cards = update(cards, { $splice: [[overIndex + 1, 0, newcard]] })
      setCards(_cards)
src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx
@@ -123,7 +123,13 @@
        targetId = cards[cards.length - 1].uuid
      }
      const { index: overIndex } = findCard(`${targetId}`)
      const { index: overIndex, card } = findCard(`${targetId}`)
      if (card) {
        newcard.ratio = card.ratio || 6
        newcard.labelwidth = card.labelwidth || 33.3
      }
      const _cards = update(cards, { $splice: [[overIndex + 1, 0, newcard]] })
      handleList(_cards, newcard)
src/templates/zshare/formconfig.jsx
@@ -333,16 +333,16 @@
  } else {
    typeOptions = [{
      value: 'text',
      text: Formdict['model.form.text']
      text: '文本'
    }, {
      value: 'select',
      text: Formdict['model.form.select']
      text: '下拉选择'
    }, {
      value: 'multiselect',
      text: Formdict['model.form.multiselect']
      text: '下拉多选'
    }, {
      value: 'link',
      text: Formdict['model.form.link']
      text: '联动菜单'
    }, {
      value: 'checkcard',
      text: '选项卡'
@@ -354,13 +354,13 @@
      text: '日期(周)'
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
      text: '日期(月)'
    }, {
      value: 'daterange',
      text: Formdict['model.form.daterange']
      text: '日期(区间)'
    }, {
      value: 'group',
      text: Formdict['model.form.dategroup']
      text: '日期(组合)'
    }]
  }
@@ -2423,22 +2423,22 @@
  
  let _openType = [{
    value: 'text',
    text: Formdict['model.form.text']
    text: '文本'
  }, {
    value: 'number',
    text: Formdict['model.form.number']
    text: '数字'
  }, {
    value: 'select',
    text: Formdict['model.form.select']
    text: '下拉选择'
  }, {
    value: 'textarea',
    text: '多行文本'
  }, {
    value: 'multiselect',
    text: Formdict['model.form.multiselect']
    text: '下拉多选'
  }, {
    value: 'link',
    text: Formdict['model.form.link']
    text: '联动菜单'
  }, {
    value: 'switch',
    text: '开关'
@@ -2459,7 +2459,7 @@
    text: '日期(天)'
  }, {
    value: 'datemonth',
    text: Formdict['model.form.datemonth']
    text: '日期(月)'
  // }, {
  //   value: 'datetime',
  //   text: '日期(分/秒)'
@@ -2471,13 +2471,13 @@
    text: '评分'
  }, {
    value: 'color',
    text: Formdict['model.form.color']
    text: '颜色'
  }, {
    value: 'brafteditor',
    text: '富文本'
  }, {
    value: 'funcvar',
    text: Formdict['header.form.funcvar']
    text: '函数变量'
  }, {
    value: 'hint',
    text: '提示'
@@ -2497,16 +2497,19 @@
  if (appType === 'mob') {
    _openType = [{
      value: 'text',
      text: Formdict['model.form.text']
      text: '文本'
    }, {
      value: 'number',
      text: Formdict['model.form.number']
      text: '数字'
    }, {
      value: 'select',
      text: '选择器'
    }, {
      value: 'link',
      text: Formdict['model.form.link']
      text: '联动菜单'
    }, {
      value: 'textarea',
      text: '多行文本'
    }, {
      value: 'switch',
      text: '开关'
@@ -2527,13 +2530,7 @@
      text: '日期(天)'
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
    // }, {
    //   value: 'datetime',
    //   text: '日期(分/秒)'
    }, {
      value: 'textarea',
      text: Formdict['model.form.textarea']
      text: '日期(月)'
    }, {
      value: 'cascader',
      text: '级联菜单'
@@ -2542,7 +2539,7 @@
      text: '评分'
    }, {
      value: 'funcvar',
      text: Formdict['header.form.funcvar']
      text: '函数变量'
    }, {
      value: 'hint',
      text: '提示'
src/views/menudesign/index.jsx
@@ -33,6 +33,7 @@
const MenuShell = asyncComponent(() => import('@/menu/menushell'))
const PrintMenuForm = asyncComponent(() => import('./printmenuform'))
const SourceWrap = asyncComponent(() => import('@/menu/modulesource'))
const Modulecell = asyncComponent(() => import('@/menu/modulecell'))
const BgController = asyncComponent(() => import('@/pc/bgcontroller'))
const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
@@ -1117,6 +1118,9 @@
                  <Panel header="组件" key="component">
                    <SourceWrap MenuType={MenuType} />
                  </Panel>
                  <Panel header="元素" key="element">
                    <Modulecell />
                  </Panel>
                  {customComponents && customComponents.length ? <Panel header="自定义组件" key="cuscomponent">
                    <SourceWrap components={customComponents} MenuType={MenuType} />
                  </Panel> : null}
src/views/mobdesign/index.jsx
@@ -32,6 +32,7 @@
const Versions = asyncComponent(() => import('@/menu/versions'))
const ViewNodes = asyncComponent(() => import('@/menu/viewnodes'))
const SourceWrap = asyncComponent(() => import('@/mob/modulesource'))
const Modulecell = asyncComponent(() => import('@/menu/modulecell'))
const BgController = asyncComponent(() => import('@/pc/bgcontroller'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const SysInterface = asyncComponent(() => import('@/menu/sysinterface'))
@@ -1954,6 +1955,9 @@
                  <Panel header={dict['mob.component']} className="component" key="component">
                    <SourceWrap />
                  </Panel>
                  <Panel header="元素" key="element">
                    <Modulecell />
                  </Panel>
                  {customComponents && customComponents.length ? <Panel header="自定义组件" className="cuscomponent" key="cuscomponent">
                    <SourceWrap components={customComponents} />
                  </Panel> : null}
src/views/pcdesign/index.jsx
@@ -30,6 +30,7 @@
const MenuShell = asyncComponent(() => import('@/pc/menushell'))
const ViewNodes = asyncComponent(() => import('@/menu/viewnodes'))
const SourceWrap = asyncComponent(() => import('@/pc/modulesource'))
const Modulecell = asyncComponent(() => import('@/menu/modulecell'))
const CreateView = asyncComponent(() => import('@/pc/createview'))
const BgController = asyncComponent(() => import('@/pc/bgcontroller'))
const Quotecomponent = asyncComponent(() => import('@/pc/quotecomponent'))
@@ -1861,6 +1862,9 @@
                  <Panel header={dict['mob.component']} key="component">
                    <SourceWrap />
                  </Panel>
                  <Panel header="元素" key="element">
                    <Modulecell />
                  </Panel>
                  {customComponents && customComponents.length ? <Panel header="自定义组件" key="cuscomponent">
                    <SourceWrap components={customComponents} />
                  </Panel> : null}
src/views/popdesign/index.jsx
@@ -24,6 +24,7 @@
const Versions = asyncComponent(() => import('@/menu/versions'))
const Header = asyncComponent(() => import('@/menu/header'))
const SourceWrap = asyncComponent(() => import('@/menu/modulesource'))
const Modulecell = asyncComponent(() => import('@/menu/modulecell'))
const MenuShell = asyncComponent(() => import('@/menu/menushell'))
const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
const BgController = asyncComponent(() => import('@/pc/bgcontroller'))
@@ -710,6 +711,9 @@
                  <Panel header="组件" key="component">
                    <SourceWrap MenuType="" />
                  </Panel>
                  <Panel header="元素" key="element">
                    <Modulecell />
                  </Panel>
                  {customComponents && customComponents.length ? <Panel header="自定义组件" key="cuscomponent">
                    <SourceWrap components={customComponents} MenuType="" />
                  </Panel> : null}