king
2023-06-18 03fb8af6eb071bef24a1ab3224905c13f238241d
2023-06-18
5个文件已修改
48 ■■■■ 已修改文件
src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/actionform/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/formconfig.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-G6/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
@@ -236,7 +236,7 @@
        label: '上级组件'
      }, {
        value: 'line',
        label: '行'
        label: '数据源'
      }],
      controlFields: [
        {field: 'rootLabel', values: ['fixed', 'supvalue']},
@@ -249,6 +249,7 @@
      field: 'rootValue',
      label: '根节点值',
      initval: card.rootValue || '',
      tooltip: '根节点使用上级组件时,请填写上级组件中对应的字段。',
      required: true
    },
    {
@@ -256,6 +257,7 @@
      field: 'rootLabel',
      label: '根节点文本',
      initval: card.rootLabel || '',
      tooltip: '根节点使用上级组件时,请填写上级组件中对应的字段。',
      required: true
    },
    {
@@ -345,7 +347,7 @@
      field: 'collapsed',
      label: '节点合并',
      initval: card.collapsed || 'false',
      tooltip: '一级节点是否合并。',
      tooltip: '初始化时,一级节点是否合并。',
      required: false,
      options: [
        {value: 'false', label: '否'},
src/menu/components/form/formaction/actionform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
// import { fromJS } from 'immutable'
import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader } from 'antd'
import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, notification } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import { formRule } from '@/utils/option.js'
@@ -409,6 +409,14 @@
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          if (values.intertype === 'outer' && values.sysInterface === 'true' && !values.outerFunc) {
            notification.warning({
              top: 92,
              message: '使用单点系统请填写外部函数!',
              duration: 10
            })
            return
          }
          resolve(values)
        } else {
          reject(err)
src/menu/components/form/formaction/formconfig.jsx
@@ -163,16 +163,16 @@
    {
      type: 'radio',
      key: 'sysInterface',
      label: '系统接口',
      label: '系统类型',
      initVal: card.sysInterface || 'false',
      tooltip: '单点登录系统',
      tooltip: '业务系统指同一sso下的其他业务系统',
      required: true,
      options: [{
        value: 'true',
        text: '是'
        text: '单点'
      }, {
        value: 'false',
        text: '否'
        text: '业务'
      }]
    },
    {
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -194,6 +194,7 @@
          shows.push('cbTable')
        }
        reRequired.outerFunc = false
        if (this.record.sysInterface === 'false') {
          reReadonly.interface = false
          reRequired.interface = true
@@ -202,6 +203,7 @@
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          reRequired.outerFunc = true
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
@@ -273,6 +275,7 @@
          shows.push('cbTable')
        }
        reRequired.outerFunc = false
        if (this.record.sysInterface === 'false') {
          reReadonly.interface = false
          reRequired.interface = true
@@ -281,6 +284,7 @@
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          reRequired.outerFunc = true
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
@@ -321,6 +325,7 @@
        shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
        reRequired.innerFunc = false
        reRequired.callbackFunc = false
        reRequired.outerFunc = false
        if (this.record.sysInterface === 'false') {
          reReadonly.interface = false
@@ -330,6 +335,7 @@
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          reRequired.outerFunc = true
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
@@ -349,6 +355,7 @@
      if (this.record.intertype === 'outer') {
        shows.push('innerFunc', 'sysInterface', 'outerFunc')
        reRequired.innerFunc = false
        reRequired.outerFunc = false
        if (this.record.sysInterface === 'false') {
          reReadonly.interface = false
@@ -358,6 +365,7 @@
        } else if (this.record.sysInterface === 'true') {
          reReadonly.interface = true
          reRequired.interface = false
          reRequired.outerFunc = true
          shows.push('interface')
        } else if (this.record.sysInterface === 'external') {
@@ -421,6 +429,7 @@
          shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
          reRequired.innerFunc = false
          reRequired.callbackFunc = false
          reRequired.outerFunc = false
          if (this.record.sysInterface === 'false') {
            reReadonly.interface = false
@@ -430,6 +439,7 @@
          } else if (this.record.sysInterface === 'true') {
            reReadonly.interface = true
            reRequired.interface = false
            reRequired.outerFunc = true
  
            shows.push('interface')
          } else if (this.record.sysInterface === 'external') {
src/tabviews/custom/components/chart/antv-G6/index.jsx
@@ -1184,7 +1184,8 @@
      _options.push(_item)
    })
    root = this.getTree(root, _options)
    root.nodeNumber = 0
    root = this.getTree(root, _options, root)
    root.children = root.children || []
    if (plot.subtype === 'mindmap') {
@@ -1248,13 +1249,16 @@
    return root
  }
  getTree = (parent, options) => {
  getTree = (parent, options, root) => {
    parent.children = []
    // 添加菜单的子元素
    options = options.filter(option => {
      if (option.$parentId === parent.id) {
        delete option.$parentId
        parent.children.push(option)
        root.nodeNumber++
        return false
      }
      return true
@@ -1264,7 +1268,7 @@
      parent.children = null
    } else {
      parent.children = parent.children.map(item => {
        item = this.getTree(item, options)
        item = this.getTree(item, options, root)
        return item
      })
@@ -1357,7 +1361,7 @@
    graph.render()
    graph.fitView()
    if (plot.collapsed === 'true') {
    if (plot.collapsed === 'true' || data.nodeNumber < 5) {
      graph.zoomTo(1, { x: 0, y: plot.height / 2 })
    }
  }
@@ -1480,7 +1484,7 @@
    if (plot.collapsed === 'true' && plot.dirField) {
      tree.zoomTo(1, { x: width / 2, y: plot.height / 2 })
    } else if (plot.collapsed === 'true') {
    } else if (plot.collapsed === 'true' || data.nodeNumber < 5) {
      tree.zoomTo(1, { x: 0, y: plot.height / 2 })
    }
  }