From 0eb129a9beddbb86ae74d7106a8e60823206b8d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 14 十二月 2023 11:29:15 +0800 Subject: [PATCH] 2023-12-14 --- src/views/menudesign/index.jsx | 35 ++++++++++++++++++++++++++++++----- 1 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index 506ac21..3a98723 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -749,6 +749,10 @@ config.components = this.resetSyncQuery(config.components) } + if (config.MenuID === 'home_page_id') { + config.permission = 'false' + } + let tbs = [] let btns = this.getMenuMessage(config, tbs) let arr = [] @@ -908,10 +912,10 @@ duration: 2 }) } else { - notification.warning({ - top: 92, - message: res.message, - duration: 5 + Modal.warning({ + width: 400, + title: res.message, + okText: '鐭ラ亾浜�' }) } MKEmitter.emit('completeSave') @@ -1104,6 +1108,27 @@ }, 400) } + checklog = () => { + const { oriConfig, config } = this.state + + return is(fromJS(oriConfig), fromJS(config)) + } + + updateLogConfig = (config) => { + config.fstMenuId = this.state.config.fstMenuId || config.fstMenuId || '' + config.parentId = this.state.config.parentId || config.parentId || '' + + this.setState({ + config: null + }, () => { + this.setState({ + config: config + }) + }) + + window.GLOB.customMenu = config + } + render () { const { view, comloading, MenuType, MenuId, config, settingshow, ParentId, menuloading, eyeopen, needUpdate } = this.state @@ -1164,7 +1189,7 @@ <div className="mk-opeartion-list"> {config ? <Debug config={config}/> : null} <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 缁勪欢鍚�</Button> - <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> + {config ? <Versions MenuId={MenuId} Template="CustomPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null} <TableNodes config={config} /> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <SysInterface config={config} updateConfig={this.updateConfig}/> -- Gitblit v1.8.0