From 4adb8b8868aeed1f5f3b89ae269a7724c6b451ad Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 11 八月 2023 16:58:31 +0800 Subject: [PATCH] 2023-08-11 --- src/components/tabview/index.jsx | 3 src/utils/utils-datamanage.js | 15 +- src/views/design/header/index.jsx | 9 src/views/login/loginform.jsx | 13 + src/views/printTemplate/index.jsx | 5 src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx | 12 src/components/header/index.jsx | 11 src/tabviews/zshare/topSearch/index.jsx | 11 src/tabviews/zshare/settingcomponent/index.jsx | 3 src/views/menudesign/homeform/index.jsx | 3 src/tabviews/zshare/actionList/excelInbutton/index.jsx | 5 src/views/menudesign/menuform/index.jsx | 3 public/options.json | 14 +- src/tabviews/zshare/actionList/exceloutbutton/index.jsx | 19 +- src/views/tabledesign/menuform/index.jsx | 3 src/templates/sharecomponent/tablecomponent/index.jsx | 9 src/api/index.js | 50 +++--- src/views/billprint/index.jsx | 4 src/tabviews/zshare/actionList/normalbutton/index.jsx | 11 src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx | 2 src/views/menudesign/index.jsx | 5 src/utils/utils.js | 11 src/index.js | 35 +++- src/menu/components/share/usercomponent/index.jsx | 5 src/tabviews/zshare/tablenodes/index.jsx | 5 src/tabviews/rolemanage/index.jsx | 5 src/menu/modalconfig/tablecomponent/index.jsx | 5 src/templates/zshare/verifycard/index.jsx | 5 src/menu/replaceField/index.jsx | 9 src/views/systemfunc/sidemenu/index.jsx | 3 src/tabviews/zshare/actionList/printbutton/index.jsx | 7 src/components/breadview/index.jsx | 3 src/tabviews/custom/components/chart/antv-X6/index.scss | 9 + src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss | 16 ++ src/tabviews/zshare/mutilform/index.jsx | 11 src/tabviews/custom/components/chart/antv-X6/index.jsx | 9 src/tabviews/zshare/pageMessage/index.jsx | 5 src/templates/zshare/createinterface/index.jsx | 3 src/views/design/header/versions/index.jsx | 7 src/views/login/index.jsx | 26 +-- 40 files changed, 196 insertions(+), 193 deletions(-) diff --git a/public/options.json b/public/options.json index 858e91f..f031142 100644 --- a/public/options.json +++ b/public/options.json @@ -1,16 +1,16 @@ { - "appId": "201912040924165801464FF1788654BC5AC73", - "appkey": "20191106103859640976D6E924E464D029CF0", + "appId": "202108312122504607B107A83F55B40C98CCF", + "appkey": "20210831212235413F287EC3BF489424496C8", "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", "systemType": "", "externalDatabase": "", "lineColor": "", "filter": "false", - "defaultApp": "mk", + "defaultApp": "mkindustry", "defaultLang": "zh-CN", - "WXAppID": "wx4d8a34c8d4494872", + "WXAppID": "", "WXminiAppID": "", - "WXNotice": "true", + "WXNotice": "false", "nginx": "true", "debugger": false, "licenseKey": "", @@ -18,6 +18,6 @@ "transfer": "false", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "http://qingqiumarket.cn", - "service": "MKWMS/" + "host": "http://demo.mk9h.cn", + "service": "erp_new/" } \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index 23a9315..eb138b3 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -5,9 +5,9 @@ import CryptoJS from 'crypto-js' import jsSHA from 'jssha' import moment from 'moment' + import Utils from '@/utils/utils.js' import CacheUtils from './cacheutils' -import options from '@/store/options.js' window.GLOB.IndexDB = null window.GLOB.OuterToken = {} @@ -241,7 +241,7 @@ Password: '', check_code: checkcode, way_no: 'sms_vcode', - systemType: options.sysType, + systemType: window.GLOB.sysType, login_city: sessionStorage.getItem('city') || '', login_id_address: sessionStorage.getItem('ipAddress') || '', kei_id: window.btoa(window.encodeURIComponent(window.GLOB.host)), @@ -252,11 +252,11 @@ let url = '/webapi/dologon' if (isCloud) { param.debug = 'Y' - if (options.cloudServiceApi) { - param.rduri = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') + if (window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') } } else if (window.GLOB.mainSystemApi) { - if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { + if (window.GLOB.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { param.linkurl = window.GLOB.linkurl } param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') @@ -277,7 +277,7 @@ let param = { // func: 'webapi_login', UserName: username, - systemType: options.sysType, + systemType: window.GLOB.sysType, Type: 'S', login_city: sessionStorage.getItem('city') || '', login_id_address: sessionStorage.getItem('ipAddress') || '', @@ -307,11 +307,11 @@ if (isCloud) { param.debug = 'Y' - if (options.cloudServiceApi) { - param.rduri = options.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') + if (window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi.replace(/\/webapi(.*)/, '/webapi/dologon') } } else if (window.GLOB.mainSystemApi) { - if (options.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { + if (window.GLOB.sysType !== 'cloud' && window.GLOB.systemType !== 'production') { param.linkurl = window.GLOB.linkurl } param.rduri = window.GLOB.mainSystemApi.replace(/\/webapi(.*)/, '/webapi/dologon') @@ -461,7 +461,7 @@ param = this.encryptParam(param) - let url = options.cloudServiceApi ? options.cloudServiceApi : '/webapi/dostars' + let url = window.GLOB.cloudServiceApi ? window.GLOB.cloudServiceApi : '/webapi/dostars' if (param.func) { url = url + '/' + param.func } @@ -507,18 +507,18 @@ param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' param.appkey = param.appkey || window.GLOB.appkey - let url = '/webapi/dostarst' - // if (window.GLOB.mkHS && options.cloudServiceApi) { // HS涓嬶紝涓斿瓨鍦ㄤ簯绔湴鍧� - // url = options.cloudServiceApi - // param.userid = sessionStorage.getItem('CloudUserID') || '' - // param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' - // } else if (window.GLOB.mainSystemApi) { - // if (!window.GLOB.transfer) { - // url = window.GLOB.mainSystemApi - // } else { - // param.rduri = window.GLOB.mainSystemApi - // } - // } + let url = '/webapi/dostars' + if (window.GLOB.mkHS && window.GLOB.cloudServiceApi) { // HS涓嬶紝涓斿瓨鍦ㄤ簯绔湴鍧� + url = window.GLOB.cloudServiceApi + param.userid = sessionStorage.getItem('CloudUserID') || '' + param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' + } else if (window.GLOB.mainSystemApi) { + if (!window.GLOB.transfer) { + url = window.GLOB.mainSystemApi + } else { + param.rduri = window.GLOB.mainSystemApi + } + } param = this.encryptParam(param) @@ -541,8 +541,8 @@ let url = '/webapi/dostars' if (window.GLOB.mkHS) { // HS涓嬶紝鍗曠偣鐧诲綍鏈嶅姟鍣ㄤ负浜戠 - if (options.cloudServiceApi) { // 瀛樺湪浜戠鍦板潃鏃讹紝浣跨敤浜戠绯荤粺鍙傛暟 - url = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { // 瀛樺湪浜戠鍦板潃鏃讹紝浣跨敤浜戠绯荤粺鍙傛暟 + url = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } @@ -761,7 +761,7 @@ } else { let _param = { UserName: token.username, - systemType: options.sysType, + systemType: window.GLOB.sysType, login_city: sessionStorage.getItem('city') || '', device_id: token.appkey || '', timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), diff --git a/src/components/breadview/index.jsx b/src/components/breadview/index.jsx index 4773add..3a44900 100644 --- a/src/components/breadview/index.jsx +++ b/src/components/breadview/index.jsx @@ -6,7 +6,6 @@ import asyncComponent from '@/utils/asyncLoadComponent' import NotFount from '@/components/404' -import options from '@/store/options.js' import MKEmitter from '@/utils/events.js' import Api from '@/api' import './index.scss' @@ -31,7 +30,7 @@ const { tabview } = this.state window.GLOB.CacheMap = new Map() - if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { + if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { let roledefer = new Promise(resolve => { Api.getSystemConfig({ func: 's_Get_TrdMenu_Role', diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 5fac2c3..7885a02 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -15,7 +15,6 @@ import asyncComponent from '@/utils/asyncComponent' import Api from '@/api' import MKEmitter from '@/utils/events.js' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import avatar from '@/assets/img/avatar.jpg' import './index.scss' @@ -91,7 +90,7 @@ getRolesMenu () { // 鑾峰彇涓昏彍鍗曞弬鏁� - let _param = {func: 's_get_pc_menus', systemType: options.sysType} + let _param = {func: 's_get_pc_menus', systemType: window.GLOB.sysType} _param.pro_sys = window.GLOB.systemType === 'production' ? 'Y' : '' Api.getSystemConfig(_param).then(result => { @@ -107,10 +106,10 @@ const { menulist, thdMenuList } = this.getMenulist(result) let systems = [] - if ((options.sysType === 'local' || options.sysType === 'SSO') && result.sys_list) { + if ((window.GLOB.sysType === 'local' || window.GLOB.sysType === 'SSO') && result.sys_list) { systems = result.sys_list - if (options.sysType === 'local' && window.GLOB.systemType !== 'production' && systems.length > 10) { + if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production' && systems.length > 10) { systems.length = 10 } } @@ -495,11 +494,11 @@ } gotoDoc = () => { - if (options.sysType === 'local' && window.GLOB.mainSystemApi) { + if (window.GLOB.sysType === 'local' && window.GLOB.mainSystemApi) { let ssodomain = window.GLOB.mainSystemApi.replace('/webapi/dostars', '') let url = `${ssodomain}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}` window.open(url) - } else if (options.sysType === 'SSO' || options.sysType === 'cloud') { + } else if (window.GLOB.sysType === 'SSO' || window.GLOB.sysType === 'cloud') { window.open(`${window.location.href.replace(/\/admin(.*)|\/index.html(.*)|\/#(.*)/ig, '')}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`) } } diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx index 1d2e3da..f34c03f 100644 --- a/src/components/tabview/index.jsx +++ b/src/components/tabview/index.jsx @@ -9,7 +9,6 @@ import asyncComponent from '@/utils/asyncLoadComponent' import NotFount from '@/components/404' -import options from '@/store/options.js' import MKEmitter from '@/utils/events.js' import Api from '@/api' import './index.scss' @@ -104,7 +103,7 @@ e.stopPropagation() window.GLOB.CacheMap = new Map() - if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { + if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { let roledefer = new Promise(resolve => { Api.getSystemConfig({ func: 's_Get_TrdMenu_Role', diff --git a/src/index.js b/src/index.js index af0d183..b798947 100644 --- a/src/index.js +++ b/src/index.js @@ -45,10 +45,6 @@ } } - if (options.cdomain && options.sysType !== 'cloud') { - options.cloudServiceApi = options.cdomain + '/webapi/dostars' - } - let GLOB = {} GLOB.appId = config.appId || '' GLOB.lineColor = config.lineColor || '' @@ -63,6 +59,12 @@ GLOB.WXNotice = config.WXNotice + '' === 'true' GLOB.accessToken = {} GLOB.mkHS = false + GLOB.navBar = 'shutter' // 榛樿涓虹櫨鍙剁獥 + + GLOB.sysType = options.sysType + if (GLOB.sysType !== 'cloud') { + GLOB.cloudServiceApi = options.cdomain + '/webapi/dostars' + } if (sessionStorage.getItem('externalDatabase')) { GLOB.externalDatabase = `[${sessionStorage.getItem('externalDatabase')}]..` @@ -73,7 +75,7 @@ } // 鍙湁涓氬姟绯荤粺鎵嶅彲浠ヨ缃负姝e紡绯荤粺 - if (options.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) { + if (GLOB.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) { GLOB.systemType = 'production' if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) { GLOB.probation = true @@ -89,7 +91,7 @@ document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">姝e紡绯荤粺涓嶅彲浣跨敤 http://cloud.mk9h.cn 鍋氫负鍗曠偣鍦板潃锛岃鑱旂郴绠$悊鍛橈紒</div>' return } - } else if (options.sysType === 'local') { + } else if (GLOB.sysType === 'local') { GLOB.probation = true GLOB.systemType = '' @@ -108,25 +110,26 @@ GLOB.mainSystemApi = '' } - GLOB.debugger = options.sysType === 'local' && GLOB.systemType !== 'production' + GLOB.debugger = GLOB.sysType === 'local' && GLOB.systemType !== 'production' if (/#\/hs$/.test(window.location.href)) { // hs涓嬩笉鎵撳嵃鑴氭湰 GLOB.debugger = false } - if (options.sysType !== 'cloud') { + if (GLOB.sysType !== 'cloud') { if (config.appkey === options.cakey) { document.getElementById('root').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh;">涓嶅彲浣跨敤浜戠appkey锛岃鑱旂郴绠$悊鍛橈紒</div>' return } } - if (options.sysType === 'cloud') { // cloud涓嶅彲璁剧疆鍗曠偣鏈嶅姟鍣ㄥ湴鍧�,浜戠appkey涓虹郴缁熻缃� + if (GLOB.sysType === 'cloud') { // cloud涓嶅彲璁剧疆鍗曠偣鏈嶅姟鍣ㄥ湴鍧�,浜戠appkey涓虹郴缁熻缃� GLOB.appkey = options.cakey + GLOB.appId = options.caId GLOB.WXNotice = false - } else if (options.sysType === 'SSO') { // sso涓嶅彲璁剧疆鍗曠偣鏈嶅姟鍣ㄥ湴鍧� + } else if (GLOB.sysType === 'SSO') { // sso涓嶅彲璁剧疆鍗曠偣鏈嶅姟鍣ㄥ湴鍧� GLOB.appkey = config.appkey - } else if (options.sysType === 'local') { // 涓氬姟绯荤粺 + } else if (GLOB.sysType === 'local') { // 涓氬姟绯荤粺 GLOB.appkey = config.appkey if (GLOB.systemType === 'production') { let systemApi = config.mainSystemApi @@ -146,8 +149,6 @@ let _href = window.location.href.split('#')[0] let _systemMsg = localStorage.getItem(_href + 'system') - - GLOB.navBar = 'shutter' // 榛樿涓虹櫨鍙剁獥 let className = 'mk-blue-black' if (_systemMsg) { @@ -278,6 +279,14 @@ writable: false, value: GLOB.linkurl }) + Object.defineProperty(GLOB, 'sysType', { + writable: false, + value: GLOB.sysType + }) + Object.defineProperty(GLOB, 'cloudServiceApi', { + writable: false, + value: GLOB.cloudServiceApi || '' + }) Object.defineProperty(window, 'GLOB', { writable: false, value: GLOB diff --git a/src/menu/components/share/usercomponent/index.jsx b/src/menu/components/share/usercomponent/index.jsx index d3cec9a..4f72b16 100644 --- a/src/menu/components/share/usercomponent/index.jsx +++ b/src/menu/components/share/usercomponent/index.jsx @@ -7,7 +7,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import options from '@/store/options.js' import UserForm from './settingform' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -144,8 +143,8 @@ Base64Img: canvas.toDataURL('image/png') // 鑾峰彇鐢熸垚鐨勫浘鐗� } - if (options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/menu/modalconfig/tablecomponent/index.jsx b/src/menu/modalconfig/tablecomponent/index.jsx index 01fd0f2..37e9cba 100644 --- a/src/menu/modalconfig/tablecomponent/index.jsx +++ b/src/menu/modalconfig/tablecomponent/index.jsx @@ -5,7 +5,6 @@ import moment from 'moment' import Api from '@/api' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import { queryTableSql } from '@/utils/option.js' @@ -49,8 +48,8 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - if (options.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/menu/replaceField/index.jsx b/src/menu/replaceField/index.jsx index df1506a..11289e7 100644 --- a/src/menu/replaceField/index.jsx +++ b/src/menu/replaceField/index.jsx @@ -5,7 +5,6 @@ import moment from 'moment' import Api from '@/api' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import SettingForm from './settingform' import { queryTableSql } from '@/utils/option.js' @@ -45,8 +44,8 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - if (options.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } @@ -107,8 +106,8 @@ } } else { let param = {func: 'sPC_Get_FieldName', TBName: res.table} - if (options.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx index f27ca16..bfed13f 100644 --- a/src/tabviews/custom/components/chart/antv-X6/index.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/index.jsx @@ -386,6 +386,7 @@ node: null, loading: false, status: 0, + flowname: '', orgs: [] } @@ -620,6 +621,7 @@ this.setState({ status: item.status || 0, + flowname: item.works_flow_name, loading: false }) @@ -999,7 +1001,7 @@ const r1 = graph.createNode({ shape: 'mk-rect', mknode: 'start', - mkdata: {status: 0, statusName: '寮�濮�'}, + mkdata: {status: 0, statusName: '鏈彁浜�'}, attrs: { body: { rx: 20, @@ -1097,7 +1099,7 @@ const r8 = graph.createNode({ shape: 'mk-rect', mknode: 'end', - mkdata: {status: '', statusName: '缁撴潫'}, + mkdata: {status: 888, statusName: '宸插畬鎴�'}, attrs: { body: { rx: 20, @@ -1967,7 +1969,7 @@ } render() { - const { loading, config, node, orgs, status } = this.state + const { loading, config, node, orgs, status, flowname } = this.state let style = {...config.style} @@ -2033,6 +2035,7 @@ <QuestionCircleOutlined /> </Tooltip> </div> + <div className="flow-name">{flowname}</div> <div className="right-tool"> <Tooltip title="鍚敤/鍋滅敤"> <Switch size="small" style={{marginRight: '10px'}} checked={status === 10} onChange={this.changeStatus} /> diff --git a/src/tabviews/custom/components/chart/antv-X6/index.scss b/src/tabviews/custom/components/chart/antv-X6/index.scss index 58cd11f..ccaccfb 100644 --- a/src/tabviews/custom/components/chart/antv-X6/index.scss +++ b/src/tabviews/custom/components/chart/antv-X6/index.scss @@ -7,6 +7,7 @@ background-size: cover; .mk-toolbar { + position: relative; width: 100%; height: 40px; border-bottom: 1px solid #dfe3e8; @@ -20,6 +21,14 @@ cursor: pointer; } } + .flow-name { + position: absolute; + left: 50%; + top: 6px; + font-size: 16px; + color: rgba(0, 0, 0, 0.85); + transform: translateX(-50%); + } .right-tool { float: right; line-height: 40px; diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss index 53361ec..893aaf2 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.scss @@ -138,6 +138,22 @@ } } .member-transfer { + .mk-tree { + display: inline-block!important; + .circle { + position: relative; + top: 1px; + right: 4px; + display: inline-block!important; + width: 12px; + height: 12px; + background: #1890ff; + border-radius: 50%; + } + .green.circle { + background: #52c41a; + } + } .ant-transfer-list:first-child { width: 60%; } diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx index 37827b0..2a54a7d 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/memberform.jsx @@ -35,7 +35,7 @@ targetKeys={targetKeys} dataSource={transferDataSource} className="member-transfer" - titles={['鍏ㄩ儴浜哄憳', '宸查��']} + titles={[<span className="mk-tree"><span className="circle"></span>缁勭粐鏈烘瀯</span>, <span className="mk-tree"><span className="circle green"></span>宸查��</span>]} render={item => item.title} showSelectAll={false} > diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx index de23978..67dcce9 100644 --- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx +++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/nodeform.jsx @@ -89,7 +89,7 @@ )} </Form.Item> </Col> : null} - {nodetype === 'node' ? <Col span={12}> + {nodetype === 'edge' ? <Col span={12}> <Form.Item label="璁剧疆瀹℃壒浜�"> {getFieldDecorator('approver', { initialValue: data.approver || 'member' @@ -102,7 +102,7 @@ )} </Form.Item> </Col> : null} - {nodetype === 'node' ? <Col span={12}> + {nodetype === 'edge' ? <Col span={12}> <Form.Item label="瀹℃壒鏂瑰紡"> {getFieldDecorator('approvalMethod', { initialValue: data.approvalMethod || 'countersign' @@ -114,7 +114,7 @@ )} </Form.Item> </Col> : null} - <Col span={12}> + {nodetype === 'edge' || nodetype === 'node' ? <Col span={12}> <Form.Item label="瀹℃壒浜�"> {getFieldDecorator('members', { initialValue: data.members || [], @@ -126,8 +126,8 @@ <MemberForm orgs={orgs} title="瀹℃壒浜�"/> )} </Form.Item> - </Col> - <Col span={12}> + </Col> : null} + {nodetype === 'edge' || nodetype === 'node' ? <Col span={12}> <Form.Item label="鎶勯�佷汉"> {getFieldDecorator('copys', { initialValue: data.copys || [] @@ -135,7 +135,7 @@ <MemberForm orgs={orgs} title="鎶勯�佷汉"/> )} </Form.Item> - </Col> + </Col> : null} <Col span={24}> <Form.Item label="澶囨敞"> {getFieldDecorator('remark', { diff --git a/src/tabviews/rolemanage/index.jsx b/src/tabviews/rolemanage/index.jsx index d90d131..d6ea60a 100644 --- a/src/tabviews/rolemanage/index.jsx +++ b/src/tabviews/rolemanage/index.jsx @@ -6,7 +6,6 @@ import md5 from 'md5' import Api from '@/api' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -74,7 +73,7 @@ } getAppList = () => { - if (options.sysType !== 'local') return + if (window.GLOB.sysType !== 'local') return let param = { func: 's_get_kei' @@ -843,7 +842,7 @@ render() { const { activeKey, filterRoleList, applist, selectApp, selectSubApp, loading, loadingTree, loadingAppTree, primarykey, menuTrees, appTrees, checkedKeys, appCheckedKeys, menuOpenKeys, selectMenuTrees, selectAppTrees, selectRoleId, selectMenuOpenKeys, selectAppOpenKeys, submitloading, appOpenKeys } = this.state - let ismanage = options.sysType !== 'local' + let ismanage = window.GLOB.sysType !== 'local' return ( <div className={'rolemanage' + (ismanage ? ' manager' : '')}> diff --git a/src/tabviews/zshare/actionList/excelInbutton/index.jsx b/src/tabviews/zshare/actionList/excelInbutton/index.jsx index 148e4bb..0104e10 100644 --- a/src/tabviews/zshare/actionList/excelInbutton/index.jsx +++ b/src/tabviews/zshare/actionList/excelInbutton/index.jsx @@ -6,7 +6,6 @@ import ExcelIn from './excelin' import Utils, { getExcelInSql } from '@/utils/utils.js' -import options from '@/store/options.js' import Api from '@/api' import MKEmitter from '@/utils/events.js' import MkIcon from '@/components/mk-icon' @@ -475,8 +474,8 @@ _outParam = fromJS(res).toJS() if (window.GLOB.mkHS) { - if (btn.sysInterface === 'true' && options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (btn.sysInterface !== 'true') { diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx index e18f480..a0b84fa 100644 --- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx +++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx @@ -6,7 +6,6 @@ import * as XLSX from 'sheetjs-style' import Utils from '@/utils/utils.js' -import options from '@/store/options.js' import Api from '@/api' import MKEmitter from '@/utils/events.js' import MkIcon from '@/components/mk-icon' @@ -239,8 +238,8 @@ let param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search) if (window.GLOB.mkHS) { - if (btn.sysInterface === 'true' && options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (btn.sysInterface !== 'true') { @@ -300,8 +299,8 @@ delete res.status if (window.GLOB.mkHS) { - if (btn.sysInterface === 'true' && options.cloudServiceApi) { - res.rduri = options.cloudServiceApi + if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + res.rduri = window.GLOB.cloudServiceApi res.userid = sessionStorage.getItem('CloudUserID') || '' res.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (btn.sysInterface !== 'true') { @@ -384,8 +383,8 @@ delete res.status if (window.GLOB.mkHS) { - if (btn.sysInterface === 'true' && options.cloudServiceApi) { - res.rduri = options.cloudServiceApi + if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + res.rduri = window.GLOB.cloudServiceApi res.userid = sessionStorage.getItem('CloudUserID') || '' res.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (btn.sysInterface !== 'true') { @@ -472,8 +471,8 @@ param = this.getExcelCustomParam(viewParam.orderBy, viewParam.search, true, pageIndex, pageSize) if (window.GLOB.mkHS) { - if (btn.sysInterface === 'true' && options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (btn.sysInterface !== 'true') { @@ -1082,7 +1081,7 @@ param.custom_script = param.custom_script.replace(/@typename@/ig, `'admin'`) // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { param.custom_script && console.info(`${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${param.custom_script}`) LText && console.info(LText) } diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx index 0d0807c..a871951 100644 --- a/src/tabviews/zshare/actionList/normalbutton/index.jsx +++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx @@ -8,7 +8,6 @@ import Api from '@/api' import Utils, { getSysDefaultSql } from '@/utils/utils.js' -import options from '@/store/options.js' import asyncSpinComponent from '@/utils/asyncSpinComponent' import { updateForm } from '@/utils/utils-update.js' import MKEmitter from '@/utils/events.js' @@ -1601,7 +1600,7 @@ sql = sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) sql = sql.replace(/@typename@/ig, `'admin'`) - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { console.info(sql.replace(/\n\s{8}/ig, '\n')) } @@ -1637,7 +1636,7 @@ Sort: index + 1 })) - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { let sql = [...lineMap.values()].map(item => (` ${item.insert} ${item.selects.join(` union all @@ -1827,8 +1826,8 @@ if (window.GLOB.mainSystemApi) { result.rduri = window.GLOB.mainSystemApi } - } else if (btn.sysInterface === 'true' && options.cloudServiceApi) { - result.rduri = options.cloudServiceApi + } else if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + result.rduri = window.GLOB.cloudServiceApi result.userid = sessionStorage.getItem('CloudUserID') || '' result.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (btn.sysInterface !== 'true') { @@ -2264,7 +2263,7 @@ let domain1 = '' let domain2 = '' - if (['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'].includes(verify.wxTemplateId) && options.sysType !== 'cloud') { + if (['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok'].includes(verify.wxTemplateId) && window.GLOB.sysType !== 'cloud') { domain1 = 'https://cloud.mk9h.cn/' domain2 = 'https://cloud.mk9h.cn:8443/' } diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx index ed5002f..2e24601 100644 --- a/src/tabviews/zshare/actionList/printbutton/index.jsx +++ b/src/tabviews/zshare/actionList/printbutton/index.jsx @@ -6,7 +6,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import options from '@/store/options.js' import asyncSpinComponent from '@/utils/asyncSpinComponent' import { updateForm } from '@/utils/utils-update.js' import MKEmitter from '@/utils/events.js' @@ -1145,7 +1144,7 @@ } // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { _customScript && console.info(`${btn.logLabel ? `/*${btn.logLabel} 鑷畾涔夎剼鏈�*/\n` : ''}${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`) LText && console.info(`${btn.logLabel ? `/*${btn.logLabel} 鏁版嵁婧�*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) } @@ -1212,8 +1211,8 @@ _outParam = JSON.parse(JSON.stringify(res)) if (window.GLOB.mkHS) { - if (btn.sysInterface === 'true' && options.cloudServiceApi) { - res.rduri = options.cloudServiceApi + if (btn.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + res.rduri = window.GLOB.cloudServiceApi res.userid = sessionStorage.getItem('CloudUserID') || '' res.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (btn.sysInterface !== 'true') { diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 0cc3dbd..50058a4 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -6,7 +6,6 @@ import moment from 'moment' import Api from '@/api' -import options from '@/store/options.js' import { formRule } from '@/utils/option.js' import Utils from '@/utils/utils.js' import asyncComponent from '@/utils/asyncComponent' @@ -601,7 +600,7 @@ } if (deForms.length > 0) { - if (!window.GLOB.mkHS && options.sysType === 'local' && window.GLOB.systemType !== 'production') { + if (!window.GLOB.mkHS && window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { this.improveSimpleActionForm(deForms) } else { this.improveActionForm(deForms) @@ -620,7 +619,7 @@ let mainItems = [] // 浜戠鎴栧崟鐐规暟鎹� let localItems = [] // 鏈湴鏁版嵁 let cache = action.setting.cache !== 'false' - let debug = window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud') + let debug = window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud') let _sql = `Declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) select @mk_departmentcode='${sessionStorage.getItem('departmentcode') || ''}',@mk_organization='${sessionStorage.getItem('organization') || ''}',@mk_user_type='${sessionStorage.getItem('mk_user_type') || ''}'\n` let _sso = _sql @@ -707,8 +706,8 @@ if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) - if (options.cloudServiceApi) { - mainparam.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { + mainparam.rduri = window.GLOB.cloudServiceApi mainparam.userid = sessionStorage.getItem('CloudUserID') || '' mainparam.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } @@ -749,7 +748,7 @@ */ improveSimpleActionForm = (deForms) => { let cache = this.props.action.setting.cache !== 'false' - let debug = window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud') + let debug = window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud') let _sql = `Declare @mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20) select @mk_departmentcode='${sessionStorage.getItem('departmentcode') || ''}',@mk_organization='${sessionStorage.getItem('organization') || ''}',@mk_user_type='${sessionStorage.getItem('mk_user_type') || ''}'\n` let deffers = deForms.map((form, index) => { diff --git a/src/tabviews/zshare/pageMessage/index.jsx b/src/tabviews/zshare/pageMessage/index.jsx index 4ca2a3b..0d283a3 100644 --- a/src/tabviews/zshare/pageMessage/index.jsx +++ b/src/tabviews/zshare/pageMessage/index.jsx @@ -5,7 +5,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import options from '@/store/options.js' import './index.scss' @@ -317,8 +316,8 @@ const { debug, visible, data } = this.state return ( - <div className={'page-message-wrap ' + (debug && options.sysType !== 'cloud' ? 'exist' : '')}> - {debug && options.sysType !== 'cloud' ? <Button + <div className={'page-message-wrap ' + (debug && window.GLOB.sysType !== 'cloud' ? 'exist' : '')}> + {debug && window.GLOB.sysType !== 'cloud' ? <Button icon="copy" shape="circle" className="page-message" diff --git a/src/tabviews/zshare/settingcomponent/index.jsx b/src/tabviews/zshare/settingcomponent/index.jsx index c3c366a..76f94ae 100644 --- a/src/tabviews/zshare/settingcomponent/index.jsx +++ b/src/tabviews/zshare/settingcomponent/index.jsx @@ -6,7 +6,6 @@ import Api from '@/api' import MKEmitter from '@/utils/events.js' import { updateSubTable } from '@/utils/utils-update.js' -import options from '@/store/options.js' import asyncComponent from '@/utils/asyncSpinComponent' import './index.scss' @@ -517,7 +516,7 @@ return ( <div className="page-setting-wrap"> - {options.sysType === 'local' ? <Button + {window.GLOB.sysType === 'local' ? <Button icon="setting" shape="circle" className="page-setting" diff --git a/src/tabviews/zshare/tablenodes/index.jsx b/src/tabviews/zshare/tablenodes/index.jsx index f46b98d..21c1919 100644 --- a/src/tabviews/zshare/tablenodes/index.jsx +++ b/src/tabviews/zshare/tablenodes/index.jsx @@ -6,7 +6,6 @@ import Api from '@/api' import G6 from "@antv/g6" import Utils from '@/utils/utils.js' -import options from '@/store/options.js' import './index.scss' const { Search } = Input @@ -475,8 +474,8 @@ const { visible, loading, empty, debug } = this.state return ( - <div className={'page-message-wrap ' + (debug && options.sysType !== 'cloud' ? 'exist' : '')}> - {debug && options.sysType !== 'cloud' ? <Button + <div className={'page-message-wrap ' + (debug && window.GLOB.sysType !== 'cloud' ? 'exist' : '')}> + {debug && window.GLOB.sysType !== 'cloud' ? <Button icon="fork" shape="circle" className="page-message" diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index 7dfc5b2..1928e6a 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -7,7 +7,6 @@ import md5 from 'md5' import Api from '@/api' -import options from '@/store/options.js' import asyncComponent from '@/utils/asyncComponent' import asyncSpinComponent from '@/utils/asyncSpinComponent' import Utils from '@/utils/utils.js' @@ -154,12 +153,12 @@ if (item.resourceType === '1' && item.dataSource) { let _option = Utils.getSelectQueryOptions(item) - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { console.info(_option.sql) } // 娴嬭瘯绯荤粺鍗曚釜璇锋眰 - if (!window.GLOB.mkHS && options.sysType === 'local' && !window.GLOB.systemType) { + if (!window.GLOB.mkHS && window.GLOB.sysType === 'local' && !window.GLOB.systemType) { deForms.push({ ...item, arr_field: _option.field, @@ -217,7 +216,7 @@ advanceValues, searchlist: _list }, () => { - if (!window.GLOB.mkHS && options.sysType === 'local' && window.GLOB.systemType !== 'production') { + if (!window.GLOB.mkHS && window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { this.improveSimpleSearch(deForms) } else if (mainItems.length > 0 || localItems.length > 0) { this.improveSearch(mainItems, localItems) @@ -320,8 +319,8 @@ if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 mainparam.open_key = Utils.encryptOpenKey(mainparam.secretkey, mainparam.timestamp) - if (options.cloudServiceApi) { - mainparam.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { + mainparam.rduri = window.GLOB.cloudServiceApi mainparam.userid = sessionStorage.getItem('CloudUserID') || '' mainparam.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/templates/sharecomponent/tablecomponent/index.jsx b/src/templates/sharecomponent/tablecomponent/index.jsx index 76ca891..5f6c49a 100644 --- a/src/templates/sharecomponent/tablecomponent/index.jsx +++ b/src/templates/sharecomponent/tablecomponent/index.jsx @@ -6,7 +6,6 @@ import moment from 'moment' import Api from '@/api' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' import { queryTableSql } from '@/utils/option.js' @@ -74,8 +73,8 @@ param.secretkey = Utils.encrypt(param.LText, param.timestamp) param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉 - if (options.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } @@ -101,8 +100,8 @@ let deffers = this.state.selectedTables.map((item, i) => { return new Promise(resolve => { let param = {func: 'sPC_Get_FieldName', TBName: item.TbName} - if (options.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { // 涓斿瓨鍦ㄤ簯绔湴鍧� + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx index 6dd56df..b5d117a 100644 --- a/src/templates/zshare/createinterface/index.jsx +++ b/src/templates/zshare/createinterface/index.jsx @@ -6,7 +6,6 @@ import MutilForm from './mutilform' import Utils from '@/utils/utils.js' -import options from '@/store/options.js' import { updateForm } from '@/utils/utils-update.js' import Api from '@/api' import './index.scss' @@ -335,7 +334,7 @@ Ltexttableparam: '', Ltext: '', menuType: menu.type, - systemType: options.sysType + systemType: window.GLOB.sysType } this.setState({ diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index f138596..6529f44 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -9,7 +9,6 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import options from '@/store/options.js' import BaseForm from './baseform' import UniqueForm from './uniqueform' import ContrastForm from './contrastform' @@ -1059,8 +1058,8 @@ mutilparam.secretkey = Utils.encrypt(mutilparam.LText, mutilparam.timestamp) mutilparam.open_key = Utils.encryptOpenKey(mutilparam.secretkey, mutilparam.timestamp) - if (options.cloudServiceApi) { // 浜戠璇锋眰 - mutilparam.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { // 浜戠璇锋眰 + mutilparam.rduri = window.GLOB.cloudServiceApi mutilparam.userid = sessionStorage.getItem('CloudUserID') || '' mutilparam.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js index 3a20c12..13412b2 100644 --- a/src/utils/utils-datamanage.js +++ b/src/utils/utils-datamanage.js @@ -1,6 +1,5 @@ import md5 from 'md5' import moment from 'moment' -import options from '@/store/options.js' import Utils from './utils.js' export default class DataUtils { @@ -58,8 +57,8 @@ param.func = setting.innerFunc } else { if (window.GLOB.mkHS) { - if (setting.sysInterface === 'true' && options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (setting.sysInterface === 'true' && window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } else if (setting.sysInterface !== 'true') { @@ -256,7 +255,7 @@ } // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { _customScript && console.info(`${setting.$name ? `/*${setting.$name} 鑷畾涔夎剼鏈�*/\n` : ''}${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`) LText && console.info(`${setting.$name ? `/*${setting.$name} 鏁版嵁婧�*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) } @@ -292,8 +291,8 @@ param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // special HS鑷畾涔夊嚱鏁版煡璇� - if (setting.tableName === 's_custom_script' && options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (setting.tableName === 's_custom_script' && window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } @@ -406,7 +405,7 @@ } // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { _customScript && console.info(`${setting.$name ? `/*${setting.$name} 鑷畾涔夎剼鏈� 缁熻鏌ヨ*/\n` : ''}${LText ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`) LText && console.info(`${setting.$name ? `/*${setting.$name} 鏁版嵁婧� 缁熻鏌ヨ*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) } @@ -557,7 +556,7 @@ _script = _script.replace(/@typename@/ig, `'admin'`) // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { _script && console.info(`${item.$name ? `/*${item.$name} 鑷畾涔夎剼鏈紙鍚屾鏌ヨ锛�*/\n` : ''}${_sql ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_script}`) _sql && console.info(`${item.$name ? `/*${item.$name} 鏁版嵁婧愶紙鍚屾鏌ヨ锛�*/\n` : ''}` + _sql) } diff --git a/src/utils/utils.js b/src/utils/utils.js index 35d083e..369abde 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1,6 +1,5 @@ import moment from 'moment' import md5 from 'md5' -import options from '@/store/options.js' const formatKeys = [ { key: 'select', value: ' msltk ' }, @@ -798,8 +797,8 @@ let baseurl = '' - if (options.cloudServiceApi) { - baseurl = options.cloudServiceApi.replace(/webapi(.*)$/, '') + if (window.GLOB.cloudServiceApi) { + baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '') } else { baseurl = window.GLOB.baseurl } @@ -1161,7 +1160,7 @@ _sqlBottom = _sqlBottom.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') } - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { let fsql = ` ${_sql} ${_sqlInsert} @@ -1396,7 +1395,7 @@ _sqlBottom = _sqlBottom.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, '\'\'') } - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { let fsql = ` ${_sql} ${_sqlInsert} @@ -2187,7 +2186,7 @@ _sql = _sql.replace(/@datam@/ig, '\'\'') } - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { // _sql = _sql.replace(/\n\s{8}/ig, '\n') console.info(_sql) } diff --git a/src/views/billprint/index.jsx b/src/views/billprint/index.jsx index 7d9d55d..b260195 100644 --- a/src/views/billprint/index.jsx +++ b/src/views/billprint/index.jsx @@ -5,7 +5,7 @@ import Api from '@/api' import Utils from '@/utils/utils.js' -import options, { styles } from '@/store/options.js' +import { styles } from '@/store/options.js' import UtilsDM from '@/utils/utils-datamanage.js' import NotFount from '@/components/404' import asyncComponent from '@/utils/asyncComponent' @@ -593,7 +593,7 @@ } // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 - if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { + if (window.GLOB.debugger === true || (window.debugger === true && window.GLOB.sysType !== 'cloud')) { _customScript && console.info(`${_dataresource ? '' : '/*涓嶆墽琛岄粯璁ql*/\n'}${_customScript}`) _dataresource && console.info(_dataresource) } diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx index 75f8381..aed4a99 100644 --- a/src/views/design/header/index.jsx +++ b/src/views/design/header/index.jsx @@ -13,7 +13,6 @@ logout } from '@/store/action' import Api from '@/api' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import avatar from '@/assets/img/avatar.jpg' import MainLogo from '@/assets/img/main-logo.png' @@ -64,7 +63,7 @@ // 鑾峰彇涓昏彍鍗� let _param = { func: 's_get_pc_menus', - systemType: options.sysType, + systemType: window.GLOB.sysType, pro_sys: window.GLOB.systemType === 'production' ? 'Y' : '', debug: 'Y' } @@ -405,11 +404,11 @@ } gotoDoc = () => { - if (options.sysType === 'local' && window.GLOB.mainSystemApi) { + if (window.GLOB.sysType === 'local' && window.GLOB.mainSystemApi) { let ssodomain = window.GLOB.mainSystemApi.replace('/webapi/dostars', '') let url = `${ssodomain}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}` window.open(url) - } else if (options.sysType === 'SSO' || options.sysType === 'cloud') { + } else if (window.GLOB.sysType === 'SSO' || window.GLOB.sysType === 'cloud') { window.open(`${window.location.href.replace(/\/index.html(.*)|\/#(.*)/ig, '')}/doc/index.html#?appkey=${window.GLOB.appkey}&LoginUID=${sessionStorage.getItem('LoginUID')}`) } } @@ -511,7 +510,7 @@ <Switch size="small" style={{marginLeft: '7px'}} disabled={!!editLevel} checked={true} onChange={this.changeEditState} /> </Menu.Item> <Menu.Item key="doc" onClick={this.gotoDoc}>鏂囨。涓績</Menu.Item> - {options.sysType !== 'cloud' ? <Menu.Item style={{padding: 0}} key="verup"> + {window.GLOB.sysType !== 'cloud' ? <Menu.Item style={{padding: 0}} key="verup"> <VersionsUp /> </Menu.Item> : null} <Menu.Item key="logout" onClick={this.logout}>閫�鍑�</Menu.Item> diff --git a/src/views/design/header/versions/index.jsx b/src/views/design/header/versions/index.jsx index 5d36f6e..100b669 100644 --- a/src/views/design/header/versions/index.jsx +++ b/src/views/design/header/versions/index.jsx @@ -5,7 +5,6 @@ import moment from 'moment' import Api from '@/api' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import './index.scss' @@ -39,9 +38,9 @@ } let edition_int = '' - if (options.sysType === 'SSO') { + if (window.GLOB.sysType === 'SSO') { edition_int = result.edition_int_sso - } else if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { + } else if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { edition_int = result.edition_int_local } else { if (result.edition_int_sso < result.edition_int_local) { @@ -59,7 +58,7 @@ return } - let sysType = options.sysType.toLowerCase() + let sysType = window.GLOB.sysType.toLowerCase() if (window.GLOB.systemType === 'production' || sysType !== 'local') { sysType = '' diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 53a75dd..92ca299 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -6,7 +6,7 @@ import Api from '@/api' import Utils from '@/utils/utils.js' import MKEmitter from '@/utils/events.js' -import options, { styles } from '@/store/options.js' +import { styles } from '@/store/options.js' import zhCN from '@/locales/zh-CN/login.js' import enUS from '@/locales/en-US/login.js' import asyncComponent from '@/utils/asyncComponent' @@ -173,7 +173,7 @@ } else { this.props.history.replace('/main') } - } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') { + } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { message.warning('搴旂敤灏氭湭鍒涘缓锛岃鍚戜簯绔悓姝ュ簲鐢紒') this.setState({ @@ -234,7 +234,7 @@ } else { this.props.history.replace('/main') } - } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') { + } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { message.warning('搴旂敤灏氭湭鍒涘缓锛岃鍚戜簯绔悓姝ュ簲鐢紒') this.setState({ @@ -279,7 +279,7 @@ } else { this.props.history.replace('/main') } - } else if (res.ErrCode === 'Need_Get_Appkey' && options.sysType === 'SSO') { + } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { message.warning('搴旂敤灏氭湭鍒涘缓锛岃鍚戜簯绔悓姝ュ簲鐢紒') this.setState({ @@ -423,20 +423,14 @@ } if (!window.GLOB.licenseKey && (index === -1 || index > 5)) { - let _appId = window.GLOB.appId - - if (options.sysType === 'cloud') { // 浜戠浣跨敤绯荤粺閰嶇疆appid - _appId = options.caId - } - - let str = md5('MK19' + _appId + timeStamp) + let str = md5('MK19' + window.GLOB.appId + timeStamp) let _rduri = window.atob('aHR0cHM6Ly9lcGMubWs5aC5$mkjbi93ZWJhcGkvZG9zdGFycw=='.replace(/\$mk/ig, '')) let _func = window.atob('c0VtcG93ZXJDbG91$mkZF9HZXRfTGlua1VybA=='.replace(/\$mk/ig, '')) let _id = window.atob('YmgwYmFwYWJ0ZDQ1ZXBz$mkZ3JhNzlzZWdiY2g2YzFpYms='.replace(/\$mk/ig, '')) let param = { func: _func, - AppID: _appId, + AppID: window.GLOB.appId, TimeStamp: timeStamp, appkey: window.GLOB.appkey, userid: _id, @@ -579,7 +573,7 @@ if (!res) return if (res.status) { - if (options.sysType === 'local' && window.GLOB.systemType !== 'production') { + if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') { if (md5(('mk' + window.GLOB.appkey + res.sys_datetime + res.member_type + res.registry_date).toLowerCase()) !== res.secret_key) { Modal.warning({ title: '瀵嗛挜閿欒锛岃鑱旂郴绠$悊鍛橈紒', @@ -796,15 +790,15 @@ func: 's_get_app_from_cloud', UserName: '', Password: '', - systemType: options.sysType, + systemType: window.GLOB.sysType, Type: 'X', debug: 'Y' } param.appkey = window.GLOB.appkey || '' - if (options.cloudServiceApi) { - param.rduri = options.cloudServiceApi.replace('dostars', 'dostar') + if (window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi.replace('dostars', 'dostar') } this.logincloudRef.handleConfirm().then(result => { diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx index a9b5143..3f5ea61 100644 --- a/src/views/login/loginform.jsx +++ b/src/views/login/loginform.jsx @@ -424,6 +424,7 @@ } render() { + const { langList } = this.props const { getFieldDecorator } = this.props.form const { activeKey, verdisabled, delay, loginWays, remember, scanId, timeout, hasScan, users } = this.state const wayLabels = {app_scan: '鎵爜鐧诲綍', uname_pwd: '璐﹀彿鐧诲綍', sms_vcode: '鐭俊鐧诲綍'} @@ -475,7 +476,7 @@ initialValue: remember, })(<Checkbox onChange={this.rememberChange}>{this.props.dict['login.remember']}</Checkbox>)} </Form.Item> : <div style={{height: '30px', float: 'left'}}></div>} - {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> + {langList && langList.length > 0 ? <Form.Item className="minline right"> {getFieldDecorator('lang', { initialValue: this.props.lang, })( @@ -483,7 +484,7 @@ onChange={(value) => {this.changelang(value)}} getPopupContainer={() => document.getElementById('login-form')} > - {this.props.langList.map((item, index) => { + {langList.map((item, index) => { return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option> })} </Select> @@ -494,7 +495,7 @@ {this.props.dict['login.submit']} </Button> </Form.Item> - {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> + {window.GLOB.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a> <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a> </Form.Item> : null} @@ -532,7 +533,7 @@ /> )} </Form.Item> - {this.props.langList && this.props.langList.length > 0 ? <Form.Item className="minline right"> + {langList && langList.length > 0 ? <Form.Item className="minline right"> {getFieldDecorator('lang', { initialValue: this.props.lang, })( @@ -540,7 +541,7 @@ onChange={(value) => {this.changelang(value)}} getPopupContainer={() => document.getElementById('login-form')} > - {this.props.langList.map((item, index) => { + {langList.map((item, index) => { return <Select.Option key={index} value={item.Lang}>{item.LangName}</Select.Option> })} </Select> @@ -551,7 +552,7 @@ {this.props.dict['login.submit']} </Button> </Form.Item> - {options.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> + {window.GLOB.sysType === 'cloud' && options.cdomain.indexOf('mk9h') > -1 ? <Form.Item className="register-line"> <a href="http://www.minkesoft.com/signup" target="_blank" rel="noopener noreferrer" className="register">娉ㄥ唽</a> <a href="http://www.minkesoft.com/forgotPwd" target="_blank" rel="noopener noreferrer" className="forgot">蹇樿瀵嗙爜锛�</a> </Form.Item> : null} diff --git a/src/views/menudesign/homeform/index.jsx b/src/views/menudesign/homeform/index.jsx index 434b693..427ff91 100644 --- a/src/views/menudesign/homeform/index.jsx +++ b/src/views/menudesign/homeform/index.jsx @@ -4,7 +4,6 @@ import { QuestionCircleOutlined } from '@ant-design/icons' import Api from '@/api' -import options from '@/store/options.js' // import './index.scss' class CustomMenuForm extends Component { @@ -24,7 +23,7 @@ } getMenus = () => { - Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { + Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenuList = [] let menulist = result.fst_menu.map(fst => { diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index 5976772..060153f 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -10,7 +10,6 @@ import md5 from 'md5' import Api from '@/api' -import options from '@/store/options.js' import Utils, { setGLOBFuncs } from '@/utils/utils.js' import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' @@ -965,8 +964,8 @@ Base64Img: canvas.toDataURL('image/png') // 鑾峰彇鐢熸垚鐨勫浘鐗� } - if (options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/views/menudesign/menuform/index.jsx b/src/views/menudesign/menuform/index.jsx index e6fa3c9..bb9801c 100644 --- a/src/views/menudesign/menuform/index.jsx +++ b/src/views/menudesign/menuform/index.jsx @@ -4,7 +4,6 @@ import { QuestionCircleOutlined } from '@ant-design/icons' import Api from '@/api' -import options from '@/store/options.js' import './index.scss' const { TextArea } = Input @@ -77,7 +76,7 @@ getMenus = () => { const { MenuId, config } = this.props - Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { + Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenu = null let thdMenuList = [] diff --git a/src/views/printTemplate/index.jsx b/src/views/printTemplate/index.jsx index 1a5a5f9..3375efd 100644 --- a/src/views/printTemplate/index.jsx +++ b/src/views/printTemplate/index.jsx @@ -20,7 +20,6 @@ qrurl, imgurl } from './option.js' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import printCtrl from './print.js' import Api from '@/api' @@ -776,8 +775,8 @@ Base64Img: res } - if (options.cloudServiceApi) { - param.rduri = options.cloudServiceApi + if (window.GLOB.cloudServiceApi) { + param.rduri = window.GLOB.cloudServiceApi param.userid = sessionStorage.getItem('CloudUserID') || '' param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' } diff --git a/src/views/systemfunc/sidemenu/index.jsx b/src/views/systemfunc/sidemenu/index.jsx index 21bd103..b6c4b15 100644 --- a/src/views/systemfunc/sidemenu/index.jsx +++ b/src/views/systemfunc/sidemenu/index.jsx @@ -4,7 +4,6 @@ import { FolderOutlined } from '@ant-design/icons' import { SySMenuList } from './config' -import options from '@/store/options.js' import MKEmitter from '@/utils/events.js' import './index.scss' @@ -34,7 +33,7 @@ menulist = menulist.filter(menu => menu.children.length > 0) } else { menulist.forEach(menu => { - menu.children = menu.children.filter(item => !item.systems || item.systems.includes(options.sysType)) + menu.children = menu.children.filter(item => !item.systems || item.systems.includes(window.GLOB.sysType)) }) menulist = menulist.filter(menu => menu.children.length > 0) diff --git a/src/views/tabledesign/menuform/index.jsx b/src/views/tabledesign/menuform/index.jsx index beeda49..9c128c1 100644 --- a/src/views/tabledesign/menuform/index.jsx +++ b/src/views/tabledesign/menuform/index.jsx @@ -3,7 +3,6 @@ import { Form, Row, Col, Input, Select, notification, Switch } from 'antd' import Api from '@/api' -import options from '@/store/options.js' import './index.scss' const { TextArea } = Input @@ -76,7 +75,7 @@ getMenus = () => { const { MenuId, config } = this.props - Api.getCloudConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { + Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenu = null let thdMenuList = [] -- Gitblit v1.8.0