From ecef296362ee15765e317df6df158a6034924fcf Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 03 十一月 2023 12:04:40 +0800 Subject: [PATCH] 2023-11-03 --- src/tabviews/custom/components/table/edit-table/normalTable/index.scss | 1 + src/menu/components/table/edit-table/columns/index.scss | 2 +- src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx | 14 ++++++++------ src/menu/components/table/edit-table/index.jsx | 2 +- src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 16 ++++++++-------- src/menu/components/table/edit-table/columns/index.jsx | 6 ++++-- 6 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index 9e795e5..0c32473 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -600,6 +600,14 @@ options: fields }, { + type: 'text', + key: 'ctrlValue', + label: '绂佹鍊�', + initVal: card.ctrlValue || '', + tooltip: '澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + required: false + }, + { type: 'select', key: 'clearField', label: '娓呯┖瀛楁', @@ -608,14 +616,6 @@ allowClear: true, required: false, options: fields - }, - { - type: 'text', - key: 'ctrlValue', - label: '绂佹鍊�', - initVal: card.ctrlValue || '', - tooltip: '澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', - required: false }, { type: 'number', diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx index e6e92ee..a141757 100644 --- a/src/menu/components/table/edit-table/columns/index.jsx +++ b/src/menu/components/table/edit-table/columns/index.jsx @@ -190,8 +190,9 @@ class NormalTableColumns extends Component { static propTpyes = { - config: PropTypes.object, // 閰嶇疆淇℃伅 - updatecolumn: PropTypes.func // 鏁版嵁鍙樺寲 + config: PropTypes.object, + updatecolumn: PropTypes.func, + addColumns: PropTypes.func } state = { @@ -691,6 +692,7 @@ } trigger="hover"> <Button className="submit-btn" style={config.submit.style} onDoubleClick={() => this.setState({visible: true})} type="primary">鎻愪氦</Button> </Popover> + <PlusOutlined title="娣诲姞鍒�" onClick={this.props.addColumns}/> <CopyOutlined title="澶嶅埗鏄剧ず鍒�" onClick={this.copycolumn} /> <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} /> <ColsControl config={config} onSubmit={this.props.updatecolumn}/> diff --git a/src/menu/components/table/edit-table/columns/index.scss b/src/menu/components/table/edit-table/columns/index.scss index 613cfb2..ec4172d 100644 --- a/src/menu/components/table/edit-table/columns/index.scss +++ b/src/menu/components/table/edit-table/columns/index.scss @@ -109,7 +109,7 @@ margin-right: 10px; cursor: pointer; } - >.anticon-copy { + >.anticon-copy, >.anticon-plus { color: #26C281; margin-left: 5px; } diff --git a/src/menu/components/table/edit-table/index.jsx b/src/menu/components/table/edit-table/index.jsx index 2595c3d..7c38a7a 100644 --- a/src/menu/components/table/edit-table/index.jsx +++ b/src/menu/components/table/edit-table/index.jsx @@ -371,7 +371,7 @@ </Popover> <SearchComponent config={card} updatesearch={this.updateComponent}/> <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> - <ColumnComponent config={card} updatecolumn={this.updatecolumn}/> + <ColumnComponent config={card} updatecolumn={this.updatecolumn} addColumns={this.addColumns}/> <div className="component-name"> <div className="center"> <div className="title" onDoubleClick={() => { diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss index be948ed..0953cbe 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss @@ -186,6 +186,7 @@ right: 0px; bottom: 0px; border: 1px solid var(--mk-sys-color); + background: #ffffff; } } .ant-calendar-picker { diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx index e99578c..47eb46b 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx @@ -284,7 +284,7 @@ this.props.onChange(values, record.$$uuid) - this.setState({visible: false}) + this.setState({visible: false, value: record.$$uuid}) if (config.$ctrl) { MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) @@ -294,11 +294,13 @@ if (config.enter === '$noAct') return - if (/\$next/.test(config.enter)) { - MKEmitter.emit('nextLine' + config.tableId, lineId, config.enter.replace('$next_', '')) - } else { - MKEmitter.emit('setFocus' + config.tableId, lineId, config.enter) - } + setTimeout(() => { + if (/\$next/.test(config.enter)) { + MKEmitter.emit('nextLine' + config.tableId, lineId, config.enter.replace('$next_', '')) + } else { + MKEmitter.emit('setFocus' + config.tableId, lineId, config.enter) + } + }, 10) } trigger = (e) => { -- Gitblit v1.8.0