| | |
| | | WXApps -- 存在多个公众号、小程序或商户时可使用微信APP列表,注意填写默认公众号、小程序与商户号,格式 [{"appId": "", "appName": "", "appType": "public/miniProgram/merchant"}] |
| | | nginx -- 是否开启了nginx服务,值为 true 时开启,如需使用微信模板消息等服务,请先设置nginx服务并开启此配置 |
| | | debugger -- 值为 true 时开启调试模式,开启后移动端子应用中会有控制台 |
| | | devTools -- 值为 false 时不允许使用调试模式 |
| | | licenseKey -- 许可密钥,在内部网络中使用系统时,会跳过epc验证 |
| | | storeKey -- 电子档案本地授权码,使用本地许可密钥时有效 |
| | | probation -- 试用期(YYYY-MM-DD),在正式系统中,试用期内调用系统接口的脚本会记录下来 |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | window.mkInfo = function(value, color = '') { |
| | | console.info(value, color) |
| | | } |
| | | </script> |
| | | </head> |
| | | <body> |
| | |
| | | "WXNotice": "true", |
| | | "nginx": "true", |
| | | "debugger": false, |
| | | "devTools": true, |
| | | "licenseKey": "", |
| | | "storeKey": "", |
| | | "probation": "", |
| | |
| | | sql = sql.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | | |
| | | console.info(`/* sql 验证 */\n${sql.replace(/\n\s{6,20}/ig, '\n')}`) |
| | | window.mkInfo(`/* sql 验证 */\n${sql.replace(/\n\s{6,20}/ig, '\n')}`) |
| | | |
| | | sql = sql.replace(/\n/ig, ' ') |
| | | |
| | |
| | | GLOB.memberLevel = 0 |
| | | } |
| | | |
| | | if (config.devTools === false) { |
| | | sessionStorage.removeItem('breakpoint') |
| | | GLOB.debugger = false |
| | | |
| | | let getVal = () => { |
| | | let _i = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight |
| | | let _h = window.outerHeight - _i - 200 |
| | | let _w = window.outerWidth - window.innerWidth - 100 |
| | | |
| | | return Math.max(_h, _w) |
| | | } |
| | | |
| | | if (getVal() > 0) { |
| | | document.body.innerHTML = '<div style="text-align: center; font-size: 30px; padding-top: 40vh;">本系统禁止使用控制台,请关闭控制台重新刷新!</div>' |
| | | return |
| | | } else { |
| | | let timer = null |
| | | window.addEventListener('resize', () => { |
| | | timer && clearTimeout(timer) |
| | | |
| | | if (getVal() > 0) { |
| | | timer = setTimeout(() => { |
| | | document.body.innerHTML = '<div style="text-align: center; font-size: 30px; padding-top: 40vh;">本系统禁止使用控制台,请关闭控制台重新刷新!</div>' |
| | | }, 100) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (GLOB.sysType === 'cloud') { |
| | | Object.defineProperty(GLOB, 'debugger', { |
| | | writable: false, |
| | |
| | | document.getElementById('root') |
| | | ) |
| | | } |
| | | |
| | | }) |
| | | |
| | | serviceWorker.unregister() |
| | |
| | | }) |
| | | |
| | | if (window.debugger) { |
| | | console.info('select ' + s.join(', ')) |
| | | window.mkInfo('select ' + s.join(', ')) |
| | | } |
| | | |
| | | let extend = '' |
| | |
| | | |
| | | this.setState({status: this.verSqls.length > 0 ? 'loading' : 'over', execId: item.uuid}) |
| | | |
| | | console.info(`/* 组件:${item.name} 检验项:${item.label} */`) |
| | | window.mkInfo(`/* 组件:${item.name} 检验项:${item.label} */`) |
| | | |
| | | Api.sDebug(item.sql).then(result => { |
| | | if (result.status || result.ErrCode === '-2') { |
| | |
| | | // eslint-disable-next-line |
| | | _val = eval(_val) |
| | | } catch (e) { |
| | | console.info(_val) |
| | | window.mkInfo(_val) |
| | | console.warn(e) |
| | | _val = 0 |
| | | } |
| | |
| | | // eslint-disable-next-line |
| | | _val = eval(_val) |
| | | } catch (e) { |
| | | console.info(_val) |
| | | window.mkInfo(_val) |
| | | console.warn(e) |
| | | _val = '' |
| | | } |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info(sql.replace(/\n\s{6}/ig, '\n')) |
| | | window.mkInfo(sql.replace(/\n\s{6}/ig, '\n')) |
| | | } |
| | | |
| | | return sql |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + config.name + '(回调)', 'color: blue') |
| | | console.info(sql.replace(/\n\s{8}/ig, '\n')) |
| | | window.mkInfo('%c' + config.name + '(回调)', 'color: blue') |
| | | window.mkInfo(sql.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | | |
| | | param.LText = sql |
| | |
| | | content = '' |
| | | } |
| | | } catch (e) { |
| | | console.info(content) |
| | | window.mkInfo(content) |
| | | console.warn(e) |
| | | content = '' |
| | | } |
| | |
| | | // eslint-disable-next-line |
| | | content = eval(content) |
| | | } catch (e) { |
| | | console.info(content) |
| | | window.mkInfo(content) |
| | | console.warn(e) |
| | | content = '' |
| | | } |
| | |
| | | // eslint-disable-next-line |
| | | content = eval(content) |
| | | } catch (e) { |
| | | console.info(content) |
| | | window.mkInfo(content) |
| | | console.warn(e) |
| | | content = '' |
| | | } |
| | |
| | | sql = sql.replace(/@BID@/ig, `'${BID}'`) |
| | | |
| | | if (debug) { |
| | | console.info(sql) |
| | | window.mkInfo(sql) |
| | | } |
| | | |
| | | sql = sql.replace(/%/ig, ' mpercent ') |
| | |
| | | sql = sql.replace(/@BID@/ig, `'${BID}'`) |
| | | |
| | | if (debug) { |
| | | console.info(sql) |
| | | window.mkInfo(sql) |
| | | } |
| | | |
| | | sql = sql.replace(/%/ig, ' mpercent ') |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true) { |
| | | console.info(`/*${config.label} 数据源*/\n` + sql.replace(/\n\s{6}/ig, '\n')) |
| | | DateCount && console.info(`/*${config.label} 总数查询*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) |
| | | window.mkInfo(`/*${config.label} 数据源*/\n` + sql.replace(/\n\s{6}/ig, '\n')) |
| | | DateCount && window.mkInfo(`/*${config.label} 总数查询*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + btn.logLabel, 'color: blue') |
| | | console.info(_sql) |
| | | window.mkInfo('%c' + btn.logLabel, 'color: blue') |
| | | window.mkInfo(_sql) |
| | | } |
| | | |
| | | return _sql |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + btn.logLabel, 'color: blue') |
| | | console.info(_sql) |
| | | window.mkInfo('%c' + btn.logLabel, 'color: blue') |
| | | window.mkInfo(_sql) |
| | | } |
| | | |
| | | return _sql |
| | |
| | | // Api.directRequest('http://localhost:3001/test.xml', 'get', null, 'true').then(res => { |
| | | // let $x2js = new x2js() |
| | | // let jsonObj = $x2js.xml2js(res); |
| | | // console.info(jsonObj) |
| | | // window.mkInfo(jsonObj) |
| | | // }) |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + btn.logLabel + '(回调)', 'color: blue') |
| | | console.info(sql.replace(/\n\s{8}/ig, '\n')) |
| | | window.mkInfo('%c' + btn.logLabel + '(回调)', 'color: blue') |
| | | window.mkInfo(sql.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | | |
| | | param.LText = sql |
| | |
| | | `)} |
| | | `)) |
| | | sql = sql.join('') |
| | | console.info(sql.replace(/\n\s{10}/ig, '\n')) |
| | | window.mkInfo(sql.replace(/\n\s{10}/ig, '\n')) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true) { |
| | | _customScript && console.info(`${btn.logLabel ? `/*${btn.logLabel} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${btn.logLabel ? `/*${btn.logLabel} 数据源*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | _customScript && window.mkInfo(`${btn.logLabel ? `/*${btn.logLabel} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && window.mkInfo(`${btn.logLabel ? `/*${btn.logLabel} 数据源*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | | |
| | | if (btn.logLabel) { |
| | |
| | | sql = sql.replace(/@BID@/ig, `'${BID}'`) |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info(sql) |
| | | window.mkInfo(sql) |
| | | } |
| | | |
| | | sql = sql.replace(/%/ig, ' mpercent ') |
| | |
| | | sql = sql.replace(/@BID@/ig, `'${BID}'`) |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info(sql) |
| | | window.mkInfo(sql) |
| | | } |
| | | |
| | | sql = sql.replace(/%/ig, ' mpercent ') |
| | |
| | | param.LText = param.LText.replace(/@BID@/ig, `'${this.props.BID || ''}'`) |
| | | |
| | | if (window.GLOB.debugger) { |
| | | console.info(param.LText) |
| | | window.mkInfo(param.LText) |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true) { |
| | | console.info(`/*${config.label} 数据源*/\n` + sql.replace(/\n\s{6}/ig, '\n')) |
| | | DateCount && console.info(`/*${config.label} 总数查询*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) |
| | | window.mkInfo(`/*${config.label} 数据源*/\n` + sql.replace(/\n\s{6}/ig, '\n')) |
| | | DateCount && window.mkInfo(`/*${config.label} 总数查询*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | |
| | | let _sql = _option.sql.replace(/@BID@/ig, `'${BID || ''}'`) |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info(_declare + _sql) |
| | | window.mkInfo(_declare + _sql) |
| | | } |
| | | |
| | | // 测试系统单个请求 |
| | |
| | | let sql = item.sql.replace(/@BID@/ig, `'${BID || ''}'`) |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info(sql) |
| | | window.mkInfo(sql) |
| | | } |
| | | |
| | | deForms.push({ |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true) { |
| | | _customScript && console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${setting.$name ? `/*${setting.$name} 数据源*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | DateCount && console.info(`${setting.$name ? `/*${setting.$name} 总数查询*/\n` : ''}` + DateCount.replace(/\n\s{8}/ig, '\n')) |
| | | _customScript && window.mkInfo(`${setting.$name ? `/*${setting.$name} 自定义脚本*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && window.mkInfo(`${setting.$name ? `/*${setting.$name} 数据源*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | DateCount && window.mkInfo(`${setting.$name ? `/*${setting.$name} 总数查询*/\n` : ''}` + DateCount.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | | |
| | | if (setting.$name) { |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true) { |
| | | _customScript && console.info(`${setting.$name ? `/*${setting.$name} 自定义脚本 统计查询*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && console.info(`${setting.$name ? `/*${setting.$name} 数据源 统计查询*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | _customScript && window.mkInfo(`${setting.$name ? `/*${setting.$name} 自定义脚本 统计查询*/\n` : ''}${LText ? '' : '/*不执行默认sql*/\n'}${_customScript}`) |
| | | LText && window.mkInfo(`${setting.$name ? `/*${setting.$name} 数据源 统计查询*/\n` : ''}` + LText.replace(/\n\s{8}/ig, '\n')) |
| | | } |
| | | |
| | | if (setting.$name) { |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true) { |
| | | _script && console.info(`${item.$name ? `/*${item.$name} 自定义脚本(同步查询)*/\n` : ''}${_sql ? '' : '/*不执行默认sql*/\n'}${_script}`) |
| | | _sql && console.info(`${item.$name ? `/*${item.$name} 数据源(同步查询)*/\n` : ''}` + _sql) |
| | | _script && window.mkInfo(`${item.$name ? `/*${item.$name} 自定义脚本(同步查询)*/\n` : ''}${_sql ? '' : '/*不执行默认sql*/\n'}${_script}`) |
| | | _sql && window.mkInfo(`${item.$name ? `/*${item.$name} 数据源(同步查询)*/\n` : ''}` + _sql) |
| | | } |
| | | |
| | | item.columns.forEach(cell => { |
| | |
| | | sql = sql.replace(/\n\s{6}/ig, '\n') |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + item.logLabel, 'color: blue') |
| | | console.info(sql) |
| | | window.mkInfo('%c' + item.logLabel, 'color: blue') |
| | | window.mkInfo(sql) |
| | | } |
| | | } else { |
| | | for(let i = 0; i < _Ltext.length; i += 20) { |
| | |
| | | sql = sql.replace(/\n\s{6}/ig, '\n') |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + btn.logLabel, 'color: blue') |
| | | console.info(sql) |
| | | window.mkInfo('%c' + btn.logLabel, 'color: blue') |
| | | window.mkInfo(sql) |
| | | } |
| | | } else { |
| | | for(let i = 0; i < _Ltext.length; i += 20) { |
| | |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true) { |
| | | console.info('%c' + btn.logLabel, 'color: blue') |
| | | console.info(_sql) |
| | | window.mkInfo('%c' + btn.logLabel, 'color: blue') |
| | | window.mkInfo(_sql) |
| | | } |
| | | |
| | | if (retmsg) { |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | if (window.GLOB.debugger === true) { |
| | | _script && console.info(`${_sql ? '' : '/*不执行默认sql*/\n'}${_script}`) |
| | | _sql && console.info(_sql) |
| | | _script && window.mkInfo(`${_sql ? '' : '/*不执行默认sql*/\n'}${_script}`) |
| | | _sql && window.mkInfo(_sql) |
| | | } |
| | | |
| | | item.columns.forEach(cell => { |
| | |
| | | param.sign = md5(values) |
| | | param.t = param.t || new Date().getTime() |
| | | |
| | | console.info(values) |
| | | console.info(param.sign) |
| | | window.mkInfo(values) |
| | | window.mkInfo(param.sign) |
| | | |
| | | return param |
| | | } |