king
2021-06-26 bfadd84fbc2b23c59695e5a94778ab7ac40fea03
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -3,7 +3,7 @@
import moment from 'moment'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Button, Modal, notification, message } from 'antd'
import { Button, Modal, notification, message, Drawer } from 'antd'
import Api from '@/api'
import Utils, { getSysDefaultSql } from '@/utils/utils.js'
@@ -1691,7 +1691,46 @@
    let title = btnconfig.setting.title
    let width = btnconfig.setting.width + 'vw'
    let clickouter = false
    let clickouter = btnconfig.setting.clickouter === 'close'
    if (btnconfig.setting.display === 'drawer') {
      let height = '100vh'
      if (btnconfig.setting.placement === 'top' || btnconfig.setting.placement === 'bottom') {
        width = '100vw'
        height = btnconfig.setting.width + 'vh'
      }
      return (
        <Drawer
          title={title}
          width={width}
          height={height}
          maskClosable={clickouter}
          onClose={this.handleCancel}
          visible={visible}
          placement={btnconfig.setting.placement || 'right'}
          bodyStyle={{ paddingBottom: 80 }}
        >
          <MutilForm
            BID={BID}
            dict={this.state.dict}
            menuType={this.props.menuType}
            action={btnconfig}
            inputSubmit={this.handleOk}
            data={this.state.tabledata[0]}
            BData={this.props.BData}
            wrappedComponentRef={(inst) => this.formRef = inst}
          />
          <div style={{ position: 'absolute', right: 0, bottom: 0, width: '100%', borderTop: '1px solid #e9e9e9', padding: '10px 16px', background: '#fff', textAlign: 'right'}}>
            <Button onClick={this.handleCancel} style={{ marginRight: 8 }}>
              取消
            </Button>
            <Button onClick={this.handleOk} loading={this.state.confirmLoading} type="primary">
              确定
            </Button>
          </div>
        </Drawer>
      )
    } else {
    let container = document.body
    if (
@@ -1701,11 +1740,6 @@
      width = btnconfig.setting.width + '%'
      container = () => document.getElementById(this.props.ContainerId || btn.ContainerId)
    }
    if (btnconfig.setting.clickouter === 'close') {
      clickouter = true
    }
    return (
      <Modal
        title={title}
@@ -1732,6 +1766,7 @@
      </Modal>
    )
  }
  }
  render() {
    const { btn, show, style } = this.props