king
2021-10-18 4b6a4e2f04f492d770573cf48ca52d4e748a086a
2021-10-18
15个文件已修改
834 ■■■■■ 已修改文件
src/tabviews/commontable/index.jsx 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/index.jsx 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/scriptmanage/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/treepage/index.jsx 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/config.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/index.jsx 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/subtabtable/index.jsx 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/printbutton/index.jsx 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/automatic/index.jsx 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/cardcomponent/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/normalTable/index.jsx 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-update.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx
@@ -392,7 +392,9 @@
        _actions.forEach(item => {
          if (item.uuid === config.autoMatic.action && (['pop', 'prompt', 'exec'].includes(item.OpenType) || (item.OpenType === 'funcbutton' && item.funcType === 'print'))) {
            autoMatic = config.autoMatic
            autoMatic.OpenType = item.execMode || item.OpenType
            config.setting.selected = 'false'
            item.autoMatic = true
          }
        })
      }
@@ -474,15 +476,12 @@
  }
  loadData = () => {
    const { MenuID } = this.props
    const { setting, search, BIDs, loadCustomApi, hasReqFields } = this.state
    this.setState({
      selectedData: [],
      BIDs: {
        ...BIDs,
        mainTable: '',
        mainTabledata: ''
      }
      BIDs: { ...BIDs, [MenuID]: '', [MenuID + 'data']: '' }
    })
    if (hasReqFields) {
@@ -690,7 +689,7 @@
   * @description 主表数据加载
   */ 
  async loadmaindata () {
    const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize, absFields } = this.state
    const { setting, arr_field, search, orderBy, BID, pageIndex, pageSize, absFields, autoMatic } = this.state
    this.setState({
      loading: true
@@ -740,10 +739,21 @@
        loading: false,
        pickup: false
      })
      if (autoMatic) {
        if (result.data && result.data.length > 0) {
          MKEmitter.emit('autoGetData', this.props.MenuID)
        } else {
          MKEmitter.emit('autoMaticOver', this.props.MenuID)
        }
      }
    } else {
      this.setState({
        loading: false
      })
      if (autoMatic) {
        MKEmitter.emit('autoMaticError', this.props.MenuID)
      }
      notification.error({
        top: 92,
        message: result.message,
@@ -881,7 +891,7 @@
        this.loadData()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
      MKEmitter.emit('resetTable', this.props.MenuID) // 列表重置
      this.setState({
        pageIndex: 1,
        search: searches
@@ -895,6 +905,15 @@
   * @description 表格条件改变时重置数据(分页或排序)
   */
  refreshbytable = (pagination, filters, sorter) => {
    if (!sorter) {
      this.setState({
        pageIndex: pagination.pageIndex
      }, () => {
        this.loadData()
      })
      return
    }
    if (sorter.order) {
      let _chg = {
        ascend: 'asc',
@@ -917,14 +936,14 @@
   */
  reloadtable = (btn) => {
    if (!btn || btn.resetPageIndex !== 'false') {
      MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
      MKEmitter.emit('resetTable', this.props.MenuID) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadData()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable', 'false') // 列表重置
      MKEmitter.emit('resetTable', this.props.MenuID, 'false') // 列表重置
      this.loadData()
    }
  }
@@ -963,21 +982,6 @@
   */
  changeSelectedData = (selectedData) => {
    this.setState({selectedData})
  }
  /**
   * @description 表格Id变化
   */
  handleTableId = (type, id, data) => {
    const { BIDs } = this.state
    this.setState({
      BIDs: {
        ...BIDs,
        [type]: id,
        [type + 'data']: data
      }
    })
  }
  
  /**
@@ -1035,6 +1039,14 @@
    this.setShortcut()
  }
  changeTableLine = (ContainerId, tableId, id, data) => {
    if (this.state.ContainerId !== ContainerId) return
    this.setState({
      BIDs: {...this.state.BIDs, [tableId]: id, [tableId + 'data']: data}
    })
  }
  /**
   * @description 按钮执行完成后页面刷新
   * @param {*} menuId     // 菜单Id
@@ -1061,6 +1073,7 @@
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
    MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
@@ -1076,6 +1089,7 @@
    document.onkeydown = () => {}
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
    MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
@@ -1135,7 +1149,6 @@
                      statFValue={this.state.statFValue}
                      ContainerId={this.state.ContainerId}
                      refreshdata={this.refreshbytable}
                      handleTableId={this.handleTableId}
                      chgSelectData={this.changeSelectedData}
                    />
                  </div>
@@ -1154,7 +1167,6 @@
                    data={this.state.data}
                    loading={this.state.loading}
                    ContainerId={this.state.ContainerId}
                    handleTableId={this.handleTableId}
                  />
                </Col>
              )
@@ -1191,7 +1203,6 @@
                    ContainerId={this.state.ContainerId}
                    BID={this.state.BIDs[_tab.supMenu] || ''}
                    BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                    handleTableId={this.handleTableId}
                  />
                </TabPane>
              )
src/tabviews/formtab/index.jsx
@@ -48,11 +48,11 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction } = this.props
    const { permAction, MenuID } = this.props
    let param = {
      func: 'sPC_Get_LongParam',
      MenuID: this.props.MenuID
      MenuID: MenuID
    }
    let result = await Api.getCacheConfig(param)
    if (result.status) {
@@ -103,13 +103,15 @@
        config.tabgroups = _tabgroups
      }
      // 权限过滤
      if (this.props.menuType !== 'HS') {
        config.action = config.action.filter(item => permAction[item.uuid])
        config.tabgroups.forEach(group => {
          group.sublist = group.sublist.filter(tab => permAction[tab.linkTab])
        })
        group.sublist = group.sublist.filter(tab => {
          if (tab.supMenu === 'mainTable') {
            tab.supMenu = MenuID
      }
          return permAction[tab.linkTab]
        })
      })
      // 按钮类型兼容
      config.action = config.action.map(item => {
@@ -141,8 +143,8 @@
        primaryId: this.props.param.primaryId || '',
        data: this.props.param.data || null,
        BIDs: {
          mainTable: config.setting.onload !== 'false' ? (this.props.param.primaryId || '') : '',
          mainTabledata: config.setting.onload !== 'false' ? (config.setting.datatype === 'query' ? '' : this.props.param.data) : ''
          [MenuID]: config.setting.onload !== 'false' ? (this.props.param.primaryId || '') : '',
          [MenuID + 'data']: config.setting.onload !== 'false' ? (config.setting.datatype === 'query' ? '' : this.props.param.data) : ''
        }
      }, () => {
        this.improveSelectOption(config.groups)
@@ -340,11 +342,7 @@
      this.setState({
        data: _data,
        primaryId: _primaryId,
        BIDs: {
          ...BIDs,
          mainTable: _primaryId,
          mainTabledata: _data
        }
        BIDs: { ...BIDs, [this.props.MenuID]: _primaryId, [this.props.MenuID + 'data']: _data }
      })
      if (_data && (setting.interType !== 'inner' || (setting.interType === 'inner' && setting.innerFunc))) {
@@ -493,11 +491,7 @@
          }
          this.setState({
            BIDs: {
              ...BIDs,
              mainTable: primaryId,
              mainTabledata: data
            }
            BIDs: { ...BIDs, [this.props.MenuID]: primaryId, [this.props.MenuID + 'data']: data }
          })
        }
      })
@@ -517,21 +511,6 @@
      }
      MKEmitter.emit('closeTabView', this.props.MenuID)
    }
  }
  /**
   * @description 表格Id变化
   */
  handleTableId = (type, id, data) => {
    const { BIDs } = this.state
    this.setState({
      BIDs: {
        ...BIDs,
        [type]: id,
        [type + 'data']: data
      }
    })
  }
  /**
@@ -574,6 +553,14 @@
    this.loadmaindata()
  }
  changeTableLine = (ContainerId, tableId, id, data) => {
    if (this.state.ContainerId !== ContainerId) return
    this.setState({
      BIDs: {...this.state.BIDs, [tableId]: id, [tableId + 'data']: data}
    })
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
@@ -584,8 +571,9 @@
  }
  componentDidMount () {
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
  }
  /**
@@ -596,8 +584,9 @@
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
  }
  render() {
@@ -653,7 +642,6 @@
                        ContainerId={this.state.ContainerId}
                        BID={this.state.BIDs[_tab.supMenu] || ''}
                        BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                        handleTableId={this.handleTableId}
                      />
                    </TabPane>
                  )
src/tabviews/scriptmanage/index.jsx
@@ -196,7 +196,7 @@
   * 含有初始不加载的页面,修改设置
   */
  refreshbysearch = (searches) => {
    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
    MKEmitter.emit('resetTable', this.props.MenuID) // 列表重置
    this.setState({
      loading: true,
      pageIndex: 1,
@@ -234,7 +234,7 @@
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
    MKEmitter.emit('resetTable', this.props.MenuID) // 列表重置
    this.setState({
      loading: true,
      pageIndex: 1,
@@ -327,7 +327,7 @@
            </div> : null
          }
          <MainTable
            tableId="mainTable"
            tableId={this.props.MenuID}
            pickup={pickup}
            setting={setting}
            columns={columns}
@@ -338,7 +338,6 @@
            loading={this.state.loading}
            refreshdata={this.refreshbytable}
            buttonTrigger={() => {}}
            handleTableId={() => {}}
            chgSelectData={this.changeSelectedData}
          />
        </div>
src/tabviews/subtable/index.jsx
@@ -34,7 +34,6 @@
    SupMenuID: PropTypes.string,     // 上级菜单Id
    mainSearch: PropTypes.any,       // 主表搜索条件
    ContainerId: PropTypes.any,      // 三级菜单Container(html) ID
    handleTableId: PropTypes.func,   // 控制表格数据切换时,更新在主表中的id
  }
  state = {
@@ -62,23 +61,18 @@
    statFValue: [],       // 合计值
    absFields: [],        // 绝对值字段
    loadCustomApi: true,  // 加载外部资源
    hasReqFields: false
    hasReqFields: false,
    BID: '',
    BData: ''
  }
  /**
   * @description 上级菜单id变化时,刷新数据
   */
  UNSAFE_componentWillReceiveProps(nextProps) {
    const { config, setting } = this.state
    const { setting } = this.state
    if (config && setting && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadData()
      })
    } else if (setting && !this.props.Tab.supMenu && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
    if (setting && !this.props.Tab.supMenu && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      this.setState({}, () => {
        this.loadData()
      })
@@ -89,7 +83,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, permMenus, Tab, BID } = this.props
    const { permAction, permMenus, Tab, BID, BData } = this.props
    let param = {
      func: 'sPC_Get_LongParam',
@@ -327,6 +321,8 @@
      }
      this.setState({
        BID: BID || '',
        BData: BData || '',
        loadingview: false,
        chartId,
        config,
@@ -360,8 +356,8 @@
  }
  
  loadData = () => {
    const { mainSearch, BID } = this.props
    const { setting, search, loadCustomApi, hasReqFields } = this.state
    const { mainSearch } = this.props
    const { setting, BID, search, loadCustomApi, hasReqFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -385,7 +381,7 @@
        statFValue: [],
        total: 0
      })
      this.handleTableId()
      MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.Tab.uuid, '', '')
      return
    } else if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) {
      notification.warning({
@@ -399,7 +395,7 @@
    this.setState({
      selectedData: []
    })
    this.handleTableId()
    MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.Tab.uuid, '', '')
    if (setting.interType === 'custom' && loadCustomApi) {
      if (setting.execTime === 'once') {
@@ -416,8 +412,7 @@
  }
  loadOutResource = (searches) => {
    const { BID } = this.props
    const { setting } = this.state
    const { setting, BID } = this.state
    let param = UtilsDM.getPrevQueryParams(setting, searches, BID, this.props.menuType)
@@ -511,7 +506,7 @@
  }
  customCallbackRequest = (result) => {
    const { setting } = this.state
    const { setting, BID } = this.state
    let errSql = ''
    if (result.$ErrCode === 'E') {
      errSql = `
@@ -535,8 +530,8 @@
      
      param = UtilsDM.getCallBackQueryParams(setting, sql, errSql)
      if (this.props.BID) {
        param.BID = this.props.BID
      if (BID) {
        param.BID = BID
      }
      if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证
@@ -587,8 +582,8 @@
   * @description 子表数据加载
   */
  async loadmaindata () {
    const { mainSearch, BID } = this.props
    const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { mainSearch } = this.props
    const { setting, BID, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -660,8 +655,8 @@
   * @description 获取单行数据
   */ 
  async loadmainLinedata (id) {
    const { mainSearch, BID } = this.props
    const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { mainSearch } = this.props
    const { setting, BID, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
    if (mainSearch && mainSearch.length > 0) { // 主表搜索条件
@@ -736,8 +731,7 @@
   * @description 获取合计字段值
   */
  getStatFieldsValue = (searches) => {
    const { BID } = this.props
    const { setting, orderBy, statFields } = this.state
    const { setting, BID, orderBy, statFields } = this.state
    if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return
@@ -782,7 +776,7 @@
   * 含有初始不加载的页面,修改设置
   */
  refreshbysearch = (searches) => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
    this.setState({
      pageIndex: 1,
      search: searches,
@@ -817,14 +811,14 @@
   */
  reloadtable = (btn) => {
    if (!btn || btn.resetPageIndex !== 'false') {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
      MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadData()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid, 'false') // 列表重置
      MKEmitter.emit('resetTable', this.props.Tab.uuid, 'false') // 列表重置
      this.loadData()
    }
  }
@@ -856,13 +850,6 @@
   */
  changeSelectedData = (selectedData) => {
    this.setState({selectedData})
  }
  /**
   * @description 表格Id变化
   */
  handleTableId = (type = this.props.Tab.uuid, id = '', data = '') => {
    this.props.handleTableId(type, id, data)
  }
  /**
@@ -907,15 +894,14 @@
    if (MenuID !== menuId) return
    const { Tab, SupMenuID, BID } = this.props
    const { Tab, SupMenuID } = this.props
    const { BID } = this.state
    if (position === 'grid' || position === 'view') {
      this.reloadtable(btn)
    } else if (position === 'maingrid' || position === 'mainline') {
      this.reloadtable(btn)
      if (Tab.supMenu === 'mainTable') {
        MKEmitter.emit('reloadData', SupMenuID, (BID || 'empty'))   // 主表重置
      } else if (Tab.supMenu) {
      if (Tab.supMenu) {
        MKEmitter.emit('reloadData', Tab.supMenu, (BID || 'empty')) // 主表重置
      } else if (!Tab.supMenu && Tab.level === 0) {
        MKEmitter.emit('reloadData', SupMenuID, (BID || 'empty'))   // 树形结构,0级标签
@@ -928,17 +914,35 @@
    }
  }
  changeTableLine = (ContainerId, tableId, id, data) => {
    const { Tab } = this.props
    if (!Tab.supMenu || tableId !== Tab.supMenu) return
    this.setState({BData: data, BID: id})
    if (id !== this.state.BID) {
      MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadData()
      })
    }
  }
  UNSAFE_componentWillMount() {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  shouldComponentUpdate (nextProps, nextState) { // handleTableId 函数判断时不相等
    return !is(fromJS({...this.props, handleTableId: ''}), fromJS({...nextProps, handleTableId: ''})) || !is(fromJS(this.state), fromJS(nextState))
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState))
  }
  componentDidMount () {
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
    MKEmitter.addListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult)
  }
@@ -951,18 +955,19 @@
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
    MKEmitter.removeListener('queryModuleParam', this.queryModuleParam)
    MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult)
  }
  render() {
    const { config, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, chartId, selectedData } = this.state
    const { config, BID, BData, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, chartId, selectedData } = this.state
    return (
      <div className="subtable" id={'subtable' + this.props.MenuID}>
        {loadingview && <Spin />}
        {searchlist && searchlist.length ?
          <SubSearch BID={this.props.BID} setting={setting} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
          <SubSearch BID={BID} setting={setting} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
        }
        {config ? <Row className="chart-view" gutter={16}>
          {/* 视图组 */}
@@ -979,12 +984,12 @@
                  {config.charts.length > 1 ? <p className="chart-table chart-title">{item.title}</p> : null}
                  <div className="sub-action">
                    <SubAction
                      BID={BID}
                      BData={BData}
                      setting={setting}
                      actions={actions}
                      columns={columns}
                      Tab={this.props.Tab}
                      BID={this.props.BID}
                      BData={this.props.BData}
                      MenuID={this.props.MenuID}
                      selectedData={selectedData}
                      ContainerId={this.props.ContainerId}
@@ -995,6 +1000,7 @@
                      <Switch title="收起" className="subtable-pickup" checkedChildren="开" unCheckedChildren="关" checked={pickup} onChange={this.pickupChange} /> : null
                    }
                    <SubTable
                      BData={BData}
                      tableId={this.props.Tab.uuid}
                      pickup={pickup}
                      setting={setting}
@@ -1002,14 +1008,12 @@
                      pageSize={pageSize}
                      dict={this.state.dict}
                      data={this.state.data}
                      BData={this.props.BData}
                      total={this.state.total}
                      MenuID={this.props.MenuID}
                      loading={this.state.loading}
                      statFValue={this.state.statFValue}
                      ContainerId={this.props.ContainerId}
                      refreshdata={this.refreshbytable}
                      handleTableId={this.handleTableId}
                      chgSelectData={this.changeSelectedData}
                    />
                  </div>
@@ -1019,17 +1023,17 @@
              return (
                <Col className="card-view" span={item.width} key={item.uuid}>
                  <CardComponent
                    BID={BID}
                    plot={item}
                    BData={BData}
                    config={config}
                    columns={columns}
                    Tab={this.props.Tab}
                    BID={this.props.BID}
                    BData={this.props.BData}
                    data={this.state.data}
                    MenuID={this.props.MenuID}
                    loading={this.state.loading}
                    tableId={this.props.Tab.uuid}
                    handleTableId={this.handleTableId}
                    ContainerId={this.props.ContainerId}
                  />
                </Col>
              )
@@ -1037,9 +1041,9 @@
              return (
                <Col span={item.width} key={item.uuid}>
                  <ChartComponent
                    BID={BID}
                    plot={item}
                    config={config}
                    BID={this.props.BID}
                    Tab={this.props.Tab}
                    data={this.state.data}
                    loading={this.state.loading}
src/tabviews/subtabtable/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Col, Row, Icon, Tabs} from 'antd'
import { notification, Spin} from 'antd'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
@@ -10,7 +10,7 @@
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import { updateSubTable } from '@/utils/utils-update.js'
import { updateSubTabTable } from '@/utils/utils-update.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import NotFount from '@/components/404'
@@ -18,12 +18,9 @@
import './index.scss'
const { TabPane } = Tabs
const SubSearch = asyncComponent(() => import('@/tabviews/zshare/topSearch'))
const SubAction = asyncComponent(() => import('@/tabviews/zshare/actionList'))
const SubTable = asyncSpinComponent(() => import('@/tabviews/zshare/normalTable'))
const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent'))
const ChartComponent = asyncSpinComponent(() => import('@/tabviews/zshare/chartcomponent'))
class SubTabModalTable extends Component {
  static propTpyes = {
@@ -54,7 +51,6 @@
    pageSize: 10,         // 每页数据条数
    orderBy: '',          // 排序
    search: '',           // 搜索条件数组,使用时需分场景处理
    chartId: '',          // 展开图表ID
    statFields: [],       // 合计字段
    statFValue: [],       // 合计值
    absFields: [],        // 绝对值字段
@@ -112,7 +108,7 @@
      let absFields = []     // 绝对值字段
      // 版本兼容
      config = updateSubTable(config)
      config = updateSubTabTable(config)
      // 不支持funcbutton、popview 类型按钮
      let labels = []
@@ -157,19 +153,6 @@
        return col
      })
      // 视图权限
      config.charts = config.charts.filter(item => {
        if (item.Hide === 'true') return false
        if (!item.blacklist || item.blacklist.length === 0) return true
        return item.blacklist.filter(v => roleId.indexOf(v) > -1).length === 0
      })
      if (config.charts.length <= 1) {
        config.expand = true
      }
      let chartId = config.charts[0] ? config.charts[0].uuid : ''
      // 1、筛选字段集,2、过滤隐藏列及合并列中的字段uuid
      config.columns.forEach(col => {
@@ -302,7 +285,6 @@
      this.setState({
        loadingview: false,
        chartId,
        config,
        absFields,
        statFields,
@@ -496,8 +478,8 @@
      
      param = UtilsDM.getCallBackQueryParams(setting, sql, errSql)
      if (this.state.BID) {
        param.BID = this.state.BID
      if (this.props.BID) {
        param.BID = this.props.BID
      }
      if (this.props.menuType === 'HS') { // 函数 sPC_TableData_InUpDe 云端验证
@@ -665,7 +647,7 @@
   * 含有初始不加载的页面,修改设置
   */
  refreshbysearch = (searches) => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
    this.setState({
      pageIndex: 1,
      search: searches
@@ -700,14 +682,14 @@
   */
  reloadtable = (btn) => {
    if (!btn || btn.resetPageIndex !== 'false') {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
      MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1
      }, () => {
        this.loadData()
      })
    } else {
      MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid, 'false') // 列表重置
      MKEmitter.emit('resetTable', this.props.Tab.uuid, 'false') // 列表重置
      this.loadData()
    }
    
@@ -757,13 +739,6 @@
    MKEmitter.emit('refreshPopButton', this.props.Tab.uuid)
  }
  /**
   * @description 图表视图切换
   */
  changeChart = (uuid) => {
    this.setState({chartId: uuid})
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
@@ -790,7 +765,7 @@
  }
  render() {
    const { config, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, chartId, selectedData } = this.state
    const { config, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, selectedData } = this.state
    return (
      <div className="subtabtable" id={'subtabtable' + this.props.MenuID}>
@@ -798,21 +773,7 @@
        {searchlist && searchlist.length ?
          <SubSearch BID={this.props.BID} setting={setting} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null
        }
        {config ? <Row className="chart-view" gutter={16}>
          {/* 视图组 */}
          {!config.expand ? <Tabs activeKey={chartId} onChange={this.changeChart}>
            {config.charts.map(item => (
              <TabPane tab={<Icon type={item.icon} />} key={item.uuid}></TabPane>
            ))}
          </Tabs> : null}
          {config.charts.map(item => {
            if (!config.expand && chartId !== item.uuid) return null
            if (item.chartType === 'table') {
              return (
                <Col span={item.width || 24} key={item.uuid}>
                  {config.charts.length > 1 ? <p className="chart-table chart-title">{item.title}</p> : null}
                  <div style={{minHeight: '25px'}}>
        {config ? <div style={{minHeight: '25px'}}>
                    <SubAction
                      setting={setting}
                      actions={actions}
@@ -823,8 +784,8 @@
                      selectedData={selectedData}
                      MenuID={this.props.SupMenuID}
                    />
                  </div>
                  <SubTable
        </div> : null}
        {config ? <SubTable
                    tableId={this.props.Tab.uuid}
                    setting={setting}
                    columns={columns}
@@ -838,40 +799,7 @@
                    refreshdata={this.refreshbytable}
                    statFValue={this.state.statFValue}
                    chgSelectData={this.changeSelectedData}
                    handleTableId={() => {}}
                  />
                </Col>
              )
            } else if (item.chartType === 'card') {
              return (
                <Col className="card-view" span={item.width} key={item.uuid}>
                  <CardComponent
                    tableId=""
                    plot={item}
                    config={config}
                    columns={columns}
                    BID={this.props.BID}
                    data={this.state.data}
                    BData={this.props.BData}
                    loading={this.state.loading}
                    handleTableId={() => {}}
                  />
                </Col>
              )
            } else {
              return (
                <Col span={item.width} key={item.uuid}>
                  <ChartComponent
                    plot={item}
                    config={config}
                    data={this.state.data}
                    loading={this.state.loading}
                  />
                </Col>
              )
            }
          })}
        </Row> : null }
        /> : null}
        {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
      </div>
    )
src/tabviews/treepage/index.jsx
@@ -56,11 +56,11 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { permAction, param, MenuName } = this.props
    const { permAction, param, MenuName, MenuID } = this.props
    let _param = {
      func: 'sPC_Get_LongParam',
      MenuID: this.props.MenuID
      MenuID: MenuID
    }
    let result = await Api.getCacheConfig(_param)
@@ -70,7 +70,7 @@
      try { // 配置信息解析
        config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
        config.MenuID = this.props.MenuID
        config.MenuID = MenuID
        config.MenuName = MenuName
        config.setting.$name = MenuName
      } catch (e) {
@@ -116,6 +116,9 @@
        group.sublist = group.sublist.filter(tab => {
          if (tab.supMenu === 'mainTable' || (!tab.supMenu && tab.level === 0)) {
            tab.isTreeNode = true
          }
          if (tab.supMenu === 'mainTable') {
            tab.supMenu = MenuID
          }
          return permAction[tab.linkTab]}
        )
@@ -408,7 +411,7 @@
  }
  selectTreeNode = (selectedKeys, {selected, node}) => {
    const { config } = this.state
    const { config, ContainerId } = this.state
    let _expandedKeys = fromJS(this.state.expandedKeys).toJS()
    let _data = fromJS(node.props.dataRef).toJS()
@@ -434,7 +437,9 @@
      })
      delete _data.children
      this.handleTableId('mainTable', _data.key, _data)
      MKEmitter.emit('changeTableLine', ContainerId, this.props.MenuID, _data.key, _data)
      this.setState({
        tabgroups: _tabgroups,
        expandedKeys: _expandedKeys,
@@ -469,21 +474,6 @@
    })
  }
  /**
   * @description 表格Id变化
   */
  handleTableId = (type, id, data) => {
    const { BIDs } = this.state
    this.setState({
      BIDs: {
        ...BIDs,
        [type]: id,
        [type + 'data']: data
      }
    })
  }
  reloadData = (menuId) => {
    const { MenuID } = this.props
@@ -508,6 +498,14 @@
    this.setShortcut()
  }
  changeTableLine = (ContainerId, tableId, id, data) => {
    if (this.state.ContainerId !== ContainerId) return
    this.setState({
      BIDs: {...this.state.BIDs, [tableId]: id, [tableId + 'data']: data}
    })
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
@@ -521,6 +519,7 @@
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu)
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
  }
  /**
@@ -534,6 +533,7 @@
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu)
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
  }
  changeExpandedKeys = (expandedKeys) => {
@@ -622,7 +622,6 @@
                          ContainerId={this.state.ContainerId}
                          BID={this.state.BIDs[_tab.supMenu] || ''}
                          BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                          handleTableId={this.handleTableId}
                        /> : null}
                    </TabPane>
                  )
src/tabviews/verupmanage/config.jsx
@@ -47,8 +47,8 @@
  ],
  gridBtn: {display: false},
  tabs:[
    {label:'脚本',type:'SubTable',linkTab:'15839835082267ac69e4gm0ig6ac00ob',icon:'',supMenu:'mainTable',equalTab:[],uuid:'1583979660949hguu6ildhut1ig5mco1'},
    {label:'已执行',type:'SubTable',linkTab:'1583984646423lo60vt7snppb55lslbt',icon:'',supMenu:'mainTable',equalTab:[],uuid:'1583984632864kedhlvu7l31us7pkmbq'}
    {label:'脚本',type:'SubTable',linkTab:'15839835082267ac69e4gm0ig6ac00ob',icon:'',supMenu:'1583979633842550imkchl4qt4qppsiv'/* mainTable */,equalTab:[],uuid:'1583979660949hguu6ildhut1ig5mco1'},
    {label:'已执行',type:'SubTable',linkTab:'1583984646423lo60vt7snppb55lslbt',icon:'',supMenu:'1583979633842550imkchl4qt4qppsiv'/* mainTable */,equalTab:[],uuid:'1583984632864kedhlvu7l31us7pkmbq'}
  ]
}
src/tabviews/verupmanage/index.jsx
@@ -127,7 +127,7 @@
   * @description 主表数据加载
   */ 
  async loadmaindata () {
    const { setting, BIDs } = this.state
    const { setting, ContainerId } = this.state
    let param = ''
    if (setting.interType !== 'inner' || (setting.interType === 'inner' && setting.innerFunc)) {
@@ -141,7 +141,7 @@
      pickup: false
    })
    this.handleTableId('mainTable', '', '')
    MKEmitter.emit('changeTableLine', ContainerId, this.props.MenuID, '', '')
    if (!param) { // 未获取参数时,不发请求
      return
@@ -157,10 +157,7 @@
        }),
        total: result.total,
        loading: false,
        BIDs: {
          ...BIDs,
          mainTable: ''
        }
        BIDs: {[this.props.MenuID] : ''}
      })
    } else {
      this.setState({
@@ -283,7 +280,7 @@
   * 含有初始不加载的页面,修改设置
   */
  refreshbysearch = (searches) => {
    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
    MKEmitter.emit('resetTable', this.props.MenuID) // 列表重置
    this.setState({
      loading: true,
      pageIndex: 1,
@@ -319,7 +316,7 @@
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
    MKEmitter.emit('resetTable', this.props.MenuID) // 列表重置
    this.setState({
      pageIndex: 1,
      loading: true
@@ -332,7 +329,7 @@
   * @description 页面刷新,重新获取配置
   */
  reloadview = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + 'mainTable') // 列表重置
    MKEmitter.emit('resetTable', this.props.MenuID) // 列表重置
    this.setState({
      config: {},
      searchlist: [],
@@ -402,21 +399,6 @@
  }
  /**
   * @description 表格Id变化
   */
  handleTableId = (type, id, data) => {
    const { BIDs } = this.state
    this.setState({
      BIDs: {
        ...BIDs,
        [type]: id,
        [type + 'data']: data
      }
    })
  }
  /**
   * @description 数据展开合并切换
   */
  pickupChange = () => {
@@ -434,6 +416,14 @@
    this.reloadview()
  }
  changeTableLine = (ContainerId, tableId, id, data) => {
    if (this.state.ContainerId !== ContainerId) return
    this.setState({
      BIDs: {...this.state.BIDs, [tableId]: id, [tableId + 'data']: data}
    })
  }
  UNSAFE_componentWillMount () {
    // 组件加载时,获取菜单数据
    this.loadconfig()
@@ -445,6 +435,7 @@
  componentDidMount () {
    MKEmitter.addListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
  }
  /**
@@ -455,6 +446,7 @@
      return
    }
    MKEmitter.removeListener('reloadMenuView', this.reloadMenuView)
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
  }
  render() {
@@ -482,7 +474,7 @@
            </div> : null
          }
          <MainTable
            tableId="mainTable"
            tableId={this.props.MenuID}
            pickup={pickup}
            setting={setting}
            columns={columns}
@@ -493,7 +485,7 @@
            loading={this.state.loading}
            refreshdata={this.refreshbytable}
            buttonTrigger={() => {}}
            handleTableId={this.handleTableId}
            ContainerId={this.state.ContainerId}
            chgSelectData={this.changeSelectedData}
          />
        </div>
@@ -514,7 +506,6 @@
                  ContainerId={this.state.ContainerId}
                  BID={this.state.BIDs[_tab.supMenu] || ''}
                  BData={this.state.BIDs[_tab.supMenu + 'data'] || ''}
                  handleTableId={this.handleTableId}
                  handleMainTable={(type) => this.handleMainTable(type, _tab)}
                />
              </TabPane>
src/tabviews/verupmanage/subtabtable/index.jsx
@@ -29,7 +29,6 @@
    MenuID: PropTypes.string,        // 菜单Id
    SupMenuID: PropTypes.string,     // 上级菜单Id
    ContainerId: PropTypes.any,      // 三级菜单Container(html) ID
    handleTableId: PropTypes.func,   // 控制表格数据切换时,更新在主表中的id
    handleMainTable: PropTypes.func, // 刷新主表
    refreshtabs:PropTypes.any
  }
@@ -54,22 +53,15 @@
    popData: false,       // 弹框页面,所选的表格数据
    visible: false,       // 弹框显示隐藏控制
    pickup: false,         // 子表数据隐藏显示切换
    BID: '',
    BData: ''
  }
  /**
   * @description 上级菜单id变化时,刷新数据
   */
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.state.config && this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) {
      this.setState({
        pageIndex: 1,
        selectedData: []
      }, () => {
        MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
        this.loadmaindata(nextProps.BID, 'refresh')
      })
    } else if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
    if (this.state.config && nextProps.refreshtabs && nextProps.refreshtabs.includes(this.props.Tab.uuid)) {
      this.reloadtable()
    }
  }
@@ -78,7 +70,7 @@
   * @description 获取页面配置信息
   */
  async loadconfig () {
    const { Tab, BID } = this.props
    const { Tab, BID, BData } = this.props
    let config = tabConfig[this.props.MenuID]
@@ -127,6 +119,8 @@
    }
    this.setState({
      BID: BID || '',
      BData: BData || '',
      config: config,
      setting: config.setting,
      searchlist: config.search,
@@ -152,14 +146,12 @@
  /**
   * @description 子表数据加载
   */
  async loadmaindata (bid, type) {
    const { setting } = this.state
  async loadmaindata (type) {
    const { setting, BID } = this.state
    let param = ''
    let _BID = this.props.BID
    
    if (type === 'refresh') {
      _BID = bid
      if (!bid) { // 主表ID不存在时,不查询子表
      if (!BID) { // 主表ID不存在时,不查询子表
        this.setState({
          data: [],
          total: 0,
@@ -171,12 +163,10 @@
    }
    if (setting.interType === 'system') {
      param = this.getDefaultParam(_BID)
      param = this.getDefaultParam(BID)
    } else {
      param = this.getCustomParam(_BID)
      param = this.getCustomParam(BID)
    }
    this.handleTableId()
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -184,7 +174,7 @@
        data: result.data.map((item, index) => {
          item.key = index
          item.$$uuid = item[setting.primaryKey] || ''
          item.$$BID = _BID || ''
          item.$$BID = BID || ''
          return item
        }),
        total: result.total,
@@ -304,7 +294,7 @@
   * 含有初始不加载的页面,修改设置
   */
  refreshbysearch = (searches) => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
    this.setState({
      loading: true,
      pageIndex: 1,
@@ -342,7 +332,7 @@
   * @description 表格刷新
   */
  reloadtable = () => {
    MKEmitter.emit('resetTable', this.props.MenuID + this.props.Tab.uuid) // 列表重置
    MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
    this.setState({
      loading: true,
      pageIndex: 1,
@@ -404,13 +394,6 @@
  }
  /**
   * @description 表格Id变化
   */
  handleTableId = (type = this.props.Tab.uuid, id = '', data = '') => {
    this.props.handleTableId(type, id, data)
  }
  /**
   * @description 数据展开合并切换
   */
  pickupChange = () => {
@@ -421,13 +404,35 @@
    })
  }
  changeTableLine = (ContainerId, tableId, id, data) => {
    const { Tab } = this.props
    if (tableId !== Tab.supMenu) return
    this.setState({BData: data, BID: id})
    if (id !== this.state.BID) {
      MKEmitter.emit('resetTable', this.props.Tab.uuid) // 列表重置
      this.setState({
        pageIndex: 1,
        selectedData: []
      }, () => {
        this.loadmaindata('refresh')
      })
    }
  }
  UNSAFE_componentWillMount() {
    // 组件加载时,获取菜单数据
    this.loadconfig()
  }
  componentDidMount () {
    MKEmitter.addListener('changeTableLine', this.changeTableLine)
  }
  shouldComponentUpdate (nextProps, nextState) { // handleMainTable 函数判断时不相等
    return !is(fromJS({...this.props, handleMainTable: '', handleTableId: ''}), fromJS({...nextProps, handleMainTable: '', handleTableId: ''})) || !is(fromJS(this.state), fromJS(nextState))
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -437,10 +442,11 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('changeTableLine', this.changeTableLine)
  }
  render() {
    const { setting, searchlist, actions, columns, pickup, selectedData } = this.state
    const { BID, BData, setting, searchlist, actions, columns, pickup, selectedData } = this.state
    return (
      <div className="verup-subtable" id={'subtable' + this.props.MenuID}>
@@ -451,12 +457,12 @@
          <div className="sub-action">
            <SubAction
              type="sub"
              BID={BID}
              BData={BData}
              setting={setting}
              actions={actions}
              columns={columns}
              Tab={this.props.Tab}
              BID={this.props.BID}
              BData={this.props.BData}
              dict={this.state.dict}
              selectedData={selectedData}
              MenuID={this.props.SupMenuID}
@@ -482,7 +488,6 @@
              loading={this.state.loading}
              refreshdata={this.refreshbytable}
              buttonTrigger={() => {}}
              handleTableId={this.handleTableId}
              chgSelectData={this.changeSelectedData}
            />
          </div> : null
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -43,7 +43,8 @@
    loading: false,
    loadingNumber: '',
    disabled: false,
    checkParam: null
    checkParam: null,
    autoMatic: false
  }
  moduleParams = null
@@ -68,13 +69,17 @@
  }
  componentDidMount () {
    const { position } = this.props
    const { position, btn } = this.props
    MKEmitter.addListener('triggerBtnId', this.actionTrigger)
    if (position === 'form') {
      MKEmitter.addListener('triggerFormSubmit', this.actionSubmit)
    }
    MKEmitter.addListener('returnModuleParam', this.resetModuleParam)
    if (btn.autoMatic) {
      MKEmitter.addListener('triggerBtnPopSubmit', this.triggerBtnPopSubmit)
    }
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
@@ -102,6 +107,15 @@
    MKEmitter.removeListener('triggerBtnId', this.actionTrigger)
    MKEmitter.removeListener('triggerFormSubmit', this.actionSubmit)
    MKEmitter.removeListener('returnModuleParam', this.resetModuleParam)
    MKEmitter.removeListener('triggerBtnPopSubmit', this.triggerBtnPopSubmit)
  }
  triggerBtnPopSubmit = (id) => {
    const { btn } = this.props
    if (btn.uuid !== id) return
    this.handleOk()
  }
  actionSubmit = (res) => {
@@ -154,6 +168,8 @@
        return
      }
    }
    this.setState({autoMatic: type === 'autoMatic'})
    let _this = this
    let data = record || selectedData || []
@@ -1344,9 +1360,9 @@
   */
  execSuccess = (res) => {
    const { btn } = this.props
    const { btnconfig } = this.state
    const { btnconfig, autoMatic } = this.state
    if (res && res.ErrCode === 'S') { // 执行成功
    if ((res && res.ErrCode === 'S') || autoMatic) { // 执行成功
      notification.success({
        top: 92,
        message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
@@ -1360,7 +1376,14 @@
    }
    
    if (btn.OpenType !== 'pop' || !btnconfig || btnconfig.setting.finish !== 'unclose') {
    if (autoMatic) {
      this.setState({
        loading: false,
        visible: false
      })
      MKEmitter.emit('autoExecOver', btn.uuid, 'success')
      return
    } else if (btn.OpenType !== 'pop' || !btnconfig || btnconfig.setting.finish !== 'unclose') {
      this.setState({
        loading: false,
        visible: false
@@ -1526,13 +1549,13 @@
   */
  execError = (res) => {
    const { btn } = this.props
    const { btnconfig } = this.state
    const { btnconfig, autoMatic } = this.state
    if (res.ErrCode === 'E') {
    if (res.ErrCode === 'E' && !autoMatic) {
      Modal.error({
        title: res.message || res.ErrMesg,
      })
    } else if (res.ErrCode === 'N') {
    } else if (res.ErrCode === 'N' || autoMatic) {
      notification.error({
        top: 92,
        message: res.message || res.ErrMesg,
@@ -1547,6 +1570,16 @@
      })
    } else if (res.ErrCode === 'NM') {
      message.error(res.message || res.ErrMesg)
    }
    if (autoMatic) {
      this.setState({
        loading: false,
        loadingNumber: '',
        visible: false
      })
      MKEmitter.emit('autoExecOver', btn.uuid, 'error')
      return
    }
    
    this.setState({
@@ -1644,10 +1677,10 @@
   */
  improveAction = () => {
    const { btn } = this.props
    const { btnconfig } = this.state
    const { btnconfig, autoMatic } = this.state
    if (btnconfig) {
      if (btnconfig.setting.display === 'prompt') { // 如果表单以是否框展示
      if (!autoMatic && btnconfig.setting.display === 'prompt') { // 如果表单以是否框展示
        this.modelconfirm()
      } else {
        this.setState({
@@ -1691,7 +1724,7 @@
          this.setState({
            btnconfig: _LongParam
          }, () => {
            if (_LongParam.setting.display === 'prompt') { // 如果表单以是否框展示
            if (!autoMatic && _LongParam.setting.display === 'prompt') { // 如果表单以是否框展示
              this.modelconfirm()
            } else {
              this.setState({
@@ -1708,6 +1741,7 @@
   * @description 模态框(表单),确认
   */
  handleOk = () => {
    if (!this.formRef) return
    this.formRef.handleConfirm().then(res => {
      this.setState({ confirmLoading: true })
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -41,7 +41,8 @@
    btnconfig: null,
    loading: false,
    disabled: false,
    loadingNumber: ''
    loadingNumber: '',
    autoMatic: false
  }
  UNSAFE_componentWillMount () {
@@ -64,7 +65,13 @@
  }
  componentDidMount () {
    const { btn } = this.props
    MKEmitter.addListener('triggerBtnId', this.actionTrigger)
    if (btn.autoMatic) {
      MKEmitter.addListener('triggerBtnPopSubmit', this.triggerBtnPopSubmit)
    }
  }
  UNSAFE_componentWillReceiveProps (nextProps) {
@@ -90,6 +97,15 @@
      return
    }
    MKEmitter.removeListener('triggerBtnId', this.actionTrigger)
    MKEmitter.removeListener('triggerBtnPopSubmit', this.triggerBtnPopSubmit)
  }
  triggerBtnPopSubmit = (id) => {
    const { btn } = this.props
    if (btn.uuid !== id) return
    this.handleOk()
  }
  
  /**
@@ -113,6 +129,8 @@
        return
      }
    }
    this.setState({autoMatic: type === 'autoMatic'})
    let _this = this
    let data = record || selectedData || []
@@ -1206,8 +1224,9 @@
   */
  execSuccess = (res) => {
    const { btn } = this.props
    const { autoMatic } = this.state
    if (res && res.ErrCode === 'S') { // 执行成功
    if ((res && res.ErrCode === 'S') || autoMatic) { // 执行成功
      notification.success({
        top: 92,
        message: res.ErrMesg || this.state.dict['main.action.confirm.success'],
@@ -1225,6 +1244,11 @@
      loading: false
    })
    if (autoMatic) {
      MKEmitter.emit('autoExecOver', btn.uuid, 'success')
      return
    }
    if (btn.execSuccess !== 'never') {
      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn)
    }
@@ -1238,13 +1262,13 @@
   */
  execError = (res) => {
    const { btn } = this.props
    const { btnconfig } = this.state
    const { btnconfig, autoMatic } = this.state
    if (res.ErrCode === 'E') {
    if (res.ErrCode === 'E' && !autoMatic) {
      Modal.error({
        title: res.message || res.ErrMesg,
      })
    } else if (res.ErrCode === 'N') {
    } else if (res.ErrCode === 'N' || autoMatic) {
      notification.error({
        top: 92,
        message: res.message || res.ErrMesg,
@@ -1264,6 +1288,11 @@
    this.setState({
      loading: false
    })
    if (autoMatic) {
      MKEmitter.emit('autoExecOver', btn.uuid, 'error')
      return
    }
    if (btnconfig && btnconfig.setting && btnconfig.setting.errFocus) {
      MKEmitter.emit('mkFC', 'focus', btnconfig.setting.errFocus)
@@ -1313,10 +1342,10 @@
   */
  improveAction = () => {
    const { btn } = this.props
    const { btnconfig } = this.state
    const { btnconfig, autoMatic } = this.state
    if (btnconfig) {
      if (btnconfig.setting.display === 'prompt') { // 如果表单以是否框展示
      if (!autoMatic && btnconfig.setting.display === 'prompt') { // 如果表单以是否框展示
        this.modelconfirm()
      } else {
        this.setState({
@@ -1360,7 +1389,7 @@
          this.setState({
            btnconfig: _LongParam
          }, () => {
            if (_LongParam.setting.display === 'prompt') { // 如果表单以是否框展示
            if (!autoMatic && _LongParam.setting.display === 'prompt') { // 如果表单以是否框展示
              this.modelconfirm()
            } else {
              this.setState({
@@ -1377,9 +1406,12 @@
   * @description 模态框(表单),确认
   */
  handleOk = () => {
    const { btnconfig } = this.state
    const { btnconfig, autoMatic } = this.state
    if (!this.formRef) return
    this.formRef.handleConfirm().then(res => {
      if (btnconfig.setting.finish !== 'unclose') {
      if (btnconfig.setting.finish !== 'unclose' || autoMatic) {
        this.setState({
          visible: false
        })
src/tabviews/zshare/automatic/index.jsx
@@ -3,7 +3,7 @@
import { is, fromJS } from 'immutable'
import { Button } from 'antd'
// import MKEmitter from '@/utils/events.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
class AutoMatic extends Component {
@@ -14,7 +14,18 @@
  state = {
    running: false,
    line: 0
    line: 1,
    init: true
  }
  timer = null
  componentDidMount () {
    MKEmitter.addListener('autoGetData', this.autoGetData)
    MKEmitter.addListener('autoExecOver', this.autoExecOver)
    MKEmitter.addListener('autoMaticOver', this.autoMaticOver)
    MKEmitter.addListener('autoMaticError', this.autoMaticError)
    MKEmitter.addListener('autoTransSelectData', this.autoTransSelectData)
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -28,15 +39,119 @@
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('autoGetData', this.autoGetData)
    MKEmitter.removeListener('autoExecOver', this.autoExecOver)
    MKEmitter.removeListener('autoMaticOver', this.autoMaticOver)
    MKEmitter.removeListener('autoMaticError', this.autoMaticError)
    MKEmitter.removeListener('autoTransSelectData', this.autoTransSelectData)
  }
  autoExecOver = (btnId, type) => {
    const { autoMatic, config } = this.props
    if (!this.state.running || btnId !== autoMatic.action) return
    if (type === 'error') {
      if (autoMatic.onFail === 'next') {
        this.setState({line: this.state.line + 1}, () => {
          setTimeout(() => {
            MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
          }, 1000)
        })
      } else if (autoMatic.onFail === 'stay') {
        setTimeout(() => {
          MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
        }, 1000)
      } else {
        this.setState({running: false})
      }
    } else {
      if (autoMatic.onSuccess === 'next') {
        this.setState({line: this.state.line + 1}, () => {
          setTimeout(() => {
            MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
          }, 1000)
        })
      } else if (autoMatic.onSuccess === 'stay') {
        setTimeout(() => {
          MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
        }, 1000)
      } else {
        this.setState({running: false})
      }
    }
  }
  autoTransSelectData = (MenuID, data) => {
    const { config, autoMatic } = this.props
    if (!this.state.running || MenuID !== config.MenuID) return
    setTimeout(() => {
      MKEmitter.emit('triggerBtnId', autoMatic.action, [data], 'autoMatic')
      if (['prompt', 'pop'].includes(autoMatic.OpenType)) {
        let delay = this.state.init && autoMatic.OpenType === 'pop' ? 2000 : 200
        setTimeout(() => {
          if (autoMatic.OpenType === 'prompt') {
            let node = document.querySelector('.ant-modal-confirm-btns >.ant-btn-primary')
            node && node.click()
          } else if (autoMatic.OpenType === 'pop') {
            MKEmitter.emit('triggerBtnPopSubmit', autoMatic.action)
          }
        }, delay)
      }
    }, 100)
  }
  autoMaticError = (MenuID) => {
    const { config } = this.props
    if (!this.state.running || MenuID !== config.MenuID) return
    this.setState({running: false})
  }
  autoGetData = (MenuID) => {
    const { config } = this.props
    if (!this.state.running || MenuID !== config.MenuID) return
    setTimeout(() => {
      MKEmitter.emit('autoSelectData', config.MenuID, this.state.line)
    }, 100)
  }
  trigger = () => {
    // const { config } = this.props
    const { config } = this.props
    let running = !this.state.running
    // MKEmitter.emit('autoQueryData', config.MenuID, 0)
    MKEmitter.emit('autoQueryData', config.MenuID, 1)
    this.setState({running: running})
    this.setState({running: running, line: 1})
    clearTimeout(this.timer)
  }
  autoMaticOver = (MenuID) => {
    const { config, autoMatic } = this.props
    if (!this.state.running || MenuID !== config.MenuID) return
    this.setState({running: false})
    if (autoMatic.onFinish !== 'over') {
      let interval = autoMatic.interval * 1000 || 10
      if (autoMatic.restart === 'first') {
        this.setState({line: 1})
      } else {
        this.setState({line: this.state.line + 1})
      }
      this.timer = setTimeout(() => {
        this.setState({running: true})
        MKEmitter.emit('autoQueryData', config.MenuID, this.state.line)
      }, interval)
    }
  }
  render() {
src/tabviews/zshare/cardcomponent/index.jsx
@@ -5,6 +5,7 @@
import asyncComponent from '@/utils/asyncComponent'
import asyncExcelComponent from './asyncButtonComponent'
import MKEmitter from '@/utils/events.js'
import '@/assets/css/table.scss'
import './index.scss'
@@ -513,7 +514,6 @@
    tableId: PropTypes.string,
    loading: PropTypes.bool,
    data: PropTypes.array,
    handleTableId: PropTypes.func
  }
  state = {
@@ -735,7 +735,7 @@
    this.setState({selectKey: data.key})
    this.props.handleTableId(this.props.tableId, _id, data)
    MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.tableId, _id, data)
  }
  render() {
src/tabviews/zshare/normalTable/index.jsx
@@ -45,7 +45,6 @@
    total: PropTypes.any,            // 总数
    loading: PropTypes.bool,         // 表格加载中
    refreshdata: PropTypes.func,     // 表格中排序列、页码的变化时刷新
    handleTableId: PropTypes.func,   // 数据切换
    chgSelectData: PropTypes.func,   // 数据切换
  }
@@ -237,6 +236,8 @@
  componentDidMount () {
    MKEmitter.addListener('resetTable', this.resetTable)
    MKEmitter.addListener('autoQueryData', this.autoQueryData)
    MKEmitter.addListener('autoSelectData', this.autoSelectData)
    MKEmitter.addListener('mkTableCheckTopLine', this.mkTableCheckTopLine)
  }
@@ -248,6 +249,8 @@
      return
    }
    MKEmitter.removeListener('resetTable', this.resetTable)
    MKEmitter.removeListener('autoQueryData', this.autoQueryData)
    MKEmitter.removeListener('autoSelectData', this.autoSelectData)
    MKEmitter.removeListener('mkTableCheckTopLine', this.mkTableCheckTopLine)
  }
@@ -257,6 +260,43 @@
    if (this.props.data.length > 0) {
      this.changeRow(null, 0)
    }
  }
  autoSelectData = (id, index) => {
    if (id !== this.props.MenuID) return
    const { pageSize, pageIndex } = this.state
    let i = index - (pageIndex - 1) * pageSize - 1
    if (this.props.data[i]) {
      this.changeRow(null, i)
      MKEmitter.emit('autoTransSelectData', this.props.MenuID, this.props.data[i])
    } else {
      MKEmitter.emit('autoMaticOver', this.props.MenuID)
    }
  }
  autoQueryData = (id, index) => {
    if (id !== this.props.MenuID) return
    const { total } = this.props
    const { pageSize } = this.state
    if (index !== 1 && (!total || index > total)) {
      MKEmitter.emit('autoMaticOver', this.props.MenuID)
      return
    }
    let pageIndex = Math.ceil(index / pageSize)
    this.setState({
      pageIndex: pageIndex,
      selectedRowKeys: [],
      activeIndex: null
    })
    this.props.refreshdata({pageIndex})
  }
  // 字段透视
@@ -1016,7 +1056,9 @@
  }
  changedata = (index) => {
    const { data, setting } = this.props
    const { data, setting, tableId, ContainerId } = this.props
    if (!tableId || !ContainerId) return
    let _id = ''
    let _data = ''
@@ -1026,13 +1068,13 @@
      _data = data[index] || ''
    }
    this.props.handleTableId(this.props.tableId, _id, _data)
    MKEmitter.emit('changeTableLine', ContainerId, tableId, _id, _data)
  }
  resetTable = (id, repage) => {
    const { MenuID, tableId } = this.props
    const { tableId } = this.props
    if (id !== (MenuID + tableId)) return
    if (id !== tableId) return
    if (repage === 'false') {
      this.setState({
src/utils/utils-update.js
@@ -221,3 +221,41 @@
  return config
}
/**
 * @description 升级弹窗子表信息
 * @param {Object}   config      页面配置信息
 * @return {Object}  config
 */
export function updateSubTabTable (config) {
  if (!config.version || config.version < '1.1') {
    config.version = '1.1'
    if (config.setting.interType === 'inner' && !config.setting.innerFunc) {
      config.setting.interType = 'system'
    }
    // 兼容接口类型
    config.action = config.action.map(item => {
      if (item.intertype === 'inner' && !item.innerFunc) {
        item.intertype = 'system'
      }
      return item
    })
  }
  if (config.version < '1.2') {
    config.version = '1.2'
    // 兼容功能按钮
    config.action = config.action.map(item => {
      if (item.execMode) {
        item.OpenType = 'funcbutton'
      } else if (item.OpenType === 'blank') {
        item.OpenType = 'tab'
      }
      return item
    })
  }
  config.Template = 'SubTable'
  return config
}