| | |
| | | const VerifyCard = asyncSpinComponent(() => import('@/templates/zshare/verifycard')) |
| | | const VerifyPrint = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifyprint')) |
| | | const VerifyExcelIn = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifyexcelin')) |
| | | const VerifyMegvii = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifymegvii')) |
| | | const VerifyExcelOut = asyncSpinComponent(() => import('@/templates/sharecomponent/actioncomponent/verifyexcelout')) |
| | | |
| | | class ActionComponent extends Component { |
| | |
| | | MKEmitter.removeListener('pasteButton', this.pasteButton) |
| | | } |
| | | |
| | | getVerify = (card) => { |
| | | const { config } = this.props |
| | | const { dict } = this.state |
| | | |
| | | if (!card) return null |
| | | |
| | | if (['pop', 'prompt', 'exec'].includes(card.OpenType)) { |
| | | return <VerifyCard |
| | | card={card} |
| | | dict={dict} |
| | | config={config} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | } else if (card.OpenType === 'excelIn') { |
| | | return <VerifyExcelIn |
| | | card={card} |
| | | dict={dict} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | } else if (card.OpenType === 'excelOut') { |
| | | return <VerifyExcelOut |
| | | card={card} |
| | | dict={dict} |
| | | config={config} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') { |
| | | return <VerifyPrint |
| | | card={card} |
| | | dict={dict} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | } else if (card.OpenType === 'funcbutton' && card.funcType === 'megvii') { |
| | | return <VerifyMegvii |
| | | card={card} |
| | | dict={dict} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { config } = this.props |
| | | const { actionlist, visible, card, dict, copying, profVisible } = this.state |
| | |
| | | }} |
| | | destroyOnClose |
| | | > |
| | | {card && !card.execMode && card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut' ? |
| | | <VerifyCard |
| | | card={card} |
| | | dict={dict} |
| | | config={config} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> : null |
| | | } |
| | | {card && card.execMode ? |
| | | <VerifyPrint |
| | | card={card} |
| | | dict={dict} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> : null |
| | | } |
| | | {card && card.OpenType === 'excelIn' ? |
| | | <VerifyExcelIn |
| | | card={card} |
| | | dict={dict} |
| | | columns={config.columns} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> : null |
| | | } |
| | | {card && card.OpenType === 'excelOut' ? |
| | | <VerifyExcelOut |
| | | card={card} |
| | | dict={dict} |
| | | config={config} |
| | | wrappedComponentRef={(inst) => this.verifyRef = inst} |
| | | /> : null |
| | | } |
| | | {this.getVerify(card)} |
| | | </Modal> |
| | | </div> |
| | | ) |