king
2021-05-24 9f5b0864f8e6c8c1d7954c6e57629204b8e9dd9b
2021-05-24
12个文件已修改
174 ■■■■ 已修改文件
src/menu/components/group/groupcomponents/card.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/tabcomponents/card.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/menushell/card.jsx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/modulesource/option.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/group/normal-group/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/tabtransfer/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tree/antd-tree/index.jsx 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/groupcomponents/card.jsx
@@ -9,12 +9,15 @@
const DataCard = asyncComponent(() => import('@/menu/components/card/data-card'))
const PropCard = asyncComponent(() => import('@/menu/components/card/prop-card'))
const TableCard = asyncComponent(() => import('@/menu/components/card/table-card'))
const NormalTree = asyncComponent(() => import('@/menu/components/tree/antd-tree'))
const NormalTable = asyncComponent(() => import('@/menu/components/table/normal-table'))
const BraftEditor = asyncComponent(() => import('@/menu/components/editor/braft-editor'))
const AntvScatter = asyncComponent(() => import('@/menu/components/chart/antv-scatter'))
const NormalForm = asyncComponent(() => import('@/menu/components/form/normal-form'))
const AntvDashboard = asyncComponent(() => import('@/menu/components/chart/antv-dashboard'))
const CarouselDataCard = asyncComponent(() => import('@/menu/components/carousel/data-card'))
const CarouselPropCard = asyncComponent(() => import('@/menu/components/carousel/prop-card'))
const CodeSandbox = asyncComponent(() => import('@/menu/components/code/sandbox'))
const Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => {
  const originalIndex = findCard(id).index
@@ -56,8 +59,12 @@
      return (<AntvPie card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'dashboard') {
      return (<AntvDashboard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'tree') {
      return (<NormalTree card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'scatter') {
      return (<AntvScatter card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'form') {
      return (<NormalForm card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'card' && card.subtype === 'datacard') {
      return (<DataCard card={card} updateConfig={updateConfig} deletecomponent={delCard} />)
    } else if (card.type === 'card' && card.subtype === 'propcard') {
@@ -72,6 +79,8 @@
      return (<CarouselPropCard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'editor') {
      return (<BraftEditor card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'code') {
      return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    }
  }
src/menu/components/tabs/tabcomponents/card.jsx
@@ -12,12 +12,15 @@
const AntvTabs = asyncComponent(() => import('@/menu/components/tabs/antv-tabs'))
const DataCard = asyncComponent(() => import('@/menu/components/card/data-card'))
const PropCard = asyncComponent(() => import('@/menu/components/card/prop-card'))
const NormalTree = asyncComponent(() => import('@/menu/components/tree/antd-tree'))
const CarouselDataCard = asyncComponent(() => import('@/menu/components/carousel/data-card'))
const CarouselPropCard = asyncComponent(() => import('@/menu/components/carousel/prop-card'))
const TableCard = asyncComponent(() => import('@/menu/components/card/table-card'))
const NormalForm = asyncComponent(() => import('@/menu/components/form/normal-form'))
const NormalTable = asyncComponent(() => import('@/menu/components/table/normal-table'))
const NormalGroup = asyncComponent(() => import('@/menu/components/group/normal-group'))
const BraftEditor = asyncComponent(() => import('@/menu/components/editor/braft-editor'))
const CodeSandbox = asyncComponent(() => import('@/menu/components/code/sandbox'))
const Card = ({ id, card, moveCard, findCard, delCard, updateConfig }) => {
  const originalIndex = findCard(id).index
@@ -61,8 +64,12 @@
      return (<AntvPie card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'dashboard') {
      return (<AntvDashboard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'tree') {
      return (<NormalTree card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'scatter') {
      return (<AntvScatter card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'form') {
      return (<NormalForm card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'tabs') {
      return (<AntvTabs tabs={card} updateConfig={updateConfig} deletecomponent={delCard} />)
    } else if (card.type === 'card' && card.subtype === 'datacard') {
@@ -81,6 +88,8 @@
      return (<NormalGroup group={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'editor') {
      return (<BraftEditor card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'code') {
      return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    }
  }
src/pc/menushell/card.jsx
@@ -12,6 +12,7 @@
const AntvTabs = asyncComponent(() => import('@/menu/components/tabs/antv-tabs'))
const DataCard = asyncComponent(() => import('@/menu/components/card/data-card'))
const PropCard = asyncComponent(() => import('@/menu/components/card/prop-card'))
const NormalTree = asyncComponent(() => import('@/menu/components/tree/antd-tree'))
const TableCard = asyncComponent(() => import('@/menu/components/card/table-card'))
const NormalTable = asyncComponent(() => import('@/menu/components/table/normal-table'))
const NormalGroup = asyncComponent(() => import('@/menu/components/group/normal-group'))
@@ -85,6 +86,8 @@
      return (<AntvPie card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'dashboard') {
      return (<AntvDashboard card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'tree') {
      return (<NormalTree card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'scatter') {
      return (<AntvScatter card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'tabs') {
src/pc/modulesource/option.jsx
@@ -21,6 +21,7 @@
import Login from '@/assets/mobimg/login.png'
import dashboard from '@/assets/mobimg/dashboard.png'
import scatter from '@/assets/mobimg/scatter.png'
import tree from '@/assets/mobimg/tree.png'
// 组件配置信息
export const menuOptions = [
@@ -34,6 +35,7 @@
  { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24 },
  { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 },
  { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 12 },
  { type: 'menu', url: tree, component: 'tree', subtype: 'normaltree', title: '树形列表', width: 12 },
  { type: 'menu', url: line, component: 'line', subtype: 'line', title: '折线图', width: 24 },
  { type: 'menu', url: line1, component: 'line', subtype: 'line1', title: '阶梯折线图', width: 24 },
  { type: 'menu', url: bar, component: 'bar', subtype: 'bar', title: '柱状图', width: 24 },
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -165,16 +165,7 @@
    if (!config.timer) return
    const _change = {
      '15s': 15000,
      '30s': 30000,
      '1min': 60000,
      '5min': 300000,
      '10min': 600000,
      '15min': 900000,
      '30min': 1800000,
      '1hour': 3600000
    }
    const _change = { '15s': 15000, '30s': 30000, '1min': 60000, '5min': 300000, '10min': 600000, '15min': 900000, '30min': 1800000, '1hour': 3600000 }
    let timer = _change[config.timer]
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -252,16 +252,7 @@
    if (!config.timer) return
    const _change = {
      '15s': 15000,
      '30s': 30000,
      '1min': 60000,
      '5min': 300000,
      '10min': 600000,
      '15min': 900000,
      '30min': 1800000,
      '1hour': 3600000
    }
    const _change = { '15s': 15000, '30s': 30000, '1min': 60000, '5min': 300000, '10min': 600000, '15min': 900000, '30min': 1800000, '1hour': 3600000 }
    let timer = _change[config.timer]
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -159,16 +159,7 @@
    if (!config.timer) return
    const _change = {
      '15s': 15000,
      '30s': 30000,
      '1min': 60000,
      '5min': 300000,
      '10min': 600000,
      '15min': 900000,
      '30min': 1800000,
      '1hour': 3600000
    }
    const _change = { '15s': 15000, '30s': 30000, '1min': 60000, '5min': 300000, '10min': 600000, '15min': 900000, '30min': 1800000, '1hour': 3600000 }
    let timer = _change[config.timer]
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -132,16 +132,7 @@
    if (!config.timer) return
    const _change = {
      '15s': 15000,
      '30s': 30000,
      '1min': 60000,
      '5min': 300000,
      '10min': 600000,
      '15min': 900000,
      '30min': 1800000,
      '1hour': 3600000
    }
    const _change = { '15s': 15000, '30s': 30000, '1min': 60000, '5min': 300000, '10min': 600000, '15min': 900000, '30min': 1800000, '1hour': 3600000 }
    let timer = _change[config.timer]
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -133,16 +133,7 @@
    if (!config.timer) return
    const _change = {
      '15s': 15000,
      '30s': 30000,
      '1min': 60000,
      '5min': 300000,
      '10min': 600000,
      '15min': 900000,
      '30min': 1800000,
      '1hour': 3600000
    }
    const _change = { '15s': 15000, '30s': 30000, '1min': 60000, '5min': 300000, '10min': 600000, '15min': 900000, '30min': 1800000, '1hour': 3600000 }
    let timer = _change[config.timer]
src/tabviews/custom/components/group/normal-group/index.jsx
@@ -23,6 +23,10 @@
const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card'))
const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor'))
const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box'))
const NormalForm = asyncComponent(() => import('@/tabviews/custom/components/form/normal-form'))
const NormalTree = asyncComponent(() => import('@/tabviews/custom/components/tree/antd-tree'))
const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card'))
const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card'))
class TabTransfer extends Component {
  static propTpyes = {
@@ -271,10 +275,28 @@
            <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'scatter') {
        return (
          <Col span={item.width} key={item.uuid}>
            <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'carousel' && item.subtype === 'datacard') {
        return (
          <Col span={item.width} key={item.uuid}>
            <CarouselDataCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'carousel' && item.subtype === 'propcard') {
        return (
          <Col span={item.width} key={item.uuid}>
            <CarouselPropCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'card' && item.subtype === 'datacard') {
@@ -301,6 +323,12 @@
            <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'tree') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'editor') {
        return (
          <Col span={item.width} key={item.uuid}>
src/tabviews/custom/components/share/tabtransfer/index.jsx
@@ -26,6 +26,8 @@
const NormalGroup = asyncComponent(() => import('@/tabviews/custom/components/group/normal-group'))
const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor'))
const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box'))
const NormalForm = asyncComponent(() => import('@/tabviews/custom/components/form/normal-form'))
const NormalTree = asyncComponent(() => import('@/tabviews/custom/components/tree/antd-tree'))
const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card'))
const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card'))
@@ -354,6 +356,18 @@
            <NormalGroup config={item} bids={bids} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'form') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalForm config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'tree') {
        return (
          <Col span={item.width} key={item.uuid}>
            <NormalTree config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} />
          </Col>
        )
      } else if (item.type === 'editor') {
        return (
          <Col span={item.width} key={item.uuid}>
src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -76,15 +76,6 @@
        _data = nextProps.data[config.dataName] || []
      }
      // _data = [
      //   {ID: 'dsdsagsgfs32ed2dqd61', nvarchar1: '1', nvarchar2: '1', nvarchar3: ''},
      //   {ID: 'dsdsagsgfs32ed2dqd61', nvarchar1: '1-1', nvarchar2: '1-1', nvarchar3: '1'},
      //   {ID: 'dsdsagsgfs32ed2dqd61', nvarchar1: '1-2', nvarchar2: '1-2', nvarchar3: '1'},
      //   {ID: 'dsdsagsgfs32ed2dqd61', nvarchar1: '2', nvarchar2: '2', nvarchar3: ''},
      //   {ID: 'dsdsagsgfs32ed2dqd61', nvarchar1: '2-1', nvarchar2: '2-1', nvarchar3: '2'},
      //   {ID: 'dsdsagsgfs32ed2dqd61', nvarchar1: '2-2', nvarchar2: '2-2', nvarchar3: '2'},
      // ]
      this.setState({sync: false, data: _data}, () => {
        this.handleData()
      })
@@ -124,16 +115,7 @@
    if (!config.timer) return
    const _change = {
      '15s': 15000,
      '30s': 30000,
      '1min': 60000,
      '5min': 300000,
      '10min': 600000,
      '15min': 900000,
      '30min': 1800000,
      '1hour': 3600000
    }
    const _change = { '15s': 15000, '30s': 30000, '1min': 60000, '5min': 300000, '10min': 600000, '15min': 900000, '30min': 1800000, '1hour': 3600000 }
    let timer = _change[config.timer]
@@ -284,16 +266,16 @@
      if (pval === config.wrap.mark) {
        parentNodes.push({
          // ...item,
          title: item[config.wrap.labelField] || '',
          key: val,
          parentId: ''
          $title: item[config.wrap.labelField] || '',
          $key: val,
          $parentId: ''
        })
      } else if (pval) {
        _options.push({
          // ...item,
          title: item[config.wrap.labelField] || '',
          key: val,
          parentId: pval
          $title: item[config.wrap.labelField] || '',
          $key: val,
          $parentId: pval
        })
      }
    })
@@ -336,9 +318,9 @@
  getFilterTree = (parents, searchkey) => {
    return parents.filter(node => {
      if (!node.children) {
        return (node.title.toLowerCase().indexOf(searchkey) >= 0 || node.key.toLowerCase().indexOf(searchkey) >= 0)
        return (node.$title.toLowerCase().indexOf(searchkey) >= 0 || node.$key.toLowerCase().indexOf(searchkey) >= 0)
      } else {
        if (node.title.toLowerCase().indexOf(searchkey) >= 0 || node.key.toLowerCase().indexOf(searchkey) >= 0) {
        if (node.$title.toLowerCase().indexOf(searchkey) >= 0 || node.$key.toLowerCase().indexOf(searchkey) >= 0) {
          return true
        }
        
@@ -360,7 +342,7 @@
      parent.children = []
      // 添加菜单的子元素
      options = options.filter(option => {
        if (option.parentId === parent.key) {
        if (option.$parentId === parent.$key) {
          parent.children.push(option)
          return false
        }
@@ -383,12 +365,12 @@
    return nodes.map(item => {
      if (item.children) {
        return (
          <TreeNode icon={<span><Icon type="folder-open" /><Icon type="folder" /></span>} title={item.title} key={item.key} dataRef={item}>
          <TreeNode icon={<span><Icon type="folder-open" /><Icon type="folder" /></span>} title={item.$title} key={item.$key} dataRef={item}>
            {this.renderTreeNodes(item.children)}
          </TreeNode>
        )
      }
      return <TreeNode icon={<Icon type="file" />} key={item.key} title={item.title} dataRef={item} isLeaf />
      return <TreeNode icon={<Icon type="file" />} key={item.$key} title={item.$title} dataRef={item} isLeaf />
    })
  }
@@ -414,7 +396,7 @@
  getExpandKeys = (node, keys) => {
    if (node.children) {
      keys.push(node.key)
      keys.push(node.$key)
      node.children.forEach(_node => {
        this.getExpandKeys(_node, keys)
      })
@@ -426,22 +408,22 @@
    let _expandedKeys = fromJS(this.state.expandedKeys).toJS()
    let _data = fromJS(node.props.dataRef).toJS()
    if (_expandedKeys.indexOf(_data.key) >= 0) {
      _expandedKeys = _expandedKeys.filter(key => key !== _data.key)
    if (_expandedKeys.indexOf(_data.$key) >= 0) {
      _expandedKeys = _expandedKeys.filter(key => key !== _data.$key)
    } else {
      if (_data.children) {
        _expandedKeys.push(_data.key)
        _expandedKeys.push(_data.$key)
        _expandedKeys = Array.from(new Set(_expandedKeys))
      }
    }
    if (selected) {
      MKEmitter.emit('resetSelectLine', config.uuid, (_data ? _data.key : ''), _data)
      MKEmitter.emit('resetSelectLine', config.uuid, (_data ? _data.$key : ''), _data)
    }
    this.setState({
      expandedKeys: _expandedKeys,
      selectedKeys: [_data.key]
      selectedKeys: [_data.$key]
    })
  }