king
2023-11-14 169f6cd29a0d3add4fe2cf35c3579b45fa83c0d4
2023-11-14
11个文件已修改
130 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/simple-form/options.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/data-card/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/double-data-card/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/simple-form/index.jsx 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/excelInbutton/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/exceloutbutton/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/popupbutton/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx
@@ -311,7 +311,7 @@
      }
    }
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId)
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid, supId, true)
    if (cards.subtype === 'basetable') {
      this.setState({
src/menu/components/form/simple-form/options.jsx
@@ -131,6 +131,14 @@
      options: fields
    },
    {
      type: 'select',
      field: 'refocus',
      label: '刷新焦点',
      initval: wrap.refocus || '',
      required: false,
      options: fields
    },
    {
      type: 'radio',
      field: 'cache',
      label: '选项查询',
src/menu/components/share/actioncomponent/index.jsx
@@ -207,7 +207,7 @@
      }
    }
    
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid, supId)
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid, supId, config.subtype !== 'basetable')
    if (config.subtype === 'basetable') {
      delete card.eleType // 区分按钮位置
src/tabviews/custom/components/card/data-card/index.scss
@@ -256,6 +256,7 @@
    position: absolute;
    top: 0px;
    right: 0px;
    z-index: 1;
    button {
      margin-bottom: 0px!important;
    }
src/tabviews/custom/components/card/double-data-card/index.scss
@@ -310,6 +310,7 @@
    position: absolute;
    top: 0px;
    right: 0px;
    z-index: 1;
    button {
      margin-bottom: 0px!important;
    }
src/tabviews/custom/components/form/simple-form/index.jsx
@@ -176,11 +176,39 @@
  }
  reloadData = (menuId, id) => {
    const { config } = this.state
    const { config, group } = this.state
    if (config.uuid !== menuId) return
    this.loadData()
    if (id === 'focus-refresh' && config.wrap.refocus) {
      let _group = fromJS(group).toJS()
      _group.setting.focus = config.wrap.refocus
      if (config.wrap.datatype === 'static') {
        this.setState({
          data: null,
          group: _group
        }, () => {
          this.setState({data: {$$empty: true}})
        })
      } else {
        this.setState({
          group: _group
        }, () => {
          this.loadData(true)
        })
      }
    } else if (id === 'focus-nofresh' && config.wrap.refocus) {
      let formId = ''
      group.fields.forEach(item => {
        if (item.field === config.wrap.refocus) {
          formId = item.uuid
        }
      })
      MKEmitter.emit('mkFC', 'focus', formId)
    } else {
      this.loadData()
    }
  }
  /**
@@ -197,6 +225,14 @@
    if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) {
      MKEmitter.emit('reloadData', config.setting.supModule, BID)
    } else if (position === 'grid' && config.wrap.datatype === 'static') {
      if (config.wrap.refocus && group.setting.focus === config.wrap.refocus) {
        let _group = fromJS(group).toJS()
        _group.setting.focus = config.wrap.focus
        this.setState({
          group: _group
        })
      }
      this.setState({
        data: null
      }, () => {
@@ -253,8 +289,17 @@
    }
  }
  async loadData () {
    const { config, BID } = this.state
  async loadData (refocus) {
    const { config, BID, group } = this.state
    if (config.wrap.refocus && !refocus && group.setting.focus === config.wrap.refocus) {
      let _group = fromJS(group).toJS()
      _group.setting.focus = config.wrap.focus
      this.setState({
        group: _group
      })
    }
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -199,9 +199,15 @@
      if (btn.syncComponentId === 'multiComponent') {
        btn.syncComponentIds.forEach((id, i) => {
          setTimeout(() => {
            MKEmitter.emit('reloadData', id)
            if (/\$focus/.test(id)) {
              MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
            } else {
              MKEmitter.emit('reloadData', id)
            }
          }, 20 * i)
        })
      } else if (/\$focus/.test(btn.syncComponentId)) {
        MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
      } else {
        MKEmitter.emit('reloadData', btn.syncComponentId)
      }
src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -891,9 +891,15 @@
      if (btn.syncComponentId === 'multiComponent') {
        btn.syncComponentIds.forEach((id, i) => {
          setTimeout(() => {
            MKEmitter.emit('reloadData', id)
            if (/\$focus/.test(id)) {
              MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
            } else {
              MKEmitter.emit('reloadData', id)
            }
          }, 20 * i)
        })
      } else if (/\$focus/.test(btn.syncComponentId)) {
        MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
      } else {
        MKEmitter.emit('reloadData', btn.syncComponentId)
      }
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2298,9 +2298,15 @@
      if (btn.syncComponentId === 'multiComponent') {
        btn.syncComponentIds.forEach((id, i) => {
          setTimeout(() => {
            MKEmitter.emit('reloadData', id)
            if (/\$focus/.test(id)) {
              MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
            } else {
              MKEmitter.emit('reloadData', id)
            }
          }, 20 * i)
        })
      } else if (/\$focus/.test(btn.syncComponentId)) {
        MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
      } else {
        MKEmitter.emit('reloadData', btn.syncComponentId)
      }
src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -215,9 +215,15 @@
      if (btn.syncComponentId === 'multiComponent') {
        btn.syncComponentIds.forEach((id, i) => {
          setTimeout(() => {
            MKEmitter.emit('reloadData', id)
            if (/\$focus/.test(id)) {
              MKEmitter.emit('reloadData', id.split('$')[0], id.split('$')[1])
            } else {
              MKEmitter.emit('reloadData', id)
            }
          }, 20 * i)
        })
      } else if (/\$focus/.test(btn.syncComponentId)) {
        MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1])
      } else {
        MKEmitter.emit('reloadData', btn.syncComponentId)
      }
src/utils/utils-custom.js
@@ -6,7 +6,7 @@
   * @description 获取下级模块
   * @return {String}  selfId  当前组件id
   */
  static getSubModules (components, selfId, supId) {
  static getSubModules (components, selfId, supId, has) {
    let modules = []
    components.forEach(item => {
      if (item.uuid === selfId || item.type === 'navbar') {
@@ -17,6 +17,17 @@
          label: item.name,
          disabled: supId === item.uuid
        })
        if (item.type === 'form' && item.subtype === 'simpleform' && item.wrap.refocus && supId !== item.uuid) {
          modules.push({
            value: item.uuid + '$focus-refresh',
            label: item.name + '(刷新-聚焦)',
          })
          modules.push({
            value: item.uuid + '$focus-nofresh',
            label: item.name + '(不刷新-聚焦)',
          })
        }
      } else if (item.type === 'tabs') {
        if (item.subtype === 'tabletabs') {
          item.subtabs.forEach(tab => {
@@ -38,7 +49,7 @@
                type: 'tab',
                value: f_tab.uuid,
                label: f_tab.label,
                children: this.getSubModules(f_tab.components, selfId, supId)
                children: this.getSubModules(f_tab.components, selfId, supId, has)
              }
  
              if (subItem.children.length === 0) {
@@ -672,11 +683,23 @@
    }
    if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) {
      btn.syncComponents = btn.syncComponents.map(m => {
        m.syncComId = m.syncComId.map(n => md5(commonId + n))
        m.syncComId = m.syncComId.map(n => {
          if (/\$focus/.test(n)) {
            return md5(commonId + n.split('$')[0]) + '$' + n.split('$')[1]
          }
          return md5(commonId + n)
        })
        return m
      })
    } else if (btn.syncComponent && btn.syncComponent.length > 0) {
      btn.syncComponent = btn.syncComponent.map(m => md5(commonId + m))
      btn.syncComponent = btn.syncComponent.map(m => {
        if (/\$focus/.test(m)) {
          return md5(commonId + m.split('$')[0]) + '$' + m.split('$')[1]
        }
        return md5(commonId + m)
      })
    }
  }