From 45224a77b80aa6bbd905d91f19d7b0d9dd6d6f05 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 15 一月 2024 14:22:47 +0800 Subject: [PATCH] 2024-01-15 --- src/menu/components/form/formaction/formconfig.jsx | 9 ++++ src/tabviews/custom/index.scss | 8 ---- src/components/header/index.jsx | 5 +- src/components/normalform/modalform/mkTable/index.jsx | 13 ++++++ src/menu/components/share/actioncomponent/formconfig.jsx | 2 + src/tabviews/basetable/index.scss | 10 ---- src/menu/components/form/formaction/actionform/index.jsx | 5 ++ src/tabviews/zshare/actionList/normalbutton/index.jsx | 9 ++++ src/tabviews/custom/popview/index.scss | 10 ---- 9 files changed, 40 insertions(+), 31 deletions(-) diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 7bc1c43..1600d6b 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -31,7 +31,8 @@ searchkey: '', thdMenuList: [], debug: sessionStorage.getItem('debug') === 'true' && window.GLOB.memberLevel > 0, - collapse: sessionStorage.getItem('collapse') === 'true' + collapse: sessionStorage.getItem('collapse') === 'true', + lang: sessionStorage.getItem('lang') || '' } UNSAFE_componentWillMount () { @@ -788,7 +789,7 @@ </Dropdown> {/* 缂栬緫鐘舵�佺櫥褰� */} <Modal - title="鐧诲綍寮�鍙戞満" + title={<span>鐧诲綍寮�鍙戞満{this.state.lang === 'en-US' ? <span style={{color: 'red'}}>锛堣嫳鏂囷級</span> : ''}</span>} visible={this.state.loginVisible} onOk={this.loginSubmit} width={'430px'} diff --git a/src/components/normalform/modalform/mkTable/index.jsx b/src/components/normalform/modalform/mkTable/index.jsx index 1baf22f..341e32a 100644 --- a/src/components/normalform/modalform/mkTable/index.jsx +++ b/src/components/normalform/modalform/mkTable/index.jsx @@ -276,7 +276,18 @@ columns.forEach(col => { if (col.unique !== true || !unique) return - let _index = newData.findIndex(item => record.uuid !== item.uuid && record[col.dataIndex] === item[col.dataIndex]) + let _index = newData.findIndex(item => { + if (record.uuid === item.uuid) return false + + if (col.inputType === 'cascader') { + if (!Array.isArray(record[col.dataIndex]) || !Array.isArray(item[col.dataIndex])) { + return false + } + return record[col.dataIndex].toString() === item[col.dataIndex].toString() + } + + return record[col.dataIndex] === item[col.dataIndex] + }) if (_index > -1) { notification.warning({ diff --git a/src/menu/components/form/formaction/actionform/index.jsx b/src/menu/components/form/formaction/actionform/index.jsx index d618233..abd4eb7 100644 --- a/src/menu/components/form/formaction/actionform/index.jsx +++ b/src/menu/components/form/formaction/actionform/index.jsx @@ -62,6 +62,9 @@ if (this.record.execSuccess === 'never') { shows.push('resetForms') } + if (this.record.syncComponent && this.record.syncComponent[0]) { + shows.push('syncDelay') + } if (this.record.intertype === 'custom') { shows.push('procMode', 'interface', 'callbackType', 'proInterface', 'method', 'cross', 'stringify', 'ContentType', 'outerBlacklist') if (this.record.procMode === 'system') { @@ -260,7 +263,7 @@ message: '璇疯緭鍏�' + item.label + '!' } ] - })(<InputNumber min={0} max={10000} precision={0} onPressEnter={this.handleSubmit}/>)} + })(<InputNumber min={0} max={10000} placeholder={item.placeholder || ''} precision={0} onPressEnter={this.handleSubmit}/>)} </Form.Item> </Col> ) diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx index dbec712..cb760da 100644 --- a/src/menu/components/form/formaction/formconfig.jsx +++ b/src/menu/components/form/formaction/formconfig.jsx @@ -467,6 +467,15 @@ options: modules }, { + type: 'number', + key: 'syncDelay', + label: '鍒锋柊寤惰繜', + initVal: card.syncDelay, + tooltip: '鍚屾鍒锋柊缁勪欢鐨勫欢杩熸椂闂达紝鍗曚綅姣銆�', + // placeholder: '鍗曚綅姣', + required: false + }, + { type: 'cascader', key: 'anchors', label: '璺宠浆閿氱偣', diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index a8c04dd..24a4df8 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -1440,6 +1440,7 @@ dataIndex: 'syncComId', inputType: 'cascader', editable: true, + unique: true, required: true, extends: [{key: 'label', value: 'label'}], width: '70%', @@ -2393,6 +2394,7 @@ title: '缁勪欢', dataIndex: 'syncComId', inputType: 'cascader', + unique: true, editable: true, required: true, extends: [{key: 'label', value: 'label'}], diff --git a/src/tabviews/basetable/index.scss b/src/tabviews/basetable/index.scss index be83043..cd48d98 100644 --- a/src/tabviews/basetable/index.scss +++ b/src/tabviews/basetable/index.scss @@ -31,15 +31,7 @@ left: calc(50% - 16px); top: calc(50vh - 70px); } - - .common-table-copy { - position: fixed; - z-index: 2; - bottom: 65px; - right: 30px; - width: 40px; - height: 40px; - } + .ant-btn-link:hover { opacity: 0.8; } diff --git a/src/tabviews/custom/index.scss b/src/tabviews/custom/index.scss index b2f1683..79e986d 100644 --- a/src/tabviews/custom/index.scss +++ b/src/tabviews/custom/index.scss @@ -32,14 +32,6 @@ top: calc(50vh - 70px); } - .common-table-copy { - position: fixed; - z-index: 2; - bottom: 65px; - right: 30px; - width: 40px; - height: 40px; - } .ant-btn-link:hover { opacity: 0.8; } diff --git a/src/tabviews/custom/popview/index.scss b/src/tabviews/custom/popview/index.scss index c3e4b31..b6314b4 100644 --- a/src/tabviews/custom/popview/index.scss +++ b/src/tabviews/custom/popview/index.scss @@ -31,15 +31,7 @@ left: calc(50% - 16px); top: calc(50vh - 70px); } - - .common-table-copy { - position: fixed; - z-index: 2; - bottom: 65px; - right: 30px; - width: 40px; - height: 40px; - } + .ant-btn-link:hover { opacity: 0.8; } diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 720f6be..46fe864 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -2361,7 +2361,14 @@ } else if (/\$focus/.test(btn.syncComponentId)) { MKEmitter.emit('reloadData', btn.syncComponentId.split('$')[0], btn.syncComponentId.split('$')[1]) } else { - MKEmitter.emit('reloadData', btn.syncComponentId) + if (btn.syncDelay) { + this.delayTimer && clearTimeout(this.delayTimer) + this.delayTimer = setTimeout(() => { + MKEmitter.emit('reloadData', btn.syncComponentId) + }, btn.syncDelay) + } else { + MKEmitter.emit('reloadData', btn.syncComponentId) + } } } -- Gitblit v1.8.0