| | |
| | | padding-left: 0; |
| | | } |
| | | .ant-tabs-right-content { |
| | | padding-right: 0; |
| | | padding-right: 0!important; |
| | | } |
| | | .ant-tabs-bottom-bar { |
| | | margin-top: 0; |
| | |
| | | {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', |
| | |
| | | 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' |
| | |
| | | } |
| | | |
| | | let maxScript = 0 |
| | | let useExec = false |
| | | |
| | | if (window.GLOB.funcs && window.GLOB.funcs.length > 0) { |
| | | window.GLOB.funcs.forEach(m => { |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | |
| | | 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') { |
| | |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('sync', { |
| | | initialValue: setting.sync || 'true' |
| | | initialValue: setting.sync || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">是</Radio> |
| | |
| | | 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}> |
| | |
| | | .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; |
| | | } |
| | |
| | | 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 = [] |