king
2022-10-17 e8edfdadb561cd83bf6e1c3e00d55b8cc2aee6d5
src/templates/sharecomponent/actioncomponent/index.jsx
@@ -6,8 +6,6 @@
import Api from '@/api'
import Utils, { FuncUtils } from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { getActionForm } from '@/templates/zshare/formconfig'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
@@ -37,7 +35,6 @@
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,          // 编辑中元素
    formlist: null,      // 表单信息
    actionlist: null,    // 按钮组
@@ -626,11 +623,10 @@
   */
  deleteElement = (card) => {
    const { config } = this.props
    const { dict } = this.state
    let _this = this
    confirm({
      content: dict['model.confirm'] + dict['model.delete'] + ` - ${card.label} ?`,
      content: `确定删除 - ${card.label} ?`,
      onOk() {
        let _actionlist = fromJS(_this.state.actionlist).toJS()
@@ -865,14 +861,12 @@
  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}
@@ -880,28 +874,24 @@
    } 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}
      />
@@ -910,7 +900,7 @@
  render() {
    const { config } = this.props
    const { actionlist, visible, card, dict, copying, profVisible, record } = this.state
    const { actionlist, visible, card, copying, profVisible, record } = this.state
    return (
      <div className="model-table-action-list" style={config.charts && config.charts.length > 1 ? {paddingTop: 25} : null}>
@@ -925,22 +915,21 @@
        />
        {/* 编辑按钮:复制、编辑 */}
        <Modal
          title={dict['model.action'] + '-' + (card && card.copyType === 'action' ? dict['model.copy'] : dict['model.edit'])}
          title={'按钮-' + (card && card.copyType === 'action' ? '复制' : '编辑')}
          wrapClassName="model-table-action-edit-modal"
          visible={visible}
          width={920}
          maskClosable={false}
          onCancel={this.editModalCancel}
          footer={[
            record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" dict={dict} ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null,
            record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
            <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>,
            <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>{dict['model.confirm']}</Button>
            record && ['pop', 'exec', 'prompt'].includes(record.OpenType) && record.intertype === 'system' ? <CreateInterface key="interface" ref="btnCreatInterface" trigger={this.btnCreatInterface}/> : null,
            record && record.intertype === 'inner' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null,
            <Button key="cancel" onClick={this.editModalCancel}>取消</Button>,
            <Button key="confirm" type="primary" loading={copying} onClick={this.handleSubmit}>确定</Button>
          ]}
          destroyOnClose
        >
          <ActionForm
            dict={dict}
            card={card}
            formlist={this.state.formlist}
            inputSubmit={this.handleSubmit}
@@ -955,7 +944,7 @@
          visible={profVisible}
          width={'90vw'}
          maskClosable={false}
          okText={dict['model.submit']}
          okText="提交"
          onOk={this.verifySubmit}
          onCancel={() => {
            if (this.verifyRef.handleCancel) {