king
2020-12-04 3659f0773a14b54c18ed0af8b64de4afe8227489
src/tabviews/scriptmanage/index.jsx
@@ -34,7 +34,6 @@
    actions: [],          // 按钮集
    columns: [],          // 显示列
    arr_field: '',        // 使用 sPC_Get_TableData 时的查询字段集
    logcolumns: null,     // 日志中显示的列信息 (增加至全部列,除去合并列)
    setting: {},          // 页面全局设置:数据源、按钮及显示列固定、主键等
    data: [],             // 列表数据集
    selectedData: [],     // 已选表格数据
@@ -56,7 +55,6 @@
    let _arrField = []     // 字段集
    let _columns = []      // 显示列
    let _logcolumns = []   // 日志显示列
    let _hideCol = []      // 隐藏及合并列中字段的uuid集
    let colMap = new Map() // 用于字段过滤
@@ -64,13 +62,9 @@
    config.columns.forEach(col => {
      if (col.field) {
        _arrField.push(col.field)
        _logcolumns.push(col)
      }
      if (col.type === 'colspan' && col.sublist) { // 筛选隐藏列
        _hideCol = _hideCol.concat(col.sublist)
      } else if (col.Hide === 'true') {
        _hideCol.push(col.uuid)
      }
      colMap.set(col.uuid, col)
    })
@@ -79,10 +73,14 @@
    config.columns.forEach(col => {
      if (_hideCol.includes(col.uuid)) return
      if (col.type === 'colspan' && col.sublist) {
        let _col = JSON.parse(JSON.stringify(col))
      if (col.type === 'colspan') {
        if (col.unfold !== 'true') { // 不展开为旧版合并列
          col.type = 'old_colspan'
        }
        let _col = fromJS(col).toJS()
        let subcols = []
        _col.sublist.forEach(sub => {
        _col.sublist && _col.sublist.forEach(sub => {
          if (colMap.has(sub)) {
            subcols.push(colMap.get(sub))
          }
@@ -105,7 +103,6 @@
        return item
      }),
      columns: _columns,
      logcolumns: _logcolumns,
      arr_field: _arrField.join(','),
      search: Utils.initMainSearch(config.search)
    }, () => {
@@ -305,7 +302,7 @@
  }
  render() {
    const { dict, searchlist, config, setting, actions, columns, pickup, selectedData } = this.state
    const { dict, searchlist, setting, actions, columns, pickup, selectedData } = this.state
    return (
      <div className="script-manage-table" id={this.state.ContainerId}>
@@ -322,7 +319,6 @@
          dict={this.state.dict}
          MenuID={this.props.MenuID}
          selectedData={selectedData}
          logcolumns={this.state.logcolumns}
          ContainerId={this.state.ContainerId}
          refreshdata={this.refreshbyaction}
        />
@@ -335,7 +331,6 @@
          <MainTable
            tableId="mainTable"
            pickup={pickup}
            config={config}
            setting={setting}
            columns={columns}
            dict={this.state.dict}