From 8c14d194348465710826ed5740173e64bd803f71 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 08 十二月 2019 04:29:25 +0800 Subject: [PATCH] 2019-12-08 --- src/templates/comtableconfig/index.jsx | 47 +++++++++++++++++++++-------------------------- 1 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index d1a1fe6..b97d29d 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -159,7 +159,6 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) Api.getSystemConfig(param).then(res => { - console.log(res) if (res.status) { this.setState({ tables: res.data @@ -953,15 +952,6 @@ return } - let sql = [] - config.action.forEach((item, index) => { - sql.push(`'${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort`) - }) - sql = sql.join(' union all select ') - sql = 'select ' + sql - - sql = Utils.formatOptions(sql) - let btnParam = { func: 'sPC_Button_AddUpt', ParentID: menu.MenuID, @@ -969,8 +959,15 @@ Template: menu.PageParam.Template || '', PageParam: '', LongParam: '', - LongButton: sql + LText: config.action.map((item, index) => { + return `select '${item.uuid}' as menuid, '${item.label}' as menuname, '${(index + 1) * 10}' as Sort` + }) } + + btnParam.LText = btnParam.LText.join(' union all ') + btnParam.LText = Utils.formatOptions(btnParam.LText) + btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' + btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) if (this.state.operaType === 'add') { // 鏂板缓鑿滃崟 let param = { @@ -1573,22 +1570,20 @@ })} </div> {configAction.length > 0 ? - <div> - <p style={{marginTop: '20px', marginBottom: '10px', color: '#1890ff'}}>{this.state.dict['header.menu.action.configurable']}</p> - {configAction.map((item, index) => { - return ( - <div key={index}> - <Button - icon={item.icon} - style={{marginBottom: '10px'}} - className={'mk-btn mk-' + item.class} - onClick={() => this.setSubConfig(item)} - >{item.label}</Button> - </div> - ) - })} - </div> : null + <p className="config-btn-title">{this.state.dict['header.menu.action.configurable']}</p> : null } + {configAction.map((item, index) => { + return ( + <div key={index}> + <Button + icon={item.icon} + style={{marginBottom: '10px'}} + className={'mk-btn mk-' + item.class} + onClick={() => this.setSubConfig(item)} + >{item.label}</Button> + </div> + ) + })} </Panel> <Panel header={this.state.dict['header.menu.column']} key="3"> <div className="search-element"> -- Gitblit v1.8.0