From 0c439ced2c97905cb2b02f5f689a37b19369fb8a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 22 七月 2022 15:00:58 +0800 Subject: [PATCH] 2022-07-22 --- src/views/design/sidemenu/editthdmenu/preview/index.jsx | 0 src/utils/utils-datamanage.js | 28 src/views/design/sidemenu/editsecmenu/index.scss | 0 src/tabviews/custom/components/code/sand-box/index.jsx | 5 src/tabviews/formtab/index.jsx | 12 src/tabviews/formtab/actionList/index.jsx | 5 src/tabviews/custom/components/editor/braft-editor/index.jsx | 5 src/tabviews/custom/components/tree/antd-tree/index.jsx | 5 src/tabviews/verupmanage/actionList/index.jsx | 1 src/tabviews/custom/components/tabs/antv-tabs/index.jsx | 1 src/tabviews/zshare/normalTable/index.jsx | 22 - src/views/design/header/editfirstmenu/index.jsx | 0 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 19 src/templates/treepageconfig/index.jsx | 13 src/views/design/sidemenu/editthdmenu/menuform/index.jsx | 0 src/views/design/sidemenu/menuelement/index.scss | 0 src/views/billprint/index.jsx | 24 src/views/design/sidemenu/index.jsx | 36 + src/tabviews/subtabtable/index.jsx | 18 src/tabviews/commontable/index.jsx | 25 src/tabviews/zshare/actionList/normalbutton/index.jsx | 31 - src/views/design/sidemenu/editthdmenu/index.jsx | 7 src/views/mobdesign/index.jsx | 19 src/tabviews/custom/components/card/data-card/index.jsx | 11 src/tabviews/custom/components/card/prop-card/index.jsx | 5 src/views/design/header/editfirstmenu/dragelement/itemtypes.js | 0 src/views/design/sidemenu/menuelement/card.jsx | 0 src/views/design/sidemenu/editsecmenu/index.jsx | 0 src/views/design/sidemenu/menuelement/index.jsx | 0 src/views/design/sidemenu/editthdmenu/index.scss | 0 src/store/reducer.js | 20 - src/tabviews/custom/components/group/normal-group/index.jsx | 52 +-- src/tabviews/custom/components/table/normal-table/index.jsx | 24 - src/store/action-type.js | 3 src/templates/calendarconfig/index.jsx | 13 src/views/design/header/editfirstmenu/index.scss | 0 src/tabviews/custom/components/chart/antv-pie/index.jsx | 7 src/tabviews/custom/components/timeline/normal-timeline/index.jsx | 5 src/templates/subtableconfig/index.jsx | 13 src/tabviews/zshare/mutilform/index.jsx | 11 src/tabviews/custom/components/carousel/prop-card/index.jsx | 5 src/views/design/sidemenu/editthdmenu/menuform/index.scss | 0 src/tabviews/custom/index.jsx | 59 +- src/views/design/sidemenu/menuelement/itemtypes.js | 0 src/tabviews/verupmanage/index.jsx | 2 src/views/design/header/editfirstmenu/menuform/index.jsx | 0 src/tabviews/treepage/index.jsx | 11 src/views/design/header/editfirstmenu/dragelement/index.scss | 0 src/views/design/header/editfirstmenu/menuform/index.scss | 0 src/tabviews/custom/components/chart/antv-scatter/index.jsx | 7 src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 7 src/tabviews/custom/components/chart/antv-dashboard/index.jsx | 5 src/views/design/header/index.jsx | 38 + src/views/design/sidemenu/menuform/index.scss | 0 src/tabviews/verupmanage/subtabtable/index.jsx | 2 src/tabviews/zshare/topSearch/index.jsx | 15 src/templates/comtableconfig/index.jsx | 13 src/tabviews/calendar/index.jsx | 14 src/views/design/header/editfirstmenu/dragelement/index.jsx | 0 src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 25 - src/tabviews/custom/components/carousel/data-card/index.jsx | 5 src/tabviews/custom/components/table/edit-table/index.jsx | 22 - src/views/design/header/editfirstmenu/dragelement/card.jsx | 0 src/views/design/sidemenu/index.scss | 1 src/store/action.js | 8 src/tabviews/custom/components/share/normalTable/index.jsx | 22 - src/tabviews/custom/components/form/simple-form/index.jsx | 9 src/tabviews/subtable/index.jsx | 15 src/tabviews/custom/components/share/normalheader/index.jsx | 5 src/views/design/sidemenu/menuform/index.jsx | 0 src/tabviews/custom/components/chart/custom-chart/index.jsx | 7 src/utils/utils.js | 20 + src/index.js | 16 + src/tabviews/custom/components/form/tab-form/index.jsx | 5 src/views/sso/index.jsx | 18 src/tabviews/custom/components/card/table-card/index.jsx | 7 src/tabviews/scriptmanage/actionList/index.jsx | 1 src/tabviews/custom/components/share/tabtransfer/index.jsx | 60 +-- src/views/pcdesign/index.jsx | 19 src/tabviews/zshare/actionList/printbutton/index.jsx | 16 /dev/null | 17 - src/views/design/sidemenu/editthdmenu/preview/index.scss | 0 src/tabviews/custom/components/form/step-form/index.jsx | 5 src/tabviews/custom/components/card/balcony/index.jsx | 4 src/tabviews/scriptmanage/index.jsx | 2 src/views/login/index.jsx | 18 86 files changed, 351 insertions(+), 594 deletions(-) diff --git a/src/index.js b/src/index.js index 9e500b6..f1ea5de 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,7 @@ import ReactDOM from 'react-dom' import Route from './router' import { Provider } from 'react-redux' +import md5 from 'md5' import store from '@/store' import * as serviceWorker from './serviceWorker' import options, { styles } from '@/store/options.js' @@ -74,6 +75,7 @@ GLOB.WXAppID = config.WXAppID || '' GLOB.WXminiAppID = config.WXminiAppID || '' GLOB.accessToken = {} + GLOB.mkHS = false if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' @@ -224,6 +226,20 @@ sessionStorage.setItem('lang', config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US') } + let _level = 10 + let _Mlevel = sessionStorage.getItem('Member_Level') + + if (_Mlevel) { + if (_Mlevel === md5('mksoft' + GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 10)) { + _level = 10 + } else if (_Mlevel === md5('mksoft' + GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 20)) { + _level = 20 + } else if (_Mlevel === md5('mksoft' + GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 30)) { + _level = 30 + } + } + GLOB.memberLevel = _level + Object.defineProperty(GLOB, 'appId', { writable: false, value: GLOB.appId diff --git a/src/store/action-type.js b/src/store/action-type.js index 13cba48..c65f4df 100644 --- a/src/store/action-type.js +++ b/src/store/action-type.js @@ -19,8 +19,5 @@ // 鍒濆鍖栬彍鍗曟潈闄� export const INIT_MENUPERMISSION = 'INIT_MENUPERMISSION' -// 淇敼浼氬憳绛夌骇 -export const MODIFY_MEMBERLEVEL = 'MODIFY_MEMBERLEVEL' - // 閫�鍑� export const LOGOUT = 'LOGOUT' \ No newline at end of file diff --git a/src/store/action.js b/src/store/action.js index 5fed87e..b4bbf15 100644 --- a/src/store/action.js +++ b/src/store/action.js @@ -48,14 +48,6 @@ } } -// 鍒濆鍖栬彍鍗曟潈闄� -export const modifyMemberLevel = (memberLevel) => { - return { - type: user.MODIFY_MEMBERLEVEL, - memberLevel: memberLevel - } -} - // 閫�鍑洪噸缃� export const logout = () => { return { diff --git a/src/store/reducer.js b/src/store/reducer.js index e262dfa..15db885 100644 --- a/src/store/reducer.js +++ b/src/store/reducer.js @@ -1,22 +1,9 @@ -import md5 from 'md5' -import moment from 'moment' import * as Type from './action-type' let _mainMenu = null let _url = window.location.href.split('#')[0] let _collapse = localStorage.getItem('collapse') === 'true' -let _level = 10 -let _Mlevel = sessionStorage.getItem('Member_Level') -if (_Mlevel) { - if (_Mlevel === md5('mksoft' + moment().format('YYYYMM') + 10)) { - _level = 10 - } else if (_Mlevel === md5('mksoft' + moment().format('YYYYMM') + 20)) { - _level = 20 - } else if (_Mlevel === md5('mksoft' + moment().format('YYYYMM') + 30)) { - _level = 30 - } -} if (localStorage.getItem(_url + '-sideHidden') === 'true') { _mainMenu = '' } @@ -28,7 +15,6 @@ editLevel: null, // 缂栬緫鑿滃崟绾у埆锛屽�间负level1銆乴evel2銆乴evel3銆丠S permAction: {}, // 鐢ㄦ埛鎸夐挳鏉冮檺 permMenus: [], // 鐢ㄦ埛涓夌骇鑿滃崟鍒楄〃 - memberLevel: _level, // 浼氬憳绛夌骇 } // 鐢ㄦ埛娑堟伅 @@ -69,12 +55,6 @@ return { ...state, permMenus: action.permMenus - } - case Type.MODIFY_MEMBERLEVEL: - // 淇敼浼氬憳绛夌骇 - return { - ...state, - memberLevel: action.memberLevel } case Type.LOGOUT: return { diff --git a/src/tabviews/calendar/index.jsx b/src/tabviews/calendar/index.jsx index 069142e..76671e6 100644 --- a/src/tabviews/calendar/index.jsx +++ b/src/tabviews/calendar/index.jsx @@ -76,7 +76,7 @@ } // HS涓嶄娇鐢ㄨ嚜瀹氫箟璁剧疆 - if (result.LongParamUser && this.props.menuType !== 'HS') { + if (result.LongParamUser && !window.GLOB.mkHS) { try { // 閰嶇疆淇℃伅瑙f瀽 userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) _curUserConfig = userConfig[this.props.MenuID] @@ -106,7 +106,7 @@ } // 鏉冮檺杩囨护 - if (this.props.menuType !== 'HS') { + if (!window.GLOB.mkHS) { if (config.tab && !permAction[config.tab.linkTab]) { config.tab = null } @@ -298,7 +298,7 @@ if (setting.interType === 'inner') { param.func = setting.innerFunc } else { - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (setting.sysInterface === 'true' && options.cloudServiceApi) { param.rduri = options.cloudServiceApi } else if (setting.sysInterface !== 'true') { @@ -435,7 +435,7 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.DateCount = '' - if (this.props.menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -538,17 +538,16 @@ } render() { - const { menuType } = this.props const { BID, setting, searchlist, loadingview, viewlost, config, loading, data, triggerTime } = this.state return ( <div className="calendar-page" id={this.state.ContainerId}> {loadingview && <Spin size="large" />} {searchlist && searchlist.length > 0 ? - <MainSearch BID={BID} searchlist={searchlist} setting={setting} menuType={menuType} refreshdata={this.refreshbysearch}/> : null + <MainSearch BID={BID} searchlist={searchlist} setting={setting} refreshdata={this.refreshbysearch}/> : null } {config && config.calendar ? <CalendarComponent calendar={config.calendar} loading={loading} data={data} triggerDate={this.triggerDate} changeDate={this.changeDate}/> : null} - {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} + {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} <Modal title={config.tab ? config.tab.label : ''} width={'80vw'} @@ -575,7 +574,6 @@ const mapStateToProps = (state) => { return { - menuType: state.editLevel, permAction: state.permAction } } diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index fdf384d..255c26d 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -100,7 +100,7 @@ } // HS涓嶄娇鐢ㄨ嚜瀹氫箟璁剧疆 - if (result.LongParamUser && this.props.menuType !== 'HS') { + if (result.LongParamUser && !window.GLOB.mkHS) { try { // 閰嶇疆淇℃伅瑙f瀽 let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) if (userConfig && !userConfig.version) { @@ -158,7 +158,7 @@ config = updateCommonTable(config) // 鏉冮檺杩囨护 - if (this.props.menuType !== 'HS') { + if (!window.GLOB.mkHS) { config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) config.tabgroups.forEach(group => { group.sublist = group.sublist.filter(tab => { @@ -538,7 +538,7 @@ loadOutResource = () => { const { setting, search, BID } = this.state - let param = UtilsDM.getPrevQueryParams(setting, search, BID, this.props.menuType) + let param = UtilsDM.getPrevQueryParams(setting, search, BID) if (setting.execType === 'sync') { this.setState({ @@ -658,7 +658,7 @@ param.BID = BID } - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } } else { @@ -713,7 +713,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, this.props.menuType) + let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID) let result = await Api.genericInterface(param) @@ -797,7 +797,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) + let param = UtilsDM.getQueryDataParams(setting, arr_field, search, _orderBy, pageIndex, pageSize, BID, id) let result = await Api.genericInterface(param) if (result.status) { @@ -865,7 +865,7 @@ if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return let _orderBy = orderBy || setting.order - let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID, this.props.menuType) + let param = UtilsDM.getStatQueryDataParams(setting, statFields, search, _orderBy, BID) Api.genericInterface(param).then(res => { if (res.status) { @@ -1124,14 +1124,14 @@ } render() { - const { menuType, MenuID } = this.props + const { MenuID } = this.props const { BID, setting, searchlist, pageSize, actions, columns, loadingview, viewlost, pickup, config, chartId, search, selectedData, shortcuts, autoMatic } = this.state return ( <div className="commontable" id={this.state.ContainerId}> {loadingview ? <Spin size="large" /> : null} {searchlist && searchlist.length ? - <MainSearch BID={BID} searchlist={searchlist} setting={setting} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null + <MainSearch BID={BID} searchlist={searchlist} setting={setting} refreshdata={this.refreshbysearch}/> : null } {setting && config.charts ? <Row className="chart-view" gutter={16}> {/* 瑙嗗浘缁� */} @@ -1272,9 +1272,9 @@ })} </Tabs>)) } - {menuType !== 'HS' && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} - {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} - {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} + {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} + {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} + {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} </div> ) @@ -1283,7 +1283,6 @@ const mapStateToProps = (state) => { return { - menuType: state.editLevel, permAction: state.permAction, permMenus: state.permMenus } diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index f5c1b1f..0301dfa 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -18,7 +18,6 @@ BID: PropTypes.any, data: PropTypes.array, config: PropTypes.object, - menuType: PropTypes.any, } state = { @@ -297,7 +296,6 @@ } async loadData (hastimer) { - const { menuType } = this.props const { config, arr_field, BID, BData } = this.state if (config.wrap.datatype === 'static') { @@ -321,7 +319,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index b654209..ff124ec 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -22,7 +22,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -453,7 +452,7 @@ } async loadData (id) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, pageIndex, search, BID, BData, selected } = this.state if (config.setting.supModule && !BID && config.wrap.supKey !== 'false') { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -503,7 +502,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID) let result = await Api.genericInterface(param) if (result.status) { @@ -564,7 +563,7 @@ * @description 鑾峰彇鍗曡鏁版嵁 */ async loadLinedata (id) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, pageIndex, search, BID, BData } = this.state let searches = fromJS(search).toJS() @@ -582,7 +581,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, menuType, id) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, id) let result = await Api.genericInterface(param) if (result.status) { @@ -739,7 +738,7 @@ <Spin /> </div> : null } - <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> + <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> {config.action && config.action.length > 0 ? <MainAction BID={BID} diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index 37f61c3..6f2d0e3 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -20,7 +20,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -312,7 +311,7 @@ } async loadData (hastimer) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID, BData, selected } = this.state if (config.wrap.datatype === 'static') { @@ -341,7 +340,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index 9eb9281..314f10b 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -20,7 +20,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -227,7 +226,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, pageIndex, search, BID, BData } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -258,7 +257,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, pageIndex, config.setting.pageSize, BID) let result = await Api.genericInterface(param) if (result.status) { @@ -419,7 +418,7 @@ <Spin /> </div> : null } - <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> + <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> {data && data.length > 0 ? <Row className="card-row-list" style={{height: config.wrap.contentHeight}}> {data.map(item => this.getLines(item))} </Row> : null} diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx index 464929c..5765bce 100644 --- a/src/tabviews/custom/components/carousel/data-card/index.jsx +++ b/src/tabviews/custom/components/carousel/data-card/index.jsx @@ -17,7 +17,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -193,7 +192,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID, BData } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -215,7 +214,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index cecec16..554226a 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -17,7 +17,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -202,7 +201,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID, BData } = this.state if (config.wrap.datatype === 'static') { @@ -229,7 +228,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { 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 6f769fa..40be871 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -26,7 +26,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -508,7 +507,7 @@ * @description 鏁版嵁鍔犺浇 */ async loadData (hastimer) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID, search } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -542,7 +541,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { @@ -1868,7 +1867,7 @@ <Spin /> </div> : null } - <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> + <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> <div className="canvas-wrap" ref={ref => this.wrap = ref}> {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} <div className={'chart-action' + (config.plot.download === 'enable' ? ' downable' : '')}> diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx index dd536e5..7a0f2fa 100644 --- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx +++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx @@ -56,7 +56,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -251,7 +250,7 @@ } async loadData (hastimer) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -277,7 +276,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/chart/antv-pie/index.jsx b/src/tabviews/custom/components/chart/antv-pie/index.jsx index 8599ad4..d267805 100644 --- a/src/tabviews/custom/components/chart/antv-pie/index.jsx +++ b/src/tabviews/custom/components/chart/antv-pie/index.jsx @@ -22,7 +22,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -214,7 +213,7 @@ } async loadData (hastimer) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, search, BID } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -248,7 +247,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { @@ -1061,7 +1060,7 @@ <Spin /> </div> : null } - <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> + <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> <div className="canvas-wrap" ref={ref => this.wrap = ref}> {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx index 0e007e5..a56089e 100644 --- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx +++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx @@ -23,7 +23,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -245,7 +244,7 @@ * @description 鏁版嵁鍔犺浇 */ async loadData (hastimer) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID, search } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -280,7 +279,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { @@ -444,7 +443,7 @@ <Spin /> </div> : null } - <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> + <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> <div className="canvas-wrap" ref={ref => this.wrap = ref}> {config.plot.download === 'enable' && this.state.chart && !empty ? <DownloadOutlined onClick={this.downloadImage} className="system-color download"/> : null} <div className={'chart-action' + (config.plot.download === 'enable' ? ' downable' : '')}> diff --git a/src/tabviews/custom/components/chart/custom-chart/index.jsx b/src/tabviews/custom/components/chart/custom-chart/index.jsx index 0259d90..c554965 100644 --- a/src/tabviews/custom/components/chart/custom-chart/index.jsx +++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx @@ -20,7 +20,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -240,7 +239,7 @@ * @description 鏁版嵁鍔犺浇 */ async loadData (hastimer) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID, search } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -274,7 +273,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { @@ -377,7 +376,7 @@ <Spin /> </div> : null } - <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> + <NormalHeader config={config} BID={BID} refresh={this.refreshSearch} /> <div className={'canvas' + (empty ? ' empty' : '')} ref={ref => this.wrap = ref}></div> {empty ? <Empty description={false}/> : null} </div> diff --git a/src/tabviews/custom/components/code/sand-box/index.jsx b/src/tabviews/custom/components/code/sand-box/index.jsx index 0938216..5eb969e 100644 --- a/src/tabviews/custom/components/code/sand-box/index.jsx +++ b/src/tabviews/custom/components/code/sand-box/index.jsx @@ -14,7 +14,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -124,7 +123,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static') { @@ -153,7 +152,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/editor/braft-editor/index.jsx b/src/tabviews/custom/components/editor/braft-editor/index.jsx index 437de06..2f9c508 100644 --- a/src/tabviews/custom/components/editor/braft-editor/index.jsx +++ b/src/tabviews/custom/components/editor/braft-editor/index.jsx @@ -18,7 +18,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -122,7 +121,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static') { @@ -151,7 +150,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx index 151cf82..35fd004 100644 --- a/src/tabviews/custom/components/form/simple-form/index.jsx +++ b/src/tabviews/custom/components/form/simple-form/index.jsx @@ -23,7 +23,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -132,7 +131,7 @@ if (config.uuid !== menuId) return - this.loadData('refresh') + this.loadData() } /** @@ -203,8 +202,8 @@ } } - async loadData (type) { - const { mainSearch, menuType } = this.props + async loadData () { + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { @@ -228,7 +227,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx index fccab51..91eb195 100644 --- a/src/tabviews/custom/components/form/step-form/index.jsx +++ b/src/tabviews/custom/components/form/step-form/index.jsx @@ -22,7 +22,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -253,7 +252,7 @@ } async loadData (type) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { @@ -277,7 +276,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index 2fd0b16..fc90e76 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -22,7 +22,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -214,7 +213,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { @@ -238,7 +237,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, 1, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/group/normal-group/index.jsx b/src/tabviews/custom/components/group/normal-group/index.jsx index ce9472f..7874b04 100644 --- a/src/tabviews/custom/components/group/normal-group/index.jsx +++ b/src/tabviews/custom/components/group/normal-group/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { Col, Empty, notification, Button, Row } from 'antd' @@ -39,7 +38,6 @@ bids: PropTypes.any, // 鐖剁骇Id闆� config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 鍏ㄥ眬鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -130,7 +128,7 @@ } getComponents = () => { - const { menuType, BID, bids, config } = this.props + const { BID, bids, config } = this.props const { mainSearch, data } = this.state if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) @@ -146,109 +144,109 @@ if (item.type === 'bar' || item.type === 'line') { return ( <Col span={item.width} key={item.uuid}> - <AntvBarAndLine data={data} config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvBarAndLine data={data} config={item} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'pie') { return ( <Col span={item.width} key={item.uuid}> - <AntvPie data={data} config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvPie data={data} config={item} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'dashboard') { return ( <Col span={item.width} key={item.uuid}> - <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'stepform') { return ( <Col span={item.width} key={item.uuid}> - <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'tabform') { return ( <Col span={item.width} key={item.uuid}> - <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'scatter') { return ( <Col span={item.width} key={item.uuid}> - <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselDataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <CarouselDataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselPropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <CarouselPropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'card' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <DataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <DataCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'card' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <PropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <PropCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'tablecard') { return ( <Col span={item.width} key={item.uuid}> - <TableCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <TableCard config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'normaltable') { return ( <Col span={item.width} key={item.uuid}> - <NormalTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <NormalTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'editable') { return ( <Col span={item.width} key={item.uuid}> - <EditTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <EditTable config={item} data={data} BID={_bid} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'tree') { return ( <Col span={item.width} key={item.uuid}> - <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'editor') { return ( <Col span={item.width} key={item.uuid}> - <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'code') { return ( <Col span={item.width} key={item.uuid}> - <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'balcony') { return ( <Col span={item.width} key={item.uuid}> - <Balcony config={item} data={data} BID={_bid} menuType={menuType} /> + <Balcony config={item} data={data} BID={_bid}/> </Col> ) } else if (item.type === 'chart') { return ( <Col span={item.width} key={item.uuid}> - <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else { @@ -342,14 +340,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(TabTransfer) \ No newline at end of file +export default TabTransfer \ No newline at end of file diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index 0aa9953..99f8396 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -1,7 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import md5 from 'md5' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { Table, Typography, Col, Switch, message } from 'antd' @@ -415,18 +414,18 @@ } UNSAFE_componentWillMount () { - const { menuType, memberLevel, setting, fields, columns } = this.props + const { setting, fields, columns } = this.props let radio = 5 // 铏氬寲姣斾緥 let _format = false // 鏄惁铏氬寲澶勭悊 let rowspans = [] let orderfields = {} - if (window.GLOB.dataFormat && menuType !== 'HS' && memberLevel) { + if (window.GLOB.dataFormat && !window.GLOB.mkHS) { _format = true - if (memberLevel >= 30) { + if (window.GLOB.memberLevel >= 30) { radio = 20 - } else if (memberLevel >= 20) { + } else if (window.GLOB.memberLevel >= 20) { radio = 10 } } @@ -936,15 +935,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel, - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) \ No newline at end of file +export default NormalTable \ No newline at end of file diff --git a/src/tabviews/custom/components/share/normalheader/index.jsx b/src/tabviews/custom/components/share/normalheader/index.jsx index 92848b7..0b19275 100644 --- a/src/tabviews/custom/components/share/normalheader/index.jsx +++ b/src/tabviews/custom/components/share/normalheader/index.jsx @@ -9,7 +9,6 @@ class NormalHeader extends Component { static propTpyes = { BID: PropTypes.any, // 涓婄骇涓婚敭鍊� - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 config: PropTypes.object, // 閰嶇疆淇℃伅 refresh: PropTypes.func // 鏉′欢鍒锋柊 } @@ -40,7 +39,7 @@ } render() { - const { config, menuType, BID } = this.props + const { config, BID } = this.props const { title, show } = this.state if (!title && !show) return null @@ -48,7 +47,7 @@ return ( <div className={'normal-header' + (show ? ' header-search' : '')} style={config.headerStyle}> <span className="title">{title}</span> - {show ? <SearchComponent config={config} BID={BID} menuType={menuType} refreshdata={this.props.refresh}/> : null} + {show ? <SearchComponent config={config} BID={BID} refreshdata={this.props.refresh}/> : null} </div> ) } diff --git a/src/tabviews/custom/components/share/tabtransfer/index.jsx b/src/tabviews/custom/components/share/tabtransfer/index.jsx index 7aac628..1fbd303 100644 --- a/src/tabviews/custom/components/share/tabtransfer/index.jsx +++ b/src/tabviews/custom/components/share/tabtransfer/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { Row, Col, Empty, notification } from 'antd' @@ -42,7 +41,6 @@ bids: PropTypes.any, // 鐖剁骇Id闆� config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 鍏ㄥ眬鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -156,7 +154,7 @@ } getComponents = () => { - const { menuType, bids, config } = this.props + const { bids, config } = this.props const { mainSearch, data } = this.state if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) @@ -172,133 +170,133 @@ if (item.type === 'bar' || item.type === 'line') { return ( <Col span={item.width} key={item.uuid}> - <AntvBarAndLine data={data} config={item} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <AntvBarAndLine data={data} config={item} BID={BID} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'pie') { return ( <Col span={item.width} key={item.uuid}> - <AntvPie data={data} config={item} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <AntvPie data={data} config={item} BID={BID} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'dashboard') { return ( <Col span={item.width} key={item.uuid}> - <AntvDashboard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <AntvDashboard config={item} data={data} BID={BID} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'scatter') { return ( <Col span={item.width} key={item.uuid}> - <AntvScatter config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <AntvScatter config={item} data={data} BID={BID} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'search') { return ( <Col span={item.width} key={item.uuid}> - <MainSearch config={item} BID={BID} menuType={menuType} refreshdata={this.resetSearch} /> + <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> </Col> ) } else if (item.type === 'tabs') { return ( <Col span={item.width} key={item.uuid}> - <AntvTabs config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} /> + <AntvTabs config={item} BID={BID} bids={bids} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'card' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <DataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <DataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'card' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <PropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <PropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselDataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <CarouselDataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselPropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <CarouselPropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'tablecard') { return ( <Col span={item.width} key={item.uuid}> - <TableCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <TableCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'normaltable') { return ( <Col span={item.width} key={item.uuid}> - <NormalTable config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <NormalTable config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'editable') { return ( <Col span={item.width} key={item.uuid}> - <EditTable config={item} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <EditTable config={item} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'group' && item.subtype === 'normalgroup') { return ( <Col span={item.width} key={item.uuid}> - <NormalGroup config={item} BID={BID} bids={bids} mainSearch={mainSearch} menuType={menuType} /> + <NormalGroup config={item} BID={BID} bids={bids} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'simpleform') { return ( <Col span={item.width} key={item.uuid}> - <SimpleForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <SimpleForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'stepform') { return ( <Col span={item.width} key={item.uuid}> - <StepForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <StepForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'tabform') { return ( <Col span={item.width} key={item.uuid}> - <TabForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> + <TabForm config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'tree') { return ( <Col span={item.width} key={item.uuid}> - <NormalTree config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <NormalTree config={item} data={data} BID={BID} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'editor') { return ( <Col span={item.width} key={item.uuid}> - <BraftEditor config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <BraftEditor config={item} data={data} BID={BID} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'code') { return ( <Col span={item.width} key={item.uuid}> - <SandBox config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <SandBox config={item} data={data} BID={BID} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'balcony') { return ( <Col span={item.width} key={item.uuid}> - <Balcony config={item} data={data} BID={BID} menuType={menuType} /> + <Balcony config={item} data={data} BID={BID}/> </Col> ) } else if (item.type === 'chart') { return ( <Col span={item.width} key={item.uuid}> - <CustomChart config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> + <CustomChart config={item} data={data} BID={BID} mainSearch={mainSearch}/> </Col> ) } else { @@ -314,14 +312,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(TabTransfer) \ No newline at end of file +export default TabTransfer \ No newline at end of file diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index abbf68e..f130dc6 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { notification } from 'antd' @@ -22,7 +21,6 @@ BID: PropTypes.any, // 鐖剁骇Id config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -202,7 +200,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) let result = await Api.genericInterface(param) if (result.status) { @@ -265,7 +263,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) let result = await Api.genericInterface(param) if (result.status) { @@ -356,7 +354,7 @@ } let _orderBy = orderBy || setting.order - let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID, this.props.menuType) + let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID) Api.genericInterface(param).then(res => { if (res.status) { @@ -580,7 +578,7 @@ <div className="custom-edit-table" id={'anchor' + config.uuid} style={config.style}> <NormalHeader config={config}/> {config.search && config.search.length ? - <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null + <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null } <MainAction BID={BID} @@ -611,14 +609,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(EditableTable) \ No newline at end of file +export default EditableTable \ No newline at end of file diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index 85e4fe5..29532d5 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { notification, Collapse } from 'antd' @@ -25,7 +24,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -210,7 +208,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) let result = await Api.genericInterface(param) if (result.status) { @@ -290,7 +288,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) let result = await Api.genericInterface(param) if (result.status) { @@ -373,7 +371,7 @@ } let _orderBy = orderBy || setting.order - let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID, this.props.menuType) + let param = UtilsDM.getStatQueryDataParams(setting, config.statFields, searches, _orderBy, BID) Api.genericInterface(param).then(res => { if (res.status) { @@ -635,7 +633,7 @@ {config.wrap.collapse === 'true' ? <Collapse bordered={false} defaultActiveKey="1" expandIconPosition="right"> <Panel forceRender={true} header={<NormalHeader config={config}/>} key="1"> {config.search && config.search.length ? - <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null + <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null } <MainAction BID={BID} @@ -664,7 +662,7 @@ </Collapse> : <> <NormalHeader config={config}/> {config.search && config.search.length ? - <MainSearch BID={BID} config={config} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null + <MainSearch BID={BID} config={config} refreshdata={this.refreshbysearch}/> : null } <MainAction BID={BID} @@ -695,14 +693,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) \ No newline at end of file +export default NormalTable \ No newline at end of file diff --git a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx index e098179..064a1d0 100644 --- a/src/tabviews/custom/components/tabs/antv-tabs/index.jsx +++ b/src/tabviews/custom/components/tabs/antv-tabs/index.jsx @@ -17,7 +17,6 @@ bids: PropTypes.any, // 鐖剁骇Id闆� config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx index eaf2074..13127d8 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx @@ -19,7 +19,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -216,7 +215,7 @@ } async loadData () { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID, BData } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -246,7 +245,7 @@ }) let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, config.setting.pageSize, BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, 1, config.setting.pageSize, BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx index 5f5c919..5cc68a0 100644 --- a/src/tabviews/custom/components/tree/antd-tree/index.jsx +++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx @@ -20,7 +20,6 @@ data: PropTypes.array, // 缁熶竴鏌ヨ鏁版嵁 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅 mainSearch: PropTypes.any, // 澶栧眰鎼滅储鏉′欢 - menuType: PropTypes.any, // 鑿滃崟绫诲瀷 } state = { @@ -188,7 +187,7 @@ * @description 鏁版嵁鍔犺浇 */ async loadData (hastimer) { - const { mainSearch, menuType } = this.props + const { mainSearch } = this.props const { config, arr_field, BID } = this.state if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇� @@ -214,7 +213,7 @@ } let _orderBy = config.setting.order || '' - let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID, menuType) + let param = UtilsDM.getQueryDataParams(config.setting, arr_field, searches, _orderBy, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index 1d0eb4e..29a1d27 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -93,7 +93,7 @@ } // HS涓嶄娇鐢ㄨ嚜瀹氫箟璁剧疆 - if (result.LongParamUser && this.props.menuType !== 'HS') { + if (result.LongParamUser && !window.GLOB.mkHS) { try { // 閰嶇疆淇℃伅瑙f瀽 let userConfig = JSON.parse(window.decodeURIComponent(window.atob(result.LongParamUser))) if (userConfig) { @@ -137,7 +137,7 @@ // 鏉冮檺杩囨护 let roleId = sessionStorage.getItem('role_id') || '' // 瑙掕壊ID let balMap = new Map() - let skip = config.permission === 'false' || this.props.menuType === 'HS' + let skip = config.permission === 'false' || window.GLOB.mkHS config.components = this.filterComponent(config.components, roleId, permAction, balMap, skip) // 鑾峰彇涓绘悳绱㈡潯浠� @@ -303,7 +303,7 @@ loadOutResource = (inters) => { let setting = inters.shift() - let param = UtilsDM.getPrevQueryParams(setting, [], this.state.BID, this.props.menuType) + let param = UtilsDM.getPrevQueryParams(setting, [], this.state.BID) Api.genericInterface(param).then(res => { if (res.status) { @@ -410,7 +410,7 @@ param.BID = this.state.BID } - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } } else { @@ -1158,7 +1158,6 @@ } getComponents = () => { - const { menuType } = this.props const { config, BID, data, mainSearch } = this.state if (!config || !config.components) return @@ -1172,49 +1171,49 @@ if (item.type === 'bar' || item.type === 'line') { return ( <Col span={item.width} key={item.uuid}> - <AntvBarAndLine config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvBarAndLine config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'pie') { return ( <Col span={item.width} key={item.uuid}> - <AntvPie config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvPie config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'scatter') { return ( <Col span={item.width} key={item.uuid}> - <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvScatter config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'dashboard') { return ( <Col span={item.width} key={item.uuid}> - <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'simpleform') { return ( <Col span={item.width} key={item.uuid}> - <SimpleForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <SimpleForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'stepform') { return ( <Col span={item.width} key={item.uuid}> - <StepForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <StepForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'form' && item.subtype === 'tabform') { return ( <Col span={item.width} key={item.uuid}> - <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'search') { return ( <Col span={item.width} key={item.uuid}> - <MainSearch config={item} BID={BID} menuType={menuType} refreshdata={this.resetSearch} /> + <MainSearch config={item} BID={BID} refreshdata={this.resetSearch} /> </Col> ) } else if (item.type === 'tabs') { @@ -1226,85 +1225,85 @@ } else if (item.type === 'card' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <DataCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <DataCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'card' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <PropCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <PropCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'balcony') { return ( <Col span={item.width} key={item.uuid}> - <Balcony config={item} data={data} BID={_bid} menuType={menuType} /> + <Balcony config={item} data={data} BID={_bid}/> </Col> ) } else if (item.type === 'timeline') { return ( <Col span={item.width} key={item.uuid}> - <TimeLine config={item} data={data} BID={_bid} menuType={menuType} /> + <TimeLine config={item} data={data} BID={_bid}/> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselDataCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <CarouselDataCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'carousel' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <CarouselPropCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <CarouselPropCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'tablecard') { return ( <Col span={item.width} key={item.uuid}> - <TableCard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <TableCard config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'normaltable') { return ( <Col span={item.width} key={item.uuid}> - <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <NormalTable config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'editable') { return ( <Col span={item.width} key={item.uuid}> - <EditTable config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <EditTable config={item} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'group' && item.subtype === 'normalgroup') { return ( <Col span={item.width} key={item.uuid}> - <NormalGroup config={item} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <NormalGroup config={item} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'editor') { return ( <Col span={item.width} key={item.uuid}> - <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <BraftEditor config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'tree') { return ( <Col span={item.width} key={item.uuid}> - <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <NormalTree config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'code') { return ( <Col span={item.width} key={item.uuid}> - <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'chart') { return ( <Col span={item.width} key={item.uuid}> - <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + <CustomChart config={item} data={data} BID={_bid} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'module' && item.subtype === 'voucher') { @@ -1320,15 +1319,14 @@ } render() { - const { menuType } = this.props const { loadingview, viewlost, config, loading, shortcuts } = this.state return ( <div className={'custom-page-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}> {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null} <Row className="component-wrap">{this.getComponents()}</Row> - {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} - {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} + {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} + {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} </div> ) @@ -1337,7 +1335,6 @@ const mapStateToProps = (state) => { return { - menuType: state.editLevel, refreshTab: state.refreshTab, permAction: state.permAction, permMenus: state.permMenus diff --git a/src/tabviews/formtab/actionList/index.jsx b/src/tabviews/formtab/actionList/index.jsx index 17b6493..a9f47c9 100644 --- a/src/tabviews/formtab/actionList/index.jsx +++ b/src/tabviews/formtab/actionList/index.jsx @@ -11,7 +11,6 @@ class MainAction extends Component { static propTpyes = { - menuType: PropTypes.any, // 鑿滃崟绫诲瀷锛屾櫘閫氳彍鍗曟垨HS MenuID: PropTypes.string, // 鑿滃崟ID primaryId: PropTypes.string, // 涓婚敭 actions: PropTypes.array, // 鎸夐挳缁� @@ -142,7 +141,7 @@ param.LText = Utils.formatOptions(param.LText) } - if (this.props.menuType === 'HS' && param.timestamp) { // 浜戠楠岃瘉 + if (window.GLOB.mkHS && param.timestamp) { // 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -208,7 +207,7 @@ // 澶栭儴璇锋眰 _outParam = JSON.parse(JSON.stringify(res)) - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { res.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx index a94d93b..9c15dfd 100644 --- a/src/tabviews/formtab/index.jsx +++ b/src/tabviews/formtab/index.jsx @@ -103,7 +103,7 @@ config.tabgroups = _tabgroups } - if (this.props.menuType !== 'HS') { + if (!window.GLOB.mkHS) { config.action = config.action.filter(item => permAction[item.uuid]) config.tabgroups.forEach(group => { group.sublist = group.sublist.filter(tab => { @@ -214,7 +214,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - if (this.props.menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) if (item.database === 'sso' && options.cloudServiceApi) { // 瀛樺湪浜戠鍦板潃鏃讹紝浣跨敤浜戠绯荤粺鍙傛暟 @@ -438,7 +438,7 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.DateCount = '' - if (this.props.menuType !== 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (!window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -456,7 +456,7 @@ if (setting.interType === 'inner') { param.func = setting.innerFunc } else { - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (setting.sysInterface === 'true' && options.cloudServiceApi) { param.rduri = options.cloudServiceApi } else if (setting.sysInterface !== 'true') { @@ -622,7 +622,6 @@ } {hasform ? <FormAction - menuType={this.props.menuType} setting={setting} actions={actions} dict={this.state.dict} @@ -661,7 +660,7 @@ ) }) } - {this.props.menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} + {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} </div> ) @@ -670,7 +669,6 @@ const mapStateToProps = (state) => { return { - menuType: state.editLevel, permAction: state.permAction } } diff --git a/src/tabviews/scriptmanage/actionList/index.jsx b/src/tabviews/scriptmanage/actionList/index.jsx index 0aa7502..6ddf524 100644 --- a/src/tabviews/scriptmanage/actionList/index.jsx +++ b/src/tabviews/scriptmanage/actionList/index.jsx @@ -277,7 +277,6 @@ destroyOnClose > <MutilForm - menuType="HS" dict={this.props.dict} action={execAction} inputSubmit={this.handleOk} diff --git a/src/tabviews/scriptmanage/index.jsx b/src/tabviews/scriptmanage/index.jsx index 1773ebd..63947a9 100644 --- a/src/tabviews/scriptmanage/index.jsx +++ b/src/tabviews/scriptmanage/index.jsx @@ -308,7 +308,7 @@ return ( <div className="script-manage-table" id={this.state.ContainerId}> - <MainSearch searchlist={searchlist} menuType="HS" refreshdata={this.refreshbysearch}/> + <MainSearch searchlist={searchlist} refreshdata={this.refreshbysearch}/> <MainAction BID="" type="main" diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 880670d..8d8fc3f 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -133,7 +133,7 @@ config = updateSubTable(config) // 鏉冮檺杩囨护 - if (this.props.menuType !== 'HS') { + if (!window.GLOB.mkHS) { config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) } else { config.action = config.action.filter(item => item.hidden !== 'true') @@ -430,7 +430,7 @@ loadOutResource = (searches) => { const { setting, BID } = this.state - let param = UtilsDM.getPrevQueryParams(setting, searches, BID, this.props.menuType) + let param = UtilsDM.getPrevQueryParams(setting, searches, BID) if (setting.execType === 'sync') { this.setState({ @@ -550,7 +550,7 @@ param.BID = BID } - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } } else { @@ -611,7 +611,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) let result = await Api.genericInterface(param) @@ -691,7 +691,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) let result = await Api.genericInterface(param) if (result.status) { @@ -760,7 +760,7 @@ if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return let _orderBy = orderBy || setting.order - let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID, this.props.menuType) + let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID) Api.genericInterface(param).then(res => { if (res.status) { @@ -999,7 +999,7 @@ <div className="subtable" id={'subtable' + this.props.MenuID}> {loadingview && <Spin />} {searchlist && searchlist.length ? - <SubSearch BID={BID} setting={setting} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null + <SubSearch BID={BID} setting={setting} searchlist={searchlist} refreshdata={this.refreshbysearch}/> : null } {config && config.charts ? <Row className="chart-view" gutter={16}> {/* 瑙嗗浘缁� */} @@ -1130,7 +1130,6 @@ const mapStateToProps = (state) => { return { - menuType: state.editLevel, permAction: state.permAction, permMenus: state.permMenus, } diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 5d9da0e..4c89fbe 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -128,7 +128,7 @@ } // 鏉冮檺杩囨护 - if (this.props.menuType !== 'HS') { + if (!window.GLOB.mkHS) { config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) } else { config.action = config.action.filter(item => item.hidden !== 'true') @@ -369,7 +369,7 @@ loadOutResource = (searches) => { const { setting } = this.state - let param = UtilsDM.getPrevQueryParams(setting, searches, this.props.BID, this.props.menuType) + let param = UtilsDM.getPrevQueryParams(setting, searches, this.props.BID) if (setting.execType === 'sync') { this.setState({ @@ -489,7 +489,7 @@ param.BID = this.props.BID } - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } } else { @@ -548,7 +548,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID) let result = await Api.genericInterface(param) @@ -618,7 +618,7 @@ if (statFields.length === 0 || !(setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) || !setting.dataresource) return let _orderBy = orderBy || setting.order - let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID, this.props.menuType) + let param = UtilsDM.getStatQueryDataParams(setting, statFields, searches, _orderBy, BID) Api.genericInterface(param).then(res => { if (res.status) { @@ -667,7 +667,7 @@ }) let _orderBy = orderBy || setting.order - let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, this.props.menuType, id) + let param = UtilsDM.getQueryDataParams(setting, arr_field, searches, _orderBy, pageIndex, pageSize, BID, id) let result = await Api.genericInterface(param) if (result.status) { @@ -855,7 +855,7 @@ <div className="subtabtable" id={'subtabtable' + this.props.MenuID}> {loadingview && <Spin />} {searchlist && searchlist.length ? - <SubSearch BID={this.props.BID} setting={setting} searchlist={searchlist} menuType={this.props.menuType} refreshdata={this.refreshbysearch}/> : null + <SubSearch BID={this.props.BID} setting={setting} searchlist={searchlist} refreshdata={this.refreshbysearch}/> : null } {config ? <div style={{minHeight: '25px'}}> <SubAction @@ -892,9 +892,7 @@ const mapStateToProps = (state) => { return { - menuType: state.editLevel, - permAction: state.permAction, - memberLevel: state.memberLevel + permAction: state.permAction } } diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx index 3c53923..f68831b 100644 --- a/src/tabviews/treepage/index.jsx +++ b/src/tabviews/treepage/index.jsx @@ -274,7 +274,7 @@ }) let arr_field = `${setting.valueField},${setting.labelField},${setting.parentField}` - let param = UtilsDM.getQueryDataParams(setting, arr_field, [], setting.order, '', '', BID, this.props.menuType) + let param = UtilsDM.getQueryDataParams(setting, arr_field, [], setting.order, '', '', BID) let result = await Api.genericInterface(param) if (result.status) { @@ -568,7 +568,6 @@ } render() { - const { menuType } = this.props const { setting, loadingview, viewlost, config, tabgroups, treeNodes, treedata, expandedKeys, selectedKeys, shortcuts } = this.state return ( @@ -632,8 +631,8 @@ )} </Col> </Row> : null} - {menuType !== 'HS' && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} - {menuType !== 'HS' && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} + {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} + {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} </div> ) @@ -642,9 +641,7 @@ const mapStateToProps = (state) => { return { - menuType: state.editLevel, - permAction: state.permAction, - memberLevel: state.memberLevel + permAction: state.permAction } } diff --git a/src/tabviews/verupmanage/actionList/index.jsx b/src/tabviews/verupmanage/actionList/index.jsx index bc8e863..41c9e8b 100644 --- a/src/tabviews/verupmanage/actionList/index.jsx +++ b/src/tabviews/verupmanage/actionList/index.jsx @@ -784,7 +784,6 @@ destroyOnClose > <MutilForm - menuType="HS" dict={this.props.dict} action={execAction} inputSubmit={this.handleOk} diff --git a/src/tabviews/verupmanage/index.jsx b/src/tabviews/verupmanage/index.jsx index 22e5b42..9c1f4b3 100644 --- a/src/tabviews/verupmanage/index.jsx +++ b/src/tabviews/verupmanage/index.jsx @@ -456,7 +456,7 @@ return ( <div className="veruptable" id={this.state.ContainerId}> - <MainSearch searchlist={searchlist} menuType="HS" refreshdata={this.refreshbysearch}/> + <MainSearch searchlist={searchlist} refreshdata={this.refreshbysearch}/> <MainAction BID="" type="main" diff --git a/src/tabviews/verupmanage/subtabtable/index.jsx b/src/tabviews/verupmanage/subtabtable/index.jsx index ae15cff..0d69d00 100644 --- a/src/tabviews/verupmanage/subtabtable/index.jsx +++ b/src/tabviews/verupmanage/subtabtable/index.jsx @@ -419,7 +419,7 @@ return ( <div className="verup-subtable" id={'subtable' + this.props.MenuID}> {searchlist && searchlist.length ? - <MainSearch searchlist={searchlist} menuType="HS" refreshdata={this.refreshbysearch}/> : null + <MainSearch searchlist={searchlist} refreshdata={this.refreshbysearch}/> : null } {actions ? <div className="sub-action"> diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 92d46e7..81148eb 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -1,7 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import moment from 'moment' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { Button, Modal, notification, message } from 'antd' @@ -343,7 +342,7 @@ param.LText = Utils.formatOptions(result.sql) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - if (this.props.menuType === 'HS' && param.timestamp) { // 浜戠楠岃瘉 + if (window.GLOB.mkHS && param.timestamp) { // 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -410,7 +409,7 @@ // 澶栭儴璇锋眰 _outParam = fromJS(res).toJS() - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { param.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { @@ -436,7 +435,7 @@ res.func = btn.outerFunc } - if (this.props.menuType === 'HS' && res.func === 's_sDataDictb_excelIn') { // s_sDataDictb_excelIn 浜戠楠岃瘉 + if (window.GLOB.mkHS && res.func === 's_sDataDictb_excelIn') { // s_sDataDictb_excelIn 浜戠楠岃瘉 param.LText = Utils.formatOptions(result.sql) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) @@ -521,14 +520,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(ExcelInButton) \ No newline at end of file +export default ExcelInButton \ No newline at end of file diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index 45ee06b..437bf21 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -1,7 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import moment from 'moment' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { Button, Modal, notification, message } from 'antd' import * as XLSX from 'xlsx' @@ -244,7 +243,7 @@ } else if (btn.intertype === 'outer' && !btn.innerFunc) { // 浣跨敤澶栭儴鍑芥暟 let param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search) - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { param.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { @@ -290,7 +289,7 @@ delete res.message delete res.status - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { res.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { @@ -359,7 +358,7 @@ delete res.message delete res.status - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { res.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { @@ -431,7 +430,7 @@ } else if (btn.intertype === 'outer' && !btn.innerFunc) { // 浣跨敤澶栭儴鍑芥暟 param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize) - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { param.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { @@ -671,7 +670,7 @@ param.secretkey = Utils.encrypt('', param.timestamp) param.LText = Utils.formatOptions(script) - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -881,7 +880,7 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.DateCount = '' - if (this.props.menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -1022,14 +1021,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(ExcelOutButton) \ No newline at end of file +export default ExcelOutButton \ No newline at end of file diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 9840e07..f29a30e 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -1,7 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import moment from 'moment' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd' @@ -534,7 +533,7 @@ } } - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) if (check_param) { check_param.open_key = Utils.encryptOpenKey(check_param.secretkey, check_param.timestamp) @@ -656,7 +655,7 @@ } } - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -705,7 +704,7 @@ }) } - if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 + if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -742,7 +741,7 @@ param[setting.primaryKey] = primaryId } - if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 + if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -1250,7 +1249,7 @@ param.s_debug_type = 'Y' } - if (this.props.menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } } else { @@ -1369,7 +1368,7 @@ param.func = btn.innerFunc // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 - if (this.props.menuType === 'HS' && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { + if (window.GLOB.mkHS && param.func === 's_sDataDictb_TBBack' && param.LTextOut) { param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -1410,7 +1409,7 @@ if (btn.outerFunc) { res.func = btn.outerFunc } - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { res.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { @@ -1453,7 +1452,7 @@ let _callbackparam = {..._outParam, ...response} // 鍑芥暟 s_sDataDictb_TBBack 浜戠楠岃瘉 - if (this.props.menuType === 'HS' && _callbackparam.func === 's_sDataDictb_TBBack' && _callbackparam.LTextOut) { + if (window.GLOB.mkHS && _callbackparam.func === 's_sDataDictb_TBBack' && _callbackparam.LTextOut) { _callbackparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') _callbackparam.secretkey = Utils.encrypt(_callbackparam.LTextOut, _callbackparam.timestamp) _callbackparam.open_key = Utils.encryptOpenKey(_callbackparam.secretkey, _callbackparam.timestamp) @@ -2185,7 +2184,6 @@ <MutilForm BID={BID} dict={this.state.dict} - menuType={this.props.menuType} action={btnconfig} inputSubmit={this.handleOk} data={this.state.selines[0]} @@ -2228,7 +2226,6 @@ <MutilForm BID={BID} dict={this.state.dict} - menuType={this.props.menuType} action={btnconfig} inputSubmit={this.handleOk} data={this.state.selines[0]} @@ -2299,14 +2296,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(NormalButton) \ No newline at end of file +export default NormalButton \ No newline at end of file diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index 85e9636..5d6bb1f 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -1,7 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import moment from 'moment' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { Button, Modal, notification, message } from 'antd' @@ -816,7 +815,7 @@ // 澶栭儴璇锋眰 _outParam = JSON.parse(JSON.stringify(res)) - if (this.props.menuType === 'HS') { + if (window.GLOB.mkHS) { if (btn.sysInterface === 'true' && options.cloudServiceApi) { res.rduri = options.cloudServiceApi } else if (btn.sysInterface !== 'true') { @@ -1641,7 +1640,6 @@ <MutilForm BID={BID} dict={this.state.dict} - menuType={this.props.menuType} action={btnconfig} inputSubmit={this.handleOk} data={this.state.selines[0]} @@ -1698,14 +1696,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(PrintButton) \ No newline at end of file +export default PrintButton \ No newline at end of file diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 2c79490..1496a1f 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -31,7 +31,6 @@ class MainSearch extends Component { static propTpyes = { - menuType: PropTypes.object, // 鑿滃崟绫诲瀷锛屾槸鍚︿负HS action: PropTypes.object, // 鎸夐挳淇℃伅銆佽〃鍗曞垪琛� data: PropTypes.any, // 琛ㄦ牸鏁版嵁 BID: PropTypes.any, // 涓昏〃ID @@ -499,7 +498,7 @@ } if (deForms.length > 0) { - if (this.props.menuType !== 'HS' && options.sysType === 'local' && window.GLOB.systemType !== 'production') { + if (!window.GLOB.mkHS && options.sysType === 'local' && window.GLOB.systemType !== 'production') { this.improveSimpleActionForm(deForms) } else { this.improveActionForm(deForms) @@ -512,7 +511,7 @@ * @description 鑾峰彇涓嬫媺琛ㄥ崟閫夐」淇℃伅 */ improveActionForm = (deForms) => { - const { BID, menuType, action } = this.props + const { BID, action } = this.props let deffers = [] let mainItems = [] // 浜戠鎴栧崟鐐规暟鎹� @@ -527,7 +526,7 @@ } }) - if (menuType !== 'HS' && options.sysType !== 'local') { + if (!window.GLOB.mkHS && options.sysType !== 'local') { localItems = [...localItems, ...mainItems] mainItems = [] } @@ -547,7 +546,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - if (menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -582,7 +581,7 @@ mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) - if (menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) if (options.cloudServiceApi) { mainparam.rduri = options.cloudServiceApi diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx index 6b497bd..555c45c 100644 --- a/src/tabviews/zshare/normalTable/index.jsx +++ b/src/tabviews/zshare/normalTable/index.jsx @@ -1,7 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import md5 from 'md5' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { Table, Affix, Typography } from 'antd' @@ -61,7 +60,7 @@ } UNSAFE_componentWillMount () { - const { menuType, memberLevel, pageSize, setting } = this.props + const { pageSize, setting } = this.props let columns = fromJS(this.props.columns).toJS() let lineMarks = [] let _columns = [] @@ -105,12 +104,12 @@ _columns.push(cell) }) } else { - if (window.GLOB.dataFormat && menuType !== 'HS' && memberLevel) { + if (window.GLOB.dataFormat && !window.GLOB.mkHS) { _format = true - if (memberLevel >= 30) { + if (window.GLOB.memberLevel >= 30) { radio = 20 - } else if (memberLevel >= 20) { + } else if (window.GLOB.memberLevel >= 20) { radio = 10 } } @@ -1384,15 +1383,4 @@ } } -const mapStateToProps = (state) => { - return { - menuType: state.editLevel, - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(NormalTable) \ No newline at end of file +export default NormalTable \ No newline at end of file diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 43ad250..421f356 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -22,7 +22,6 @@ class MainSearch extends Component { static propTpyes = { BID: PropTypes.any, // 鐖剁骇Id锛岀敤浜庢煡璇笅鎷夐�夋嫨椤� - menuType: PropTypes.any, // 鑿滃崟鏉冮檺锛屾槸鍚︿负HS searchlist: PropTypes.array, // 鎼滅储鏉′欢鍒楄〃 config: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅(鑷畾涔夐〉闈�) setting: PropTypes.object, // 缁勪欢閰嶇疆淇℃伅(鑷畾涔夐〉闈�) @@ -40,7 +39,7 @@ record = {} UNSAFE_componentWillMount () { - const { config, menuType, searchlist, setting } = this.props + const { config, searchlist, setting } = this.props let _searchlist = [] let fieldMap = new Map() @@ -175,7 +174,7 @@ let _option = Utils.getSelectQueryOptions(item) // 娴嬭瘯绯荤粺鍗曚釜璇锋眰 - if (menuType !== 'HS' && options.sysType === 'local' && !window.GLOB.systemType) { + if (!window.GLOB.mkHS && options.sysType === 'local' && !window.GLOB.systemType) { deForms.push({ ...item, arr_field: _option.field, @@ -229,7 +228,7 @@ advanceValues, searchlist: _list }, () => { - if (menuType !== 'HS' && options.sysType === 'local' && !window.GLOB.systemType) { + if (!window.GLOB.mkHS && options.sysType === 'local' && !window.GLOB.systemType) { this.improveSimpleSearch(deForms) } else { this.improveSearch(mainItems, localItems) @@ -239,10 +238,10 @@ // 鏌ヨ涓嬫媺鑿滃崟 improveSearch = (mainItems, localItems) => { - const { menuType, BID } = this.props + const { BID } = this.props let deffers = [] - if (menuType !== 'HS' && window.GLOB.systemType !== 'production') { + if (!window.GLOB.mkHS && window.GLOB.systemType !== 'production') { localItems = [...localItems, ...mainItems] mainItems = [] } @@ -265,7 +264,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt(param.LText, param.timestamp) - if (menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -303,7 +302,7 @@ mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) - if (menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) if (options.cloudServiceApi) { mainparam.rduri = options.cloudServiceApi diff --git a/src/templates/calendarconfig/index.jsx b/src/templates/calendarconfig/index.jsx index 67fbf3a..616011b 100644 --- a/src/templates/calendarconfig/index.jsx +++ b/src/templates/calendarconfig/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' @@ -860,14 +859,4 @@ } } -const mapStateToProps = (state) => { - return { - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(SubTableConfig) +export default SubTableConfig diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index e0118e9..cfcc56e 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' @@ -1381,14 +1380,4 @@ } } -const mapStateToProps = (state) => { - return { - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(ComTableConfig) +export default ComTableConfig diff --git a/src/templates/menuconfig/menuform/index.scss b/src/templates/menuconfig/menuform/index.scss deleted file mode 100644 index 9914d8e..0000000 --- a/src/templates/menuconfig/menuform/index.scss +++ /dev/null @@ -1,17 +0,0 @@ -.ant-advanced-search-form.main-search { - padding: 0px 24px 20px; - border-bottom: 1px solid #d9d9d9; - .ant-form-item { - display: flex; - margin-bottom: 10px; - } - .ant-form-item-control-wrapper { - flex: 1; - } - .ant-form-item-label { - width: 100px; - } -} -.ant-advanced-search-form { - position: relative; -} diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx index 09744d9..4612793 100644 --- a/src/templates/subtableconfig/index.jsx +++ b/src/templates/subtableconfig/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' @@ -1214,14 +1213,4 @@ } } -const mapStateToProps = (state) => { - return { - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(SubTableConfig) +export default SubTableConfig diff --git a/src/templates/treepageconfig/index.jsx b/src/templates/treepageconfig/index.jsx index 4828bde..874a506 100644 --- a/src/templates/treepageconfig/index.jsx +++ b/src/templates/treepageconfig/index.jsx @@ -1,6 +1,5 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { connect } from 'react-redux' import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' @@ -829,14 +828,4 @@ } } -const mapStateToProps = (state) => { - return { - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default connect(mapStateToProps, mapDispatchToProps)(ComTableConfig) +export default ComTableConfig diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index 78e8435..a7411ae 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -13,16 +13,15 @@ * @param {Number} pageIndex 椤电爜 * @param {Number} pageSize 姣忛〉鏁伴噺 * @param {String} BID 涓婄骇ID - * @param {String} menuType 鑿滃崟绫诲瀷锛屾櫘閫氳彍鍗曚笌HS * @return {Object} param */ - static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, menuType, id) { + static getQueryDataParams (setting, arrFields, search = [], orderBy = '', pageIndex = 1, pageSize = 10, BID, id) { let param = null if (setting.interType === 'system' || (setting.interType === 'custom' && setting.requestMode === 'system')) { - param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id, BID) + param = this.getDefaultQueryParam(setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID) } else { - param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, menuType, id) + param = this.getCustomQueryParam(setting, search, orderBy, pageIndex, pageSize, id) } if (BID) { @@ -39,7 +38,7 @@ /** * @description 鑾峰彇鐢ㄦ埛鑷畾涔夊瓨鍌ㄨ繃绋嬩紶鍙� */ - static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, menuType, id) { + static getCustomQueryParam (setting, search, orderBy, pageIndex, pageSize, id) { let param = Utils.formatCustomMainSearch(search) if (orderBy) { @@ -56,7 +55,7 @@ if (setting.interType === 'inner' || (setting.interType === 'custom' && setting.requestMode === 'inner')) { param.func = setting.innerFunc } else { - if (menuType === 'HS') { + if (window.GLOB.mkHS) { if (setting.sysInterface === 'true' && options.cloudServiceApi) { param.rduri = options.cloudServiceApi } else if (setting.sysInterface !== 'true') { @@ -81,7 +80,7 @@ /** * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鐨勫弬鏁� */ - static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, menuType, id, BID) { + static getDefaultQueryParam (setting, arrFields, search, orderBy, pageIndex, pageSize, id, BID) { let param = { func: 'sPC_Get_TableData', obj_name: 'data', @@ -263,7 +262,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - if (menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -273,7 +272,7 @@ /** * @description 鑾峰彇绯荤粺瀛樺偍杩囩▼ sPC_Get_TableData 鍚堣鍊肩殑鍙傛暟 */ - static getStatQueryDataParams (setting, statFields, search, orderBy, BID, menuType) { + static getStatQueryDataParams (setting, statFields, search, orderBy, BID) { let param = { func: 'sPC_Get_TableData', obj_name: 'data', @@ -407,7 +406,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - if (menuType === 'HS') { // 浜戠鏁版嵁楠岃瘉 + if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } @@ -432,14 +431,13 @@ * @param {Number} pageIndex 椤电爜 * @param {Number} pageSize 姣忛〉鏁伴噺 * @param {String} BID 涓婄骇ID - * @param {String} menuType 鑿滃崟绫诲瀷锛屾櫘閫氳彍鍗曚笌HS * @return {Object} param */ - static getPrevQueryParams (setting, search = [], BID, menuType) { + static getPrevQueryParams (setting, search = [], BID) { let param = null if (setting.procMode !== 'inner') { - param = this.getDefaultPrevQueryParam(setting, search, menuType, BID) + param = this.getDefaultPrevQueryParam(setting, search, BID) } else { param = Utils.formatCustomMainSearch(search) param.func = setting.prevFunc || '' @@ -455,7 +453,7 @@ /** * @description 鑾峰彇绯荤粺鍓嶇疆鑴氭湰 */ - static getDefaultPrevQueryParam (setting, search, menuType, BID) { + static getDefaultPrevQueryParam (setting, search, BID) { let param = { func: 'sPC_TableData_InUpDe', exec_type: 'y', @@ -529,7 +527,7 @@ param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) - if (menuType === 'HS') { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 + if (window.GLOB.mkHS) { // 鍑芥暟 sPC_TableData_InUpDe 浜戠楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) } diff --git a/src/utils/utils.js b/src/utils/utils.js index b877d0d..a15f80a 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -39,6 +39,26 @@ export default class Utils { /** + * @description 鑾峰彇浼氬憳绛夌骇 + * @return {String} level + */ + static getMemberLevel () { + let _level = 10 + let _Mlevel = sessionStorage.getItem('Member_Level') + + if (_Mlevel) { + if (_Mlevel === md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 10)) { + _level = 10 + } else if (_Mlevel === md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 20)) { + _level = 20 + } else if (_Mlevel === md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + 30)) { + _level = 30 + } + } + return _level + } + + /** * @description 鏁版嵁婧愬悕绉帮紝鐢ㄤ簬缁熶竴鏌ヨ * @return {String} name */ diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index 3e83997..a571e21 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -332,7 +332,7 @@ _pars.push(param) } else { let arr_field = component.columns.map(col => col.field).join(',') - let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID, '') + let param = UtilsDM.getQueryDataParams(component.setting, arr_field, [], component.setting.order || '', 1, 1000, BID) param.componentId = component.uuid @@ -694,67 +694,67 @@ if (item.type === 'bar' || item.type === 'line') { return ( <Col span={item.width} key={item.uuid}> - <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <AntvBarAndLine config={item} initdata={item.data} mainSearch={[]} /> </Col> ) } else if (item.type === 'pie') { return ( <Col span={item.width} key={item.uuid}> - <AntvPie config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <AntvPie config={item} initdata={item.data} mainSearch={[]} /> </Col> ) } else if (item.type === 'scatter') { return ( <Col span={item.width} key={item.uuid}> - <AntvScatter config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <AntvScatter config={item} initdata={item.data} mainSearch={[]}/> </Col> ) } else if (item.type === 'dashboard') { return ( <Col span={item.width} key={item.uuid}> - <AntvDashboard config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <AntvDashboard config={item} initdata={item.data} mainSearch={[]}/> </Col> ) } else if (item.type === 'card' && item.subtype === 'datacard') { return ( <Col span={item.width} key={item.uuid}> - <DataCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <DataCard config={item} initdata={item.data} mainSearch={[]} /> </Col> ) } else if (item.type === 'card' && item.subtype === 'propcard') { return ( <Col span={item.width} key={item.uuid}> - <PropCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <PropCard config={item} initdata={item.data} mainSearch={[]} /> </Col> ) } else if (item.type === 'table' && item.subtype === 'tablecard') { return ( <Col span={item.width} key={item.uuid}> - <TableCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <TableCard config={item} initdata={item.data} mainSearch={[]}/> </Col> ) } else if (item.type === 'table' && item.subtype === 'normaltable') { return ( <Col span={item.width} key={item.uuid}> - <NormalTable config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <NormalTable config={item} initdata={item.data} mainSearch={[]}/> </Col> ) } else if (item.type === 'code') { return ( <Col span={item.width} key={item.uuid}> - <SandBox config={item} initdata={item.data} mainSearch={[]} menuType="" /> + <SandBox config={item} initdata={item.data} mainSearch={[]}/> </Col> ) } else if (item.type === 'balcony') { return ( <Col span={item.width} key={item.uuid}> - <Balcony config={item} initdata={item.data} menuType="" /> + <Balcony config={item} initdata={item.data}/> </Col> ) } else if (item.type === 'timeline') { return ( <Col span={item.width} key={item.uuid}> - <TimeLine config={item} initdata={item.data} menuType="" /> + <TimeLine config={item} initdata={item.data}/> </Col> ) } else { diff --git a/src/templates/menuconfig/editfirstmenu/dragelement/card.jsx b/src/views/design/header/editfirstmenu/dragelement/card.jsx similarity index 100% rename from src/templates/menuconfig/editfirstmenu/dragelement/card.jsx rename to src/views/design/header/editfirstmenu/dragelement/card.jsx diff --git a/src/templates/menuconfig/editfirstmenu/dragelement/index.jsx b/src/views/design/header/editfirstmenu/dragelement/index.jsx similarity index 100% rename from src/templates/menuconfig/editfirstmenu/dragelement/index.jsx rename to src/views/design/header/editfirstmenu/dragelement/index.jsx diff --git a/src/templates/menuconfig/editfirstmenu/dragelement/index.scss b/src/views/design/header/editfirstmenu/dragelement/index.scss similarity index 100% rename from src/templates/menuconfig/editfirstmenu/dragelement/index.scss rename to src/views/design/header/editfirstmenu/dragelement/index.scss diff --git a/src/templates/menuconfig/editfirstmenu/dragelement/itemtypes.js b/src/views/design/header/editfirstmenu/dragelement/itemtypes.js similarity index 100% rename from src/templates/menuconfig/editfirstmenu/dragelement/itemtypes.js rename to src/views/design/header/editfirstmenu/dragelement/itemtypes.js diff --git a/src/templates/menuconfig/editfirstmenu/index.jsx b/src/views/design/header/editfirstmenu/index.jsx similarity index 100% rename from src/templates/menuconfig/editfirstmenu/index.jsx rename to src/views/design/header/editfirstmenu/index.jsx diff --git a/src/templates/menuconfig/editfirstmenu/index.scss b/src/views/design/header/editfirstmenu/index.scss similarity index 100% rename from src/templates/menuconfig/editfirstmenu/index.scss rename to src/views/design/header/editfirstmenu/index.scss diff --git a/src/templates/menuconfig/editfirstmenu/menuform/index.jsx b/src/views/design/header/editfirstmenu/menuform/index.jsx similarity index 100% rename from src/templates/menuconfig/editfirstmenu/menuform/index.jsx rename to src/views/design/header/editfirstmenu/menuform/index.jsx diff --git a/src/templates/menuconfig/editfirstmenu/menuform/index.scss b/src/views/design/header/editfirstmenu/menuform/index.scss similarity index 100% rename from src/templates/menuconfig/editfirstmenu/menuform/index.scss rename to src/views/design/header/editfirstmenu/menuform/index.scss diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx index 7146bae..a34c34d 100644 --- a/src/views/design/header/index.jsx +++ b/src/views/design/header/index.jsx @@ -22,7 +22,7 @@ import MKEmitter from '@/utils/events.js' import './index.scss' -const EditMenu = asyncComponent(() => import('@/templates/menuconfig/editfirstmenu')) +const EditMenu = asyncComponent(() => import('./editfirstmenu')) const VersionsUp = asyncComponent(() => import('./versions')) const { confirm } = Modal @@ -32,6 +32,7 @@ dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, userName: sessionStorage.getItem('CloudUserName'), avatar: Utils.getrealurl(sessionStorage.getItem('CloudAvatar')), + memberLevel: Utils.getMemberLevel() } logout = () => { @@ -80,6 +81,12 @@ this.props.modifyMenuTree(menulist) if (window.GLOB.systemType !== 'production') { // 闈炴寮忕郴缁熼�夋嫨绗竴椤� this.props.modifyMainMenu(menulist[0] || null) + } else { + this.props.resetEditLevel('HS') + window.GLOB.mkHS = true + this.props.modifyMainMenu({ + MenuID: 'systemManageView' + }) } } else { notification.error({ @@ -154,7 +161,7 @@ trdItem.type = trdItem.PageParam.Template || trdItem.type trdItem.OpenType = trdItem.PageParam.OpenType || trdItem.OpenType - if (trdItem.type === 'CustomPage' && this.props.memberLevel < 20) { // 浼氬憳绛夌骇澶т簬绛変簬20鏃讹紝鏈夌紪杈戞潈闄� + if (trdItem.type === 'CustomPage' && this.state.memberLevel < 20) { // 浼氬憳绛夌骇澶т簬绛変簬20鏃讹紝鏈夌紪杈戞潈闄� trdItem.forbidden = true } } @@ -195,6 +202,7 @@ if (editLevel === 'HS') return + window.GLOB.mkHS = true this.props.resetEditLevel('HS') this.props.modifyMainMenu({ MenuID: 'systemManageView' @@ -215,6 +223,7 @@ this.props.modifyMainMenu(menulist[0] || null) this.props.resetEditLevel(false) + window.GLOB.mkHS = false MKEmitter.emit('modifyTabs', null, 'replace') } @@ -222,6 +231,7 @@ exitEdit = () => { // 閫�鍑虹紪杈戠姸鎬� this.props.resetEditLevel(false) + window.GLOB.mkHS = false } UNSAFE_componentWillMount () { @@ -272,12 +282,13 @@ } }) }, 50) - } else if (window.GLOB.systemType === 'production') { - this.props.resetEditLevel('HS') - this.props.modifyMainMenu({ - MenuID: 'systemManageView' - }) } + + window.addEventListener('storage', (e) => { + if (e.key !== 'menuUpdate') return + + this.reload() + }) } shouldComponentUpdate (nextProps, nextState) { @@ -305,7 +316,7 @@ render () { const { mainMenu, editLevel } = this.props - const { menulist } = this.state + const { menulist, memberLevel } = this.state return ( <header className={'sys-header-container ant-menu-dark ' + (['level2', 'level3', 'HS'].includes(editLevel) ? 'mask' : '')} id="main-header-container"> @@ -338,7 +349,7 @@ <div className="icon"><AppstoreOutlined /></div> <div className="title">搴旂敤绠$悊</div> <div className="detail">鍙垱寤哄強绠$悊PC銆乸ad鍙婄Щ鍔ㄧ绛変笉鍚岃澶囩殑搴旂敤锛屽疄鐜版槑绉戜簯APP銆佸井淇″叕浼楀彿銆佸皬绋嬪簭绛夊骞冲彴鐨勫簲鐢ㄥ叡浜��</div> - <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/appmanage')}}> + <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/appmanage')}}> 缂栬緫 </Button> </div> : null @@ -348,7 +359,7 @@ <div className="icon"><AppstoreOutlined /></div> <div className="title">搴旂敤绠$悊</div> <div className="detail">鍙垱寤哄強绠$悊PC銆乸ad鍙婄Щ鍔ㄧ绛変笉鍚岃澶囩殑搴旂敤锛屽疄鐜版槑绉戜簯APP銆佸井淇″叕浼楀彿銆佸皬绋嬪簭绛夊骞冲彴鐨勫簲鐢ㄥ叡浜��</div> - <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/appcheck')}}> + <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/appcheck')}}> 鏌ョ湅 </Button> </div> : null @@ -358,7 +369,7 @@ <div className="icon"><ApiOutlined /></div> <div className="title">鎺ュ彛璋冭瘯</div> <div className="detail">鍙嚜鍔ㄥ鐞嗙櫥褰曟帴鍙g殑鍙傛暟鍔犲瘑锛屼互鍙婁笟鍔℃帴鍙g殑绛惧悕璁$畻锛屾柟渚垮紑鍙戜汉鍛樼殑鎺ュ彛娴嬭瘯宸ヤ綔銆�</div> - <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/interface')}}> + <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/interface')}}> 缂栬緫 </Button> </div> : null @@ -369,7 +380,7 @@ <div className="icon"><HomeOutlined /></div> <div className="title">棣栭〉</div> <div className="detail">鍩轰簬鑷畾涔夐〉闈㈢殑棣栭〉璁捐锛屽彲瀹炵幇鐏垫椿鐨勫厓绱犻厤缃強鏍峰紡璋冩暣锛屽睍鐜板綋鍓嶇郴缁熺殑椋庢牸銆�</div> - <Button type="primary" disabled={!(this.props.memberLevel >= 20)} title={this.props.memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}> + <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '浼氬憳绛夌骇涓嶅锛屾棤寮�鍙戞潈闄愩��'} onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}> 缂栬緫 </Button> </div> : null @@ -407,8 +418,7 @@ menuTree: state.menuTree, mainMenu: state.mainMenu, editLevel: state.editLevel, - permAction: state.permAction, - memberLevel: state.memberLevel + permAction: state.permAction } } diff --git a/src/templates/menuconfig/editsecmenu/index.jsx b/src/views/design/sidemenu/editsecmenu/index.jsx similarity index 100% rename from src/templates/menuconfig/editsecmenu/index.jsx rename to src/views/design/sidemenu/editsecmenu/index.jsx diff --git a/src/templates/menuconfig/editsecmenu/index.scss b/src/views/design/sidemenu/editsecmenu/index.scss similarity index 100% rename from src/templates/menuconfig/editsecmenu/index.scss rename to src/views/design/sidemenu/editsecmenu/index.scss diff --git a/src/templates/menuconfig/editthdmenu/index.jsx b/src/views/design/sidemenu/editthdmenu/index.jsx similarity index 99% rename from src/templates/menuconfig/editthdmenu/index.jsx rename to src/views/design/sidemenu/editthdmenu/index.jsx index e66a6d3..fb2ebd3 100644 --- a/src/templates/menuconfig/editthdmenu/index.jsx +++ b/src/views/design/sidemenu/editthdmenu/index.jsx @@ -545,8 +545,8 @@ } getUsedTemplate = () => { - const { memberLevel } = this.props let { sysTemplates } = this.state + let memberLevel = Utils.getMemberLevel() const illust = { // 妯℃澘鍥剧墖锛岀敤浜庡凡浣跨敤妯℃澘 CommonTable: mainsubtable, TreePage: treepage, @@ -852,7 +852,7 @@ {this.state.usedTemplates && this.state.usedTemplates.map((template, index) => { if (template.title.toLowerCase().indexOf(this.state.tempSearchKey.toLowerCase()) >= 0) { return ( - <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={8}> + <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={6}> <Card title={template.title}> <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/> @@ -967,8 +967,7 @@ const mapStateToProps = (state) => { return { mainMenu: state.mainMenu, - menuTree: state.menuTree, - memberLevel: state.memberLevel + menuTree: state.menuTree } } diff --git a/src/templates/menuconfig/editthdmenu/index.scss b/src/views/design/sidemenu/editthdmenu/index.scss similarity index 100% rename from src/templates/menuconfig/editthdmenu/index.scss rename to src/views/design/sidemenu/editthdmenu/index.scss diff --git a/src/templates/menuconfig/editthdmenu/menuform/index.jsx b/src/views/design/sidemenu/editthdmenu/menuform/index.jsx similarity index 100% rename from src/templates/menuconfig/editthdmenu/menuform/index.jsx rename to src/views/design/sidemenu/editthdmenu/menuform/index.jsx diff --git a/src/templates/menuconfig/editthdmenu/menuform/index.scss b/src/views/design/sidemenu/editthdmenu/menuform/index.scss similarity index 100% rename from src/templates/menuconfig/editthdmenu/menuform/index.scss rename to src/views/design/sidemenu/editthdmenu/menuform/index.scss diff --git a/src/templates/menuconfig/editthdmenu/preview/index.jsx b/src/views/design/sidemenu/editthdmenu/preview/index.jsx similarity index 100% rename from src/templates/menuconfig/editthdmenu/preview/index.jsx rename to src/views/design/sidemenu/editthdmenu/preview/index.jsx diff --git a/src/templates/menuconfig/editthdmenu/preview/index.scss b/src/views/design/sidemenu/editthdmenu/preview/index.scss similarity index 100% rename from src/templates/menuconfig/editthdmenu/preview/index.scss rename to src/views/design/sidemenu/editthdmenu/preview/index.scss diff --git a/src/views/design/sidemenu/index.jsx b/src/views/design/sidemenu/index.jsx index db9232f..7dc2bfa 100644 --- a/src/views/design/sidemenu/index.jsx +++ b/src/views/design/sidemenu/index.jsx @@ -1,8 +1,8 @@ import React, {Component} from 'react' import { connect } from 'react-redux' import { is, fromJS } from 'immutable' -import { Menu, notification, Popover } from 'antd' -import { EditOutlined, CloseOutlined, SwapOutlined, PlusOutlined, UnlockOutlined, SettingOutlined } from '@ant-design/icons' +import { Menu, notification, Popover, Modal, Spin } from 'antd' +import { EditOutlined, SwapOutlined, PlusOutlined, UnlockOutlined, SettingOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' import { resetEditLevel, modifyMenuTree, modifyMainMenu } from '@/store/action' @@ -13,8 +13,9 @@ import MkIcon from '@/components/mk-icon' import './index.scss' -const EditSecMenu = asyncComponent(() => import('@/templates/menuconfig/editsecmenu')) -const EditThdMenu = asyncComponent(() => import('@/templates/menuconfig/editthdmenu')) +const EditSecMenu = asyncComponent(() => import('./editsecmenu')) +const EditThdMenu = asyncComponent(() => import('./editthdmenu')) +const TransferForm = asyncComponent(() => import('@/templates/zshare/basetransferform')) const { SubMenu } = Menu class Sidemenu extends Component { @@ -259,8 +260,9 @@ render () { const { mainMenu, editLevel } = this.props + const { visible } = this.state - let isnew = false + let isnew = true return ( <aside className="mk-sys-side-menu ant-menu-dark mk-edit"> @@ -293,15 +295,8 @@ {item.children.map(cell => { return ( <Menu.Item key={cell.MenuID}> - {editLevel !== 'HS' && isnew ? - <Popover overlayClassName="mk-popover-control-wrap mk-menu-control" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ - <div className="mk-popover-control"> - <EditOutlined className="edit" onClick={() => this.editmenu(cell)} /> - <CloseOutlined className="close" onClick={() => {}} /> - </div> - } trigger="hover" placement="top"> - <span className="editable-menu-item">{cell.MenuName}</span> - </Popover> : + {editLevel !== 'HS' ? + <span className="editable-menu-item" onDoubleClick={() => this.editmenu(cell)}>{cell.MenuName}</span> : <a href={cell.src} id={cell.MenuID} onClick={(e) => this.changemenu(e, cell)}>{cell.MenuName}</a> } </Menu.Item> @@ -329,6 +324,18 @@ exitEdit={this.exitEdit} /> : null } + <Modal + title="瑙e喕鑿滃崟" + width={600} + visible={visible} + onOk={this.thawMemuSubmit} + confirmLoading={this.state.confirmLoading} + onCancel={this.thawMemuCancel} + destroyOnClose + > + {!this.state.thawmenulist ? <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" /> : + <TransferForm onChange={(vals) => this.setState({targetKeys: vals})} menulist={this.state.thawmenulist}/>} + </Modal> </aside> ) } @@ -338,7 +345,6 @@ return { mainMenu: state.mainMenu, menuTree: state.menuTree, - memberLevel: state.memberLevel, editLevel: state.editLevel } } diff --git a/src/views/design/sidemenu/index.scss b/src/views/design/sidemenu/index.scss index b457b5f..2effdf3 100644 --- a/src/views/design/sidemenu/index.scss +++ b/src/views/design/sidemenu/index.scss @@ -14,6 +14,7 @@ .editable-menu-item { display: block; padding-left: 48px; + cursor: pointer; } } .ant-menu-sub.ant-menu-inline { diff --git a/src/templates/menuconfig/menuelement/card.jsx b/src/views/design/sidemenu/menuelement/card.jsx similarity index 100% rename from src/templates/menuconfig/menuelement/card.jsx rename to src/views/design/sidemenu/menuelement/card.jsx diff --git a/src/templates/menuconfig/menuelement/index.jsx b/src/views/design/sidemenu/menuelement/index.jsx similarity index 100% rename from src/templates/menuconfig/menuelement/index.jsx rename to src/views/design/sidemenu/menuelement/index.jsx diff --git a/src/templates/menuconfig/menuelement/index.scss b/src/views/design/sidemenu/menuelement/index.scss similarity index 100% rename from src/templates/menuconfig/menuelement/index.scss rename to src/views/design/sidemenu/menuelement/index.scss diff --git a/src/templates/menuconfig/menuelement/itemtypes.js b/src/views/design/sidemenu/menuelement/itemtypes.js similarity index 100% rename from src/templates/menuconfig/menuelement/itemtypes.js rename to src/views/design/sidemenu/menuelement/itemtypes.js diff --git a/src/templates/menuconfig/menuform/index.jsx b/src/views/design/sidemenu/menuform/index.jsx similarity index 100% rename from src/templates/menuconfig/menuform/index.jsx rename to src/views/design/sidemenu/menuform/index.jsx diff --git a/src/templates/menuconfig/editfirstmenu/menuform/index.scss b/src/views/design/sidemenu/menuform/index.scss similarity index 100% copy from src/templates/menuconfig/editfirstmenu/menuform/index.scss copy to src/views/design/sidemenu/menuform/index.scss diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index be43871..ef494ff 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -1,6 +1,5 @@ import React, { Component } from 'react' import { message, Modal, notification } from 'antd' -import { connect } from 'react-redux' import md5 from 'md5' import moment from 'moment' @@ -11,7 +10,6 @@ import enUS from '@/locales/en-US/login.js' import asyncComponent from '@/utils/asyncComponent' import asyncLoadComponent from '@/utils/asyncLoadComponent' -import { modifyMemberLevel } from '@/store/action' import './index.scss' const LoginForm = asyncLoadComponent(() => import('./loginform')) @@ -639,8 +637,8 @@ let memberLevel = res.member_level if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) { - sessionStorage.setItem('Member_Level', md5('mksoft' + moment().format('YYYYMM') + memberLevel)) - this.props.modifyMemberLevel(memberLevel) + sessionStorage.setItem('Member_Level', md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + memberLevel)) + window.GLOB.memberLevel = memberLevel } // positecgroup @@ -897,14 +895,4 @@ } } -const mapStateToProps = () => { - return {} -} - -const mapDispatchToProps = (dispatch) => { - return { - modifyMemberLevel: (memberLevel) => dispatch(modifyMemberLevel(memberLevel)) - } -} - -export default connect(mapStateToProps, mapDispatchToProps)(Login) \ No newline at end of file +export default Login \ No newline at end of file diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 0e2bb3a..f22b547 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -1,5 +1,4 @@ import React, { Component } from 'react' -import { connect } from 'react-redux' import { DndProvider } from 'react-dnd' import { withRouter } from 'react-router' import { is, fromJS } from 'immutable' @@ -56,6 +55,8 @@ window.GLOB.urlFields = [] // url鍙橀噺 window.GLOB.customMenu = null // 淇濆瓨鑿滃崟淇℃伅 +const memberLevel = Utils.getMemberLevel() + class MobDesign extends Component { state = { localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, @@ -80,7 +81,7 @@ } UNSAFE_componentWillMount() { - if (this.props.memberLevel < 30) return + if (memberLevel < 30) return try { let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) @@ -150,7 +151,7 @@ } componentDidMount () { - if (this.props.memberLevel < 30) { + if (memberLevel < 30) { document.getElementById('mk-mob-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">鏈簲鐢ㄦ病鏈塒C绔〉闈㈢殑缂栬緫鏉冮檺锛岃鑱旂郴绠$悊鍛橈紒</div>' return } @@ -1989,14 +1990,4 @@ } } -const mapStateToProps = (state) => { - return { - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MobDesign)) \ No newline at end of file +export default withRouter(MobDesign) \ No newline at end of file diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index 6de4ebc..b26500d 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -1,5 +1,4 @@ import React, { Component } from 'react' -import { connect } from 'react-redux' import { DndProvider } from 'react-dnd' import { withRouter } from 'react-router' import { is, fromJS } from 'immutable' @@ -56,6 +55,8 @@ window.GLOB.urlFields = [] // url鍙橀噺 window.GLOB.customMenu = null // 淇濆瓨鑿滃崟淇℃伅 +const memberLevel = Utils.getMemberLevel() + class MenuDesign extends Component { state = { localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, @@ -82,7 +83,7 @@ } UNSAFE_componentWillMount() { - if (this.props.memberLevel < 30) return + if (memberLevel < 30) return try { let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) @@ -126,7 +127,7 @@ } componentDidMount () { - if (this.props.memberLevel < 30) { + if (memberLevel < 30) { document.getElementById('mk-pc-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">鏈簲鐢ㄦ病鏈塒C绔〉闈㈢殑缂栬緫鏉冮檺锛岃鑱旂郴绠$悊鍛橈紒</div>' return } @@ -1963,14 +1964,4 @@ } } -const mapStateToProps = (state) => { - return { - memberLevel: state.memberLevel - } -} - -const mapDispatchToProps = () => { - return {} -} - -export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MenuDesign)) \ No newline at end of file +export default withRouter(MenuDesign) \ No newline at end of file diff --git a/src/views/sso/index.jsx b/src/views/sso/index.jsx index 164d7c4..05b6b59 100644 --- a/src/views/sso/index.jsx +++ b/src/views/sso/index.jsx @@ -1,13 +1,11 @@ import React, {Component} from 'react' import { Spin, notification } from 'antd' -import { connect } from 'react-redux' import md5 from 'md5' import moment from 'moment' import Api from '@/api' import Utils from '@/utils/utils.js' import { styles } from '@/store/options.js' -import { modifyMemberLevel } from '@/store/action' import './index.scss' class SSOLogin extends Component { @@ -140,8 +138,8 @@ let memberLevel = res.member_level if (typeof(memberLevel) === 'number' && memberLevel > 10 && parseInt(memberLevel / 10) * 10 === memberLevel) { - sessionStorage.setItem('Member_Level', md5('mksoft' + moment().format('YYYYMM') + memberLevel)) - this.props.modifyMemberLevel(memberLevel) + sessionStorage.setItem('Member_Level', md5('mksoft' + window.GLOB.appkey + new Date().getFullYear() + new Date().getMonth() + memberLevel)) + window.GLOB.memberLevel = memberLevel } this.props.history.replace('/main') } else { @@ -166,14 +164,4 @@ } } -const mapStateToProps = () => { - return {} -} - -const mapDispatchToProps = (dispatch) => { - return { - modifyMemberLevel: (memberLevel) => dispatch(modifyMemberLevel(memberLevel)) - } -} - -export default connect(mapStateToProps, mapDispatchToProps)(SSOLogin) \ No newline at end of file +export default SSOLogin \ No newline at end of file -- Gitblit v1.8.0