king
2022-09-13 10c86c1fab41f01c7bf7fcb9d2f8b624142f6a54
src/menu/datasource/verifycard/index.jsx
@@ -71,6 +71,7 @@
          { value: 'Nvarchar(20)', text: 'Nvarchar(20)' },
          { value: 'Nvarchar(50)', text: 'Nvarchar(50)' },
          { value: 'Nvarchar(100)', text: 'Nvarchar(100)' },
          { value: 'Nvarchar(256)', text: 'Nvarchar(256)' },
          { value: 'Nvarchar(512)', text: 'Nvarchar(512)' },
          { value: 'Nvarchar(1024)', text: 'Nvarchar(1024)' },
          { value: 'Nvarchar(2048)', text: 'Nvarchar(2048)' },
@@ -276,7 +277,8 @@
  handleEdit = (record) => {
    this.scriptsForm.edit(record)
    
    let node = document.getElementById('model-data-source-wrap').parentNode
    // let node = document.getElementById('mk-scripts-tabpane').parentNode
    let node = document.getElementById('mk-scripts-tabpane')
    if (node && node.scrollTop) {
      let inter = Math.ceil(node.scrollTop / 10)
@@ -722,7 +724,8 @@
    const { columns, setting, scripts, colColumns, scriptsColumns, activeKey, loading, searches, defaultsql, visible, script, scriptValue } = this.state
    return (
      <div id="model-data-source-wrap">
      <div className="model-data-source-wrap">
        {config.name ? <div className="mk-com-name">{config.name} - 数据源</div> : null}
        {loading && <Spin size="large" />}
        <Tabs activeKey={activeKey} className="data-source-card-box" onChange={this.changeTab}>
          <TabPane tab="数据源" key="setting">
@@ -750,8 +753,8 @@
              自定义脚本
              {scripts.length ? <span className="count-tip">{scripts.length}</span> : null}
            </span>
          } key="scripts">
            <BorderOutlined className="full-scripts" onClick={() => {
          } key="scripts" id="mk-scripts-tabpane">
            {scripts.length ? <BorderOutlined className="full-scripts" onClick={() => {
              if (this.scriptsForm && (this.scriptsForm.state.editItem || (this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))))) {
                notification.warning({
                  top: 92,
@@ -761,7 +764,7 @@
                return
              }
              this.setState({visible: true, script: null, scriptValue: ''})
            }}/>
            }}/> : null}
            <CustomScriptsForm
              setting={setting}
              searches={searches}