| | |
| | | import SettingForm from './settingform' |
| | | import MenuForm from '@/templates/zshare/menuform' |
| | | import EditComponent from '@/templates/zshare/editcomponent' |
| | | import SourceElement from '@/templates/zshare/dragelement/source' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | | import CreateFunc from '@/templates/zshare/createfunc' |
| | | import CreateInterface from '@/templates/zshare/createinterface' |
| | | import ChartComponent from '@/templates/zshare/chartcomponent' |
| | |
| | | fields: null, // 搜索条件及显示列,可选字段 |
| | | menuformlist: null, // 基本信息表单字段 |
| | | formlist: null, // 搜索条件、按钮、显示列表单字段 |
| | | formtemp: '', // 表单类型,显示列、按钮、搜索条件 |
| | | card: null, // 编辑元素 |
| | | menuloading: false, // 菜单保存中 |
| | | menucloseloading: false, // 菜单关闭时,选择保存 |
| | | loading: false, // 加载中,页面spin |
| | | settingVisible: false, // 全局配置模态框 |
| | | closeVisible: false, // 关闭模态框 |
| | | tables: [], // 可用表名 |
| | | selectedTables: [], // 已选表名 |
| | | originConfig: null, // 原配置 |
| | | originActions: null, // 原始按钮信息,使用已有用户模板 |
| | | delActions: [], // 删除按钮列表 |
| | | copyActions: [], // 复制按钮组 |
| | | tabviews: [], // 所有标签页 |
| | | profileVisible: false, // 验证信息模态框 |
| | | optionLibs: null, // 自定义下拉选项库 |
| | | thawButtons: [], // 已选择要解冻的按钮 |
| | | activeKey: '0', // 默认展开基本信息 |
| | |
| | | |
| | | let _activeKey = editSubTab ? editSubTab.activeKey : editTab.activeKey |
| | | |
| | | // 兼容 |
| | | // 兼容图表 |
| | | if (!_config.charts) { |
| | | _config.expand = false |
| | | _config.charts = [{ |
| | |
| | | config: _config, |
| | | activeKey: _activeKey || '0', |
| | | originConfig: _config, |
| | | selectedTables: _config.tables || [], |
| | | menuformlist: [ |
| | | { |
| | | type: 'text', |
| | |
| | | } |
| | | |
| | | let _LongParam = '' |
| | | let _config = {...config, tables: this.state.selectedTables, ...res} |
| | | let _config = {...config, ...res} |
| | | |
| | | // 未设置数据源或主键时,启用状态为false |
| | | if (_config.setting.interType === 'inner' && !_config.setting.innerFunc && !_config.setting.dataresource) { |
| | |
| | | }) |
| | | } else { |
| | | this.menuformRef.handleConfirm().then(res => { |
| | | let _config = {...config, tables: this.state.selectedTables, ...res} |
| | | let _config = {...config, ...res} |
| | | |
| | | if (!is(fromJS(originConfig), fromJS(_config))) { |
| | | this.setState({ |
| | |
| | | }) |
| | | } else { |
| | | this.menuformRef.handleConfirm().then(res => { |
| | | let _config = {...config, tables: this.state.selectedTables, ...res} |
| | | let _config = {...config, ...res} |
| | | |
| | | if (!is(fromJS(originConfig), fromJS(_config))) { |
| | | notification.warning({ |
| | |
| | | <Icon type="setting" onClick={this.changeSetting} /> |
| | | <SearchComponent |
| | | menu={{MenuID: this.state.config.uuid, MenuName: this.state.config.tabName}} |
| | | config={this.state.config} |
| | | config={config} |
| | | pasteContent={this.state.pasteContent} |
| | | sysRoles={this.props.sysRoles} |
| | | optionLibs={this.state.optionLibs} |