From 09153836be0b9932be93124d00dd44e353c76883 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 七月 2024 17:04:14 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/datasource/index.jsx | 13 ++++++++++++- src/tabviews/custom/components/tabs/antv-tabs/index.jsx | 2 +- src/menu/datasource/verifycard/settingform/index.jsx | 2 +- src/utils/utils-custom.js | 7 +++++++ src/tabviews/custom/components/tabs/antv-tabs/index.scss | 6 ++++++ src/menu/components/tabs/antv-tabs/options.jsx | 15 +++++++++++++++ src/menu/components/tabs/antv-tabs/index.scss | 2 +- 7 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/menu/components/tabs/antv-tabs/index.scss b/src/menu/components/tabs/antv-tabs/index.scss index e45bad8..e8cac39 100644 --- a/src/menu/components/tabs/antv-tabs/index.scss +++ b/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; diff --git a/src/menu/components/tabs/antv-tabs/options.jsx b/src/menu/components/tabs/antv-tabs/options.jsx index 329358c..b547b6b 100644 --- a/src/menu/components/tabs/antv-tabs/options.jsx +++ b/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', diff --git a/src/menu/datasource/index.jsx b/src/menu/datasource/index.jsx index 92a16b3..769b314 100644 --- a/src/menu/datasource/index.jsx +++ b/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: '褰撳墠鏁版嵁婧愪娇鐢ㄤ簡鍚屾鏌ヨ涓旇嚜瀹氫箟鑴氭湰涓瓨鍦ㄥ嚱鏁癳xec锛屽閬囨帴鍙f姤閿欓渶鍏抽棴鍚屾鏌ヨ鍚庨噸鏂版祴璇曘��', + duration: 5 + }) + } + if (config.subtype !== 'dualdatacard') { delete res.subColumns if (config.type === 'interface') { diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index 1e7a410..bb68f55 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/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> diff --git a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx index 2701fbb..154f5a6 100644 --- a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx +++ b/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}> diff --git a/src/tabviews/custom/components/tabs/antv-tabs/index.scss b/src/tabviews/custom/components/tabs/antv-tabs/index.scss index 42c4140..9093f26 100644 --- a/src/tabviews/custom/components/tabs/antv-tabs/index.scss +++ b/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; } \ No newline at end of file diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index e546ebe..6823cc6 100644 --- a/src/utils/utils-custom.js +++ b/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 = [] -- Gitblit v1.8.0