king
2024-07-02 15889111de4daa730d94a2a60883e3665e16840a
2024-07-02
7个文件已修改
47 ■■■■■ 已修改文件
src/menu/components/tabs/antv-tabs/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/antv-tabs/options.jsx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/settingform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tabs/antv-tabs/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tabs/antv-tabs/index.scss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/antv-tabs/index.scss
@@ -18,7 +18,7 @@
    padding-left: 0;
  }
  .ant-tabs-right-content {
    padding-right: 0;
    padding-right: 0!important;
  }
  .ant-tabs-bottom-bar {
    margin-top: 0;
src/menu/components/tabs/antv-tabs/options.jsx
@@ -160,6 +160,21 @@
        {value: 'mk-tab-button', label: '按钮(左)'},
        {value: 'mk-tab-button tab-right', label: '按钮(右)'},
      ],
      controlFields: [
        {field: 'tabAlign', values: ['line']},
      ]
    },
    {
      type: 'select',
      field: 'tabAlign',
      label: '对齐方式',
      initval: setting.tabAlign || 'left',
      required: true,
      options: [
        {value: 'left', label: '左对齐'},
        {value: 'center', label: '居中对齐'},
        {value: 'right', label: '右对齐'},
      ],
    },
    // {
    //   type: 'select',
src/menu/datasource/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Button } from 'antd'
import { Modal, Button, notification } from 'antd'
import { SettingOutlined } from '@ant-design/icons'
import VerifyCard from './verifycard'
@@ -179,6 +179,7 @@
      }
      let maxScript = 0
      let useExec = false
      if (window.GLOB.funcs && window.GLOB.funcs.length > 0) {
        window.GLOB.funcs.forEach(m => {
@@ -192,6 +193,7 @@
            if (item.status === 'false') return
            if (/exec\s/ig.test(item.sql)) {
              useExec = true
              maxScript = 1000
            } else if (item.sql.length > maxScript) {
              maxScript = item.sql.length
@@ -203,6 +205,7 @@
          if (item.status === 'false') return
          if (/exec\s/ig.test(item.sql)) {
            useExec = true
            maxScript = 1000
          } else if (item.sql.length > maxScript) {
            maxScript = item.sql.length
@@ -212,6 +215,14 @@
      res.setting.maxScript = maxScript
      if (useExec && res.setting.sync === 'true') {
        notification.warning({
          top: 92,
          message: '当前数据源使用了同步查询且自定义脚本中存在函数exec,如遇接口报错需关闭同步查询后重新测试。',
          duration: 5
        })
      }
      if (config.subtype !== 'dualdatacard') {
        delete res.subColumns
        if (config.type === 'interface') {
src/menu/datasource/verifycard/settingform/index.jsx
@@ -538,7 +538,7 @@
                </Tooltip>
              }>
                {getFieldDecorator('sync', {
                  initialValue: setting.sync || 'true'
                  initialValue: setting.sync || 'false'
                })(
                  <Radio.Group>
                    <Radio value="true">是</Radio>
src/tabviews/custom/components/tabs/antv-tabs/index.jsx
@@ -146,7 +146,7 @@
    if (!tabs.subtabs.length) return null
    return (
      <div className={`menu-antv-tabs-wrap ${tabs.setting.tabLabel || ''} ${tabs.setting.cusClass || ''}`} id={'anchor' + tabs.uuid} style={tabs.style}>
      <div className={`menu-antv-tabs-wrap ${tabs.setting.tabLabel || ''} ${tabs.setting.cusClass || ''} align-${tabs.setting.tabAlign || ''}`} id={'anchor' + tabs.uuid} style={tabs.style}>
        <Tabs defaultActiveKey="1" tabBarStyle={{background: tabs.setting.backgroundColor || 'transparent'}} tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}>
          {tabs.subtabs.map(tab => (
            <TabPane tab={<span id={'tab' + tab.uuid}>{tab.icon ? <MkIcon type={tab.icon} /> : null}{tab.label}</span>} style={{backgroundColor: tab.backgroundColor || 'transparent'}} key={tab.uuid}>
src/tabviews/custom/components/tabs/antv-tabs/index.scss
@@ -59,4 +59,10 @@
  .ant-tabs-nav-scroll {
    text-align: right;
  }
}
.menu-antv-tabs-wrap.align-right >.ant-tabs >.ant-tabs-bar .ant-tabs-nav-scroll {
  text-align: right;
}
.menu-antv-tabs-wrap.align-center >.ant-tabs >.ant-tabs-bar .ant-tabs-nav-scroll {
  text-align: center;
}
src/utils/utils-custom.js
@@ -2056,6 +2056,13 @@
      duration: 5
    })
    return false
  } else if (/\sdecimal\(8,/ig.test(sql)) {
    notification.warning({
      top: 92,
      message: `不可使用 decimal(8`,
      duration: 5
    })
    return false
  } else if (type === 'customscript' && /\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(sql)) {
    let list = sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
    let errors = []