From ec05c5e71b49183d99de7b41eb0100c438b6e352 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 18 十月 2024 15:58:03 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/custom/components/chart/antv-scatter/index.jsx | 2 src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 2 src/tabviews/custom/components/code/sand-box/index.jsx | 4 src/tabviews/custom/components/table/base-table/index.jsx | 4 src/tabviews/custom/components/chart/antv-dashboard/index.jsx | 2 src/tabviews/custom/components/editor/braft-editor/index.jsx | 4 src/components/header/index.jsx | 6 src/tabviews/custom/components/tree/antd-tree/index.jsx | 2 src/tabviews/zshare/actionList/popupbutton/index.jsx | 6 src/tabviews/custom/components/card/double-data-card/index.jsx | 4 src/tabviews/custom/components/chart/antv-G6/index.jsx | 2 src/utils/utils-custom.js | 10 + src/views/main/index.jsx | 4 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 6 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 6 src/tabviews/custom/components/carousel/data-card/index.jsx | 2 src/tabviews/custom/components/table/edit-table/index.jsx | 4 src/api/index.js | 2 src/tabviews/custom/components/calendar/index.jsx | 8 + src/tabviews/zshare/actionList/newpagebutton/index.jsx | 16 +- src/tabviews/custom/components/form/simple-form/index.jsx | 4 src/tabviews/zshare/actionList/normalbutton/index.jsx | 40 ++++- src/tabviews/custom/components/iframe/index.jsx | 4 src/tabviews/custom/components/chart/custom-chart/index.jsx | 2 src/tabviews/custom/components/card/data-card/index.jsx | 2 src/tabviews/custom/components/form/tab-form/index.jsx | 4 src/tabviews/custom/components/card/table-card/index.jsx | 2 src/tabviews/custom/components/card/prop-card/index.jsx | 4 src/tabviews/zshare/actionList/tabbutton/index.jsx | 12 +- src/tabviews/rolemanage/index.jsx | 15 ++ src/menu/components/share/actioncomponent/formconfig.jsx | 25 ++++ src/tabviews/custom/components/table/normal-table/index.jsx | 2 src/components/querylog/index.jsx | 65 ++++------ src/tabviews/custom/components/chart/antv-pie/index.jsx | 2 src/tabviews/custom/components/timeline/normal-timeline/index.jsx | 2 src/tabviews/zshare/actionList/printbutton/index.jsx | 6 src/menu/components/share/actioncomponent/actionform/index.jsx | 6 src/tabviews/custom/components/carousel/prop-card/index.jsx | 4 src/tabviews/custom/components/form/step-form/index.jsx | 4 src/tabviews/custom/components/card/balcony/index.jsx | 4 src/components/sidemenu/index.jsx | 6 41 files changed, 224 insertions(+), 87 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index e508205..a4a7bf6 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1066,6 +1066,8 @@ */ cacheInterface (param) { param.appkey = window.GLOB.appkey || '' + param.userid = param.userid || sessionStorage.getItem('UserID') || '' + param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' let url = '/webapi/excache' if (param.rduri && !window.GLOB.transfer) { diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 5d74131..3602f41 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -561,9 +561,9 @@ MKEmitter.emit('modifyTabs', menu) } - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: menu.MenuID, name: '鑿滃崟'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: menu.MenuID, name: '鑿滃崟'}) + } } } diff --git a/src/components/querylog/index.jsx b/src/components/querylog/index.jsx index 5dedf3b..3a3545e 100644 --- a/src/components/querylog/index.jsx +++ b/src/components/querylog/index.jsx @@ -48,51 +48,42 @@ }) let userid = sessionStorage.getItem('UserID') || '' - let LText = [...logMap.values()].map(item => `select '${item.menuId}','${item.times}','${item.name}','${window.GLOB.appkey}','${userid}'`) + let LText = [...logMap.values()].map(item => `select '${item.menuId}','${item.times}','${item.name || ''}','${window.GLOB.appkey}','${userid}'`) - Api.genericInterface({func: 's_get_local_users_operation_log'}).then(res => { - if (!res.status) { + if (LText.length === 0) { + setTimeout(() => { + this.sendLog() + }, 600000) + return + } + + // {func: 's_get_local_users_operation_log'} 鏈湴鎺ュ彛 杩斿洖 long_param 浼犲叆 sso 鐨� s_get_users_operation_log + + let param = { + func: 's_get_users_operation_log', + exec_type: window.GLOB.execType || 'y', + LText: LText.join(' union all '), + 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.exec_type) + + Api.getSystemConfig(param).then(result => { + if (!result.status) { notification.warning({ top: 92, - message: res.message, + message: result.message, duration: 3 }) return } - if (LText.length === 0 && !res.long_param) { - setTimeout(() => { - this.sendLog() - }, 600000) - return - } - - let param = { - func: 's_get_users_operation_log', - 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.exec_type) - - Api.getSystemConfig(param).then(result => { - if (!result.status) { - notification.warning({ - top: 92, - message: result.message, - duration: 3 - }) - return - } - - setTimeout(() => { - this.sendLog() - }, 600000) - this.setState({logs: []}) - }) + setTimeout(() => { + this.sendLog() + }, 600000) + this.setState({logs: []}) }) } diff --git a/src/components/sidemenu/index.jsx b/src/components/sidemenu/index.jsx index 1889c7f..263d66f 100644 --- a/src/components/sidemenu/index.jsx +++ b/src/components/sidemenu/index.jsx @@ -79,9 +79,9 @@ MKEmitter.emit('modifyTabs', menu) } - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: menu.MenuID, name: '鑿滃崟'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: menu.MenuID, name: '鑿滃崟'}) + } } onOpenChange = openKeys => { diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index dcf94bf..2bd768f 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -15,9 +15,9 @@ const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror')) const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable')) const acTyOptions = { - pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton'], - prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton'], - exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton'], + pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton', 'excache'], + prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'excache'], + exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton', 'excache'], excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden', 'refreshTab'], excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden', 'refreshTab'], popview: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'], diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index e1544de..8bab1e2 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -1465,6 +1465,19 @@ forbid: viewType === 'popview' }, { + type: 'radio', + key: 'excache', + label: '娓呴櫎缂撳瓨', + initVal: card.excache || 'false', + tooltip: '鍦ㄤ娇鐢ㄥ悗绔剼鏈椂锛屾槸鍚︽竻闄ゅ悗绔紦瀛橈紝娉細闇�鍦ㄦ搷浣滅敤鎴锋垨鏉冮檺鏃跺紑鍚��', + required: false, + options: [ + {value: 'true', text: '寮�鍚�'}, + {value: 'false', text: '鍏抽棴'}, + ], + forbid: appType === 'mob' || appType === 'pc' + }, + { type: 'splitLine', key: 'title', label: '琛ㄥ崟', @@ -2726,6 +2739,18 @@ }, { type: 'radio', + key: 'excache', + label: '娓呴櫎缂撳瓨', + initVal: card.excache || 'false', + tooltip: '鍦ㄤ娇鐢ㄥ悗绔剼鏈椂锛屾槸鍚︽竻闄ゅ悗绔紦瀛橈紝娉細闇�鍦ㄦ搷浣滅敤鎴锋垨鏉冮檺鏃跺紑鍚��', + required: false, + options: [ + {value: 'true', text: '寮�鍚�'}, + {value: 'false', text: '鍏抽棴'}, + ] + }, + { + type: 'radio', key: 'execType', label: '璇锋眰鏂瑰紡', initVal: card.execType || 'multi', diff --git a/src/tabviews/custom/components/calendar/index.jsx b/src/tabviews/custom/components/calendar/index.jsx index c8ea014..4c62b47 100644 --- a/src/tabviews/custom/components/calendar/index.jsx +++ b/src/tabviews/custom/components/calendar/index.jsx @@ -45,6 +45,8 @@ BData = window.GLOB.CacheData.get(_config.$pageId) } + let BID = BData ? (BData.$BID || '') : '' + if (_config.setting.interType === 'system') { if (/@mk_year@/ig.test(_config.setting.dataresource) || /@mk_year@/ig.test(_config.setting.customScript)) { _config.setting.$re_year = true @@ -63,8 +65,12 @@ _config.action = [] } + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + this.setState({ - BID: BData ? (BData.$BID || '') : '', + BID: BID, BData: BData, config: _config, search: _config.$searches diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index e868204..668b8f0 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -50,6 +50,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 2682bca..92f4093 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -186,6 +186,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID && _config.wrap.supKey !== 'false') { + _config.setting.onload = 'false' } if (_config.wrap.zHeight) { diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index 8ee5097..da1f7b4 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -195,6 +195,10 @@ } } + if (_config.setting.supModule && !BID && _config.wrap.supKey !== 'false') { + _config.setting.onload = 'false' + } + this.setState({ pageSize: _config.setting.pageSize || 10, pageOptions, diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index cda84d4..31e944d 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -51,6 +51,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index ef25ae7..538c792 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -94,6 +94,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } let precards = [] diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx index 64f8dc1..8fabea1 100644 --- a/src/tabviews/custom/components/carousel/data-card/index.jsx +++ b/src/tabviews/custom/components/carousel/data-card/index.jsx @@ -74,6 +74,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } if (_card.setting.click) { diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index efa162d..67804bc 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -51,6 +51,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] diff --git a/src/tabviews/custom/components/chart/antv-G6/index.jsx b/src/tabviews/custom/components/chart/antv-G6/index.jsx index fef955f..5fc57b9 100644 --- a/src/tabviews/custom/components/chart/antv-G6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-G6/index.jsx @@ -846,6 +846,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } _config.plot.height = Utils.getHeight(_config.plot.height) diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index ae2dfce..580753a 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -398,6 +398,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } this.setState({ diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx index a9a530a..c796a25 100644 --- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx +++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx @@ -100,6 +100,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } if (_config.subtype !== 'ratioboard') { diff --git a/src/tabviews/custom/components/chart/antv-pie/index.jsx b/src/tabviews/custom/components/chart/antv-pie/index.jsx index bc32406..4c2aef8 100644 --- a/src/tabviews/custom/components/chart/antv-pie/index.jsx +++ b/src/tabviews/custom/components/chart/antv-pie/index.jsx @@ -85,6 +85,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } this.setState({ diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx index 6526bdb..19b881a 100644 --- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx +++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx @@ -77,6 +77,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } this.setState({ diff --git a/src/tabviews/custom/components/chart/custom-chart/index.jsx b/src/tabviews/custom/components/chart/custom-chart/index.jsx index 044790e..0d57e22 100644 --- a/src/tabviews/custom/components/chart/custom-chart/index.jsx +++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx @@ -66,6 +66,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } this.setState({ diff --git a/src/tabviews/custom/components/code/sand-box/index.jsx b/src/tabviews/custom/components/code/sand-box/index.jsx index c460bcc..7ef92b2 100644 --- a/src/tabviews/custom/components/code/sand-box/index.jsx +++ b/src/tabviews/custom/components/code/sand-box/index.jsx @@ -44,6 +44,10 @@ if (_config.wrap.datatype !== 'static') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] diff --git a/src/tabviews/custom/components/editor/braft-editor/index.jsx b/src/tabviews/custom/components/editor/braft-editor/index.jsx index d5a8cea..10d7605 100644 --- a/src/tabviews/custom/components/editor/braft-editor/index.jsx +++ b/src/tabviews/custom/components/editor/braft-editor/index.jsx @@ -45,6 +45,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] _config.setting.sync = 'false' diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx index d6c4abc..9a5e5fc 100644 --- a/src/tabviews/custom/components/form/simple-form/index.jsx +++ b/src/tabviews/custom/components/form/simple-form/index.jsx @@ -48,6 +48,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] _data = _data[0] || {$$empty: true} diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx index 94fd836..a1f7972 100644 --- a/src/tabviews/custom/components/form/step-form/index.jsx +++ b/src/tabviews/custom/components/form/step-form/index.jsx @@ -48,6 +48,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] _data = _data[0] || {$$empty: true} diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index 5bbc94b..bce6e0b 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -47,6 +47,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] _data = _data[0] || {$$empty: true} diff --git a/src/tabviews/custom/components/iframe/index.jsx b/src/tabviews/custom/components/iframe/index.jsx index 7e544be..50352bb 100644 --- a/src/tabviews/custom/components/iframe/index.jsx +++ b/src/tabviews/custom/components/iframe/index.jsx @@ -45,6 +45,10 @@ if (_config.wrap.datatype === 'dynamic') { _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { _data = window.GLOB.SyncData.get(_config.dataName) || [] _data = _data[0] || {$$empty: true} diff --git a/src/tabviews/custom/components/table/base-table/index.jsx b/src/tabviews/custom/components/table/base-table/index.jsx index 5b5f0f3..939347e 100644 --- a/src/tabviews/custom/components/table/base-table/index.jsx +++ b/src/tabviews/custom/components/table/base-table/index.jsx @@ -69,6 +69,10 @@ setting.selected = 'false' } + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + _config.style = _config.style || {} this.setState({ diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index c3cdecd..2d4019f 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -211,6 +211,10 @@ _config.colsCtrls = null } + if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' + } + this.setState({ pageSize: setting.pageSize || 10, BID: BID || '', diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index ae15927..0b77025 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -131,6 +131,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID && _config.wrap.supKey !== 'false') { + _config.setting.onload = 'false' } if (_config.wrap.collapse === 'true') { diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx index 29e50f7..e0676c2 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx @@ -77,6 +77,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } _config.search = [] diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx index 35b14ec..f6ef504 100644 --- a/src/tabviews/custom/components/tree/antd-tree/index.jsx +++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx @@ -70,6 +70,8 @@ window.GLOB.SyncData.delete(_config.dataName) } + } else if (_config.setting.supModule && !BID) { + _config.setting.onload = 'false' } let lineActions = [] diff --git a/src/tabviews/rolemanage/index.jsx b/src/tabviews/rolemanage/index.jsx index f397ce4..f7b8453 100644 --- a/src/tabviews/rolemanage/index.jsx +++ b/src/tabviews/rolemanage/index.jsx @@ -561,6 +561,7 @@ submitloading: false }, () => { this.getSelectMenuList() + this.clearBackSqlCache() }) if (window.GLOB.mainSystemApi) { Api.genericInterface(localParam).then(res => { @@ -586,6 +587,20 @@ }) } + clearBackSqlCache = () => { + if (!window.backend) return + + Api.cacheInterface({}).then(res => { + if (!res.status) { + notification.warning({ + top: 92, + message: res.message || '缂撳瓨娓呯┖澶辫触锛�', + duration: 5 + }) + } + }) + } + /** * @description 鎻愪氦宸查�夌殑鏉冮檺 */ diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index fde146a..b932b2c 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -144,9 +144,9 @@ this.refs.excelIn.exceltrigger() }) - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎叆Excel'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎叆Excel'}) + } } } diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 59789f9..36f6a61 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -107,9 +107,9 @@ }) } else { MKEmitter.emit('queryModuleParam', btn.$menuId, this.triggerExcelout) - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎嚭Excel'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '瀵煎嚭Excel'}) + } } } diff --git a/src/tabviews/zshare/actionList/newpagebutton/index.jsx b/src/tabviews/zshare/actionList/newpagebutton/index.jsx index 206d758..3c1c12e 100644 --- a/src/tabviews/zshare/actionList/newpagebutton/index.jsx +++ b/src/tabviews/zshare/actionList/newpagebutton/index.jsx @@ -159,10 +159,7 @@ lang = data[0].lang_s || '' } - // let _name = '鏂伴〉闈�' - if (btn.pageTemplate === 'billprint') { - // _name = '鍗曟嵁鎵撳嵃' if (btn.preHandle === 'true' && btn.pre_func) { MKEmitter.emit('queryModuleParam', btn.$menuId, (res) => { let searches = {} @@ -273,8 +270,6 @@ let src = '#/print/' + window.btoa(window.encodeURIComponent(JSON.stringify({ ID: Id, lang }))) window.open(src) } else if (btn.pageTemplate === 'pay') { - // _name = '鏀粯' - let appId = '' let merchId = '' @@ -372,9 +367,14 @@ window.open(url) } - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: _name}) - // } + if (window.GLOB.systemType === 'production') { + let _temname = { + billprint: '鍗曟嵁鎵撳嵃', + pay: '鐩存帴鎵ц', + } + + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: _temname[btn.pageTemplate] || '鏂伴〉闈�'}) + } } prequest = (ID, data, appId, merchId) => { diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index af7d1e3..b816257 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -307,16 +307,16 @@ } } - // if (window.GLOB.systemType === 'production') { - // let _change = { - // prompt: '鎻愮ず妗�', - // exec: '鐩存帴鎵ц', - // pop: '寮圭獥锛堣〃鍗曪級', - // formSubmit: '琛ㄥ崟', - // form: '琛ㄥ崟', - // } - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: _change[btn.OpenType]}) - // } + if (window.GLOB.systemType === 'production') { + let _change = { + prompt: '鎻愮ず妗�', + exec: '鐩存帴鎵ц', + pop: '寮圭獥锛堣〃鍗曪級', + formSubmit: '琛ㄥ崟', + form: '琛ㄥ崟', + } + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: _change[btn.OpenType]}) + } } preTrigger = (callback) => { @@ -2771,7 +2771,7 @@ clearBackCache = () => { if (!window.GLOB.backend) return - Api.cacheInterface({userid: sessionStorage.getItem('UserID') || '', LoginUID: sessionStorage.getItem('LoginUID') || ''}).then(res => { + Api.cacheInterface({}).then(res => { if (!res.status) { notification.warning({ top: 92, @@ -2938,6 +2938,10 @@ tabId = btn.refreshTab[btn.refreshTab.length - 1] } + if (btn.excache === 'true') { + this.clearBackSqlCache() + } + if (tabId && btn.$MenuID === tabId) { // 鍒锋柊褰撳墠鑿滃崟鏃讹紝鍋滄鍏朵粬鎿嶄綔 MKEmitter.emit('reloadMenuView', tabId) return @@ -3048,6 +3052,20 @@ } } + clearBackSqlCache = () => { + if (!window.backend) return + + Api.cacheInterface({}).then(res => { + if (!res.status) { + notification.warning({ + top: 92, + message: res.message || '缂撳瓨娓呯┖澶辫触锛�', + duration: 5 + }) + } + }) + } + triggerNote = (res, ID) => { const { btn } = this.props diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index 68f3828..c6a9e99 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -184,9 +184,9 @@ visible: true }) - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '寮圭獥锛堟爣绛撅級'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '寮圭獥锛堟爣绛撅級'}) + } } syspopclose = () => { diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 27c3a94..84ea3d6 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -205,9 +205,9 @@ this.triggerPrint(data) } - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '鏍囩鎵撳嵃'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '鏍囩鎵撳嵃'}) + } } triggerPrint = (data, formlist = []) => { diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 0dbb778..94322e0 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -213,9 +213,9 @@ MKEmitter.emit('openNewTab') } - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '鏍囩椤�'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '鏍囩椤�'}) + } } triggerMenu = (tab) => { @@ -300,9 +300,9 @@ MKEmitter.emit('openNewTab') } - // if (window.GLOB.systemType === 'production') { - // MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '鏍囩椤�'}) - // } + if (window.GLOB.systemType === 'production') { + MKEmitter.emit('queryTrigger', {menuId: btn.uuid, name: '鏍囩椤�'}) + } } render() { diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index f53084c..88c4d03 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -3100,8 +3100,14 @@ item.setting.$name = item.$menuname || '' let msg = getDataSource(item, mainSearch) + let roleId = config.uuid + if (item.wrap && item.wrap.permission === 'false') { + roleId = '' + } else if (item.setting.database === 'sso') { + roleId = '' + } - sqls.push({uuid: item.uuid, roleId: item.wrap && item.wrap.permission === 'false' ? '' : config.uuid, type: 'datasource', ...msg}) + sqls.push({uuid: item.uuid, roleId: roleId, type: 'datasource', ...msg}) } else if (item.setting && item.setting.useMSearch === 'true') { let searches = item.search || [] if (mainSearch.length > 0) { @@ -3231,6 +3237,8 @@ roleId = '' } else if (cell.hidden === 'true' || cell.permission === 'false') { roleId = '' + } else if (cell.database === 'sso') { + roleId = '' } if (['exec', 'prompt', 'pop', 'form', 'formSubmit'].includes(cell.OpenType)) { diff --git a/src/views/main/index.jsx b/src/views/main/index.jsx index cf36bd0..8723ebc 100644 --- a/src/views/main/index.jsx +++ b/src/views/main/index.jsx @@ -4,7 +4,7 @@ import Header from '@/components/header' import MKEmitter from '@/utils/events.js' import Sidemenu from '@/components/sidemenu' -// import QueryLog from '@/components/querylog' +import QueryLog from '@/components/querylog' import ImgScale from '@/components/imgScale' // import './index.scss' @@ -78,7 +78,7 @@ {navBar === 'shutter' || navBar === 'menu_board_navigation' ? <Tabview key="tabview"/> : <Breadview key="breadview"/>} - {/* {window.GLOB.systemType === 'production' ? <QueryLog /> : null} */} + {window.GLOB.systemType === 'production' ? <QueryLog /> : null} <ImgScale /> </div> ) -- Gitblit v1.8.0