king
2023-08-23 547e5fe219ee7bee309ecd67db74bc8df66b5433
src/tabviews/subtabtable/index.jsx
@@ -34,7 +34,6 @@
    config: null,         // 页面配置信息,包括按钮、搜索、显示列、标签等
    actions: null,        // 按钮集
    columns: null,        // 显示列
    arr_field: '',        // 查询字段集
    setting: null,        // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -201,6 +200,16 @@
        if (item.OpenType === 'popview') return
        if (item.OpenType === 'excelOut') { // 导出
          item.$menuName = Tab.label
          if (!item.verify || !item.verify.columns || item.verify.columns.length === 0) {
            item.errorType = 'error1'
          } else if (item.intertype === 'system' && item.verify.dataType !== 'custom' && config.setting.interType !== 'system') {
            item.errorType = 'error2'
          }
        }
        if (item.controlField) {
          if (/,/ig.test(item.controlVal)) {
            item.controlVals = item.controlVal.split(',')
@@ -300,6 +309,8 @@
        resetContrl: config.setting.resetContrl,
      }
      config.setting.arr_field = _arrField.join(',')
      this.setState({
        pageSize: config.setting.pageSize || 10,
        loadingview: false,
@@ -309,7 +320,6 @@
        setting: config.setting,
        actions: _actions,
        columns: _columns,
        arr_field: _arrField.join(','),
        search: Utils.initMainSearch(config.search), // 搜索条件初始化(含有时间格式,需要转化)
      }, () => {
        if (config.setting.onload !== 'false') { // 初始化可加载
@@ -365,7 +375,7 @@
   */
  async loadmaindata (id) {
    const { BID } = this.props
    const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
@@ -374,7 +384,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID)
    let result = await Api.genericInterface(param)
@@ -490,7 +500,7 @@
   */ 
  async loadmainLinedata (id) {
    const { BID } = this.props
    const { setting, arr_field, search, orderBy, pageIndex, pageSize, absFields } = this.state
    const { setting, search, orderBy, pageIndex, pageSize, absFields } = this.state
    let searches = fromJS(search).toJS()
@@ -499,7 +509,7 @@
    })
    let _orderBy = orderBy || setting.order
    let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id)
    let param = UtilsDM.getQueryDataParams(setting, searches, _orderBy, pageIndex, pageSize, BID, id)
    let result = await Api.genericInterface(param)
    if (result.status) {
@@ -623,16 +633,14 @@
   * @description 导出Excel时,获取页面搜索排序等参数
   */
  queryModuleParam = (menuId, callback) => {
    const { Tab, MenuID } = this.props
    const { arr_field, orderBy, search, setting} = this.state
    const { MenuID } = this.props
    const { orderBy, search, setting} = this.state
    if (MenuID !== menuId) return
    callback({
      arr_field: arr_field,
      orderBy: orderBy || setting.order,
      search: search,
      menuName: Tab.label
      search: search
    })
  }