Merge branch 'master' into positec
| | |
| | | /** |
| | | * @description sql检验 |
| | | */ |
| | | sDebug (sql) { |
| | | sDebug (sql, skip = false) { |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: window.GLOB.execType || 'y', |
| | |
| | | |
| | | window.mkInfo(`/* sql 验证 */\n${sql.replace(/\n\s{6,20}/ig, '\n')}`) |
| | | |
| | | if (skip) return |
| | | |
| | | sql = sql.replace(/\n/ig, ' ') |
| | | |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-century-btn::before, .ant-calendar-header .ant-calendar-prev-decade-btn::before, .ant-calendar-header .ant-calendar-prev-year-btn::before, .ant-calendar-header .ant-calendar-prev-century-btn::after, .ant-calendar-header .ant-calendar-prev-decade-btn::after, .ant-calendar-header .ant-calendar-prev-year-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-century-btn::before, .ant-calendar-header .ant-calendar-next-decade-btn::before, .ant-calendar-header .ant-calendar-next-year-btn::before, .ant-calendar-header .ant-calendar-next-century-btn::after, .ant-calendar-header .ant-calendar-next-decade-btn::after, .ant-calendar-header .ant-calendar-next-year-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-century-btn:hover::before, .ant-calendar-header .ant-calendar-next-decade-btn:hover::before, .ant-calendar-header .ant-calendar-next-year-btn:hover::before, .ant-calendar-header .ant-calendar-next-century-btn:hover::after, .ant-calendar-header .ant-calendar-next-decade-btn:hover::after, .ant-calendar-header .ant-calendar-next-year-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-century-btn:hover::before, .ant-calendar-header .ant-calendar-prev-decade-btn:hover::before, .ant-calendar-header .ant-calendar-prev-year-btn:hover::before, .ant-calendar-header .ant-calendar-prev-century-btn:hover::after, .ant-calendar-header .ant-calendar-prev-decade-btn:hover::after, .ant-calendar-header .ant-calendar-prev-year-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-month-btn::before, .ant-calendar-header .ant-calendar-prev-month-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-month-btn::before, .ant-calendar-header .ant-calendar-next-month-btn::after { |
| | | border-color: rgba(0, 0, 0, 0.65)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-prev-month-btn:hover::before, .ant-calendar-header .ant-calendar-prev-month-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | } |
| | | .ant-calendar-header .ant-calendar-next-month-btn:hover::before, .ant-calendar-header .ant-calendar-next-month-btn:hover::after { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | } |
| | | |
| | | // 重置模态框滚动条 |
| | | .ant-modal-wrap::-webkit-scrollbar, .ant-drawer-wrapper-body::-webkit-scrollbar { |
| | | width: 7px; |
| | |
| | | } |
| | | |
| | | if (config.systemRun === 'backend') { |
| | | GLOB.debugger = false |
| | | Object.defineProperty(window, 'backend', { |
| | | writable: false, |
| | | value: true |
| | | }) |
| | | if (sessionStorage.getItem('systemRun') === 'front') { |
| | | GLOB.debugger = true |
| | | } else { |
| | | GLOB.debugger = false |
| | | Object.defineProperty(window, 'backend', { |
| | | writable: false, |
| | | value: true |
| | | }) |
| | | } |
| | | } |
| | | if (config.debugger === 'forbid') { |
| | | sessionStorage.removeItem('breakpoint') |
| | |
| | | if (res.tbStyle.includes('no-border') && (res.tbStyle.includes('bold-border') || res.tbStyle.includes('deep-border'))) { |
| | | res.tbStyle = res.tbStyle.filter(item => item !== 'no-border') |
| | | } |
| | | |
| | | if (res.splitLine === 'true') { |
| | | res.tbStyle.push('deep-split') |
| | | } |
| | | |
| | | res.tbStyle = res.tbStyle.join(' ') |
| | | } |
| | | |
| | | delete res.splitLine |
| | | |
| | | let _card = {...card, wrap: res} |
| | | |
| | | if (res.datatype === 'public') { |
| | |
| | | roleList = [] |
| | | } |
| | | |
| | | let tbStyle = wrap.tbStyle ? wrap.tbStyle.split(' ') : [] |
| | | let splitLine = 'false' |
| | | if (tbStyle.includes('deep-split')) { |
| | | tbStyle = tbStyle.filter(n => n !== 'deep-split') |
| | | splitLine = 'true' |
| | | } |
| | | |
| | | const cardWrapForm = [ |
| | | { |
| | | type: 'text', |
| | |
| | | type: 'checkbox', |
| | | field: 'tbStyle', |
| | | label: '表格样式', |
| | | initval: wrap.tbStyle ? wrap.tbStyle.split(' ') : [], |
| | | initval: tbStyle, |
| | | tooltip: '富文本中表格的样式,注:选择“边框加粗”或“边框颜色加深”时“无边框”无效。', |
| | | required: false, |
| | | options: [ |
| | |
| | | ], |
| | | span: 24 |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'firstTr', |
| | | // label: '表格首行', |
| | | // initval: wrap.firstTr || 'deep', |
| | | // tooltip: '富文本中table的首行背景颜色。', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'deep', label: '深色'}, |
| | | // {value: 'light', label: '浅色'}, |
| | | // ] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'splitLine', |
| | | label: '分割线加深', |
| | | initval: splitLine, |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '否'}, |
| | | {value: 'true', label: '是'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'permission', |
| | |
| | | wrapperCol={{style: {width: (100 - labelwidth) + '%'}}} |
| | | label={card.labelShow !== 'false' ? card.label : ''} |
| | | required={card.required === 'true'} |
| | | help={card.field + (card.datefield ? ', ' + card.datefield : '') + (card.advanced === 'true' ? '(高级搜索)' : '')} |
| | | help={`${card.field || ''} ${card.datefield ? ', ' + card.datefield : ''} ${card.Hide === 'true' ? '(隐藏)' : ''} ${card.advanced === 'true' ? '(高级搜索)' : ''}`} |
| | | > |
| | | {formItem} |
| | | </Form.Item> |
| | |
| | | if (!_prev) return _back |
| | | |
| | | let tbs = [] |
| | | _prev.replace(/\/\*[^/*]+\*\//g, '').replace(/\n|\r/g, ' ').split(/\sdeclare\s/ig).forEach(line => { |
| | | if (!/^\s*(@|#)[a-zA-Z0-9_]+\s+table\s+\(/ig.test(line)) return |
| | | let tb = line.match(/(@|#)[a-zA-Z0-9_]+\s+table\s+\(.+(\)|date|datetime)\s*\)/ig) |
| | | _prev.replace(/\/\*[^/*]+\*\//g, '').replace(/\n|\r/g, ' ').split(/\sdeclare\s+|\screate\s+table\s+/ig).forEach(line => { |
| | | if (/^\s*(@|#)[a-zA-Z0-9_]+\s+table\s+\(/ig.test(line)) { |
| | | line = line.replace(/\s+table\s+\(/, '(') |
| | | } |
| | | if (!/^\s*(@|#)[a-zA-Z0-9_]+\s*\(/ig.test(line)) return |
| | | let tb = line.match(/(@|#)[a-zA-Z0-9_]+\s*\(.+(\)|date|datetime)\s*\)/ig) |
| | | |
| | | if (tb && tb.length === 1) { |
| | | tbs.push(tb[0]) |
| | |
| | | |
| | | if (!tbName) return |
| | | |
| | | let content = tb.replace(/(@|#)[a-zA-Z0-9_]+\s+table\s+\(\s*/, '').replace(/\s*\)$/, '') |
| | | let content = tb.replace(/(@|#)[a-zA-Z0-9_]+\s*\(\s*/, '').replace(/\s*\)$/, '') |
| | | content = content.replace(/decimal\(\s*\d+\s*,\s*\d+\s*\)/ig, 'decimal') |
| | | |
| | | let keys = [] |
| | |
| | | |
| | | if (res.resource === 'custom') { |
| | | if (res.reType === 'name') { |
| | | let map = {[res.label.toLowerCase()]: { |
| | | FieldDec: res.label, |
| | | FieldName: res.field, |
| | | let map = {[res.field.toLowerCase()]: { |
| | | FieldDec: res.field, |
| | | FieldName: res.label, |
| | | datatype: '' |
| | | }} |
| | | |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Tooltip, Select, Radio, AutoComplete, Modal } from 'antd' |
| | | import { Form, Row, Col, Tooltip, Select, Radio, AutoComplete, Input, Modal } from 'antd' |
| | | import { QuestionCircleOutlined, SwapRightOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | |
| | | // import './index.scss' |
| | |
| | | state = { |
| | | resource: 'custom', |
| | | reType: 'field', |
| | | field: '', |
| | | label: '', |
| | | fields: [], |
| | | labels: [] |
| | | records: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | componentDidMount () { |
| | | let records = localStorage.getItem('replaceRecord') |
| | | |
| | | if (records) { |
| | | records = JSON.parse(records) |
| | | |
| | | let fields = records.fields || [] |
| | | let labels = records.labels || [] |
| | | if (!Array.isArray(records)) { |
| | | localStorage.removeItem('replaceRecord') |
| | | records = [] |
| | | } |
| | | |
| | | this.setState({fields, labels, field: fields[0] || '', label: labels[0] || ''}) |
| | | this.setState({records}) |
| | | |
| | | let field = '' |
| | | let label = '' |
| | | records.forEach(item => { |
| | | if (item.reType !== 'field' || field) return |
| | | |
| | | field = item.value |
| | | label = item.label |
| | | }) |
| | | |
| | | this.props.form.setFieldsValue({field, label}) |
| | | } |
| | | |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | const { reType } = this.state |
| | | |
| | | // 表单提交时检查输入值是否正确 |
| | | return new Promise((resolve, reject) => { |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | |
| | | if (values.resource === 'custom') { |
| | | let records = localStorage.getItem('replaceRecord') |
| | | |
| | | if (reType === 'name') { |
| | | values.field = values.orifield |
| | | values.label = values.name |
| | | |
| | | delete values.orifield |
| | | delete values.name |
| | | } |
| | | |
| | | if (records) { |
| | | records = JSON.parse(records) |
| | | } else { |
| | | records = {fields: [], labels: []} |
| | | records = [] |
| | | } |
| | | |
| | | records.fields.unshift(values.field) |
| | | records.labels.unshift(values.label) |
| | | let field = values.field.toLowerCase() |
| | | records = records.filter(item => item.reType !== reType || item.value.toLowerCase() !== field) |
| | | |
| | | let _fields = [] |
| | | let _labels = [] |
| | | records.unshift({ |
| | | value: values.field, |
| | | label: values.label, |
| | | reType |
| | | }) |
| | | |
| | | records.fields = records.fields.filter(m => { |
| | | if (_fields.includes(m.toLowerCase())) return false |
| | | _fields.push(m.toLowerCase()) |
| | | return true |
| | | }) |
| | | records.labels = records.labels.filter(m => { |
| | | if (_labels.includes(m.toLowerCase())) return false |
| | | _labels.push(m.toLowerCase()) |
| | | return true |
| | | }) |
| | | this.setState({records: records}) |
| | | |
| | | localStorage.setItem('replaceRecord', JSON.stringify(records)) |
| | | } |
| | |
| | | content: '', |
| | | onOk() { |
| | | localStorage.removeItem('replaceRecord') |
| | | that.setState({fields: [], labels: []}) |
| | | that.setState({records: []}) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | |
| | | complete = (key) => { |
| | | const { records, reType } = this.state |
| | | |
| | | let label = '' |
| | | records.forEach(item => { |
| | | if (item.reType === reType && key === item.value) { |
| | | label = item.label |
| | | } |
| | | }) |
| | | |
| | | if (reType === 'name') { |
| | | this.props.form.setFieldsValue({name: label}) |
| | | } else { |
| | | this.props.form.setFieldsValue({label: label}) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { tables } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { resource, fields, labels, field, label, reType } = this.state |
| | | const { resource, records, reType } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | } |
| | | } |
| | | |
| | | let _fields = fields |
| | | if (field) { |
| | | _fields = fields.filter(item => item.toLowerCase().indexOf(field.toLowerCase()) > -1) |
| | | } |
| | | let _labels = labels |
| | | if (label) { |
| | | _labels = labels.filter(item => item.indexOf(label) > -1) |
| | | } |
| | | let _fields1 = [] |
| | | let _fields2 = [] |
| | | records.forEach(item => { |
| | | if (item.reType === 'field') { |
| | | _fields1.push(item.value) |
| | | } else { |
| | | _fields2.push(item.value) |
| | | } |
| | | }) |
| | | |
| | | return ( |
| | | <Form {...formItemLayout}> |
| | |
| | | {resource === 'custom' && reType === 'field' ? <Col span={20}> |
| | | <Form.Item label="字段"> |
| | | {getFieldDecorator('field', { |
| | | initialValue: field, |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入字段!' |
| | | } |
| | | ] |
| | | })(<AutoComplete dataSource={_fields} autoFocus onSearch={(val) => this.setState({ field: val})} placeholder="" />)} |
| | | })(<AutoComplete dataSource={_fields1} onSelect={this.complete} filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} autoFocus placeholder="" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {resource === 'custom' && reType === 'field' ? <Col span={20}> |
| | | <Form.Item label="名称"> |
| | | {getFieldDecorator('label', { |
| | | initialValue: label, |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入名称!' |
| | | } |
| | | ] |
| | | })(<AutoComplete dataSource={_labels} onSearch={(val) => this.setState({ label: val})} placeholder="" />)} |
| | | })(<Input autoComplete="off"/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {resource === 'custom' && reType === 'name' ? <Col span={20}> |
| | | <Form.Item label="原字段"> |
| | | {getFieldDecorator('label', { |
| | | initialValue: label, |
| | | {getFieldDecorator('orifield', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入名称!' |
| | | message: '请输入原字段!' |
| | | } |
| | | ] |
| | | })(<AutoComplete dataSource={_labels} autoFocus onSearch={(val) => this.setState({ label: val})} placeholder="" />)} |
| | | })(<AutoComplete dataSource={_fields2} onSelect={this.complete} filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} autoFocus placeholder="" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {resource === 'custom' && reType === 'name' ? <Col span={20}> |
| | | <Form.Item label="替换为"> |
| | | {getFieldDecorator('field', { |
| | | initialValue: field, |
| | | {getFieldDecorator('name', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入字段!' |
| | | } |
| | | ] |
| | | })(<AutoComplete dataSource={_fields} onSearch={(val) => this.setState({ field: val})} placeholder="" />)} |
| | | })(<Input autoComplete="off"/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {resource === 'custom' && fields.length > 0 ? <Col span={24}> |
| | | {resource === 'custom' && records.length > 0 ? <Col span={24}> |
| | | <DeleteOutlined onClick={this.clear} style={{float: 'right', fontSize: '18px', marginTop: '-10px', cursor: 'pointer', color: '#ff4d4f'}} title="清空历史记录" /> |
| | | </Col> : null} |
| | | </Row> |
| | |
| | | } |
| | | } |
| | | } |
| | | .custom-braft-editor-box.deep-split { |
| | | .braft-content hr { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | } |
| | | } |
| | | |
| | | .custom-braft-editor-box::after { |
| | | content: ' '; |
| | |
| | | }, 600) |
| | | } |
| | | |
| | | this.triggerNote(res, _param.ID) // 消息 |
| | | this.triggerNote(res, _param) // 消息 |
| | | this.execSuccess(res) |
| | | } else { |
| | | this.execError(res) |
| | |
| | | }) |
| | | } |
| | | |
| | | if (/@.*@/.test(url)) { |
| | | Object.keys(param).forEach(key => { |
| | | let reg = new RegExp('@' + key + '@', 'ig') |
| | | if (reg.test(url)) { |
| | | url = url.replace(reg, param[key]) |
| | | delete param[key] |
| | | } |
| | | }) |
| | | } |
| | | |
| | | let _params = { |
| | | url: url, |
| | | method: btn.method || 'post' |
| | |
| | | wrapperCol={{style: {width: (100 - labelwidth) + '%'}}} |
| | | label={card.labelShow !== 'false' ? card.label : ''} |
| | | required={card.required === 'true'} |
| | | help={(card.field || '') + (card.datefield ? ', ' + card.datefield : '') + (card.advanced === 'true' ? '(高级搜索)' : '')} |
| | | help={`${card.field || ''} ${card.datefield ? ', ' + card.datefield : ''} ${card.Hide === 'true' ? '(隐藏)' : ''} ${card.advanced === 'true' ? '(高级搜索)' : ''}`} |
| | | > |
| | | {formItem} |
| | | </Form.Item> |
| | |
| | | |
| | | if (!unique) return |
| | | |
| | | data.unshift(res.data) |
| | | if (type === 'excelcolumn') { |
| | | data.push(res.data) |
| | | } else { |
| | | data.unshift(res.data) |
| | | } |
| | | |
| | | this.setState({ data, editingKey: '', editLineId: res.data.uuid || '' }, () => { |
| | | this.props.onChange(data) |
| | | }) |
| | |
| | | if (!_prev) return _back |
| | | |
| | | let tbs = [] |
| | | _prev.replace(/\/\*[^/*]+\*\//g, '').replace(/\n|\r/g, ' ').split(/\sdeclare\s/ig).forEach(line => { |
| | | if (!/^\s*(@|#)[a-zA-Z0-9_]+\s+table\s+\(/ig.test(line)) return |
| | | let tb = line.match(/(@|#)[a-zA-Z0-9_]+\s+table\s+\(.+(\)|date|datetime)\s*\)/ig) |
| | | _prev.replace(/\/\*[^/*]+\*\//g, '').replace(/\n|\r/g, ' ').split(/\sdeclare\s+|\screate\s+table\s+/ig).forEach(line => { |
| | | if (/^\s*(@|#)[a-zA-Z0-9_]+\s+table\s+\(/ig.test(line)) { |
| | | line = line.replace(/\s+table\s+\(/, '(') |
| | | } |
| | | if (!/^\s*(@|#)[a-zA-Z0-9_]+\s*\(/ig.test(line)) return |
| | | let tb = line.match(/(@|#)[a-zA-Z0-9_]+\s*\(.+(\)|date|datetime)\s*\)/ig) |
| | | |
| | | if (tb && tb.length === 1) { |
| | | tbs.push(tb[0]) |
| | |
| | | |
| | | if (!tbName) return |
| | | |
| | | let content = tb.replace(/(@|#)[a-zA-Z0-9_]+\s+table\s+\(\s*/, '').replace(/\s*\)$/, '') |
| | | let content = tb.replace(/(@|#)[a-zA-Z0-9_]+\s*\(\s*/, '').replace(/\s*\)$/, '') |
| | | content = content.replace(/decimal\(\s*\d+\s*,\s*\d+\s*\)/ig, 'decimal') |
| | | |
| | | let keys = [] |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | let sql = this.getSysExecSql(verify, false) |
| | | |
| | | Api.sDebug(sql, true) |
| | | |
| | | this.setState({ verify }) |
| | | } |
| | | } |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | let sql = this.getSysExecSql(verify, false) |
| | | |
| | | Api.sDebug(sql, true) |
| | | |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | |
| | | this.setState({ verify }) |
| | |
| | | this.setState({ verify }) |
| | | } |
| | | } else { |
| | | let sql = this.getSysBackSql(verify.cbScripts, card.cbTable) |
| | | |
| | | if (sql) { |
| | | let defSql = this.getSysExecSql(verify, true) |
| | | |
| | | sql = `${defSql} |
| | | ${sql} |
| | | ` |
| | | |
| | | if (card.output) { |
| | | sql += ` |
| | | aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg,${card.output} as mk_b_id` |
| | | } else { |
| | | sql += ` |
| | | aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg` |
| | | } |
| | | |
| | | sql = sql.replace(/@typename@/ig, `'typename'`) |
| | | sql = sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`) |
| | | |
| | | Api.sDebug(sql, true) |
| | | } |
| | | |
| | | MKEmitter.emit('editLineId', values.uuid) |
| | | |
| | | this.setState({ verify }) |
| | |
| | | configurable: true, |
| | | enumerable: true, |
| | | set(value) { |
| | | if (value + '' === 'false') { |
| | | window.GLOB.debugger = false |
| | | } else { |
| | | if (value === true) { |
| | | window.GLOB.debugger = true |
| | | } else if (value === 0) { |
| | | if (window.backend) { |
| | | sessionStorage.setItem('systemRun', 'front') |
| | | window.location.reload() |
| | | } else { |
| | | window.mkInfo('系统当前未使用后端脚本!') |
| | | } |
| | | } else if (value === false) { |
| | | if (sessionStorage.getItem('systemRun') === 'front') { |
| | | sessionStorage.removeItem('systemRun') |
| | | window.location.reload() |
| | | } else { |
| | | window.GLOB.debugger = false |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | configurable: true, |
| | | enumerable: true, |
| | | set(value) { |
| | | if (value + '' === 'false') { |
| | | window.GLOB.debugger = false |
| | | } else { |
| | | if (value === true) { |
| | | window.GLOB.debugger = true |
| | | } else if (value === 0) { |
| | | if (window.backend) { |
| | | sessionStorage.setItem('systemRun', 'front') |
| | | window.location.reload() |
| | | } else { |
| | | window.mkInfo('系统当前未使用后端脚本!') |
| | | } |
| | | } else if (value === false) { |
| | | if (sessionStorage.getItem('systemRun') === 'front') { |
| | | sessionStorage.removeItem('systemRun') |
| | | window.location.reload() |
| | | } else { |
| | | window.GLOB.debugger = false |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | configurable: true, |
| | | enumerable: true, |
| | | set(value) { |
| | | if (value + '' === 'false') { |
| | | window.GLOB.debugger = false |
| | | } else { |
| | | if (value === true) { |
| | | window.GLOB.debugger = true |
| | | } else if (value === 0) { |
| | | if (window.backend) { |
| | | sessionStorage.setItem('systemRun', 'front') |
| | | window.location.reload() |
| | | } else { |
| | | window.mkInfo('系统当前未使用后端脚本!') |
| | | } |
| | | } else if (value === false) { |
| | | if (sessionStorage.getItem('systemRun') === 'front') { |
| | | sessionStorage.removeItem('systemRun') |
| | | window.location.reload() |
| | | } else { |
| | | window.GLOB.debugger = false |
| | | } |
| | | } |
| | | } |
| | | }) |