king
2024-06-01 c62724a2cdbafa3c660538955acbedafa5a01871
src/templates/zshare/modalform/index.jsx
@@ -21,7 +21,7 @@
const modalTypeOptions = {
  text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'encryption', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl', 'inputType', 'constant', 'mkfocus'],
  number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom', 'mkfocus', 'format'],
  number: ['initval', 'readonly', 'notZero', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom', 'mkfocus', 'format'],
  select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'],
  checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
  radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
@@ -51,7 +51,7 @@
class MainSearch extends Component {
  static propTpyes = {
    formlist: PropTypes.any,
    standardform: PropTypes.any,
    fields: PropTypes.array,
    card: PropTypes.object,
    inputSubmit: PropTypes.any
  }
@@ -537,18 +537,21 @@
  changeVal = (val, type) => {
    if (type !== 'span' || ![24, 12, 8, 6].includes(val)) return
    const { standardform } = this.props
    const { card, fields } = this.props
    if (!standardform || ![24, 12, 8, 6].includes(standardform.span) || !standardform.labelwidth) return
    let index = fields.findIndex(item => card.uuid === item.uuid)
    let stform = fields[index - 1]
    if (!stform || ![24, 12, 8, 6].includes(stform.span) || !stform.labelwidth) return
    let labelwidth = null
    if (standardform.span === val) {
      labelwidth = standardform.labelwidth
    } else if (standardform.span > val) {
    if (stform.span === val) {
      labelwidth = stform.labelwidth
    } else if (stform.span > val) {
      labelwidth = 33.3
    } else {
      switch(standardform.span) {
      switch(stform.span) {
        case 12:
          labelwidth = 16.2
          break;
@@ -930,8 +933,8 @@
    }
  }
  handleConfirm = (fields) => {
    const { card } = this.props
  handleConfirm = () => {
    const { card, fields } = this.props
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {