| | |
| | | writable: false, |
| | | value: GLOB |
| | | }) |
| | | Object.defineProperty(window, 'debug', { |
| | | set(value) { |
| | | if (value + '' === 'false') { |
| | | sessionStorage.removeItem('breakpoint') |
| | | } else { |
| | | sessionStorage.setItem('breakpoint', value) |
| | | } |
| | | console.info('请刷新页面。') |
| | | } |
| | | }) |
| | | |
| | | window.GLOB.CacheMap = new Map() // 缓存配置信息 |
| | | window.GLOB.UserCacheMap = new Map() // 缓存用户自定义设置 |
| | |
| | | } else { |
| | | _card.setting.supModule = '' |
| | | } |
| | | } else if (res.datatype === 'public') { |
| | | // let interfaces = window.GLOB.customMenu.interfaces || [] |
| | | } |
| | | |
| | | if (res.layout === 'flex') { |
| | | _card.wrap.pagestyle = 'page' |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Tabs, Popconfirm, notification, Modal, Typography, Spin, message, Button } from 'antd' |
| | | import { Form, Tabs, Popconfirm, notification, Modal, Typography, Spin, message, Button } from 'antd' |
| | | import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined, CopyOutlined, BorderOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | export default VerifyCard |
| | | export default Form.create()(VerifyCard) |
| | |
| | | absFields: [], // 绝对值字段 |
| | | loadCustomApi: true, // 加载外部资源 |
| | | hasReqFields: false, |
| | | autoMatic: null |
| | | autoMatic: null, |
| | | visible: false |
| | | } |
| | | |
| | | /** |
| | |
| | | chartId, |
| | | config, |
| | | statFields, |
| | | shortcuts, |
| | | shortcuts: shortcuts.length > 0 ? shortcuts : null, |
| | | setting: config.setting, |
| | | searchlist: config.search, |
| | | actions: _actions, |
| | |
| | | setShortcut = () => { |
| | | const { shortcuts } = this.state |
| | | |
| | | if (!shortcuts || shortcuts.length === 0) { |
| | | document.onkeydown = () => {} |
| | | return |
| | | } |
| | | |
| | | document.onkeydown = (event) => { |
| | | let e = event || window.event |
| | | let keyCode = e.keyCode || e.which || e.charCode |
| | |
| | | if (!preKey || !keyCode) return |
| | | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (window.GLOB.breakpoint && _shortcut === 'ctrl+67') { |
| | | window.debugger = false |
| | | window.GLOB.breakpoint = false |
| | | sessionStorage.removeItem('breakpoint') |
| | | |
| | | MKEmitter.emit('debugChange') |
| | | } |
| | | |
| | | if (!shortcuts) return |
| | | |
| | | shortcuts.some(item => { |
| | | if (item.$shortcut === _shortcut) { |
| | |
| | | } |
| | | } |
| | | |
| | | debugChange = () => { |
| | | this.setState({visible: !this.state.visible}) |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | // 组件加载时,获取菜单数据 |
| | | this.loadconfig() |
| | |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('reloadData', this.reloadData) |
| | | MKEmitter.addListener('debugChange', this.debugChange) |
| | | MKEmitter.addListener('reloadMenuView', this.reloadMenuView) |
| | | MKEmitter.addListener('changeTableLine', this.changeTableLine) |
| | | MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu) |
| | |
| | | } |
| | | document.onkeydown = () => {} |
| | | MKEmitter.removeListener('reloadData', this.reloadData) |
| | | MKEmitter.removeListener('debugChange', this.debugChange) |
| | | MKEmitter.removeListener('reloadMenuView', this.reloadMenuView) |
| | | MKEmitter.removeListener('changeTableLine', this.changeTableLine) |
| | | MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu) |
| | |
| | | {setting && window.GLOB.breakpoint ? <DebugTable /> : 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}/> : null} |
| | | {!window.GLOB.mkHS && setting ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> |
| | | ) |
| | |
| | | data: null, // 列表数据集 |
| | | loading: false, // 列表数据加载中 |
| | | visible: false, // 标签页控制 |
| | | treevisible: false, // 菜单结构树弹框显示隐藏控制 |
| | | shortcuts: null // 快捷键 |
| | | } |
| | | |
| | |
| | | |
| | | this.setState({ |
| | | BID: BID, |
| | | shortcuts, |
| | | shortcuts: shortcuts.length > 0 ? shortcuts : null, |
| | | config, |
| | | mainSearch |
| | | }, () => { |
| | |
| | | setShortcut = () => { |
| | | const { shortcuts } = this.state |
| | | |
| | | if (!shortcuts || shortcuts.length === 0) { |
| | | document.onkeydown = () => {} |
| | | return |
| | | } |
| | | |
| | | document.onkeydown = (event) => { |
| | | let e = event || window.event |
| | | let keyCode = e.keyCode || e.which || e.charCode |
| | |
| | | } |
| | | |
| | | if (!preKey || !keyCode) return |
| | | |
| | | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (window.GLOB.breakpoint && _shortcut === 'ctrl+67') { |
| | | window.debugger = false |
| | | window.GLOB.breakpoint = false |
| | | sessionStorage.removeItem('breakpoint') |
| | | |
| | | MKEmitter.emit('debugChange') |
| | | } |
| | | |
| | | if (!shortcuts) return |
| | | |
| | | shortcuts.some(item => { |
| | | if (item.$shortcut === _shortcut) { |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('debugChange', this.debugChange) |
| | | MKEmitter.addListener('reloadMenuView', this.reloadMenuView) |
| | | MKEmitter.addListener('resetActiveMenu', this.resetActiveMenu) |
| | | } |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('debugChange', this.debugChange) |
| | | MKEmitter.removeListener('reloadMenuView', this.reloadMenuView) |
| | | MKEmitter.removeListener('resetActiveMenu', this.resetActiveMenu) |
| | | |
| | | window.GLOB.CacheData.delete(this.props.MenuID) |
| | | this.deleteCache(this.state.config.components) |
| | | } |
| | | |
| | | debugChange = () => { |
| | | this.setState({visible: !this.state.visible}) |
| | | } |
| | | |
| | | deleteCache = (components) => { |
| | |
| | | <Row className="component-wrap">{this.getComponents()}</Row> |
| | | {config && window.GLOB.breakpoint ? <DebugTable /> : 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}/> : null} |
| | | {!window.GLOB.mkHS && config ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts || []}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | | </div> |
| | | ) |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Tabs, Table, Popconfirm, notification, Modal, Spin } from 'antd' |
| | | import { Form, Tabs, Table, Popconfirm, notification, Modal, Spin } from 'antd' |
| | | import { EditOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | export default VerifyCard |
| | | export default Form.create()(VerifyCard) |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { notification, Modal, Spin, Tabs, Typography, Popconfirm, Button } from 'antd' |
| | | import { Form, notification, Modal, Spin, Tabs, Typography, Popconfirm, Button } from 'antd' |
| | | import { CheckCircleOutlined, StopOutlined, SwapOutlined, DeleteOutlined, BorderOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | export default SettingForm |
| | | export default Form.create()(SettingForm) |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { notification, Modal, Spin, Tabs } from 'antd' |
| | | import { Form, notification, Modal, Spin, Tabs } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | |
| | | } |
| | | } |
| | | |
| | | export default SettingForm |
| | | export default Form.create()(SettingForm) |
| | |
| | | </Col> |
| | | <Col span={24} className="sql"> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'数据检查替换符 $check@ -> \'\'、 @check$ -> \'\',ErrorCode等于C时 $check@ -> /*、 @check$ -> */。注:1、需使用系统接口 2、行设置为“选择多行”时无效。调试替换符 /*$breakpoint_begin_xxxx@ 、@breakpoint_end_xxxx$*/'}> |
| | | <Tooltip placement="topLeft" overlayStyle={{width: '320px', maxWidth: '320px'}} title={<><div>{'调试替换符 /*$breakpoint_begin_xxxx@ 、@breakpoint_end_xxxx$*/,在控制台中输入 window.debug = \'xxxx\' 会启用对应的调试语句,快捷键 ctrl+c 或在控制台中输入 window.debug = false 关闭调试。'}</div><div style={{height: '5px'}}></div><div>{'数据检查替换符 $check@ -> \'\'、 @check$ -> \'\',ErrorCode等于C时 $check@ -> /*、 @check$ -> */。注:1、需使用系统接口 2、行设置为“选择多行”时无效。'}</div></>}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | sql |
| | | </Tooltip> |
| | |
| | | _sql += _backCustomScript |
| | | } |
| | | |
| | | if (window.GLOB.breakpoint) { |
| | | let start = new RegExp('\\/\\*\\$breakpoint_begin_' + window.GLOB.breakpoint + '@', 'ig') |
| | | let end = new RegExp('@breakpoint_end_' + window.GLOB.breakpoint + '\\$\\*\\/', 'ig') |
| | | |
| | | if (window.GLOB.breakpoint === 'all') { |
| | | start = /\/\*\$breakpoint_begin_[0-9a-z_]+@/ig |
| | | end = /@breakpoint_end_[0-9a-z_]+\$\*\//ig |
| | | } |
| | | |
| | | _sql = _sql.replace(start, '').replace(end, '') |
| | | _sql += ` |
| | | z_debug_end: select @ErrorCode='E',@retmsg='debug_end' goto aaa` |
| | | } |
| | | |
| | | if (retmsg) { |
| | | _sql += ` |
| | | aaa: if @ErrorCode!='' |
| | |
| | | _sql = _sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`) |
| | | _sql = _sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`) |
| | | _sql = _sql.replace(/@Appkey@/ig, `'${window.GLOB.appkey || ''}'`) |
| | | |
| | | if (window.GLOB.breakpoint) { |
| | | let start = new RegExp('\\/\\*\\$breakpoint_begin_' + window.GLOB.breakpoint + '@', 'ig') |
| | | let end = new RegExp('@breakpoint_end_' + window.GLOB.breakpoint + '\\$\\*\\/', 'ig') |
| | | |
| | | if (window.GLOB.breakpoint === 'all') { |
| | | start = /\/\*\$breakpoint_begin_[0-9a-z_]+@/ig |
| | | end = /@breakpoint_end_[0-9a-z_]+\$\*\//ig |
| | | } |
| | | |
| | | _sql = _sql.replace(start, '').replace(end, '') |
| | | _sql += ` |
| | | z_debug_end: select @ErrorCode='E',@retmsg='debug_end' goto aaa` |
| | | } |
| | | |
| | | if (window.GLOB.debugger === true || (window.debugger === true && options.sysType !== 'cloud')) { |
| | | // _sql = _sql.replace(/\n\s{8}/ig, '\n') |
| | |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | | |
| | | Object.defineProperty(window, 'debug', { |
| | | set(value) { |
| | | if (value + '' === 'false') { |
| | | window.debugger = false |
| | | window.GLOB.breakpoint = false |
| | | sessionStorage.removeItem('breakpoint') |
| | | } else { |
| | | window.debugger = true |
| | | window.GLOB.breakpoint = value + '' |
| | | sessionStorage.setItem('breakpoint', value) |
| | | } |
| | | MKEmitter.emit('debugChange') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | componentWillUnmount () { |