king
2025-02-05 ca97fe7d1ac203ad945b214de370e794fd3cf733
2025-02-05
10个文件已修改
335 ■■■■ 已修改文件
src/menu/lowerField/index.jsx 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecombcontrolbutton/index.scss 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.scss 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/popview/index.jsx 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/popview/index.scss 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/popview/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/lowerField/index.jsx
@@ -46,16 +46,41 @@
          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()
          if (col.type === 'split' && col.splitctrl) {
            col.splitctrl = col.splitctrl.toLowerCase()
          }
          return col
        })
      }
      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)
@@ -125,30 +150,15 @@
        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)
@@ -168,6 +178,9 @@
                if (m.field) {
                  m.field = m.field.toLowerCase()
                }
                if (m.type === 'split' && m.splitctrl) {
                  m.splitctrl = m.splitctrl.toLowerCase()
                }
                return m
              })
            }
src/menu/stylecombcontrolbutton/index.scss
@@ -7,7 +7,7 @@
  background: #ffffff;
}
body.style-control {
  .pc-menu-view::before, .menu-control::before  {
  .menu-setting::before, .mk-opeartion-list::before  {
    content: ' ';
    position: absolute;
    left: 0;
@@ -17,26 +17,20 @@
    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;
src/views/menudesign/index.jsx
@@ -4,7 +4,7 @@
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'
@@ -1372,29 +1372,26 @@
                </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>
                    {config ? <Versions MenuId={MenuId} Template="CustomPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
                    <TableNodes config={config} />
                    <SysInterface config={config} updateConfig={this.updateConfig}/>
                    <StyleCombControlButton menu={config} />
                    <PasteController vType="admin" insert={this.insert} />
                    {config ? <Dropdown placement="bottomCenter" overlay={<div className="mk-opeartion-dropdown-wrap">
                      <ReplaceField config={config} updateConfig={this.resetConfig}/>
                      <LowerField config={config} updateConfig={this.resetConfig}/>
                      <PictureController/>
                    </div>} trigger={['hover']}>
                      <div className="mk-button-more">更多<DownOutlined/></div>
                    </Dropdown> : null}
                    {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                    <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 className="mk-opeartion-list">
                  {config ? <Debug config={config}/> : null}
                  <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button>
                  {config ? <Versions MenuId={MenuId} Template="CustomPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null}
                  <TableNodes config={config} />
                  <SysInterface config={config} updateConfig={this.updateConfig}/>
                  <StyleCombControlButton menu={config} />
                  <PasteController vType="admin" insert={this.insert} />
                  {config ? <Dropdown placement="bottomCenter" overlay={<div className="mk-opeartion-dropdown-wrap">
                    <ReplaceField config={config} updateConfig={this.resetConfig}/>
                    <LowerField config={config} updateConfig={this.resetConfig}/>
                    <PictureController/>
                  </div>} trigger={['hover']}>
                    <div className="mk-button-more">更多<DownOutlined/></div>
                  </Dropdown> : null}
                  {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null}
                  <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>
                {config && !comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : <Spin className="loading-config" size="large" />}
              </div>
            </div>
          </div> : <PopView btn={this.state.popConfig} save={this.submitPopConfig} cancel={this.closePop}/>}
src/views/menudesign/index.scss
@@ -183,59 +183,53 @@
      overflow-y: auto;
      transition: all 0.3s;
      > .ant-card {
        >.ant-card-head {
          margin-bottom: 0px;
          position: sticky;
          top: 0px;
          z-index: 10;
          background: #ffffff;
          .ant-card-head-title {
            color: #1890ff;
            padding: 5px 0;
          }
          .ant-card-extra {
            padding: 5px 0;
            button {
              margin-left: 10px;
            }
            .mk-opeartion-list {
              button:not(.ant-switch):not(:last-child):not(:nth-last-child(2)) {
                padding: 0px 10px;
              }
              .mk-button-more {
                display: inline-block;
                height: 32px;
                border: 1px solid #26C281;
                color: #26C281;
                line-height: 32px;
                padding: 0 10px 0px 20px;
                border-radius: 4px;
                cursor: pointer;
                vertical-align: top;
                margin-left: 10px;
                .anticon-down {
                  margin-left: 3px;
                }
              }
            }
            .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;
            }
      .mk-opeartion-list {
        position: sticky;
        top: 0px;
        left: 0px;
        right: 0px;
        text-align: right;
        padding: 5px 10px 8px;
        background: #ffffff;
        border-bottom: 1px solid #e8e8e8;
        height: 45px;
        white-space: nowrap;
        overflow: hidden;
        z-index: 10;
        button {
          margin-left: 15px;
        }
        button:not(.ant-switch):not(:last-child):not(:nth-last-child(2)) {
          padding: 0px 10px;
        }
        .mk-button-more {
          display: inline-block;
          height: 32px;
          border: 1px solid #26C281;
          color: #26C281;
          line-height: 32px;
          padding: 0 10px 0px 20px;
          border-radius: 4px;
          cursor: pointer;
          vertical-align: top;
          margin-left: 10px;
          .anticon-down {
            margin-left: 3px;
          }
        }
        >.ant-card-body {
          padding: 0px;
        .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;
        }
      }
    }
src/views/menudesign/popview/index.jsx
@@ -1,7 +1,7 @@
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'
@@ -274,21 +274,17 @@
            </Collapse>
          </div>
          <div className={'menu-view' + (menuloading ? ' saving' : '') + (eyeopen ? ' eye-open' : '')}>
            <Card title={
              <div> {config.MenuName} </div>
            } bordered={false} extra={
              <div>
                <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button>
                <ReplaceField config={config} updateConfig={this.resetConfig}/>
                <StyleCombControlButton menu={config} />
                <PasteController insert={this.insert} />
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} />
                <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 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} />
              <PasteController insert={this.insert} />
              <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} />
              <Button type="primary" id="save-pop-config" onClick={this.submitConfig} loading={menuloading}>保存</Button>
              <Button type="default" disabled={menuloading} onClick={this.closeView}>返回</Button>
            </div>
            {!comloading ? <MenuShell menu={config} handleList={this.updateConfig} /> : null}
          </div>
        </div>
      </div>
src/views/menudesign/popview/index.scss
@@ -62,11 +62,15 @@
      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;
        }
@@ -98,15 +102,15 @@
        }
      }
    }
    .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);
@@ -120,39 +124,33 @@
      height: calc(100vh - 50px);
      overflow-y: auto;
      > .ant-card {
        >.ant-card-head {
          margin-bottom: 0px;
          position: sticky;
          top: 0px;
          z-index: 10;
          background: #ffffff;
          .ant-card-head-title {
            color: #1890ff;
            padding: 5px 0;
          }
          .ant-card-extra {
            padding: 5px 0;
            button {
              margin-left: 20px;
            }
            .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;
            }
          }
      .mk-opeartion-list {
        position: sticky;
        top: 0px;
        left: 0px;
        right: 0px;
        text-align: right;
        padding: 5px 10px 8px;
        background: #ffffff;
        border-bottom: 1px solid #e8e8e8;
        height: 45px;
        z-index: 10;
        .btn-name {
          float: left;
          color: #1890ff;
          padding: 5px 0;
          font-size: 16px;
        }
        >.ant-card-body {
          padding: 0px;
        button {
          margin-left: 15px;
        }
        button:not(.ant-switch):not(:last-child):not(:nth-last-child(2)) {
          padding: 0px 10px;
        }
        .ant-switch.big {
          transform: scale(1.15);
          top: -2px;
        }
      }
    }
src/views/mobdesign/index.jsx
@@ -2300,7 +2300,7 @@
              {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}/>
src/views/mobdesign/popview/index.jsx
@@ -285,7 +285,7 @@
            {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>
src/views/pcdesign/index.jsx
@@ -1925,7 +1925,7 @@
                {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}/>
src/views/pcdesign/index.scss
@@ -214,6 +214,7 @@
      height: 100%;
      padding: 20px 10px;
      overflow-y: auto;
      overflow-x: hidden;
    }
    .wrap::-webkit-scrollbar {
      width: 2px;