From 65da4dae29c621df1764cb5523c64e92be8b180a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 02 十月 2024 15:40:40 +0800 Subject: [PATCH] 2024-10-02 --- src/menu/datasource/verifycard/index.jsx | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index a2f6111..500966b 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/src/menu/datasource/verifycard/index.jsx @@ -1186,6 +1186,33 @@ }) } + 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鏇存柊 */ @@ -1233,6 +1260,7 @@ 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={ @@ -1257,6 +1285,7 @@ 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} -- Gitblit v1.8.0