king
2025-02-20 e35e2d2e9956803b4ec5356395b02a6484441b4f
2025-02-20
7个文件已修改
92 ■■■■ 已修改文件
src/menu/components/group/normal-group/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/normal-group/options.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/lowerField/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/editor/braft-editor/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/group/normal-group/index.jsx 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/normal-group/index.jsx
@@ -116,9 +116,20 @@
  }
  getWrapForms = () => {
    const { setting } = this.state.group
    const { group } = this.state
    return getSettingForm(setting)
    let list = []
    group.components.forEach(item => {
      if (item.type === 'card' && item.subtype === 'propcard') {
        list.push({
          value: item.uuid,
          label: item.name,
          disabled: item.wrap.empty !== 'hidden'
        })
      }
    })
    return getSettingForm(group.setting, list)
  }
  updateWrap = (res) => {
@@ -175,7 +186,7 @@
        <NormalHeader hideSearch="true" config={group} updateComponent={this.updateComponent}/>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <NormalForm title="分组设置" width={700} update={this.updateWrap} getForms={this.getWrapForms}>
            <NormalForm title="分组设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="group" card={group}/>
src/menu/components/group/normal-group/options.jsx
@@ -1,7 +1,7 @@
/**
 * @description Wrap表单配置信息
 */
export default function (setting) {
export default function (setting, list) {
  let roleList = sessionStorage.getItem('sysRoles')
  let appType = sessionStorage.getItem('appType')
@@ -42,6 +42,16 @@
      precision: 0,
      required: true
    },
    {
      type: 'select',
      field: 'bindPropId',
      label: '显示状态绑定',
      initval: setting.bindPropId || '',
      tooltip: '分组可绑定设有空值隐藏的属性卡,当属性卡隐藏时分组一同隐藏。',
      required: false,
      options: list,
      forbid: appType === 'mob'
    },
    // {
    //   type: 'radio',
    //   field: 'print',
src/menu/lowerField/index.jsx
@@ -66,7 +66,7 @@
      })
    }
    let resetElement = (m) => {
      if (m.field) {
      if (m.field && m.field !== '$Index') {
        m.field = m.field.toLowerCase()
      }
      if (m.posterField) {
@@ -219,7 +219,7 @@
        if (item.subcards) {
          item.subcards.forEach(card => {
            if (card.setting) {
              if (card.setting.controlField) {
              if (card.setting.controlField && card.setting.controlField !== '$Index') {
                card.setting.controlField = card.setting.controlField.toLowerCase()
              }
              if (card.setting.bgField) {
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -432,7 +432,12 @@
  transferLine = () => {
    const { config, data } = this.state
    if (config.wrap.cardType) return
    if (config.wrap.cardType) {
      if (config.wrap.empty === 'hidden') {
        MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data)
      }
      return
    }
    MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data)
  }
src/tabviews/custom/components/editor/braft-editor/index.scss
@@ -79,7 +79,7 @@
}
.custom-braft-editor-box.word-break {
  .braft-content {
    table {
    table:not(.no-break) {
      td, th {
        word-break: break-all!important;
      }
@@ -88,7 +88,7 @@
}
.custom-braft-editor-box.tb-flex {
  .braft-content {
    table {
    table:not(.no-flex) {
      table-layout: fixed;
    }
  }
src/tabviews/custom/components/group/normal-group/index.jsx
@@ -3,6 +3,7 @@
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const TabTransfer = asyncComponent(() => import('@/tabviews/custom/components/share/tabtransfer'))
@@ -14,17 +15,51 @@
  state = {
    visible: true,
    hidden: false,
    mergeAble: this.props.config.setting.mergeAble === 'true'
  }
  componentDidMount () {
    const { config } = this.props
    if (config.setting.bindPropId) {
      MKEmitter.addListener('resetSelectLine', this.resetStatus)
    }
  }
  componentWillUnmount () {
    this.setState = () => {
      return
    }
    MKEmitter.removeListener('resetSelectLine', this.resetStatus)
  }
  resetStatus = (MenuID, _, data) => {
    const { config } = this.props
    if (config.setting.bindPropId !== MenuID) return
    if (!data || data.$$empty) {
      this.setState({hidden: true})
    } else {
      this.setState({hidden: false})
    }
  }
  render() {
    const { config, style } = this.props
    const { visible, mergeAble } = this.state
    const { visible, mergeAble, hidden } = this.state
    if (config.components.length === 0) return (<div className={'ant-col ant-col-' + config.width} style={style}><div style={config.style}></div></div>)
    let _wrapStyle = style
    if (hidden) {
      _wrapStyle = {...style}
      _wrapStyle.display = 'none'
    }
    
    return (
      <div className={`ant-col ant-col-${config.width} ${mergeAble ? ' mk-merge-able mk-ctrl-' + (config.setting.ctrlNumber || 1) : ''} ${visible ? '' : ' close'}`} style={style}>
      <div className={`ant-col ant-col-${config.width} ${mergeAble ? ' mk-merge-able mk-ctrl-' + (config.setting.ctrlNumber || 1) : ''} ${visible ? '' : ' close'}`} style={_wrapStyle}>
        <div className={'normal-group-wrap ' + (config.setting.layout || '')} id={'anchor' + config.uuid} style={config.style}>
          <div className="mk-control">
            <DoubleLeftOutlined onClick={() => this.setState({visible: false})}/>
src/utils/utils-custom.js
@@ -2334,9 +2334,16 @@
    })
    return false
  } else if (/\sdecimal\(8,/ig.test(sql)) {
    let lines = ''
    sql.split(/\n/).forEach((s, i) => {
      if (/(^|\s)decimal\(8,/ig.test(s)) {
        lines = '第' + (i + 1) + '行中'
      }
    })
    notification.warning({
      top: 92,
      message: `不可使用 decimal(8`,
      message: `${lines}不可使用 decimal(8`,
      duration: 5
    })
    return false