king
2022-09-13 fc1e181388192ed4a399132a1c135abd08b38d90
2022-09-13
6个文件已修改
961 ■■■■ 已修改文件
src/assets/css/design.scss 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx 294 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.scss 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx 622 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.scss 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/design.scss
@@ -75,13 +75,13 @@
}
.mk-through-line3 {
  .ant-form-item-label {
    width: 11%;
    width: 10.6%;
  }
  .ant-form-item-control-wrapper {
    width: 89%;
    width: 89.4%;
  }
  .CodeMirror {
    height: 150px;
    height: 200px;
  }
}
.mk-color-move {
src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx
@@ -8,7 +8,7 @@
import { formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
// import './index.scss'
const { TextArea } = Input
@@ -176,160 +176,146 @@
    }
    return (
      <div className="model-datasource-setting-form-box">
        <Form {...formItemLayout} className="model-setting-form">
          <Row gutter={24}>
            <Col span={8}>
              <Form.Item label="表名">
                {getFieldDecorator('tableName', {
                  initialValue: setting.tableName,
                  rules: [
                    {
                      required: true,
                      message: this.props.dict['form.required.input'] + '表名!'
                    },
                    {
                      max: 50,
                      message: '表名最长为50个字符!'
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col>
            <Col span={8}>
              <Form.Item label="接口类型">
                {getFieldDecorator('interType', {
                  initialValue: interType,
                  rules: [
                    {
                      required: true,
                      message: this.props.dict['form.required.select'] + '接口类型!'
                    },
                  ]
                })(
                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}>
                  <Radio value="system">系统</Radio>
                  <Radio value="inner">内部</Radio>
                  <Radio value="outer">外部</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {interType === 'inner' ? <Col span={8}>
              <Form.Item label={tooltip ?
                <Tooltip placement="topLeft" title={tooltip}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  内部函数
                </Tooltip> : '内部函数'
              }>
                {getFieldDecorator('innerFunc', {
                  initialValue: setting.innerFunc || '',
                  rules: rules
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col span={8}>
              <Form.Item label="外部函数">
                {getFieldDecorator('outerFunc', {
                  initialValue: setting.outerFunc || '',
                  rules: [
      <Form {...formItemLayout}>
        <Row gutter={24}>
          <Col span={8}>
            <Form.Item label="表名">
              {getFieldDecorator('tableName', {
                initialValue: setting.tableName,
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '表名!'
                  },
                  {
                    max: 50,
                    message: '表名最长为50个字符!'
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label="接口类型">
              {getFieldDecorator('interType', {
                initialValue: interType,
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.select'] + '接口类型!'
                  },
                ]
              })(
              <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}>
                <Radio value="system">系统</Radio>
                <Radio value="inner">内部</Radio>
                <Radio value="outer">外部</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
          {interType === 'inner' ? <Col span={8}>
            <Form.Item label={tooltip ?
              <Tooltip placement="topLeft" title={tooltip}>
                <QuestionCircleOutlined className="mk-form-tip" />
                内部函数
              </Tooltip> : '内部函数'
            }>
              {getFieldDecorator('innerFunc', {
                initialValue: setting.innerFunc || '',
                rules: rules
              })(<Input placeholder={''} autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={8}>
            <Form.Item label="外部函数">
              {getFieldDecorator('outerFunc', {
                initialValue: setting.outerFunc || '',
                rules: [
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col span={24} className="data-source">
              <Form.Item label="接口地址">
                {getFieldDecorator('interface', {
                  initialValue: setting.interface || '',
                  rules: [
                    {
                      required: true,
                      message: this.props.dict['form.required.input'] + '接口地址!'
                    },
                  ]
                })(<TextArea rows={2}/>)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
              <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={
                <Tooltip placement="topLeft" title={'使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 \'\'、 @$ -> */ 或 \'\''}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  数据源
                </Tooltip>
              }>
                {getFieldDecorator('dataresource', {
                  initialValue: setting.dataresource || ''
                })(<CodeMirror />)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'查询时,搜索条件以where条件拼接进入sql,统计时,将数据源中以“@+搜索字段+@”的内容,以搜索条件中的值进行替换后,提交查询,注:查询类型仅在使用系统函数时有效。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  查询类型
                </Tooltip>
              }>
                {getFieldDecorator('queryType', {
                  initialValue: setting.queryType || 'query'
                })(
                <Radio.Group>
                  <Radio value="query">查询</Radio>
                  <Radio value="statistics">统计</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {/* <Col span={8}>
              <Form.Item label="主键">
                {getFieldDecorator('primaryKey', {
                  initialValue: setting.primaryKey || ''
                })(
                  <Select>
                    {columns.map((option, i) =>
                      <Select.Option key={i} value={option.field}>
                        {option.label}
                      </Select.Option>
                    )}
                  </Select>
                )}
              </Form.Item>
            </Col> */}
            {interType === 'system' ? <Col span={8}>
              <Form.Item label="默认sql">
                {getFieldDecorator('execute', {
                  initialValue: setting.execute || 'true'
                })(
                <Radio.Group>
                  <Radio value="true">执行</Radio>
                  <Radio value="false">不执行</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            <Col span={8}>
              <Form.Item label="初始化">
                {getFieldDecorator('onload', {
                  initialValue: setting.onload || 'true'
                })(
                <Radio.Group>
                  <Radio value="true">加载数据</Radio>
                  <Radio value="false">不加载数据</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {/* <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="高级搜索弹窗的宽度,注:当宽度值小于100时表示占窗口的百分比,大于100时表示宽度的绝对值。">
                  <QuestionCircleOutlined className="mk-form-tip" />
                  高级搜索
                </Tooltip>
              }>
                {getFieldDecorator('advanceWidth', {
                  initialValue: setting.advanceWidth || 1000
                })(<InputNumber min={10} max={3000} precision={0}/>)}
              </Form.Item>
            </Col> */}
          </Row>
        </Form>
      </div>
                ]
              })(<Input placeholder={''} autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={24} className="mk-through-line3">
            <Form.Item label="接口地址">
              {getFieldDecorator('interface', {
                initialValue: setting.interface || '',
                rules: [
                  {
                    required: true,
                    message: this.props.dict['form.required.input'] + '接口地址!'
                  },
                ]
              })(<TextArea rows={2}/>)}
            </Form.Item>
          </Col> : null}
          {interType === 'system' ? <Col span={24} className="mk-through-line3">
            <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={
              <Tooltip placement="topLeft" title={'使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 \'\'、 @$ -> */ 或 \'\''}>
                <QuestionCircleOutlined className="mk-form-tip" />
                数据源
              </Tooltip>
            }>
              {getFieldDecorator('dataresource', {
                initialValue: setting.dataresource || ''
              })(<CodeMirror />)}
            </Form.Item>
          </Col> : null}
          {interType === 'system' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'查询时,搜索条件以where条件拼接进入sql,统计时,将数据源中以“@+搜索字段+@”的内容,以搜索条件中的值进行替换后,提交查询,注:查询类型仅在使用系统函数时有效。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                查询类型
              </Tooltip>
            }>
              {getFieldDecorator('queryType', {
                initialValue: setting.queryType || 'query'
              })(
              <Radio.Group>
                <Radio value="query">查询</Radio>
                <Radio value="statistics">统计</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {/* <Col span={8}>
            <Form.Item label="主键">
              {getFieldDecorator('primaryKey', {
                initialValue: setting.primaryKey || ''
              })(
                <Select>
                  {columns.map((option, i) =>
                    <Select.Option key={i} value={option.field}>
                      {option.label}
                    </Select.Option>
                  )}
                </Select>
              )}
            </Form.Item>
          </Col> */}
          {interType === 'system' ? <Col span={8}>
            <Form.Item label="默认sql">
              {getFieldDecorator('execute', {
                initialValue: setting.execute || 'true'
              })(
              <Radio.Group>
                <Radio value="true">执行</Radio>
                <Radio value="false">不执行</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          <Col span={8}>
            <Form.Item label="初始化">
              {getFieldDecorator('onload', {
                initialValue: setting.onload || 'true'
              })(
              <Radio.Group>
                <Radio value="true">加载数据</Radio>
                <Radio value="false">不加载数据</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
  }
}
src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.scss
@@ -1,20 +0,0 @@
.model-datasource-setting-form-box {
  position: relative;
  .model-setting-form {
    .data-source {
      .ant-form-item-label {
        width: 11%;
      }
      .ant-form-item-control-wrapper {
        width: 89%;
      }
      .CodeMirror {
        height: 150px;
      }
    }
  }
  .ant-radio-group {
    white-space: nowrap;
  }
}
src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -424,7 +424,7 @@
              })(<Input placeholder={''} autoComplete="off" />)}
            </Form.Item>
          </Col> : null}
          {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={24} className="mk-through-line3" style={{paddingLeft: '7px'}}>
          {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={24} className="mk-through-line3">
            <Form.Item help={'数据ID:' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={
              <Tooltip placement="topLeft" title={`使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 ''、 @$ -> */ 或 '';查询替换符 $select@ -> /* 或 ''、 @select$ -> */ 或 '';统计替换符 $sum@ -> /* 或 ''、 @sum$ -> */ 或 ''。`}>
                <QuestionCircleOutlined className="mk-form-tip" />
src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
@@ -8,7 +8,7 @@
import { formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import CodeMirror from '@/templates/zshare/codemirror'
import './index.scss'
// import './index.scss'
const { TextArea } = Input
@@ -191,317 +191,315 @@
    }
    return (
      <div className="model-table-datasource-setting-form-box">
        <Form {...formItemLayout} className="model-setting-form">
          <Row gutter={24}>
            <Col span={12}>
              <Form.Item label="表名">
                {getFieldDecorator('tableName', {
                  initialValue: setting.tableName || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '表名!'
                    },
                    {
                      max: 50,
                      message: '表名最长为50个字符!'
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="标题">
                {getFieldDecorator('title', {
                  initialValue: setting.title || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '标题!'
                    },
                    {
                      max: formRule.input.max,
                      message: formRule.input.message
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={dict['header.form.intertype']}>
                {getFieldDecorator('interType', {
                  initialValue: interType,
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.select'] + dict['header.form.intertype'] + '!'
                    }
                  ]
                })(
                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}>
                  <Radio value="system">系统</Radio>
                  <Radio value="inner">内部</Radio>
                  <Radio value="outer">外部</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {interType === 'outer' ? <Col span={12}>
              <Form.Item label={dict['header.form.sysInterface']}>
                {getFieldDecorator('sysInterface', {
                  initialValue: setting.sysInterface || 'false',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!'
                    },
                  ]
                })(
                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}>
                  <Radio value="true">{dict['model.true']}</Radio>
                  <Radio value="false">{dict['model.false']}</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {interType === 'inner' ? <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={funcTooltip}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  内部函数
                </Tooltip>
              }>
                {getFieldDecorator('innerFunc', {
                  initialValue: setting.innerFunc || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '内部函数!'
                    },
                    {
                      max: formRule.func.max,
                      message: formRule.func.maxMessage
                    },
                    ...funcRules
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col span={24} className="data-source">
              <Form.Item label="接口地址">
                {getFieldDecorator('interface', {
                  initialValue: setting.interface || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '接口地址!'
                    }
                  ]
                })(<TextArea rows={2}/>)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col span={12}>
              <Form.Item label="外部函数">
                {getFieldDecorator('outerFunc', {
                  initialValue: setting.outerFunc || '',
                  rules: [
                    {
                      pattern: formRule.func.pattern,
                      message: formRule.func.message
                    }, {
                      max: formRule.func.max,
                      message: formRule.func.maxMessage
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
              <Form.Item help={'数据ID:' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={
                <Tooltip placement="topLeft" title={'使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 \'\'、 @$ -> */ 或 \'\''}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  数据源
                </Tooltip>
              }>
                {getFieldDecorator('dataresource', {
                  initialValue: setting.dataresource || ''
                })(<CodeMirror />)}
              </Form.Item>
            </Col> : null}
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'数据值字段。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  Value
                </Tooltip>
              }>
                {getFieldDecorator('valueField', {
                  initialValue: setting.valueField || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + 'Value!'
                    },
                    {
                      pattern: formRule.field.pattern,
                      message: formRule.field.message
                    }, {
                      max: formRule.field.max,
                      message: formRule.field.maxMessage
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'显示文字字段。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  Label
                </Tooltip>
              }>
                {getFieldDecorator('labelField', {
                  initialValue: setting.labelField || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + 'Label!'
                    },
                    {
                      pattern: formRule.field.pattern,
                      message: formRule.field.message
                    }, {
                      max: formRule.field.max,
                      message: formRule.field.maxMessage
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'父级字段。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  Parent
                </Tooltip>
              }>
                {getFieldDecorator('parentField', {
                  initialValue: setting.parentField || '',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + 'Label!'
                    },
                    {
                      pattern: formRule.field.pattern,
                      message: formRule.field.message
                    }, {
                      max: formRule.field.max,
                      message: formRule.field.maxMessage
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="排序">
                {getFieldDecorator('order', {
                  initialValue: setting.order || 'ID desc',
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '排序!'
                    },
                    {
                      max: formRule.input.max,
                      message: formRule.input.message
                    }
                  ]
                })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'父级字段值与顶级标识相同时,视为顶级节点。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  顶级标识
                </Tooltip>
              }>
                {getFieldDecorator('mark', {
                  initialValue: setting.mark || '',
                  rules: [
                    {
                      max: formRule.input.max,
                      message: formRule.input.message
                    }
                  ]
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'栅格布局,每行等分为24列,树形比例可设置为2-12(最大50%)'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  宽度
                </Tooltip>
              }>
                {getFieldDecorator('width', {
                  initialValue: setting.width || 5,
                  rules: [
                    {
                      required: true,
                      message: dict['form.required.input'] + '宽度!'
                    }
                  ]
                })(<InputNumber min={2} max={12} precision={0} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="搜索">
                {getFieldDecorator('searchable', {
                  initialValue: setting.searchable || 'true'
                })(
                <Radio.Group>
                  <Radio value="true">显示</Radio>
                  <Radio value="false">隐藏</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {interType === 'system' ? <Col span={12}>
              <Form.Item label="默认sql">
                {getFieldDecorator('default', {
                  initialValue: setting.default || 'true'
                })(
                <Radio.Group>
                  <Radio value="true">执行</Radio>
                  <Radio value="false">不执行</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            <Col span={12}>
              <Form.Item label="显示图标">
                {getFieldDecorator('showIcon', {
                  initialValue: setting.showIcon || 'false'
                })(
                <Radio.Group>
                  <Radio value="true">是</Radio>
                  <Radio value="false">否</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="显示分割线">
                {getFieldDecorator('showLine', {
                  initialValue: setting.showLine || 'false'
                })(
                <Radio.Group>
                  <Radio value="true">是</Radio>
                  <Radio value="false">否</Radio>
                </Radio.Group>)}
              </Form.Item>
            </Col>
          </Row>
        </Form>
      </div>
      <Form {...formItemLayout}>
        <Row gutter={24}>
          <Col span={8}>
            <Form.Item label="表名">
              {getFieldDecorator('tableName', {
                initialValue: setting.tableName || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '表名!'
                  },
                  {
                    max: 50,
                    message: '表名最长为50个字符!'
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label="标题">
              {getFieldDecorator('title', {
                initialValue: setting.title || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '标题!'
                  },
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label={dict['header.form.intertype']}>
              {getFieldDecorator('interType', {
                initialValue: interType,
                rules: [
                  {
                    required: true,
                    message: dict['form.required.select'] + dict['header.form.intertype'] + '!'
                  }
                ]
              })(
              <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}>
                <Radio value="system">系统</Radio>
                <Radio value="inner">内部</Radio>
                <Radio value="outer">外部</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
          {interType === 'outer' ? <Col span={8}>
            <Form.Item label={dict['header.form.sysInterface']}>
              {getFieldDecorator('sysInterface', {
                initialValue: setting.sysInterface || 'false',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!'
                  },
                ]
              })(
              <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}>
                <Radio value="true">{dict['model.true']}</Radio>
                <Radio value="false">{dict['model.false']}</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          {interType === 'inner' ? <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={funcTooltip}>
                <QuestionCircleOutlined className="mk-form-tip" />
                内部函数
              </Tooltip>
            }>
              {getFieldDecorator('innerFunc', {
                initialValue: setting.innerFunc || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '内部函数!'
                  },
                  {
                    max: formRule.func.max,
                    message: formRule.func.maxMessage
                  },
                  ...funcRules
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={24} className="mk-through-line3">
            <Form.Item label="接口地址">
              {getFieldDecorator('interface', {
                initialValue: setting.interface || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '接口地址!'
                  }
                ]
              })(<TextArea rows={2}/>)}
            </Form.Item>
          </Col> : null}
          {interType === 'outer' ? <Col span={8}>
            <Form.Item label="外部函数">
              {getFieldDecorator('outerFunc', {
                initialValue: setting.outerFunc || '',
                rules: [
                  {
                    pattern: formRule.func.pattern,
                    message: formRule.func.message
                  }, {
                    max: formRule.func.max,
                    message: formRule.func.maxMessage
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col> : null}
          {interType === 'system' ? <Col span={24} className="mk-through-line3">
            <Form.Item help={'数据ID:' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={
              <Tooltip placement="topLeft" title={'使用系统函数时,需填写数据源。注:数据权限替换符 $@ -> /* 或 \'\'、 @$ -> */ 或 \'\''}>
                <QuestionCircleOutlined className="mk-form-tip" />
                数据源
              </Tooltip>
            }>
              {getFieldDecorator('dataresource', {
                initialValue: setting.dataresource || ''
              })(<CodeMirror />)}
            </Form.Item>
          </Col> : null}
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'数据值字段。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                Value
              </Tooltip>
            }>
              {getFieldDecorator('valueField', {
                initialValue: setting.valueField || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + 'Value!'
                  },
                  {
                    pattern: formRule.field.pattern,
                    message: formRule.field.message
                  }, {
                    max: formRule.field.max,
                    message: formRule.field.maxMessage
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'显示文字字段。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                Label
              </Tooltip>
            }>
              {getFieldDecorator('labelField', {
                initialValue: setting.labelField || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + 'Label!'
                  },
                  {
                    pattern: formRule.field.pattern,
                    message: formRule.field.message
                  }, {
                    max: formRule.field.max,
                    message: formRule.field.maxMessage
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'父级字段。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                Parent
              </Tooltip>
            }>
              {getFieldDecorator('parentField', {
                initialValue: setting.parentField || '',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + 'Label!'
                  },
                  {
                    pattern: formRule.field.pattern,
                    message: formRule.field.message
                  }, {
                    max: formRule.field.max,
                    message: formRule.field.maxMessage
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label="排序">
              {getFieldDecorator('order', {
                initialValue: setting.order || 'ID desc',
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '排序!'
                  },
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  }
                ]
              })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'父级字段值与顶级标识相同时,视为顶级节点。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                顶级标识
              </Tooltip>
            }>
              {getFieldDecorator('mark', {
                initialValue: setting.mark || '',
                rules: [
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  }
                ]
              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label={
              <Tooltip placement="topLeft" title={'栅格布局,每行等分为24列,树形比例可设置为2-12(最大50%)'}>
                <QuestionCircleOutlined className="mk-form-tip" />
                宽度
              </Tooltip>
            }>
              {getFieldDecorator('width', {
                initialValue: setting.width || 5,
                rules: [
                  {
                    required: true,
                    message: dict['form.required.input'] + '宽度!'
                  }
                ]
              })(<InputNumber min={2} max={12} precision={0} />)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label="搜索">
              {getFieldDecorator('searchable', {
                initialValue: setting.searchable || 'true'
              })(
              <Radio.Group>
                <Radio value="true">显示</Radio>
                <Radio value="false">隐藏</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
          {interType === 'system' ? <Col span={8}>
            <Form.Item label="默认sql">
              {getFieldDecorator('default', {
                initialValue: setting.default || 'true'
              })(
              <Radio.Group>
                <Radio value="true">执行</Radio>
                <Radio value="false">不执行</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col> : null}
          <Col span={8}>
            <Form.Item label="显示图标">
              {getFieldDecorator('showIcon', {
                initialValue: setting.showIcon || 'false'
              })(
              <Radio.Group>
                <Radio value="true">是</Radio>
                <Radio value="false">否</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item label="显示分割线">
              {getFieldDecorator('showLine', {
                initialValue: setting.showLine || 'false'
              })(
              <Radio.Group>
                <Radio value="true">是</Radio>
                <Radio value="false">否</Radio>
              </Radio.Group>)}
            </Form.Item>
          </Col>
        </Row>
      </Form>
    )
  }
}
src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.scss
@@ -1,17 +0,0 @@
.model-table-datasource-setting-form-box {
  position: relative;
  .model-setting-form {
    .data-source {
      .ant-form-item-label {
        width: 16.5%;
      }
      .ant-form-item-control-wrapper {
        width: 83.5%;
      }
      .CodeMirror {
        height: 150px;
      }
    }
  }
}