king
2023-01-17 cc1a76df575c18f0d0ee96e8658461efdce3a918
src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx
@@ -16,7 +16,6 @@
class SettingForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,         // 字典项
    menu: PropTypes.object,         // 菜单信息
    config: PropTypes.object,       // 页面配置信息
    inputSubmit: PropTypes.any      // 回车提交事件
@@ -141,11 +140,12 @@
        exec_type: 'y',
        LText: SettingUtils.getDebugSql(setting, _scripts, timestamp)
      }
      param.LText = param.LText.replace(/\n/g, ' ')
      param.LText = Utils.formatOptions(param.LText)
      param.timestamp = timestamp
      param.secretkey = Utils.encrypt('', timestamp)
      
      Api.getLocalConfig(param).then(result => {
      Api.genericInterface(param).then(result => {
        if (result.status) {
          _resolve()
        } else {
@@ -212,10 +212,9 @@
      if (_loading) {
        notification.warning({
          top: 92,
          message: '存在未保存脚本,请点击确定保存,或点击取消放弃修改!',
          message: '存在未保存脚本!',
          duration: 5
        })
        return
      }
      this.setState({loading: true})
      this.sqlverify(() => { // 验证成功
@@ -249,13 +248,12 @@
    const { activeKey, setting, loading, scripts } = this.state
    return (
      <div className="model-tree-setting-form-box" id="model-setting-form-body">
      <div className="model-tree-setting-form-box">
        {loading && <Spin size="large" />}
        <Tabs activeKey={activeKey} onChange={this.changeTab}>
          <TabPane tab="数据源" key="setting">
            <DataSource
              menu={menu}
              dict={this.props.dict}
              setting={setting}
              inputSubmit={this.props.inputSubmit}
              wrappedComponentRef={(inst) => this.settingForm = inst}
@@ -266,9 +264,8 @@
              自定义脚本
              {scripts.length ? <span className="count-tip">{scripts.length}</span> : null}
            </span>
          } key="scripts">
          } key="scripts" id="mk-setting-scripts">
            <CustomScript
              dict={this.props.dict}
              setting={setting}
              scripts={scripts}
              defaultSql={this.state.defaultsql}