From 74e5d38d9a0e94421ceceea37c4677e5b57364ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 十月 2022 00:33:18 +0800 Subject: [PATCH] 2022-10-14 --- src/menu/components/table/base-table/columns/index.jsx | 59 +---------------------------------------------------------- 1 files changed, 1 insertions(+), 58 deletions(-) diff --git a/src/menu/components/table/base-table/columns/index.jsx b/src/menu/components/table/base-table/columns/index.jsx index f68b463..9705724 100644 --- a/src/menu/components/table/base-table/columns/index.jsx +++ b/src/menu/components/table/base-table/columns/index.jsx @@ -3,7 +3,7 @@ import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' import { Table, Popover, Modal, message } from 'antd' -import { PlusOutlined, FileSyncOutlined, EditOutlined, CopyOutlined, DeleteOutlined, FontColorsOutlined, CloseCircleOutlined, AntDesignOutlined } from '@ant-design/icons' +import { PlusOutlined, EditOutlined, CopyOutlined, DeleteOutlined, FontColorsOutlined, CloseCircleOutlined, AntDesignOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' @@ -501,61 +501,6 @@ }) } - syncfield = () => { - const { fields } = this.state - let columns = fromJS(this.state.columns).toJS() - - columns = columns.filter(c => !c.origin) - - let keys = columns.map(col => col.field) - - fields.forEach(item => { - if (keys.includes(item.field)) return - - let cell = { uuid: Utils.getuuid(), label: item.label, field: item.field, Align: 'left', Hide: 'false', IsSort: 'true', Width: 120, blacklist: [], postfix: '', prefix: '', linkmenu: [], marks: [], perspective: 'linkmenu' } - - if (/Nvarchar|date/ig.test(item.datatype)) { - cell.type = 'text' - cell.rowspan = 'false' - cell.textFormat = 'none' - } else { - cell.type = 'number' - cell.format = 'none' - cell.sum = 'false' - cell.decimal = item.decimal || 0 - cell.Width = 80 - } - - columns.push(cell) - }) - - const _this = this - - confirm({ - content: '纭畾鍚屾瀛楁闆嗗悧锛�', - onOk() { - _this.setState({columns}, () => { - _this.props.updatecolumn({..._this.props.config, cols: columns}) - }) - }, - onCancel() {} - }) - } - - clear = () => { - const _this = this - - confirm({ - content: '纭畾娓呯┖鏄剧ず鍒楀悧锛�', - onOk() { - _this.setState({columns: []}, () => { - _this.props.updatecolumn({..._this.props.config, cols: []}) - }) - }, - onCancel() {} - }) - } - /** * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊锛屾竻闄ゅ揩鎹烽敭璁剧疆 */ @@ -584,8 +529,6 @@ <div className="col-control"> <CopyOutlined title="澶嶅埗鏄剧ず鍒�" onClick={this.copycolumn} /> <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} /> - <FileSyncOutlined title="鍚屾瀛楁闆�" onClick={this.syncfield} /> - <DeleteOutlined title="娓呯┖鏄剧ず鍒�" onClick={this.clear}/> </div> <DndProvider> <Table -- Gitblit v1.8.0