From bd9dfa6b6ff25dbab21ba9a249fc9d9f4d03dce2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 20 二月 2024 14:08:39 +0800 Subject: [PATCH] Merge branch 'develop' --- src/views/systemproc/proc/index.jsx | 10 src/templates/zshare/modalform/index.jsx | 8 src/views/basedesign/updateFormTab/index.jsx | 6 src/components/resetPassword/index.jsx | 21 src/menu/components/table/edit-table/options.jsx | 1 src/templates/sharecomponent/tablecomponent/index.jsx | 7 src/views/design/sidemenu/index.jsx | 2 public/README.txt | 1 src/menu/components/table/edit-table/columns/editColumn/index.jsx | 2 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 7 src/menu/datasource/verifycard/index.jsx | 8 src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 9 src/menu/components/share/searchcomponent/dragsearch/index.jsx | 6 src/views/design/sidemenu/editsecmenu/index.jsx | 9 src/menu/components/card/data-card/options.jsx | 1 src/menu/components/search/main-search/dragsearch/card.jsx | 7 src/tabviews/zshare/actionList/funcMegvii/index.jsx | 10 src/templates/modalconfig/dragelement/index.scss | 1 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 45 + src/tabviews/zshare/mutilform/index.jsx | 55 + src/menu/components/share/actioncomponent/actionform/index.jsx | 8 src/templates/zshare/customscript/index.jsx | 33 - src/menu/components/table/normal-table/columns/index.jsx | 4 src/menu/components/table/edit-table/columns/index.jsx | 4 package-lock.json | 6 src/views/design/header/index.jsx | 7 src/tabviews/custom/components/module/account/index.jsx | 4 src/tabviews/zshare/topSearch/index.jsx | 31 src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx | 8 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 10 src/views/tabledesign/index.jsx | 11 src/api/index.js | 4 src/mob/components/formdragelement/index.scss | 1 src/tabviews/zshare/topSearch/index.scss | 3 src/tabviews/custom/components/form/simple-form/index.jsx | 20 src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx | 8 src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.jsx | 8 src/menu/components/share/searchcomponent/index.scss | 16 src/views/pcdesign/index.jsx | 16 src/templates/comtableconfig/source.jsx | 6 src/utils/timer-task.js | 12 src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx | 6 src/tabviews/custom/components/form/step-form/index.jsx | 20 src/menu/components/share/colsControl/index.jsx | 9 src/utils/utils-datamanage.js | 20 src/menu/components/table/edit-table/columns/tableIn/index.jsx | 8 src/utils/utils-custom.js | 75 ++ src/templates/comtableconfig/updatetable/index.jsx | 6 src/views/mkiframe/index.jsx | 22 src/tabviews/custom/components/share/normalTable/index.scss | 4 src/views/design/header/editfirstmenu/index.jsx | 9 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 6 public/options.json | 1 src/menu/components/share/searchcomponent/dragsearch/card.jsx | 11 src/views/tabledesign/source.jsx | 20 src/views/billprint/index.jsx | 6 src/menu/components/share/colsControl/markform/index.jsx | 1 src/tabviews/zshare/actionList/normalbutton/index.jsx | 72 +- src/views/design/sidemenu/editthdmenu/index.jsx | 11 src/views/mobdesign/index.jsx | 16 src/views/menudesign/index.jsx | 11 src/menu/components/card/double-data-card/options.jsx | 1 src/menu/components/share/actioncomponent/formconfig.jsx | 25 src/menu/modalconfig/tablecomponent/index.jsx | 7 src/tabviews/zshare/mutilform/mkPopSelect/index.jsx | 24 src/templates/zshare/createinterface/index.jsx | 7 src/views/appmanage/index.jsx | 22 src/views/design/header/versions/index.jsx | 9 src/views/design/sidemenu/thdmenuplus/index.jsx | 2 src/templates/sharecomponent/searchcomponent/index.scss | 15 src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 59 + src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx | 58 - src/menu/components/table/normal-table/options.jsx | 1 src/menu/datasource/verifycard/customscript/index.jsx | 45 - src/menu/transfer/index.jsx | 6 src/views/rolemanage/index.jsx | 4 src/tabviews/custom/components/share/normalTable/index.jsx | 3 src/menu/components/search/main-search/index.scss | 16 src/utils/utils.js | 71 +- src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 44 src/index.js | 1 src/tabviews/custom/components/form/tab-form/index.jsx | 20 src/menu/components/search/main-search/dragsearch/index.jsx | 6 src/tabviews/zshare/actionList/tabbutton/index.jsx | 14 src/templates/zshare/createfunc/index.jsx | 10 src/templates/treepageconfig/updatetable/index.jsx | 6 src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx | 19 src/templates/zshare/formconfig.jsx | 3 src/menu/components/table/base-table/options.jsx | 1 src/templates/zshare/verifycard/index.jsx | 7 src/components/querylog/index.jsx | 4 src/menu/replaceField/index.jsx | 7 src/menu/modulecell/index.jsx | 6 src/tabviews/zshare/actionList/printbutton/index.jsx | 6 src/tabviews/custom/components/table/edit-table/normalTable/index.scss | 3 src/templates/sharecomponent/actioncomponent/index.jsx | 8 src/tabviews/zshare/topSearch/mkNumber/index.jsx | 79 +++ src/tabviews/zshare/topSearch/mkNumber/index.scss | 16 src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx | 43 + src/tabviews/zshare/topSearch/advanceform/index.jsx | 7 100 files changed, 980 insertions(+), 475 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2a6340..c9ea0db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5490,9 +5490,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001523", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", - "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==" + "version": "1.0.30001588", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz", + "integrity": "sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==" }, "canvg": { "version": "3.0.10", diff --git a/public/README.txt b/public/README.txt index b28ccd1..fa1cceb 100644 --- a/public/README.txt +++ b/public/README.txt @@ -17,6 +17,7 @@ probation -- 璇曠敤鏈燂紙YYYY-MM-DD锛夛紝鍦ㄦ寮忕郴缁熶腑锛岃瘯鐢ㄦ湡鍐呰皟鐢ㄧ郴缁熸帴鍙g殑鑴氭湰浼氳褰曚笅鏉� transfer -- 鏄惁浣跨敤杞帴鍙o紝浣跨敤杞帴鍙f椂璇疯缃负 true, 浣跨敤杞帴鍙f椂锛屽閮ㄦ帴鍙h皟鐢ㄥ墠涓嶄細鍋氱櫥褰曢獙璇� keepPassword -- 璁颁綇瀵嗙爜锛岄粯璁ゅ紑鍚紝褰撳�间负 false 鏃剁鐢� +execType -- 鑴氭湰浼犺緭鏂瑰紡锛屽�间负x鏃讹紝鍚敤AES鍔犲瘑 updateStatus -- 鏄惁鏇存柊寮�鍙戠姸鎬侊紝榛樿寮�鍚紝褰撳�间负 false 鏃剁鐢� forcedUpdate -- 浼犺緭鍙峰崌绾ф椂锛屾槸鍚﹁嚜鍔ㄩ��鍑猴紝鏍煎紡涓猴紙YYYY-MM-DD锛夛紝鐢ㄤ簬鍗囩骇鍚庡埛鏂扮敤鎴锋湰鍦伴厤缃� platforms -- 绉诲姩绔彲浣跨敤鐨勫钩鍙扮被鍨嬶紝榛樿涓� ["H5", "wechat", "android", "ios", "wxMiniProgram"] 鍒嗗埆浠h〃H5椤甸潰銆佸井淇″叕浼楀彿銆佸畨鍗揂PP銆佽嫻鏋淎PP銆佸井淇″皬绋嬪簭 \ No newline at end of file diff --git a/public/options.json b/public/options.json index 858e91f..33a2f80 100644 --- a/public/options.json +++ b/public/options.json @@ -17,6 +17,7 @@ "probation": "", "transfer": "false", "keepPassword": "true", + "execType": "x", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], "host": "http://qingqiumarket.cn", "service": "MKWMS/" diff --git a/src/api/index.js b/src/api/index.js index cc5223d..f450c51 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1071,7 +1071,7 @@ sDebug (sql, rduri = null) { let param = { func: 's_debug_sql', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), userid: sessionStorage.getItem('UserID') || '', lang: sessionStorage.getItem('lang') || '', @@ -1090,7 +1090,7 @@ sql = sql.replace(/\n/ig, ' ') - param.LText = Utils.formatOptions(sql) + param.LText = Utils.formatOptions(sql, param.exec_type) param.secretkey = Utils.encrypt('', param.timestamp) param = this.encryptParam(param) diff --git a/src/components/querylog/index.jsx b/src/components/querylog/index.jsx index 380fc19..5dedf3b 100644 --- a/src/components/querylog/index.jsx +++ b/src/components/querylog/index.jsx @@ -69,14 +69,14 @@ let param = { func: 's_get_users_operation_log', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', LText: LText.join(' union all '), long_param: res.long_param } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) Api.getSystemConfig(param).then(result => { if (!result.status) { diff --git a/src/components/resetPassword/index.jsx b/src/components/resetPassword/index.jsx index a72283a..71ca86a 100644 --- a/src/components/resetPassword/index.jsx +++ b/src/components/resetPassword/index.jsx @@ -60,10 +60,14 @@ func: 's_PwdUpt', LText: `select '${res.originpwd}','${res.password}'` } + + if (window.GLOB.execType === 'x') { + _param.exec_type = 'x' + } - _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - _param.LText = Utils.formatOptions(_param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5瀵嗛挜 + _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) + _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) Api.getSystemConfig(_param).then(result => { if (result.status) { @@ -125,10 +129,14 @@ mob: this.state.mob, check_code: this.state.code } + + if (window.GLOB.execType === 'x') { + _param.exec_type = 'x' + } - _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - _param.LText = Utils.formatOptions(_param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5瀵嗛挜 + _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) + _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) Api.getSystemConfig(_param).then(result => { if (result.status) { @@ -169,6 +177,7 @@ onOk={this.resetPwdSubmit} onCancel={() => { this.setState({ visible: false })}} okText={okText} + cancelText="鍙栨秷" confirmLoading={loading} destroyOnClose > diff --git a/src/index.js b/src/index.js index 246d3bb..f80e527 100644 --- a/src/index.js +++ b/src/index.js @@ -53,6 +53,7 @@ GLOB.WXAppID = config.WXAppID || '' GLOB.WXminiAppID = config.WXminiAppID || '' GLOB.WXNotice = config.WXNotice + '' === 'true' + GLOB.execType = config.execType === 'x' ? 'x' : '' GLOB.accessToken = {} GLOB.mkHS = false GLOB.debugger = false diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index d220750..22cd055 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -626,6 +626,7 @@ field: 'maxPageSize', label: '姣忛〉鏈�澶ф暟', initval: wrap.maxPageSize || '', + tooltip: '鍒嗛〉鏃舵瘡椤靛彲鏄剧ず鐨勬渶澶ф暟閲忋��', min: 10, max: 500, precision: 0, diff --git a/src/menu/components/card/double-data-card/options.jsx b/src/menu/components/card/double-data-card/options.jsx index 91625de..16d9f40 100644 --- a/src/menu/components/card/double-data-card/options.jsx +++ b/src/menu/components/card/double-data-card/options.jsx @@ -278,6 +278,7 @@ field: 'maxPageSize', label: '姣忛〉鏈�澶ф暟', initval: wrap.maxPageSize || '', + tooltip: '鍒嗛〉鏃舵瘡椤靛彲鏄剧ず鐨勬渶澶ф暟閲忋��', min: 10, max: 500, precision: 0, diff --git a/src/menu/components/search/main-search/dragsearch/card.jsx b/src/menu/components/search/main-search/dragsearch/card.jsx index 1b4f6a0..e09f49c 100644 --- a/src/menu/components/search/main-search/dragsearch/card.jsx +++ b/src/menu/components/search/main-search/dragsearch/card.jsx @@ -123,6 +123,13 @@ </Radio.Group>) } else if (card.type === 'check') { formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> + } else if (card.type === 'range') { + let vals = card.initval.split(',') + formItem = (<> + <Input style={{marginTop: '4px'}} value={vals[0] || ''} /> + 鑷� + <Input style={{marginTop: '4px'}} value={vals[1] || ''} /> + </>) } return ( diff --git a/src/menu/components/search/main-search/dragsearch/index.jsx b/src/menu/components/search/main-search/dragsearch/index.jsx index c290b29..5af808c 100644 --- a/src/menu/components/search/main-search/dragsearch/index.jsx +++ b/src/menu/components/search/main-search/dragsearch/index.jsx @@ -98,11 +98,11 @@ newcard.orderType = 'asc' let _match = 'like' - if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') { + if (['select', 'link', 'checkcard'].includes(item.subType)) { _match = '=' - } else if (item.subType === 'date' || item.subType === 'datemonth') { + } else if (['date', 'datemonth'].includes(item.subType)) { _match = '>=' - } else if (item.subType === 'dateweek' || item.subType === 'daterange') { + } else if (['dateweek', 'daterange', 'range'].includes(item.subType)) { _match = 'between' } else if (item.subType === 'group') { _match = 'between' diff --git a/src/menu/components/search/main-search/index.scss b/src/menu/components/search/main-search/index.scss index 3411db9..0ad138c 100644 --- a/src/menu/components/search/main-search/index.scss +++ b/src/menu/components/search/main-search/index.scss @@ -89,6 +89,22 @@ color: orange; } } + .page-card.range { + .ant-form-item-control-wrapper { + .ant-form-item-control { + .ant-form-item-children { + display: flex; + line-height: 40px; + .ant-input:first-child { + margin-right: 5px; + } + .ant-input:last-child { + margin-left: 5px; + } + } + } + } + } .page-card.no-query { .ant-form-explain { color: #13c2c2; diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 2239c41..7885890 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -14,9 +14,9 @@ const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable')) const acTyOptions = { - pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden', 'preButton', 'formCache'], - prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden', 'preButton', 'formCache'], - exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hidden', 'preButton', 'formCache'], + pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'formCache'], + prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'formCache'], + exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton', 'formCache'], excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'], excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'], popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'], @@ -406,7 +406,7 @@ shows.push('resetPageIndex') } } else if (openType === 'tab') { - reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) + reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl', 'requiredOnce'].includes(op.value)) reRequired.linkmenu = true reTooltip.linkmenu = '' diff --git a/src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.jsx b/src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.jsx index efc3032..4ad9280 100644 --- a/src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/mkPrintTemps/index.jsx @@ -30,14 +30,14 @@ getPrintTemp = () => { let param = { func: 'sPC_Get_SelectedList', - LText: Utils.formatOptions(queryPrintSql), + LText: Utils.formatOptions(queryPrintSql, 'x'), obj_name: 'data', - arr_field: 'PN,ID,Images' + arr_field: 'PN,ID,Images', + exec_type: 'x' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) - + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(param).then(res => { diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 24a4df8..8c39bc9 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -686,7 +686,7 @@ key: 'execSuccess', label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�', required: true, options: [{ value: 'never', @@ -714,7 +714,7 @@ key: 'execError', label: '澶辫触鍚�', initVal: card.execError || 'never', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�', required: true, options: [{ value: 'never', @@ -1037,6 +1037,15 @@ label: '纭鎻愮ず', initVal: card.tipTitle || '', tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', + required: false + }, + { + type: 'text', + key: 'hoverTitle', + label: '鎮诞鎻愮ず', + initVal: card.hoverTitle || '', + tooltip: '榧犳爣鎮诞鍦ㄦ寜閽笂鏂规椂鐨勬彁绀轰俊鎭��', + forbid: appType === 'mob', required: false }, { @@ -1896,7 +1905,7 @@ key: 'execSuccess', label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�', required: true, options: [{ value: 'never', @@ -1921,7 +1930,7 @@ key: 'execError', label: '澶辫触鍚�', initVal: card.execError || 'never', - tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊鍝竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊鍝竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�', required: true, options: [{ value: 'never', @@ -2168,6 +2177,14 @@ required: false }, { + type: 'text', + key: 'hoverTitle', + label: '鎮诞鎻愮ず', + initVal: card.hoverTitle || '', + tooltip: '榧犳爣鎮诞鍦ㄦ寜閽笂鏂规椂鐨勬彁绀轰俊鎭��', + required: false + }, + { type: 'radio', key: 'openTab', label: '鎵撳紑鏂瑰紡', diff --git a/src/menu/components/share/colsControl/index.jsx b/src/menu/components/share/colsControl/index.jsx index f7967b9..882c037 100644 --- a/src/menu/components/share/colsControl/index.jsx +++ b/src/menu/components/share/colsControl/index.jsx @@ -35,6 +35,9 @@ title: '瀵规瘮鏂瑰紡', dataIndex: 'match', width: '18%', + render: text => { + return text === 'regexp' ? '姝e垯琛ㄨ揪寮�' : text + } }, { title: '瀵规瘮鍊�', @@ -164,8 +167,10 @@ let cvalues = {} let cols = config.cols.map(item => { - let types = {custom: '鑷畾涔夊垪', colspan: '鍚堝苟鍒�'} - let label = types[item.type] ? `${item.label}锛�${types[item.type]}锛塦 : item.label + let label = item.label + if (item.type === 'colspan' && item.subcols && item.subcols.length > 0) { + label = `${item.label}锛�${item.subcols.map(cell => cell.label).join('銆�')}锛塦 + } cvalues[item.uuid] = label diff --git a/src/menu/components/share/colsControl/markform/index.jsx b/src/menu/components/share/colsControl/markform/index.jsx index 7a29c8d..b727a79 100644 --- a/src/menu/components/share/colsControl/markform/index.jsx +++ b/src/menu/components/share/colsControl/markform/index.jsx @@ -96,6 +96,7 @@ <Select.Option value="!="> != </Select.Option> <Select.Option value=">"> > </Select.Option> <Select.Option value="<"> < </Select.Option> + <Select.Option value="regexp"> 姝e垯琛ㄨ揪寮� </Select.Option> </Select> )} </Form.Item> diff --git a/src/menu/components/share/searchcomponent/dragsearch/card.jsx b/src/menu/components/share/searchcomponent/dragsearch/card.jsx index 07df0ae..6061187 100644 --- a/src/menu/components/share/searchcomponent/dragsearch/card.jsx +++ b/src/menu/components/share/searchcomponent/dragsearch/card.jsx @@ -67,6 +67,7 @@ } let formItem = null + let type = '' if (card.type === 'text') { if (card.inputType !== 'search') { formItem = <Input placeholder={card.label} value={card.initval} /> @@ -113,6 +114,14 @@ formItem = (<Switch checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''} style={{marginTop: '8px'}} checked={card.initval === card.openVal}/>) } else if (card.type === 'check') { formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> + } else if (card.type === 'range') { + type = 'range-wrap' + let vals = card.initval.split(',') + formItem = (<> + <Input style={{marginTop: '4px'}} value={vals[0] || ''} /> + 鑷� + <Input style={{marginTop: '4px'}} value={vals[1] || ''} /> + </>) } let labelwidth = card.labelwidth || 33.3 @@ -128,7 +137,7 @@ <CloseOutlined className="close" title="鍒犻櫎" onClick={() => delCard(id)} /> </div> } trigger="hover"> - <div className={'page-card ' + (card.labelShow || '')} style={{ opacity: opacity}}> + <div className={`page-card ${type} ${card.labelShow || ''}`} style={{ opacity: opacity}}> <div ref={node => drag(drop(node))}> <Form.Item labelCol={{style: {width: labelwidth + '%'}}} diff --git a/src/menu/components/share/searchcomponent/dragsearch/index.jsx b/src/menu/components/share/searchcomponent/dragsearch/index.jsx index 8a063a7..87b345e 100644 --- a/src/menu/components/share/searchcomponent/dragsearch/index.jsx +++ b/src/menu/components/share/searchcomponent/dragsearch/index.jsx @@ -98,11 +98,11 @@ newcard.orderType = 'asc' let _match = 'like' - if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') { + if (['select', 'link', 'checkcard'].includes(item.subType)) { _match = '=' - } else if (item.subType === 'date' || item.subType === 'datemonth') { + } else if (['date', 'datemonth'].includes(item.subType)) { _match = '>=' - } else if (item.subType === 'dateweek' || item.subType === 'daterange') { + } else if (['dateweek', 'daterange', 'range'].includes(item.subType)) { _match = 'between' } else if (item.subType === 'group') { _match = 'between' diff --git a/src/menu/components/share/searchcomponent/index.scss b/src/menu/components/share/searchcomponent/index.scss index fccf1bf..fd5bdac 100644 --- a/src/menu/components/share/searchcomponent/index.scss +++ b/src/menu/components/share/searchcomponent/index.scss @@ -56,6 +56,22 @@ float: left; } } + .page-card.range-wrap { + .ant-form-item-control-wrapper { + .ant-form-item-control { + .ant-form-item-children { + display: flex; + line-height: 40px; + .ant-input:first-child { + margin-right: 5px; + } + .ant-input:last-child { + margin-left: 5px; + } + } + } + } + } .page-card.false { .ant-form-item-label { display: none; diff --git a/src/menu/components/table/base-table/options.jsx b/src/menu/components/table/base-table/options.jsx index 9da8a3a..85ee2bf 100644 --- a/src/menu/components/table/base-table/options.jsx +++ b/src/menu/components/table/base-table/options.jsx @@ -214,6 +214,7 @@ field: 'maxPageSize', label: '姣忛〉鏈�澶ф暟', initval: wrap.maxPageSize || '', + tooltip: '鍒嗛〉鏃舵瘡椤靛彲鏄剧ず鐨勬渶澶ф暟閲忋��', min: 10, max: 500, precision: 0, diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index 48a01c1..5a1a212 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -441,6 +441,15 @@ }, { type: 'select', + key: 'showField', + label: '鏄剧ず瀛楁', + initVal: card.showField || '', + tooltip: '鐢ㄤ簬鎺у埗鍗曞厓鏍间腑鐨勬樉绀哄唴瀹广��', + required: false, + options: 'columns' + }, + { + type: 'select', key: 'controlField', label: '绂佺敤瀛楁', initVal: card.controlField || '', diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx index 7458ba3..4b74dca 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx @@ -78,7 +78,7 @@ } else if (this.record.editType === 'date') { _options.push('required', 'precision', 'enter', 'declareType') } else if (this.record.editType === 'popSelect') { - _options.push('required', 'enter', 'linkSubField', 'columns', 'dataSource', 'primaryKey', 'order', 'controlField', 'searchKey', 'popWidth', 'laypage', 'cache', 'onload') + _options.push('required', 'enter', 'linkSubField', 'columns', 'dataSource', 'primaryKey', 'order', 'showField', 'controlField', 'searchKey', 'popWidth', 'laypage', 'cache', 'onload') } else if (this.record.editType === 'select') { _options.push('required', 'enter', 'resourceType', 'linkSubField', 'dropdown') diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx index 9275f2e..0956ffd 100644 --- a/src/menu/components/table/edit-table/columns/index.jsx +++ b/src/menu/components/table/edit-table/columns/index.jsx @@ -75,7 +75,9 @@ return !is(fromJS(this.props.column), fromJS(nextProps.column)) || !is(fromJS(this.props.fields), fromJS(nextProps.fields)) || this.props.index !== nextProps.index || - window.GLOB.columnId === nextProps.column.uuid || window.GLOB.precolumnId === nextProps.column.uuid + (nextProps.className && this.props.className !== nextProps.className) || + window.GLOB.columnId === nextProps.column.uuid || + window.GLOB.precolumnId === nextProps.column.uuid } render() { diff --git a/src/menu/components/table/edit-table/columns/tableIn/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/index.jsx index 3518c0c..ddfa334 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/index.jsx @@ -225,18 +225,18 @@ let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from聽 s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` - _scriptSql = Utils.formatOptions(_scriptSql) + _scriptSql = Utils.formatOptions(_scriptSql, 'x') let _sParam = { func: 'sPC_Get_SelectedList', LText: _scriptSql, obj_name: 'data', - arr_field: 'funcname,longparam' + arr_field: 'funcname,longparam', + exec_type: 'x' } _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) - + _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(_sParam).then(res => { diff --git a/src/menu/components/table/edit-table/options.jsx b/src/menu/components/table/edit-table/options.jsx index 9ff9cf7..7773bdf 100644 --- a/src/menu/components/table/edit-table/options.jsx +++ b/src/menu/components/table/edit-table/options.jsx @@ -225,6 +225,7 @@ field: 'maxPageSize', label: '姣忛〉鏈�澶ф暟', initval: wrap.maxPageSize || '', + tooltip: '鍒嗛〉鏃舵瘡椤靛彲鏄剧ず鐨勬渶澶ф暟閲忋��', min: 10, max: 500, precision: 0, diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index 585012a..a7a32e9 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -75,7 +75,9 @@ return !is(fromJS(this.props.column), fromJS(nextProps.column)) || !is(fromJS(this.props.fields), fromJS(nextProps.fields)) || this.props.index !== nextProps.index || - window.GLOB.columnId === nextProps.column.uuid || window.GLOB.precolumnId === nextProps.column.uuid + (nextProps.className && this.props.className !== nextProps.className) || + window.GLOB.columnId === nextProps.column.uuid || + window.GLOB.precolumnId === nextProps.column.uuid } render() { diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx index 2d8f748..416258c 100644 --- a/src/menu/components/table/normal-table/options.jsx +++ b/src/menu/components/table/normal-table/options.jsx @@ -257,6 +257,7 @@ field: 'maxPageSize', label: '姣忛〉鏈�澶ф暟', initval: wrap.maxPageSize || '', + tooltip: '鍒嗛〉鏃舵瘡椤靛彲鏄剧ず鐨勬渶澶ф暟閲忋��', min: 10, max: 500, precision: 0, diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx index a9c6aef..7c60348 100644 --- a/src/menu/datasource/verifycard/customscript/index.jsx +++ b/src/menu/datasource/verifycard/customscript/index.jsx @@ -6,7 +6,7 @@ import Toast from 'antd-mobile/es/components/toast' import Dialog from 'antd-mobile/es/components/dialog' -import { checkSQL } from '@/utils/utils-custom.js' +import { checkSQL, getSearchFields } from '@/utils/utils-custom.js' import CodeMirror from '@/templates/zshare/codemirror' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -33,48 +33,17 @@ UNSAFE_componentWillMount() { const { searches } = this.props - this.getSearchField(searches) + this.setState({ + usefulFields: getSearchFields(searches) + }) } UNSAFE_componentWillReceiveProps (nextProps) { if (!is(fromJS(this.props.searches), fromJS(nextProps.searches))) { - this.getSearchField(nextProps.searches) + this.setState({ + usefulFields: getSearchFields(nextProps.searches) + }) } - } - - getSearchField = (searches) => { - let _usefulFields = [] - searches.forEach(item => { - if (item.type === 'dateweek') { - _usefulFields.push(item.key) - _usefulFields.push(item.key + '1') - } else if (item.type === 'datemonth') { - if (item.match === '=') { - _usefulFields.push(item.key) - } else { - _usefulFields.push(item.key) - _usefulFields.push(item.key + '1') - } - } else if (item.type === 'daterange') { - let _skey = item.key - let _ekey = item.key + '1' - - if (/,/.test(item.key)) { - _skey = item.key.split(',')[0] - _ekey = item.key.split(',')[1] - } - _usefulFields.push(_skey) - _usefulFields.push(_ekey) - } else if (item.type === 'date' && _usefulFields.includes(item.key)) { - _usefulFields.push(item.key + '1') - } else { - _usefulFields.push(item.key) - } - }) - - this.setState({ - usefulFields: _usefulFields.join(', ') - }) } edit = (record) => { diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index fd6a079..e103038 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/src/menu/datasource/verifycard/index.jsx @@ -263,18 +263,18 @@ let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from聽 s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` - _scriptSql = Utils.formatOptions(_scriptSql) + _scriptSql = Utils.formatOptions(_scriptSql, 'x') let _sParam = { func: 'sPC_Get_SelectedList', LText: _scriptSql, obj_name: 'data', - arr_field: 'funcname,longparam' + arr_field: 'funcname,longparam', + exec_type: 'x' } _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) - + _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(_sParam).then(res => { diff --git a/src/menu/modalconfig/tablecomponent/index.jsx b/src/menu/modalconfig/tablecomponent/index.jsx index 37e9cba..4d1e307 100644 --- a/src/menu/modalconfig/tablecomponent/index.jsx +++ b/src/menu/modalconfig/tablecomponent/index.jsx @@ -40,12 +40,13 @@ func: 'sPC_Get_SelectedList', LText: queryTableSql, obj_name: 'data', - arr_field: 'TbName,Remark' + arr_field: 'TbName,Remark', + exec_type: 'x' } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� diff --git a/src/menu/modulecell/index.jsx b/src/menu/modulecell/index.jsx index 66e9f76..4bc5e54 100644 --- a/src/menu/modulecell/index.jsx +++ b/src/menu/modulecell/index.jsx @@ -85,7 +85,11 @@ { subType: 'dateweek', text: '鏃ユ湡锛堝懆锛�', type: 'search' }, { subType: 'datemonth', text: '鏃ユ湡锛堟湀锛�', type: 'search' }, { subType: 'daterange', text: '鏃ユ湡锛堝尯闂达級', type: 'search' }, - { subType: 'group', text: '鏃ユ湡锛堢粍鍚堬級', type: 'search' } + { subType: 'group', text: '鏃ユ湡锛堢粍鍚堬級', type: 'search' }, + { subType: 'range', text: '鏁板�硷紙鍖洪棿锛�', type: 'search' }, + { subType: 'switch', text: '寮�鍏�', type: 'search' }, + { subType: 'radio', text: '鍗曢�夋', type: 'search' }, + { subType: 'check', text: '鍕鹃�夋', type: 'search' }, ] }, { diff --git a/src/menu/replaceField/index.jsx b/src/menu/replaceField/index.jsx index 4e47d3a..822ac40 100644 --- a/src/menu/replaceField/index.jsx +++ b/src/menu/replaceField/index.jsx @@ -36,12 +36,13 @@ func: 'sPC_Get_SelectedList', LText: queryTableSql, obj_name: 'data', - arr_field: 'TbName,Remark' + arr_field: 'TbName,Remark', + exec_type: 'x' } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� diff --git a/src/menu/transfer/index.jsx b/src/menu/transfer/index.jsx index 04223ca..1919b20 100644 --- a/src/menu/transfer/index.jsx +++ b/src/menu/transfer/index.jsx @@ -239,12 +239,12 @@ debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), - LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config))) + LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config))), + LText: '' } - param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) Api.getCloudConfig(param).then(res => { _resolve() diff --git a/src/mob/components/formdragelement/index.scss b/src/mob/components/formdragelement/index.scss index 2798a34..29ff2b8 100644 --- a/src/mob/components/formdragelement/index.scss +++ b/src/mob/components/formdragelement/index.scss @@ -309,6 +309,7 @@ font-weight: inherit; padding-left: 10px; padding-top: 10px; + min-height: 15px; border-bottom: 1px solid #e9e9e9; } .check-card-edit-box .card-cell span { diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx index a844a2c..b9928e1 100644 --- a/src/tabviews/custom/components/form/simple-form/index.jsx +++ b/src/tabviews/custom/components/form/simple-form/index.jsx @@ -94,6 +94,7 @@ MKEmitter.addListener('reloadData', this.reloadData) MKEmitter.addListener('mkFormSubmit', this.mkFormSubmit) MKEmitter.addListener('resetSelectLine', this.resetParentParam) + MKEmitter.addListener('queryModuleParam', this.queryModuleParam) MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) if (config.setting.sync === 'true') { @@ -123,6 +124,7 @@ MKEmitter.removeListener('searchRefresh', this.searchRefresh) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) MKEmitter.removeListener('transferSyncData', this.transferSyncData) + MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) } @@ -179,6 +181,24 @@ }) } + /** + * @description 鑾峰彇缁勪欢鎼滅储 + */ + queryModuleParam = (menuId, callback) => { + const { config } = this.state + + if (config.uuid !== menuId) return + + let searches = [] + if (config.setting.useMSearch) { // 涓昏〃鎼滅储鏉′欢 + searches = window.GLOB.SearchBox.get(config.$searchId) || [] + } + + callback({ + search: searches + }) + } + reloadData = (menuId, id) => { const { config, group } = this.state diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx index 03ab2b7..b22dba9 100644 --- a/src/tabviews/custom/components/form/step-form/index.jsx +++ b/src/tabviews/custom/components/form/step-form/index.jsx @@ -131,6 +131,7 @@ MKEmitter.addListener('reloadData', this.reloadData) MKEmitter.addListener('mkFormSubmit', this.mkFormSubmit) MKEmitter.addListener('resetSelectLine', this.resetParentParam) + MKEmitter.addListener('queryModuleParam', this.queryModuleParam) MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) if (config.setting.sync === 'true') { @@ -160,6 +161,7 @@ MKEmitter.removeListener('searchRefresh', this.searchRefresh) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) MKEmitter.removeListener('transferSyncData', this.transferSyncData) + MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) } @@ -224,6 +226,24 @@ }) } + /** + * @description 鑾峰彇缁勪欢鎼滅储 + */ + queryModuleParam = (menuId, callback) => { + const { config } = this.state + + if (config.uuid !== menuId) return + + let searches = [] + if (config.setting.useMSearch) { // 涓昏〃鎼滅储鏉′欢 + searches = window.GLOB.SearchBox.get(config.$searchId) || [] + } + + callback({ + search: searches + }) + } + reloadData = (menuId, id) => { const { config } = this.state diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index ba5f788..da36b3c 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -105,6 +105,7 @@ MKEmitter.addListener('reloadData', this.reloadData) MKEmitter.addListener('mkFormSubmit', this.mkFormSubmit) MKEmitter.addListener('resetSelectLine', this.resetParentParam) + MKEmitter.addListener('queryModuleParam', this.queryModuleParam) MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) if (config.setting.sync === 'true') { @@ -134,6 +135,7 @@ MKEmitter.removeListener('searchRefresh', this.searchRefresh) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) MKEmitter.removeListener('transferSyncData', this.transferSyncData) + MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) } @@ -190,6 +192,24 @@ }) } + /** + * @description 鑾峰彇缁勪欢鎼滅储 + */ + queryModuleParam = (menuId, callback) => { + const { config } = this.state + + if (config.uuid !== menuId) return + + let searches = [] + if (config.setting.useMSearch) { // 涓昏〃鎼滅储鏉′欢 + searches = window.GLOB.SearchBox.get(config.$searchId) || [] + } + + callback({ + search: searches + }) + } + reloadData = (menuId, id) => { const { config } = this.state diff --git a/src/tabviews/custom/components/module/account/index.jsx b/src/tabviews/custom/components/module/account/index.jsx index bdc02be..9d0054d 100644 --- a/src/tabviews/custom/components/module/account/index.jsx +++ b/src/tabviews/custom/components/module/account/index.jsx @@ -135,12 +135,12 @@ LText: `delete tmp_session_show_key where createuserid='${userid}' and key_type='fcc_years' insert into tmp_session_show_key ( key_id,key_type,createuserid,CreateUser,CreateStaff) select '${item.id}','fcc_years','${userid}','${sid}','${sessionStorage.getItem('Full_Name') || ''}'`, - exec_type: 'y' + exec_type: window.GLOB.execType || 'y' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) Api.genericInterface(param).then(res => { if (!res.status) { diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 5f6859a..2b00baa 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -651,6 +651,9 @@ result = originVal === contrastVal } else if (item.match === '!=') { result = originVal !== contrastVal + } else if (item.match === 'regexp') { + let reg = new RegExp(item.contrastValue, 'ig') + result = reg.test(originVal) } else { originVal = isNaN(originVal) ? originVal : +originVal contrastVal = isNaN(contrastVal) ? contrastVal : +contrastVal diff --git a/src/tabviews/custom/components/share/normalTable/index.scss b/src/tabviews/custom/components/share/normalTable/index.scss index 1a1123c..41dce81 100644 --- a/src/tabviews/custom/components/share/normalTable/index.scss +++ b/src/tabviews/custom/components/share/normalTable/index.scss @@ -13,7 +13,9 @@ top: -22px; z-index: 2; } - + .ant-table-placeholder { + border-top-color: var(--mk-table-border-color); + } .normal-table-footer { padding: 10px 0px; color: rgba(0, 0, 0, 0.65); diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 57dba86..ee270d7 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -752,6 +752,10 @@ } else if (content === config.closeVal) { content = config.closeText } + } else if (col.editType === 'popSelect') { + if (col.showField) { + content = record[col.showField] || content + } } if (content !== '') { @@ -809,8 +813,13 @@ <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/> </td>) } else if (col.editType === 'popSelect') { + let showValue = '' + if (col.showField) { + showValue = record[col.showField] || '' + } + return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell"> - <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/> + <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/> </td>) } else { return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell"> @@ -1056,8 +1065,13 @@ <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={false} onChange={this.onColChange}/> ) } else if (col.editType === 'popSelect') { + let showValue = '' + if (col.showField) { + showValue = record[col.showField] || '' + } + children = ( - <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/> + <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/> ) } else { children = ( @@ -1077,6 +1091,10 @@ content = config.openText } else if (content === config.closeVal) { content = config.closeText + } + } else if (col.editType === 'popSelect') { + if (col.showField) { + content = record[col.showField] || content } } @@ -1682,6 +1700,9 @@ result = originVal === contrastVal } else if (item.match === '!=') { result = originVal !== contrastVal + } else if (item.match === 'regexp') { + let reg = new RegExp(item.contrastValue, 'ig') + result = reg.test(originVal) } else { originVal = isNaN(originVal) ? originVal : +originVal contrastVal = isNaN(contrastVal) ? contrastVal : +contrastVal @@ -1870,9 +1891,13 @@ } if (param.LText) { - param.LText = Utils.formatOptions(param.LText) + if (window.GLOB.execType === 'x') { + param.exec_type = 'x' + } + + param.LText = Utils.formatOptions(param.LText, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) deffers.push( new Promise(resolve => { @@ -1901,9 +1926,13 @@ } if (mainparam.LText) { - mainparam.LText = Utils.formatOptions(mainparam.LText) + if (window.GLOB.execType === 'x') { + mainparam.exec_type = 'x' + } + + mainparam.LText = Utils.formatOptions(mainparam.LText, mainparam.exec_type) mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) + mainparam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : mainparam.LText, mainparam.timestamp) if (window.GLOB.mainSystemApi) { mainparam.rduri = window.GLOB.mainSystemApi @@ -2328,8 +2357,8 @@ delete param.excel_in - param.exec_type = 'y' - param.LText = Utils.formatOptions(result.sql) + param.exec_type = window.GLOB.execType || 'y' + param.LText = Utils.formatOptions(result.sql, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss index 59af907..1f2fb54 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.scss +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.scss @@ -11,6 +11,9 @@ position: relative; // z-index: 1; } + .ant-table-placeholder { + border-top-color: var(--mk-table-border-color); + } .ant-table { color: inherit; font-size: inherit; diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx index 4428a97..d74157b 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx @@ -44,7 +44,7 @@ let param = { func: 'sPC_Get_TableData', obj_name: 'data', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', arr_field: config.arr_field, default_sql: 'true', custom_script: '', @@ -88,8 +88,8 @@ DateCount && console.info(`/*${config.label} 鎬绘暟鏌ヨ*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) } - param.LText = Utils.formatOptions(sql) - param.DateCount = Utils.formatOptions(DateCount) + param.LText = Utils.formatOptions(sql, param.exec_type) + param.DateCount = Utils.formatOptions(DateCount, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -234,6 +234,7 @@ this.state = { value: props.defaultValue, + showValue: props.showValue, visible: false } } @@ -275,6 +276,10 @@ const { config, lineId } = this.props let values = {[config.field]: record.$$uuid} + let showValue = '' + if (config.showField) { + showValue = record[config.showField] || '' + } if (config.linkSubField) { config.linkSubField.forEach((m, i) => { @@ -284,7 +289,7 @@ this.props.onChange(values, record.$$uuid) - this.setState({visible: false, value: record.$$uuid}) + this.setState({visible: false, value: record.$$uuid, showValue}) if (config.$ctrl) { MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) @@ -329,7 +334,7 @@ } this.props.onChange(values, '') - this.setState({value: ''}) + this.setState({value: '', showValue: ''}) if (config.$ctrl) { MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) @@ -350,12 +355,12 @@ render() { const { autoFocus, BID, lineId, config } = this.props - const { value, visible } = this.state + const { showValue, value, visible } = this.state return <> {autoFocus ? <div className="mk-pop-select-mask" onClick={this.trigger}></div> : null} <div className="mk-pop-select-wrap" onClick={this.trigger}> - {value} + {showValue || value} {value && !autoFocus ? <CloseCircleFilled onClick={this.clear} /> : null} <TableOutlined onClick={this.trigger}/> </div> diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index ea19291..b4ac4ee 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -347,7 +347,7 @@ delete param.excel_in // param.excel_in_type = 'true' - param.exec_type = 'y' + param.exec_type = window.GLOB.execType || 'y' param.LText = result.sql param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') @@ -358,7 +358,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) param.secretkey = Utils.encrypt('', param.timestamp) if (window.GLOB.mkHS) { // 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -372,7 +372,7 @@ if (unCheckParam) { unCheckParam.LText = unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') - unCheckParam.LText = Utils.formatOptions(unCheckParam.LText) + unCheckParam.LText = Utils.formatOptions(unCheckParam.LText, unCheckParam.exec_type) unCheckParam.secretkey = Utils.encrypt('', unCheckParam.timestamp) unCheckParam.menuname = btn.logLabel diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 1667d62..af9100d 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -484,7 +484,14 @@ } try { - if (imgCol) { + if (btn.verify.excelHandle === 'true') { + // eslint-disable-next-line + let func = new Function('XLSX', 'data', 'columns', 'callback', btn.verify.excel_func) + func(XLSX, data, columns, (res) => { + res = res || {ErrCode: ErrCode || 'S', message: msg || '瀵煎嚭鎴愬姛锛�'} + this.execSuccess(res) + }) + } else if (imgCol) { const column = columns.map(item => { let col = { title: item.Text, @@ -678,6 +685,7 @@ this.execSuccess({ErrCode: ErrCode || 'S', message: msg || '瀵煎嚭鎴愬姛锛�'}) } } catch (e) { + console.warn(e) this.execError({ErrCode: 'N', message: 'Excel鐢熸垚澶辫触锛�'}) } } diff --git a/src/tabviews/zshare/actionList/funcMegvii/index.jsx b/src/tabviews/zshare/actionList/funcMegvii/index.jsx index e826bcf..78adb47 100644 --- a/src/tabviews/zshare/actionList/funcMegvii/index.jsx +++ b/src/tabviews/zshare/actionList/funcMegvii/index.jsx @@ -149,17 +149,19 @@ getIpList = () => { let _scriptSql = `select ID,data_code,data_name,Remark,face_ip,face_uname,face_pwd from bd_data where typecharone='face_device' and deleted=0` - _scriptSql = Utils.formatOptions(_scriptSql) - let _sParam = { func: 'sPC_Get_SelectedList', - LText: _scriptSql, obj_name: 'data', arr_field: 'ID,data_code,data_name,Remark,face_ip,face_uname,face_pwd' } + + if (window.GLOB.execType === 'x') { + _sParam.exec_type = 'x' + } + _sParam.LText = Utils.formatOptions(_scriptSql, _sParam.exec_type) _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) + _sParam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _sParam.LText, _sParam.timestamp) NApi.getSystemCacheConfig(_sParam).then(res => { if (res.status) { diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 6c4548b..30a56a1 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -3,7 +3,7 @@ import moment from 'moment' import qs from 'qs' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd' +import { Button, Modal, notification, message, Popover, Drawer, Switch, Checkbox, Progress } from 'antd' import md5 from 'md5' import Api from '@/api' @@ -497,7 +497,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -508,7 +508,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else if (btn.OpenType === 'pop' || btn.OpenType === 'formSubmit' || btn.OpenType === 'form') { // 琛ㄥ崟 if (btn.sqlType === 'insert') { // 绯荤粺鍑芥暟娣诲姞鏃讹紝鐢熸垚uuid primaryId = '' @@ -533,7 +533,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -544,7 +544,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else { param.ID = primaryId @@ -559,7 +559,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -570,7 +570,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } } @@ -590,7 +590,7 @@ if (param.$unCheckParam) { param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') - param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) + param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText, param.exec_type) param.$unCheckParam.menuname = btn.logLabel if (window.GLOB.probation) { @@ -625,7 +625,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -636,7 +636,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else if (btn.OpenType === 'pop') { // 琛ㄥ崟 if (index !== 0) { let _cell = {} @@ -665,7 +665,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -676,7 +676,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } else { param.ID = primaryId @@ -691,7 +691,7 @@ } } - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -702,7 +702,7 @@ param.LText = param.LText.replace(/\$check@|@check\$/ig, '') } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) } } @@ -721,7 +721,7 @@ if (param.$unCheckParam) { param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') - param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) + param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText, param.exec_type) param.$unCheckParam.menuname = btn.logLabel if (window.GLOB.probation) { @@ -1732,10 +1732,10 @@ } param.LText = sql - param.exec_type = 'y' // 鍚庡彴瑙g爜 + param.exec_type = window.GLOB.execType || 'y' // 鍚庡彴瑙g爜 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) param.menuname = btn.logLabel if (window.GLOB.probation) { @@ -2494,7 +2494,7 @@ upid: id } - param.LText = Utils.formatOptions(Utils.getuuid()) + param.LText = Utils.getuuid() param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) @@ -2588,7 +2588,7 @@ msg_result: msg } - _p.LText = Utils.formatOptions(Utils.getuuid()) + _p.LText = Utils.getuuid() _p.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') _p.secretkey = Utils.encrypt(_p.LText, _p.timestamp) @@ -2636,7 +2636,7 @@ upid: id } - param.LText = Utils.formatOptions(Utils.getuuid()) + param.LText = Utils.getuuid() param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) @@ -2767,7 +2767,7 @@ upid: id } - param.LText = Utils.formatOptions(Utils.getuuid()) + param.LText = Utils.getuuid() param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) @@ -3526,18 +3526,26 @@ label = (loadingNumber ? `(${loadingNumber})` : '') + btn.label } + let BTN = <Button + type={type} + icon={icon} + id={'button' + btn.uuid} + title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} + loading={loading} + disabled={disabled} + style={btn.style} + className={className} + onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} + >{label}</Button> + + if (btn.hoverTitle) { + BTN = <Popover mouseLeaveDelay={0.3} mouseEnterDelay={0.3} content={btn.hoverTitle} trigger="hover"> + {BTN} + </Popover> + } + return <> - <Button - type={type} - icon={icon} - id={'button' + btn.uuid} - title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} - loading={loading} - disabled={disabled} - style={btn.style} - className={className} - onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} - >{label}</Button> + {BTN} <span onClick={(e) => {e.stopPropagation()}}>{this.getModels()}</span> {loadingTotal ? <Progress className="mk-button-progress" percent={(loadingTotal - loadingNumber) / loadingTotal * 100} size="small" showInfo={false} /> : null} </> diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 68bc347..da72ac9 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -962,7 +962,7 @@ let param = { func: 'sPC_Get_TableData', obj_name: 'data', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', arr_field: arrFields, default_sql: btn.verify.setting.defaultSql } @@ -1168,8 +1168,8 @@ param.menuname = btn.logLabel } - param.custom_script = Utils.formatOptions(_customScript) - param.LText = Utils.formatOptions(LText) + param.custom_script = Utils.formatOptions(_customScript, param.exec_type) + param.LText = Utils.formatOptions(LText, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 37e91d5..af1a136 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -111,7 +111,15 @@ let data = record || selectedData || [] - if (btn.Ot === 'requiredSgl' && data.length !== 1) { + if (btn.Ot !== 'notRequired' && data.length === 0) { + // 闇�瑕侀�夋嫨琛屾椂锛屾牎楠屾暟鎹� + notification.warning({ + top: 92, + message: '璇烽�夋嫨琛岋紒', + duration: 5 + }) + return false + } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { // 闇�瑕侀�夋嫨鍗曡鏃讹紝鏍¢獙鏁版嵁 notification.warning({ top: 92, @@ -125,6 +133,10 @@ if (btn.Ot === 'requiredSgl') { primaryId = data[0].$$uuid || '' + } else if (btn.Ot === 'requiredOnce') { + let ids = data.map(d => (d.$$uuid || '')) + ids = ids.filter(Boolean) + primaryId = ids.join(',') } else if (btn.Ot === 'notRequired' && BID) { primaryId = BID } diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 8a3b8e9..38dd381 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -80,7 +80,18 @@ } formlist = formlist.filter(item => { + if (item.type === 'hint') { + if (item.field && data[item.field.toLowerCase()]) { + item.message = data[item.field.toLowerCase()] + } + delete item.field + } + if (item.supField) { // 澶氬眰琛ㄥ崟鎺у埗 + if (['hint', 'split', 'formula'].includes(item.type)) { + item.field = item.uuid + fieldMap.set(item.field, item) + } let supvals = [] if (item.supvalue) { item.supvalue.split(',').forEach(val => { @@ -115,14 +126,8 @@ } } - if (item.type === 'split' || item.type === 'formula') return true - if (item.type === 'hint') { - if (item.field && data[item.field.toLowerCase()]) { - item.message = data[item.field.toLowerCase()] - } - delete item.field - return true - } else if (item.type === 'date') { + if (['hint', 'split', 'formula'].includes(item.type)) return true + if (item.type === 'date') { item.precision = item.precision || 'day' } else if (item.type === 'datetime') { item.type = 'date' @@ -261,6 +266,12 @@ newval = item.openVal } else { newval = item.closeVal + } + } else if (item.type === 'popSelect') { + if (newval && newval !== '$empty') { + item.showValue = data[item.showField.toLowerCase()] || '' + } else { + item.showValue = '' } } @@ -524,7 +535,7 @@ cell.labelCol = {style: {width: cell.labelwidth + '%'}} cell.wrapperCol = {style: {width: (100 - cell.labelwidth) + '%'}} } - if (!cell.field || !fieldMap.has(cell.field)) return cell + if (!cell.field || !fieldMap.has(cell.field) || ['hint', 'split', 'formula'].includes(cell.type)) return cell let item = fieldMap.get(cell.field) // 涓嬬骇琛ㄥ崟鎺у埗-瀛楁鍐欏叆 @@ -851,9 +862,13 @@ } if (param.LText) { - param.LText = Utils.formatOptions(param.LText) + if (window.GLOB.execType === 'x') { + param.exec_type = 'x' + } + + param.LText = Utils.formatOptions(param.LText, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -886,9 +901,13 @@ } if (mainparam.LText) { - mainparam.LText = Utils.formatOptions(mainparam.LText) + if (window.GLOB.execType === 'x') { + mainparam.exec_type = 'x' + } + + mainparam.LText = Utils.formatOptions(mainparam.LText, mainparam.exec_type) mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) + mainparam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : mainparam.LText, mainparam.timestamp) if (window.GLOB.mainSystemApi) { mainparam.rduri = window.GLOB.mainSystemApi @@ -950,10 +969,14 @@ if (window.GLOB.debugger) { console.info(param.LText) } + + if (window.GLOB.execType === 'x') { + param.exec_type = 'x' + } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) if (form.database === 'sso' && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi @@ -1312,7 +1335,7 @@ let record = {...this.record, ...values} formlist.forEach(item => { - if (!item.field) return + if (!item.field || ['hint', 'split', 'formula'].includes(item.type)) return let _item = { type: item.type, diff --git a/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx b/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx index c9bc1d6..30ef195 100644 --- a/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx +++ b/src/tabviews/zshare/mutilform/mkPopSelect/index.jsx @@ -80,6 +80,7 @@ options: [], columns, value, + showValue: config.showValue, placeholder, arr_field: arrfield.join(','), searchKey: '', @@ -122,7 +123,7 @@ let param = { func: 'sPC_Get_TableData', obj_name: 'data', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', arr_field: arr_field, default_sql: 'true', custom_script: '', @@ -166,8 +167,8 @@ DateCount && console.info(`/*${config.label} 鎬绘暟鏌ヨ*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) } - param.LText = Utils.formatOptions(sql) - param.DateCount = Utils.formatOptions(DateCount) + param.LText = Utils.formatOptions(sql, param.exec_type) + param.DateCount = Utils.formatOptions(DateCount, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -188,8 +189,17 @@ return item }) + + let showValue = this.state.showValue + + if (showValue) { + if (options.findIndex(item => this.state.value === item.$$uuid) > -1) { + showValue = '' + } + } this.setState({ + showValue, options: options, total: result.total || 0, loading: false @@ -261,7 +271,7 @@ } this.props.onChange(val, other) - this.setState({value: val}, () => { + this.setState({value: val, showValue: ''}, () => { if (config.enter === 'tab') { MKEmitter.emit('mkFC', 'focus', config.tabUuid) } else if (config.enter === 'sub') { @@ -312,14 +322,14 @@ } render() { - const { value, config, options, visible, loading, total, pageIndex, pageSize, columns, placeholder } = this.state + const { value, showValue, config, options, visible, loading, total, pageIndex, pageSize, columns, placeholder, searchKey } = this.state return <> <Select className="mk-pop-select" showSearch={!!config.searchKey} allowClear - value={value} + value={showValue || value} onSearch={(val) => val && this.searchOption(val)} filterOption={false} onChange={(val) => this.selectChange(val === undefined ? '' : val)} @@ -342,7 +352,7 @@ onCancel={() => this.setState({visible: false})} destroyOnClose > - {config.searchKey ? <Search placeholder={placeholder} onSearch={this.searchOption} enterButton /> : null} + {config.searchKey ? <Search placeholder={placeholder} defaultValue={searchKey} onSearch={this.searchOption} enterButton /> : null} <Table rowKey="$$uuid" bordered={true} diff --git a/src/tabviews/zshare/topSearch/advanceform/index.jsx b/src/tabviews/zshare/topSearch/advanceform/index.jsx index cb8a239..d35bba4 100644 --- a/src/tabviews/zshare/topSearch/advanceform/index.jsx +++ b/src/tabviews/zshare/topSearch/advanceform/index.jsx @@ -12,6 +12,7 @@ const MKSwitch = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkSwitch')) const MKRadio = asyncComponent(() => import('../mkRadio')) const MKDatePicker = asyncComponent(() => import('../mkDatePicker')) +const MKNumber = asyncComponent(() => import('../mkNumber')) class AdvanceSearch extends Component { static propTpyes = { @@ -57,6 +58,8 @@ content = <MKCheck config={item}/> } else if (item.type === 'switch') { content = <MKSwitch config={item}/> + } else if (item.type === 'range') { + content = <MKNumber config={item} onInputSubmit={this.handleSubmit} /> } if (content) { @@ -86,7 +89,9 @@ this.props.form.validateFields((err, values) => { if (err) return - this.props.advanceSubmit(values) + setTimeout(() => { + this.props.advanceSubmit(values) + }, 10) }) } diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index c3cfc0b..4e6d329 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -22,6 +22,7 @@ const MKSelect = asyncComponent(() => import('./mkSelect')) const DateGroup = asyncComponent(() => import('./dategroup')) const MKDatePicker = asyncComponent(() => import('./mkDatePicker')) +const MKNumber = asyncComponent(() => import('./mkNumber')) class MainSearch extends Component { static propTpyes = { @@ -198,7 +199,7 @@ deForms.push({ ...item, arr_field: _option.field, - data_sql: Utils.formatOptions(_option.sql) + data_sql: Utils.formatOptions(_option.sql, window.GLOB.execType) }) } else { // 鍚堝苟璇锋眰锛屽尯鍒嗘湰鍦板強绯荤粺 if (item.database === 'sso') { @@ -305,7 +306,7 @@ deForms.push({ ...item, arr_field: item.arr_field, - data_sql: Utils.formatOptions(sql) + data_sql: Utils.formatOptions(sql, window.GLOB.execType) }) } else if (item.checkShift) { let d = '' @@ -408,9 +409,13 @@ } if (param.LText) { - param.LText = Utils.formatOptions(param.LText) + if (window.GLOB.execType === 'x') { + param.exec_type = 'x' + } + + param.LText = Utils.formatOptions(param.LText, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -446,9 +451,13 @@ } if (mainparam.LText) { - mainparam.LText = Utils.formatOptions(mainparam.LText) + if (window.GLOB.execType === 'x') { + mainparam.exec_type = 'x' + } + + mainparam.LText = Utils.formatOptions(mainparam.LText, mainparam.exec_type) mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) + mainparam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : mainparam.LText, mainparam.timestamp) if (window.GLOB.mainSystemApi) { mainparam.rduri = window.GLOB.mainSystemApi @@ -501,8 +510,12 @@ param.BID = this.props.BID } + if (window.GLOB.execType === 'x') { + param.exec_type = 'x' + } + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) if (item.database === 'sso' && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi @@ -700,6 +713,8 @@ content = <MKCheck config={item} onChange={(val) => this.recordChange(val, false, item)} /> } else if (item.type === 'switch') { content = <MKSwitch config={item} onChange={(val) => this.recordChange(val, false, item)} /> + } else if (item.type === 'range') { + content = <MKNumber config={item} onInputSubmit={this.handleSubmit} /> } if (content) { @@ -873,7 +888,7 @@ let searchlist = this.state.searchlist.map(item => { item.initval = item.oriInitval - if (setting.resetContrl === 'clear' && ['text', 'date', 'datemonth', 'dateweek', 'daterange'].includes(item.type)) { + if (setting.resetContrl === 'clear' && ['text', 'date', 'datemonth', 'dateweek', 'daterange', 'range'].includes(item.type)) { item.initval = '' } diff --git a/src/tabviews/zshare/topSearch/index.scss b/src/tabviews/zshare/topSearch/index.scss index cefe1d5..3444190 100644 --- a/src/tabviews/zshare/topSearch/index.scss +++ b/src/tabviews/zshare/topSearch/index.scss @@ -6,6 +6,9 @@ float: none; vertical-align: top; } + .ant-checkbox-wrapper { + color: rgba(0, 0, 0, 0.85); + } .ant-form-item { display: flex; margin-bottom: 0px; diff --git a/src/tabviews/zshare/topSearch/mkNumber/index.jsx b/src/tabviews/zshare/topSearch/mkNumber/index.jsx new file mode 100644 index 0000000..59720ab --- /dev/null +++ b/src/tabviews/zshare/topSearch/mkNumber/index.jsx @@ -0,0 +1,79 @@ +import React, {Component} from 'react' +import { is, fromJS } from 'immutable' +import { InputNumber } from 'antd' + +import './index.scss' + +class MKNumber extends Component { + constructor(props) { + super(props) + + const config = props.config + let vals = config.initval.split(',') + + this.state = { + minValue: vals[0] !== undefined && vals[0] !== '' ? +vals[0] : '', + maxValue: vals[1] !== undefined && vals[1] !== '' ? +vals[1] : '' + } + } + + shouldComponentUpdate (nextProps, nextState) { + return !is(fromJS(this.state), fromJS(nextState)) + } + + componentWillUnmount () { + this.setState = () => { + return + } + } + + minChange = (val) => { + this.setState({minValue: val}, () => { + this.onChange() + }) + } + + maxChange = (val) => { + this.setState({maxValue: val}, () => { + this.onChange() + }) + } + + onChange = () => { + const { minValue, maxValue } = this.state + + let vals = [] + if ((!minValue && minValue !== 0) || isNaN(minValue)) { + vals.push('') + } else { + vals.push(minValue) + } + if ((!maxValue && maxValue !== 0) || isNaN(maxValue)) { + vals.push('') + } else { + vals.push(maxValue) + } + + vals = vals.join(',') + + if (vals === ',') { + vals = '' + } + + this.props.onChange(vals) + } + + render() { + const { minValue, maxValue } = this.state + + return ( + <div className="range-wrap"> + <InputNumber defaultValue={minValue} onPressEnter={this.props.onInputSubmit} onChange={this.minChange}/> + 鑷� + <InputNumber defaultValue={maxValue} onPressEnter={this.props.onInputSubmit} onChange={this.maxChange}/> + </div> + ) + } +} + +export default MKNumber \ No newline at end of file diff --git a/src/tabviews/zshare/topSearch/mkNumber/index.scss b/src/tabviews/zshare/topSearch/mkNumber/index.scss new file mode 100644 index 0000000..fac24f9 --- /dev/null +++ b/src/tabviews/zshare/topSearch/mkNumber/index.scss @@ -0,0 +1,16 @@ +.range-wrap { + display: flex; + line-height: 32px; + .ant-input-number:first-child { + margin-right: 5px; + .ant-input-number-handler-wrap { + display: none; + } + } + .ant-input-number:last-child { + margin-left: 5px; + .ant-input-number-handler-wrap { + display: none; + } + } +} \ No newline at end of file diff --git a/src/templates/comtableconfig/source.jsx b/src/templates/comtableconfig/source.jsx index f21ac4b..ff23352 100644 --- a/src/templates/comtableconfig/source.jsx +++ b/src/templates/comtableconfig/source.jsx @@ -245,6 +245,12 @@ }, { type: 'search', + label: '鏁板�硷紙鍖洪棿锛�', + subType: 'range', + url: '' + }, + { + type: 'search', label: '鏃ユ湡锛堢粍鍚堬級', subType: 'group', url: '' diff --git a/src/templates/comtableconfig/updatetable/index.jsx b/src/templates/comtableconfig/updatetable/index.jsx index 3ce78d5..97d5062 100644 --- a/src/templates/comtableconfig/updatetable/index.jsx +++ b/src/templates/comtableconfig/updatetable/index.jsx @@ -739,12 +739,12 @@ debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), - LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) + LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), + LText: '' } - param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) let save = false diff --git a/src/templates/modalconfig/dragelement/index.scss b/src/templates/modalconfig/dragelement/index.scss index c99318b..742699b 100644 --- a/src/templates/modalconfig/dragelement/index.scss +++ b/src/templates/modalconfig/dragelement/index.scss @@ -26,6 +26,7 @@ color: #1890ff; font-size: 15px; padding-left: 10px; + min-height: 21px; border-bottom: 1px solid #e9e9e9; } .ant-form-item.checkcard { diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx index 3d65364..96961c4 100644 --- a/src/templates/sharecomponent/actioncomponent/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/index.jsx @@ -88,14 +88,14 @@ let param = { func: 'sPC_Get_SelectedList', - LText: Utils.formatOptions(_sql), + LText: Utils.formatOptions(_sql, 'x'), obj_name: 'data', - arr_field: 'PN,ID,Images' + arr_field: 'PN,ID,Images', + exec_type: 'x' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) - + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(param).then(res => { diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index aa4e7b5..5dd577b 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -337,17 +337,18 @@ let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from聽 s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` - _scriptSql = Utils.formatOptions(_scriptSql) + _scriptSql = Utils.formatOptions(_scriptSql, 'x') let _sParam = { func: 'sPC_Get_SelectedList', LText: _scriptSql, obj_name: 'data', - arr_field: 'funcname,longparam' + arr_field: 'funcname,longparam', + exec_type: 'x' } _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) + _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(_sParam).then(res => { diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx index adf4197..444e507 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx @@ -7,7 +7,7 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import { checkSQL } from '@/utils/utils-custom.js' +import { checkSQL, getSearchFields } from '@/utils/utils-custom.js' import CodeMirror from '@/templates/zshare/codemirror' // import './index.scss' @@ -27,12 +27,16 @@ } UNSAFE_componentWillMount () { - this.resetfield(this.props.searches) + this.setState({ + usefulfields: getSearchFields(this.props.searches) + }) } UNSAFE_componentWillReceiveProps(nextProps) { if (!is(fromJS(this.props.searches), fromJS(nextProps.searches))) { - this.resetfield(nextProps.searches) + this.setState({ + usefulfields: getSearchFields(nextProps.searches) + }) } } @@ -50,17 +54,18 @@ let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from聽 s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` - _scriptSql = Utils.formatOptions(_scriptSql) + _scriptSql = Utils.formatOptions(_scriptSql, 'x') let _sParam = { func: 'sPC_Get_SelectedList', LText: _scriptSql, obj_name: 'data', - arr_field: 'funcname,longparam' + arr_field: 'funcname,longparam', + exec_type: 'x' } _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) + _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(_sParam).then(res => { @@ -84,47 +89,6 @@ duration: 5 }) } - }) - } - - resetfield = (searches) => { - let _usefulFields = [] - searches.forEach(item => { - if (!item.field) return - - if (item.type === 'group') { - _usefulFields.push(item.field) - _usefulFields.push(item.datefield) - _usefulFields.push(item.datefield + '1') - } else if (item.type === 'dateweek') { - _usefulFields.push(item.field) - _usefulFields.push(item.field + '1') - } else if (item.type === 'datemonth') { - if (item.match === '=') { - _usefulFields.push(item.field) - } else { - _usefulFields.push(item.field) - _usefulFields.push(item.field + '1') - } - } else if (item.type === 'daterange') { - let _skey = item.field - let _ekey = item.field + '1' - - if (/,/.test(item.field)) { - _skey = item.field.split(',')[0] - _ekey = item.field.split(',')[1] - } - _usefulFields.push(_skey) - _usefulFields.push(_ekey) - } else if (item.type === 'date' && _usefulFields.includes(item.field)) { - _usefulFields.push(item.field + '1') - } else { - _usefulFields.push(item.field) - } - }) - - this.setState({ - usefulfields: _usefulFields.join(', ') }) } diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx index 1bbd830..3460133 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx @@ -17,7 +17,8 @@ state = { dataType: '', - defaultSql: 'true' + defaultSql: 'true', + excelHandle: 'false' } UNSAFE_componentWillMount () { @@ -25,7 +26,8 @@ this.setState({ dataType: btnType === 'print' ? 'custom' : setting.dataType, - defaultSql: setting.defaultSql || 'true' + defaultSql: setting.defaultSql || 'true', + excelHandle: setting.excelHandle || 'false' }) } @@ -78,7 +80,7 @@ render() { const { setting, btnType } = this.props const { getFieldDecorator } = this.props.form - const { dataType, defaultSql } = this.state + const { dataType, defaultSql, excelHandle } = this.state const formItemLayout = { labelCol: { @@ -217,6 +219,35 @@ </Col> : null} {btnType !== 'print' ? <Col span={8}> <Form.Item label={ + <Tooltip placement="topRight" title="鑷畾涔夌敓鎴怑xcel锛屽彲鐢ㄥ弬鏁颁负 XLSX銆乨ata銆乧olumns銆乧allback銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 瀵煎嚭鏍煎紡 + </Tooltip> + }> + {getFieldDecorator('excelHandle', { + initialValue: excelHandle + })( + <Radio.Group onChange={(e) => this.setState({excelHandle: e.target.value})}> + <Radio value="false">榛樿</Radio> + <Radio value="true">鑷畾涔�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} + {btnType !== 'print' && excelHandle === 'true' ? <Col span={24} style={{paddingLeft: '30px'}}> + <Form.Item wrapperCol={ {xs: { span: 24 }, sm: { span: 24 }} } label=""> + {getFieldDecorator('excel_func', { + initialValue: setting.excel_func || '', + rules: [ + { + required: true, + message: '璇峰~鍐欒嚜瀹氫箟閫昏緫!' + } + ] + })(<CodeMirror mode="text/javascript" theme="cobalt" />)} + </Form.Item> + </Col> : null} + {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> + <Form.Item label={ <Tooltip placement="topLeft" title="瀵煎嚭excel涓伐浣滆〃鍚嶇О锛岄粯璁や负Sheet1銆�"> <QuestionCircleOutlined className="mk-form-tip" /> 宸ヤ綔琛� @@ -227,7 +258,7 @@ })(<Input placeholder="" autoComplete="off" />)} </Form.Item> </Col> : null} - {btnType !== 'print' ? <Col span={8}> + {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title="瀵煎嚭excel涓殑琛岄珮銆�"> <QuestionCircleOutlined className="mk-form-tip" /> @@ -239,7 +270,7 @@ })(<InputNumber min={10} max={200} precision={0} />)} </Form.Item> </Col> : null} - {btnType !== 'print' ? <Col span={8}> + {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title="璇峰皢闇�瑕佸悎骞剁殑琛ㄥご浣跨敤涓í绾垮垎闅旓紙濡傦細鍟嗗搧-鏁伴噺銆佸晢鍝�-鍗曚环锛夛紝鍓嶉儴鍒嗗皢浣滀负涓昏〃澶达紝鍚庨儴鍒嗗皢浣滀负瀛愯〃澶淬��"> <QuestionCircleOutlined className="mk-form-tip" /> @@ -255,7 +286,7 @@ </Radio.Group>)} </Form.Item> </Col> : null} - {btnType !== 'print' ? <Col span={8}> + {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title="Excel鍐呭鍖烘槸鍚﹁嚜鍔ㄦ崲琛屻��"> <QuestionCircleOutlined className="mk-form-tip" /> diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index 7527155..5acaeb6 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -811,28 +811,32 @@ const { card } = this.props const { activeKey, verify } = this.state - if (card.intertype !== 'system' || verify.dataType !== 'custom') { + if (activeKey === 'setting') { + this.settingForm.handleConfirm().then(res => { + if (card.intertype !== 'system' || verify.dataType !== 'custom') { + this.setState({activeKey: val, verify: {...verify, ...res}}) + } else { + this.setState({ + verify: {...verify, ...res} + }, () => { + this.setState({loading: true}) + this.sqlverify(() => { // 楠岃瘉鎴愬姛 + this.setState({ + activeKey: val, + loading: false + }) + }, () => { // 楠岃瘉澶辫触 + this.setState({ + activeKey: val, + loading: false + }) + }, verify.scripts) + }) + } + }) + } else if (card.intertype !== 'system' || verify.dataType !== 'custom') { this.setState({activeKey: val}) return - } else if (activeKey === 'setting') { - this.settingForm.handleConfirm().then(res => { - this.setState({ - verify: {...verify, ...res} - }, () => { - this.setState({loading: true}) - this.sqlverify(() => { // 楠岃瘉鎴愬姛 - this.setState({ - activeKey: val, - loading: false - }) - }, () => { // 楠岃瘉澶辫触 - this.setState({ - activeKey: val, - loading: false - }) - }, verify.scripts) - }) - }) } else if (activeKey === 'columns') { if (this.columnRef && this.columnRef.state.editingKey) { notification.warning({ diff --git a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx index 1a8128f..ccad7dd 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx @@ -285,14 +285,14 @@ let param = { func: 'sPC_Get_SelectedList', - LText: Utils.formatOptions(_sql), + LText: Utils.formatOptions(_sql, 'x'), obj_name: 'data', - arr_field: 'PN,PrintTempNO,Images' + arr_field: 'PN,PrintTempNO,Images', + exec_type: 'x' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) - + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(param).then(res => { diff --git a/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx b/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx index 56ea667..db83147 100644 --- a/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx +++ b/src/templates/sharecomponent/searchcomponent/dragsearch/card.jsx @@ -125,6 +125,14 @@ </Radio.Group>) } else if (card.type === 'check') { formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> + } else if (card.type === 'range') { + type = 'range-wrap' + let vals = card.initval.split(',') + formItem = (<> + <Input style={{marginTop: '4px'}} value={vals[0] || ''} /> + 鑷� + <Input style={{marginTop: '4px'}} value={vals[1] || ''} /> + </>) } let labelwidth = card.labelwidth || 33.3 diff --git a/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx b/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx index fdd7f52..277f247 100644 --- a/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/dragsearch/index.jsx @@ -101,11 +101,11 @@ newcard.orderType = 'asc' let _match = 'like' - if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') { + if (['select', 'link', 'checkcard'].includes(item.subType)) { _match = '=' - } else if (item.subType === 'date' || item.subType === 'datemonth') { + } else if (['date', 'datemonth'].includes(item.subType)) { _match = '>=' - } else if (item.subType === 'dateweek' || item.subType === 'daterange') { + } else if (['dateweek', 'daterange', 'range'].includes(item.subType)) { _match = 'between' } else if (item.subType === 'group') { _match = 'between' diff --git a/src/templates/sharecomponent/searchcomponent/index.scss b/src/templates/sharecomponent/searchcomponent/index.scss index 52dda6d..f568c19 100644 --- a/src/templates/sharecomponent/searchcomponent/index.scss +++ b/src/templates/sharecomponent/searchcomponent/index.scss @@ -99,6 +99,21 @@ } } } + .page-card.range-wrap { + .ant-form-item-control-wrapper { + .ant-form-item-control { + .ant-form-item-children { + display: flex; + .ant-input:first-child { + margin-right: 5px; + } + .ant-input:last-child { + margin-left: 5px; + } + } + } + } + } .page-card.advanced { .ant-form-item-label label { color: orange; diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index cd13077..52ac1b9 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -110,7 +110,7 @@ group: ['label', 'type', 'field', 'datefield', 'initval', 'blacklist', 'ratio', 'items', 'required', 'labelShow', 'query', 'labelwidth'], switch: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'openVal', 'closeVal', 'openText', 'closeText', 'Hide', 'labelShow', 'advanced', 'query', 'labelwidth'], check: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'openVal', 'closeVal', 'checkTip', 'Hide', 'labelShow', 'advanced', 'query', 'labelwidth'], - range: ['label', 'type', 'field', 'initval', 'match', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query', 'labelwidth'] + range: ['label', 'type', 'field', 'initval', 'match', 'ratio', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query', 'labelwidth', 'advanced'] } class MainSearch extends Component { @@ -265,6 +265,13 @@ reOptions.match = matchReg.class1 } else if (type === 'switch' || type === 'check') { reOptions.match = matchReg.class2 + if (type === 'switch') { + reLabel.openVal = '寮�鍚��' + reLabel.closeVal = '鍏抽棴鍊�' + } else { + reLabel.openVal = '鍕鹃�夊��' + reLabel.closeVal = '涓嶅嬀閫夊��' + } } else if (type === 'date') { reOptions.match = matchReg.class4 } else if (type === 'datemonth') { @@ -824,35 +831,45 @@ if (values.type === 'range') { let error = '' - if (values.maxValue <= values.minValue) { - error = '鏈�澶у�煎繀椤诲ぇ浜庢渶灏忓��' - } else if (values.step <= 0) { - error = '姝ラ暱蹇呴』澶т簬0' - } else { - let s = (values.maxValue - values.minValue) / values.step - if (s !== parseInt(s)) { - error = '姝ラ暱蹇呴』琚� (max - min) 鏁撮櫎' + if (sessionStorage.getItem('appType') === 'mob') { + if (values.maxValue <= values.minValue) { + error = '鏈�澶у�煎繀椤诲ぇ浜庢渶灏忓��' + } else if (values.step <= 0) { + error = '姝ラ暱蹇呴』澶т簬0' + } else { + let s = (values.maxValue - values.minValue) / values.step + if (s !== parseInt(s)) { + error = '姝ラ暱蹇呴』琚� (max - min) 鏁撮櫎' + } } - } - if (!error && values.initval) { + if (!error && values.initval) { + let vals = values.initval.split(',') + if (vals.length !== 2) { + error = '鍒濆鍊艰缃敊璇紒' + } else if (isNaN(parseFloat(vals[0])) || isNaN(parseFloat(vals[1]))) { + error = '鍒濆鍊艰缃敊璇紒' + } else { + let start = parseFloat(vals[0]) + let end = parseFloat(vals[1]) + let s = (values.maxValue - start) / values.step + let e = (values.maxValue - end) / values.step + if (start > end || start < values.minValue || end > values.maxValue) { + error = '鍒濆鍊艰缃敊璇紒' + } else if (s !== parseInt(s) || e !== parseInt(e)) { + error = '鍒濆鍊艰缃敊璇紒' + } + } + } + } else if (values.initval) { let vals = values.initval.split(',') if (vals.length !== 2) { error = '鍒濆鍊艰缃敊璇紒' } else if (isNaN(parseFloat(vals[0])) || isNaN(parseFloat(vals[1]))) { error = '鍒濆鍊艰缃敊璇紒' - } else { - let start = parseFloat(vals[0]) - let end = parseFloat(vals[1]) - let s = (values.maxValue - start) / values.step - let e = (values.maxValue - end) / values.step - if (start > end || start < values.minValue || end > values.maxValue) { - error = '鍒濆鍊艰缃敊璇紒' - } else if (s !== parseInt(s) || e !== parseInt(e)) { - error = '鍒濆鍊艰缃敊璇紒' - } } } + if (error) { notification.warning({ top: 92, diff --git a/src/templates/sharecomponent/tablecomponent/index.jsx b/src/templates/sharecomponent/tablecomponent/index.jsx index 98f43d5..f6088e5 100644 --- a/src/templates/sharecomponent/tablecomponent/index.jsx +++ b/src/templates/sharecomponent/tablecomponent/index.jsx @@ -64,12 +64,13 @@ func: 'sPC_Get_SelectedList', LText: queryTableSql, obj_name: 'data', - arr_field: 'TbName,Remark' + arr_field: 'TbName,Remark', + exec_type: 'x' } - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� diff --git a/src/templates/treepageconfig/updatetable/index.jsx b/src/templates/treepageconfig/updatetable/index.jsx index 231a7c6..cebb5ca 100644 --- a/src/templates/treepageconfig/updatetable/index.jsx +++ b/src/templates/treepageconfig/updatetable/index.jsx @@ -783,12 +783,12 @@ debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), - LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) + LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), + LText: '' } - param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) let save = false diff --git a/src/templates/zshare/createfunc/index.jsx b/src/templates/zshare/createfunc/index.jsx index d464a7f..a707f0b 100644 --- a/src/templates/zshare/createfunc/index.jsx +++ b/src/templates/zshare/createfunc/index.jsx @@ -44,22 +44,24 @@ // 鍒犻櫎瀛樺偍杩囩▼ let droparam = { func: 'sPC_TableData_InUpDe', - LText: Utils.formatOptions(dropfunc), + LText: Utils.formatOptions(dropfunc, window.GLOB.execType || 'y'), + exec_type: window.GLOB.execType || 'y', TypeCharOne: 'proc' // 鍒犻櫎鎴栧垱寤哄瓨鍌ㄨ繃绋嬫爣蹇� } droparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - droparam.secretkey = Utils.encrypt(droparam.LText, droparam.timestamp) + droparam.secretkey = Utils.encrypt('', droparam.timestamp) droparam.open_key = Utils.encryptOpenKey(droparam.secretkey, droparam.timestamp) // 鏂板缓瀛樺偍杩囩▼ let _param = { func: 'sPC_TableData_InUpDe', - LText: Utils.formatOptions(newLText), + LText: Utils.formatOptions(newLText, window.GLOB.execType || 'y'), + exec_type: window.GLOB.execType || 'y', TypeCharOne: 'proc' } _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) + _param.secretkey = Utils.encrypt('', _param.timestamp) _param.open_key = Utils.encryptOpenKey(_param.secretkey, _param.timestamp) let saveParam = { diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx index b5d117a..7baa09f 100644 --- a/src/templates/zshare/createinterface/index.jsx +++ b/src/templates/zshare/createinterface/index.jsx @@ -55,7 +55,7 @@ _val = '' } - if (item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'daterange') { + if (['datemonth', 'dateweek', 'daterange', 'range'].includes(item.type)) { fields = [item.field, item.field] } @@ -103,7 +103,10 @@ _fieldMap.set(item.field, true) searchText.push(item.field + ' ' + item.match + ' @' + _field + '@') - } else if (item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'daterange') { + } else if (['datemonth', 'dateweek', 'daterange'].includes(item.type)) { + + searchText.push('(' + item.field + ' >= @' + item.field + '@ AND ' + item.field + ' < @' + item.field + '1@)') + } else if (item.type === 'range') { searchText.push('(' + item.field + ' >= @' + item.field + '@ AND ' + item.field + ' < @' + item.field + '1@)') } else { diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx index b3a0de2..50e6ad5 100644 --- a/src/templates/zshare/customscript/index.jsx +++ b/src/templates/zshare/customscript/index.jsx @@ -7,7 +7,7 @@ import Utils from '@/utils/utils.js' import Api from '@/api' -import { checkSQL } from '@/utils/utils-custom.js' +import { checkSQL, getSearchFields } from '@/utils/utils-custom.js' import CodeMirror from '@/templates/zshare/codemirror' import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' @@ -93,31 +93,9 @@ UNSAFE_componentWillMount() { const { searches, scripts, urlFields } = this.props - let _usefulFields = [] - searches.forEach(item => { - if (['dateweek', 'datemonth'].includes(item.type)) { - _usefulFields.push(item.key) - _usefulFields.push(item.key + '1') - } else if (item.type === 'daterange') { - let _skey = item.key - let _ekey = item.key + '1' - - if (/,/.test(item.key)) { - _skey = item.key.split(',')[0] - _ekey = item.key.split(',')[1] - } - _usefulFields.push(_skey) - _usefulFields.push(_ekey) - } else if (item.type === 'date' && _usefulFields.includes(item.key)) { - _usefulFields.push(item.key + '1') - } else { - _usefulFields.push(item.key.replace(/,/ig, ', ')) - } - }) - this.setState({ urlFields: urlFields ? urlFields.join(', ') : '', - usefulFields: _usefulFields.join(', '), + usefulFields: getSearchFields(searches), scripts: fromJS(scripts).toJS() }) } @@ -135,17 +113,18 @@ } let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from聽 s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` - _scriptSql = Utils.formatOptions(_scriptSql) + _scriptSql = Utils.formatOptions(_scriptSql, 'x') let _sParam = { func: 'sPC_Get_SelectedList', LText: _scriptSql, obj_name: 'data', - arr_field: 'funcname,longparam' + arr_field: 'funcname,longparam', + exec_type: 'x' } _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) + _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(_sParam).then(res => { diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 6f2c88b..6b339c9 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -74,6 +74,9 @@ value: 'group', text: '鏃ユ湡锛堢粍鍚堬級' }, { + value: 'range', + text: '鏁板�硷紙鍖洪棿锛�' + }, { value: 'switch', text: '寮�鍏�' }, { diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 2b37e7c..82d6117 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -38,9 +38,9 @@ cascader: ['readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'marginTop', 'marginBottom', 'separator'], color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'colorType', 'extra', 'marginTop', 'marginBottom'], rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'color', 'rateCount', 'character', 'place'], - hint: ['label', 'field', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], - split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl'], - formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], + hint: ['label', 'field', 'type', 'blacklist', 'supField', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], + split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl', 'supField'], + formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'supField', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom'], funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], linkMain: ['readonly', 'required', 'hidden','declare', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'place', 'marginTop', 'marginBottom'], @@ -361,7 +361,7 @@ reTooltip.initval = '浣跨敤$first琛ㄧず榛樿閫夋嫨绗竴椤广��' } - if (this.record.supField && !['hint', 'split', 'formula'].includes(type)) { + if (this.record.supField) { shows.push('supvalue') } diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 606f277..8cedee1 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -1103,12 +1103,13 @@ LText: mutilForms.join(' union all '), obj_name: '', arr_field: '', - table_type: 'Y' + table_type: 'Y', + exec_type: 'x' } - mutilparam.LText = Utils.formatOptions(mutilparam.LText) + mutilparam.LText = Utils.formatOptions(mutilparam.LText, 'x') mutilparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - mutilparam.secretkey = Utils.encrypt(mutilparam.LText, mutilparam.timestamp) + mutilparam.secretkey = Utils.encrypt('', mutilparam.timestamp) mutilparam.open_key = Utils.encryptOpenKey(mutilparam.secretkey, mutilparam.timestamp) if (window.GLOB.cloudServiceApi) { // 浜戠璇锋眰 diff --git a/src/utils/timer-task.js b/src/utils/timer-task.js index d9e54bc..8faff16 100644 --- a/src/utils/timer-task.js +++ b/src/utils/timer-task.js @@ -26,14 +26,18 @@ } else { let _param = { func: 's_get_timers_role', - LText: `select '${window.GLOB.appkey || ''}','${uuid}'`, + LText: `select '${window.GLOB.appkey || ''}','${uuid}'`, // 鍙敤鍋氬瘑閽ラ獙璇侊紝宸叉棤鏁� timer_type: interval, component_id: uuid } + + if (window.GLOB.execType === 'x') { + _param.exec_type = 'x' + } - _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - _param.LText = Utils.formatOptions(_param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5瀵嗛挜 + _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) + _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) Api.getSystemConfig(_param).then(result => { if (!result.status) { diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index b95c0eb..8926d01 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -993,7 +993,7 @@ forbid: item.query === 'false' }) } else { - let value = item.initval + let value = '0' let type = item.type if (item.type === 'date') { @@ -1009,13 +1009,11 @@ } else if (item.type === 'daterange') { value = '1949-10-01 00:00:00.000,1949-10-02 00:00:00.000' } else if (item.type === 'range') { - value = `${item.minValue},${item.maxValue}` + value = item.initval || `${item.minValue || '-999999'},${item.maxValue || '999999'}` } else if (item.type === 'multiselect' || (item.type === 'checkcard' && item.multiple === 'true')) { type = 'multi' - value = '0' - } else { - value = '0' } + newsearches.push({ key: item.field, match: item.match, @@ -1055,9 +1053,12 @@ searchText.push(`('${item.value}' ${item.match} '%'+${item.key}+'%')`) } else if (item.type === 'date') { searchText.push('(' + item.key + ' ' + item.match + ' \'' + item.value + '\')') - } else if (item.type === 'dateweek' || item.type === 'range') { + } else if (item.type === 'dateweek') { let val = item.value.split(',') searchText.push('(' + item.key + ' >= \'' + val[0] + '\' AND ' + item.key + ' < \'' + val[1] + '\')') + } else if (item.type === 'range') { + let val = item.value.split(',') + searchText.push('(' + item.key + ' >= ' + (val[0] || -999999) + ' AND ' + item.key + ' < ' + (val[1] || 999999) + ')') } else if (item.type === 'datemonth') { if (item.match === '=') { searchText.push('(' + item.key + ' = \'' + item.value + '\')') @@ -1108,7 +1109,7 @@ }) } - } else if (['dateweek', 'range'].includes(item.type)) { + } else if (item.type === 'dateweek') { let val = item.value.split(',') options.push({ reg: new RegExp('@' + item.key + '@', 'ig'), @@ -1116,6 +1117,15 @@ }, { reg: new RegExp('@' + item.key + '1@', 'ig'), value: `'${val[1]}'` + }) + } else if (item.type === 'range') { + let val = item.value.split(',') + options.push({ + reg: new RegExp('@' + item.key + '@', 'ig'), + value: `${val[0] || -999999}` + }, { + reg: new RegExp('@' + item.key + '1@', 'ig'), + value: `${val[1] || 999999}` }) } else if (item.type === 'datemonth') { if (item.match === '=') { @@ -1169,6 +1179,57 @@ } /** + * @description 鑾峰彇鎼滅储瀛楁 + */ +export function getSearchFields (searches) { + if (!searches) return '' + + let _usefulFields = [] + searches.forEach(item => { + let key = item.key || item.field + + if (!key) return + + if (item.type === 'group') { + _usefulFields.push(key) + if (item.datefield) { + _usefulFields.push(item.datefield) + _usefulFields.push(item.datefield + '1') + } + } else if (item.type === 'dateweek') { + _usefulFields.push(key) + _usefulFields.push(key + '1') + } else if (item.type === 'datemonth') { + if (item.match === '=') { + _usefulFields.push(key) + } else { + _usefulFields.push(key) + _usefulFields.push(key + '1') + } + } else if (item.type === 'range') { + _usefulFields.push(key) + _usefulFields.push(key + '1') + } else if (item.type === 'daterange') { + let _skey = key + let _ekey = key + '1' + + if (/,/.test(key)) { + _skey = key.split(',')[0] + _ekey = key.split(',')[1] + } + _usefulFields.push(_skey) + _usefulFields.push(_ekey) + } else if (item.type === 'date' && _usefulFields.includes(key)) { + _usefulFields.push(key + '1') + } else { + _usefulFields.push(key) + } + }) + + return _usefulFields.join(', ') +} + +/** * @description 閲嶇疆绉诲姩绔痵tyle * @return {Object} style */ diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index 5b82a9a..91e58db 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -102,7 +102,7 @@ let param = { func: 'sPC_Get_TableData', obj_name: 'data', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', arr_field: setting.arr_field, default_sql: setting.execute ? 'true' : 'false' } @@ -295,7 +295,7 @@ param.sub_field = setting.sub_field } - // exec_type: 'y' 瑙g爜瀛楁锛歀Text銆丩Text1銆丩Text2銆乧ustom_script銆丏ateCount + // exec_type 瑙g爜瀛楁锛歀Text銆丩Text1銆丩Text2銆乧ustom_script銆丏ateCount param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -328,7 +328,7 @@ let param = { func: 'sPC_Get_TableData', obj_name: 'data', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', arr_field: statFields.map(col => col.field).join(','), default_sql: setting.execute ? 'true' : 'false' } @@ -417,8 +417,8 @@ param.menuname = setting.$name } - param.custom_script = Utils.formatOptions(_customScript) - param.LText = Utils.formatOptions(LText) + param.custom_script = Utils.formatOptions(_customScript, param.exec_type) + param.LText = Utils.formatOptions(LText, param.exec_type) param.DateCount = '' param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') @@ -576,13 +576,9 @@ param.menuname = config.MenuName } - param.exec_type = 'y' - param.LText = Utils.formatOptions(_LText.join(' union all ')) - param.custom_script = Utils.formatOptions(LText_field.join(' union all ')) - // param.LText1 = LText1 - // param.LText = LText - // param.LText2 = LText2 - // param.LText_field = Utils.formatOptions(param.LText_field) + param.exec_type = window.GLOB.execType || 'y' + param.LText = Utils.formatOptions(_LText.join(' union all '), param.exec_type) + param.custom_script = Utils.formatOptions(LText_field.join(' union all '), param.exec_type) if (config.cacheUseful === 'true') { param.time_type = config.timeUnit diff --git a/src/utils/utils.js b/src/utils/utils.js index fb3811a..e6eb0cf 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1,7 +1,7 @@ import React from 'react' import moment from 'moment' import md5 from 'md5' -// import NodeRSA from 'node-rsa' +import CryptoJS from 'crypto-js' const formatKeys = [ { key: 'select', value: ' msltk ' }, @@ -124,46 +124,33 @@ if (!value) return '' value = value.replace(/\n/ig, ' \n ') - // 鏇挎崲鍏抽敭瀛� - formatKeys.forEach(item => { - let reg = new RegExp('(^|\\s)' + item.key + '(\\s|$)', 'ig') - value = value.replace(reg, item.value) - }) - // 鏇挎崲%绗︼紙鏁版嵁搴撲腑瑙f瀽鍚巗ql鎶ラ敊锛� - value = value.replace(/%/ig, ' mpercent ') + // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { value = value.replace(/@db@/ig, window.GLOB.externalDatabase) } - // if (exec_type === 'x') { - // // let publicKey = `-----BEGIN PUBLIC KEY----- - // // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwGxFURiCrk5a2xfWuM3W - // // 2lkS3ioZhUFXpkK1inMivItsA/J8MTaBB3EAVxC29xdVCU+xOzs512PuD2b1sjzX - // // jwO6kx433NtB2okqGiP4RkzhEJHwdyc9dPUKdjirDznUWI9R7WayAf5Z4COhMsj2 - // // IbkyJgkb6Ivn0UgU0GSWc92HqJJmnb3Ti2gk6A2+oybz2RE3+xB/yOaNu3xav4yi - // // xxo6harVLNBiaU+D7aDed1W3kE20gLOnEAvcLMjpe3n/QvF5RtELsm3T+vH3TIT2 - // // GI9+8cT20NZ2d7i41+j/AQZiPJNS3MVmc3aIhuyCOsNPLmvbZZi1KPSJIqkCwdEg - // // mQIDAQAB - // // -----END PUBLIC KEY-----` + // 鏇挎崲%绗︼紙鏁版嵁搴撲腑瑙f瀽鍚巗ql鎶ラ敊锛� + value = value.replace(/%/ig, ' mpercent ') - // // let pubKey = new NodeRSA(publicKey, 'pkcs8-public') + if (exec_type === 'x') { + let key = CryptoJS.enc.Utf8.parse('D1185ED7B32568C9') + let iv = CryptoJS.enc.Utf8.parse('') + let srcs = CryptoJS.enc.Utf8.parse(value) - // // value = window.encodeURIComponent(value) - // // value = pubKey.encrypt(value, 'base64') + let encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }) + value = encrypted.toString() - // // const priKey = new NodeRSA(privateKey, 'pkcs8-private') - // // const res = priKey.decrypt(value, 'utf8') - // } else { + // let wordArray = CryptoJS.enc.Base64.parse(value) + // let decryptedWordArray = CryptoJS.AES.decrypt({ ciphertext: wordArray }, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }) + // let decryptedText = CryptoJS.enc.Utf8.stringify(decryptedWordArray) + } else { + // 鏇挎崲鍏抽敭瀛� + formatKeys.forEach(item => { + let reg = new RegExp('(^|\\s)' + item.key + '(\\s|$)', 'ig') + value = value.replace(reg, item.value) + }) // encode缂栫爜锛堜腑鏂囧瓧绗﹁秴鍑篵ase64鍔犲瘑鑼冨洿锛� - // let str = window.encodeURIComponent(value) - - // if (str.length % 3 === 1) { - // str += '%2F*123*%2F' - // } else if (str.length % 3 === 2) { - // str += '%2F*12*%2F' - // } - value = window.btoa(window.encodeURIComponent(value)) // 鎻掑叆瀛楃 let salt = 'minKe' // 鐩愬�� @@ -171,7 +158,7 @@ value = value.slice(0, index) + salt + value.slice(index) // base64鍔犲瘑 value = window.btoa(value) - // } + } return value } @@ -551,6 +538,11 @@ newsearches[item.key] = _startval newsearches[item.key + '1'] = _endval } + } else if (item.type === 'range') { + let val = item.value.split(',') + + newsearches[item.key] = val[0] || -999999 + newsearches[item.key + '1'] = val[1] || 999999 } else if (item.type === 'dateweek') { let _startval = '' let _endval = '' @@ -698,7 +690,7 @@ } else if (item.type === 'range') { let val = item.value.split(',') - searchText.push('(' + item.key + ' >= \'' + val[0] + '\' AND ' + item.key + ' < \'' + val[1] + '\')') + searchText.push('(' + item.key + ' >= ' + (val[0] || -999999) + ' AND ' + item.key + ' < ' + (val[1] || 999999) + ')') } else { searchText.push('(' + item.key + ' ' + item.match + ' \'' + item.value + '\')') } @@ -769,6 +761,17 @@ options.push(item) options.push(copy) } + } else if (item.type === 'range') { + let val = item.value.split(',') + + let copy = JSON.parse(JSON.stringify(item)) + copy.key = copy.key + '1' + copy.value = val[1] || 999999 + + item.value = val[0] || -999999 + + options.push(item) + options.push(copy) } else if (item.type === 'dateweek') { let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000' let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000' diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx index 75206ec..c2d907c 100644 --- a/src/views/appmanage/index.jsx +++ b/src/views/appmanage/index.jsx @@ -569,17 +569,18 @@ inner join (select openid from sapp where id='${window.GLOB.appkey}') b on a.openid=b.openid` - _sql = Utils.formatOptions(_sql) + _sql = Utils.formatOptions(_sql, 'x') let param = { func: 'sPC_Get_SelectedList', LText: _sql, obj_name: 'data', - arr_field: 'ID,TemplateCode,SignName' + arr_field: 'ID,TemplateCode,SignName', + exec_type: 'x' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(param).then(res => { @@ -651,11 +652,10 @@ let param = { func: 's_kei_addupt', ID: selectApp.ID, - exec_type: 'y', + exec_type: 'x', remark: selectApp.remark, kei_no: selectApp.kei_no, - cus_param_type: 'A', - LText: '' + cus_param_type: 'A' } param.del_typename = record.typename @@ -676,7 +676,7 @@ // 瀛愬簲鐢↖D銆乼ypename銆佸簲鐢↖D銆丆loudUserID銆乤ppkey銆乴ogin_types(鏄惁闇�瑕佺櫥褰曪紝宸插純鐢�)銆乴ink_type(鏄惁浣跨敤鐭繛鎺ワ紝宸插純鐢�)銆乺ole_type(鏄惁浣跨敤瑙掕壊绠$悊)銆乴ang銆乧ss(鐨偆)銆乼itle(鏍囬)銆乫avicon(鍥炬爣)銆乽ser_binding(鐢ㄦ埛缁戝畾)銆乻ms_id(鐭俊妯℃澘ID)銆佽嚜瀹氫箟 param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') confirm({ content: '纭畾鍒犻櫎璇ュ瓙搴旂敤鍚楋紵', @@ -901,7 +901,7 @@ let param = { func: 's_kei_addupt', ID: ID, - exec_type: 'y', + exec_type: 'x', remark: res.remark, kei_no: res.kei_no, cus_param_type: 'A', @@ -922,7 +922,7 @@ param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') } Api.getCloudConfig(param).then(result => { @@ -978,7 +978,7 @@ let param = { func: 's_kei_addupt', ID: selectApp.ID, - exec_type: 'y', + exec_type: 'x', remark: selectApp.remark, kei_no: selectApp.kei_no, cus_param_type: 'A', @@ -1015,7 +1015,7 @@ param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') Api.getCloudConfig(param).then(result => { if (result.status) { diff --git a/src/views/basedesign/updateFormTab/index.jsx b/src/views/basedesign/updateFormTab/index.jsx index 04821eb..5fb70ae 100644 --- a/src/views/basedesign/updateFormTab/index.jsx +++ b/src/views/basedesign/updateFormTab/index.jsx @@ -878,12 +878,12 @@ debug_md5: key, debug_url: url, debug_list: window.btoa(tbs), - LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) + LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), + LText: '' } - param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) Api.getCloudConfig(param).then(res => { _resolve() diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index d64cb91..453d8a0 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -851,9 +851,9 @@ param.menuname = MenuName } - param.exec_type = 'y' - param.LText = Utils.formatOptions(LText.join(' union all ')) - param.custom_script = Utils.formatOptions(LText_field.join(' union all ')) + param.exec_type = window.GLOB.execType || 'y' + param.LText = Utils.formatOptions(LText.join(' union all '), param.exec_type) + param.custom_script = Utils.formatOptions(LText_field.join(' union all '), param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) diff --git a/src/views/design/header/editfirstmenu/index.jsx b/src/views/design/header/editfirstmenu/index.jsx index 06dc1e7..4d1b286 100644 --- a/src/views/design/header/editfirstmenu/index.jsx +++ b/src/views/design/header/editfirstmenu/index.jsx @@ -125,15 +125,16 @@ if (type === 'confirm' && _menuchange) { let param = { func: 'sPC_Menu_SortUpt', + exec_type: 'x', LText: this.state.menulist.map((item, index) => { return 'select \'' + item.MenuID + '\' as Menuid,' + (index + 1) * 10 + ' as sort' }) } - param.LText = param.LText.join(' union ') // sql鎷兼帴 - param.LText = Utils.formatOptions(param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5瀵嗛挜 + param.LText = param.LText.join(' union ') + param.LText = Utils.formatOptions(param.LText, 'x') + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.secretkey = Utils.encrypt('', param.timestamp) confirm({ title: '纭璋冩暣鑿滃崟椤哄簭鍚楋紵', diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx index e8c88b3..f9110ad 100644 --- a/src/views/design/header/index.jsx +++ b/src/views/design/header/index.jsx @@ -298,17 +298,18 @@ inner join (select openid from sapp where id='${window.GLOB.appkey}') b on a.openid=b.openid` - _sql = Utils.formatOptions(_sql) + _sql = Utils.formatOptions(_sql, 'x') let param = { func: 'sPC_Get_SelectedList', LText: _sql, obj_name: 'data', - arr_field: 'ID,TemplateCode,SignName' + arr_field: 'ID,TemplateCode,SignName', + exec_type: 'x' } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 Api.getCloudConfig(param).then(res => { diff --git a/src/views/design/header/versions/index.jsx b/src/views/design/header/versions/index.jsx index 100b669..4500387 100644 --- a/src/views/design/header/versions/index.jsx +++ b/src/views/design/header/versions/index.jsx @@ -143,11 +143,12 @@ obj_name: 'data', arr_field: 'ID,KeyWords,Remark,TypeName,Sort,SrcID', BID: '', + exec_type: window.GLOB.execType || 'y' } - param.LText = Utils.formatOptions(sql) + param.LText = Utils.formatOptions(sql, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) param.DateCount = '' Api.genericInterface(param).then(response => { @@ -318,11 +319,11 @@ let param = { func: 'sPC_TableData_InUpDe', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', ID: version.BID } - param.LText = Utils.formatOptions(sql) + param.LText = Utils.formatOptions(sql, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) diff --git a/src/views/design/sidemenu/editsecmenu/index.jsx b/src/views/design/sidemenu/editsecmenu/index.jsx index c630d72..888c7ac 100644 --- a/src/views/design/sidemenu/editsecmenu/index.jsx +++ b/src/views/design/sidemenu/editsecmenu/index.jsx @@ -110,15 +110,16 @@ if (type === 'confirm') { // 淇濆瓨璋冩暣鍚庣殑椤哄簭 let param = { func: 'sPC_Menu_SortUpt', + exec_type: 'x', LText: this.state.menulist.map((item, index) => { return 'select \'' + item.MenuID + '\' as Menuid,' + (index + 1) * 10 + ' as sort' }) } - param.LText = param.LText.join(' union ') // sql鎷兼帴 - param.LText = Utils.formatOptions(param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5瀵嗛挜 + param.LText = param.LText.join(' union ') + param.LText = Utils.formatOptions(param.LText, 'x') + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.secretkey = Utils.encrypt('', param.timestamp) confirm({ title: '纭璋冩暣鑿滃崟椤哄簭鍚楋紵', diff --git a/src/views/design/sidemenu/editthdmenu/index.jsx b/src/views/design/sidemenu/editthdmenu/index.jsx index 2402f75..d482996 100644 --- a/src/views/design/sidemenu/editthdmenu/index.jsx +++ b/src/views/design/sidemenu/editthdmenu/index.jsx @@ -141,15 +141,16 @@ if (type === 'confirm') { let param = { func: 'sPC_Menu_SortUpt', + exec_type: 'x', LText: this.state.menulist.map((item, index) => { return 'select \'' + item.MenuID + '\' as Menuid,' + (index + 1) * 10 + ' as sort' }) } - param.LText = param.LText.join(' union ') // sql鎷兼帴 - param.LText = Utils.formatOptions(param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� - param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5瀵嗛挜 + param.LText = param.LText.join(' union ') + param.LText = Utils.formatOptions(param.LText, 'x') + param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + param.secretkey = Utils.encrypt('', param.timestamp) confirm({ title: '纭璋冩暣鑿滃崟椤哄簭鍚楋紵', @@ -218,7 +219,7 @@ } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) this.setState({ confirmLoading: true diff --git a/src/views/design/sidemenu/index.jsx b/src/views/design/sidemenu/index.jsx index e25d692..d43da38 100644 --- a/src/views/design/sidemenu/index.jsx +++ b/src/views/design/sidemenu/index.jsx @@ -254,7 +254,7 @@ } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) this.setState({ loading: true diff --git a/src/views/design/sidemenu/thdmenuplus/index.jsx b/src/views/design/sidemenu/thdmenuplus/index.jsx index 3033939..be78279 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.jsx +++ b/src/views/design/sidemenu/thdmenuplus/index.jsx @@ -180,7 +180,7 @@ } param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) this.setState({ loading: true diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index b271577..7d3ece5 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -849,9 +849,8 @@ LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) } - param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) let btnParam = { // 娣诲姞鑿滃崟鎸夐挳 func: 'sPC_Button_AddUpt', @@ -859,14 +858,14 @@ ParentID: config.uuid, MenuNo: config.MenuNo, Template: 'CustomPage', - button_proc_edition: 'Y' + button_proc_edition: 'Y', + exec_type: 'x' } btnParam.LText = btns.join(' union all ') - - btnParam.LText = Utils.formatOptions(btnParam.LText) + btnParam.LText = Utils.formatOptions(btnParam.LText, 'x') btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) + btnParam.secretkey = Utils.encrypt('', btnParam.timestamp) new Promise(resolve => { if (MenuType === 'billPrint') { // 鎵撳嵃鐢熸垚椤甸潰鏁堟灉鍥� diff --git a/src/views/mkiframe/index.jsx b/src/views/mkiframe/index.jsx index d8ca857..2547d9d 100644 --- a/src/views/mkiframe/index.jsx +++ b/src/views/mkiframe/index.jsx @@ -54,8 +54,28 @@ if (window.GLOB.mkActions && window.GLOB.mkActions.loaded) { this.setState({loading: false}) - } else { + } else if (sessionStorage.getItem('UserID')) { this.getPermRole() + } else { + Api.getTouristMsg().then(res => { + if (res.status) { + sessionStorage.setItem('UserID', res.UserID) + sessionStorage.setItem('LoginUID', res.LoginUID) + sessionStorage.setItem('User_Name', res.UserName) + sessionStorage.setItem('Full_Name', res.FullName) + sessionStorage.setItem('avatar', res.icon || '') + sessionStorage.setItem('dataM', res.dataM ? 'true' : '') + sessionStorage.setItem('debug', res.debug || '') + sessionStorage.setItem('role_id', res.role_id || '') + sessionStorage.setItem('departmentcode', res.departmentcode || '') + sessionStorage.setItem('organization', res.organization || '') + sessionStorage.setItem('mk_user_type', res.mk_user_type || '') + this.getPermRole() + } else { + sessionStorage.clear() + this.props.history.replace('/login') + } + }) } }, 20) } else if (sessionStorage.getItem('UserID')) { diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 4c6417c..575cb43 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -434,7 +434,7 @@ let param = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } @@ -449,7 +449,7 @@ param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -1636,13 +1636,13 @@ let kparam = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } kparam.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) kparam.LText = kparam.LText.join(' union all ') - kparam.LText = Utils.formatOptions(kparam.LText) + kparam.LText = Utils.formatOptions(kparam.LText, 'x') kparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') kparam.secretkey = Utils.encrypt('', kparam.timestamp) @@ -1883,7 +1883,7 @@ let param = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } @@ -1902,7 +1902,7 @@ param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -1942,7 +1942,7 @@ let param = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } @@ -1961,7 +1961,7 @@ param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 7ace0bb..4efe859 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -287,7 +287,7 @@ let param = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } @@ -302,7 +302,7 @@ param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -1352,13 +1352,13 @@ let kparam = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } kparam.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) kparam.LText = kparam.LText.join(' union all ') - kparam.LText = Utils.formatOptions(kparam.LText) + kparam.LText = Utils.formatOptions(kparam.LText, 'x') kparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') kparam.secretkey = Utils.encrypt('', kparam.timestamp) @@ -1567,7 +1567,7 @@ let param = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } @@ -1586,7 +1586,7 @@ param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -1626,7 +1626,7 @@ let param = { func: 's_kei_link_keyids_addupt', BID: sessionStorage.getItem('appId'), - exec_type: 'y', + exec_type: 'x', LText: '' } @@ -1645,7 +1645,7 @@ param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) param.LText = param.LText.join(' union all ') - param.LText = Utils.formatOptions(param.LText) + param.LText = Utils.formatOptions(param.LText, 'x') param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index 8f03846..171b2c2 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -415,7 +415,7 @@ let _param = { func: 's_kei_link_keyids_addupt', BID: app.ID, - exec_type: 'y', + exec_type: 'x', LText: '' } @@ -424,7 +424,7 @@ if (appViewList.length !== _appViewList.length) { _param.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) _param.LText = _param.LText.join(' union all ') - _param.LText = Utils.formatOptions(_param.LText) + _param.LText = Utils.formatOptions(_param.LText, 'x') _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') _param.secretkey = Utils.encrypt('', _param.timestamp) diff --git a/src/views/systemproc/proc/index.jsx b/src/views/systemproc/proc/index.jsx index 577e462..100a0ff 100644 --- a/src/views/systemproc/proc/index.jsx +++ b/src/views/systemproc/proc/index.jsx @@ -162,22 +162,24 @@ let dropParam = { func: 'sPC_TableData_InUpDe', - LText: Utils.formatOptions(dropfunc), + LText: Utils.formatOptions(dropfunc, window.GLOB.execType || 'y'), + exec_type: window.GLOB.execType || 'y', TypeCharOne: 'proc' // 鍒犻櫎瀛樺偍杩囩▼ } dropParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - dropParam.secretkey = Utils.encrypt(dropParam.LText, dropParam.timestamp) + dropParam.secretkey = Utils.encrypt('', dropParam.timestamp) dropParam.open_key = Utils.encryptOpenKey(dropParam.secretkey, dropParam.timestamp) let createParam = { func: 'sPC_TableData_InUpDe', - LText: Utils.formatOptions(createfunc), + LText: Utils.formatOptions(createfunc, window.GLOB.execType || 'y'), + exec_type: window.GLOB.execType || 'y', TypeCharOne: 'proc' // 鍒涘缓瀛樺偍杩囩▼ } createParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - createParam.secretkey = Utils.encrypt(createParam.LText, createParam.timestamp) + createParam.secretkey = Utils.encrypt('', createParam.timestamp) createParam.open_key = Utils.encryptOpenKey(createParam.secretkey, createParam.timestamp) let saveParam = { diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx index 68fc3b7..7d16779 100644 --- a/src/views/tabledesign/index.jsx +++ b/src/views/tabledesign/index.jsx @@ -602,9 +602,8 @@ LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) } - param.LText = Utils.formatOptions(param.LText) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.secretkey = Utils.encrypt(param.LText, param.timestamp) + param.secretkey = Utils.encrypt('', param.timestamp) let btnParam = { // 娣诲姞鑿滃崟鎸夐挳 func: 'sPC_Button_AddUpt', @@ -612,14 +611,14 @@ ParentID: config.uuid, MenuNo: config.MenuNo, Template: 'BaseTable', - button_proc_edition: 'Y' + button_proc_edition: 'Y', + exec_type: 'x' } btnParam.LText = btns.join(' union all ') - - btnParam.LText = Utils.formatOptions(btnParam.LText) + btnParam.LText = Utils.formatOptions(btnParam.LText, 'x') btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) + btnParam.secretkey = Utils.encrypt('', btnParam.timestamp) new Promise(resolve => { Api.getCloudConfig(param).then(res => { diff --git a/src/views/tabledesign/source.jsx b/src/views/tabledesign/source.jsx index 058c775..b324501 100644 --- a/src/views/tabledesign/source.jsx +++ b/src/views/tabledesign/source.jsx @@ -51,6 +51,26 @@ type: 'search', label: '鏃ユ湡锛堢粍鍚堬級', subType: 'group' + }, + { + type: 'search', + label: '鏁板�硷紙鍖洪棿锛�', + subType: 'range' + }, + { + type: 'search', + label: '寮�鍏�', + subType: 'switch' + }, + { + type: 'search', + label: '鍗曢�夋', + subType: 'radio' + }, + { + type: 'search', + label: '鍕鹃�夋', + subType: 'check' } ], actionItems: [ -- Gitblit v1.8.0