From b8cde0c39d7b6d58ceff3adf6dea3cb3118ea602 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 九月 2022 14:46:15 +0800 Subject: [PATCH] 2022-09-13 --- src/menu/components/chart/antv-bar/chartcompile/index.jsx | 4 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx | 7 src/menu/components/chart/antv-bar/chartcompile/index.scss | 48 src/menu/components/card/cardcellcomponent/index.scss | 28 src/menu/components/chart/antv-scatter/chartcompile/index.jsx | 5 public/options.json | 1 src/menu/datasource/index.jsx | 4 src/menu/components/form/formaction/index.jsx | 3 src/menu/components/chart/chart-custom/chartcompile/index.scss | 11 src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx | 19 src/templates/sharecomponent/settingcomponent/settingform/index.jsx | 8 src/tabviews/zshare/mutilform/mkNumberInput/index.jsx | 13 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.scss | 17 src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx | 294 ++-- src/assets/css/design.scss | 92 + src/menu/components/chart/antv-scatter/chartcompile/index.scss | 36 src/views/mobdesign/index.jsx | 1 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 10 src/views/menudesign/index.jsx | 1 src/menu/datasource/verifycard/columnform/index.jsx | 1 src/menu/datasource/verifycard/index.jsx | 13 src/assets/css/main.scss | 45 src/tabviews/custom/components/card/cardcellList/index.jsx | 15 src/menu/components/card/cardcellcomponent/index.jsx | 5 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx | 1224 ++++++++++---------- src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx | 622 +++++----- src/views/design/sidemenu/thdmenuplus/index.scss | 12 src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx | 4 src/views/popdesign/index.jsx | 1 src/menu/components/table/edit-table/columns/index.scss | 28 src/templates/sharecomponent/treesettingcomponent/index.scss | 29 src/templates/zshare/customscript/index.jsx | 2 src/menu/components/table/normal-table/columns/index.jsx | 7 src/templates/sharecomponent/treesettingcomponent/index.jsx | 5 src/views/design/sidemenu/thdmenuplus/index.jsx | 3 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss | 2 src/menu/components/table/edit-table/columns/index.jsx | 7 src/templates/sharecomponent/settingcomponent/index.jsx | 13 package-lock.json | 6 src/menu/components/chart/antv-dashboard/chartcompile/index.jsx | 4 src/menu/datasource/verifycard/index.scss | 17 src/templates/formtabconfig/index.jsx | 3 src/views/basedesign/index.jsx | 2 src/views/tabledesign/index.jsx | 1 src/menu/components/chart/antv-pie/chartcompile/index.scss | 33 src/menu/components/chart/chart-custom/chartcompile/index.jsx | 7 src/menu/components/table/normal-table/columns/index.scss | 28 src/templates/sharecomponent/actioncomponent/index.scss | 28 src/templates/sharecomponent/settingcalcomponent/index.jsx | 3 src/menu/components/chart/antv-dashboard/chartcompile/index.scss | 41 src/templates/zshare/verifycard/index.scss | 7 src/utils/utils.js | 12 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 9 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.scss | 22 src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx | 5 src/menu/components/share/actioncomponent/index.scss | 29 src/menu/stylecontroller/index.jsx | 3 src/views/pcdesign/index.jsx | 1 src/menu/components/chart/antv-pie/chartcompile/index.jsx | 5 src/templates/zshare/verifycard/index.jsx | 28 src/templates/sharecomponent/settingcomponent/index.scss | 39 src/templates/sharecomponent/settingcalcomponent/index.scss | 75 - src/menu/components/share/actioncomponent/index.jsx | 3 src/tabviews/zshare/actionList/printbutton/index.jsx | 27 src/mob/components/formdragelement/card.jsx | 2 src/templates/sharecomponent/settingcomponent/settingform/index.scss | 5 src/templates/sharecomponent/actioncomponent/index.jsx | 3 src/templates/sharecomponent/searchcomponent/settingform/index.jsx | 180 +- src/menu/components/table/base-table/index.jsx | 36 src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.scss | 20 70 files changed, 1,568 insertions(+), 1,756 deletions(-) diff --git a/package-lock.json b/package-lock.json index c574856..9386635 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5404,9 +5404,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001319", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz", - "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==" + "version": "1.0.30001399", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001399.tgz", + "integrity": "sha512-4vQ90tMKS+FkvuVWS5/QY1+d805ODxZiKFzsU8o/RsVJz49ZSRR8EjykLJbqhzdPgadbX6wB538wOzle3JniRA==" }, "capture-exit": { "version": "2.0.0", diff --git a/public/options.json b/public/options.json index ac7dd4e..f2e53ff 100644 --- a/public/options.json +++ b/public/options.json @@ -14,6 +14,7 @@ "licenseKey": "", "probation": "", "keepPassword": "true", + "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], "host": "https://css-test.positecgroup.com", "service": "" } \ No newline at end of file diff --git a/src/assets/css/design.scss b/src/assets/css/design.scss new file mode 100644 index 0000000..c615204 --- /dev/null +++ b/src/assets/css/design.scss @@ -0,0 +1,92 @@ +.ant-modal-wrap.mk-pop-modal { + .ant-modal { + top: 50px; + } + .ant-modal-body { + padding: 0; + + .mk-com-name { + position: absolute; + top: 38px; + left: 10px; + color: rgba(0, 0, 0, 0.85); + font-size: 15px; + } + .ant-tabs { + .ant-tabs-nav-wrap { + text-align: center; + } + .ant-tabs-bar { + padding-top: 15px; + .ant-tabs-nav-container { + font-size: 15px; + } + } + .ant-tabs-content { + min-height: 50vh; + max-height: calc(100vh - 210px); + + .ant-tabs-tabpane { + position: relative; + overflow-x: hidden; + overflow-y: auto; + padding: 0 24px 24px; + } + + .ant-tabs-tabpane::-webkit-scrollbar { + width: 7px; + } + .ant-tabs-tabpane::-webkit-scrollbar-thumb { + border-radius: 5px; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); + background: rgba(0, 0, 0, 0.13); + } + .ant-tabs-tabpane::-webkit-scrollbar-track { + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); + border-radius: 3px; + border: 1px solid rgba(0, 0, 0, 0.07); + background: rgba(0, 0, 0, 0); + } + } + } + } +} + +.ant-modal { + .ant-radio-group { + white-space: nowrap; + .ant-radio-wrapper { + margin-right: 4px; + } + } +} + +// 閫氳瀹藉害 +.mk-through-line2 { + .ant-form-item-label { + width: 16.5%; + } + .ant-form-item-control-wrapper { + width: 83.5%; + } + .CodeMirror { + height: 150px; + } +} +.mk-through-line3 { + .ant-form-item-label { + width: 10.6%; + } + .ant-form-item-control-wrapper { + width: 89.4%; + } + .CodeMirror { + height: 200px; + } +} +.mk-color-move { + .color-sketch-block { + position: relative; + top: 7px; + } +} diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index fa34e11..3cb368f 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -264,28 +264,28 @@ } } -.ant-modal.popview-modal { - top: 70px; - .ant-modal-body { - min-height: 200px; - max-height: calc(100vh - 210px); - overflow-y: auto; - } - .ant-modal-body::-webkit-scrollbar { - width: 7px; - } - .ant-modal-body::-webkit-scrollbar-thumb { - border-radius: 5px; - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); - background: rgba(0, 0, 0, 0.13); - } - .ant-modal-body::-webkit-scrollbar-track { - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - border-radius: 3px; - border: 1px solid rgba(0, 0, 0, 0.07); - background: rgba(0, 0, 0, 0); - } -} +// .ant-modal.popview-modal { +// top: 70px; +// .ant-modal-body { +// min-height: 200px; +// max-height: calc(100vh - 210px); +// overflow-y: auto; +// } +// .ant-modal-body::-webkit-scrollbar { +// width: 7px; +// } +// .ant-modal-body::-webkit-scrollbar-thumb { +// border-radius: 5px; +// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); +// background: rgba(0, 0, 0, 0.13); +// } +// .ant-modal-body::-webkit-scrollbar-track { +// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); +// border-radius: 3px; +// border: 1px solid rgba(0, 0, 0, 0.07); +// background: rgba(0, 0, 0, 0); +// } +// } .ant-modal-wrap.popview-modal { .ant-modal { top: 70px; @@ -310,6 +310,7 @@ background: rgba(0, 0, 0, 0); } } + // 璁剧疆妯℃�佹鏍峰紡锛岃瀹氭渶澶ф渶灏忛珮搴︼紝閲嶇疆婊氬姩鏉� .action-modal { .ant-modal { diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index 146bf94..b2d12a3 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -650,7 +650,7 @@ if (!card) return null - if (['pop', 'prompt', 'exec'].includes(card.OpenType)) { + if (['pop', 'prompt', 'exec', 'form'].includes(card.OpenType)) { return <VerifyCard card={card} dict={dict} @@ -748,8 +748,7 @@ </Modal> {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */} <Modal - wrapClassName="model-table-action-verify-modal" - title={(card && card.label ? card.label + ' - ' : '') + '楠岃瘉淇℃伅'} + wrapClassName="mk-pop-modal" visible={profVisible} width={'90vw'} maskClosable={false} diff --git a/src/menu/components/card/cardcellcomponent/index.scss b/src/menu/components/card/cardcellcomponent/index.scss index d7a9616..30af64f 100644 --- a/src/menu/components/card/cardcellcomponent/index.scss +++ b/src/menu/components/card/cardcellcomponent/index.scss @@ -29,32 +29,4 @@ .card-cell:hover, .card-button-cell:hover { box-shadow: 0px 0px 2px #1890ff; } -} -.model-table-action-verify-modal { - .ant-modal { - top: 50px; - padding-bottom: 5px; - .ant-modal-body { - max-height: calc(100vh - 190px); - min-height: calc(100vh - 300px); - overflow-y: auto; - .ant-empty { - margin: 5vh 8px; - } - } - .ant-modal-body::-webkit-scrollbar { - width: 7px; - } - .ant-modal-body::-webkit-scrollbar-thumb { - border-radius: 5px; - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); - background: rgba(0, 0, 0, 0.13); - } - .ant-modal-body::-webkit-scrollbar-track { - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - border-radius: 3px; - border: 1px solid rgba(0, 0, 0, 0.07); - background: rgba(0, 0, 0, 0); - } - } } \ No newline at end of file diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.jsx b/src/menu/components/chart/antv-bar/chartcompile/index.jsx index 61f053f..b49ad23 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/index.jsx @@ -755,8 +755,7 @@ <div className="line-chart-drawer-form"> <EditOutlined title="缂栬緫" onClick={this.showDrawer}/> <Modal - wrapClassName="popview-modal menu-chart-edit-modal" - title={config.type === 'bar' ? '鏌辩姸鍥剧紪杈�' : '鎶樼嚎鍥剧紪杈�'} + wrapClassName="mk-pop-modal" visible={visible} width={1000} maskClosable={false} @@ -764,6 +763,7 @@ onCancel={() => { this.setState({ visible: false }) }} destroyOnClose > + {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.scss b/src/menu/components/chart/antv-bar/chartcompile/index.scss index 6334288..abcff08 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/index.scss +++ b/src/menu/components/chart/antv-bar/chartcompile/index.scss @@ -4,36 +4,24 @@ color: #1890ff; } } -.menu-chart-edit-modal { - .ant-modal { - top: 50px; - .ant-modal-body { - max-height: calc(100vh - 190px); - min-height: 50vh; - padding-top: 10px; - .menu-chart-edit-box { - .ant-radio-wrapper { - margin-right: 5px; - } - .ant-tabs-nav-wrap { - text-align: center; - } - .color-sketch-block { - position: relative; - top: 5px; - width: 240px; - } - .color-add { - float: right; - margin-bottom: 10px; - position: relative; - z-index: 1; - } - .ant-table-column-title { - white-space: nowrap; - } - } - } +.menu-chart-edit-box { + .ant-radio-wrapper { + margin-right: 5px; + } + .color-sketch-block { + position: relative; + top: 5px; + width: 240px; + } + .color-add { + float: right; + margin-bottom: 10px; + position: relative; + z-index: 1; + } + .ant-table-column-title { + white-space: nowrap; } } + diff --git a/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx b/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx index 09bf509..1bc8301 100644 --- a/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-dashboard/chartcompile/index.jsx @@ -300,8 +300,7 @@ <div className="line-chart-drawer-form"> <EditOutlined title="缂栬緫" onClick={this.showDrawer} /> <Modal - wrapClassName="popview-modal menu-chart-edit-modal" - title={config.subtype === 'ratioboard' ? '鍗犳瘮鍥剧紪杈�' : '浠〃鐩樼紪杈�'} + wrapClassName="mk-pop-modal" visible={visible} width={850} maskClosable={false} @@ -309,6 +308,7 @@ onCancel={() => { this.setState({ visible: false }) }} destroyOnClose > + {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> diff --git a/src/menu/components/chart/antv-dashboard/chartcompile/index.scss b/src/menu/components/chart/antv-dashboard/chartcompile/index.scss index 8764153..9707fbb 100644 --- a/src/menu/components/chart/antv-dashboard/chartcompile/index.scss +++ b/src/menu/components/chart/antv-dashboard/chartcompile/index.scss @@ -4,32 +4,21 @@ color: #1890ff; } } -.menu-chart-edit-modal { - .ant-modal { - top: 50px; - .ant-modal-body { - min-height: 50vh; - max-height: calc(100vh - 190px); - padding-top: 10px; - .ant-tabs-nav-wrap { - text-align: center; - } - .color-sketch-block { - position: relative; - top: 5px; - width: 240px; - } - .color-add { - float: right; - margin-bottom: 10px; - position: relative; - z-index: 1; - } - .color-col { - .ant-form-item-control { - height: 40px; - } - } +.menu-chart-edit-box { + .color-sketch-block { + position: relative; + top: 5px; + width: 240px; + } + .color-add { + float: right; + margin-bottom: 10px; + position: relative; + z-index: 1; + } + .color-col { + .ant-form-item-control { + height: 40px; } } } diff --git a/src/menu/components/chart/antv-pie/chartcompile/index.jsx b/src/menu/components/chart/antv-pie/chartcompile/index.jsx index be8bb9a..e1a7d47 100644 --- a/src/menu/components/chart/antv-pie/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-pie/chartcompile/index.jsx @@ -309,6 +309,7 @@ } render() { + const { config } = this.props const { visible, plot, colorColumns, view, baseFormlist } = this.state const formItemLayout = { labelCol: { @@ -325,8 +326,7 @@ <div className="line-chart-drawer-form"> <EditOutlined title="缂栬緫" onClick={this.showDrawer} /> <Modal - wrapClassName="popview-modal menu-chart-edit-modal" - title="楗煎浘缂栬緫" + wrapClassName="mk-pop-modal" visible={visible} width={850} maskClosable={false} @@ -334,6 +334,7 @@ onCancel={() => { this.setState({ visible: false }) }} destroyOnClose > + {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> diff --git a/src/menu/components/chart/antv-pie/chartcompile/index.scss b/src/menu/components/chart/antv-pie/chartcompile/index.scss index dd1f229..58ad288 100644 --- a/src/menu/components/chart/antv-pie/chartcompile/index.scss +++ b/src/menu/components/chart/antv-pie/chartcompile/index.scss @@ -4,28 +4,17 @@ color: #1890ff; } } -.menu-chart-edit-modal { - .ant-modal { - top: 50px; - .ant-modal-body { - min-height: 50vh; - max-height: calc(100vh - 190px); - padding-top: 10px; - .ant-tabs-nav-wrap { - text-align: center; - } - .color-sketch-block { - position: relative; - top: 5px; - width: 240px; - } - .color-add { - float: right; - margin-bottom: 10px; - position: relative; - z-index: 1; - } - } +.menu-chart-edit-box { + .color-sketch-block { + position: relative; + top: 5px; + width: 240px; + } + .color-add { + float: right; + margin-bottom: 10px; + position: relative; + z-index: 1; } } diff --git a/src/menu/components/chart/antv-scatter/chartcompile/index.jsx b/src/menu/components/chart/antv-scatter/chartcompile/index.jsx index 5a82c37..d618b15 100644 --- a/src/menu/components/chart/antv-scatter/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-scatter/chartcompile/index.jsx @@ -228,6 +228,7 @@ } render() { + const { config } = this.props const { view, visible, baseFormlist } = this.state const formItemLayout = { labelCol: { @@ -244,8 +245,7 @@ <div className="line-chart-drawer-form"> <EditOutlined title="缂栬緫" onClick={this.showDrawer} /> <Modal - wrapClassName="popview-modal menu-chart-edit-modal" - title="鏁g偣鍥剧紪杈�" + wrapClassName="mk-pop-modal" visible={visible} width={850} maskClosable={false} @@ -253,6 +253,7 @@ onCancel={() => { this.setState({ visible: false }) }} destroyOnClose > + {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} className="menu-chart-edit-box" onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> diff --git a/src/menu/components/chart/antv-scatter/chartcompile/index.scss b/src/menu/components/chart/antv-scatter/chartcompile/index.scss index 5b873a2..5518e39 100644 --- a/src/menu/components/chart/antv-scatter/chartcompile/index.scss +++ b/src/menu/components/chart/antv-scatter/chartcompile/index.scss @@ -4,30 +4,16 @@ color: #1890ff; } } -.menu-chart-edit-modal { - .ant-modal { - top: 50px; - .ant-modal-body { - max-height: calc(100vh - 190px); - min-height: 50vh; - padding-top: 10px; - .menu-chart-edit-box { - .ant-tabs-nav-wrap { - text-align: center; - } - .color-sketch-block { - position: relative; - top: 5px; - width: 240px; - } - .color-add { - float: right; - margin-bottom: 10px; - position: relative; - z-index: 1; - } - } - } +.menu-chart-edit-box { + .color-sketch-block { + position: relative; + top: 5px; + width: 240px; + } + .color-add { + float: right; + margin-bottom: 10px; + position: relative; + z-index: 1; } } - diff --git a/src/menu/components/chart/chart-custom/chartcompile/index.jsx b/src/menu/components/chart/chart-custom/chartcompile/index.jsx index 1ac9de4..2f0871c 100644 --- a/src/menu/components/chart/chart-custom/chartcompile/index.jsx +++ b/src/menu/components/chart/chart-custom/chartcompile/index.jsx @@ -6,7 +6,7 @@ import { getBaseForm } from './formconfig' import asyncComponent from '@/utils/asyncComponent' -import './index.scss' +// import './index.scss' const { TabPane } = Tabs const NormalForm = asyncComponent(() => import('@/menu/components/share/normalform')) @@ -87,14 +87,14 @@ } render() { + const { config } = this.props const { view, visible, baseFormlist, plot } = this.state return ( <> <EditOutlined style={{color: '#1890ff'}} title="缂栬緫" onClick={this.showDrawer} /> <Modal - wrapClassName="popview-modal custom-chart-edit-modal" - title="鑷畾涔夊浘琛ㄧ紪杈�" + wrapClassName="mk-pop-modal" visible={visible} width={950} maskClosable={false} @@ -102,6 +102,7 @@ onCancel={() => { this.setState({ visible: false }) }} destroyOnClose > + {config.name ? <div className="mk-com-name">{config.name} - 缂栬緫</div> : null} <Tabs activeKey={view} onChange={this.changeTab}> <TabPane tab="缁勪欢璁剧疆" key="base"> <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/> diff --git a/src/menu/components/chart/chart-custom/chartcompile/index.scss b/src/menu/components/chart/chart-custom/chartcompile/index.scss index 9e19200..e69de29 100644 --- a/src/menu/components/chart/chart-custom/chartcompile/index.scss +++ b/src/menu/components/chart/chart-custom/chartcompile/index.scss @@ -1,11 +0,0 @@ -.custom-chart-edit-modal { - .ant-modal { - top: 50px; - .ant-modal-body { - max-height: calc(100vh - 190px); - min-height: 50vh; - padding-top: 10px; - } - } -} - diff --git a/src/menu/components/form/formaction/index.jsx b/src/menu/components/form/formaction/index.jsx index 10b6797..b5ac2d0 100644 --- a/src/menu/components/form/formaction/index.jsx +++ b/src/menu/components/form/formaction/index.jsx @@ -249,8 +249,7 @@ </Modal> {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */} <Modal - wrapClassName="model-table-action-verify-modal" - title={'楠岃瘉淇℃伅'} + wrapClassName="mk-pop-modal" visible={profVisible} width={'90vw'} maskClosable={false} diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx index f64746e..937d2f3 100644 --- a/src/menu/components/share/actioncomponent/index.jsx +++ b/src/menu/components/share/actioncomponent/index.jsx @@ -549,8 +549,7 @@ </Modal> {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */} <Modal - wrapClassName="model-table-action-verify-modal" - title={(card && card.label ? card.label + ' - ' : '') + '楠岃瘉淇℃伅'} + wrapClassName="mk-pop-modal" visible={profVisible} width={'90vw'} maskClosable={false} diff --git a/src/menu/components/share/actioncomponent/index.scss b/src/menu/components/share/actioncomponent/index.scss index 370fdee..4224780 100644 --- a/src/menu/components/share/actioncomponent/index.scss +++ b/src/menu/components/share/actioncomponent/index.scss @@ -50,33 +50,4 @@ background-color: #cccccc; } } -} - -.model-table-action-verify-modal { - .ant-modal { - top: 50px; - padding-bottom: 5px; - .ant-modal-body { - max-height: calc(100vh - 190px); - min-height: calc(100vh - 300px); - overflow-y: auto; - .ant-empty { - margin: 5vh 8px; - } - } - .ant-modal-body::-webkit-scrollbar { - width: 7px; - } - .ant-modal-body::-webkit-scrollbar-thumb { - border-radius: 5px; - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); - background: rgba(0, 0, 0, 0.13); - } - .ant-modal-body::-webkit-scrollbar-track { - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - border-radius: 3px; - border: 1px solid rgba(0, 0, 0, 0.07); - background: rgba(0, 0, 0, 0); - } - } } \ No newline at end of file diff --git a/src/menu/components/table/base-table/index.jsx b/src/menu/components/table/base-table/index.jsx index 480a7db..948f5e5 100644 --- a/src/menu/components/table/base-table/index.jsx +++ b/src/menu/components/table/base-table/index.jsx @@ -21,7 +21,6 @@ const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent')) const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) -// const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent')) const ColumnComponent = asyncComponent(() => import('./columns')) class TableCardEditComponent extends Component { @@ -32,14 +31,12 @@ } state = { - appType: sessionStorage.getItem('appType'), card: null, back: false } UNSAFE_componentWillMount () { const { card } = this.props - const { appType } = this.state if (card.isNew) { let _card = { @@ -124,17 +121,9 @@ } } - if (appType === 'mob') { - _card.search = [] - _card.action = _card.action.filter(a => !a.origin) - } - this.updateComponent(_card) } else { let _card = fromJS(card).toJS() - if (appType === 'mob') { - _card.search = [] - } this.setState({ card: _card @@ -144,7 +133,6 @@ componentDidMount () { MKEmitter.addListener('submitModal', this.handleSave) - // MKEmitter.addListener('logButton', this.logButton) MKEmitter.addListener('completeSave', this.completeSave) } @@ -160,7 +148,6 @@ return } MKEmitter.removeListener('submitModal', this.handleSave) - // MKEmitter.removeListener('logButton', this.logButton) MKEmitter.removeListener('completeSave', this.completeSave) } @@ -298,17 +285,6 @@ this.props.updateConfig(_card) } - // logButton = (id, item) => { - // const { card } = this.state - - // if (id !== card.uuid) return - - // let btnlog = card.btnlog || [] - // btnlog.push(item) - - // this.updateComponent({...card, btnlog}) - // } - changeStyle = () => { const { card } = this.state @@ -385,13 +361,13 @@ } setSubConfig = (item) => { - const { card, appType } = this.state + const { card } = this.state let btn = fromJS(item).toJS() if (btn.OpenType === 'pop' || btn.execMode === 'pop') { if (!btn.modal) { btn.modal = { - setting: { title: btn.label, width: appType === 'mob' ? 100 : 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' }, + setting: { title: btn.label, width: 60, cols: '2', container: 'view', focus: '', finish: 'close', clickouter: 'unclose', display: 'modal' }, tables: [], groups: [], fields: [] @@ -499,13 +475,9 @@ } render() { - const { card, appType } = this.state + const { card } = this.state let options = ['action', 'search', 'form', 'cols'] let _style = resetStyle(card.style) - - if (appType === 'mob') { - options = ['action', 'cols'] - } return ( <div className="menu-normal-table-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}> @@ -513,7 +485,7 @@ <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> <PlusOutlined className="plus" title="娣诲姞鍒�" onClick={this.addColumns}/> - {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> : null} + <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> <PlusSquareOutlined className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton}/> <NormalForm title="琛ㄦ牸璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx index 870e23a..50c3486 100644 --- a/src/menu/components/table/edit-table/columns/index.jsx +++ b/src/menu/components/table/edit-table/columns/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' -import { Table, Popover, Modal, message, Button } from 'antd' +import { Table, Popover, Modal, message, Button, Typography } from 'antd' import { PlusOutlined, FileSyncOutlined, EditOutlined, CopyOutlined, DeleteOutlined, FontColorsOutlined, CloseCircleOutlined, AntDesignOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' @@ -14,6 +14,7 @@ import './index.scss' const { confirm } = Modal +const { Paragraph } = Typography const EditColumn = asyncComponent(() => import('./editColumn')) const TableVerify = asyncComponent(() => import('./tableIn')) const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent')) @@ -157,9 +158,9 @@ } return ( <td style={{...style, minWidth: column.Width || 100}} className={className}> - {val} - {column.Hide === 'true' ? <CloseCircleOutlined style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}}/> : null} + {column.field ? <Paragraph className="col-copy" copyable={{ text: column.field }}>{val}</Paragraph> : val} {column.marks && column.marks.length ? <AntDesignOutlined className="profile"/> : null} + {column.Hide === 'true' ? <CloseCircleOutlined className="close-col"/> : null} </td> ) } else { diff --git a/src/menu/components/table/edit-table/columns/index.scss b/src/menu/components/table/edit-table/columns/index.scss index de150a6..6ca33c7 100644 --- a/src/menu/components/table/edit-table/columns/index.scss +++ b/src/menu/components/table/edit-table/columns/index.scss @@ -24,6 +24,24 @@ tr { td { background: #ffffff; + .col-copy { + margin-bottom: 0; + display: inline-block; + .ant-typography-copy { + position: absolute; + left: 2px; + top: 0px; + margin-left: 0px; + font-size: 12px; + opacity: 0; + transition: opacity 0.2s; + } + } + } + td:hover .col-copy { + .ant-typography-copy { + opacity: 1; + } } td:not(.ant-table-selection-column) { position: relative; @@ -35,6 +53,16 @@ color: purple; font-size: 12px; } + >.close-col { + position: absolute; + top: 2px; + right: 2px; + color: orange; + font-size: 12px; + } + >.profile + .close-col { + right: 20px; + } } } .action-column { diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index e4c9a64..4240b49 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { DndProvider, DragSource, DropTarget } from 'react-dnd' -import { Table, Popover, Modal, message } from 'antd' +import { Table, Popover, Modal, message, Typography } from 'antd' import { PlusOutlined, FileSyncOutlined, EditOutlined, CopyOutlined, DeleteOutlined, FontColorsOutlined, CloseCircleOutlined, AntDesignOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' @@ -14,6 +14,7 @@ import './index.scss' const { confirm } = Modal +const { Paragraph } = Typography const EditColumn = asyncIconComponent(() => import('./editColumn')) const MarkColumn = asyncIconComponent(() => import('@/menu/components/share/markcomponent')) const CardCellComponent = asyncComponent(() => import('@/menu/components/card/cardcellcomponent')) @@ -173,9 +174,9 @@ } return ( <td style={{...style, minWidth: column.Width || 100}} className={className}> - {val} - {column.Hide === 'true' ? <CloseCircleOutlined style={{marginLeft: '5px', color: 'orange', fontSize: '12px'}}/> : null} + {column.field ? <Paragraph className="col-copy" copyable={{ text: column.field }}>{val}</Paragraph> : val} {column.marks && column.marks.length ? <AntDesignOutlined className="profile"/> : null} + {column.Hide === 'true' ? <CloseCircleOutlined className="close-col"/> : null} </td> ) } else { diff --git a/src/menu/components/table/normal-table/columns/index.scss b/src/menu/components/table/normal-table/columns/index.scss index 3d4835c..db07412 100644 --- a/src/menu/components/table/normal-table/columns/index.scss +++ b/src/menu/components/table/normal-table/columns/index.scss @@ -15,6 +15,24 @@ tr { td { background: #ffffff; + .col-copy { + margin-bottom: 0; + display: inline-block; + .ant-typography-copy { + position: absolute; + left: 2px; + top: 0px; + margin-left: 0px; + font-size: 12px; + opacity: 0; + transition: opacity 0.2s; + } + } + } + td:hover .col-copy { + .ant-typography-copy { + opacity: 1; + } } td:not(.ant-table-selection-column) { position: relative; @@ -26,6 +44,16 @@ color: purple; font-size: 12px; } + >.close-col { + position: absolute; + top: 2px; + right: 2px; + color: orange; + font-size: 12px; + } + >.profile + .close-col { + right: 20px; + } } } .action-column { diff --git a/src/menu/datasource/index.jsx b/src/menu/datasource/index.jsx index fe889ab..eb4f54b 100644 --- a/src/menu/datasource/index.jsx +++ b/src/menu/datasource/index.jsx @@ -206,8 +206,8 @@ <div className="model-datasource"> <SettingOutlined title="鏁版嵁婧�" onClick={() => this.editDataSource()} /> <Modal - wrapClassName="popview-modal" - title="鏁版嵁婧愰厤缃�" + wrapClassName="mk-pop-modal" + title="" visible={visible} width={'75vw'} maskClosable={false} diff --git a/src/menu/datasource/verifycard/columnform/index.jsx b/src/menu/datasource/verifycard/columnform/index.jsx index c378989..b8c3ba5 100644 --- a/src/menu/datasource/verifycard/columnform/index.jsx +++ b/src/menu/datasource/verifycard/columnform/index.jsx @@ -89,6 +89,7 @@ <Select.Option value="Nvarchar(20)"> Nvarchar(20) </Select.Option> <Select.Option value="Nvarchar(50)"> Nvarchar(50) </Select.Option> <Select.Option value="Nvarchar(100)"> Nvarchar(100) </Select.Option> + <Select.Option value="Nvarchar(256)"> Nvarchar(256) </Select.Option> <Select.Option value="Nvarchar(512)"> Nvarchar(512) </Select.Option> <Select.Option value="Nvarchar(1024)"> Nvarchar(1024) </Select.Option> <Select.Option value="Nvarchar(2048)"> Nvarchar(2048) </Select.Option> diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index df624b3..74152b1 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/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} diff --git a/src/menu/datasource/verifycard/index.scss b/src/menu/datasource/verifycard/index.scss index adf5445..8615405 100644 --- a/src/menu/datasource/verifycard/index.scss +++ b/src/menu/datasource/verifycard/index.scss @@ -1,12 +1,9 @@ -#model-data-source-wrap { +.model-data-source-wrap { .ant-spin { position: absolute; left: calc(50% - 16px); top: 220px; z-index: 1; - } - .ant-tabs-tabpane { - position: relative; } .data-source-card-box { .ant-tabs-nav-scroll { @@ -18,9 +15,6 @@ color: #1890ff; font-size: 12px; } - .ant-tabs-content { - min-height: 40vh; - } table tr td { word-wrap: break-word; word-break: break-word; @@ -28,7 +22,7 @@ .quickly-add { position: absolute; width: 100px; - right: 10px; + right: 24px; top: 5px; z-index: 2; } @@ -83,10 +77,11 @@ } .full-scripts { position: absolute; - right: 0px; - top: -40px; - font-size: 18px; + right: 24px; + top: 0px; + font-size: 16px; color: #1890ff; + z-index: 1; } } .model-custom-view-scripts-modal { diff --git a/src/menu/stylecontroller/index.jsx b/src/menu/stylecontroller/index.jsx index b2bb476..8d96cee 100644 --- a/src/menu/stylecontroller/index.jsx +++ b/src/menu/stylecontroller/index.jsx @@ -35,6 +35,7 @@ import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' import StyleInput from './styleInput' +import MainLogo from '@/assets/img/main-logo.png' import './index.scss' const { Panel } = Collapse @@ -458,7 +459,7 @@ <Drawer title={ <div className="header-logo"> - <img src={window.GLOB.mainlogo} alt=""/> + <img src={MainLogo} alt=""/> </div> } placement="left" diff --git a/src/mob/components/formdragelement/card.jsx b/src/mob/components/formdragelement/card.jsx index 2fc4c8f..020a096 100644 --- a/src/mob/components/formdragelement/card.jsx +++ b/src/mob/components/formdragelement/card.jsx @@ -78,7 +78,7 @@ if (card.type === 'text' || card.type === 'linkMain') { formItem = (<div className={'am-list-item input ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>{card.placeholder || <span style={{color: 'transparent'}}>input</span>}</span> }</div>{card.scan && card.scan !== 'false' ? <div className="am-list-extra"><ScanOutlined /></div> : null}</div></div>) } else if (card.type === 'number') { - formItem = (<div className={'am-list-item input ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval ? card.initval : <span style={{color: '#bcbcbc'}}><span style={{color: 'transparent'}}>input</span></span> }</div>{card.placeholder ? <div className="am-list-extra" style={{color: '#999999', width: 'auto', lineHeight: 1.5}}>{card.placeholder}</div> : null}</div></div>) + formItem = (<div className={'am-list-item input ' + (card.place || '')}><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval || 0}</div>{card.placeholder ? <div className="am-list-extra" style={{color: '#999999', width: 'auto', lineHeight: 1.5, height: '22px'}}>{card.placeholder}</div> : null}</div></div>) } else if (card.type === 'number') { formItem = (<div className="am-list-item input"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className={'am-input-control ' + card.cursor}>{card.initval || <span style={{color: 'transparent'}}>input</span>}</div></div></div>) } else if (card.type === 'select' || card.type === 'link' || card.type === 'cascader') { diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index bcd4b5e..5f7c2a3 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -338,8 +338,21 @@ } else { val = <span>{card.prefix || ''}{val}{card.postfix || ''}</span> } + if (card.copyable === 'true') { - val = <Paragraph copyable={{ text: orival }}>{val}</Paragraph> + if (card.link || (card.anchors && card.anchors.length > 0)) { + let url = orival + + if (card.link === 'static') { + url = card.linkurl + } else if (card.link === 'dynamic') { + url = data[card.linkurl] + } + + val = <span>{val}<Paragraph style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()} copyable={{ text: url }}></Paragraph></span> + } else { + val = <Paragraph copyable={{ text: orival }}>{val}</Paragraph> + } } } diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index d2bfa95..ba05bff 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -38,6 +38,7 @@ formdata: null, selines: null, btnconfig: null, + confirmLoading: false, loading: false, disabled: false, hidden: false, @@ -1347,7 +1348,7 @@ */ execSuccess = (res) => { const { btn } = this.props - const { autoMatic } = this.state + const { autoMatic, btnconfig } = this.state if ((res.ErrCode === 'S' || !res.ErrCode) || autoMatic) { // 鎵ц鎴愬姛 notification.success({ @@ -1363,8 +1364,15 @@ } + if (autoMatic || !btnconfig || btnconfig.setting.finish !== 'unclose') { + this.setState({ + visible: false + }) + } + this.setState({ - loading: false + loading: false, + confirmLoading: false }) if (autoMatic) { @@ -1409,7 +1417,8 @@ } this.setState({ - loading: false + loading: false, + confirmLoading: false }) if (autoMatic) { @@ -1529,16 +1538,10 @@ * @description 妯℃�佹锛堣〃鍗曪級锛岀‘璁� */ handleOk = () => { - const { btnconfig, autoMatic } = this.state - if (!this.formRef) return this.formRef.handleConfirm().then(res => { - if (btnconfig.setting.finish !== 'unclose' || autoMatic) { - this.setState({ - visible: false - }) - } + this.setState({ confirmLoading: true }) this.triggerPrint(this.state.selines, res) }) } @@ -1549,7 +1552,8 @@ handleCancel = () => { this.setState({ loading: false, - visible: false + visible: false, + confirmLoading: false }) } @@ -1679,6 +1683,7 @@ getContainer={container} wrapClassName='action-modal' visible={this.state.visible} + confirmLoading={this.state.confirmLoading} width={width} onOk={this.handleOk} onCancel={this.handleCancel} diff --git a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx index 68e1a62..47a1840 100644 --- a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx +++ b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx @@ -49,7 +49,18 @@ handleChange = (val) => { this.setState({value: val}) - this.props.onChange(val) + + let _val = val + + if (typeof(_val) !== 'number') { + _val = parseFloat(_val) + + if (isNaN(_val)) { + _val = '' + } + } + + this.props.onChange(_val) } handleSubmit = () => { diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx index c01acf3..ec2efcb 100644 --- a/src/templates/formtabconfig/index.jsx +++ b/src/templates/formtabconfig/index.jsx @@ -1699,8 +1699,7 @@ </Modal> {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */} <Modal - wrapClassName="common-table-fields-modal" - title={'楠岃瘉淇℃伅'} + wrapClassName="mk-pop-modal" visible={this.state.profileVisible} width={'90vw'} maskClosable={false} diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx index d520cdf..026695c 100644 --- a/src/templates/sharecomponent/actioncomponent/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/index.jsx @@ -951,8 +951,7 @@ </Modal> {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */} <Modal - wrapClassName="model-table-action-verify-modal" - title={(card && card.label ? card.label + ' - ' : '') + '楠岃瘉淇℃伅'} + wrapClassName="mk-pop-modal" visible={profVisible} width={'90vw'} maskClosable={false} diff --git a/src/templates/sharecomponent/actioncomponent/index.scss b/src/templates/sharecomponent/actioncomponent/index.scss index 4404955..ed09980 100644 --- a/src/templates/sharecomponent/actioncomponent/index.scss +++ b/src/templates/sharecomponent/actioncomponent/index.scss @@ -44,32 +44,4 @@ top: 60px; padding-bottom: 5px; } -} -.model-table-action-verify-modal { - .ant-modal { - top: 50px; - padding-bottom: 5px; - .ant-modal-body { - max-height: calc(100vh - 190px); - min-height: calc(100vh - 300px); - overflow-y: auto; - .ant-empty { - margin: 5vh 8px; - } - } - .ant-modal-body::-webkit-scrollbar { - width: 7px; - } - .ant-modal-body::-webkit-scrollbar-thumb { - border-radius: 5px; - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); - background: rgba(0, 0, 0, 0.13); - } - .ant-modal-body::-webkit-scrollbar-track { - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - border-radius: 3px; - border: 1px solid rgba(0, 0, 0, 0.07); - background: rgba(0, 0, 0, 0); - } - } } \ No newline at end of file diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 5dc137d..5d026be 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -541,11 +541,12 @@ } handleEdit = (record, type) => { + let node = null + if (type === 'scripts') { this.scriptsForm.edit(record) + node = document.getElementById('mk-exin-script') } - - let node = document.getElementById('verify-excel-box-tab').parentNode if (node && node.scrollTop) { let inter = Math.ceil(node.scrollTop / 10) @@ -736,7 +737,8 @@ } return ( - <div id="verify-excel-box-tab"> + <div> + {card.label ? <div className="mk-com-name">{card.label} - 楠岃瘉淇℃伅</div> : null} <Tabs activeKey={activeKey} className="excelin-verify-card-box" onChange={this.tabchange}> <TabPane tab="鍩虹楠岃瘉" key="basemsg"> <Form {...formItemLayout}> @@ -807,7 +809,7 @@ 鑷畾涔夎剼鏈� {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null} </span> - } key="scripts"> + } key="scripts" id="mk-exin-script"> <CustomScript btn={this.props.card} usefulfields={verify.columns} diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index a1587be..62d925c 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -331,11 +331,13 @@ } handleEdit = (record, type) => { + let node = null + if (type === 'scripts') { this.scriptsForm.edit(record) + node = document.getElementById('mk-exout-script') } - let node = document.getElementById('verify-excelout-box-tab').parentNode if (node && node.scrollTop) { let inter = Math.ceil(node.scrollTop / 10) @@ -941,7 +943,8 @@ } return ( - <div id="verify-excelout-box-tab"> + <div className="verify-excelout-box-tab"> + {card.label ? <div className="mk-com-name">{card.label} - 楠岃瘉淇℃伅</div> : null} {loading && <Spin size="large" />} <Tabs activeKey={activeKey} className="excelout-verify-card-box" onChange={this.tabchange}> {card.intertype === 'system' ? <TabPane tab="鍩虹楠岃瘉" key="setting"> @@ -968,7 +971,7 @@ 鑷畾涔夎剼鏈� {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null} </span> - } key="scripts" disabled={verify.dataType !== 'custom'}> + } key="scripts" disabled={verify.dataType !== 'custom'} id="mk-exout-script"> <CustomScript btn={card} sheet={verify.tableName} diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss index 7aa247d..7964dfe 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.scss @@ -66,7 +66,7 @@ cursor: pointer; } } -#verify-excelout-box-tab { +.verify-excelout-box-tab { >.ant-spin { position: absolute; top: calc(50% - 16px); diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx index 6dc199d..9a08c00 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx @@ -234,8 +234,8 @@ } render() { + const { card } = this.props const { getFieldDecorator } = this.props.form - const { verify, linkType, printMode, printFunc } = this.state const formItemLayout = { labelCol: { @@ -249,7 +249,8 @@ } return ( - <div id="verify-card-box-tab"> + <div> + {card.label ? <div className="mk-com-name">{card.label} - 楠岃瘉淇℃伅</div> : null} <Tabs defaultActiveKey="1" className="verify-card-print-box" onChange={this.tabchange}> <TabPane tab="鎵撳嵃楠岃瘉" key="1"> <Form {...formItemLayout}> diff --git a/src/templates/sharecomponent/searchcomponent/settingform/index.jsx b/src/templates/sharecomponent/searchcomponent/settingform/index.jsx index e4e8adf..584dfb4 100644 --- a/src/templates/sharecomponent/searchcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/settingform/index.jsx @@ -53,97 +53,95 @@ } return ( - <div className="model-table-datasource-setting-form-box"> - <Form {...formItemLayout} className="model-setting-form"> - <Row gutter={24}> - <Col span={12}> - <Form.Item label="鎼滅储鎸夐挳"> - {getFieldDecorator('show', { - initialValue: setting.show || 'true' - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="楂樼骇鎼滅储鐨勫睍寮�鏂瑰紡銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 楂樼骇鎼滅储 - </Tooltip> - }> - {getFieldDecorator('advanceType', { - initialValue: setting.advanceType || 'modal' - })( - <Radio.Group onChange={(e) => this.setState({advanceType: e.target.value})}> - <Radio value="modal">寮圭獥</Radio> - <Radio value="drawer">鎶藉眽</Radio> - <Radio value="pulldown">涓嬫媺</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - {advanceType === 'drawer' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鎶藉眽灞曞紑鐨勬柟鍚戙��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鎶藉眽鏂瑰悜 - </Tooltip> - }> - {getFieldDecorator('drawerPlacement', { - initialValue: setting.drawerPlacement || 'right' - })( - <Radio.Group style={{whiteSpace: 'nowrap'}}> - <Radio value="right">鍙充晶</Radio> - <Radio value="left">宸︿晶</Radio> - <Radio value="top">涓婁晶</Radio> - <Radio value="bottom">涓嬩晶</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {advanceType !== 'pulldown' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="楂樼骇鎼滅储妗嗙殑瀹藉害锛屾敞锛氬綋瀹藉害鍊煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺�傚綋浣跨敤涓婁笅鏄剧ず鐨勬娊灞夋椂浠h〃鎶藉眽楂樺害銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 寮圭獥瀹藉害 - </Tooltip> - }> - {getFieldDecorator('advanceWidth', { - initialValue: setting.advanceWidth || 1000 - })(<InputNumber min={10} max={3000} precision={0} onPressEnter={this.props.inputSubmit}/>)} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鎼滅储鍙婇噸缃寜閽墍鍗犳瘮渚嬨�傛爡鏍煎竷灞�锛屾瘡琛岀瓑鍒嗕负24鍒椼��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 姣斾緥 - </Tooltip> - }> - {getFieldDecorator('searchRatio', { - initialValue: setting.searchRatio || 6, - })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.props.inputSubmit}/>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鎼滅储鎸夐挳璺濆乏渚х殑鐧惧垎姣旓紝鍙傜収鎼滅储鏉′欢鐨勫悕绉板搴︺��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鎸夐挳鍋忕Щ - </Tooltip> - }> - {getFieldDecorator('searchLwidth', { - initialValue: setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3, - })(<InputNumber min={0} max={100} precision={1} onPressEnter={this.props.inputSubmit}/>)} - </Form.Item> - </Col> - </Row> - </Form> - </div> + <Form {...formItemLayout}> + <Row gutter={24}> + <Col span={12}> + <Form.Item label="鎼滅储鎸夐挳"> + {getFieldDecorator('show', { + initialValue: setting.show || 'true' + })( + <Radio.Group> + <Radio value="true">鏄剧ず</Radio> + <Radio value="false">闅愯棌</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="楂樼骇鎼滅储鐨勫睍寮�鏂瑰紡銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 楂樼骇鎼滅储 + </Tooltip> + }> + {getFieldDecorator('advanceType', { + initialValue: setting.advanceType || 'modal' + })( + <Radio.Group onChange={(e) => this.setState({advanceType: e.target.value})}> + <Radio value="modal">寮圭獥</Radio> + <Radio value="drawer">鎶藉眽</Radio> + <Radio value="pulldown">涓嬫媺</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + {advanceType === 'drawer' ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鎶藉眽灞曞紑鐨勬柟鍚戙��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎶藉眽鏂瑰悜 + </Tooltip> + }> + {getFieldDecorator('drawerPlacement', { + initialValue: setting.drawerPlacement || 'right' + })( + <Radio.Group style={{whiteSpace: 'nowrap'}}> + <Radio value="right">鍙充晶</Radio> + <Radio value="left">宸︿晶</Radio> + <Radio value="top">涓婁晶</Radio> + <Radio value="bottom">涓嬩晶</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {advanceType !== 'pulldown' ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="楂樼骇鎼滅储妗嗙殑瀹藉害锛屾敞锛氬綋瀹藉害鍊煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺�傚綋浣跨敤涓婁笅鏄剧ず鐨勬娊灞夋椂浠h〃鎶藉眽楂樺害銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 寮圭獥瀹藉害 + </Tooltip> + }> + {getFieldDecorator('advanceWidth', { + initialValue: setting.advanceWidth || 1000 + })(<InputNumber min={10} max={3000} precision={0} onPressEnter={this.props.inputSubmit}/>)} + </Form.Item> + </Col> : null} + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鎼滅储鍙婇噸缃寜閽墍鍗犳瘮渚嬨�傛爡鏍煎竷灞�锛屾瘡琛岀瓑鍒嗕负24鍒椼��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 姣斾緥 + </Tooltip> + }> + {getFieldDecorator('searchRatio', { + initialValue: setting.searchRatio || 6, + })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.props.inputSubmit}/>)} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鎼滅储鎸夐挳璺濆乏渚х殑鐧惧垎姣旓紝鍙傜収鎼滅储鏉′欢鐨勫悕绉板搴︺��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎸夐挳鍋忕Щ + </Tooltip> + }> + {getFieldDecorator('searchLwidth', { + initialValue: setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3, + })(<InputNumber min={0} max={100} precision={1} onPressEnter={this.props.inputSubmit}/>)} + </Form.Item> + </Col> + </Row> + </Form> ) } } diff --git a/src/templates/sharecomponent/settingcalcomponent/index.jsx b/src/templates/sharecomponent/settingcalcomponent/index.jsx index 0c7b0d2..1d9addf 100644 --- a/src/templates/sharecomponent/settingcalcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/index.jsx @@ -83,8 +83,7 @@ <div className="model-datasource"> <SettingOutlined onClick={() => this.editDataSource()} /> <Modal - wrapClassName="popview-modal" - title="鏁版嵁婧愰厤缃�" + wrapClassName="mk-pop-modal" visible={visible} width={'75vw'} maskClosable={false} diff --git a/src/templates/sharecomponent/settingcalcomponent/index.scss b/src/templates/sharecomponent/settingcalcomponent/index.scss index 2e3378c..fdc03f8 100644 --- a/src/templates/sharecomponent/settingcalcomponent/index.scss +++ b/src/templates/sharecomponent/settingcalcomponent/index.scss @@ -8,79 +8,4 @@ font-size: 18px; padding: 10px; } - - .model-input-group-wrapper { - padding: 0 20px; - display: inline-block; - width: 100%; - text-align: start; - vertical-align: top; - margin-bottom: 15px; - - .model-input-wrapper { - position: relative; - display: table; - width: 100%; - border-collapse: separate; - border-spacing: 0; - - .model-input-value { - display: table-cell; - width: 100%; - border: 1px solid #d9d9d9; - border-radius: 4px 0px 0px 4px; - overflow: hidden; - text-overflow:ellipsis; - white-space: nowrap; - padding: 2px 10px; - color: #ffffff; - } - - .model-input-group-addon { - display: table-cell; - width: 1px; - position: relative; - padding: 0 11px; - color: rgba(0, 0, 0, 0.65); - font-weight: normal; - font-size: 14px; - line-height: 1; - text-align: center; - background-color: #fafafa; - border: 1px solid #d9d9d9; - border-radius: 0px 4px 4px 0px; - white-space: nowrap; - } - - .model-input-insert { - display: table-cell; - width: 100%; - border: 1px dotted #d9d9d9; - border-radius: 4px; - text-align: center; - cursor: pointer; - - .anticon-plus { - padding: 6px; - font-size: 16px; - color: rgb(38, 194, 129); - } - } - } - .anticon-setting { - margin-right: 5px; - padding: 6px; - cursor: pointer; - } - .anticon-setting:hover { - color: #1890ff; - } - .anticon-close { - padding: 6px; - cursor: pointer; - } - .anticon-close:hover { - color: #ff4d4f; - } - } } diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx index 58a558c..6ff6f95 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/index.jsx @@ -119,21 +119,6 @@ handleEdit = (record) => { this.contrastForm.edit(record) - - let node = document.getElementById('model-setting-form-body').parentNode - - if (node && node.scrollTop) { - let inter = Math.ceil(node.scrollTop / 10) - - let timer = setInterval(() => { - if (node.scrollTop - inter > 0) { - node.scrollTop = node.scrollTop - inter - } else { - node.scrollTop = 0 - clearInterval(timer) - } - }, 10) - } } changeTab = (val) => { @@ -400,7 +385,7 @@ const { columns, setting, scripts, colColumns, activeKey, loading } = this.state return ( - <div className="model-verify-card-box-tab" id="model-setting-form-body"> + <div className="model-verify-card-box-tab"> {loading && <Spin size="large" />} <Tabs activeKey={activeKey} className="verify-card-box" onChange={this.changeTab}> <TabPane tab="鏁版嵁婧�" key="setting"> @@ -438,7 +423,7 @@ 鑷畾涔夎剼鏈� {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} diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx index f047810..aa58249 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.jsx @@ -8,7 +8,7 @@ import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import CodeMirror from '@/templates/zshare/codemirror' -import './index.scss' +// import './index.scss' const { TextArea } = Input @@ -176,160 +176,146 @@ } return ( - <div className="model-datasource-setting-form-box"> - <Form {...formItemLayout} className="model-setting-form"> - <Row gutter={24}> - <Col span={8}> - <Form.Item label="琛ㄥ悕"> - {getFieldDecorator('tableName', { - initialValue: setting.tableName, - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + '琛ㄥ悕!' - }, - { - max: 50, - message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' - } - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> - <Col span={8}> - <Form.Item label="鎺ュ彛绫诲瀷"> - {getFieldDecorator('interType', { - initialValue: interType, - rules: [ - { - required: true, - message: this.props.dict['form.required.select'] + '鎺ュ彛绫诲瀷!' - }, - ] - })( - <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}> - <Radio value="system">绯荤粺</Radio> - <Radio value="inner">鍐呴儴</Radio> - <Radio value="outer">澶栭儴</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - {interType === 'inner' ? <Col span={8}> - <Form.Item label={tooltip ? - <Tooltip placement="topLeft" title={tooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鍐呴儴鍑芥暟 - </Tooltip> : '鍐呴儴鍑芥暟' - }> - {getFieldDecorator('innerFunc', { - initialValue: setting.innerFunc || '', - rules: rules - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> : null} - {interType === 'outer' ? <Col span={8}> - <Form.Item label="澶栭儴鍑芥暟"> - {getFieldDecorator('outerFunc', { - initialValue: setting.outerFunc || '', - rules: [ + <Form {...formItemLayout}> + <Row gutter={24}> + <Col span={8}> + <Form.Item label="琛ㄥ悕"> + {getFieldDecorator('tableName', { + initialValue: setting.tableName, + rules: [ + { + required: true, + message: this.props.dict['form.required.input'] + '琛ㄥ悕!' + }, + { + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' + } + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="鎺ュ彛绫诲瀷"> + {getFieldDecorator('interType', { + initialValue: interType, + rules: [ + { + required: true, + message: this.props.dict['form.required.select'] + '鎺ュ彛绫诲瀷!' + }, + ] + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}> + <Radio value="system">绯荤粺</Radio> + <Radio value="inner">鍐呴儴</Radio> + <Radio value="outer">澶栭儴</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + {interType === 'inner' ? <Col span={8}> + <Form.Item label={tooltip ? + <Tooltip placement="topLeft" title={tooltip}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍐呴儴鍑芥暟 + </Tooltip> : '鍐呴儴鍑芥暟' + }> + {getFieldDecorator('innerFunc', { + initialValue: setting.innerFunc || '', + rules: rules + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> : null} + {interType === 'outer' ? <Col span={8}> + <Form.Item label="澶栭儴鍑芥暟"> + {getFieldDecorator('outerFunc', { + initialValue: setting.outerFunc || '', + rules: [ - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> : null} - {interType === 'outer' ? <Col span={24} className="data-source"> - <Form.Item label="鎺ュ彛鍦板潃"> - {getFieldDecorator('interface', { - initialValue: setting.interface || '', - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + '鎺ュ彛鍦板潃!' - }, - ] - })(<TextArea rows={2}/>)} - </Form.Item> - </Col> : null} - {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}> - <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={ - <Tooltip placement="topLeft" title={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鏁版嵁婧� - </Tooltip> - }> - {getFieldDecorator('dataresource', { - initialValue: setting.dataresource || '' - })(<CodeMirror />)} - </Form.Item> - </Col> : null} - {interType === 'system' ? <Col span={8}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鏌ヨ鏃讹紝鎼滅储鏉′欢浠here鏉′欢鎷兼帴杩涘叆sql锛岀粺璁℃椂锛屽皢鏁版嵁婧愪腑浠モ�淍+鎼滅储瀛楁+@鈥濈殑鍐呭锛屼互鎼滅储鏉′欢涓殑鍊艰繘琛屾浛鎹㈠悗锛屾彁浜ゆ煡璇紝娉細鏌ヨ绫诲瀷浠呭湪浣跨敤绯荤粺鍑芥暟鏃舵湁鏁堛��'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鏌ヨ绫诲瀷 - </Tooltip> - }> - {getFieldDecorator('queryType', { - initialValue: setting.queryType || 'query' - })( - <Radio.Group> - <Radio value="query">鏌ヨ</Radio> - <Radio value="statistics">缁熻</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {/* <Col span={8}> - <Form.Item label="涓婚敭"> - {getFieldDecorator('primaryKey', { - initialValue: setting.primaryKey || '' - })( - <Select> - {columns.map((option, i) => - <Select.Option key={i} value={option.field}> - {option.label} - </Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> */} - {interType === 'system' ? <Col span={8}> - <Form.Item label="榛樿sql"> - {getFieldDecorator('execute', { - initialValue: setting.execute || 'true' - })( - <Radio.Group> - <Radio value="true">鎵ц</Radio> - <Radio value="false">涓嶆墽琛�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - <Col span={8}> - <Form.Item label="鍒濆鍖�"> - {getFieldDecorator('onload', { - initialValue: setting.onload || 'true' - })( - <Radio.Group> - <Radio value="true">鍔犺浇鏁版嵁</Radio> - <Radio value="false">涓嶅姞杞芥暟鎹�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - {/* <Col span={8}> - <Form.Item label={ - <Tooltip placement="topLeft" title="楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 楂樼骇鎼滅储 - </Tooltip> - }> - {getFieldDecorator('advanceWidth', { - initialValue: setting.advanceWidth || 1000 - })(<InputNumber min={10} max={3000} precision={0}/>)} - </Form.Item> - </Col> */} - </Row> - </Form> - </div> + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> : null} + {interType === 'outer' ? <Col span={24} className="mk-through-line3"> + <Form.Item label="鎺ュ彛鍦板潃"> + {getFieldDecorator('interface', { + initialValue: setting.interface || '', + rules: [ + { + required: true, + message: this.props.dict['form.required.input'] + '鎺ュ彛鍦板潃!' + }, + ] + })(<TextArea rows={2}/>)} + </Form.Item> + </Col> : null} + {interType === 'system' ? <Col span={24} className="mk-through-line3"> + <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 2 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 22 }} } label={ + <Tooltip placement="topLeft" title={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏁版嵁婧� + </Tooltip> + }> + {getFieldDecorator('dataresource', { + initialValue: setting.dataresource || '' + })(<CodeMirror />)} + </Form.Item> + </Col> : null} + {interType === 'system' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鏌ヨ鏃讹紝鎼滅储鏉′欢浠here鏉′欢鎷兼帴杩涘叆sql锛岀粺璁℃椂锛屽皢鏁版嵁婧愪腑浠モ�淍+鎼滅储瀛楁+@鈥濈殑鍐呭锛屼互鎼滅储鏉′欢涓殑鍊艰繘琛屾浛鎹㈠悗锛屾彁浜ゆ煡璇紝娉細鏌ヨ绫诲瀷浠呭湪浣跨敤绯荤粺鍑芥暟鏃舵湁鏁堛��'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏌ヨ绫诲瀷 + </Tooltip> + }> + {getFieldDecorator('queryType', { + initialValue: setting.queryType || 'query' + })( + <Radio.Group> + <Radio value="query">鏌ヨ</Radio> + <Radio value="statistics">缁熻</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {/* <Col span={8}> + <Form.Item label="涓婚敭"> + {getFieldDecorator('primaryKey', { + initialValue: setting.primaryKey || '' + })( + <Select> + {columns.map((option, i) => + <Select.Option key={i} value={option.field}> + {option.label} + </Select.Option> + )} + </Select> + )} + </Form.Item> + </Col> */} + {interType === 'system' ? <Col span={8}> + <Form.Item label="榛樿sql"> + {getFieldDecorator('execute', { + initialValue: setting.execute || 'true' + })( + <Radio.Group> + <Radio value="true">鎵ц</Radio> + <Radio value="false">涓嶆墽琛�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + <Col span={8}> + <Form.Item label="鍒濆鍖�"> + {getFieldDecorator('onload', { + initialValue: setting.onload || 'true' + })( + <Radio.Group> + <Radio value="true">鍔犺浇鏁版嵁</Radio> + <Radio value="false">涓嶅姞杞芥暟鎹�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + </Row> + </Form> ) } } diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.scss b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.scss index c7c4f3f..e69de29 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.scss +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/settingform/index.scss @@ -1,20 +0,0 @@ -.model-datasource-setting-form-box { - position: relative; - - .model-setting-form { - .data-source { - .ant-form-item-label { - width: 11%; - } - .ant-form-item-control-wrapper { - width: 89%; - } - .CodeMirror { - height: 150px; - } - } - } - .ant-radio-group { - white-space: nowrap; - } -} \ No newline at end of file diff --git a/src/templates/sharecomponent/settingcomponent/index.jsx b/src/templates/sharecomponent/settingcomponent/index.jsx index ca098d1..d2c3f5d 100644 --- a/src/templates/sharecomponent/settingcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/index.jsx @@ -12,7 +12,7 @@ import CreateFunc from '@/templates/zshare/createfunc' import CreateInterface from '@/templates/zshare/createinterface' -import './index.scss' +// import './index.scss' class SettingComponent extends Component { static propTpyes = { @@ -181,14 +181,13 @@ const { dict, visible, search, menu, record } = this.state return ( - <div className="model-menu-setting"> - <SettingOutlined onClick={this.changeSetting} /> + <> + <SettingOutlined style={{position: 'absolute', fontSize: '18px', right: '7px', top: '5px', padding: '10px', zIndex: 1}} onClick={this.changeSetting} /> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal - wrapClassName="model-table-setting-verify-modal" - title="鏁版嵁婧愰厤缃�" + wrapClassName="mk-pop-modal" visible={visible} - width={900} + width={'75vw'} maskClosable={false} onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false, loading: false })}} footer={[ @@ -208,7 +207,7 @@ wrappedComponentRef={(inst) => this.settingRef = inst} /> </Modal> - </div> + </> ) } } diff --git a/src/templates/sharecomponent/settingcomponent/index.scss b/src/templates/sharecomponent/settingcomponent/index.scss index 41b2501..8b13789 100644 --- a/src/templates/sharecomponent/settingcomponent/index.scss +++ b/src/templates/sharecomponent/settingcomponent/index.scss @@ -1,40 +1 @@ -.model-menu-setting { - > .anticon-setting { - position: absolute; - font-size: 18px; - right: 7px; - top: 5px; - padding: 10px; - z-index: 1; - } -} -.model-table-setting-verify-modal { - .ant-modal { - top: 50px; - padding-bottom: 5px; - .ant-modal-body { - max-height: calc(100vh - 190px); - min-height: 250px; - overflow-y: auto; - padding-top: 10px; - } - .ant-modal-body::-webkit-scrollbar { - width: 7px; - } - .ant-modal-body::-webkit-scrollbar-thumb { - border-radius: 5px; - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); - background: rgba(0, 0, 0, 0.13); - } - .ant-modal-body::-webkit-scrollbar-track { - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - border-radius: 3px; - border: 1px solid rgba(0, 0, 0, 0.07); - background: rgba(0, 0, 0, 0); - } - .ant-empty-normal { - margin: 5px 0px; - } - } -} \ No newline at end of file diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx index df973b7..e80b861 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx @@ -8,7 +8,7 @@ import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import asyncComponent from '@/utils/asyncComponent' -import './index.scss' +// import './index.scss' const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror')) const MKColor = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkColor')) @@ -218,618 +218,616 @@ } return ( - <div className="model-table-datasource-setting-form-box"> - <Form {...formItemLayout} className="model-setting-form"> - <Row gutter={24}> - <Col span={12}> - <Form.Item label="琛ㄥ悕"> - {getFieldDecorator('tableName', { - initialValue: setting.tableName || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '琛ㄥ悕!' - }, - { - max: 50, - message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' - } - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="琛ㄦ牸灞炴��"> - {getFieldDecorator('tableType', { - initialValue: setting.tableType - })( - <Radio.Group onChange={(e) => this.setState({tableType: e.target.value})}> - <Radio value="">涓嶅彲閫�</Radio> - <Radio value="radio">鍗曢��</Radio> - <Radio value="checkbox">澶氶��</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={dict['header.form.intertype']}> - {getFieldDecorator('interType', { - initialValue: interType, - rules: [ - { - required: true, - message: dict['form.required.select'] + dict['header.form.intertype'] + '!' - }, - ] - })( - <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.onRadioChange(e, 'interType')}}> - <Radio value="system">绯荤粺</Radio> - <Radio value="inner">鍐呴儴</Radio> - <Radio value="outer">澶栭儴</Radio> - <Radio value="custom">鑷畾涔�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - {interType === 'outer' ? <Col span={12}> - <Form.Item label={dict['header.form.sysInterface']}> - {getFieldDecorator('sysInterface', { - initialValue: sysInterface, - rules: [ - { - required: true, - message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!' - }, - ] - })( - <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'custom' ? <Col span={12}> - <Form.Item label="鍙傛暟澶勭悊"> - {getFieldDecorator('procMode', { - initialValue: procMode, - rules: [ - { - required: true, - message: dict['form.required.select'] + '鍙傛暟澶勭悊鏂瑰紡!' - }, - ] - })( - <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.onRadioChange(e, 'procMode')}}> - <Radio value="script">鍓嶇疆鑴氭湰</Radio> - <Radio value="inner">鍓嶇疆鍑芥暟</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'custom' && procMode === 'inner' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={funcTooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鍓嶇疆鍑芥暟 - </Tooltip> - }> - {getFieldDecorator('prevFunc', { - initialValue: setting.prevFunc || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '鍓嶇疆鍑芥暟!' - }, - { - max: formRule.func.max, - message: formRule.func.maxMessage - }, - ...funcRules - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> : null} - {interType === 'outer' || interType === 'custom' ? <Col className="data-source" span={24}> - <Form.Item label="鎺ュ彛鍦板潃"> - {getFieldDecorator('interface', { - initialValue: setting.interface || (interType === 'outer' && sysInterface === 'true' ? window.GLOB.mainSystemApi : ''), - rules: [ - { - required: interType === 'outer' && sysInterface === 'true' ? false : true, - message: dict['form.required.input'] + '鎺ュ彛鍦板潃!' - }, - ] - })(<TextArea rows={2} readOnly={interType === 'outer' && sysInterface === 'true'}/>)} - </Form.Item> - </Col> : null} - {(interType === 'outer' && sysInterface !== 'true') || interType === 'custom' ? <Col className="data-source" span={24}> - <Form.Item label={ - <Tooltip placement="topLeft" title="姝e紡绯荤粺鎵�浣跨敤鐨勭殑鎺ュ彛鍦板潃銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 姝e紡鍦板潃 - </Tooltip> - }> - {getFieldDecorator('proInterface', { - initialValue: setting.proInterface || '' - })(<TextArea rows={2} />)} - </Form.Item> - </Col> : null} - {interType === 'custom' ? <Col span={12}> - <Form.Item label="璇锋眰鏂瑰紡"> - {getFieldDecorator('method', { - initialValue: setting.method || 'post', - rules: [ - { - required: true, - message: dict['form.required.select'] + '璇锋眰鏂瑰紡!' - }, - ] - })( - <Radio.Group> - <Radio value="get">GET</Radio> - <Radio value="post">POST</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'custom' ? <Col span={12}> - <Form.Item label="鏁版嵁璇锋眰"> - {getFieldDecorator('requestMode', { - initialValue: requestMode, - rules: [ - { - required: true, - message: dict['form.required.select'] + '鏁版嵁璇锋眰鏂瑰紡!' - }, - ] - })( - <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.onRadioChange(e, 'requestMode')}}> - <Radio value="system">绯荤粺鍑芥暟</Radio> - <Radio value="inner">鍐呴儴鍑芥暟</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'inner' || (interType === 'custom' && requestMode === 'inner') ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={funcTooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鍐呴儴鍑芥暟 - </Tooltip> - }> - {getFieldDecorator('innerFunc', { - initialValue: setting.innerFunc || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '鍐呴儴鍑芥暟!' - }, - { - max: formRule.func.max, - message: formRule.func.maxMessage - }, - ...funcRules - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> : null} - {interType === 'outer' ? <Col span={12}> - <Form.Item label="澶栭儴鍑芥暟"> - {getFieldDecorator('outerFunc', { - initialValue: setting.outerFunc || '', - rules: [ - { - pattern: formRule.func.pattern, - message: formRule.func.message - }, { - max: formRule.func.max, - message: formRule.func.maxMessage - } - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> : null} - {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}> - <Form.Item help={'鏁版嵁ID锛�' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={ - <Tooltip placement="topLeft" title={`浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� ''銆� @$ -> */ 鎴� ''锛涙煡璇㈡浛鎹㈢ $select@ -> /* 鎴� ''銆� @select$ -> */ 鎴� ''锛涚粺璁℃浛鎹㈢ $sum@ -> /* 鎴� ''銆� @sum$ -> */ 鎴� ''銆俙}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鏁版嵁婧� - </Tooltip> - }> - {getFieldDecorator('dataresource', { - initialValue: setting.dataresource || '' - })(<CodeMirror />)} - </Form.Item> - </Col> : null} - {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鏌ヨ鏃讹紝鎼滅储鏉′欢浠here鏉′欢鎷兼帴杩涘叆sql锛岀粺璁℃椂锛屽皢鏁版嵁婧愪腑浠モ�淍+鎼滅储瀛楁+@鈥濈殑鍐呭锛屼互鎼滅储鏉′欢涓殑鍊艰繘琛屾浛鎹㈠悗锛屾彁浜ゆ煡璇紝娉細鏌ヨ绫诲瀷浠呭湪浣跨敤绯荤粺鍑芥暟鏃舵湁鏁堛��'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鏌ヨ绫诲瀷 - </Tooltip> - }> - {getFieldDecorator('queryType', { - initialValue: setting.queryType || 'query' - })( - <Radio.Group> - <Radio value="query">鏌ヨ</Radio> - <Radio value="statistics">缁熻</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={12}> - <Form.Item label="榛樿sql"> - {getFieldDecorator('default', { - initialValue: setting.default || 'true' - })( - <Radio.Group> - <Radio value="true">鎵ц</Radio> - <Radio value="false">涓嶆墽琛�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label="涓婚敭"> - {getFieldDecorator('primaryKey', { - initialValue: setting.primaryKey || '' - })( - <Select onChange={this.primaryKeyChange}> - <Select.Option key="empty" value="">鏈缃�</Select.Option> - {columns.map((option, i) => - <Select.Option key={i} value={option.value}> - {option.text} - </Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="榛樿鎺掑簭"> - {getFieldDecorator('order', { - initialValue: setting.order || 'ID desc', - rules: [ - { - required: true, - message: dict['form.required.input'] + '榛樿鎺掑簭!' - }, - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" />)} - </Form.Item> - </Col> - {interType === 'custom' ? <Col span={12}> - <Form.Item label="鍥炶皟鏂瑰紡"> - {getFieldDecorator('callbackType', { - initialValue: setting.callbackType || 'script' - })( - <Radio.Group onChange={(e) => {this.onRadioChange(e, 'callbackType')}}> - <Radio value="default">榛樿鑴氭湰</Radio> - <Radio value="script">鑷畾涔夎剼鏈�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'custom' ? <Col span={12}> - <Form.Item label="鍥炶皟琛ㄥ悕"> - {getFieldDecorator('cbTable', { - initialValue: setting.cbTable || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '鍥炶皟琛ㄥ悕!' - }, - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> : null} - {interType === 'custom' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鍚屾鎵ц锛氬閮ㄦ帴鍙h皟鐢ㄦ垚鍔熷悗鍐嶈姹傛暟鎹紱寮傛鎵ц锛氬閮ㄦ帴鍙h皟鐢ㄤ笌璇锋眰鏁版嵁鍚屾椂杩涜銆�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鎵ц鏂瑰紡 - </Tooltip> - }> - {getFieldDecorator('execType', { - initialValue: setting.execType || 'sync' - })( - <Radio.Group> - <Radio value="sync">鍚屾</Radio> - <Radio value="async">寮傛</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'custom' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 璺ㄥ煙璇锋眰 - </Tooltip> - }> - {getFieldDecorator('cross', { - initialValue: setting.cross || 'true' - })( - <Radio.Group> - <Radio value="true">鏀寔</Radio> - <Radio value="false">涓嶆敮鎸�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'custom' ? <Col span={12}> - <Form.Item label="鎵ц娆℃暟"> - {getFieldDecorator('execTime', { - initialValue: setting.execTime || 'once' - })( - <Radio.Group> - <Radio value="always">濮嬬粓</Radio> - <Radio value="once">涓�娆�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label="鏄惁鍒嗛〉"> - {getFieldDecorator('laypage', { - initialValue: setting.laypage || 'true' - })( - <Radio.Group> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鍒濆鍖�"> - {getFieldDecorator('onload', { - initialValue: setting.onload || 'true' - })( - <Radio.Group> - <Radio value="true">鍔犺浇鏁版嵁</Radio> - <Radio value="false">涓嶅姞杞芥暟鎹�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - {config.Template === 'CommonTable' ? <Col span={12}> - <Form.Item label="鎸夐挳鍥哄畾"> - {getFieldDecorator('actionfixed', { - initialValue: setting.actionfixed === 'true' || setting.actionfixed === true ? 'true' : 'false' - })( - <Radio.Group> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {config.Template === 'CommonTable' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鍚湁鍚堝苟鍒楁垨琛ㄦ牸鍑虹幇妯悜婊氬姩鏃朵細鏄剧ず寮傚父锛岃鎱庣敤锛�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 琛ㄥご鍥哄畾 - </Tooltip> - }> - {getFieldDecorator('columnfixed', { - initialValue: setting.columnfixed === 'true' || setting.columnfixed === true ? 'true' : 'false' - })( - <Radio.Group> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label="杈规"> - {getFieldDecorator('bordered', { - initialValue: setting.bordered || 'true' - })( - <Radio.Group> - <Radio value="true">鏈�</Radio> - <Radio value="false">鏃�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'琛ㄦ牸鐨勫唴杈硅窛锛屼粠澶у埌灏忎緷娆¢�掑噺銆�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 琛ㄦ牸澶у皬 - </Tooltip> - }> - {getFieldDecorator('size', { - initialValue: setting.size || 'middle' - })( - <Radio.Group> - <Radio value="default">澶�</Radio> - <Radio value="middle">涓�</Radio> - <Radio value="small">灏�</Radio> - <Radio value="mini">杩蜂綘</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="浜嬪姟"> - {getFieldDecorator('transaction', { - initialValue: setting.transaction || 'false' - })( - <Radio.Group> - <Radio value="true">浣跨敤</Radio> - <Radio value="false">涓嶄娇鐢�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="浣跨敤鎬ラ�熸ā寮忔椂锛岃〃鏍间腑鐨勬爣璁般�佸弻鍑讳簨浠躲�佹牸寮忓寲銆佽鍚堝苟銆佸墠缂�銆佸悗缂�銆佸瓧娈甸�忚绛夋晥鏋滃皢鏃犳晥锛屼笖鏁版嵁閮戒細浠ユ枃鏈牸寮忔樉绀恒��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 妯″紡 - </Tooltip> - }> - {getFieldDecorator('tableMode', { - initialValue: setting.tableMode || 'compatible' - })( - <Radio.Group> - <Radio value="compatible">鍏煎</Radio> - <Radio value="fast">鎬ラ��</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鏁版嵁鍔犺浇鏃讹紝鏄惁鏄剧ず鍔犺浇涓殑閬僵銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 閬僵 - </Tooltip> - }> - {getFieldDecorator('mask', { - initialValue: setting.mask || 'show' - })( - <Radio.Group> - <Radio value="show">鏄剧ず</Radio> - <Radio value="hidden">闅愯棌</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - {/* <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鍦ㄦ悳绱㈡潯浠跺瓨鍦ㄦ椂锛屾槸鍚︽樉绀烘悳绱㈠拰閲嶇疆鎸夐挳銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鎼滅储鎸夐挳 - </Tooltip> - }> - {getFieldDecorator('show', { - initialValue: setting.show || 'true' - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group>)} - </Form.Item> - </Col> */} - {tableType !== '' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆傛敞锛氬湪鍚敤鏃犱汉鍊煎畧鍔熻兘鏃舵棤鏁堛��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 棣栬閫変腑 - </Tooltip> - }> - {getFieldDecorator('selected', { - initialValue: setting.selected || 'false' - })( - <Radio.Group> - <Radio value="false">鏃�</Radio> - <Radio value="init">鍒濆鍖�</Radio> - <Radio value="always">鏁版嵁鍔犺浇</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="閫夋嫨鍒嗛〉鏃舵湁鏁堬紝榛樿涓�10鏉°��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 姣忛〉鏁伴噺 - </Tooltip> - }> - {getFieldDecorator('pageSize', { - initialValue: setting.pageSize || '', - })(<InputNumber min={1} max={500} precision={0} />)} - </Form.Item> - </Col> - {/* <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��"> - <QuestionCircleOutlined className="mk-form-tip" /> - 楂樼骇鎼滅储 - </Tooltip> - }> - {getFieldDecorator('advanceWidth', { - initialValue: setting.advanceWidth || 1000 - })(<InputNumber min={10} max={3000} precision={0}/>)} - </Form.Item> - </Col> */} - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鍙屽嚮琛ㄦ牸涓锛岃Е鍙戠殑鎸夐挳銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鍙屽嚮浜嬩欢 - </Tooltip> - }> - {getFieldDecorator('doubleClick', { - initialValue: setting.doubleClick || '' - })( - <Select allowClear> - {config.action.map(option => - <Select.Option key={option.uuid} value={option.uuid}>{option.label}</Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="绌哄�兼椂楂樺害鑷�傚簲銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - table楂樺害 - </Tooltip> - }> - {getFieldDecorator('height', { - initialValue: setting.height - })(<InputNumber min={10} max={3000} precision={0}/>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="榛樿鍊紃gba(0, 0, 0, 0.65)"> - <QuestionCircleOutlined className="mk-form-tip" /> - 瀛椾綋棰滆壊 - </Tooltip> - }> - {getFieldDecorator('color', { - initialValue: setting.color - })(<MKColor config={{initval: setting.color || 'rgba(0, 0, 0, 0.65)'}} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="瀛椾綋澶у皬"> - {getFieldDecorator('fontSize', { - initialValue: setting.fontSize || 14 - })(<InputNumber min={12} max={50} precision={0}/>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 绂佺敤瀛楁 - </Tooltip> - }> - {getFieldDecorator('controlField', { - initialValue: setting.controlField || '' - })( - <Select allowClear onChange={(val) => this.setState({controlField: val})}> - {columns.map((option, i) => - <Select.Option key={i} value={option.value}> - {option.text} - </Select.Option> - )} - </Select> - )} - </Form.Item> - </Col> - {controlField ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="褰撳瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�"> - <QuestionCircleOutlined className="mk-form-tip" /> - 鎺у埗鍊� - </Tooltip> - }> - {getFieldDecorator('controlVal', { - initialValue: setting.controlVal || '' - })(<Input autoComplete="off" />)} - </Form.Item> - </Col> : null} - </Row> - </Form> - </div> + <Form {...formItemLayout}> + <Row gutter={24}> + <Col span={8}> + <Form.Item label="琛ㄥ悕"> + {getFieldDecorator('tableName', { + initialValue: setting.tableName || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '琛ㄥ悕!' + }, + { + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' + } + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={dict['header.form.intertype']}> + {getFieldDecorator('interType', { + initialValue: interType, + rules: [ + { + required: true, + message: dict['form.required.select'] + dict['header.form.intertype'] + '!' + }, + ] + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}> + <Radio value="system">绯荤粺</Radio> + <Radio value="inner">鍐呴儴</Radio> + <Radio value="outer">澶栭儴</Radio> + <Radio value="custom">鑷畾涔�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="琛ㄦ牸灞炴��"> + {getFieldDecorator('tableType', { + initialValue: setting.tableType + })( + <Radio.Group onChange={(e) => this.setState({tableType: e.target.value})}> + <Radio value="">涓嶅彲閫�</Radio> + <Radio value="radio">鍗曢��</Radio> + <Radio value="checkbox">澶氶��</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + {interType === 'outer' ? <Col span={8}> + <Form.Item label={dict['header.form.sysInterface']}> + {getFieldDecorator('sysInterface', { + initialValue: sysInterface, + rules: [ + { + required: true, + message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!' + }, + ] + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}> + <Radio value="true">{dict['model.true']}</Radio> + <Radio value="false">{dict['model.false']}</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'custom' ? <Col span={8}> + <Form.Item label="鍙傛暟澶勭悊"> + {getFieldDecorator('procMode', { + initialValue: procMode, + rules: [ + { + required: true, + message: dict['form.required.select'] + '鍙傛暟澶勭悊鏂瑰紡!' + }, + ] + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'procMode')}}> + <Radio value="script">鍓嶇疆鑴氭湰</Radio> + <Radio value="inner">鍓嶇疆鍑芥暟</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'custom' && procMode === 'inner' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={funcTooltip}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍓嶇疆鍑芥暟 + </Tooltip> + }> + {getFieldDecorator('prevFunc', { + initialValue: setting.prevFunc || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '鍓嶇疆鍑芥暟!' + }, + { + max: formRule.func.max, + message: formRule.func.maxMessage + }, + ...funcRules + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> : null} + {interType === 'outer' || interType === 'custom' ? <Col className="mk-through-line3" span={24}> + <Form.Item label="鎺ュ彛鍦板潃"> + {getFieldDecorator('interface', { + initialValue: setting.interface || (interType === 'outer' && sysInterface === 'true' ? window.GLOB.mainSystemApi : ''), + rules: [ + { + required: interType === 'outer' && sysInterface === 'true' ? false : true, + message: dict['form.required.input'] + '鎺ュ彛鍦板潃!' + }, + ] + })(<TextArea rows={2} readOnly={interType === 'outer' && sysInterface === 'true'}/>)} + </Form.Item> + </Col> : null} + {(interType === 'outer' && sysInterface !== 'true') || interType === 'custom' ? <Col className="mk-through-line3" span={24}> + <Form.Item label={ + <Tooltip placement="topLeft" title="姝e紡绯荤粺鎵�浣跨敤鐨勭殑鎺ュ彛鍦板潃銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 姝e紡鍦板潃 + </Tooltip> + }> + {getFieldDecorator('proInterface', { + initialValue: setting.proInterface || '' + })(<TextArea rows={2} />)} + </Form.Item> + </Col> : null} + {interType === 'custom' ? <Col span={8}> + <Form.Item label="璇锋眰鏂瑰紡"> + {getFieldDecorator('method', { + initialValue: setting.method || 'post', + rules: [ + { + required: true, + message: dict['form.required.select'] + '璇锋眰鏂瑰紡!' + }, + ] + })( + <Radio.Group> + <Radio value="get">GET</Radio> + <Radio value="post">POST</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'custom' ? <Col span={8}> + <Form.Item label="鏁版嵁璇锋眰"> + {getFieldDecorator('requestMode', { + initialValue: requestMode, + rules: [ + { + required: true, + message: dict['form.required.select'] + '鏁版嵁璇锋眰鏂瑰紡!' + }, + ] + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'requestMode')}}> + <Radio value="system">绯荤粺鍑芥暟</Radio> + <Radio value="inner">鍐呴儴鍑芥暟</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'inner' || (interType === 'custom' && requestMode === 'inner') ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={funcTooltip}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍐呴儴鍑芥暟 + </Tooltip> + }> + {getFieldDecorator('innerFunc', { + initialValue: setting.innerFunc || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '鍐呴儴鍑芥暟!' + }, + { + max: formRule.func.max, + message: formRule.func.maxMessage + }, + ...funcRules + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> : null} + {interType === 'outer' ? <Col span={8}> + <Form.Item label="澶栭儴鍑芥暟"> + {getFieldDecorator('outerFunc', { + initialValue: setting.outerFunc || '', + rules: [ + { + pattern: formRule.func.pattern, + message: formRule.func.message + }, { + max: formRule.func.max, + message: formRule.func.maxMessage + } + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> : null} + {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={24} className="mk-through-line3"> + <Form.Item help={'鏁版嵁ID锛�' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={ + <Tooltip placement="topLeft" title={`浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� ''銆� @$ -> */ 鎴� ''锛涙煡璇㈡浛鎹㈢ $select@ -> /* 鎴� ''銆� @select$ -> */ 鎴� ''锛涚粺璁℃浛鎹㈢ $sum@ -> /* 鎴� ''銆� @sum$ -> */ 鎴� ''銆俙}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏁版嵁婧� + </Tooltip> + }> + {getFieldDecorator('dataresource', { + initialValue: setting.dataresource || '' + })(<CodeMirror />)} + </Form.Item> + </Col> : null} + {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鏌ヨ鏃讹紝鎼滅储鏉′欢浠here鏉′欢鎷兼帴杩涘叆sql锛岀粺璁℃椂锛屽皢鏁版嵁婧愪腑浠モ�淍+鎼滅储瀛楁+@鈥濈殑鍐呭锛屼互鎼滅储鏉′欢涓殑鍊艰繘琛屾浛鎹㈠悗锛屾彁浜ゆ煡璇紝娉細鏌ヨ绫诲瀷浠呭湪浣跨敤绯荤粺鍑芥暟鏃舵湁鏁堛��'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏌ヨ绫诲瀷 + </Tooltip> + }> + {getFieldDecorator('queryType', { + initialValue: setting.queryType || 'query' + })( + <Radio.Group> + <Radio value="query">鏌ヨ</Radio> + <Radio value="statistics">缁熻</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={8}> + <Form.Item label="榛樿sql"> + {getFieldDecorator('default', { + initialValue: setting.default || 'true' + })( + <Radio.Group> + <Radio value="true">鎵ц</Radio> + <Radio value="false">涓嶆墽琛�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + <Col span={8}> + <Form.Item label="涓婚敭"> + {getFieldDecorator('primaryKey', { + initialValue: setting.primaryKey || '' + })( + <Select onChange={this.primaryKeyChange}> + <Select.Option key="empty" value="">鏈缃�</Select.Option> + {columns.map((option, i) => + <Select.Option key={i} value={option.value}> + {option.text} + </Select.Option> + )} + </Select> + )} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="榛樿鎺掑簭"> + {getFieldDecorator('order', { + initialValue: setting.order || 'ID desc', + rules: [ + { + required: true, + message: dict['form.required.input'] + '榛樿鎺掑簭!' + }, + { + max: formRule.input.max, + message: formRule.input.message + } + ] + })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" />)} + </Form.Item> + </Col> + {interType === 'custom' ? <Col span={8}> + <Form.Item label="鍥炶皟鏂瑰紡"> + {getFieldDecorator('callbackType', { + initialValue: setting.callbackType || 'script' + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'callbackType')}}> + <Radio value="default">榛樿鑴氭湰</Radio> + <Radio value="script">鑷畾涔夎剼鏈�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'custom' ? <Col span={8}> + <Form.Item label="鍥炶皟琛ㄥ悕"> + {getFieldDecorator('cbTable', { + initialValue: setting.cbTable || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '鍥炶皟琛ㄥ悕!' + }, + { + max: formRule.input.max, + message: formRule.input.message + } + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> : null} + {interType === 'custom' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鍚屾鎵ц锛氬閮ㄦ帴鍙h皟鐢ㄦ垚鍔熷悗鍐嶈姹傛暟鎹紱寮傛鎵ц锛氬閮ㄦ帴鍙h皟鐢ㄤ笌璇锋眰鏁版嵁鍚屾椂杩涜銆�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎵ц鏂瑰紡 + </Tooltip> + }> + {getFieldDecorator('execType', { + initialValue: setting.execType || 'sync' + })( + <Radio.Group> + <Radio value="sync">鍚屾</Radio> + <Radio value="async">寮傛</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'custom' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 璺ㄥ煙璇锋眰 + </Tooltip> + }> + {getFieldDecorator('cross', { + initialValue: setting.cross || 'true' + })( + <Radio.Group> + <Radio value="true">鏀寔</Radio> + <Radio value="false">涓嶆敮鎸�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'custom' ? <Col span={8}> + <Form.Item label="鎵ц娆℃暟"> + {getFieldDecorator('execTime', { + initialValue: setting.execTime || 'once' + })( + <Radio.Group> + <Radio value="always">濮嬬粓</Radio> + <Radio value="once">涓�娆�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + <Col span={8}> + <Form.Item label="鏄惁鍒嗛〉"> + {getFieldDecorator('laypage', { + initialValue: setting.laypage || 'true' + })( + <Radio.Group> + <Radio value="true">{dict['model.true']}</Radio> + <Radio value="false">{dict['model.false']}</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="鍒濆鍖�"> + {getFieldDecorator('onload', { + initialValue: setting.onload || 'true' + })( + <Radio.Group> + <Radio value="true">鍔犺浇鏁版嵁</Radio> + <Radio value="false">涓嶅姞杞芥暟鎹�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + {config.Template === 'CommonTable' ? <Col span={8}> + <Form.Item label="鎸夐挳鍥哄畾"> + {getFieldDecorator('actionfixed', { + initialValue: setting.actionfixed === 'true' || setting.actionfixed === true ? 'true' : 'false' + })( + <Radio.Group> + <Radio value="true">{dict['model.true']}</Radio> + <Radio value="false">{dict['model.false']}</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {config.Template === 'CommonTable' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鍚湁鍚堝苟鍒楁垨琛ㄦ牸鍑虹幇妯悜婊氬姩鏃朵細鏄剧ず寮傚父锛岃鎱庣敤锛�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 琛ㄥご鍥哄畾 + </Tooltip> + }> + {getFieldDecorator('columnfixed', { + initialValue: setting.columnfixed === 'true' || setting.columnfixed === true ? 'true' : 'false' + })( + <Radio.Group> + <Radio value="true">{dict['model.true']}</Radio> + <Radio value="false">{dict['model.false']}</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + <Col span={8}> + <Form.Item label="杈规"> + {getFieldDecorator('bordered', { + initialValue: setting.bordered || 'true' + })( + <Radio.Group> + <Radio value="true">鏈�</Radio> + <Radio value="false">鏃�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'琛ㄦ牸鐨勫唴杈硅窛锛屼粠澶у埌灏忎緷娆¢�掑噺銆�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 琛ㄦ牸澶у皬 + </Tooltip> + }> + {getFieldDecorator('size', { + initialValue: setting.size || 'middle' + })( + <Radio.Group> + <Radio value="default">澶�</Radio> + <Radio value="middle">涓�</Radio> + <Radio value="small">灏�</Radio> + <Radio value="mini">杩蜂綘</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="浜嬪姟"> + {getFieldDecorator('transaction', { + initialValue: setting.transaction || 'false' + })( + <Radio.Group> + <Radio value="true">浣跨敤</Radio> + <Radio value="false">涓嶄娇鐢�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="浣跨敤鎬ラ�熸ā寮忔椂锛岃〃鏍间腑鐨勬爣璁般�佸弻鍑讳簨浠躲�佹牸寮忓寲銆佽鍚堝苟銆佸墠缂�銆佸悗缂�銆佸瓧娈甸�忚绛夋晥鏋滃皢鏃犳晥锛屼笖鏁版嵁閮戒細浠ユ枃鏈牸寮忔樉绀恒��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 妯″紡 + </Tooltip> + }> + {getFieldDecorator('tableMode', { + initialValue: setting.tableMode || 'compatible' + })( + <Radio.Group> + <Radio value="compatible">鍏煎</Radio> + <Radio value="fast">鎬ラ��</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁鍔犺浇鏃讹紝鏄惁鏄剧ず鍔犺浇涓殑閬僵銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 閬僵 + </Tooltip> + }> + {getFieldDecorator('mask', { + initialValue: setting.mask || 'show' + })( + <Radio.Group> + <Radio value="show">鏄剧ず</Radio> + <Radio value="hidden">闅愯棌</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + {/* <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鍦ㄦ悳绱㈡潯浠跺瓨鍦ㄦ椂锛屾槸鍚︽樉绀烘悳绱㈠拰閲嶇疆鎸夐挳銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎼滅储鎸夐挳 + </Tooltip> + }> + {getFieldDecorator('show', { + initialValue: setting.show || 'true' + })( + <Radio.Group> + <Radio value="true">鏄剧ず</Radio> + <Radio value="false">闅愯棌</Radio> + </Radio.Group>)} + </Form.Item> + </Col> */} + {tableType !== '' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="褰撴寜閽墽琛屽畬鎴愬苟杩斿洖涓婚敭鍊兼椂锛岄粯璁ら�変腑涓婚敭鍊煎搴旇銆傛敞锛氬湪鍚敤鏃犱汉鍊煎畧鍔熻兘鏃舵棤鏁堛��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 棣栬閫変腑 + </Tooltip> + }> + {getFieldDecorator('selected', { + initialValue: setting.selected || 'false' + })( + <Radio.Group> + <Radio value="false">鏃�</Radio> + <Radio value="init">鍒濆鍖�</Radio> + <Radio value="always">鏁版嵁鍔犺浇</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="閫夋嫨鍒嗛〉鏃舵湁鏁堬紝榛樿涓�10鏉°��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 姣忛〉鏁伴噺 + </Tooltip> + }> + {getFieldDecorator('pageSize', { + initialValue: setting.pageSize || '', + })(<InputNumber min={1} max={500} precision={0} />)} + </Form.Item> + </Col> + {/* <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 楂樼骇鎼滅储 + </Tooltip> + }> + {getFieldDecorator('advanceWidth', { + initialValue: setting.advanceWidth || 1000 + })(<InputNumber min={10} max={3000} precision={0}/>)} + </Form.Item> + </Col> */} + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鍙屽嚮琛ㄦ牸涓锛岃Е鍙戠殑鎸夐挳銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍙屽嚮浜嬩欢 + </Tooltip> + }> + {getFieldDecorator('doubleClick', { + initialValue: setting.doubleClick || '' + })( + <Select allowClear> + {config.action.map(option => + <Select.Option key={option.uuid} value={option.uuid}>{option.label}</Select.Option> + )} + </Select> + )} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="绌哄�兼椂楂樺害鑷�傚簲銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + table楂樺害 + </Tooltip> + }> + {getFieldDecorator('height', { + initialValue: setting.height + })(<InputNumber min={10} max={3000} precision={0}/>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item className="mk-color-move" label={ + <Tooltip placement="topLeft" title="榛樿鍊紃gba(0, 0, 0, 0.65)"> + <QuestionCircleOutlined className="mk-form-tip" /> + 瀛椾綋棰滆壊 + </Tooltip> + }> + {getFieldDecorator('color', { + initialValue: setting.color + })(<MKColor config={{initval: setting.color || 'rgba(0, 0, 0, 0.65)'}} />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="瀛椾綋澶у皬"> + {getFieldDecorator('fontSize', { + initialValue: setting.fontSize || 14 + })(<InputNumber min={12} max={50} precision={0}/>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 绂佺敤瀛楁 + </Tooltip> + }> + {getFieldDecorator('controlField', { + initialValue: setting.controlField || '' + })( + <Select allowClear onChange={(val) => this.setState({controlField: val})}> + {columns.map((option, i) => + <Select.Option key={i} value={option.value}> + {option.text} + </Select.Option> + )} + </Select> + )} + </Form.Item> + </Col> + {controlField ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title="褰撳瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鎺у埗鍊� + </Tooltip> + }> + {getFieldDecorator('controlVal', { + initialValue: setting.controlVal || '' + })(<Input autoComplete="off" />)} + </Form.Item> + </Col> : null} + </Row> + </Form> ) } } diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.scss b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.scss index c432f3e..e69de29 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.scss +++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.scss @@ -1,22 +0,0 @@ -.model-table-datasource-setting-form-box { - position: relative; - - .model-setting-form { - .data-source { - .ant-form-item-label { - width: 16.5%; - } - .ant-form-item-control-wrapper { - width: 83.5%; - } - .CodeMirror { - height: 150px; - } - } - } - - .color-sketch-block { - position: relative; - top: 7px; - } -} \ No newline at end of file diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx index eb8577c..deae870 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/index.jsx @@ -576,7 +576,7 @@ const { loading, activeKey, setting, defaultSql, columns, scripts, preScripts, cbScripts, status, regoptions, visible, script, scriptValue } = this.state return ( - <div className="model-table-setting-form-box" id="model-setting-form-body"> + <div className="model-table-setting-form-box"> {loading && <Spin size="large" />} <Tabs activeKey={activeKey} onChange={this.changeTab}> <TabPane tab="鏁版嵁婧�" key="setting"> @@ -596,8 +596,8 @@ 鑷畾涔夎剼鏈� {scripts.length ? <span className="count-tip">{scripts.length}</span> : null} </span> - } disabled={!(status.interType === 'system' || (status.interType === 'custom' && status.requestMode === 'system'))} key="scripts"> - <BorderOutlined className="full-scripts" onClick={() => { + } disabled={!(status.interType === 'system' || (status.interType === 'custom' && status.requestMode === 'system'))} key="scripts" id="mk-setting-scripts"> + {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, @@ -607,7 +607,7 @@ return } this.setState({visible: true, script: null, scriptValue: ''}) - }}/> + }}/> : null} <CustomScript dict={dict} setting={setting} diff --git a/src/templates/sharecomponent/settingcomponent/settingform/index.scss b/src/templates/sharecomponent/settingcomponent/settingform/index.scss index 516889d..8790751 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/index.scss +++ b/src/templates/sharecomponent/settingcomponent/settingform/index.scss @@ -60,10 +60,11 @@ } .full-scripts { position: absolute; - right: 0px; - top: 18px; + right: 24px; + top: 0px; font-size: 18px; color: #1890ff; + z-index: 1; } } diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx index 144b09e..8b00a43 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx @@ -28,6 +28,7 @@ } state = { + wrapId: Utils.getuuid(), editItem: null, loading: false, usefulFields: '', @@ -358,7 +359,7 @@ } scrolltop = () => { - let node = document.getElementById('model-setting-form-body').parentNode + let node = document.getElementById(this.state.wrapId).parentNode if (node && node.scrollTop) { let inter = Math.ceil(node.scrollTop / 10) @@ -406,7 +407,7 @@ render() { const { setting, scripts } = this.props const { getFieldDecorator } = this.props.form - const { usefulFields, scriptsColumns, systemScripts, urlFields } = this.state + const { usefulFields, scriptsColumns, systemScripts, urlFields, wrapId } = this.state const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -419,7 +420,7 @@ } return ( - <div className="modal-menu-setting-script"> + <div className="modal-menu-setting-script" id={wrapId}> <Form {...formItemLayout}> <Row gutter={24}> <Col span={4}> diff --git a/src/templates/sharecomponent/treesettingcomponent/index.jsx b/src/templates/sharecomponent/treesettingcomponent/index.jsx index 141d90e..74fb02f 100644 --- a/src/templates/sharecomponent/treesettingcomponent/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/index.jsx @@ -99,10 +99,9 @@ <SettingOutlined onClick={this.changeSetting} /> {/* 璁剧疆鍏ㄥ眬閰嶇疆鍙婂垪琛ㄦ暟鎹簮 */} <Modal - wrapClassName="model-tree-setting-verify-modal" - title="鏁版嵁婧愰厤缃�" + wrapClassName="mk-pop-modal" visible={visible} - width={900} + width={'75vw'} maskClosable={false} onCancel={() => { MKEmitter.emit('modalStatus', false); this.setState({ visible: false })}} confirmLoading={loading} diff --git a/src/templates/sharecomponent/treesettingcomponent/index.scss b/src/templates/sharecomponent/treesettingcomponent/index.scss index 1a2db19..18c0185 100644 --- a/src/templates/sharecomponent/treesettingcomponent/index.scss +++ b/src/templates/sharecomponent/treesettingcomponent/index.scss @@ -8,33 +8,4 @@ z-index: 1; color: #1890ff; } -} - -.model-tree-setting-verify-modal { - .ant-modal { - top: 50px; - padding-bottom: 5px; - .ant-modal-body { - max-height: calc(100vh - 190px); - overflow-y: auto; - padding-top: 10px; - } - .ant-modal-body::-webkit-scrollbar { - width: 7px; - } - .ant-modal-body::-webkit-scrollbar-thumb { - border-radius: 5px; - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); - background: rgba(0, 0, 0, 0.13); - } - .ant-modal-body::-webkit-scrollbar-track { - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); - border-radius: 3px; - border: 1px solid rgba(0, 0, 0, 0.07); - background: rgba(0, 0, 0, 0); - } - .ant-empty-normal { - margin: 5px 0px; - } - } } \ No newline at end of file diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx index 6c21f28..48382e0 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx @@ -8,7 +8,7 @@ import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import CodeMirror from '@/templates/zshare/codemirror' -import './index.scss' +// import './index.scss' const { TextArea } = Input @@ -191,317 +191,315 @@ } return ( - <div className="model-table-datasource-setting-form-box"> - <Form {...formItemLayout} className="model-setting-form"> - <Row gutter={24}> - <Col span={12}> - <Form.Item label="琛ㄥ悕"> - {getFieldDecorator('tableName', { - initialValue: setting.tableName || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '琛ㄥ悕!' - }, - { - max: 50, - message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鏍囬"> - {getFieldDecorator('title', { - initialValue: setting.title || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '鏍囬!' - }, - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={dict['header.form.intertype']}> - {getFieldDecorator('interType', { - initialValue: interType, - rules: [ - { - required: true, - message: dict['form.required.select'] + dict['header.form.intertype'] + '!' - } - ] - })( - <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}> - <Radio value="system">绯荤粺</Radio> - <Radio value="inner">鍐呴儴</Radio> - <Radio value="outer">澶栭儴</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - {interType === 'outer' ? <Col span={12}> - <Form.Item label={dict['header.form.sysInterface']}> - {getFieldDecorator('sysInterface', { - initialValue: setting.sysInterface || 'false', - rules: [ - { - required: true, - message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!' - }, - ] - })( - <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}> - <Radio value="true">{dict['model.true']}</Radio> - <Radio value="false">{dict['model.false']}</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - {interType === 'inner' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={funcTooltip}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鍐呴儴鍑芥暟 - </Tooltip> - }> - {getFieldDecorator('innerFunc', { - initialValue: setting.innerFunc || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '鍐呴儴鍑芥暟!' - }, - { - max: formRule.func.max, - message: formRule.func.maxMessage - }, - ...funcRules - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> : null} - {interType === 'outer' ? <Col span={24} className="data-source"> - <Form.Item label="鎺ュ彛鍦板潃"> - {getFieldDecorator('interface', { - initialValue: setting.interface || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + '鎺ュ彛鍦板潃!' - } - ] - })(<TextArea rows={2}/>)} - </Form.Item> - </Col> : null} - {interType === 'outer' ? <Col span={12}> - <Form.Item label="澶栭儴鍑芥暟"> - {getFieldDecorator('outerFunc', { - initialValue: setting.outerFunc || '', - rules: [ - { - pattern: formRule.func.pattern, - message: formRule.func.message - }, { - max: formRule.func.max, - message: formRule.func.maxMessage - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> : null} - {interType === 'system' ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}> - <Form.Item help={'鏁版嵁ID锛�' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={ - <Tooltip placement="topLeft" title={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鏁版嵁婧� - </Tooltip> - }> - {getFieldDecorator('dataresource', { - initialValue: setting.dataresource || '' - })(<CodeMirror />)} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鏁版嵁鍊煎瓧娈点��'}> - <QuestionCircleOutlined className="mk-form-tip" /> - Value - </Tooltip> - }> - {getFieldDecorator('valueField', { - initialValue: setting.valueField || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + 'Value!' - }, - { - pattern: formRule.field.pattern, - message: formRule.field.message - }, { - max: formRule.field.max, - message: formRule.field.maxMessage - } - ] - })(<Input placeholder={''} autoComplete="off" />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鏄剧ず鏂囧瓧瀛楁銆�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - Label - </Tooltip> - }> - {getFieldDecorator('labelField', { - initialValue: setting.labelField || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + 'Label!' - }, - { - pattern: formRule.field.pattern, - message: formRule.field.message - }, { - max: formRule.field.max, - message: formRule.field.maxMessage - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鐖剁骇瀛楁銆�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - Parent - </Tooltip> - }> - {getFieldDecorator('parentField', { - initialValue: setting.parentField || '', - rules: [ - { - required: true, - message: dict['form.required.input'] + 'Label!' - }, - { - pattern: formRule.field.pattern, - message: formRule.field.message - }, { - max: formRule.field.max, - message: formRule.field.maxMessage - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鎺掑簭"> - {getFieldDecorator('order', { - initialValue: setting.order || 'ID desc', - rules: [ - { - required: true, - message: dict['form.required.input'] + '鎺掑簭!' - }, - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 椤剁骇鏍囪瘑 - </Tooltip> - }> - {getFieldDecorator('mark', { - initialValue: setting.mark || '', - rules: [ - { - max: formRule.input.max, - message: formRule.input.message - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 瀹藉害 - </Tooltip> - }> - {getFieldDecorator('width', { - initialValue: setting.width || 5, - rules: [ - { - required: true, - message: dict['form.required.input'] + '瀹藉害!' - } - ] - })(<InputNumber min={2} max={12} precision={0} />)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鎼滅储"> - {getFieldDecorator('searchable', { - initialValue: setting.searchable || 'true' - })( - <Radio.Group> - <Radio value="true">鏄剧ず</Radio> - <Radio value="false">闅愯棌</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - {interType === 'system' ? <Col span={12}> - <Form.Item label="榛樿sql"> - {getFieldDecorator('default', { - initialValue: setting.default || 'true' - })( - <Radio.Group> - <Radio value="true">鎵ц</Radio> - <Radio value="false">涓嶆墽琛�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> : null} - <Col span={12}> - <Form.Item label="鏄剧ず鍥炬爣"> - {getFieldDecorator('showIcon', { - initialValue: setting.showIcon || 'false' - })( - <Radio.Group> - <Radio value="true">鏄�</Radio> - <Radio value="false">鍚�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - <Col span={12}> - <Form.Item label="鏄剧ず鍒嗗壊绾�"> - {getFieldDecorator('showLine', { - initialValue: setting.showLine || 'false' - })( - <Radio.Group> - <Radio value="true">鏄�</Radio> - <Radio value="false">鍚�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> - </Row> - </Form> - </div> + <Form {...formItemLayout}> + <Row gutter={24}> + <Col span={8}> + <Form.Item label="琛ㄥ悕"> + {getFieldDecorator('tableName', { + initialValue: setting.tableName || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '琛ㄥ悕!' + }, + { + max: 50, + message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!' + } + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="鏍囬"> + {getFieldDecorator('title', { + initialValue: setting.title || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '鏍囬!' + }, + { + max: formRule.input.max, + message: formRule.input.message + } + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={dict['header.form.intertype']}> + {getFieldDecorator('interType', { + initialValue: interType, + rules: [ + { + required: true, + message: dict['form.required.select'] + dict['header.form.intertype'] + '!' + } + ] + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}> + <Radio value="system">绯荤粺</Radio> + <Radio value="inner">鍐呴儴</Radio> + <Radio value="outer">澶栭儴</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + {interType === 'outer' ? <Col span={8}> + <Form.Item label={dict['header.form.sysInterface']}> + {getFieldDecorator('sysInterface', { + initialValue: setting.sysInterface || 'false', + rules: [ + { + required: true, + message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!' + }, + ] + })( + <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}> + <Radio value="true">{dict['model.true']}</Radio> + <Radio value="false">{dict['model.false']}</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {interType === 'inner' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={funcTooltip}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍐呴儴鍑芥暟 + </Tooltip> + }> + {getFieldDecorator('innerFunc', { + initialValue: setting.innerFunc || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '鍐呴儴鍑芥暟!' + }, + { + max: formRule.func.max, + message: formRule.func.maxMessage + }, + ...funcRules + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> : null} + {interType === 'outer' ? <Col span={24} className="mk-through-line3"> + <Form.Item label="鎺ュ彛鍦板潃"> + {getFieldDecorator('interface', { + initialValue: setting.interface || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + '鎺ュ彛鍦板潃!' + } + ] + })(<TextArea rows={2}/>)} + </Form.Item> + </Col> : null} + {interType === 'outer' ? <Col span={8}> + <Form.Item label="澶栭儴鍑芥暟"> + {getFieldDecorator('outerFunc', { + initialValue: setting.outerFunc || '', + rules: [ + { + pattern: formRule.func.pattern, + message: formRule.func.message + }, { + max: formRule.func.max, + message: formRule.func.maxMessage + } + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> : null} + {interType === 'system' ? <Col span={24} className="mk-through-line3"> + <Form.Item help={'鏁版嵁ID锛�' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={ + <Tooltip placement="topLeft" title={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏁版嵁婧� + </Tooltip> + }> + {getFieldDecorator('dataresource', { + initialValue: setting.dataresource || '' + })(<CodeMirror />)} + </Form.Item> + </Col> : null} + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鏁版嵁鍊煎瓧娈点��'}> + <QuestionCircleOutlined className="mk-form-tip" /> + Value + </Tooltip> + }> + {getFieldDecorator('valueField', { + initialValue: setting.valueField || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + 'Value!' + }, + { + pattern: formRule.field.pattern, + message: formRule.field.message + }, { + max: formRule.field.max, + message: formRule.field.maxMessage + } + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鏄剧ず鏂囧瓧瀛楁銆�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + Label + </Tooltip> + }> + {getFieldDecorator('labelField', { + initialValue: setting.labelField || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + 'Label!' + }, + { + pattern: formRule.field.pattern, + message: formRule.field.message + }, { + max: formRule.field.max, + message: formRule.field.maxMessage + } + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鐖剁骇瀛楁銆�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + Parent + </Tooltip> + }> + {getFieldDecorator('parentField', { + initialValue: setting.parentField || '', + rules: [ + { + required: true, + message: dict['form.required.input'] + 'Label!' + }, + { + pattern: formRule.field.pattern, + message: formRule.field.message + }, { + max: formRule.field.max, + message: formRule.field.maxMessage + } + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="鎺掑簭"> + {getFieldDecorator('order', { + initialValue: setting.order || 'ID desc', + rules: [ + { + required: true, + message: dict['form.required.input'] + '鎺掑簭!' + }, + { + max: formRule.input.max, + message: formRule.input.message + } + ] + })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 椤剁骇鏍囪瘑 + </Tooltip> + }> + {getFieldDecorator('mark', { + initialValue: setting.mark || '', + rules: [ + { + max: formRule.input.max, + message: formRule.input.message + } + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}> + <QuestionCircleOutlined className="mk-form-tip" /> + 瀹藉害 + </Tooltip> + }> + {getFieldDecorator('width', { + initialValue: setting.width || 5, + rules: [ + { + required: true, + message: dict['form.required.input'] + '瀹藉害!' + } + ] + })(<InputNumber min={2} max={12} precision={0} />)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="鎼滅储"> + {getFieldDecorator('searchable', { + initialValue: setting.searchable || 'true' + })( + <Radio.Group> + <Radio value="true">鏄剧ず</Radio> + <Radio value="false">闅愯棌</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + {interType === 'system' ? <Col span={8}> + <Form.Item label="榛樿sql"> + {getFieldDecorator('default', { + initialValue: setting.default || 'true' + })( + <Radio.Group> + <Radio value="true">鎵ц</Radio> + <Radio value="false">涓嶆墽琛�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + <Col span={8}> + <Form.Item label="鏄剧ず鍥炬爣"> + {getFieldDecorator('showIcon', { + initialValue: setting.showIcon || 'false' + })( + <Radio.Group> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + <Col span={8}> + <Form.Item label="鏄剧ず鍒嗗壊绾�"> + {getFieldDecorator('showLine', { + initialValue: setting.showLine || 'false' + })( + <Radio.Group> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> + </Row> + </Form> ) } } diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.scss b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.scss index aeabe5f..e69de29 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.scss +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.scss @@ -1,17 +0,0 @@ -.model-table-datasource-setting-form-box { - position: relative; - - .model-setting-form { - .data-source { - .ant-form-item-label { - width: 16.5%; - } - .ant-form-item-control-wrapper { - width: 83.5%; - } - .CodeMirror { - height: 150px; - } - } - } -} \ No newline at end of file diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx index 0abd359..8f182b8 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/index.jsx @@ -249,7 +249,7 @@ 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"> @@ -266,7 +266,7 @@ 鑷畾涔夎剼鏈� {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} diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx index 524e97a..ecaa177 100644 --- a/src/templates/zshare/customscript/index.jsx +++ b/src/templates/zshare/customscript/index.jsx @@ -303,7 +303,7 @@ } scrolltop = () => { - let node = document.getElementById('model-setting-form-body').parentNode + let node = document.getElementById('mk-setting-scripts') if (node && node.scrollTop) { let inter = Math.ceil(node.scrollTop / 10) diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index a5a49eb..069ae99 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -853,11 +853,14 @@ if (!_arr.includes('submitdate')) { _form.push('submitdate=getdate()') } - if (!_arr.includes('submituserid')) { - _form.push('submituserid=@userid@') - } if (!_arr.includes('submituser')) { _form.push('submituser=@username') + } + if (!_arr.includes('submitstaff')) { + _form.push('submitstaff=@fullname') + } + if (!_arr.includes('submituserid')) { + _form.push('submituserid=@userid@') } } else { if (!_arr.includes('modifydate')) { @@ -865,6 +868,9 @@ } if (!_arr.includes('modifyuser')) { _form.push('modifyuser=@username') + } + if (!_arr.includes('modifystaff')) { + _form.push('modifystaff=@fullname') } if (!_arr.includes('modifyuserid')) { _form.push('modifyuserid=@userid@') @@ -1180,17 +1186,22 @@ } handleEdit = (record, type) => { + let node = null + if (type === 'customverify') { this.customForm.edit(record) + node = document.getElementById('mk-custom-script') } else if (type === 'ordercode') { this.orderForm.edit(record) } else if (type === 'scripts') { this.scriptsForm.edit(record) + node = document.getElementById('mk-normal-script') } else if (type === 'cbscripts') { this.cbscriptsForm.edit(record) + node = document.getElementById('mk-callback-script') } - let node = document.getElementById('verify-card-box-tab').parentNode + // let node = document.getElementById('verify-card-box-tab').parentNode if (node && node.scrollTop) { let inter = Math.ceil(node.scrollTop / 10) @@ -1504,7 +1515,8 @@ } return ( - <div id="verify-card-box-tab"> + <div> + {card.label ? <div className="mk-com-name">{card.label} - 楠岃瘉淇℃伅</div> : null} <Tabs activeKey={activeKey} className="verify-card-box" onChange={this.changeTab}> {verifyInter === 'system' || card.intertype === 'inner' ? <TabPane tab={ <span> @@ -1528,7 +1540,7 @@ 鑷畾涔夐獙璇� {verify.customverifys.length ? <span className="count-tip">{verify.customverifys.length}</span> : null} </span> - } key="customverifys"> + } key="customverifys" id="mk-custom-script"> <CustomForm dict={this.props.dict} btn={this.props.card} @@ -1593,7 +1605,7 @@ 鑷畾涔夎剼鏈� {verify.scripts.length ? <span className="count-tip">{verify.scripts.length}</span> : null} </span> - } key="scripts"> + } key="scripts" id="mk-normal-script"> <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({ @@ -1623,7 +1635,7 @@ 鍥炶皟鑴氭湰 {verify.cbScripts.length ? <span className="count-tip">{verify.cbScripts.length}</span> : null} </span> - } key="cbScripts"> + } key="cbScripts" id="mk-callback-script"> <CallBackCustomScript btn={this.props.card} dict={this.props.dict} diff --git a/src/templates/zshare/verifycard/index.scss b/src/templates/zshare/verifycard/index.scss index af61eaa..f7f81d4 100644 --- a/src/templates/zshare/verifycard/index.scss +++ b/src/templates/zshare/verifycard/index.scss @@ -74,10 +74,11 @@ } .full-scripts { position: absolute; - right: 0px; - top: 18px; - font-size: 18px; + right: 24px; + top: 0px; + font-size: 16px; color: #1890ff; + z-index: 1; } } .model-custom-scripts-modal { diff --git a/src/utils/utils.js b/src/utils/utils.js index 06f55ca..b97fbde 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1966,11 +1966,14 @@ if (!_arr.includes('submitdate')) { _form.push('submitdate=getdate()') } - if (!_arr.includes('submituserid')) { - _form.push('submituserid=@userid@') - } if (!_arr.includes('submituser')) { _form.push('submituser=@username') + } + if (!_arr.includes('submitstaff')) { + _form.push('submitstaff=@fullname') + } + if (!_arr.includes('submituserid')) { + _form.push('submituserid=@userid@') } } else { if (!_arr.includes('modifydate')) { @@ -1979,6 +1982,9 @@ if (!_arr.includes('modifyuser')) { _form.push('modifyuser=@username') } + if (!_arr.includes('modifystaff')) { + _form.push('modifystaff=@fullname') + } if (!_arr.includes('modifyuserid')) { _form.push('modifyuserid=@userid@') } diff --git a/src/views/basedesign/index.jsx b/src/views/basedesign/index.jsx index 807ea77..cfb79a4 100644 --- a/src/views/basedesign/index.jsx +++ b/src/views/basedesign/index.jsx @@ -6,6 +6,8 @@ import Api from '@/api' import asyncComponent from '@/utils/asyncComponent' import asyncLoadComponent from '@/utils/asyncLoadComponent' + +import '@/assets/css/design.scss' import './index.scss' const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS diff --git a/src/views/design/sidemenu/thdmenuplus/index.jsx b/src/views/design/sidemenu/thdmenuplus/index.jsx index 8d3ab63..b468df7 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.jsx +++ b/src/views/design/sidemenu/thdmenuplus/index.jsx @@ -320,8 +320,7 @@ return ( <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={6}> - <Card - title={template.title}> + <Card title={<div className="title-wrap"><div>{template.title}</div><div>{template.MenuNo}</div></div>}> <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/> <div className="card-operation"> <Button type="primary" onClick={() => {this.useTemplate(template, 'user')}}>浣跨敤妯℃澘</Button> diff --git a/src/views/design/sidemenu/thdmenuplus/index.scss b/src/views/design/sidemenu/thdmenuplus/index.scss index 86c37fa..dfd88e6 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.scss +++ b/src/views/design/sidemenu/thdmenuplus/index.scss @@ -70,6 +70,9 @@ .ant-col { padding: 10px; } + .ant-card-head { + padding: 0 10px; + } .ant-col.disabled { cursor: not-allowed; .ant-card-head-title { @@ -84,6 +87,15 @@ } .ant-card-head-title { text-align: center; + .title-wrap { + position: relative; + top: -8px; + height: 30px; + div { + overflow: hidden; + text-overflow: ellipsis; + } + } } .ant-card-body { padding: 2px; diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index df6d527..f46edb4 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -19,6 +19,7 @@ import MenuUtils from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' +import '@/assets/css/design.scss' import './index.scss' const { Panel } = Collapse diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 15218a9..8f7e805 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -17,6 +17,7 @@ import MenuUtils from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' +import '@/assets/css/design.scss' import './index.scss' const { Panel } = Collapse diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 8f0fe1c..5210249 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -17,6 +17,7 @@ import MenuUtils from '@/utils/utils-custom.js' import asyncComponent from '@/utils/asyncComponent' +import '@/assets/css/design.scss' import './index.scss' const { Panel } = Collapse diff --git a/src/views/popdesign/index.jsx b/src/views/popdesign/index.jsx index e95fc0f..9f5d0a7 100644 --- a/src/views/popdesign/index.jsx +++ b/src/views/popdesign/index.jsx @@ -13,6 +13,7 @@ // import antdEnUS from 'antd/es/locale/en_US' import antdZhCN from 'antd/es/locale/zh_CN' +import '@/assets/css/design.scss' import './index.scss' const _locale = antdZhCN diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx index 72f85d8..2c49a33 100644 --- a/src/views/tabledesign/index.jsx +++ b/src/views/tabledesign/index.jsx @@ -13,6 +13,7 @@ import MKEmitter from '@/utils/events.js' import asyncComponent from '@/utils/asyncComponent' +import '@/assets/css/design.scss' import './index.scss' const { Panel } = Collapse -- Gitblit v1.8.0