From b2135fbd0b72d60f392bb75f0356aa727654d2f9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 31 十二月 2020 15:11:12 +0800 Subject: [PATCH] 2020-12-31 --- src/components/tabview/index.jsx | 2 src/components/tabview/index.scss | 2 src/menu/datasource/verifycard/utils.jsx | 16 +++-- src/tabviews/zshare/topSearch/index.jsx | 2 src/menu/components/card/prop-card/index.scss | 7 +- src/templates/zshare/verifycard/customscript/index.jsx | 5 + src/menu/components/tabs/antv-tabs/index.scss | 3 src/menu/components/chart/antv-bar/index.scss | 3 src/menu/components/table/normal-table/index.scss | 3 src/templates/zshare/verifycard/customform/index.jsx | 5 + src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx | 5 + src/menu/components/card/data-card/index.scss | 7 +- src/tabviews/zshare/actionList/normalbutton/index.jsx | 2 src/tabviews/custom/components/card/data-card/index.scss | 2 src/assets/mobimg/group.png | 0 src/menu/components/search/main-search/index.scss | 3 src/templates/sharecomponent/settingcomponent/settingform/utils.jsx | 7 ++ src/tabviews/custom/components/card/data-card/index.jsx | 2 src/utils/utils.js | 4 src/index.js | 3 src/menu/components/card/table-card/index.scss | 5 + src/tabviews/custom/components/card/prop-card/index.scss | 2 src/menu/components/chart/antv-pie/index.scss | 5 + src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx | 6 ++ src/menu/components/card/data-card/index.jsx | 2 src/tabviews/zshare/actionList/printbutton/index.jsx | 2 src/menu/modelsource/option.jsx | 6 - src/views/menudesign/index.scss | 9 ++ src/menu/components/card/data-card/wrapsetting/settingform/index.jsx | 12 ---- src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx | 6 ++ src/menu/components/card/prop-card/index.jsx | 2 31 files changed, 88 insertions(+), 52 deletions(-) diff --git a/src/assets/mobimg/group.png b/src/assets/mobimg/group.png new file mode 100644 index 0000000..499e5ed --- /dev/null +++ b/src/assets/mobimg/group.png Binary files differ diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx index 3a7e507..faf1a35 100644 --- a/src/components/tabview/index.jsx +++ b/src/components/tabview/index.jsx @@ -237,7 +237,7 @@ <Tabs.TabPane tab={ <span className="tab-control"> - {['CommonTable', 'FormTab', 'TreePage', 'CalendarPage', 'CustomPage'].includes(view.type) ? + {['CommonTable', 'FormTab', 'TreePage', 'CalendarPage', 'CustomPage', 'ManageTable', 'VerupTable'].includes(view.type) ? <Icon type="redo" onClick={(e) => {this.refreshTabview(e, view)}}/> : null } <span className="tab-name" onClick={(e) => {this.changeTab(e, view)}}> diff --git a/src/components/tabview/index.scss b/src/components/tabview/index.scss index 9264d02..d318204 100644 --- a/src/components/tabview/index.scss +++ b/src/components/tabview/index.scss @@ -25,7 +25,7 @@ } span.tab-control i.anticon-redo { position: absolute; - left: -5px; + left: -3px; top: 18px; font-size: 14px; margin: 0px; diff --git a/src/index.js b/src/index.js index bed4ffe..6398a87 100644 --- a/src/index.js +++ b/src/index.js @@ -70,9 +70,10 @@ GLOB.filter = config.filter || '' if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { - GLOB.externalDatabase = config.externalDatabase || '' + GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' } else { GLOB.externalDatabase = null + } // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index 95244bc..ff1bd6f 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -376,7 +376,7 @@ } return ( - <div className="menu-data-card-edit-box" style={{...card.style, minHeight: card.wrap.minHeight}}> + <div className="menu-data-card-edit-box" style={{...card.style}}> <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/menu/components/card/data-card/index.scss b/src/menu/components/card/data-card/index.scss index aeac6a2..6346310 100644 --- a/src/menu/components/card/data-card/index.scss +++ b/src/menu/components/card/data-card/index.scss @@ -5,7 +5,7 @@ background-position: center center; background-repeat: no-repeat; background-size: cover; - min-height: 100px; + min-height: 20px; .card-control { position: absolute; @@ -39,7 +39,7 @@ } .card-item:hover { - box-shadow: 0px 0px 2px #e8e8e8; + box-shadow: 0px 0px 2px #1890ff; } .model-menu-card-cell-list .card-detail-row > .anticon-plus { @@ -82,5 +82,6 @@ clear: both; } .menu-data-card-edit-box:hover { - box-shadow: 0px 0px 2px #e8e8e8; + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } diff --git a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx index 035ceab..08b58e2 100644 --- a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx +++ b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx @@ -197,18 +197,6 @@ )} </Form.Item> </Col> : null} - {config.subtype !== 'tablecard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鍗$墖澶栬竟妗嗙殑鏈�灏忛珮搴︼紝鎺у埗鏁版嵁鍔犺浇鏃剁粍浠剁殑鍗犱綅銆�"> - <Icon type="question-circle" /> - 鏈�灏忛珮搴� - </Tooltip> - }> - {getFieldDecorator('minHeight', { - initialValue: wrap.minHeight || 100 - })(<InputNumber min={20} max={2000} precision={0} onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> : null} {config.subtype === 'tablecard' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="琛ㄦ牸楂樺害锛岃秴鍑烘椂婊氬姩锛岄珮搴︿负绌烘椂鏍规嵁鍐呭鑷�傚簲銆�"> diff --git a/src/menu/components/card/prop-card/index.jsx b/src/menu/components/card/prop-card/index.jsx index 0040e4d..bcf9f79 100644 --- a/src/menu/components/card/prop-card/index.jsx +++ b/src/menu/components/card/prop-card/index.jsx @@ -342,7 +342,7 @@ } return ( - <div className="menu-prop-card-edit-box" style={{...card.style, minHeight: card.wrap.minHeight}}> + <div className="menu-prop-card-edit-box" style={{...card.style}}> <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> diff --git a/src/menu/components/card/prop-card/index.scss b/src/menu/components/card/prop-card/index.scss index 6ff3b7f..de15f61 100644 --- a/src/menu/components/card/prop-card/index.scss +++ b/src/menu/components/card/prop-card/index.scss @@ -5,7 +5,7 @@ background-position: center center; background-repeat: no-repeat; background-size: cover; - min-height: 100px; + min-height: 20px; .card-control { position: absolute; @@ -39,7 +39,7 @@ } .card-item:hover { - box-shadow: 0px 0px 2px #e8e8e8; + box-shadow: 0px 0px 2px #1890ff; } .model-menu-card-cell-list .card-detail-row > .anticon-plus { @@ -72,5 +72,6 @@ clear: both; } .menu-prop-card-edit-box:hover { - box-shadow: 0px 0px 2px #e8e8e8; + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } diff --git a/src/menu/components/card/table-card/index.scss b/src/menu/components/card/table-card/index.scss index 3126484..93b788c 100644 --- a/src/menu/components/card/table-card/index.scss +++ b/src/menu/components/card/table-card/index.scss @@ -55,7 +55,7 @@ } .card-item:hover { - box-shadow: 0px 0px 2px #e8e8e8; + box-shadow: 0px 0px 2px #1890ff; } .model-menu-card-cell-list .card-detail-row > .anticon-plus { @@ -91,5 +91,6 @@ clear: both; } .menu-table-card-edit-box:hover { - box-shadow: 0px 0px 2px #e8e8e8; + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } diff --git a/src/menu/components/chart/antv-bar/index.scss b/src/menu/components/chart/antv-bar/index.scss index 881f0d4..9754b3c 100644 --- a/src/menu/components/chart/antv-bar/index.scss +++ b/src/menu/components/chart/antv-bar/index.scss @@ -60,5 +60,6 @@ } } .menu-line-chart-edit-box:hover { - box-shadow: 0px 0px 2px #e8e8e8; + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } diff --git a/src/menu/components/chart/antv-pie/index.scss b/src/menu/components/chart/antv-pie/index.scss index 0b4f8f7..560f140 100644 --- a/src/menu/components/chart/antv-pie/index.scss +++ b/src/menu/components/chart/antv-pie/index.scss @@ -40,6 +40,7 @@ } } } -.menu-line-chart-edit-box:hover { - box-shadow: 0px 0px 2px #e8e8e8; +.menu-pie-chart-edit-box:hover { + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } diff --git a/src/menu/components/search/main-search/index.scss b/src/menu/components/search/main-search/index.scss index 2342b30..6d9928c 100644 --- a/src/menu/components/search/main-search/index.scss +++ b/src/menu/components/search/main-search/index.scss @@ -97,5 +97,6 @@ clear: both; } .main-search-edit-list:hover { - box-shadow: 0px 0px 2px #e8e8e8; + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } \ No newline at end of file diff --git a/src/menu/components/table/normal-table/index.scss b/src/menu/components/table/normal-table/index.scss index 694b5a5..4d382fd 100644 --- a/src/menu/components/table/normal-table/index.scss +++ b/src/menu/components/table/normal-table/index.scss @@ -60,5 +60,6 @@ clear: both; } .menu-normal-table-edit-box:hover { - box-shadow: 0px 0px 2px #e8e8e8; + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } diff --git a/src/menu/components/tabs/antv-tabs/index.scss b/src/menu/components/tabs/antv-tabs/index.scss index 15a8e81..ceee292 100644 --- a/src/menu/components/tabs/antv-tabs/index.scss +++ b/src/menu/components/tabs/antv-tabs/index.scss @@ -96,5 +96,6 @@ } } .menu-tabs-edit-box:hover { - box-shadow: 0px 0px 2px #e8e8e8; + z-index: 1; + box-shadow: 0px 0px 4px #1890ff; } diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx index 6b8a526..e51952b 100644 --- a/src/menu/datasource/verifycard/utils.jsx +++ b/src/menu/datasource/verifycard/utils.jsx @@ -23,21 +23,23 @@ } if (setting.interType === 'system' && setting.execute !== 'false') { - _dataresource = setting.dataresource + _dataresource = setting.dataresource || '' } - if (_dataresource) { - _dataresource = _dataresource.replace(/@\$|\$@/ig, '') - } - if (_customScript) { - _customScript = _customScript.replace(/@\$|\$@/ig, '') - } + _dataresource = _dataresource.replace(/@\$|\$@/ig, '') + _customScript = _customScript.replace(/@\$|\$@/ig, '') if (_customScript) { _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50) select @ErrorCode='',@retmsg ='' ${_customScript} ` } + + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + _dataresource = _dataresource.replace(/@db@/ig, window.GLOB.externalDatabase) + _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) + } // 姝e垯鏇挎崲 let _regoptions = [] diff --git a/src/menu/modelsource/option.jsx b/src/menu/modelsource/option.jsx index d6bf059..6a54b69 100644 --- a/src/menu/modelsource/option.jsx +++ b/src/menu/modelsource/option.jsx @@ -1,10 +1,9 @@ -// import zhCN from '@/locales/zh-CN/mob.js' -// import enUS from '@/locales/en-US/mob.js' import bar from '@/assets/mobimg/bar.png' import bar1 from '@/assets/mobimg/bar1.png' import line from '@/assets/mobimg/line.png' import line1 from '@/assets/mobimg/line1.png' import tabs from '@/assets/mobimg/tabs.png' +import group from '@/assets/mobimg/group.png' import card1 from '@/assets/mobimg/card1.png' import card2 from '@/assets/mobimg/card2.png' import TableCard from '@/assets/mobimg/table-card.png' @@ -14,11 +13,10 @@ import Pie2 from '@/assets/mobimg/nightingale.png' import Mainsearch from '@/assets/mobimg/mainsearch.png' -// const _dict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS - // 缁勪欢閰嶇疆淇℃伅 export const menuOptions = [ { type: 'menu', url: tabs, component: 'tabs', subtype: 'tabs', title: '鏍囩椤�', width: 24, forbid: ['billPrint'] }, + { type: 'menu', url: group, component: 'group', subtype: 'group', title: '鍒嗙粍', width: 24, forbid: ['billPrint'] }, { type: 'menu', url: Mainsearch, component: 'search', subtype: 'mainsearch', title: '鎼滅储鏉′欢', width: 24, forbid: ['billPrint'] }, { type: 'menu', url: card1, component: 'card', subtype: 'datacard', title: '鏁版嵁鍗�', config: `[{"uuid":"160135809128212dm7i29fim9ksto9od","setting":{"width":6},"style":{"paddingTop":"15px","marginTop":"4px","paddingRight":"15px","marginRight":"8px","marginLeft":"8px","backgroundColor":"rgba(255, 255, 255, 1)","borderColor":"#e8e8e8","paddingLeft":"15px","marginBottom":"4px","borderWidth":"1px","paddingBottom":"10px"},"backStyle":{},"elements":[{"datatype":"static","width":12,"marks":null,"height":1,"value":"鍏冲崟","style":{},"prefix":"","postfix":"","format":"","eleType":"text","uuid":"160231860159931untbea62sgokunc5s"},{"datatype":"static","width":12,"marks":null,"style":{"color":"rgba(250, 219, 20, 1)","textAlign":"right"},"btnstyle":{},"eleType":"icon","icon":"question-circle","field":"","uuid":"1602318768361nv8ql4t47sgcsn88b0u"},{"datatype":"static","width":24,"marks":null,"height":1,"innerHeight":36,"value":"100","style":{"fontSize":"24px","fontWeight":"500","color":"rgba(0, 0, 0, 1)"},"prefix":"","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602318817884v70gtgb65ubnm8mbcvv"},{"color":"#1890ff","width":24,"marks":null,"maxValue":100,"style":{"color":"rgba(250, 140, 22, 1)","paddingTop":"20px","paddingBottom":"10px"},"btnstyle":{},"eleType":"slider","field":"int1","uuid":"16023188871233rkktuvpp1h077igrsu"},{"eleType":"splitline","width":24,"color":"#e8e8e8","uuid":"1602320017038n31bk9o831ggug0tu0b","marks":null,"style":{"marginTop":"10px","marginBottom":"10px"},"btnstyle":{}},{"datatype":"static","width":12,"marks":null,"height":1,"value":"100","style":{"marginTop":"6px"},"prefix":"鍏冲崟","btnstyle":{},"postfix":"","format":"","eleType":"text","uuid":"1602320061243drd7lf3agvn04kgr175"}],"backElements":[]}]` }, { type: 'menu', url: card2, component: 'card', subtype: 'propcard', title: '灞炴�у崱', config: `[{"uuid":"1603681387259qaqf1127f72esmtchge","setting":{"width":6,"type":"simple"},"style":{"paddingTop":"15px","marginTop":"8px","paddingRight":"15px","marginRight":"8px","marginLeft":"8px","borderColor":"#e8e8e8","paddingLeft":"15px","marginBottom":"8px","borderWidth":"1px","paddingBottom":"15px"},"backStyle":{},"elements":[{"datatype":"static","width":12,"marks":null,"height":1,"value":"瓒呮椂宸ュ崟","style":{"color":"rgba(67, 67, 67, 0.51)"},"prefix":"","postfix":"","format":"","eleType":"text","uuid":"1603681402945qnkgm7q8cng65evn5ev"},{"eleType":"icon","datatype":"static","width":12,"icon":"question-circle","tooltip":"瓒呮椂宸ュ崟","uuid":"1603681473384i2crkbtofg4pu76k06a","marks":null,"style":{"textAlign":"right","color":"rgba(250, 219, 20, 1)"}},{"datatype":"static","width":24,"marks":null,"height":1,"innerHeight":36,"value":"100","style":{"fontSize":"24px","color":"rgba(0, 0, 0, 1)"},"prefix":"","postfix":"","format":"","eleType":"number","uuid":"1603681539870d704ufqf98kc6t7537t"},{"color":"rgba(250, 219, 20, 1)","datatype":"static","width":24,"marks":null,"maxValue":100,"value":50,"style":{"paddingTop":"10px","paddingBottom":"10px"},"eleType":"slider","uuid":"1603683067556mvupau0odvrtv45u7o8"},{"eleType":"splitline","width":24,"color":"#e8e8e8","uuid":"1603683117981t9k55k8an430fuppmci","marks":null,"style":{"paddingTop":"5px","paddingBottom":"5px"}},{"datatype":"static","width":12,"marks":null,"height":1,"value":"100","style":{"color":"rgba(0, 0, 0, 0.65)","marginTop":"10px"},"prefix":"瓒呮椂宸ュ崟 ","postfix":"","format":"","eleType":"text","uuid":"1603683136553uvsmkfohkft9idbfkhu"}],"backElements":[]}]` }, diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 03737d6..2cdf171 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -373,7 +373,7 @@ ))} </div> : null} {switchable ? <div className={'prev-page ' + (total <= _total ? 'disabled' : '')} onClick={this.nextPage}><div><div><img src={nextImg} alt=""/></div></div></div> : null} - {data && data.length === 0 ? <Empty description={false}/> : null} + {!data || data.length === 0 ? <Empty description={false}/> : null} </div> {config.wrap.pagestyle !== 'switch' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={t => `鍏� ${t} 鏉} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null} </div> diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss index c93b704..c9e972b 100644 --- a/src/tabviews/custom/components/card/data-card/index.scss +++ b/src/tabviews/custom/components/card/data-card/index.scss @@ -3,7 +3,7 @@ background-position: center center; background-repeat: no-repeat; background-size: cover; - min-height: 100px; + min-height: 20px; >.button-list.toolbar-button { padding: 0; diff --git a/src/tabviews/custom/components/card/prop-card/index.scss b/src/tabviews/custom/components/card/prop-card/index.scss index 48206ff..7ec304d 100644 --- a/src/tabviews/custom/components/card/prop-card/index.scss +++ b/src/tabviews/custom/components/card/prop-card/index.scss @@ -3,7 +3,7 @@ background-position: center center; background-repeat: no-repeat; background-size: cover; - min-height: 100px; + min-height: 20px; position: relative; .card-row-list::after { diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 58248f3..d6c03af 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -943,7 +943,7 @@ } // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { - _option.sql = _option.sql.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`) + _option.sql = _option.sql.replace(/@db@/ig, window.GLOB.externalDatabase) } cell.data_sql = Utils.formatOptions(_option.sql) diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 0a8b2ce..e317d34 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -1069,7 +1069,7 @@ } // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { - _option.sql = _option.sql.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`) + _option.sql = _option.sql.replace(/@db@/ig, window.GLOB.externalDatabase) } cell.data_sql = Utils.formatOptions(_option.sql) diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index cf78035..2b5ffe7 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -112,7 +112,7 @@ } else { // 鍚堝苟璇锋眰锛屽尯鍒嗘湰鍦板強绯荤粺 // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { - _option.sql = _option.sql.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`) + _option.sql = _option.sql.replace(/@db@/ig, window.GLOB.externalDatabase) } if (item.database === 'sso') { mainItems.push(`select '${item.field}' as obj_name,'${_option.field}' as arr_field,'${window.btoa(window.encodeURIComponent(_option.sql))}' as LText`) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx index af3c4ba..1e03a6b 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx @@ -139,6 +139,11 @@ param.LText = param.LText.replace(/@\$|\$@/ig, '') + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase) + } + param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) diff --git a/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx b/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx index 5d58a30..d690943 100644 --- a/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx +++ b/src/templates/sharecomponent/settingcalcomponent/verifycard/utils.jsx @@ -38,6 +38,12 @@ _customScript = _customScript.replace(/@\$|\$@/ig, '') } + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + _dataresource = _dataresource.replace(/@db@/ig, window.GLOB.externalDatabase) + _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) + } + // 姝e垯鏇挎崲 let _regoptions = [] let _search = '' diff --git a/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx b/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx index b58ffb7..9bde95a 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/utils.jsx @@ -9,7 +9,7 @@ */ static getDebugSql (setting, scripts, arr_field, regoptions, search) { let sql = '' - let _dataresource = setting.dataresource + let _dataresource = setting.dataresource || '' let _customScript = '' scripts && scripts.forEach(script => { _customScript += ` @@ -33,6 +33,11 @@ if (_customScript) { _customScript = _customScript.replace(/@\$|\$@/ig, '') } + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + _dataresource = _dataresource.replace(/@db@/ig, window.GLOB.externalDatabase) + _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) + } // 姝e垯鏇挎崲 let _regoptions = regoptions.map(item => { diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx index c4e1a01..3ff821a 100644 --- a/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx +++ b/src/templates/sharecomponent/treesettingcomponent/settingform/utils.jsx @@ -29,6 +29,12 @@ _dataresource = _dataresource.replace(/@\$|\$@/ig, '') _customScript = _customScript.replace(/@\$|\$@/ig, '') + + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + _dataresource = _dataresource.replace(/@db@/ig, window.GLOB.externalDatabase) + _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) + } // 姝e垯鏇挎崲 let _regoptions = [ diff --git a/src/templates/zshare/verifycard/customform/index.jsx b/src/templates/zshare/verifycard/customform/index.jsx index 38371a3..cb3310f 100644 --- a/src/templates/zshare/verifycard/customform/index.jsx +++ b/src/templates/zshare/verifycard/customform/index.jsx @@ -103,6 +103,11 @@ // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/@\$|\$@/ig, '') + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase) + } + param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index de7308c..e5058a3 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -106,6 +106,11 @@ // 鏁版嵁鏉冮檺 param.LText = param.LText.replace(/@\$|\$@/ig, '') + // 澶栬仈鏁版嵁搴撴浛鎹� + if (window.GLOB.externalDatabase !== null) { + param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase) + } + console.info(`/* sql 楠岃瘉 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`) param.LText = Utils.formatOptions(param.LText) diff --git a/src/utils/utils.js b/src/utils/utils.js index bee9aae..36e8fda 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -168,7 +168,7 @@ value = value.replace(/%/ig, ' mpercent ') // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { - value = value.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`) + value = value.replace(/@db@/ig, window.GLOB.externalDatabase) } // encode缂栫爜锛堜腑鏂囧瓧绗﹁秴鍑篵ase64鍔犲瘑鑼冨洿锛� value = window.btoa(window.encodeURIComponent(value)) @@ -239,7 +239,7 @@ value = value.replace(/%/ig, ' mpercent ') // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { - value = value.replace(/@db@/ig, `[${window.GLOB.externalDatabase}]..`) + value = value.replace(/@db@/ig, window.GLOB.externalDatabase) } let encodesql = (val) => { diff --git a/src/views/menudesign/index.scss b/src/views/menudesign/index.scss index 01d24ec..c7cd961 100644 --- a/src/views/menudesign/index.scss +++ b/src/views/menudesign/index.scss @@ -8,8 +8,15 @@ position: relative; background: #ffffff; padding: 50px 0px 0px 0px; - + // .menu-setting::before { + // content: ' '; + // position: absolute; + // width: 300px; + // height: 100%; + // left: 0; + // top: 0; + // } .menu-setting { position: fixed; left: 0; -- Gitblit v1.8.0