king
2021-11-12 0c84df247914f893ef5e41d57a422e10a2dc814c
src/templates/sharecomponent/tablecomponent/index.jsx
@@ -1,7 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Icon, Tooltip, Select, List, notification } from 'antd'
import { Tooltip, Select, List, notification } from 'antd'
import { QuestionCircleOutlined, CloseOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
@@ -182,6 +183,7 @@
              let _type = item.FieldType.toLowerCase()
              let _decimal = 0
              let _length = 50
              if (/^nvarchar/.test(_type)) {
                try { // 存在max
                  _length = +_type.match(/\d+/)[0] || 50
@@ -209,7 +211,8 @@
                type: _type,
                datatype: _type,
                decimal: _decimal,
                length: _length
                length: _length,
                $datatype: item.FieldType.toLowerCase()
              }
            })
          }
@@ -273,7 +276,7 @@
        <div className="ant-col ant-form-item-label">
          <label>
            <Tooltip placement="topLeft" title={dict['model.tooltip.table.guide']}>
              <Icon type="question-circle" />
              <QuestionCircleOutlined className="mk-form-tip" />
              {dict['header.menu.table.add']}
            </Tooltip>
          </label>
@@ -302,7 +305,7 @@
          dataSource={selectedTables}
          renderItem={(item, index) => <List.Item key={index} title={item.Remark + ' (' + item.TbName + ')'}>
            {item.Remark + ' (' + item.TbName + ')'}
            <Icon type="close" onClick={() => this.deleteTable(item)}/>
            <CloseOutlined onClick={() => this.deleteTable(item)}/>
            <div className="bottom-mask"></div>
          </List.Item>}
        />}