| | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | console.log(res) |
| | | if (res.status) { |
| | | this.setState({ |
| | | tables: res.data |
| | |
| | | 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, |
| | |
| | | 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 = { |
| | |
| | | })} |
| | | </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"> |