king
2020-05-05 92108e6c93de657838bbd766a9eb4f27d85e1c2d
2020-05-05
8 文件已重命名
17个文件已修改
17个文件已删除
3个文件已添加
3911 ■■■■ 已修改文件
src/locales/en-US/model.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/model.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/scriptmanage/config.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 627 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.scss 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/settingform/index.jsx 375 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/settingform/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/source.jsx 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/index.jsx 345 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/formtabconfig/source.jsx 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartcomponent/chartcompile/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartcomponent/index.jsx 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartcomponent/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/chartgroupcomponent/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/fieldscomponent/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/searchcomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tablecomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/index.jsx 383 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/index.scss 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/tabdragelement/card.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/tabdragelement/index.jsx 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/tabdragelement/index.scss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/tabform/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/tabscomponent/tabform/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/settingform/index.jsx 352 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/settingform/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/chartform/index.jsx 379 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/chartform/index.scss 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/dragelform/card.jsx 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/dragelform/index.jsx 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/dragelform/index.scss 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/dragelform/itemtypes.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/dragelform/source.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/searcheditable/index.jsx 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/searcheditable/index.scss 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/tabdragelement/index.scss 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/viewdragelement/card.jsx 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/viewdragelement/index.jsx 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/viewdragelement/index.scss 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/en-US/model.js
@@ -246,6 +246,7 @@
  'model.tooltip.search.guide': '在左侧工具栏《搜索》中,选择对应搜索框拖至此处添加;或点击按钮《添加搜索条件》批量添加,选择批量添加时,需提前选择使用表。',
  'model.tooltip.action.guide': '在左侧工具栏《按钮》中,选择对应类型的按钮拖至此处添加,如选择按钮类型为表单、新标签页等含有配置页面的按钮,可在左侧工具栏-按钮-可配置按钮处,点击按钮完成相关配置。注:当设置按钮显示位置为表格时,显示列会增加操作列。',
  'model.tooltip.column.guide': '在左侧工具栏《显示列》中,选择对应类型的显示列拖至此处添加;或点击《添加显示列》按钮批量添加,选择批量添加时,需提前选择使用表。注:添加合并列时,需设置可选列。',
  'model.tooltip.tabs.guide': '在左侧工具栏《标签页》中,选择对应类型的标签页拖至此处添加。',
  'model.tooltip.func.innerface': '内部接口: 可自定义数据处理函数,函数名称需以@ableField等字符开始;未设置时会调用系统函数,使用系统函数需完善数据源及操作类型;',
  'model.tooltip.func.outface': '外部接口: 可自定义数据处理函数,提交数据经过内部函数处理后,传入外部接口,未设置时,数据会直接传入外部接口。',
}
src/locales/zh-CN/model.js
@@ -246,6 +246,7 @@
  'model.tooltip.search.guide': '在左侧工具栏《搜索》中,选择对应搜索框拖至此处添加;或点击按钮《添加搜索条件》批量添加,选择批量添加时,需提前选择使用表。',
  'model.tooltip.action.guide': '在左侧工具栏《按钮》中,选择对应类型的按钮拖至此处添加,如选择按钮类型为表单、新标签页等含有配置页面的按钮,可在左侧工具栏-按钮-可配置按钮处,点击按钮完成相关配置。注:当设置按钮显示位置为表格时,显示列会增加操作列。',
  'model.tooltip.column.guide': '在左侧工具栏《显示列》中,选择对应类型的显示列拖至此处添加;或点击《添加显示列》按钮批量添加,选择批量添加时,需提前选择使用表。注:添加合并列时,需设置可选列。',
  'model.tooltip.tabs.guide': '在左侧工具栏《标签页》中,选择对应类型的标签页拖至此处添加。',
  'model.tooltip.func.innerface': '内部接口: 可自定义数据处理函数,函数名称需以@ableField等字符开始;未设置时会调用系统函数,使用系统函数需完善数据源及操作类型;',
  'model.tooltip.func.outface': '外部接口: 可自定义数据处理函数,提交数据经过内部函数处理后,传入外部接口,未设置时,数据会直接传入外部接口。',
}
src/tabviews/scriptmanage/config.jsx
@@ -11,8 +11,7 @@
    "columnfixed":false,
    "primaryKey":"ID",
    "order":"ID desc",
    "onload":"true",
    "subtabs":[]
    "onload":"true"
  },
  tables: [{"TbName":"s_custom_script","Remark":"自定义脚本"}],
  search: [
src/templates/comtableconfig/index.jsx
@@ -4,7 +4,7 @@
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
import { Button, Card, Modal, Collapse, notification, Spin, Icon, Switch, Tooltip } from 'antd'
import { Button, Card, Modal, Collapse, notification, Spin, Icon, Switch, Tooltip, Col } from 'antd'
import moment from 'moment'
import Api from '@/api'
@@ -16,19 +16,16 @@
import asyncComponent from '@/utils/asyncComponent'
import TableComponent from '@/templates/sharecomponent/tablecomponent'
import FieldsComponent from '@/templates/sharecomponent/fieldscomponent'
// import ChartGroupComponent from '@/templates/sharecomponent/chartgroupcomponent'
import ChartGroupComponent from '@/templates/sharecomponent/chartgroupcomponent'
import SearchComponent from '@/templates/sharecomponent/searchcomponent'
import ActionComponent from '@/templates/sharecomponent/actioncomponent'
import ColumnComponent from '@/templates/sharecomponent/columncomponent'
import TabsComponent from '@/templates/sharecomponent/tabscomponent'
import ChartComponent from '@/templates/sharecomponent/chartcomponent'
// import SettingForm from './settingform'
import TabForm from '@/templates/zshare/tabform'
import MenuForm from '@/templates/zshare/menuform'
import TabDragElement from '@/templates/zshare/tabdragelement'
import EditComponent from '@/templates/zshare/editcomponent'
import SourceElement from '@/templates/zshare/dragsource'
// import CreateFunc from '@/templates/zshare/createfunc'
// import CreateInterface from '@/templates/zshare/createinterface'
import Source from './source'
import './index.scss'
@@ -52,7 +49,6 @@
    fields: null,            // 搜索条件及显示列,可选字段
    menuformlist: null,      // 基本信息表单字段
    formlist: null,          // 搜索条件、按钮、显示列表单字段
    modaltype: '',           // 模态框类型,控制模态框显示
    card: null,              // 编辑元素
    menuloading: false,      // 菜单保存中
    menucloseloading: false, // 菜单关闭时,选择保存
@@ -67,7 +63,7 @@
    optionLibs: null,        // 自定义下拉选项库
    thawButtons: [],         // 已选择要解冻的按钮
    activeKey: '0',          // 默认展开基本信息
    sqlVerifing: false,      // sql验证
    chartview: null,         // 当前视图
    pasteContent: null       // 粘贴配置信息
  }
@@ -109,10 +105,40 @@
    // 配置默认值,兼容
    _config.tabs = _config.tabs || []
    _config.tabgroups = _config.tabgroups || ['tabs']
    _config.setting.subtabs = _config.setting.subtabs || []
    _config.Template = 'CommonTable'
    _config.easyCode = _config.easyCode || ''
    if (!_config.tabgroups) {
      _config.tabgroups = [{ uuid: 'tabs', sublist: [] }]
    } else if (typeof(_config.tabgroups[0]) === 'string') {
      let _tabgroups = []
      _config.tabgroups.forEach(groupId => {
        let _group = {
          uuid: groupId,
          sublist: fromJS(_config[groupId]).toJS()
        }
        delete _config[groupId]
        _tabgroups.push(_group)
      })
      _config.tabgroups = _tabgroups
    }
    // 兼容图表
    if (!_config.charts) {
      _config.expand = false
      _config.charts = [{
        uuid: Utils.getuuid(),
        label: '',
        title: '',
        chartType: 'table',
        icon: 'table',
        Hide: 'false',
        blacklist: []
      }]
    }
    
    let _oriActions = []
    if (_config.type === 'user') {
@@ -143,7 +169,7 @@
      // 重置标签ID
      _config.tabgroups.forEach(group => {
        _config[group] = _config[group].map(tab => {
        group.sublist = group.sublist.map(tab => {
          tab.uuid = Utils.getuuid()
          
          if (tab.linkTab) {
@@ -156,6 +182,7 @@
    }
    this.setState({
      chartview: _config.charts[0].uuid,
      config: _config,
      activeKey: menu.activeKey || '0',
      optionLibs: optionLibs,
@@ -225,246 +252,6 @@
  }
  /**
   * @description 元素添加或拖动时顺序变化
   */
  handleList = (type, list, card) => {
    const { config } = this.state
    if (list.length > config[card.groupId].length) {
      list = list.filter(item => !item.origin)
      this.handleTab(card)
    }
    this.setState({config: {...config, [card.groupId]: list}})
  }
  /**
   * @description 标签编辑,筛选可选的下级标签与已关联的下级标签
   */
  handleTab = (card) => {
    const { config } = this.state
    let menus = [
      {value: '', text: '空'},
      {value: 'mainTable', text: '主表'}
    ]
    let equalTabs = []
    let supMenu = card.supMenu || ''
    let equalTab = card.equalTab || []
    let isuptab = true
    let equalTabIds = []
    config.tabgroups.forEach((groupId, i) => {
      if (groupId === card.groupId) {
        isuptab = false
        config[card.groupId].forEach(tab => { // 可关联的同级标签
          if (tab.uuid === card.uuid) return
          equalTabIds.push(tab.uuid)
          equalTabs.push(tab)
        })
      } else if (isuptab) {
        config[groupId].forEach(tab => {
          menus.push({
            value: tab.uuid,
            text: tab.label
          })
        })
      }
    })
    if (supMenu && menus.filter(menu => menu.value === supMenu).length === 0) {
      supMenu = ''
    }
    if (equalTab.length > 0) {
      equalTab = equalTab.filter(tabId => equalTabIds.includes(tabId))
    }
    this.setState({
      modaltype: 'tabs',
      card: card,
      formlist: [
        {
          type: 'text',
          key: 'label',
          label: this.state.dict['header.menu.tabName'],
          initVal: card.label || '',
          required: true
        },
        {
          type: 'select',
          key: 'type',
          label: this.state.dict['header.form.tabType'],
          initVal: card.type || 'SubTable',
          required: true,
          options: [{
            value: 'SubTable',
            text: this.state.dict['header.menu.tab.subtable']
          }]
        },
        {
          type: 'select',
          key: 'linkTab',
          label: this.state.dict['header.form.linkTab'],
          initVal: card.linkTab || '',
          required: false,
          options: []
        },
        {
          type: 'select',
          key: 'icon',
          label: this.state.dict['header.menu.icon'],
          initVal: card.icon || '',
          required: false,
          options: [{
            value: '',
            text: this.state.dict['header.form.empty']
          }, {
            value: 'table',
            text: 'table'
          }, {
            value: 'bar-chart',
            text: 'bar-chart'
          }, {
            value: 'pie-chart',
            text: 'pie-chart'
          }, {
            value: 'line-chart',
            text: 'line-chart'
          }]
        },
        {
          type: 'select',
          key: 'supMenu',
          label: this.state.dict['header.form.supTab'],
          initVal: supMenu,
          required: false,
          options: menus
        },
        {
          type: 'mutilselect',
          key: 'equalTab',
          label: this.state.dict['header.form.equalTab'],
          tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
          initVal: equalTab,
          required: false,
          options: equalTabs
        },
        {
          type: 'text',
          key: 'foreignKey',
          label: '外键',
          tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段',
          initVal: card.foreignKey || '',
          required: false
        },
        {
          type: 'radio',
          key: 'searchPass',
          label: '主表搜索',
          initVal: card.searchPass || 'false',
          tooltip: '使用主表搜索条件时,主表的搜索条件会传入子表中。',
          required: false,
          options: [{
            value: 'true',
            text: '使用'
          }, {
            value: 'false',
            text: '不使用'
          }]
        }
      ]
    })
  }
  /**
   * @description 标签修改后提交保存
   */
  handleSubmit = () => {
    const { config } = this.state
    this.tabsFormRef.handleConfirm().then(res => {
      let _tabgroup = config[res.groupId].map(item => {
        if (item.uuid === res.uuid) {
          return res
        } else {
          return item
        }
      })
      _tabgroup = _tabgroup.filter(item => !item.origin)
      this.setState({
        config: {...config, [res.groupId]: _tabgroup},
        modaltype: ''
      })
    })
  }
  /**
   * @description 取消保存,如果元素为新添元素,则从序列中删除
   */
  editModalCancel = () => {
    const { config, card } = this.state
    if (card && card.focus) {
      let _config = null
      let _tabgroup = config[card.groupId].filter(item => item.uuid !== card.uuid)
      _config = {...config, [card.groupId]: _tabgroup}
      this.setState({
        card: null,
        config: _config,
        modaltype: ''
      })
    } else {
      this.setState({
        card: null,
        modaltype: ''
      })
    }
  }
  deleteElement = (element) => {
    const { config, thawButtons } = this.state
    let _this = this
    confirm({
      content: `确定删除<<${element.card.label}>>吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        let _config = null
        if (element.type === 'tabs') {
          let _tabgroup = config[element.card.groupId].filter(item => {
            if (item.uuid === element.card.uuid) {
              return false
            } else {
              return true
            }
          })
          _config = {...config, [element.card.groupId]: _tabgroup}
        }
        // 删除按钮元素
        let _delActions = _this.state.delActions
        if (element.type === 'action' || element.type === 'tabs') {
          _delActions.push(element)
        }
        _this.setState({
          config: _config,
          delActions: _delActions,
          thawButtons: thawButtons.filter(key => key !== element.card.uuid)
        })
      },
      onCancel() {}
    })
  }
  /**
   * @description 三级菜单切换模板
   */
  changeTemplate = () => {
@@ -506,48 +293,10 @@
    this.menuformRef.handleConfirm().then(res => {
      if (config.isAdd) {
        if (config.search[0] && config.search[0].origin) {
          config.search = config.search.filter(item => !item.origin)
        }
        if (config.action[0] && config.action[0].origin) {
          config.action = config.action.filter(item => !item.origin)
        }
        if (config.columns[0] && config.columns[0].origin) {
          config.columns = config.columns.filter(item => !item.origin)
        }
        if (config.tabs[0] && config.tabs[0].origin) {
          config.tabs = config.tabs.filter(item => !item.origin)
        }
      }
      let btnNames = config.action.map(item => item.label)
      btnNames = Array.from(new Set(btnNames))
      if (btnNames.length < config.action.length) {
        notification.warning({
          top: 92,
          message: '按钮名称不可相同!',
          duration: 5
        })
        return
      }
      let tabNames = []
      let tablength = 0
      config.tabgroups.forEach(group => {
        config[group].forEach(tab => {
          tabNames.push(tab.label)
        })
        tablength += config[group].length
      })
      tabNames = Array.from(new Set(tabNames))
      if (tabNames.length < tablength) {
        notification.warning({
          top: 92,
          message: '标签名称不可相同!',
          duration: 5
        })
        return
        config.search = config.search.filter(item => !item.origin)
        config.action = config.action.filter(item => !item.origin)
        config.columns = config.columns.filter(item => !item.origin)
        config.tabgroups[0].sublist = config.tabgroups[0].sublist.filter(item => !item.origin)
      }
      if (config.type === 'user') { // 使用已有菜单时,默认添加关联标签id
@@ -559,11 +308,10 @@
        })
    
        config.tabgroups.forEach(group => {
          config[group] = config[group].map(tab => {
          group.sublist = group.sublist.map(tab => {
            if (!tab.linkTab) {
              tab.linkTab = Utils.getuuid()
            }
            return tab
          })
        })
@@ -574,16 +322,9 @@
      let _pageParam = {...menu.PageParam, OpenType: res.opentype}
      // 未设置数据源或标签不合法时,启用状态为false
      if (_config.setting.interType === 'inner' && !_config.setting.innerFunc && !_config.setting.dataresource) {
      let vresult = this.verifyconfig(_config)
      if (vresult !== true) {
        _config.enabled = false
      } else if (!_config.setting.primaryKey) {
        _config.enabled = false
      } else if (_config.tabgroups.length > 1) {
        _config.tabgroups.forEach(group => {
          if (_config[group].length === 0) {
            _config.enabled = false
          }
        })
      }
      _config.funcs = [] // 页面及子页面存储过程集
@@ -638,10 +379,8 @@
        }
      })
      _config.tabgroups.forEach(groupId => {
        if (_config[groupId].length === 0) return
        _config[groupId].forEach(tab => {
      _config.tabgroups.forEach(group => {
        group.sublist.forEach(tab => {
          _config.funcs.push({
            type: 'tab',
            subtype: 'tab',
@@ -766,8 +505,8 @@
        btntabs.forEach(item => {
          _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`)
        })
        _config.tabgroups.forEach(groupId => {
          _config[groupId].forEach(item => {
        _config.tabgroups.forEach(group => {
          group.sublist.forEach(item => {
            _sort++
            _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
          })
@@ -1071,13 +810,27 @@
                    return _btn
                  })
                  _subconfig.tabgroups.forEach(_groupId => {
                    _subconfig[_groupId] = _subconfig[_groupId].map(_tab => {
                      _tab.uuid = Utils.getuuid()
                      if (_tab.linkTab) {
                        _tab.linkTab = ''
                  // 兼容已有结构
                  if (!_subconfig.tabgroups) {
                    _subconfig.tabgroups = [{ uuid: 'tabs', sublist: [] }]
                  } else if (typeof(_subconfig.tabgroups[0]) === 'string') {
                    let _tabgroups = []
                    _subconfig.tabgroups.forEach(groupId => {
                      let _group = {
                        uuid: groupId,
                        sublist: fromJS(_subconfig[groupId]).toJS()
                      }
                      delete _subconfig[groupId]
                      _tabgroups.push(_group)
                    })
                    _subconfig.tabgroups = _tabgroups
                  }
                  _subconfig.tabgroups.forEach(group => {
                    group.sublist = group.sublist.map(_tab => {
                      _tab.uuid = Utils.getuuid()
                      _tab.linkTab = Utils.getuuid()
                      return _tab
                    })
@@ -1316,107 +1069,44 @@
  onEnabledChange = () => {
    const { config } = this.state
    let _enabled = !config.enabled
    let result = this.verifyconfig(config)
    if (_enabled && result !== true) {
      notification.warning({
        top: 92,
        message: result,
        duration: 5
      })
      return
    }
    this.setState({
      config: {...config, enabled: _enabled}
    })
  }
  /**
   * @description 校验配置信息的合法性
   */
  verifyconfig = (config) => {
    let tabinvalid = true
    if (config.tabgroups.length > 1) {
      config.tabgroups.forEach(group => {
        if (config[group].length === 0) {
        if (group.sublist.length === 0) {
          tabinvalid = false
        }
      })
    }
    if (config.setting.interType === 'inner' && !config.setting.innerFunc && !config.setting.dataresource) {
      notification.warning({
        top: 92,
        message: '菜单尚未设置数据源,不可启用!',
        duration: 5
      })
      return '菜单尚未设置数据源,不可启用!'
    } else if (!config.setting.primaryKey) {
      notification.warning({
        top: 92,
        message: '菜单尚未设置主键,不可启用!',
        duration: 5
      })
      return '菜单尚未设置主键,不可启用!'
    } else if (!tabinvalid) {
      notification.warning({
        top: 92,
        message: '菜单标签页设置错误(多行标签内,行标签不可为空),不可启用!',
        duration: 5
      })
      return '菜单标签页设置错误(存在多行标签时,行标签不可为空)!'
    } else {
      this.setState({
        config: {...config, enabled: !config.enabled}
      })
      return true
    }
  }
  /**
   * @description 增加标签页分组
   */
  addTabGroup = () => {
    let _this = this
    let _config = fromJS(this.state.config).toJS()
    confirm({
      content: `确定新建标签组吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        let newgroup = 'tabs' + Utils.getuuid()
        _config.tabgroups.push(newgroup)
        _config[newgroup] = []
        _this.setState({
          config: _config
        })
      },
      onCancel() {}
    })
  }
  /**
   * @description 删除标签页分组
   */
  delTabGroup = (groupId) => {
    let _this = this
    let _config = fromJS(this.state.config).toJS()
    confirm({
      content: `确定删除标签组吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        _config.tabgroups = _config.tabgroups.filter(group => group !== groupId)
        delete _config[groupId]
        _this.setState({
          config: _config
        })
      },
      onCancel() {}
    })
  }
  handleGroup = (index, type) => {
    let config = fromJS(this.state.config).toJS()
    if (type === 'up') {
      config.tabgroups.splice(index, 0, config.tabgroups.splice(index - 1, 1)[0])
    } else {
      config.tabgroups.splice(index, 0, config.tabgroups.splice(index + 1, 1)[0])
    }
    this.setState({
      config: config
    })
    notification.success({
      top: 92,
      message: '调整成功',
      duration: 2
    })
  }
  /**
@@ -1501,6 +1191,18 @@
  }
  /**
   * @description 更新标签配置信息
   */
  updatetabs = (config, delcards) => {
    const { delActions } = this.state
    this.setState({
      config: config,
      delActions: delcards ? [...delActions, ...delcards] : delActions
    })
  }
  /**
   * @description 更新配置信息
   */
  updateconfig = (config) => {
@@ -1510,13 +1212,13 @@
  }
  render () {
    const { modaltype, activeKey, config } = this.state
    const { activeKey, config, chartview } = this.state
    const confActions = config.action.filter(_action => !_action.origin && ['pop', 'popview', 'blank', 'tab'].includes(_action.OpenType))
    let configTabs = []
    config.tabgroups.forEach(group => {
      configTabs.push(...config[group])
      configTabs.push(...group.sublist)
    })
    return (
@@ -1660,73 +1362,64 @@
                optionLibs={this.state.optionLibs}
                updatesearch={this.updatesearch}
              />
              <ActionComponent
              <div className="chart-view" style={{position: 'relative'}}>
                {/* 视图组 */}
                <ChartGroupComponent
                  config={config}
                  sysRoles={this.props.sysRoles}
                  updatechartgroup={this.updatechartgroup}
                />
                {config.charts.map(item => {
                  if (!config.expand && chartview !== item.uuid) return ''
                  if (item.chartType === 'table') {
                    return (
                      <Col span={item.width || 24} key={item.uuid}>
                        {config.charts.length > 1 ? <p className="chart-title">{item.title}</p> : null}
                        <ActionComponent
                          type="main"
                          menu={{ MenuID: this.props.menu.MenuID, MenuName: this.props.menu.MenuName, MenuNo: this.props.menu.MenuNo }}
                          config={config}
                          tabs={this.state.tabviews}
                          menuformRef={this.menuformRef}
                          pasteContent={this.state.pasteContent}
                          usefulFields={this.props.permFuncField}
                          setSubConfig={(_btn) => this.setSubConfig(_btn, 'button')}
                          updateaction={this.updateaction}
                        />
                        <ColumnComponent
                          config={config}
                          menu={this.props.menu}
                          sysRoles={this.props.sysRoles}
                          pasteContent={this.state.pasteContent}
                          updatecolumn={this.updateconfig}
                        />
                      </Col>
                    )
                  } else {
                    return (
                      <Col span={item.width} key={item.uuid}>
                        <ChartComponent
                          plot={item}
                          config={config}
                          plotchange={this.updateconfig}
                        />
                      </Col>
                    )
                  }
                })}
              </div>
              {/* 标签组 */}
              <TabsComponent
                type="main"
                menu={{ MenuID: this.props.menu.MenuID, MenuName: this.props.menu.MenuName, MenuNo: this.props.menu.MenuNo }}
                config={config}
                tabs={this.state.tabviews}
                menuformRef={this.menuformRef}
                pasteContent={this.state.pasteContent}
                usefulFields={this.props.permFuncField}
                setSubConfig={(_btn) => this.setSubConfig(_btn, 'button')}
                updateaction={this.updateaction}
                setSubConfig={(item) => this.setSubConfig(item, 'tab')}
                updatetabs={this.updatetabs}
              />
              {/* 显示列 */}
              <ColumnComponent
                config={config}
                menu={this.props.menu}
                sysRoles={this.props.sysRoles}
                pasteContent={this.state.pasteContent}
                updatecolumn={this.updateconfig}
              />
              {/* 标签组 */}
              {config.tabgroups.map((groupId, index) => {
                return (
                  <div key={index} className="tab-list">
                    {index === 0 ? <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《标签页》中,选择对应类型的标签页拖至此处添加。">
                      <Icon type="question-circle" />
                    </Tooltip> : null}
                    {index !== (config.tabgroups.length - 1) ?
                      <Icon type="arrow-down" onClick={() => {this.handleGroup(index, 'down')}} /> : null
                    }
                    {index !== 0 ? <Icon type="arrow-up" onClick={() => {this.handleGroup(index, 'up')}} /> : null}
                    {index === 0 ? <Icon type="plus" onClick={this.addTabGroup} /> : null}
                    {index !== 0 ? <Icon type="delete" onClick={() => {this.delTabGroup(groupId)}} /> : null}
                    <TabDragElement
                      type="tabs"
                      groupId={groupId}
                      list={config[groupId]}
                      handleList={this.handleList}
                      handleMenu={this.handleTab}
                      deleteMenu={this.deleteElement}
                      doubleClickCard={(tab) => this.setSubConfig(tab, 'tab')}
                      placeholder={this.state.dict['header.form.tab.placeholder']}
                    />
                  </div>)
              })}
            </Card>
          </div>
        </DndProvider>
        {/* 标签编辑 */}
        <Modal
          title={this.state.dict['header.modal.tabs.edit']}
          visible={modaltype === 'tabs'}
          width={750}
          maskClosable={false}
          onOk={this.handleSubmit}
          onCancel={this.editModalCancel}
          destroyOnClose
        >
          <TabForm
            type="tabs"
            dict={this.state.dict}
            card={this.state.card}
            tabs={this.state.tabviews}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            wrappedComponentRef={(inst) => this.tabsFormRef = inst}
          />
        </Modal>
        {/* 返回时未保存提示 */}
        <Modal
          bodyStyle={{textAlign: 'center', color: '#000000', fontSize: '16px'}}
src/templates/comtableconfig/index.scss
@@ -170,117 +170,25 @@
      position: relative;
      padding: 0 0 40px;
      .tab-list {
        position: relative;
        padding: 30px 20px 0px;
        .ant-switch {
          position: absolute;
          right: 20px;
          top: 20px;
        }
        > .ant-row {
          min-height: 47px;
          .page-card {
            position: relative;
            padding: 0px;
            > div {
              padding: 12px 0px 0px;
              cursor: move;
            }
          }
          .ant-tabs-tab {
            cursor: default;
            .edit {
              position: absolute;
              left: 0;
              top: 0px;
              color: #1890ff;
              cursor: pointer;
              display: none;
            }
            .edit.close {
              left: 20px;
              color: #ff4d4f;
            }
          }
          .ant-tabs-bar {
            min-height: 55px;
          }
          .ant-tabs-tab:hover {
            .edit {
              display: inline-block;
            }
          }
          .ant-tabs-content {
            .ant-tabs-tabpane img {
              width: 100%;
            }
          }
        }
        > .anticon-question-circle {
          color: #c49f47;
          position: absolute;
          left: 5px;
          top: 20px;
        }
        > .anticon-plus {
          position: absolute;
      .chart-view {
        margin-bottom: 70px;
        .chart-title {
          margin-bottom: 15px;
          color: rgba(0, 0, 0, 0.85);
          font-weight: 400;
          font-size: 18px;
          right: 25px;
          top: 50px;
          z-index: 1;
          color: #26C281;
          cursor: pointer;
        }
        > .anticon-delete {
          position: absolute;
          font-size: 19px;
          right: 25px;
          top: 50px;
          z-index: 1;
          color: #ff4d4f;
          cursor: pointer;
        }
        > .anticon-arrow-up {
          position: absolute;
          right: 55px;
          font-size: 19px;
          z-index: 1;
          top: 50px;
          color: #1890ff;
          cursor: pointer;
        }
        > .anticon-arrow-down {
          position: absolute;
          right: 55px;
          font-size: 19px;
          z-index: 1;
          top: 50px;
          color: purple;
          cursor: pointer;
        }
        > .anticon-arrow-down + .anticon-arrow-up {
          right: 85px;
        }
        .ant-tabs-nav-container-scrolling {
          margin-right: 50px;
          line-height: 25px;
          height: 35px;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
          max-width: 50%;
          padding-top: 10px;
          padding-left: 30px;
        }
      }
      // > .anticon-setting {
      //   position: absolute;
      //   font-size: 18px;
      //   right: 7px;
      //   top: 10px;
      //   padding: 10px;
      //   z-index: 1;
      // }
    }
    // .anticon-question-circle {
    //   color: #c49f47;
    //   position: relative;
    //   left: -15px;
    //   top: 5px;
    // }
  }
  .setting {
    overflow-y: scroll;
src/templates/comtableconfig/settingform/index.jsx
File was deleted
src/templates/comtableconfig/settingform/index.scss
File was deleted
src/templates/comtableconfig/source.jsx
@@ -22,8 +22,7 @@
      innerFunc: '',
      interface: '',
      outerFunc: '',
      onload: 'true',
      subtabs: []
      onload: 'true'
    },
    tables: [],
    search: [
@@ -170,31 +169,37 @@
      show: 'horizontal',
      Width: 120
    },
    tabs: [
      {
        origin: true,          // 是否为示例
        groupId: 'tabs',
        uuid: Utils.getuuid(),
        label: 'tab1',
        icon: '',
        type: 'SubTable',
        linkTab: '',
        subtabs: [],
        supMenu: ''
      },
      {
        origin: true,
        groupId: 'tabs',
        uuid: Utils.getuuid(),
        label: 'tab2',
        icon: '',
        type: 'SubTable',
        linkTab: '',
        subtabs: [],
        supMenu: ''
      }
    ],
    tabgroups: ['tabs']
    tabgroups: [{
      uuid: 'tabs',
      sublist: [
        {
          origin: true,          // 是否为示例
          uuid: Utils.getuuid(),
          label: 'tab1',
          type: 'SubTable',
          linkTab: '',
          supMenu: ''
        },
        {
          origin: true,
          uuid: Utils.getuuid(),
          label: 'tab2',
          type: 'SubTable',
          linkTab: '',
          supMenu: ''
        }
      ]
    }],
    expand: false,
    charts: [{
      uuid: Utils.getuuid(),
      label: '',
      title: '',
      chartType: 'table',
      icon: 'table',
      Hide: 'false',
      blacklist: []
    }]
  }
  searchItems = [
src/templates/formtabconfig/index.jsx
@@ -14,17 +14,17 @@
import { getModalForm, getActionForm } from '@/templates/zshare/formconfig'
import { queryTableSql } from '@/utils/option.js'
import TabsComponent from '@/templates/sharecomponent/tabscomponent'
import ModalForm from '@/templates/zshare/modalform'
import PasteForm from '@/templates/zshare/pasteform'
import ActionForm from './actionform'
import SettingForm from './settingform'
import DragElement from './dragelement'
import GroupForm from './groupform'
import TabForm from '@/templates/zshare/tabform'
import EditCard from '@/templates/zshare/editcard'
import VerifyCard from '@/templates/zshare/verifycard'
import MenuForm from '@/templates/zshare/menuform'
import TabDragElement from '@/templates/zshare/tabdragelement'
import SourceElement from '@/templates/zshare/dragsource'
import CreateFunc from '@/templates/zshare/createfunc'
import Source from './source'
@@ -121,6 +121,24 @@
          }
        })
      })
    }
    if (!_config.tabgroups) {
      _config.tabgroups = [{ uuid: 'tabs', sublist: [] }]
    } else if (typeof(_config.tabgroups[0]) === 'string') {
      let _tabgroups = []
      _config.tabgroups.forEach(groupId => {
        let _group = {
          uuid: groupId,
          sublist: fromJS(_config[groupId]).toJS()
        }
        delete _config[groupId]
        _tabgroups.push(_group)
      })
      _config.tabgroups = _tabgroups
    }
    if (menu && menu.LongParam && menu.LongParam.columns) {
@@ -348,15 +366,7 @@
  handleList = (type, list, card, groupId, elementId) => {
    const { config } = this.state
    if (type === 'tabs') { // 标签页调整顺序或添加元素
      if (list.length > config[card.groupId].length) {
        list = list.filter(item => !item.origin)
        this.handleTab(card)
      }
      this.setState({config: {...config, [card.groupId]: list}})
    } else if (type === 'action') {
    if (type === 'action') {
      if (list.length > config.action.length) {
  
        this.handleAction(card)
@@ -509,127 +519,6 @@
    })
  }
  handleTab = (card) => {
    const { config } = this.state
    let menus = [
      {value: '', text: '空'},
      {value: 'mainTable', text: '主数据'}
    ]
    let equalTabs = []
    let supMenu = card.supMenu || ''
    let equalTab = card.equalTab || []
    let isuptab = true
    let equalTabIds = []
    config.tabgroups.forEach((groupId, i) => {
      if (groupId === card.groupId) {
        isuptab = false
        config[card.groupId].forEach(tab => { // 可关联的同级标签
          if (tab.uuid === card.uuid) return
          equalTabIds.push(tab.uuid)
          equalTabs.push(tab)
        })
      } else if (isuptab) {
        config[groupId].forEach(tab => {
          menus.push({
            value: tab.uuid,
            text: tab.label
          })
        })
      }
    })
    if (supMenu && menus.filter(menu => menu.value === supMenu).length === 0) {
      supMenu = ''
    }
    if (equalTab.length > 0) {
      equalTab = equalTab.filter(tabId => equalTabIds.includes(tabId))
    }
    this.setState({
      modaltype: 'tabs',
      card: card,
      formlist: [
        {
          type: 'text',
          key: 'label',
          label: this.state.dict['header.menu.tabName'],
          initVal: card.label || '',
          required: true
        },
        {
          type: 'select',
          key: 'type',
          label: this.state.dict['header.form.tabType'],
          initVal: card.type || 'SubTable',
          required: true,
          options: [{
            value: 'SubTable',
            text: this.state.dict['header.menu.tab.subtable']
          }]
        },
        {
          type: 'select',
          key: 'linkTab',
          label: '关联标签',
          initVal: card.linkTab || '',
          required: false,
          options: []
        },
        {
          type: 'select',
          key: 'icon',
          label: this.state.dict['header.menu.icon'],
          initVal: card.icon || '',
          required: false,
          options: [{
            value: '',
            text: this.state.dict['header.form.empty']
          }, {
            value: 'table',
            text: 'table'
          }, {
            value: 'bar-chart',
            text: 'bar-chart'
          }, {
            value: 'pie-chart',
            text: 'pie-chart'
          }, {
            value: 'line-chart',
            text: 'line-chart'
          }]
        },
        {
          type: 'select',
          key: 'supMenu',
          label: this.state.dict['header.form.supTab'],
          initVal: supMenu,
          required: false,
          options: menus
        },
        {
          type: 'mutilselect',
          key: 'equalTab',
          label: this.state.dict['header.form.equalTab'],
          tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
          initVal: equalTab,
          required: false,
          options: equalTabs
        },
        {
          type: 'text',
          key: 'foreignKey',
          label: '外键',
          tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段',
          initVal: card.foreignKey || '',
          required: false
        }
      ]
    })
  }
  /**
   * @description 搜索、按钮、显示列修改后提交保存
@@ -789,22 +678,6 @@
          modaltype: ''
        })
      })
    } else if (modaltype === 'tabs') {
      this.tabsFormRef.handleConfirm().then(res => {
        let _tabgroup = config[res.groupId].map(item => {
          if (item.uuid === res.uuid) {
            return res
          } else {
            return item
          }
        })
        _tabgroup = _tabgroup.filter(item => !item.origin)
        this.setState({
          config: {...config, [res.groupId]: _tabgroup},
          modaltype: ''
        })
      })
    }
  }
@@ -822,9 +695,6 @@
      } else if (modaltype === 'actionEdit') {
        let _action = config.action.filter(item => item.uuid !== card.uuid)
        _config = {...config, action: _action}
      } else if (modaltype === 'tabs') {
        let _tabgroup = config[card.groupId].filter(item => item.uuid !== card.uuid)
        _config = {...config, [card.groupId]: _tabgroup}
      } else {
        _config = config
      }
@@ -959,16 +829,7 @@
        let _config = JSON.parse(JSON.stringify(_this.state.config))
        let _delActions = _this.state.delActions
        if (element.type === 'tabs') {
          _config[element.card.groupId] = _config[element.card.groupId].filter(item => {
            if (item.uuid === element.card.uuid) {
              return false
            } else {
              return true
            }
          })
          _delActions.push(element.card.uuid)
        } else if (element.type === 'search') {
        if (element.type === 'search') {
          _config.groups = _config.groups.map(group => {
            group.sublist = group.sublist.filter(item => item.uuid !== element.card.uuid)
            return group
@@ -1057,25 +918,6 @@
        return
      }
      let tabNames = []
      let tablength = 0
      config.tabgroups.forEach(group => {
        config[group].forEach(tab => {
          tabNames.push(tab.label)
        })
        tablength += config[group].length
      })
      tabNames = Array.from(new Set(tabNames))
      if (tabNames.length < tablength) {
        notification.warning({
          top: 92,
          message: '标签名称不可相同!',
          duration: 5
        })
        return
      }
      let _LongParam = ''
      let _config = {...config, tables: this.state.selectedTables}
@@ -1088,8 +930,8 @@
      // 标签不合法时,启用状态为false
      if (_config.tabgroups.length > 1) {
        _config.tabgroups.forEach(groupId => {
          if (_config[groupId].length === 0) {
        _config.tabgroups.forEach(group => {
          if (group.sublist.length === 0) {
            _config.enabled = false
          }
        })
@@ -1142,10 +984,8 @@
        }
      })
      _config.tabgroups.forEach(groupId => {
        if (_config[groupId].length === 0) return
        _config[groupId].forEach(tab => {
      _config.tabgroups.forEach(group => {
        group.sublist.forEach(tab => {
          _config.funcs.push({
            type: 'tab',
            subtype: 'tab',
@@ -1256,8 +1096,8 @@
        
        let _LText = []
        config.tabgroups.forEach(groupId => {
          config[groupId].forEach(item => {
        config.tabgroups.forEach(group => {
          group.sublist.forEach(item => {
            _sort++
            _LText.push(`select '${btnTab.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
          })
@@ -1792,7 +1632,7 @@
    let tabinvalid = true
    if (config.tabgroups.length > 1) {
      config.tabgroups.forEach(group => {
        if (config[group].length === 0) {
        if (group.sublist.length === 0) {
          tabinvalid = false
        }
      })
@@ -1854,48 +1694,7 @@
    }
  }
  addTabGroup = () => {
    let _this = this
    let _config = JSON.parse(JSON.stringify(this.state.config))
    confirm({
      content: `确定新建标签组吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        let newgroup = 'tabs' + Utils.getuuid()
        _config.tabgroups.push(newgroup)
        _config[newgroup] = []
        _this.setState({
          config: _config,
        })
      },
      onCancel() {}
    })
  }
  delTabGroup = (groupId) => {
    let _this = this
    let _config = JSON.parse(JSON.stringify(this.state.config))
    confirm({
      content: `确定删除标签组吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        _config.tabgroups = _config.tabgroups.filter(group => group !== groupId)
        delete _config[groupId]
        _this.setState({
          config: _config
        })
      },
      onCancel() {}
    })
  }
  handleGroup = (group) => {
    let editgroup = {
@@ -1964,25 +1763,6 @@
    })
  }
  handleTabGroup = (index, type) => {
    let config = JSON.parse(JSON.stringify(this.state.config))
    if (type === 'up') {
      config.tabgroups.splice(index, 0, config.tabgroups.splice(index - 1, 1)[0])
    } else {
      config.tabgroups.splice(index, 0, config.tabgroups.splice(index + 1, 1)[0])
    }
    this.setState({
      config: config
    })
    notification.success({
      top: 92,
      message: '调整成功',
      duration: 2
    })
  }
  pasteSubmit = () => {
    let _config = JSON.parse(JSON.stringify(this.state.config))
@@ -2020,13 +1800,25 @@
    })
  }
  /**
   * @description 更新标签配置信息
   */
  updatetabs = (config, delcards) => {
    const { delActions } = this.state
    this.setState({
      config: config,
      delActions: delcards ? [...delActions, ...delcards.map(item => item.uuid)] : delActions
    })
  }
  render () {
    const { config, modaltype, activeKey } = this.state
    let _length = config.groups.length
    let configTabs = []
    this.state.config.tabgroups.forEach(group => {
      configTabs.push(...this.state.config[group])
    config.tabgroups.forEach(group => {
      configTabs.push(...group.sublist)
    })
    return (
@@ -2196,30 +1988,13 @@
                />
              </div>
              {/* 标签组 */}
              {this.state.config.tabgroups.map((groupId, index) => {
                return (
                  <div key={index} className="tab-list">
                    {index === 0 ? <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《标签页》中,选择对应类型的标签页拖至此处添加。">
                      <Icon type="question-circle" />
                    </Tooltip> : null}
                    {index !== (this.state.config.tabgroups.length - 1) ?
                      <Icon type="arrow-down" onClick={() => {this.handleTabGroup(index, 'down')}} /> : null
                    }
                    {index !== 0 ? <Icon type="arrow-up" onClick={() => {this.handleTabGroup(index, 'up')}} /> : null}
                    {index === 0 ? <Icon type="plus" onClick={this.addTabGroup} /> : null}
                    {index !== 0 ? <Icon type="delete" onClick={() => {this.delTabGroup(groupId)}} /> : null}
                    <TabDragElement
                      type="tabs"
                      groupId={groupId}
                      list={this.state.config[groupId]}
                      handleList={this.handleList}
                      handleMenu={this.handleTab}
                      deleteMenu={this.deleteElement}
                      doubleClickCard={(tab) => this.setSubConfig(tab, 'tab')}
                      placeholder={this.state.dict['header.form.tab.placeholder']}
                    />
                  </div>)
              })}
              <TabsComponent
                type="formtab"
                config={config}
                tabs={this.state.tabviews}
                setSubConfig={(item) => this.setSubConfig(item, 'tab')}
                updatetabs={this.updatetabs}
              />
            </Card>
          </div>
        </DndProvider>
@@ -2265,26 +2040,6 @@
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            wrappedComponentRef={(inst) => this.actionFormRef = inst}
          />
        </Modal>
        {/* 标签编辑 */}
        <Modal
          title={this.state.dict['header.modal.tabs.edit']}
          visible={modaltype === 'tabs'}
          width={700}
          maskClosable={false}
          onOk={this.handleSubmit}
          onCancel={this.editModalCancel}
          destroyOnClose
        >
          <TabForm
            type="tabs"
            dict={this.state.dict}
            card={this.state.card}
            tabs={this.state.tabviews}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            wrappedComponentRef={(inst) => this.tabsFormRef = inst}
          />
        </Modal>
        {/* 根据字段名添加显示列及搜索条件 */}
src/templates/formtabconfig/source.jsx
@@ -92,31 +92,27 @@
        class: 'border-danger'
      }
    ],
    tabs: [
      {
        origin: true,          // 是否为示例
        groupId: 'tabs',
        uuid: Utils.getuuid(),
        label: 'tab1',
        icon: '',
        type: 'SubTable',
        linkTab: '',
        subtabs: [],
        supMenu: ''
      },
      {
        origin: true,
        groupId: 'tabs',
        uuid: Utils.getuuid(),
        label: 'tab2',
        icon: '',
        type: 'SubTable',
        linkTab: '',
        subtabs: [],
        supMenu: ''
      }
    ],
    tabgroups: ['tabs']
    tabgroups: [{
      uuid: 'tabs',
      sublist: [
        {
          origin: true,          // 是否为示例
          uuid: Utils.getuuid(),
          label: 'tab1',
          type: 'SubTable',
          linkTab: '',
          supMenu: ''
        },
        {
          origin: true,
          uuid: Utils.getuuid(),
          label: 'tab2',
          type: 'SubTable',
          linkTab: '',
          supMenu: ''
        }
      ]
    }]
  }
  searchItems = [
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -833,6 +833,15 @@
    }
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { config } = this.props
    const { actionlist, visible, card, dict, copying, profVisible } = this.state
src/templates/sharecomponent/chartcomponent/chartcompile/index.jsx
src/templates/sharecomponent/chartcomponent/chartcompile/index.scss
src/templates/sharecomponent/chartcomponent/index.jsx
File was renamed from src/templates/zshare/chartcomponent/index.jsx
@@ -4,19 +4,20 @@
import { Chart } from '@antv/g2'
import DataSet from '@antv/data-set'
import ChartDrawerForm from '@/templates/zshare/chartcompile'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import ChartDrawerForm from './chartcompile'
import './index.scss'
class LineChart extends Component {
  static propTpyes = {
    type: PropTypes.string,
    dict: PropTypes.object,
    plot: PropTypes.object,
    columns: PropTypes.array,
    config: PropTypes.object,
    plotchange: PropTypes.func
  }
  state = {
    dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS,
    visible: true
  }
@@ -33,12 +34,12 @@
  }
  getdata = (X_axis, Y_axis) => {
    const { type } = this.props
    const { plot } = this.props
    let data = []
    let xdata = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
    let point = 7
    if (type === 'pie') {
    if (plot.chartType === 'pie') {
      xdata = ['事例一', '事例二', '事例三', '事例四', '事例五']
      point = 5
    }
@@ -63,22 +64,22 @@
  }
  viewrender = () => {
    const { type } = this.props
    const { plot } = this.props
    if (type === 'line') {
    if (plot.chartType === 'line') {
      this.linerender()
    } else if (type === 'bar') {
    } else if (plot.chartType === 'bar') {
      this.barrender()
    } else if (type === 'pie') {
    } else if (plot.chartType === 'pie') {
      this.pierender()
    }
  }
  linerender = () => {
    const { plot, columns } = this.props
    const { plot, config } = this.props
    let transfield = {}
    columns.forEach(col => {
    config.columns.forEach(col => {
      if (col.field) {
        transfield[col.field] = col.label
      }
@@ -179,10 +180,10 @@
  }
  barrender = () => {
    const { plot, columns } = this.props
    const { plot, config } = this.props
    let transfield = {}
    columns.forEach(col => {
    config.columns.forEach(col => {
      if (col.field) {
        transfield[col.field] = col.label
      }
@@ -279,10 +280,10 @@
  }
  pierender = () => {
    const { plot, columns } = this.props
    const { plot, config } = this.props
    let transfield = {}
    columns.forEach(col => {
    config.columns.forEach(col => {
      if (col.field) {
        transfield[col.field] = col.label
      }
@@ -416,18 +417,33 @@
  }
  plotChange = (values) => {
    const { plot } = this.props
    const { plot, config } = this.props
    let _plot = {...plot, ...values}
    let _charts = fromJS(config.charts).toJS()
    this.props.plotchange({...plot, ...values})
    _charts = _charts.map(item => {
      if (item.uuid === _plot.uuid) {
        if (!is(fromJS(item), fromJS(_plot))) {
          let _element = document.getElementById(_plot.uuid)
          if (_element) {
            _element.innerHTML = ''
          }
        }
        return _plot
      }
      return item
    })
    this.props.plotchange({...config, charts: _charts})
  }
  render() {
    const { plot, type } = this.props
    const { plot } = this.props
    return (
      <div className="line-chart-edit-box" style={{minHeight: plot.height ? plot.height + 50 : 450}}>
        <p className="chart-title">{plot.title}</p>
        <ChartDrawerForm type={type} columns={this.props.columns} dict={this.props.dict} plot={plot} plotchange={this.plotChange} />
        <ChartDrawerForm type={plot.chartType} columns={this.props.config.columns} dict={this.state.dict} plot={plot} plotchange={this.plotChange} />
        <div className="canvas" id={plot.uuid}></div>
      </div>
    )
src/templates/sharecomponent/chartcomponent/index.scss
src/templates/sharecomponent/chartgroupcomponent/index.jsx
@@ -190,6 +190,14 @@
    this.props.updatechartgroup(config, id)
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { config } = this.props
@@ -208,7 +216,7 @@
          handleMenu={this.handleChart}
          deleteMenu={this.deletechart}
        /> : null}
        {/* 合并列编辑 */}
        {/* 图表信息编辑 */}
        <Modal
          title={modaltype === 'addChart' ? '图表-添加' : '图标-编辑'}
          visible={modaltype === 'addChart' || modaltype === 'editChart'}
src/templates/sharecomponent/columncomponent/index.jsx
@@ -350,6 +350,15 @@
    })
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { config } = this.props
    const { modaltype, columnlist, dict, card } = this.state
src/templates/sharecomponent/fieldscomponent/index.jsx
@@ -205,6 +205,14 @@
    }
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { type } = this.props
src/templates/sharecomponent/searchcomponent/index.jsx
@@ -237,6 +237,15 @@
    })
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { dict, searchlist, visible, sqlVerifing, card } = this.state
src/templates/sharecomponent/settingcomponent/index.jsx
@@ -156,6 +156,15 @@
    })
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { config, type } = this.props
    const { dict, visible } = this.state
src/templates/sharecomponent/tablecomponent/index.jsx
@@ -231,6 +231,15 @@
    this.props.updatetable({...config, tables: _tables}, _fields)
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { containerId } = this.props
    const { dict, tables, selectedTables } = this.state
src/templates/sharecomponent/tabscomponent/index.jsx
New file
@@ -0,0 +1,383 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Icon, Tooltip, Modal, notification } from 'antd'
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { getTabForm } from '@/templates/zshare/formconfig'
import TabForm from './tabform'
import TabDragElement from './tabdragelement'
import './index.scss'
const { confirm } = Modal
// **悲观者往往正确,乐观者往往成功
class TablesComponent extends Component {
  static propTpyes = {
    type: PropTypes.string,       // 菜单类型
    tabs: PropTypes.array,        // 标签组
    config: PropTypes.object,     // 页面配置
    setSubConfig: PropTypes.func, // 子标签配置
    updatetabs: PropTypes.func    // 更新标签组设置
  }
  state = {
    dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS,
    tabgroups: [],     // 标签组
    card: [],          // 编辑标签
    group: [],         // 编辑组
    visible: false     // 模态框控制
  }
  /**
   * @description 标签组初始化
   */
  UNSAFE_componentWillMount () {
    const { config } = this.props
    this.setState({
      tabgroups: fromJS(config.tabgroups).toJS()
    })
  }
  /**
   * @description 元素添加或拖动时顺序变化
   */
  handleList = (list, card, groupId) => {
    const { config } = this.props
    let _tabgroups = fromJS(this.state.tabgroups).toJS()
    let _group = null
    _tabgroups = _tabgroups.map(group => {
      if (group.uuid === groupId) {
        group.sublist = list
        _group = fromJS(group).toJS()
      }
      return group
    })
    if (card) {
      this.setState({tabgroups: _tabgroups})
      this.handleTab(card, _group)
    } else {
      this.setState({tabgroups: _tabgroups})
      this.props.updatetabs({...config, tabgroups: _tabgroups})
    }
  }
  /**
   * @description 标签编辑,筛选可选的下级标签与已关联的下级标签
   */
  handleTab = (card, _group) => {
    let tabgroups = fromJS(this.state.tabgroups).toJS()
    let menus = [
      {value: '', text: '空'},
      {value: 'mainTable', text: this.props.type === 'main' ? '主表' : '主数据'}
    ]
    let equalTabs = []
    let supMenu = card.supMenu || ''
    let equalTab = card.equalTab || []
    let isuptab = true
    let equalTabIds = []
    tabgroups.forEach((group, i) => {
      if (group.uuid === _group.uuid) {
        isuptab = false
        group.sublist.forEach(tab => { // 可关联的同级标签
          if (tab.uuid === card.uuid) return
          equalTabIds.push(tab.uuid)
          equalTabs.push(tab)
        })
      } else if (isuptab) {
        group.sublist.forEach(tab => {
          menus.push({
            value: tab.uuid,
            text: tab.label
          })
        })
      }
    })
    if (supMenu && menus.filter(menu => menu.value === supMenu).length === 0) {
      supMenu = ''
    }
    if (equalTab.length > 0) {
      equalTab = equalTab.filter(tabId => equalTabIds.includes(tabId))
    }
    this.setState({
      visible: true,
      card: card,
      group: _group,
      formlist: getTabForm(card, supMenu, menus, equalTab, equalTabs, this.props.type)
    })
  }
  /**
   * @description 标签修改后提交保存
   */
  handleSubmit = () => {
    const { config } = this.props
    const { group, card } = this.state
    let tabgroups = fromJS(this.state.tabgroups).toJS()
    this.tabsFormRef.handleConfirm().then(res => {
      if (tabgroups.length === 1) {
        tabgroups.forEach(_group => {
          _group.sublist = _group.sublist.filter(item => !item.origin || item.uuid === card.uuid)
        })
      }
      let tabnames = []
      tabgroups.forEach(_group => {
        _group.sublist.forEach(item => {
          if (item.uuid !== card.uuid) {
            tabnames.push(item.label)
          }
        })
      })
      if (tabnames.includes(res.label)) {
        notification.warning({
          top: 92,
          message: '标签《' + res.label + '》已存在!',
          duration: 5
        })
        return
      }
      tabgroups = tabgroups.map(_group => {
        if (_group.uuid === group.uuid) {
          _group.sublist = _group.sublist.map(item => {
            if (item.uuid === card.uuid) {
              return res
            } else {
              return item
            }
          })
        }
        return _group
      })
      this.setState({
        card: null,
        group: null,
        tabgroups: tabgroups,
        visible: false
      })
      this.props.updatetabs({...config, tabgroups: tabgroups})
    })
  }
  /**
   * @description 删除标签
   */
  deleteElement = (card, group) => {
    const { config } = this.props
    let _this = this
    let tabgroups = fromJS(this.state.tabgroups).toJS()
    confirm({
      content: `确定删除<<${card.label}>>吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        tabgroups = tabgroups.map(_group => {
          if (_group.uuid === group.uuid) {
            _group.sublist = _group.sublist.filter(item => item.uuid !== card.uuid)
          }
          return _group
        })
        _this.setState({
          tabgroups: tabgroups
        })
        _this.props.updatetabs({...config, tabgroups: tabgroups}, [card])
      },
      onCancel() {}
    })
  }
  /**
   * @description 增加标签页分组
   */
  addTabGroup = () => {
    const { config } = this.props
    let _this = this
    let _tabgroups = fromJS(this.state.tabgroups).toJS()
    confirm({
      content: `确定新建标签组吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        if (_tabgroups.length === 1) {
          _tabgroups.forEach(group => {
            group.sublist = group.sublist.filter(item => !item.origin)
          })
        }
        _tabgroups.push({
          uuid: Utils.getuuid(),
          sublist:[]
        })
        _this.setState({
          tabgroups: _tabgroups
        })
        _this.props.updatetabs({...config, tabgroups: _tabgroups})
      },
      onCancel() {}
    })
  }
  /**
   * @description 删除标签页分组
   */
  delTabGroup = (group) => {
    const { config } = this.props
    let _this = this
    let _tabgroups = fromJS(this.state.tabgroups).toJS()
    confirm({
      content: `确定删除标签组吗?`,
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['header.cancel'],
      onOk() {
        _tabgroups = _tabgroups.filter(_group => _group.uuid !== group.uuid)
        _this.setState({
          tabgroups: _tabgroups
        })
        _this.props.updatetabs({...config, tabgroups: _tabgroups}, group.sublist)
      },
      onCancel() {}
    })
  }
  /**
   * @description 标签组上下移动
   */
  handleGroup = (index, type) => {
    const { config } = this.props
    let _tabgroups = fromJS(this.state.tabgroups).toJS()
    if (type === 'up') {
      _tabgroups.splice(index, 0, _tabgroups.splice(index - 1, 1)[0])
    } else {
      _tabgroups.splice(index, 0, _tabgroups.splice(index + 1, 1)[0])
    }
    this.setState({
      tabgroups: _tabgroups
    })
    this.props.updatetabs({...config, tabgroups: _tabgroups})
    notification.success({
      top: 92,
      message: '调整成功',
      duration: 2
    })
  }
  /**
   * @description 取消保存,如果元素为新添元素,则从序列中删除
   */
  editModalCancel = () => {
    const { config } = this.props
    const { group, card } = this.state
    let _tabgroups = fromJS(this.state.tabgroups).toJS()
    if (card && card.focus) {
      _tabgroups = _tabgroups.map(_group => {
        if (_group.uuid === group.uuid) {
          _group.sublist = _group.sublist.filter(item => item.uuid !== card.uuid)
        }
        return _group
      })
      this.setState({
        card: null,
        group: null,
        tabgroups: _tabgroups,
        visible: false
      })
      this.props.updatetabs({...config, tabgroups: _tabgroups})
    } else {
      this.setState({
        card: null,
        group: null,
        visible: false
      })
    }
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = () => {
      return
    }
  }
  render() {
    const { tabgroups, visible, dict } = this.state
    return (
      <div className="model-table-tab-list">
        {tabgroups.map((group, index) => {
          return (
            <div key={index} className="tab-line-list">
              {index === 0 ? <Tooltip placement="bottomLeft" overlayClassName="middle" title={dict['model.tooltip.tabs.guide']}>
                <Icon type="question-circle" />
              </Tooltip> : null}
              {index !== (tabgroups.length - 1) ?
                <Icon type="arrow-down" onClick={() => {this.handleGroup(index, 'down')}} /> : null
              }
              {index !== 0 ? <Icon type="arrow-up" onClick={() => {this.handleGroup(index, 'up')}} /> : null}
              {index === 0 ? <Icon type="plus" onClick={this.addTabGroup} /> : null}
              {index !== 0 ? <Icon type="delete" onClick={() => {this.delTabGroup(group)}} /> : null}
              <TabDragElement
                list={group.sublist}
                handleList={(list, newcard) => this.handleList(list, newcard, group.uuid)}
                handleMenu={(card) => this.handleTab(card, group)}
                deleteMenu={(card) => this.deleteElement(card, group)}
                doubleClickCard={this.props.setSubConfig}
                placeholder={this.state.dict['header.form.tab.placeholder']}
              />
            </div>)
        })}
        {/* 标签编辑 */}
        <Modal
          title={this.state.dict['header.modal.tabs.edit']}
          visible={visible}
          width={750}
          maskClosable={false}
          onOk={this.handleSubmit}
          onCancel={this.editModalCancel}
          destroyOnClose
        >
          <TabForm
            dict={this.state.dict}
            card={this.state.card}
            tabs={this.props.tabs}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
            wrappedComponentRef={(inst) => this.tabsFormRef = inst}
          />
        </Modal>
      </div>
    )
  }
}
export default TablesComponent
src/templates/sharecomponent/tabscomponent/index.scss
New file
@@ -0,0 +1,99 @@
.model-table-tab-list {
  clear: both;
  .tab-line-list {
    position: relative;
    padding: 30px 20px 0px;
    .ant-switch {
      position: absolute;
      right: 20px;
      top: 20px;
    }
    > .ant-row {
      min-height: 47px;
      .page-card {
        position: relative;
        padding: 0px;
        > div {
          padding: 12px 0px 0px;
          cursor: move;
        }
      }
      .ant-tabs-tab {
        cursor: default;
        .edit {
          position: absolute;
          left: 0;
          top: 0px;
          color: #1890ff;
          cursor: pointer;
          display: none;
        }
        .edit.close {
          left: 20px;
          color: #ff4d4f;
        }
      }
      .ant-tabs-bar {
        min-height: 55px;
      }
      .ant-tabs-tab:hover {
        .edit {
          display: inline-block;
        }
      }
      .ant-tabs-content {
        .ant-tabs-tabpane img {
          width: 100%;
        }
      }
    }
    > .anticon-question-circle {
      color: #c49f47;
      position: absolute;
      left: 5px;
      top: 20px;
    }
    > .anticon-plus {
      position: absolute;
      font-size: 18px;
      right: 25px;
      top: 50px;
      z-index: 1;
      color: #26C281;
      cursor: pointer;
    }
    > .anticon-delete {
      position: absolute;
      font-size: 19px;
      right: 25px;
      top: 50px;
      z-index: 1;
      color: #ff4d4f;
      cursor: pointer;
    }
    > .anticon-arrow-up {
      position: absolute;
      right: 55px;
      font-size: 19px;
      z-index: 1;
      top: 50px;
      color: #1890ff;
      cursor: pointer;
    }
    > .anticon-arrow-down {
      position: absolute;
      right: 55px;
      font-size: 19px;
      z-index: 1;
      top: 50px;
      color: purple;
      cursor: pointer;
    }
    > .anticon-arrow-down + .anticon-arrow-up {
      right: 85px;
    }
    .ant-tabs-nav-container-scrolling {
      margin-right: 50px;
    }
  }
}
src/templates/sharecomponent/tabscomponent/tabdragelement/card.jsx
File was renamed from src/templates/zshare/tabdragelement/card.jsx
@@ -3,16 +3,16 @@
import { Icon } from 'antd'
import './index.scss'
const Card = ({ id, type, card, moveCard, findCard, doubleClickCard, hasDrop }) => {
const Card = ({ id, card, moveCard, findCard, doubleClickCard, hasDrop }) => {
  const originalIndex = findCard(id).index
  const [{ isDragging }, drag] = useDrag({
    item: { type: type, id, originalIndex },
    item: { type: 'tabs', id, originalIndex },
    collect: monitor => ({
      isDragging: monitor.isDragging(),
    }),
  })
  const [, drop] = useDrop({
    accept: type,
    accept: 'tabs',
    canDrop: () => true,
    drop: (item) => {
      if (!item.hasOwnProperty('originalIndex')) {
src/templates/sharecomponent/tabscomponent/tabdragelement/index.jsx
File was renamed from src/templates/zshare/tabdragelement/index.jsx
@@ -9,7 +9,7 @@
const { TabPane } = Tabs
const Container = ({list, type, groupId, placeholder, handleList, handleMenu, deleteMenu, doubleClickCard }) => {
const Container = ({list, placeholder, handleList, handleMenu, deleteMenu, doubleClickCard }) => {
  let target = null
  const [cards, setCards] = useState(list)
  const moveCard = (id, atIndex) => {
@@ -17,7 +17,8 @@
    if (!card) return
    
    const _cards = update(cards, { $splice: [[index, 1], [atIndex, 0, card]] })
    handleList(type, _cards, card)
    handleList(_cards)
  }
  if (!is(fromJS(cards), fromJS(list))) {
@@ -37,7 +38,7 @@
  }
  const [, drop] = useDrop({
    accept: type,
    accept: 'tabs',
    drop(item) {
      if (item.hasOwnProperty('originalIndex')) {
        return
@@ -50,9 +51,7 @@
      newcard.icon = ''
      newcard.type = item.subType
      newcard.linkTab = ''
      newcard.subtabs = []
      newcard.supMenu = 'mainTable'
      newcard.groupId = groupId
      newcard.focus = true
      let targetId = cards.length > 0 ? cards[cards.length - 1].uuid : 0
@@ -66,26 +65,18 @@
      targetIndex++
      const _cards = update(cards, { $splice: [[targetIndex, 0, newcard]] })
      handleList(type, _cards, newcard)
      handleList(_cards, newcard)
      target = null
    }
  })
  const edit = (card) => {
    handleMenu(card)
  }
  const doubleClickBab = id => {
    const { card } = findCard(id)
    doubleClickCard(card)
  }
  const del = (card) => {
    deleteMenu({card: card, type: type})
  }
  return (
    <div ref={drop} className="ant-row maintable-tab-list">
    <div ref={drop} className="ant-row model-tab-drag-list">
      <Tabs defaultActiveKey="0">
        {cards.map((card, index) => (
          <TabPane tab={
@@ -93,15 +84,14 @@
              <Card
                key={card.uuid}
                id={`${card.uuid}`}
                type={type}
                card={card}
                moveCard={moveCard}
                findCard={findCard}
                hasDrop={hasDrop}
                doubleClickCard={doubleClickBab}
              />
              <Icon className="edit" type="edit" onClick={() => edit(card)} />
              <Icon className="edit close" type="close" onClick={() => del(card)} />
              <Icon className="edit" type="edit" onClick={() => handleMenu(card)} />
              <Icon className="edit close" type="close" onClick={() => deleteMenu(card)} />
            </div>
          } key={`${index}`}>
            《{card.label}》标签内容
src/templates/sharecomponent/tabscomponent/tabdragelement/index.scss
New file
@@ -0,0 +1,12 @@
.model-tab-drag-list {
  .ant-tabs-content {
    text-align: center;
    color: #bcbcbc;
  }
  .commontab-drawarea-placeholder {
    position: absolute;
    top: 25px;
    left: calc(50% - 50px);
    color: #bcbcbc;
  }
}
src/templates/sharecomponent/tabscomponent/tabform/index.jsx
File was renamed from src/templates/zshare/tabform/index.jsx
@@ -9,7 +9,6 @@
class MainTab extends Component {
  static propTpyes = {
    tabs: PropTypes.array,       // 可关联标签集
    type: PropTypes.string,      // 类型
    dict: PropTypes.object,      // 字典项
    formlist: PropTypes.any,     // 表单
    card: PropTypes.object,      // 标签页信息
@@ -110,7 +109,7 @@
    const fields = []
    
    this.state.formlist.forEach((item, index) => {
      if (item.hidden) return
      if (item.hidden || item.forbid) return
      if (item.type === 'text') { // 文本搜索
        let rules = []
@@ -245,7 +244,6 @@
        if (!err) {
          values.uuid = this.props.card.uuid
          values.groupId = this.props.card.groupId
          if (!values.linkTab) { // 没有关联标签(新建时),创建新标签Id
            values.linkTab = Utils.getuuid()
src/templates/sharecomponent/tabscomponent/tabform/index.scss
src/templates/subtableconfig/index.jsx
@@ -20,11 +20,11 @@
import SearchComponent from '@/templates/sharecomponent/searchcomponent'
import ActionComponent from '@/templates/sharecomponent/actioncomponent'
import ColumnComponent from '@/templates/sharecomponent/columncomponent'
import ChartComponent from '@/templates/sharecomponent/chartcomponent'
import MenuForm from '@/templates/zshare/menuform'
import EditComponent from '@/templates/zshare/editcomponent'
import SourceElement from '@/templates/zshare/dragsource'
import ChartComponent from '@/templates/zshare/chartcomponent'
import Source from './source'
import './index.scss'
@@ -739,7 +739,7 @@
      })
    } else {
      this.menuformRef.handleConfirm().then(res => {
        let _config = {...config, ...res}
        let _config = {...config, tabName: res.MenuName, tabNo: res.MenuNo, Remark: res.Remark}
        if (!is(fromJS(originConfig), fromJS(_config))) {
          this.setState({
@@ -771,7 +771,7 @@
      })
    } else {
      this.menuformRef.handleConfirm().then(res => {
        let _config = {...config, ...res}
        let _config = {...config, tabName: res.MenuName, tabNo: res.MenuNo, Remark: res.Remark}
        if (!is(fromJS(originConfig), fromJS(_config))) {
          notification.warning({
@@ -905,31 +905,6 @@
        })
      })
    }
  }
  /**
   * @description 图表配置修改后保存
   */
  updateChart = (plot) => {
    const { config } = this.state
    let _charts = JSON.parse(JSON.stringify(config.charts))
    _charts = _charts.map(item => {
      if (item.uuid === plot.uuid) {
        if (!is(fromJS(item), fromJS(plot))) {
          let _element = document.getElementById(plot.uuid)
          if (_element) {
            _element.innerHTML = ''
          }
        }
        return plot
      }
      return item
    })
    this.setState({
      config: {...config, charts: _charts}
    })
  }
  /**
@@ -1152,11 +1127,9 @@
                    return (
                      <Col span={item.width} key={item.uuid}>
                        <ChartComponent
                          type={item.chartType}
                          dict={this.state.dict}
                          columns={config.columns}
                          plotchange={this.updateChart}
                          plot={item}
                          config={config}
                          plotchange={this.updateconfig}
                        />
                      </Col>
                    )
src/templates/subtableconfig/settingform/index.jsx
File was deleted
src/templates/subtableconfig/settingform/index.scss
File was deleted
src/templates/zshare/chartform/index.jsx
File was deleted
src/templates/zshare/chartform/index.scss
File was deleted
src/templates/zshare/dragelform/card.jsx
File was deleted
src/templates/zshare/dragelform/index.jsx
File was deleted
src/templates/zshare/dragelform/index.scss
File was deleted
src/templates/zshare/dragelform/itemtypes.js
File was deleted
src/templates/zshare/dragelform/source.jsx
File was deleted
src/templates/zshare/formconfig.jsx
@@ -1703,14 +1703,14 @@
      type: 'number',
      key: 'min',
      label: '最小值',
      initVal: card.min || '',
      initVal: card.min || card.min === 0 ? card.min : '',
      required: false
    },
    {
      type: 'number',
      key: 'max',
      label: '最大值',
      initVal: card.max || '',
      initVal: card.max || card.max === 0 ? card.max : '',
      required: false
    },
    {
@@ -1879,4 +1879,103 @@
      options: roleList
    }
  ]
}
/**
 * @description 获取子菜单基本信息表单配置信息
 * @param {object} card  // 标签配置信息
 */
export function getTabForm (card, supMenu, menus, equalTab, equalTabs, type) {
  return [
    {
      type: 'text',
      key: 'label',
      label: Formdict['header.menu.tabName'],
      initVal: card.label || '',
      required: true
    },
    {
      type: 'select',
      key: 'type',
      label: Formdict['header.form.tabType'],
      initVal: card.type || 'SubTable',
      required: true,
      options: [{
        value: 'SubTable',
        text: Formdict['header.menu.tab.subtable']
      }]
    },
    {
      type: 'select',
      key: 'linkTab',
      label: Formdict['header.form.linkTab'],
      initVal: card.linkTab || '',
      required: false,
      options: []
    },
    {
      type: 'select',
      key: 'icon',
      label: Formdict['header.menu.icon'],
      initVal: card.icon || '',
      required: false,
      options: [{
        value: '',
        text: Formdict['header.form.empty']
      }, {
        value: 'table',
        text: 'table'
      }, {
        value: 'bar-chart',
        text: 'bar-chart'
      }, {
        value: 'pie-chart',
        text: 'pie-chart'
      }, {
        value: 'line-chart',
        text: 'line-chart'
      }]
    },
    {
      type: 'select',
      key: 'supMenu',
      label: Formdict['header.form.supTab'],
      initVal: supMenu,
      required: false,
      options: menus
    },
    {
      type: 'mutilselect',
      key: 'equalTab',
      label: Formdict['header.form.equalTab'],
      tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
      initVal: equalTab,
      required: false,
      options: equalTabs
    },
    {
      type: 'text',
      key: 'foreignKey',
      label: '外键',
      tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段',
      initVal: card.foreignKey || '',
      required: false
    },
    {
      type: 'radio',
      key: 'searchPass',
      label: '主表搜索',
      initVal: card.searchPass || 'false',
      tooltip: '使用主表搜索条件时,主表的搜索条件会传入子表中。',
      required: false,
      forbid: type !== 'main',
      options: [{
        value: 'true',
        text: '使用'
      }, {
        value: 'false',
        text: '不使用'
      }]
    }
  ]
}
src/templates/zshare/searcheditable/index.jsx
File was deleted
src/templates/zshare/searcheditable/index.scss
File was deleted
src/templates/zshare/tabdragelement/index.scss
File was deleted
src/templates/zshare/viewdragelement/card.jsx
File was deleted
src/templates/zshare/viewdragelement/index.jsx
File was deleted
src/templates/zshare/viewdragelement/index.scss
File was deleted