| | |
| | | subcard.setting = subcard.backSetting |
| | | |
| | | if (_card.setting.position === 'inner') { |
| | | wrapStyle = {} |
| | | wrapStyle = {backgroundColor: '#ffffff'} |
| | | Object.keys(_card.style).forEach(key => { |
| | | if (!/^(margin|border|box)/.test(key)) return |
| | | if (!/^(margin|border|box|backgroundColor)/.test(key)) return |
| | | wrapStyle[key] = _card.style[key] |
| | | delete _card.style[key] |
| | | }) |
| | |
| | | item.$Index = index + 1 + '' |
| | | |
| | | if (config.wrap.controlField) { |
| | | if (config.wrap.controlVal.includes(item[config.wrap.controlField])) { |
| | | if (config.wrap.controlVal.includes(item[config.wrap.controlField] + '')) { |
| | | item.$disabled = true |
| | | } |
| | | } |
| | |
| | | item.$Index = index + 1 + '' |
| | | |
| | | if (config.wrap.controlField) { |
| | | if (config.wrap.controlVal.includes(item[config.wrap.controlField])) { |
| | | if (config.wrap.controlVal.includes(item[config.wrap.controlField] + '')) { |
| | | item.$disabled = true |
| | | } |
| | | } |
| | |
| | | item.$Index = index + start + '' |
| | | |
| | | if (config.wrap.controlField) { |
| | | if (config.wrap.controlVal.includes(item[config.wrap.controlField])) { |
| | | if (config.wrap.controlVal.includes(item[config.wrap.controlField] + '')) { |
| | | item.$disabled = true |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | changeSubCard = (item) => { |
| | | const { subcard, card } = this.state |
| | | |
| | | if (subcard.setting.click || card.setting.position !== 'inner' || card.setting.click !== 'menu') return |
| | | |
| | | let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | |
| | | if (!menu && card.setting.MenuName && card.setting.tabType) { |
| | | menu = { |
| | | MenuID: menuId, |
| | | MenuName: card.setting.MenuName, |
| | | MenuNo: card.setting.MenuNo || '', |
| | | type: card.setting.tabType |
| | | } |
| | | } |
| | | |
| | | if (!menu) return |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | param: {} |
| | | } |
| | | |
| | | if (card.setting.joint === 'true') { |
| | | newtab.param.$BID = item.$$uuid || '' |
| | | |
| | | Object.keys(item).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | newtab.param[key] = item[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } |
| | | |
| | | onDoubleClick = (i, subClass) => { |
| | | const { opens, card } = this.state |
| | | |
| | |
| | | let unfold = true |
| | | |
| | | if (item.$disabled) { |
| | | className = 'mk-disabled ' + mainBox |
| | | className = 'card-item-wrap mk-disabled ' + mainBox |
| | | } else if (activeKey === index) { |
| | | className += 'active' |
| | | } else if (selectKeys.indexOf(index) > -1) { |
| | |
| | | {card.setting.controlIcon === 'left' ? (!unfold ? <PlusSquareOutlined className={subClass} onClick={(e) => this.changeUnfold(e, index, subClass)}/> : <MinusSquareOutlined className={subClass} onClick={(e) => this.changeUnfold(e, index, subClass)}/>) : null} |
| | | {card.setting.controlIcon === 'right' ? <UpOutlined className={subClass} onClick={(e) => this.changeUnfold(e, index, subClass)}/> : null} |
| | | </CardItem> |
| | | <div className={'sub-card-wrap ' + subClass + (config.wrap.parity === 'true' ? ' mk-parity-bg' : '')}> |
| | | <div className={'sub-card-wrap ' + subClass + (config.wrap.parity === 'true' ? ' mk-parity-bg' : '')} onClick={() => this.changeSubCard(item)}> |
| | | {item.children.map((cell, index) => <Col key={'sub' + index} span={subcard.setting.width || 24}> |
| | | <CardItem card={subcard} cards={subconfig} data={cell} /> |
| | | </Col>)} |