From 044a4ec4ebe85f8c00e889fe3914de17a6ea1f28 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 17 十月 2024 18:18:01 +0800 Subject: [PATCH] 2024-10-17 --- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 6 +- src/tabviews/zshare/actionList/tabbutton/index.jsx | 12 ++-- src/tabviews/zshare/actionList/newpagebutton/index.jsx | 16 ++-- src/components/header/index.jsx | 6 +- src/tabviews/zshare/actionList/popupbutton/index.jsx | 6 +- src/components/sidemenu/index.jsx | 6 +- src/tabviews/zshare/actionList/normalbutton/index.jsx | 20 +++--- src/components/querylog/index.jsx | 65 +++++++++------------ src/views/main/index.jsx | 4 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 6 +- src/tabviews/zshare/actionList/printbutton/index.jsx | 6 +- 11 files changed, 72 insertions(+), 81 deletions(-) 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/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..1f858e6 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) => { 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/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