king
2023-12-17 6092c17b4571e1082d1272fa3104c780af66453d
2023-12-17
19个文件已修改
220 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/double-data-card/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/double-data-card/options.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/base-table/options.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/tableIn/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/options.jsx 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/base-table/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/table/normal-table/index.jsx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/excelInbutton/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx
@@ -310,8 +310,9 @@
        supId = ''
      }
    }
    let menu = window.GLOB.customMenu
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId, true)
    let modules = MenuUtils.getSubModules(menu.components, cards.uuid, supId, menu.interfaces || null)
    if (cards.subtype === 'basetable') {
      this.setState({
@@ -320,7 +321,7 @@
        formlist: getBaseTableActionForm(card, functip, cards, usefulFields, modules)
      })
    } else {
      let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || []
      let anchors = MenuUtils.getAnchors(menu.components, cards.uuid) || []
      this.setState({
        actvisible: true,
src/menu/components/card/data-card/index.jsx
@@ -341,8 +341,30 @@
  getWrapForms = () => {
    const { card } = this.state
    let buttons = []
    card.action && card.action.forEach(n => {
      buttons.push({
        value: n.uuid,
        label: n.label
      })
    })
    card.subcards.forEach(m => {
      if (m.$cardType !== 'extendCard') return
      m.elements.forEach(n => {
        if (n.eleType === 'button') {
          buttons.push({
            value: n.uuid,
            label: n.label
          })
        }
      })
    })
    
    return getWrapForm(card.wrap, card.subtype, card.columns, card.uuid, card.supNodes, card.setting)
    return getWrapForm(card.wrap, card.subtype, card.columns, card.uuid, card.supNodes, card.setting, buttons)
  }
  updateWrap = (res) => {
src/menu/components/card/data-card/options.jsx
@@ -413,10 +413,10 @@
      field: 'autoExec',
      label: '自动执行',
      initval: wrap.autoExec || '',
      tooltip: '数据更新时自动执行按钮。注:此按钮执行成功后谨慎选择刷新项,避免造成循环执行。',
      tooltip: subtype === 'propcard' ? '数据更新时自动执行按钮。注:此按钮执行成功后谨慎选择刷新项,避免造成循环执行。' : '初始化自动执行按钮。',
      required: false,
      options: buttons,
      forbid: subtype !== 'propcard',
      forbid: subtype !== 'propcard' && subtype !== 'datacard',
      controlFields: [
        {field: 'emptyExec', notNull: true},
      ]
src/menu/components/card/double-data-card/index.jsx
@@ -331,8 +331,30 @@
  getWrapForms = () => {
    const { card } = this.state
    let buttons = []
    card.action && card.action.forEach(n => {
      buttons.push({
        value: n.uuid,
        label: n.label
      })
    })
    card.subcards.forEach(m => {
      if (m.$cardType !== 'extendCard') return
      m.elements.forEach(n => {
        if (n.eleType === 'button') {
          buttons.push({
            value: n.uuid,
            label: n.label
          })
        }
      })
    })
    
    return getWrapForm(card.wrap, card.columns, card.setting)
    return getWrapForm(card.wrap, card.columns, card.setting, buttons)
  }
  updateWrap = (res) => {
src/menu/components/card/double-data-card/options.jsx
@@ -1,7 +1,7 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap, columns = [], setting) {
export default function (wrap, columns = [], setting, buttons = []) {
  let appType = sessionStorage.getItem('appType')
  let laypage = setting && setting.laypage !== 'false'
  let roleList = sessionStorage.getItem('sysRoles')
@@ -183,6 +183,15 @@
      required: false
    },
    {
      type: 'select',
      field: 'autoExec',
      label: '自动执行',
      initval: wrap.autoExec || '',
      tooltip: '初始化自动执行按钮。',
      required: false,
      options: buttons
    },
    {
      type: 'number',
      field: 'minWidth',
      label: '最小宽度',
src/menu/components/form/formaction/index.jsx
@@ -100,8 +100,10 @@
      supId = config.wrap.supModule[config.wrap.supModule.length - 1]
    }
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid, supId)
    let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, config.uuid) || []
    let menu = window.GLOB.customMenu
    let modules = MenuUtils.getSubModules(menu.components, config.uuid, supId, menu.interfaces || null)
    let anchors = MenuUtils.getAnchors(menu.components, config.uuid) || []
    if (card.type === 'submit' && !card.Ot) {
      card.Ot = config.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl'
src/menu/components/share/actioncomponent/index.jsx
@@ -206,8 +206,10 @@
        supId = ''
      }
    }
    let menu = window.GLOB.customMenu
    
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid, supId, config.subtype !== 'basetable')
    let modules = MenuUtils.getSubModules(menu.components, config.uuid, supId, menu.interfaces || null)
    if (config.subtype === 'basetable') {
      delete card.eleType // 区分按钮位置
@@ -218,7 +220,7 @@
        formlist: getBaseTableActionForm(card, functip, config, usefulFields, modules)
      })
    } else {
      let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, config.uuid) || []
      let anchors = MenuUtils.getAnchors(menu.components, config.uuid) || []
  
      this.setState({
        visible: true,
src/menu/components/table/base-table/index.jsx
@@ -219,7 +219,7 @@
  getWrapForms = () => {
    const { wrap, action, columns, cols } = this.state.card
    let _actions = [...action]
    let _actions = []
    cols.forEach(col => {
      if (col.type === 'custom') {
@@ -231,7 +231,7 @@
      }
    })
    return getWrapForm(wrap, _actions, columns)
    return getWrapForm(wrap, _actions, columns, action)
  }
  updateWrap = (res) => {
src/menu/components/table/base-table/options.jsx
@@ -1,7 +1,7 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap, action = [], columns = []) {
export default function (wrap, action = [], columns = [], toolBtns = []) {
  const wrapForm = [
    {
      type: 'radio',
@@ -167,7 +167,16 @@
      tooltip: '双击表格中行,触发的按钮。',
      required: false,
      allowClear: true,
      options: action.map(item => ({value: item.uuid, label: item.label})),
      options: [...toolBtns, ...action].map(item => ({value: item.uuid, label: item.label})),
    },
    {
      type: 'select',
      field: 'autoExec',
      label: '自动执行',
      initval: wrap.autoExec || '',
      tooltip: '初始化自动执行按钮。',
      required: false,
      options: toolBtns.map(item => ({value: item.uuid, label: item.label}))
    },
    {
      type: 'select',
src/menu/components/table/edit-table/columns/tableIn/index.jsx
@@ -196,8 +196,10 @@
        supId = ''
      }
    }
    let menu = window.GLOB.customMenu
    
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, uuid, supId)
    let modules = MenuUtils.getSubModules(menu.components, uuid, supId, menu.interfaces || null)
    this.setState({
      fields: fromJS(columns).toJS().filter(item => item.field !== setting.primaryKey),
src/menu/components/table/normal-table/index.jsx
@@ -280,7 +280,7 @@
  getWrapForms = () => {
    const { wrap, action, columns, cols } = this.state.card
    let _actions = [...action]
    let _actions = []
    cols.forEach(col => {
      if (col.type === 'custom') {
@@ -292,7 +292,7 @@
      }
    })
    return getWrapForm(wrap, _actions, columns)
    return getWrapForm(wrap, _actions, columns, action)
  }
  updateWrap = (res) => {
@@ -374,7 +374,7 @@
            <PlusOutlined className="plus" title="添加列" onClick={() => this.addColumns()}/>
            {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={this.addSearch}/> : null}
            <PlusSquareOutlined className="plus" title="添加按钮" onClick={this.addButton}/>
            <NormalForm title="表格设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
            <NormalForm title="表格设置" width={850} update={this.updateWrap} getForms={this.getWrapForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="normaltable" card={card}/>
src/menu/components/table/normal-table/options.jsx
@@ -1,7 +1,7 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap, action = [], columns = []) {
export default function (wrap, action = [], columns = [], toolBtns) {
  let roleList = sessionStorage.getItem('sysRoles')
  let appType = sessionStorage.getItem('appType')
  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
@@ -209,11 +209,20 @@
      tooltip: '双击表格中行,触发的按钮。',
      required: false,
      allowClear: true,
      options: action.map(item => ({value: item.uuid, label: item.label})),
      options: [...toolBtns, ...action].map(item => ({value: item.uuid, label: item.label})),
      forbid: appType === 'mob'
    },
    {
      type: 'select',
      field: 'autoExec',
      label: '自动执行',
      initval: wrap.autoExec || '',
      tooltip: '初始化自动执行按钮。',
      required: false,
      options: toolBtns.map(item => ({value: item.uuid, label: item.label}))
    },
    {
      type: 'select',
      field: 'tipField',
      label: '信息提示',
      initval: wrap.tipField || '',
src/tabviews/custom/components/card/data-card/index.jsx
@@ -236,6 +236,8 @@
    }
    this.initExec()
    this.autoExec()
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -330,6 +332,25 @@
    }
  }
  autoExec = (times) => {
    const { config } = this.state
    if (!config.wrap.autoExec) return
    let btn = document.getElementById('button' + config.wrap.autoExec)
    this.autoTimer && clearTimeout(this.autoTimer)
    if (btn) {
      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, [])
    } else if (!times || times < 20) {
      times = times ? times + 1 : 1
      this.autoTimer = setTimeout(() => {
        this.autoExec(times)
      }, 1000)
    }
  }
  transferSyncData = (syncId) => {
    const { config } = this.state
src/tabviews/custom/components/card/double-data-card/index.jsx
@@ -229,6 +229,8 @@
    if (config.setting.onload === 'true') {
      this.initExec()
    }
    this.autoExec()
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -322,6 +324,25 @@
    }
  }
  autoExec = (times) => {
    const { config } = this.state
    if (!config.wrap.autoExec) return
    let btn = document.getElementById('button' + config.wrap.autoExec)
    this.autoTimer && clearTimeout(this.autoTimer)
    if (btn) {
      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, [])
    } else if (!times || times < 20) {
      times = times ? times + 1 : 1
      this.autoTimer = setTimeout(() => {
        this.autoExec(times)
      }, 1000)
    }
  }
  searchRefresh = (searchId) => {
    const { config } = this.state
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -377,7 +377,7 @@
    let btn = document.getElementById('button' + config.wrap.autoExec)
    clearTimeout(this.autoTimer)
    this.autoTimer && clearTimeout(this.autoTimer)
    if (btn) {
      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data])
src/tabviews/custom/components/table/base-table/index.jsx
@@ -606,6 +606,25 @@
    })
  }
  autoExec = (times) => {
    const { config } = this.state
    if (!config.wrap.autoExec) return
    let btn = document.getElementById('button' + config.wrap.autoExec)
    this.autoTimer && clearTimeout(this.autoTimer)
    if (btn) {
      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, [])
    } else if (!times || times < 20) {
      times = times ? times + 1 : 1
      this.autoTimer = setTimeout(() => {
        this.autoExec(times)
      }, 1000)
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
@@ -621,6 +640,8 @@
    if (config.setting.useMSearch) {
      MKEmitter.addListener('searchRefresh', this.searchRefresh)
    }
    this.autoExec()
  }
  /**
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -199,6 +199,8 @@
    }
    this.initExec()
    this.autoExec()
  }
  /**
@@ -301,6 +303,25 @@
    }
  }
  autoExec = (times) => {
    const { config } = this.state
    if (!config.wrap.autoExec) return
    let btn = document.getElementById('button' + config.wrap.autoExec)
    this.autoTimer && clearTimeout(this.autoTimer)
    if (btn) {
      MKEmitter.emit('triggerBtnId', config.wrap.autoExec, [])
    } else if (!times || times < 20) {
      times = times ? times + 1 : 1
      this.autoTimer = setTimeout(() => {
        this.autoExec(times)
      }, 1000)
    }
  }
  transferSyncData = (syncId) => {
    const { config } = this.state
src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -582,6 +582,7 @@
    return <>
      <Button
        type={type}
        id={'button' + btn.uuid}
        title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
        loading={loading}
        disabled={disabled}
src/utils/utils-custom.js
@@ -6,7 +6,7 @@
   * @description 获取下级模块
   * @return {String}  selfId  当前组件id
   */
  static getSubModules (components, selfId, supId, has) {
  static getSubModules (components, selfId, supId, interfaces) {
    let modules = []
    components.forEach(item => {
      if (item.uuid === selfId || item.type === 'navbar') {
@@ -49,7 +49,7 @@
                type: 'tab',
                value: f_tab.uuid,
                label: f_tab.label,
                children: this.getSubModules(f_tab.components, selfId, supId, has)
                children: this.getSubModules(f_tab.components, selfId, supId)
              }
  
              if (subItem.children.length === 0) {
@@ -95,6 +95,15 @@
      }
    })
    if (interfaces && interfaces.length > 0) {
      interfaces.forEach(item => {
        modules.push({
          value: item.uuid,
          label: item.name
        })
      })
    }
    return modules
  }