| | |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | if (col.type === 'split' && col.splitctrl) { |
| | | col.splitctrl = col.splitctrl.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | if (m.verify && m.verify.columns) { |
| | | if (m.verify) { |
| | | if (m.verify.columns) { |
| | | m.verify.columns = m.verify.columns.map(col => { |
| | | if (col.Column) { |
| | | col.Column = col.Column.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | if (m.verify.uniques) { |
| | | m.verify.uniques = m.verify.uniques.map(col => { |
| | | if (col.field) { |
| | | col.field = col.field.split(',').map(_field => { |
| | | if (_field === 'BID') return _field |
| | | return _field.toLowerCase() |
| | | }).join(',') |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | if (m.verify.accountfield && m.verify.accountfield !== 'BID') { |
| | | m.verify.accountfield = m.verify.accountfield.toLowerCase() |
| | | } |
| | | if (m.verify.voucher && m.verify.voucher.linkField && m.verify.voucher.linkField !== 'BID') { |
| | | m.verify.voucher.linkField = m.verify.voucher.linkField.toLowerCase() |
| | | } |
| | | } |
| | | if (m.controlField) { |
| | | m.controlField = m.controlField.toLowerCase() |
| | | } |
| | | if (m.config && m.config.components) { |
| | | m.config.components = _replace(m.config.components) |
| | |
| | | |
| | | if (item.action) { |
| | | item.action.forEach(m => { |
| | | if (m.modal && m.modal.fields) { |
| | | m.modal.fields = m.modal.fields.map(col => { |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | if (m.verify && m.verify.columns) { |
| | | m.verify.columns = m.verify.columns.map(col => { |
| | | if (col.Column) { |
| | | col.Column = col.Column.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | if (m.config && m.config.components) { |
| | | m.config.components = _replace(m.config.components) |
| | | } |
| | | resetElement(m) |
| | | }) |
| | | } |
| | | |
| | | if (item.subcards) { |
| | | item.subcards.forEach(card => { |
| | | if (card.setting && card.setting.controlField) { |
| | | card.setting.controlField = card.setting.controlField.toLowerCase() |
| | | } |
| | | if (card.elements) { |
| | | card.elements = card.elements.map(m => { |
| | | resetElement(m) |
| | |
| | | if (m.field) { |
| | | m.field = m.field.toLowerCase() |
| | | } |
| | | if (m.type === 'split' && m.splitctrl) { |
| | | m.splitctrl = m.splitctrl.toLowerCase() |
| | | } |
| | | return m |
| | | }) |
| | | } |
| | |
| | | background: #ffffff; |
| | | } |
| | | body.style-control { |
| | | .pc-menu-view::before, .menu-control::before { |
| | | .menu-setting::before, .mk-opeartion-list::before { |
| | | content: ' '; |
| | | position: absolute; |
| | | left: 0; |
| | |
| | | z-index: 12; |
| | | background:rgba(0, 0, 0, 0.2); |
| | | } |
| | | .pc-poper-view::before { |
| | | content: ' '; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | bottom: 0; |
| | | right: 0; |
| | | z-index: 12; |
| | | background:rgba(0, 0, 0, 0.2); |
| | | .menu-setting .draw, .menu-control .draw { |
| | | display: none; |
| | | } |
| | | .menu-body .menu-view >.ant-card >.ant-card-body { |
| | | position: relative; |
| | | z-index: 13; |
| | | background:#ffffff; |
| | | .style-control-button { |
| | | z-index: 12; |
| | | } |
| | | .menu-view { |
| | | .anticon-tool { |
| | | display: none; |
| | | } |
| | | } |
| | | .mk-pc-view .menu-setting { |
| | | display: none; |
| | | } |
| | | .mk-mob-view .mob-shell { |
| | | .anticon-tool { |
| | | display: none; |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Collapse, Card, Switch, Button, Typography, Spin, message, Dropdown } from 'antd' |
| | | import { notification, Modal, Collapse, Switch, Button, Typography, Spin, message, Dropdown } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined, DownOutlined } from '@ant-design/icons' |
| | | import html2canvas from 'html2canvas' |
| | | import md5 from 'md5' |
| | |
| | | </Collapse> |
| | | </div> |
| | | <div className={'menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> |
| | | <Card bordered={false} extra={ |
| | | <div className="mk-opeartion-list"> |
| | | {config ? <Debug config={config}/> : null} |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | |
| | | <Button type="primary" id="save-config" disabled={!config} className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} loading={menuloading}>保存</Button> |
| | | <Button type="default" disabled={menuloading} onClick={this.closeView}>关闭</Button> |
| | | </div> |
| | | } style={{ width: '100%' }}> |
| | | {config && !comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : <Spin className="loading-config" size="large" />} |
| | | </Card> |
| | | </div> |
| | | </div> |
| | | </div> : <PopView btn={this.state.popConfig} save={this.submitPopConfig} cancel={this.closePop}/>} |
| | |
| | | overflow-y: auto; |
| | | transition: all 0.3s; |
| | | |
| | | > .ant-card { |
| | | >.ant-card-head { |
| | | margin-bottom: 0px; |
| | | .mk-opeartion-list { |
| | | position: sticky; |
| | | top: 0px; |
| | | z-index: 10; |
| | | left: 0px; |
| | | right: 0px; |
| | | text-align: right; |
| | | padding: 5px 10px 8px; |
| | | background: #ffffff; |
| | | .ant-card-head-title { |
| | | color: #1890ff; |
| | | padding: 5px 0; |
| | | } |
| | | .ant-card-extra { |
| | | padding: 5px 0; |
| | | border-bottom: 1px solid #e8e8e8; |
| | | height: 45px; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | z-index: 10; |
| | | |
| | | button { |
| | | margin-left: 10px; |
| | | margin-left: 15px; |
| | | } |
| | | .mk-opeartion-list { |
| | | button:not(.ant-switch):not(:last-child):not(:nth-last-child(2)) { |
| | | padding: 0px 10px; |
| | | } |
| | |
| | | margin-left: 3px; |
| | | } |
| | | } |
| | | } |
| | | .ant-switch.big { |
| | | min-width: 60px; |
| | | height: 28px; |
| | |
| | | .ant-switch.big:after { |
| | | width: 24px; |
| | | height: 24px; |
| | | } |
| | | } |
| | | } |
| | | >.ant-card-body { |
| | | padding: 0px; |
| | | } |
| | | } |
| | | } |
| | |
| | | import React, { Component } from 'react' |
| | | import { is, fromJS } from 'immutable' |
| | | import PropTypes from 'prop-types' |
| | | import { notification, Modal, Collapse, Card, Switch, Button } from 'antd' |
| | | import { notification, Modal, Collapse, Switch, Button } from 'antd' |
| | | import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | </Collapse> |
| | | </div> |
| | | <div className={'menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}> |
| | | <Card title={ |
| | | <div> {config.MenuName} </div> |
| | | } bordered={false} extra={ |
| | | <div> |
| | | <div className="mk-opeartion-list"> |
| | | <div className="btn-name">{config.MenuName}</div> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <ReplaceField config={config} updateConfig={this.resetConfig}/> |
| | | <StyleCombControlButton menu={config} /> |
| | |
| | | <Button type="primary" id="save-pop-config" onClick={this.submitConfig} loading={menuloading}>保存</Button> |
| | | <Button type="default" disabled={menuloading} onClick={this.closeView}>返回</Button> |
| | | </div> |
| | | } style={{ width: '100%' }}> |
| | | {!comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : null} |
| | | </Card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | width: 300px; |
| | | background: #ffffff; |
| | | box-shadow: 0px 2px 5px #bcbcbc; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | |
| | | > .ant-collapse { |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | background-color: #ffffff; |
| | | border-radius: 0px; |
| | | padding-bottom: 30px; |
| | | |
| | | .ant-collapse-item.ant-collapse-item-active { |
| | | border-bottom: 1px solid #d9d9d9; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | .menu-setting::-webkit-scrollbar { |
| | | .menu-setting >.ant-collapse::-webkit-scrollbar { |
| | | width: 4px; |
| | | } |
| | | .menu-setting::-webkit-scrollbar-thumb { |
| | | .menu-setting >.ant-collapse::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.08); |
| | | background: rgba(0, 0, 0, 0.08); |
| | | } |
| | | .menu-setting::-webkit-scrollbar-track { |
| | | .menu-setting >.ant-collapse::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | |
| | | height: calc(100vh - 50px); |
| | | overflow-y: auto; |
| | | |
| | | > .ant-card { |
| | | >.ant-card-head { |
| | | margin-bottom: 0px; |
| | | .mk-opeartion-list { |
| | | position: sticky; |
| | | top: 0px; |
| | | z-index: 10; |
| | | left: 0px; |
| | | right: 0px; |
| | | text-align: right; |
| | | padding: 5px 10px 8px; |
| | | background: #ffffff; |
| | | .ant-card-head-title { |
| | | border-bottom: 1px solid #e8e8e8; |
| | | height: 45px; |
| | | z-index: 10; |
| | | |
| | | .btn-name { |
| | | float: left; |
| | | color: #1890ff; |
| | | padding: 5px 0; |
| | | font-size: 16px; |
| | | } |
| | | .ant-card-extra { |
| | | padding: 5px 0; |
| | | button { |
| | | margin-left: 20px; |
| | | margin-left: 15px; |
| | | } |
| | | button:not(.ant-switch):not(:last-child):not(:nth-last-child(2)) { |
| | | padding: 0px 10px; |
| | | } |
| | | .ant-switch.big { |
| | | min-width: 60px; |
| | | height: 28px; |
| | | line-height: 28px; |
| | | margin-top: -2px; |
| | | .ant-switch-inner { |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | .ant-switch.big:after { |
| | | width: 24px; |
| | | height: 24px; |
| | | } |
| | | } |
| | | } |
| | | >.ant-card-body { |
| | | padding: 0px; |
| | | transform: scale(1.15); |
| | | top: -2px; |
| | | } |
| | | } |
| | | } |
| | |
| | | {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} |
| | | {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} |
| | | </div> |
| | | <div className="wrap"> |
| | | <div className="wrap mk-opeartion-list"> |
| | | <Button type="primary" className={needUpdate ? 'update-tip' : ''} disabled={!config} onClick={this.submitConfig} id="save-config" loading={menuloading}>保存</Button> |
| | | {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/> |
| | |
| | | {controlshow ? <DoubleRightOutlined onClick={() => {this.setState({controlshow: false})}}/> : null} |
| | | {!controlshow ? <DoubleLeftOutlined onClick={() => {this.setState({controlshow: true})}}/> : null} |
| | | </div> |
| | | <div className="wrap"> |
| | | <div className="wrap mk-opeartion-list"> |
| | | <Button type="primary" onClick={this.submitConfig} id="save-config" loading={menuloading}>保存</Button> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | |
| | | {controlshow ? <DoubleRightOutlined onClick={() => {sessionStorage.setItem('controlshow', 'false'); this.setState({controlshow: false})}}/> : null} |
| | | {!controlshow ? <DoubleLeftOutlined onClick={() => {sessionStorage.setItem('controlshow', 'true'); this.setState({controlshow: true})}}/> : null} |
| | | </div> |
| | | <div className="wrap"> |
| | | <div className="wrap mk-opeartion-list"> |
| | | <Button type="primary" className={needUpdate ? 'update-tip' : ''} disabled={!config} id="save-config" onClick={this.submitConfig} loading={menuloading}>保存</Button> |
| | | {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <ArrowLeftOutlined title="后退" className="back-view" onClick={this.backView}/> |
| | |
| | | height: 100%; |
| | | padding: 20px 10px; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | .wrap::-webkit-scrollbar { |
| | | width: 2px; |