From 26b0ef43fada54e4b06d835630afa02895014ad6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 13 十一月 2024 16:02:16 +0800 Subject: [PATCH] 2024-11-13 --- src/tabviews/custom/components/form/tab-form/index.jsx | 4 + src/tabviews/custom/components/card/table-card/index.jsx | 2 src/tabviews/custom/components/card/prop-card/index.jsx | 4 + src/menu/components/card/double-data-card/options.jsx | 15 +++++ src/tabviews/custom/components/card/double-data-card/index.scss | 4 + src/menu/components/table/normal-table/options.jsx | 15 +++++ src/tabviews/custom/components/editor/braft-editor/index.jsx | 4 + src/menu/components/card/data-card/options.jsx | 16 +++++ src/tabviews/custom/components/card/double-data-card/index.jsx | 2 src/tabviews/custom/components/interfaces/interItem/index.jsx | 6 + src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 2 src/views/rolemanage/index.jsx | 2 src/tabviews/zshare/mutilform/index.jsx | 8 ++ src/menu/components/share/actioncomponent/actionform/index.jsx | 3 + src/menu/components/table/edit-table/options.jsx | 15 +++++ src/tabviews/custom/components/form/step-form/index.jsx | 4 + src/tabviews/custom/components/card/balcony/index.jsx | 4 + src/tabviews/custom/components/share/normalTable/index.jsx | 2 src/views/design/sidemenu/index.jsx | 2 src/tabviews/custom/components/form/simple-form/index.jsx | 4 + src/tabviews/custom/components/card/data-card/index.scss | 4 + src/tabviews/custom/components/card/data-card/index.jsx | 2 src/assets/css/main.scss | 9 +++ src/tabviews/custom/components/card/table-card/index.scss | 4 + 24 files changed, 122 insertions(+), 15 deletions(-) diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index 7f4eea2..68bd082 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -817,4 +817,13 @@ // 榧犳爣鎮诞澧炲姞涓嬪垝绾� .mk-hover-underline:hover { text-decoration: underline!important; +} +// 闅愯棌绌哄�兼椂鐨勫浘鏍� +body .mk-empty-hide .ant-empty, body .mk-empty-hide + .ant-empty { + min-height: 50px; + padding-top: 0px; + margin: 0px; + .ant-empty-image, .ant-empty-description { + display: none; + } } \ No newline at end of file diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index ad0ad59..8618072 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -456,6 +456,22 @@ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, ], + controlFields: [ + {field: 'empSign', values: ['show']}, + ] + }, + { + type: 'radio', + field: 'empSign', + label: '绌哄�煎浘鏍�', + initval: wrap.empSign || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛屾槸鍚︽樉绀虹┖鍊兼彁绀哄浘鏍囥��', + required: false, + options: [ + {value: 'show', label: '鏄剧ず'}, + {value: 'hidden', label: '闅愯棌'}, + ], + forbid: subtype === 'propcard' }, { type: 'select', diff --git a/src/menu/components/card/double-data-card/options.jsx b/src/menu/components/card/double-data-card/options.jsx index 5cb3395..2fc6753 100644 --- a/src/menu/components/card/double-data-card/options.jsx +++ b/src/menu/components/card/double-data-card/options.jsx @@ -173,6 +173,21 @@ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, ], + controlFields: [ + {field: 'empSign', values: ['show']}, + ] + }, + { + type: 'radio', + field: 'empSign', + label: '绌哄�煎浘鏍�', + initval: wrap.empSign || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛屾槸鍚︽樉绀虹┖鍊兼彁绀哄浘鏍囥��', + required: false, + options: [ + {value: 'show', label: '鏄剧ず'}, + {value: 'hidden', label: '闅愯棌'}, + ] }, { type: 'select', diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index dcf94bf..1e59ecc 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -1235,6 +1235,9 @@ if (values.outerBlacklist) { values.outerBlacklist = values.outerBlacklist.replace(/\s/ig, '') } + if (values.controlVal) { + values.controlVal = values.controlVal.replace(/\t+|\v+|\s+/g, '') + } if (values.openmenu && Array.isArray(values.openmenu) && values.openmenu.length > 0) { let list = null diff --git a/src/menu/components/table/edit-table/options.jsx b/src/menu/components/table/edit-table/options.jsx index 1e409a4..c6899e7 100644 --- a/src/menu/components/table/edit-table/options.jsx +++ b/src/menu/components/table/edit-table/options.jsx @@ -228,6 +228,21 @@ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, ], + controlFields: [ + {field: 'empSign', values: ['show']}, + ] + }, + { + type: 'radio', + field: 'empSign', + label: '绌哄�煎浘鏍�', + initval: wrap.empSign || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛屾槸鍚︽樉绀虹┖鍊兼彁绀哄浘鏍囥��', + required: false, + options: [ + {value: 'show', label: '鏄剧ず'}, + {value: 'hidden', label: '闅愯棌'}, + ], }, { type: 'select', diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx index 1806ca8..3781664 100644 --- a/src/menu/components/table/normal-table/options.jsx +++ b/src/menu/components/table/normal-table/options.jsx @@ -306,6 +306,21 @@ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, ], + controlFields: [ + {field: 'empSign', values: ['show']}, + ] + }, + { + type: 'radio', + field: 'empSign', + label: '绌哄�煎浘鏍�', + initval: wrap.empSign || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛屾槸鍚︽樉绀虹┖鍊兼彁绀哄浘鏍囥��', + required: false, + options: [ + {value: 'show', label: '鏄剧ず'}, + {value: 'hidden', label: '闅愯棌'}, + ], }, { type: 'radio', diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index 668b8f0..0c99bb0 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -331,7 +331,9 @@ if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { - this.loadData() + if (config.wrap.datatype !== 'public') { + this.loadData() + } }) } } diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index a8fb5a3..d8ad740 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -128,7 +128,7 @@ _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : '' _config.wrap.layout = (_config.wrap.layout || 'grid') + '-layout float-' + (_config.wrap.cardFloat || 'left') - _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale} ${config.wrap.hover === 'true' ? 'mk-hover' : ''}` + _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale} ${config.wrap.hover === 'true' ? 'mk-hover' : ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}` if (_config.wrap.shifting === 'true') { _config.wrap.shifting = 'shifting' diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss index bbb850d..12d1283 100644 --- a/src/tabviews/custom/components/card/data-card/index.scss +++ b/src/tabviews/custom/components/card/data-card/index.scss @@ -286,6 +286,10 @@ border-color: var(--mk-sys-color); } } + + .ant-empty-image svg { + max-width: 100%; + } } .custom-data-card-box.shifting { .normal-header:not(.header-search) + .toolbar-button { diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index 90b5ea2..c7e972a 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -127,7 +127,7 @@ _config.wrap.selStyle = _config.wrap.selStyle || 'active' _config.wrap.pagestyle = _config.wrap.pagestyle || 'page' - _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}` + _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}` if (_config.wrap.zHeight || _config.wrap.minWidth) { _config.wrap.zoomStyle = { diff --git a/src/tabviews/custom/components/card/double-data-card/index.scss b/src/tabviews/custom/components/card/double-data-card/index.scss index 1cac501..2d6682d 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.scss +++ b/src/tabviews/custom/components/card/double-data-card/index.scss @@ -321,6 +321,10 @@ border: 1px solid rgba(0, 0, 0, 0.07); background: rgba(0, 0, 0, 0); } + + .ant-empty-image svg { + max-width: 100%; + } } .double-data-card-box.shifting { .normal-header:not(.header-search) + .toolbar-button { diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index 88bcf0e..a1e1a11 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -473,7 +473,9 @@ if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { - this.loadData() + if (config.wrap.datatype !== 'public') { + this.loadData() + } }) } } diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index 538c792..8bf04ff 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -602,7 +602,7 @@ selectedData={[]} /> : null } - <Row className={`card-row-list ${config.wrap.hover === 'true' ? 'mk-hover' : ''}`} style={{height: config.wrap.contentHeight}}> + <Row className={`card-row-list ${config.wrap.hover === 'true' ? 'mk-hover' : ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}`} style={{height: config.wrap.contentHeight}}> {precards.map((item, index) => ( <Col key={index} className="extend-card" span={24}> <div className="card-item-box" style={item.style}> diff --git a/src/tabviews/custom/components/card/table-card/index.scss b/src/tabviews/custom/components/card/table-card/index.scss index 10fb9be..f2697a6 100644 --- a/src/tabviews/custom/components/card/table-card/index.scss +++ b/src/tabviews/custom/components/card/table-card/index.scss @@ -113,6 +113,10 @@ height: 60px; } } + + .ant-empty-image svg { + max-width: 100%; + } } .custom-card-box::after { diff --git a/src/tabviews/custom/components/editor/braft-editor/index.jsx b/src/tabviews/custom/components/editor/braft-editor/index.jsx index 24d3909..2c5ddd6 100644 --- a/src/tabviews/custom/components/editor/braft-editor/index.jsx +++ b/src/tabviews/custom/components/editor/braft-editor/index.jsx @@ -168,7 +168,9 @@ if (!config.setting.supModule || config.setting.supModule !== MenuID) return if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { - this.loadData() + if (config.wrap.datatype !== 'public') { + this.loadData() + } }) } } diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx index b62d1ab..2f83c49 100644 --- a/src/tabviews/custom/components/form/simple-form/index.jsx +++ b/src/tabviews/custom/components/form/simple-form/index.jsx @@ -308,7 +308,9 @@ }) } else { this.setState({ BID: id, BData: data }, () => { - this.loadData() + if (config.wrap.datatype !== 'public') { + this.loadData() + } }) } } diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx index e313c20..6f1c40e 100644 --- a/src/tabviews/custom/components/form/step-form/index.jsx +++ b/src/tabviews/custom/components/form/step-form/index.jsx @@ -306,7 +306,9 @@ }) } else { this.setState({ BID: id, BData: data }, () => { - this.loadData() + if (config.wrap.datatype !== 'public') { + this.loadData() + } }) } } diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index 9ee3802..5e0c3cf 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -269,7 +269,9 @@ }) } else { this.setState({ BID: id, BData: data }, () => { - this.loadData() + if (config.wrap.datatype !== 'public') { + this.loadData() + } }) } } diff --git a/src/tabviews/custom/components/interfaces/interItem/index.jsx b/src/tabviews/custom/components/interfaces/interItem/index.jsx index 87e0bd9..8db4d23 100644 --- a/src/tabviews/custom/components/interfaces/interItem/index.jsx +++ b/src/tabviews/custom/components/interfaces/interItem/index.jsx @@ -112,8 +112,10 @@ const { BID } = this.state if (config.setting.supModule && !BID) { - MKEmitter.emit('mkPublicData', config.uuid, { $$empty: true, $$uuid: '' }) - MKEmitter.emit('resetSelectLine', config.uuid, '', { $$empty: true, $$uuid: '' }) + setTimeout(() => { + MKEmitter.emit('mkPublicData', config.uuid, { $$empty: true, $$uuid: '' }) + MKEmitter.emit('resetSelectLine', config.uuid, '', { $$empty: true, $$uuid: '' }) + }, 20) this.loading = false return } diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 70809ce..dc47705 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -1209,7 +1209,7 @@ } return ( - <div className={`normal-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || 'middle'} table-col-${columns.length} ${fixed}`} style={style}> + <div className={`normal-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || 'middle'} table-col-${columns.length} ${fixed} ${setting.empSign === 'hidden' ? 'mk-empty-hide' : ''}`} style={style}> {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ? <Switch title="鏀惰捣" className="main-pickup" checkedChildren={window.GLOB.dict['open'] || '寮�'} unCheckedChildren={window.GLOB.dict['shut'] || '鍏�'} checked={pickup} onChange={this.pickupChange} /> : null } diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index e8b2a2b..87534fd 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -2920,7 +2920,7 @@ {setting.hasSubmit && edData.length > 0 ? <div className="edit-custom-table-btn-wrap" style={submit.wrapStyle}> <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">{dict['submit'] || '鎻愪氦'}</Button> </div> : null} - <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'}`} style={style}> + <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'} ${setting.empSign === 'hidden' ? 'mk-empty-hide' : ''}`} style={style}> <Table rowKey="$$uuid" components={components} diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index d39ad0a..8f4fc89 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -286,6 +286,14 @@ } else { item.showValue = '' } + } else if (item.type === 'brafteditor') { + if (window.backend && newval && /<\/span>/.test(newval) && item.encryption === 'true') { + try { + newval = window.btoa(window.encodeURIComponent(newval)) + } catch (e) { + newval = '' + } + } } if (newval !== '$empty') { diff --git a/src/views/design/sidemenu/index.jsx b/src/views/design/sidemenu/index.jsx index 897bd86..293e3a3 100644 --- a/src/views/design/sidemenu/index.jsx +++ b/src/views/design/sidemenu/index.jsx @@ -330,7 +330,7 @@ {item.children.map(cell => { return ( <Menu.Item key={cell.MenuID}> - <span className={'editable-menu-item ' + (cell.up_action ? 'unupdate' : '') + (window.backend && window.GLOB.systemType !== 'production' && cell.PageParam.backend !== 'level1' ? ' unbackend' : '')} onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam.interfaces === 'true' ? <ApiOutlined title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{cell.PageParam.msg === 'true' ? <SoundOutlined title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{cell.MenuName}{cell.PageParam.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px', color: 'inherit'}} title="鑿滃崟涓娇鐢ㄤ簡鍏叡鏁版嵁婧�" /> : null}</span> + <span className={'editable-menu-item ' + (cell.up_action ? 'unupdate' : '') + (window.backend && window.GLOB.systemType !== 'production' && cell.PageParam.backend !== 'level1' ? ' unbackend' : '')} onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam.interfaces === 'true' ? <ApiOutlined title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{cell.PageParam.msg === 'true' ? <SoundOutlined title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{cell.MenuName}{cell.PageParam.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px', color: 'orange'}} title="鑿滃崟涓娇鐢ㄤ簡鍏叡鏁版嵁婧�" /> : null}</span> </Menu.Item> ) })} diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index 2bd8b09..80bcd8a 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -30,7 +30,7 @@ if (record.extra || this.state.appKeys.includes(record.MenuID)) { return <span className={className} style={{color: '#1890ff'}}>{text}</span> } else if (record.interfaces === 'true' || record.msg === 'true' || record.pds === 'true') { - return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{text}{record.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px'}} title="鑿滃崟涓娇鐢ㄤ簡鍏叡鏁版嵁婧�" /> : null}</span> + return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{text}{record.pds === 'true' ? <DatabaseOutlined style={{color: 'orange', marginLeft: '5px'}} title="鑿滃崟涓娇鐢ㄤ簡鍏叡鏁版嵁婧�" /> : null}</span> } return <span className={className}>{text}</span> } -- Gitblit v1.8.0