king
2022-05-05 4677982c003e357cff8f2544be44706bf31ea6de
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -24,6 +24,7 @@
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 {
@@ -858,6 +859,51 @@
    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
@@ -921,39 +967,7 @@
          }}
          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>
    )