king
2021-01-07 0da0262bc236cfce928429fc4c48e1666eab3402
2021-01-07
26个文件已修改
590 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/dragaction/card.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/normal-group/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/columns/index.scss 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/antv-tabs/index.jsx 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/pastecontroller/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecombcontrolbutton/index.jsx 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecombcontrolbutton/index.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecombcontroller/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/utils/menuUtils.js 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/menuconfig/editthdmenu/index.jsx 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -8,6 +8,7 @@
import demo3 from '@/assets/img/demo3.jpg'
import demo4 from '@/assets/img/demo4.jpg'
import demo5 from '@/assets/img/demo5.jpg'
import MKEmitter from '@/utils/events.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
@@ -18,7 +19,7 @@
const Video = asyncComponent(() => import('@/components/video'))
const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent'))
const Card = ({ id, fields, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, updateMarks }) => {
const Card = ({ id, parent, fields, card, moveCard, findCard, editCard, delCard, copyCard, changeStyle, updateMarks }) => {
  const originalIndex = findCard(id).index
  const [{ isDragging }, drag] = useDrag({
    item: { type: 'action', id, originalIndex },
@@ -131,6 +132,13 @@
    }
  }
  const clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'cardcell') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', card, parent, 'cardcell')
    }
  }
  return (
    <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
      <div className="mk-popover-control">
@@ -142,7 +150,7 @@
      </div>
    } trigger="hover">
      <div ref={node => drag(drop(node))} className={'ant-col card-cell ant-col-' + card.width}>
        <div style={_style}>
        <div style={_style} onClick={clickComponent} id={card.uuid}>
          {getContent()}
        </div>
      </div>
src/menu/components/card/cardcellcomponent/dragaction/index.jsx
@@ -8,7 +8,7 @@
import Action from './action'
import './index.scss'
const Container = ({list, fields, handleList, handleMenu, deleteMenu, profileAction, handleStyle, updateMarks, dropButton, handleSubConfig }) => {
const Container = ({list, parent, fields, handleList, handleMenu, deleteMenu, profileAction, handleStyle, updateMarks, dropButton, handleSubConfig }) => {
  const [cards, setCards] = useState(list)
  const moveCard = (id, atIndex) => {
    const { card, index } = findCard(id)
@@ -78,9 +78,7 @@
  const doubleClickCard = id => {
    const { card } = findCard(id)
    if (card.OpenType === 'pop') {
      handleSubConfig(card)
    }
    handleSubConfig(card)
  }
  const delCard = id => {
@@ -106,6 +104,7 @@
              id={card.uuid}
              key={card.uuid}
              card={card}
              parent={parent}
              moveCard={moveCard}
              editCard={editCard}
              changeStyle={changeStyle}
@@ -121,6 +120,7 @@
              id={card.uuid}
              key={card.uuid}
              card={card}
              parent={parent}
              fields={fields}
              moveCard={moveCard}
              copyCard={copyCard}
src/menu/components/card/cardcellcomponent/index.jsx
@@ -59,6 +59,7 @@
    MKEmitter.addListener('cardAddElement', this.cardAddElement)
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('submitModal', this.handleSave)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -87,6 +88,28 @@
    MKEmitter.removeListener('cardAddElement', this.cardAddElement)
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('submitModal', this.handleSave)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
  updateComponentStyle = (parentId, keys, style) => {
    const { cardCell } = this.props
    if (!cardCell || cardCell.uuid !== parentId) return
    const { elements } = this.state
    let _elements = elements.map(item => {
      if (keys.includes(item.uuid)) {
        return this.resetCardStyle(item, {...item.style, ...style})
      }
      return item
    })
    this.setState({
      elements: _elements
    }, () => {
      this.props.updateElement(_elements)
    })
  }
  cardAddElement = (ids, element) => {
@@ -132,6 +155,21 @@
    if (comIds.length !== 3 || comIds[0] !== cards.uuid || comIds[1] !== cardCell.uuid) return
    let _card = this.resetCardStyle(card, style)
    let _elements = elements.map(cell => {
      if (cell.uuid === _card.uuid) return _card
      return cell
    })
    this.setState({
      elements: _elements
    }, () => {
      this.props.updateElement(_elements)
    })
  }
  resetCardStyle = (card, style) => {
    let _card = fromJS(card).toJS()
    
    if (_card.eleType === 'text' || _card.eleType === 'number') {
@@ -205,16 +243,7 @@
      _card.style = style
    }
    let _elements = elements.map(cell => {
      if (cell.uuid === _card.uuid) return _card
      return cell
    })
    this.setState({
      elements: _elements
    }, () => {
      this.props.updateElement(_elements)
    })
    return _card
  }
  /**
@@ -471,7 +500,7 @@
    const { cards } = this.props
    let btn = fromJS(item).toJS()
    if (btn.eleType !== 'button') return
    if (btn.eleType !== 'button' || (sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') !== 'false')) return
    if (btn.OpenType === 'pop') {
      if (!btn.modal) {
@@ -549,13 +578,14 @@
  }
  render() {
    const { cards } = this.props
    const { cards, cardCell } = this.props
    const { elements, visible, actvisible, profVisible, card, dict } = this.state
    return (
      <div className="model-menu-card-cell-list">
        <DragElement
          list={elements}
          parent={{...cardCell, components: elements}}
          fields={cards.columns}
          updateMarks={this.updateMarks}
          handleList={this.handleList}
src/menu/components/card/cardcomponent/index.jsx
@@ -206,6 +206,13 @@
    })
  }
  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')
    }
  }
  render() {
    const { cards, offset } = this.props
    const { card, elements, side, settingVisible, dict } = this.state
@@ -229,7 +236,7 @@
    return (
      <Col span={card.setting.width || 6} offset={offset || 0}>
        <div className="card-item" style={_style}>
        <div className="card-item" style={_style} onClick={this.clickComponent} id={card.uuid}>
          <CardCellComponent cards={cards} cardCell={card} side={side} elements={elements} updateElement={this.updateCard}/>
          <div className="card-control">
            <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
@@ -244,8 +251,8 @@
                    <Icon className="plus" title="左移" type="arrow-left" onClick={() => this.props.move(card, 'left')} />
                    <Icon className="close" title="右移" type="arrow-right" onClick={() => this.props.move(card, 'right')} />
                  </div>
                } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid)}>
                  <Icon type="swap" id={card.uuid}/>
                } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid + 'swap')}>
                  <Icon type="swap" id={card.uuid + 'swap'}/>
                </Popover> : null}
                {cards.subtype === 'propcard' ? <Icon className="close" title="删除卡片" type="delete" onClick={() => this.props.deleteElement(card)} /> : null}
                {card.setting.type === 'multi' ? <Switch size="small" onClick={this.changeSide} defaultChecked /> : null}
src/menu/components/card/data-card/index.jsx
@@ -361,7 +361,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
src/menu/components/card/prop-card/index.jsx
@@ -107,6 +107,7 @@
  componentDidMount () {
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('logButton', this.logButton)
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -122,6 +123,24 @@
    }
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('logButton', this.logButton)
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
  updateComponentStyle = (parentId, keys, style) => {
    const { card } = this.state
    if (card.uuid !== parentId) return
    let subcards = card.subcards.map(item => {
      if (keys.includes(item.uuid)) {
        item.style = {...item.style, ...style}
      }
      return item
    })
    this.setState({card: {...card, subcards: []}}, () => {
      this.updateComponent({...card, subcards: subcards})
    })
  }
  logButton = (id, item) => {
@@ -327,7 +346,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
src/menu/components/card/table-card/index.jsx
@@ -310,7 +310,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
src/menu/components/chart/antv-bar/index.jsx
@@ -103,8 +103,8 @@
  componentDidMount () {
    this.viewrender()
    MKEmitter.addListener('tabsChange', this.handleTabsChange)
    MKEmitter.addListener('submitStyle', this.getStyle)
    MKEmitter.addListener('tabsChange', this.handleTabsChange)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -118,8 +118,8 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('tabsChange', this.handleTabsChange)
    MKEmitter.removeListener('submitStyle', this.getStyle)
    MKEmitter.removeListener('tabsChange', this.handleTabsChange)
  }
  handleTabsChange = (parentId) => {
@@ -854,7 +854,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
src/menu/components/chart/antv-pie/index.jsx
@@ -426,7 +426,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
src/menu/components/group/normal-group/index.jsx
@@ -80,17 +80,22 @@
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
  updateComponentStyle = (item) => {
  updateComponentStyle = (parentId, keys, style) => {
    const { group } = this.state
    if (group.uuid !== item.uuid) return
    if (group.uuid !== parentId) return
    let components = group.components.map(item => {
      if (keys.includes(item.uuid)) {
        item.style = {...item.style, ...style}
      }
      return item
    })
    this.setState({
      group: {...group, components: []}
    }, () => {
      this.setState({
        group: {...group, components: item.components}
      })
      this.updateComponent({...group, components: components})
    })
  }
@@ -125,8 +130,8 @@
  updateComponent = (component) => {
    const { group } = this.state
    if (!is(fromJS(group.setting), fromJS(component.setting))) {
      // 注册事件-标签变化,通知标签内元素
    if (!is(fromJS(group.setting), fromJS(component.setting)) || !is(fromJS(group.style), fromJS(component.style))) {
      // 注册事件-标签变化,通知组内元素
      MKEmitter.emit('tabsChange', group.uuid)
    }
@@ -149,7 +154,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.group)
    }
src/menu/components/search/main-search/index.jsx
@@ -340,7 +340,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
src/menu/components/share/actioncomponent/index.jsx
@@ -404,6 +404,8 @@
   * @description 按钮双击触发子配置
   */
  btnDoubleClick = (element) => {
    if (sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') !== 'false') return
    if (element.OpenType === 'pop' || element.OpenType === 'popview') {
      this.props.setSubConfig(element)
    } else {
src/menu/components/table/normal-table/columns/index.jsx
@@ -504,6 +504,7 @@
        <DndProvider>
          <Table
            rowKey="uuid"
            size={config.wrap.size || 'middle'}
            rowClassName="editable-row"
            bordered={config.wrap.bordered !== 'false'}
            components={components}
src/menu/components/table/normal-table/columns/index.scss
@@ -2,7 +2,6 @@
  position: relative;
  .ant-table-body {
    overflow-x: auto;
    padding-bottom: 20px;
    tr {
      td {
        background: #ffffff;
@@ -70,6 +69,9 @@
      color: purple;
    }
  }
  .ant-table-small > .ant-table-content > .ant-table-body {
    margin: 0;
  }
}
.normal-table-columns.false {
  .ant-pagination {
src/menu/components/table/normal-table/index.jsx
@@ -319,7 +319,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.card)
    }
src/menu/components/table/normal-table/wrapsetting/settingform/index.jsx
@@ -136,6 +136,19 @@
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="表格大小">
                {getFieldDecorator('size', {
                  initialValue: wrap.size || 'middle'
                })(
                  <Radio.Group style={{whiteSpace: 'nowrap'}}>
                    <Radio key="default" value="default"> 大 </Radio>
                    <Radio key="middle" value="middle"> 中 </Radio>
                    <Radio key="small" value="small"> 小 </Radio>
                  </Radio.Group>
                )}
              </Form.Item>
            </Col>
            <Col span={12} style={{height: '64px'}}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="默认值 #e8e8e8。">
                  <Icon type="question-circle" />
src/menu/components/tabs/antv-tabs/index.jsx
@@ -91,17 +91,36 @@
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
  updateComponentStyle = (item) => {
    const { group } = this.state
  updateComponentStyle = (parentId, keys, style) => {
    const { tabs } = this.state
    if (group.uuid !== item.uuid) return
    if (tabs.subtabs.findIndex(tab => tab.uuid === parentId) === -1) return
    this.setState({
      group: {...group, components: []}
    }, () => {
      this.setState({
        group: {...group, components: item.components}
      })
    let _tabs = fromJS(tabs).toJS()
    let _tabs_ = fromJS(tabs).toJS()
    let components = []
    _tabs.subtabs.forEach(tab => {
      if (tab.uuid === parentId) {
        components = tab.components.map(item => {
          if (keys.includes(item.uuid)) {
            item.style = {...item.style, ...style}
          }
          return item
        })
        tab.components = []
      }
    })
    _tabs_.subtabs = _tabs_.subtabs.map(tab => {
      if (tab.uuid === parentId) {
        tab.components = components
      }
      return tab
    })
    this.setState({tabs: _tabs}, () => {
      this.updateComponent(_tabs_)
    })
  }
@@ -136,7 +155,7 @@
  updateComponent = (component) => {
    const { tabs } = this.state
    if (!is(fromJS(tabs.setting), fromJS(component.setting))) {
    if (!is(fromJS(tabs.setting), fromJS(component.setting)) || !is(fromJS(tabs.style), fromJS(component.style))) {
      // 注册事件-标签变化,通知标签内元素
      MKEmitter.emit('tabsChange', tabs.uuid)
    }
@@ -270,7 +289,7 @@
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true') {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
      MKEmitter.emit('clickComponent', this.state.tabs)
    }
@@ -278,7 +297,6 @@
  render() {
    const { tabs, dict, labelvisible, editab } = this.state
    return (
      <div className="menu-tabs-edit-box" style={tabs.style} onClick={this.clickComponent} id={tabs.uuid}>
        <DraggableTabs tabPosition={tabs.setting.position} type={tabs.setting.tabStyle} tabsMove={this.moveSwitch}>
src/menu/pastecontroller/index.jsx
@@ -53,6 +53,11 @@
          return cell
        })
      })
    } else if (item.type === 'group') {
      item.components = item.components.forEach(cell => {
        cell = this.resetconfig(cell, item, true)
        return cell
      })
    } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) {
      item.subcards.forEach(card => {
        card.uuid = Utils.getuuid()
src/menu/stylecombcontrolbutton/index.jsx
@@ -14,6 +14,7 @@
  state = {
    label: '调整',
    parent: null,
    type: '',
    components: []
  }
@@ -35,44 +36,11 @@
  }
  submitCombineStyle = (style) => {
    const { menu } = this.props
    const { components, parent } = this.state
    let _parent = null
    let getParents = (box) => {
      box.components.forEach(item => {
        if (item.type === 'tabs') {
          item.subtabs.forEach(tab => {
            if (tab.uuid === parent.uuid) {
              _parent = tab
            } else {
              getParents(tab)
            }
          })
        } else if (item.type === 'group') {
          if (item.uuid === parent.uuid) {
            _parent = item
          }
        }
      })
    }
    if (menu.uuid === parent.uuid) {
      _parent = menu
    } else {
      getParents(menu)
    }
    let keys = components.map(item => item.uuid)
    _parent.components = _parent.components.map(item => {
      if (keys.includes(item.uuid)) {
        item.style = {...item.style, ...style}
      }
      return item
    })
    MKEmitter.emit('submitComponentStyle', _parent)
    MKEmitter.emit('submitComponentStyle', parent.uuid, keys, style)
    setTimeout(() => {
      keys.forEach(key => {
@@ -81,41 +49,54 @@
    }, 100)
  }
  clickComponent = (card) => {
  clickComponent = (card, _p, _type) => {
    const { menu } = this.props
    const { parent } = this.state
    const { parent, type } = this.state
    let components = fromJS(this.state.components).toJS()
    if (!parent) {
      let _parent = null
      let getParents = (box) => {
        box.components.forEach(item => {
          if (item.type === 'tabs') {
            item.subtabs.forEach(tab => {
              if (tab.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
                _parent = tab
              } else {
                getParents(tab)
              }
            })
          } else if (item.type === 'group') {
            if (item.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
              _parent = item
            }
          }
        })
      }
      if (menu.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
        _parent = menu
      if (_type === 'propcard') {
        _parent = _p
        MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background', 'shadow'])
      } else if (_type === 'cardcell') {
        _parent = _p
        MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background', 'font'])
      } else {
        getParents(menu)
        let getParents = (box) => {
          box.components.forEach(item => {
            if (item.type === 'tabs') {
              item.subtabs.forEach(tab => {
                if (tab.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
                  _parent = tab
                } else {
                  getParents(tab)
                }
              })
            } else if (item.type === 'group') {
              if (item.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
                _parent = item
              }
            }
          })
        }
        if (menu.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
          _parent = menu
        } else {
          getParents(menu)
        }
        MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background'])
      }
      document.getElementById(card.uuid).classList.add('selected-control-element')
      MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background'])
      sessionStorage.setItem('style-control', (_type ? _type : 'component'))
      this.setState({
        type: _type ? _type : 'component',
        parent: _parent,
        components: [card]
      })
@@ -123,13 +104,17 @@
      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 (parent.components.findIndex(cell => cell.uuid === card.uuid) > -1) {
      } 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) {
        components.push(card)
        document.getElementById(card.uuid).classList.add('selected-control-element')
      }
      if (components.length === 0) {
        MKEmitter.emit('closeCombineStyle')
        sessionStorage.setItem('style-control', 'true')
      }
      this.setState({
@@ -140,7 +125,7 @@
  }
  triggerStyleChange = () => {
    const { label } = this.state
    const { label, components } = this.state
    if (label === '调整') {
      document.body.className = 'style-control'
@@ -150,10 +135,9 @@
      document.body.className = ''
      sessionStorage.setItem('style-control', 'false')
      let eles = document.getElementsByClassName('selected-control-element')
      for (let i = 0; i < eles.length; i++) {
        eles[i].classList.remove('selected-control-element')
      }
      components.forEach(item => {
        document.getElementById(item.uuid).classList.remove('selected-control-element')
      })
      MKEmitter.emit('closeCombineStyle')
src/menu/stylecombcontrolbutton/index.scss
@@ -28,6 +28,14 @@
  }
  .selected-control-element {
    box-shadow: 0px 0px 6px orange;
    box-shadow: 0px 0px 4px orange!important;
  }
  .selected-control-element:hover {
    box-shadow: 0px 0px 4px orange!important;
  }
  .normal-table-columns {
    .col-control {
      display: none;
    }
  }
}
src/menu/stylecombcontroller/index.jsx
@@ -248,6 +248,7 @@
        closable={false}
        className="menu-style-drawer"
        visible={this.state.visible}
        destroyOnClose
      >
        <div className="menu-combine-style-controller">
          <Form {...formItemLayout}>
src/menu/utils/menuUtils.js
@@ -226,4 +226,132 @@
    return uuids
  }
  /**
   * @description 生成32位uuid string + 时间
   * @return {String}  uuid
   */
  static getuuid () {
    let uuid = []
    let timestamp = new Date().getTime()
    let _options = '0123456789abcdefghigklmnopqrstuv'
    for (let i = 0; i < 19; i++) {
      uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
    }
    uuid = timestamp + uuid.join('')
    return uuid
  }
  /**
   * @description 重置菜单配置
   * @return {String}  components 配置信息
   */
  static resetConfig = (components) => {
    return components.map(item => {
      item.uuid = this.getuuid()
      if (item.type === 'tabs') {
        item.subtabs.forEach(tab => {
          tab.uuid = this.getuuid()
          tab.parentId = item.uuid
          tab.components = tab.components.map(cell => {
            cell.tabId = tab.uuid
            cell.parentId = item.uuid
            return cell
          })
          tab.components = this.resetConfig(tab.components)
        })
      } else if (item.type === 'group') {
        item.components = item.components.map(cell => {
          cell.parentId = item.uuid
          return cell
        })
        item.components = this.resetConfig(item.components)
      } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) {
        item.subcards.forEach(card => {
          card.uuid = this.getuuid()
          if (card.elements) {
            card.elements = card.elements.map(cell => {
              cell.uuid = this.getuuid()
              return cell
            })
          }
          if (card.backElements) {
            card.backElements = card.backElements.map(cell => {
              cell.uuid = this.getuuid()
              return cell
            })
          }
        })
      } else if (item.type === 'table' && item.subtype === 'normaltable' && item.cols) {
        let loopCol = (col) => {
          col.subcols = col.subcols.map(c => {
            c.uuid = this.getuuid()
            if (c.type === 'colspan' && c.subcols) {
              c = loopCol(c)
            } else if (c.type === 'custom' && c.elements) {
              c.elements = c.elements.map(cell => {
                cell.uuid = this.getuuid()
                return cell
              })
            } else if (c.type === 'action' && c.elements) {
              c.elements = c.elements.map(cell => {
                cell.uuid = this.getuuid()
                return cell
              })
            }
            return c
          })
          return col
        }
        item.cols = item.cols.map(col => {
          col.uuid = this.getuuid()
          if (col.type === 'colspan' && col.subcols) {
            col = loopCol(col)
          } else if (col.type === 'custom' && col.elements) {
            col.elements = col.elements.map(cell => {
              cell.uuid = this.getuuid()
              return cell
            })
          } else if (col.type === 'action' && col.elements) {
            col.elements = col.elements.map(cell => {
              cell.uuid = this.getuuid()
              return cell
            })
          }
          return col
        })
      }
      if (item.btnlog) {
        item.btnlog = []
      }
      if (item.action) {
        item.action = item.action.map(cell => {
          cell.uuid = this.getuuid()
          return cell
        })
      }
      if (item.search) {
        item.search = item.search.map(cell => {
          cell.uuid = this.getuuid()
          return cell
        })
      }
      if (item.columns) {
        item.columns = item.columns.map(cell => {
          cell.uuid = this.getuuid()
          return cell
        })
      }
      return item
    })
  }
}
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -803,8 +803,8 @@
          <Switch title="收起" className="main-pickup" checkedChildren="开" unCheckedChildren="关" defaultChecked={pickup} onChange={this.pickupChange} /> : null
        }
        <Table
          size="middle"
          components={components}
          size={setting.size || 'middle'}
          bordered={setting.bordered !== 'false'}
          rowSelection={rowSelection}
          columns={this.state.columns}
src/templates/menuconfig/editthdmenu/index.jsx
@@ -21,6 +21,7 @@
import MenuForm from './menuform'
import TransferForm from '@/templates/zshare/basetransferform'
import Utils from '@/utils/utils.js'
import MenuUtils from '@/menu/utils/menuUtils.js'
import DragElement from '../menuelement'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
import './index.scss'
@@ -627,9 +628,7 @@
        OpenType: 'newtab'
      }
      if (sysMenu.OriginMenuId && sysMenu.Template === 'CustomPage') {
        PageParam.originMenuId = sysMenu.OriginMenuId
      } else if (sysMenu.Template === 'NewPage') {
      if (sysMenu.Template === 'NewPage') {
        PageParam.OpenType = 'NewPage'
        PageParam.url = res.url
      }
@@ -660,28 +659,93 @@
        confirmLoading: true
      })
      Api.getSystemConfig(param).then(response => {
        if (response.status) {
          this.setState({
            sysTemplates: sysTemplates,
            confirmLoading: false,
            handleMVisible: false,
            sysMenu: '',
            tabview: ''
          })
      if (sysMenu.Template === 'CustomPage' && sysMenu.OriginMenuId) {
        this.copyMenu(param, sysMenu.OriginMenuId)
      } else {
        Api.getSystemConfig(param).then(response => {
          if (response.status) {
            this.setState({
              sysTemplates: sysTemplates,
              confirmLoading: false,
              handleMVisible: false,
              sysMenu: '',
              tabview: ''
            })
            this.props.reload()
          } else {
            this.setState({
              confirmLoading: false
            })
            notification.warning({
              top: 92,
              message: response.message,
              duration: 5
            })
          }
        })
      }
    })
  }
          this.props.reload()
        } else {
          this.setState({
            confirmLoading: false
          })
          notification.warning({
            top: 92,
            message: response.message,
            duration: 5
          })
  copyMenu = (param, MenuId) => {
    Api.getSystemConfig({
      func: 'sPC_Get_LongParam',
      MenuID: MenuId
    }).then(result => {
      if (result.status) {
        let config = null
        try {
          config = result.LongParam ? JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) : null
        } catch (e) {
          console.warn('Parse Failure')
          config = null
        }
      })
        if (config) {
          config.uuid = param.MenuID
          config.MenuID = param.MenuID
          config.parentId = param.ParentID
          config.MenuName = param.MenuName
          config.MenuNo = param.MenuNo
          config.easyCode = ''
          config.components = MenuUtils.resetConfig(config.components)
          param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config)))
        }
        Api.getSystemConfig(param).then(response => {
          if (response.status) {
            this.setState({
              confirmLoading: false,
              handleMVisible: false,
              sysMenu: '',
              tabview: ''
            })
            this.props.reload()
          } else {
            this.setState({
              confirmLoading: false
            })
            notification.warning({
              top: 92,
              message: response.message,
              duration: 5
            })
          }
        })
      } else {
        this.setState({
          confirmLoading: false
        })
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
      }
    })
  }
src/templates/zshare/formconfig.jsx
@@ -385,7 +385,7 @@
      type: 'radio',
      key: 'setAll',
      label: Formdict['header.form.setAll'],
      initVal: card.setAll || 'false',
      initVal: card.setAll || 'true',
      options: [{
        value: 'true',
        text: Formdict['model.true']
src/views/menudesign/index.jsx
@@ -109,16 +109,23 @@
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
  }
  updateComponentStyle = (item) => {
  updateComponentStyle = (parentId, keys, style) => {
    const { config } = this.state
    if (config.uuid !== item.uuid) return
    if (config.uuid !== parentId) return
    let components = config.components.map(item => {
      if (keys.includes(item.uuid)) {
        item.style = {...item.style, ...style}
      }
      return item
    })
    this.setState({
      config: {...config, components: []}
    }, () => {
      this.setState({
        config: {...config, components: item.components}
        config: {...config, components: components}
      })
    })
  }