| | |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 加载或刷新标签信息 |
| | | */ |
| | | reloadTab = () => { |
| | | this.setState({ |
| | | loading: true, |
| | | tabviews: [] |
| | | }) |
| | | Api.getSystemConfig({func: 'sPC_Get_UserTemp', TypeCharTwo: 'tab'}).then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | | loading: false, |
| | | tabviews: res.UserTemp.map(temp => { |
| | | return { |
| | | uuid: temp.MenuID, |
| | | value: temp.MenuID, |
| | | text: temp.MenuName, |
| | | type: temp.Template, |
| | | MenuNo: temp.MenuNo |
| | | } |
| | | }) |
| | | }) |
| | | notification.success({ |
| | | top: 92, |
| | | message: '刷新成功。', |
| | | duration: 2 |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | |
| | | LongParam: _LongParam, |
| | | LText: _vals.func.map(item => `select '${menu.MenuID}' as MenuID,'${item.func}' as ProcName,'${item.label}' as MenuName`), |
| | | LTexttb: _tables.map(item => `select '${menu.MenuID}' as MenuID,'${item}' as tbName`) |
| | | } |
| | | |
| | | if (menu.menuSort) { // 菜单新建时设置排序 |
| | | param.Sort = menu.menuSort |
| | | } |
| | | |
| | | param.LText = param.LText.join(' union all ') |
| | |
| | | </Collapse> |
| | | </div> |
| | | <div className="setting"> |
| | | <Card title={this.state.dict['header.menu.page.configurable']} bordered={false} extra={ |
| | | <Card title={ |
| | | <div> |
| | | {this.state.dict['header.menu.page.configurable']} |
| | | <Icon type="redo" style={{marginLeft: '10px'}} title="刷新标签列表" onClick={this.reloadTab} /> |
| | | </div> |
| | | } bordered={false} extra={ |
| | | <div> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> |
| | | <Button type="primary" onClick={this.changeTemplate}>{this.state.dict['header.menu.template.change']}</Button> |