king
2021-06-02 e543372cc70a19ff2630c79d8421c2c593e54e5f
src/templates/sharecomponent/columncomponent/colspanform/index.jsx
@@ -1,6 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, InputNumber, Select, Radio } from 'antd'
import { Form, Row, Col, Input, InputNumber, Select, Radio, Tooltip, Icon } from 'antd'
import { formRule } from '@/utils/option.js'
import TransferForm from '@/templates/zshare/transferform'
import './index.scss'
@@ -62,6 +62,7 @@
  }
  render() {
    const { card } = this.props
    const { getFieldDecorator } = this.props.form
    const formItemLayout = {
      labelCol: {
@@ -77,13 +78,13 @@
      <Form {...formItemLayout} className="commontable-cospan-column-form" id="columncolspan">
        <Row gutter={24}>
          <Col span={12}>
            <Form.Item label={this.props.dict['model.form.name']}>
            <Form.Item label={this.props.dict['model.name']}>
              {getFieldDecorator('label', {
                initialValue: this.props.card.label,
                initialValue: card.label,
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + this.props.dict['model.form.name'] + '!'
                    message: this.props.dict['form.required.input'] + this.props.dict['model.name'] + '!'
                  },
                  {
                    max: formRule.input.max,
@@ -94,13 +95,13 @@
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={this.props.dict['header.form.type']}>
            <Form.Item label={this.props.dict['model.form.type']}>
              {getFieldDecorator('type', {
                initialValue: this.props.dict['model.form.colspan'],
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + this.props.dict['header.form.type'] + '!'
                    message: this.props.dict['form.required.input'] + this.props.dict['model.form.type'] + '!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" disabled={true}/>)}
@@ -109,7 +110,7 @@
          <Col span={12}>
            <Form.Item label={this.props.dict['model.form.align']}>
              {getFieldDecorator('Align', {
                initialValue: this.props.card.Align,
                initialValue: card.Align,
                rules: [
                  {
                    required: true,
@@ -128,22 +129,39 @@
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={this.props.dict['header.form.columnWidth']}>
            <Form.Item label={this.props.dict['model.form.columnWidth']}>
              {getFieldDecorator('Width', {
                initialValue: this.props.card.Width,
                initialValue: card.Width,
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + this.props.dict['header.form.columnWidth'] + '!'
                    message: this.props.dict['form.required.input'] + this.props.dict['model.form.columnWidth'] + '!'
                  }
                ]
              })(<InputNumber min={1} max={1000} precision={0} />)}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="选择显示分组,表格会展开添加分组的子列,此时排列方式会失效。">
                <Icon type="question-circle" />
                显示分组
              </Tooltip>
            }>
              {getFieldDecorator('unfold', {
                initialValue: card.unfold || 'false'
              })(
                <Radio.Group>
                  <Radio value="true">{this.props.dict['model.true']}</Radio>
                  <Radio value="false">{this.props.dict['model.false']}</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={12}>
            <Form.Item label={this.props.dict['model.hidden']}>
              {getFieldDecorator('Hide', {
                initialValue: this.props.card.Hide || 'false',
                initialValue: card.Hide || 'false',
                rules: [
                  {
                    required: true,
@@ -152,8 +170,8 @@
                ]
              })(
                <Radio.Group>
                  <Radio value="true">{this.props.dict['header.form.true']}</Radio>
                  <Radio value="false">{this.props.dict['header.form.false']}</Radio>
                  <Radio value="true">{this.props.dict['model.true']}</Radio>
                  <Radio value="false">{this.props.dict['model.false']}</Radio>
                </Radio.Group>
              )}
            </Form.Item>
@@ -161,7 +179,7 @@
          <Col span={12}>
            <Form.Item label={this.props.dict['header.form.order']}>
              {getFieldDecorator('order', {
                initialValue: this.props.card.order,
                initialValue: card.order,
                rules: [
                  {
                    required: true,
@@ -182,7 +200,7 @@
            </Form.Item>
          </Col>
          <Col span={24}>
            <TransferForm dict={this.props.dict} columns={this.props.columns} ref="column-transfer" selected={this.props.card.sublist}/>
            <TransferForm columns={this.props.columns} ref="column-transfer" selected={card.sublist}/>
          </Col>
        </Row>
      </Form>