king
2021-03-30 ecbe0dc46ce2b8f607b9afd063104adeb7f10fe8
src/tabviews/zshare/mutilform/index.jsx
@@ -76,6 +76,7 @@
    formlist = formlist.map(item => {
      if (item.labelwidth) {
        item.labelCol = {style: {width: item.labelwidth + '%'}}
        item.wrapperCol = {style: {width: (100 - item.labelwidth) + '%'}}
      }
      if (item.type === 'split' || item.type === 'hint') return item
@@ -716,7 +717,13 @@
      } else if (item.type === 'hint') {
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item colon={!!item.label} label={item.label || ' '} labelCol={item.labelCol} className="hint">
            <Form.Item
              colon={!!item.label}
              label={item.label || ' '}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              className="hint"
            >
              <div className="message">{item.message}</div>
            </Form.Item>
          </Col>
@@ -754,12 +761,17 @@
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval + '',
                rules: [
@@ -782,12 +794,17 @@
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -810,12 +827,17 @@
      } else if (item.type === 'color') { // 颜色选择
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval || 'transparent',
                rules: [
@@ -833,12 +855,18 @@
      } else if (item.type === 'checkcard') { // 多选框
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            } className="checkcard">
            <Form.Item
              className="checkcard"
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -854,12 +882,17 @@
      } else if (item.type === 'switch') { // 多选框
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -877,12 +910,17 @@
        
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: _initval,
                rules: [
@@ -902,12 +940,17 @@
      } else if (item.type === 'radio') { // 单选框
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -927,12 +970,17 @@
      } else if (item.type === 'select' || item.type === 'link') { // 下拉搜索
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -961,12 +1009,17 @@
        let _initval = item.initval ? item.initval.split(',').filter(Boolean) : []
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: _initval,
                rules: [
@@ -993,12 +1046,17 @@
      } else if (item.type === 'date') { // 时间搜索
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -1016,12 +1074,17 @@
      } else if (item.type === 'datemonth') {
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -1039,12 +1102,17 @@
      } else if (item.type === 'datetime') {
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -1081,12 +1149,17 @@
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: filelist,
                rules: [
@@ -1104,12 +1177,17 @@
      } else if (item.type === 'linkMain') {
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -1135,12 +1213,17 @@
        }
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : item.label
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval,
                rules: [
@@ -1163,12 +1246,17 @@
        fields.push(
          <Col span={item.span || 24} key={index}>
            <Form.Item extra={item.extra || null} labelCol={item.labelCol} label={item.hidelabel !== 'true' && item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : (item.hidelabel !== 'true' ? item.label : '')
            }>
            <Form.Item
              extra={item.extra || null}
              labelCol={item.labelCol}
              wrapperCol={item.wrapperCol}
              label={item.hidelabel !== 'true' && item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <Icon type="question-circle" />
                  {item.label}
                </Tooltip> : (item.hidelabel !== 'true' ? item.label : '')
              }
            >
              {getFieldDecorator(item.field, {
                initialValue: item.initval || '',
                rules: [