| | |
| | | _cards.push(Navbar) |
| | | } |
| | | |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | if (item.component === 'navbar') { |
| | | let appMenus = sessionStorage.getItem('appViewList') |
| | | if (appMenus) { |
| | | try { |
| | | appMenus = JSON.parse(appMenus) |
| | | appMenus = appMenus.filter(item => item.keys_type === 'navbar') |
| | | } catch (e) { |
| | | appMenus = [] |
| | | } |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | |
| | | if (appMenus.length) { |
| | | confirm({ |
| | | title: '如需使用当前应用中已有的菜单栏,请点击右侧关联菜单栏,如需新增请点确定。', |
| | | onOk() { |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } else { |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | }) |
| | | |
| | |
| | | const { index: overIndex } = findCard(`${targetId}`) |
| | | const _cards = update(cards, { $splice: [[overIndex + 1, 0, newcard]] }) |
| | | |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | if (item.component === 'navbar') { |
| | | let appMenus = sessionStorage.getItem('appViewList') |
| | | if (appMenus) { |
| | | try { |
| | | appMenus = JSON.parse(appMenus) |
| | | appMenus = appMenus.filter(item => item.keys_type === 'navbar') |
| | | } catch (e) { |
| | | appMenus = [] |
| | | } |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | |
| | | if (appMenus.length) { |
| | | confirm({ |
| | | title: '如需使用当前应用中已有的菜单栏,请点击右侧关联菜单栏,如需新增请点确定。', |
| | | onOk() { |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } else { |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | if (style) { |
| | | handleList({...menu, style, components: _cards}) |
| | | } else { |
| | | handleList({...menu, components: _cards}) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | setCards(_cards) |
| | | } |
| | | }) |
| | | |
| | |
| | | }, i * 10) |
| | | }) |
| | | } else { |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.loadData(id) |
| | | } |
| | | } else if (!btn || btn.resetPageIndex !== 'false') { |
| | | if ((position === 'line' || position === 'line_grid') && lines && lines.length === 1 && !config.forbidLine) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else if (btn.resetPageIndex !== 'false') { |
| | | this.setState({ |
| | | pageIndex: 1 |
| | | }, () => { |
| | |
| | | let supModule = config.setting.supModule |
| | | |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | if (lines && lines.length === 1 && !config.forbidLine) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else if (btn.resetPageIndex !== 'false') { |
| | | this.setState({ |
| | | pageIndex: 1 |
| | | }, () => { |
| | | this.loadData(id) |
| | | }) |
| | | } else { |
| | | this.loadData(id) |
| | | } |
| | | } else if (['mainline', 'maingrid', 'popclose'].includes(position) && supModule) { |
| | | MKEmitter.emit('reloadData', supModule, position === 'maingrid' ? '' : BID) |
| | | } else if (!btn || btn.resetPageIndex !== 'false') { |
| | | } else if (btn.resetPageIndex !== 'false') { |
| | | this.setState({ |
| | | pageIndex: 1 |
| | | }, () => { |
| | |
| | | let supModule = config.setting.supModule |
| | | |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | if (lines && lines.length === 1 && !config.forbidLine) { |
| | | this.loadLinedata(lines[0].$$parentId || lines[0].$$uuid, position) |
| | | } else if (btn.resetPageIndex !== 'false') { |
| | | this.setState({ |
| | | pageIndex: 1 |
| | | }, () => { |
| | | this.loadData(id) |
| | | }) |
| | | } else { |
| | | this.loadData(id) |
| | | } |
| | | } else if (['mainline', 'maingrid', 'popclose'].includes(position) && supModule) { |
| | | MKEmitter.emit('reloadData', supModule, position === 'maingrid' ? '' : BID) |
| | | } else if (!btn || btn.resetPageIndex !== 'false') { |
| | | } else if (btn.resetPageIndex !== 'false') { |
| | | this.setState({ |
| | | pageIndex: 1 |
| | | }, () => { |
| | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | if (lines && lines.length === 1 && !config.forbidLine) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.reloadtable(btn, id) |
| | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | if (lines && lines.length === 1 && !config.forbidLine) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.reloadtable(btn) |
| | |
| | | }) |
| | | } else { |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | if (lines && lines.length === 1 && !config.forbidLine) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.reloadtable(btn, id) |
| | |
| | | } |
| | | } else { |
| | | if (position === 'line' || position === 'line_grid') { |
| | | if (lines && lines.length === 1) { |
| | | if (lines && lines.length === 1 && !config.forbidLine) { |
| | | this.loadLinedata(lines[0].$$uuid, position) |
| | | } else { |
| | | this.reloadtable(btn, id) |