king
2023-06-02 7e3e54c3b18b1ff5cc2fd095e0153ea9928068c2
2023-06-02
5个文件已修改
45 ■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/double-data-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-X6/index.jsx 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -178,7 +178,9 @@
  recordChange = (values, item) => {
    this.record = {...this.record, ...values}
    if (item && item.controlFields) {
    if (!item) return
    if (item.controlFields) {
      let map = new Map()
      this.state.formlist.forEach(cell => {
        if (!cell.field) return
src/menu/components/card/data-card/index.jsx
@@ -562,7 +562,7 @@
          <ToolOutlined />
        </Popover>
        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <div className={'float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}>
        <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>
        <div style={{clear: 'both'}}></div>
src/menu/components/card/double-data-card/index.jsx
@@ -548,7 +548,7 @@
          <ToolOutlined />
        </Popover>
        <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
        <div className={'select-' + card.wrap.selStyle + extraName}>
        <div className={`select-${card.wrap.selStyle || ''} ${extraName}`}>
          {card.subcards.map(subcard => {
            if (subcard.$cardType === 'extendCard') {
              return (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>)
src/menu/components/card/prop-card/index.jsx
@@ -423,7 +423,7 @@
        } trigger="hover">
          <ToolOutlined />
        </Popover>
        <div className={(card.wrap.layout || 'grid') + '-layout float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}>
        <div className={`${card.wrap.layout || 'grid'}-layout float-${card.wrap.cardFloat || 'left'} select-${card.wrap.selStyle || ''}`}>
          {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
        </div>
        {card.wrap.display === 'hidden' ? <HeatMapOutlined className="prop-hidden"/> : null}
src/menu/components/chart/antv-X6/index.jsx
@@ -110,8 +110,6 @@
  kapmaprender = () => {
    const { card } = this.state
    preWork()
    // #region 初始化画布
    const graph = new Graph({
      container: document.getElementById(card.uuid + 'container'),
@@ -197,10 +195,10 @@
      target: graph,
      stencilGraphWidth: 200,
      stencilGraphHeight: 180,
      collapsable: true,
      // collapsable: true,
      groups: [
        {
          title: '基础流程图',
          title: '通用节点',
          name: 'group1',
        },
        {
@@ -218,7 +216,7 @@
        rowHeight: 55,
      },
    })
    document.getElementById('stencil').appendChild(stencil.container)
    document.getElementById(card.uuid + 'stencil').appendChild(stencil.container)
    // #endregion
    // #region 快捷键与事件
@@ -599,34 +597,9 @@
      }),
    )
    stencil.load(imageNodes, 'group2')
    // #endregion
    function preWork() {
      // 这里协助演示的代码,在实际项目中根据实际情况进行调整
      const container = document.getElementById(card.uuid + 'canvas')
      const stencilContainer = document.createElement('div')
      stencilContainer.id = 'stencil'
      stencilContainer.classList.add('mk-stencil')
      const graphContainer = document.createElement('div')
      graphContainer.id = card.uuid + 'container'
      graphContainer.classList.add('mk-container')
      container.appendChild(stencilContainer)
      container.appendChild(graphContainer)
    }
  }
  updateComponent = (card) => {
    if (this.state.card && (!is(fromJS(card.plot), fromJS(this.state.card.plot)) || !is(fromJS(card.style), fromJS(this.state.card.style)))) {
      let _element = document.getElementById(card.uuid + 'canvas')
      if (_element) {
        _element.innerHTML = ''
      }
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(() => {
        this.viewrender()
      }, 150)
    }
    card.width = card.plot.width
    card.name = card.plot.name
    card.subtype = card.plot.subtype
@@ -687,6 +660,8 @@
        </Popover>
        <NormalHeader config={card} updateComponent={this.updateComponent}/>
        <div className="canvas" style={{width: '100%', minHeight: card.plot.height, height: card.plot.height}} id={card.uuid + 'canvas'}>
          <div id={card.uuid + 'stencil'} className="mk-stencil"></div>
          <div id={card.uuid + 'container'} className="mk-container"></div>
        </div>
        <div className="component-name">
          <div className="center">