king
2022-07-22 0c439ced2c97905cb2b02f5f689a37b19369fb8a
src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import moment from 'moment'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Button, Modal, notification, message } from 'antd'
@@ -816,7 +815,7 @@
      // 外部请求
      _outParam = JSON.parse(JSON.stringify(res))
      if (this.props.menuType === 'HS') {
      if (window.GLOB.mkHS) {
        if (btn.sysInterface === 'true' && options.cloudServiceApi) {
          res.rduri = options.cloudServiceApi
        } else if (btn.sysInterface !== 'true') {
@@ -931,7 +930,8 @@
      if (!configParam) {
        error = '打印模板解析错误!'
      } else {
        let control = configParam.elements.map(element => {
        let control = []
        configParam.elements.forEach(element => {
          let _field = element.field
          if (_field === 'other_field') {
@@ -967,11 +967,12 @@
            item.Trimming = ''
            if (!item.Width) {
              item.Width = item.BorderSize
              item.Left = item.Left - item.Width
              item.Left = item.Left - item.Width + 0.1
            } else if (!item.Height) {
              item.Height = item.BorderSize
              item.Top = item.Top - item.Height
              item.Top = item.Top - item.Height + 0.1
            }
            item.BackColor = element.borderColor
            item.BorderSize = 0
          } else if (item.Type === 'image') {
            item.ImageWidth = element.imgWidth
@@ -1011,7 +1012,7 @@
            }
          }
          return item
          control.push(item)
        })
        _configparam = {
@@ -1639,7 +1640,6 @@
        <MutilForm
          BID={BID}
          dict={this.state.dict}
          menuType={this.props.menuType}
          action={btnconfig}
          inputSubmit={this.handleOk}
          data={this.state.selines[0]}
@@ -1680,7 +1680,7 @@
      className = 'mk-btn mk-' + btn.class
    }
    return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
    return <>
      <Button
        type={type}
        title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')}
@@ -1689,21 +1689,11 @@
        style={btn.style || null}
        icon={icon}
        className={className}
        onClick={() => {this.actionTrigger()}}
        onClick={(e) => {e.stopPropagation(); this.actionTrigger()}}
      >{label}</Button>
      {this.getModels()}
    </div>
    </>
  }
}
const mapStateToProps = (state) => {
  return {
    menuType: state.editLevel
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(PrintButton)
export default PrintButton