king
2025-02-06 d1cd5af5adb53e91efdd278328e1b6f8ad834fb5
src/menu/datasource/verifycard/index.jsx
@@ -62,6 +62,7 @@
        inputType: 'input',
        editable: true,
        searchable: true,
        copy: true,
        width: '28%'
      },
      {
@@ -118,6 +119,7 @@
          { value: 'datetime', text: 'datetime' },
        ],
        editable: true,
        copy: true,
        width: '25%',
      }
    ],
@@ -717,6 +719,13 @@
      let r = SettingUtils.getDebugSql(setting, _scripts, _columns, searches, config.subtype, config.hasExtend)
      if (type === 'submit' && r.custompage && setting.queryType !== 'statistics') {
        Modal.info({
          title: '数据源或自定义脚本中使用了自定义分页,查询类型请使用统计!',
        })
        reject()
        return
      }
      if (r.custompage && setting.laypage === 'true' && _columns.findIndex(col => col.field === 'mk_total') === -1) {
        if (config.subtype !== 'basetable') {
          const that = this
@@ -1208,33 +1217,6 @@
    })
  }
  tolowercase = (type) => {
    const that = this
    confirm({
      content: type === 'sub' ? '确定将子表字段转为小写吗?' : '确定将字段转为小写吗?',
      onOk() {
        that.execlowercase(type)
      },
      onCancel() {}
    })
  }
  execlowercase = (type) => {
    const { subColumns, columns } = this.state
    if (type === 'sub') {
      this.setState({subColumns: fromJS(subColumns).toJS().map(col => {
        col.field = col.field.toLowerCase()
        return col
      })})
    } else {
      this.setState({columns: fromJS(columns).toJS().map(col => {
        col.field = col.field.toLowerCase()
        return col
      })})
    }
  }
  /**
   * @description 组件销毁,清除state更新
   */
@@ -1282,7 +1264,6 @@
              type="fields"
              updatefield={this.updatefields}
            />
            <SwapOutlined className="columns-lowercase" title="转小写" onClick={() => this.tolowercase()}/>
            <ExcelOut data={columns} setting={setting}/>
            <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} searchKey={searchKey} type="datasourcefield" wrappedComponentRef={(inst) => this.datasource = inst} data={columns} columns={colColumns} onChange={(columns) => this.setState({columns})}/>
          </TabPane> : <TabPane tab={
@@ -1307,7 +1288,6 @@
              type="fields"
              updatefield={this.updateSubfields}
            />
            <SwapOutlined className="columns-lowercase" title="转小写" onClick={() => this.tolowercase('sub')}/>
            <ExcelOut data={subColumns} setting={setting}/>
            <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} searchKey={searchKey} type="datasourcefield" wrappedComponentRef={(inst) => this.subdatasource = inst} data={subColumns} columns={colColumns} onChange={(subColumns) => this.setState({subColumns})}/>
          </TabPane> : null}