king
2022-09-13 b8cde0c39d7b6d58ceff3adf6dea3cb3118ea602
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,10 +191,9 @@
    }
    return (
      <div className="model-table-datasource-setting-form-box">
        <Form {...formItemLayout} className="model-setting-form">
      <Form {...formItemLayout}>
          <Row gutter={24}>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label="表名">
                {getFieldDecorator('tableName', {
                  initialValue: setting.tableName || '',
@@ -211,7 +210,7 @@
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label="标题">
                {getFieldDecorator('title', {
                  initialValue: setting.title || '',
@@ -228,7 +227,7 @@
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label={dict['header.form.intertype']}>
                {getFieldDecorator('interType', {
                  initialValue: interType,
@@ -246,7 +245,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {interType === 'outer' ? <Col span={12}>
          {interType === 'outer' ? <Col span={8}>
              <Form.Item label={dict['header.form.sysInterface']}>
                {getFieldDecorator('sysInterface', {
                  initialValue: setting.sysInterface || 'false',
@@ -263,7 +262,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            {interType === 'inner' ? <Col span={12}>
          {interType === 'inner' ? <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={funcTooltip}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -286,7 +285,7 @@
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col span={24} className="data-source">
          {interType === 'outer' ? <Col span={24} className="mk-through-line3">
              <Form.Item label="接口地址">
                {getFieldDecorator('interface', {
                  initialValue: setting.interface || '',
@@ -299,7 +298,7 @@
                })(<TextArea rows={2}/>)}
              </Form.Item>
            </Col> : null}
            {interType === 'outer' ? <Col span={12}>
          {interType === 'outer' ? <Col span={8}>
              <Form.Item label="外部函数">
                {getFieldDecorator('outerFunc', {
                  initialValue: setting.outerFunc || '',
@@ -315,7 +314,7 @@
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col> : null}
            {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
          {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" />
@@ -327,7 +326,7 @@
                })(<CodeMirror />)}
              </Form.Item>
            </Col> : null}
            <Col span={12}>
          <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'数据值字段。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -352,7 +351,7 @@
                })(<Input placeholder={''} autoComplete="off" />)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'显示文字字段。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -377,7 +376,7 @@
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'父级字段。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -402,7 +401,7 @@
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label="排序">
                {getFieldDecorator('order', {
                  initialValue: setting.order || 'ID desc',
@@ -419,7 +418,7 @@
                })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'父级字段值与顶级标识相同时,视为顶级节点。'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -437,7 +436,7 @@
                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label={
                <Tooltip placement="topLeft" title={'栅格布局,每行等分为24列,树形比例可设置为2-12(最大50%)'}>
                  <QuestionCircleOutlined className="mk-form-tip" />
@@ -455,7 +454,7 @@
                })(<InputNumber min={2} max={12} precision={0} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label="搜索">
                {getFieldDecorator('searchable', {
                  initialValue: setting.searchable || 'true'
@@ -466,7 +465,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col>
            {interType === 'system' ? <Col span={12}>
          {interType === 'system' ? <Col span={8}>
              <Form.Item label="默认sql">
                {getFieldDecorator('default', {
                  initialValue: setting.default || 'true'
@@ -477,7 +476,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col> : null}
            <Col span={12}>
          <Col span={8}>
              <Form.Item label="显示图标">
                {getFieldDecorator('showIcon', {
                  initialValue: setting.showIcon || 'false'
@@ -488,7 +487,7 @@
                </Radio.Group>)}
              </Form.Item>
            </Col>
            <Col span={12}>
          <Col span={8}>
              <Form.Item label="显示分割线">
                {getFieldDecorator('showLine', {
                  initialValue: setting.showLine || 'false'
@@ -501,7 +500,6 @@
            </Col>
          </Row>
        </Form>
      </div>
    )
  }
}