king
2024-07-06 8e5e35eac41ba16f4b875bbcf07bab3878d8e2e4
Merge branch 'master' into positec
16个文件已修改
214 ■■■■■ 已修改文件
src/components/editor/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/editor/index.scss 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/editorcontent/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/copycomponent/index.jsx 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/pastecontroller/index.jsx 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/transfer/index.jsx 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/navbar/normal-navbar/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modalconfig/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/searchconfig/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/card.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/editor/index.jsx
@@ -21,7 +21,7 @@
  state = {
    editorState: '',
    encryption: 'false',
    encryption: 'false'
  }
  UNSAFE_componentWillMount () {
@@ -51,6 +51,7 @@
      encryption
    })
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps))
  }
@@ -213,10 +214,16 @@
  }
  render() {
    const { config } = this.props
    const { editorState } = this.state
    let style = null
    if (config && config.contHeidht) {
      style = {'--editor-height': config.contHeidht < 100 ? config.contHeidht + 'vh' : config.contHeidht + 'px'}
    }
    return (
      <div className="normal-braft-editor">
      <div className="normal-braft-editor" style={style}>
        <BraftEditor
          value={editorState}
          onChange={this.handleEditorChange}
src/components/editor/index.scss
@@ -1,9 +1,13 @@
.normal-braft-editor {
  overflow: hidden;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  .bf-content {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 500px;
    height: var(--editor-height, auto);
    min-height: var(--editor-height, 500px);
    padding-bottom: 0px;
    .public-DraftEditor-content {
      padding-bottom: 0;
src/menu/components/editor/braft-editor/editorcontent/index.scss
@@ -7,9 +7,6 @@
}
.model-menu-edit-content-form {
  .normal-braft-editor {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow-x: hidden;
    .bf-container .DraftEditor-root, .bf-container .public-DraftEditor-content {
      min-height: 500px;
    }
src/menu/components/share/copycomponent/index.jsx
@@ -11,10 +11,48 @@
    card: PropTypes.object
  }
  transConfig = (config, type) => {
    if (type === 'menucell') {
      config.setting.type = 'linkmenu'
      config.setting.linkMenuId = ''
      config.setting.copyMenuId = ''
    } else if (type === 'mobnavbar') {
      delete config.open_edition
      delete config.dataName
      config.menus.forEach(item => {
        item.property = 'menu'
        item.open = 'self'
        delete item.copyMenuId
        delete item.clearMenu
        delete item.linkMenuId
      })
    } else if (config.type === 'menubar' && config.subtype === 'menubar') {
      let cell = config.subMenus[0]
      config.subMenus = []
      if (cell) {
        cell.setting.type = 'menu'
        cell.setting.linkMenuId = ''
        cell.setting.copyMenuId = ''
        config.subMenus.push(cell)
      }
    } else if (['normaltable', 'editable', 'basetable'].includes(type)) {
      config.action = config.action.filter(item => !item.origin)
      config.cols = config.cols.filter(item => !item.origin)
      config.search = config.search.filter(item => !item.origin)
      delete config.isNew
    }
  }
  trigger = () => {
    const { card, type } = this.props
    let _val = fromJS(card).toJS()
    _val.copyType = type
    this.transConfig(_val, type)
    try {
      delete _val.$srcId
@@ -22,28 +60,6 @@
      let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId')
      if (srcid) {
        _val.$srcId = srcid
      }
      if (type === 'menucell') {
        _val.setting.type = 'linkmenu'
        _val.setting.linkMenuId = ''
        _val.setting.copyMenuId = ''
      } else if (_val.type === 'menubar' && _val.subtype === 'menubar') {
        let cell = _val.subMenus[0]
        _val.subMenus = []
        if (cell) {
          cell.setting.type = 'menu'
          cell.setting.linkMenuId = ''
          cell.setting.copyMenuId = ''
          _val.subMenus.push(cell)
        }
      } else if (['normaltable', 'editable', 'basetable'].includes(type)) {
        _val.action = _val.action.filter(item => !item.origin)
        _val.cols = _val.cols.filter(item => !item.origin)
        _val.search = _val.search.filter(item => !item.origin)
        delete _val.isNew
      }
      _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val)))
src/menu/modalconfig/index.scss
@@ -223,10 +223,6 @@
              .ant-input-number {
                margin-top: 4px;
              }
              .normal-braft-editor {
                border: 1px solid #d9d9d9;
                border-radius: 4px;
              }
            }
            .ant-form-item-control-wrapper::after {
              content: '';
src/menu/pastecontroller/index.jsx
@@ -9,6 +9,8 @@
import asyncComponent from '@/utils/asyncComponent'
// import './index.scss'
const { confirm } = Modal
const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform'))
class PasteController extends Component {
@@ -253,7 +255,7 @@
      options = ['tabs', 'timeline', 'datacard', 'doublecard', 'propcard', 'cardatacard', 'carpropcard', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'editor', 'pie', 'scatter', 'iframe', 'sandbox']
  
      if (appType === 'mob') {
        options.push('menubar', 'singleSearch')
        options.push('menubar', 'singleSearch', 'mobnavbar')
        if (sessionStorage.getItem('editMenuType') !== 'popview') {
          options.push('topbar')
        }
@@ -336,6 +338,15 @@
            })
            return
          }
        } else if (res.type === 'navbar') {
          if (menu.components.findIndex(m => m.type === 'navbar') > -1) {
            notification.warning({
              top: 92,
              message: '菜单栏不可重复添加!',
              duration: 5
            })
            return
          }
        }
      } else if (res.type === 'search') {
        if (tab) {
@@ -376,15 +387,45 @@
      this.resetlink(res, commonId)
      
      this.props.insert(res)
      this.setState({visible: false})
      notification.success({
        top: 92,
        message: '粘贴成功!',
        duration: 2
      })
      let skip = true
      if (appType === 'mob' && res.type === 'navbar') {
        let appMenus = sessionStorage.getItem('appViewList')
        if (appMenus) {
          try {
            appMenus = JSON.parse(appMenus)
            appMenus = appMenus.filter(item => item.keys_type === 'navbar')
          } catch (e) {
            appMenus = []
          }
        } else {
          appMenus = []
        }
        if (appMenus.length) {
          const that = this
          skip = false
          confirm({
            title: '如需使用当前应用中已有的菜单栏,请点击右侧关联菜单栏,如需添加请点确定。',
            onOk() {
              that.props.insert(res)
            },
            onCancel() {}
          })
        }
      }
      if (skip) {
        this.props.insert(res)
        notification.success({
          top: 92,
          message: '粘贴成功!',
          duration: 2
        })
      }
    })
  }
src/menu/transfer/index.jsx
@@ -74,8 +74,6 @@
    delete _config.autoMatic
    let useMSearch = false
    if (clear) {
      _config.components = []
    } else {
@@ -91,9 +89,6 @@
            tab.components[0].width = 24
            tab.components[0].wrap.width = 24
            tab.components[0].wrap.name = tab.components[0].name
            if (tab.components[0].setting.useMSearch === 'true') {
              useMSearch = true
            }
  
            tab.components[0].action.forEach(btn => {
              if (btn.OpenType === 'popview' && btn.config) {
@@ -145,14 +140,14 @@
      })
    }
    if (useMSearch) {
    if (_config.components[0].search && _config.components[0].search.length > 0) {
      let cell = {
        uuid: Utils.getuuid(),
        type: 'search',
        width: 24,
        subtype: 'mainsearch',
        name: '搜索',
        search: _config.components[0].search || [],
        search: _config.components[0].search,
        style: {borderBottomColor: '#f0f0f0', borderBottomWidth: '1px'},
        wrap: {float: 'left', blacklist: [], name: '搜索', width: 24}
      }
src/mob/components/navbar/normal-navbar/index.jsx
@@ -12,6 +12,7 @@
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const MenuComponent = asyncIconComponent(() => import('./menus'))
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
class NormalNavbar extends Component {
  static propTpyes = {
@@ -130,6 +131,7 @@
            <NormalForm title="菜单栏设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="mobnavbar" card={card}/>
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle} />
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />
            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
src/mob/modalconfig/index.scss
@@ -218,10 +218,6 @@
              .ant-input-number {
                margin-top: 4px;
              }
              .normal-braft-editor {
                border: 1px solid #d9d9d9;
                border-radius: 4px;
              }
            }
            .ant-form-item-control-wrapper::after {
              content: '';
src/mob/searchconfig/index.scss
@@ -243,10 +243,6 @@
              .ant-input-number {
                margin-top: 4px;
              }
              .normal-braft-editor {
                border: 1px solid #d9d9d9;
                border-radius: 4px;
              }
            }
            .ant-form-item-control-wrapper::after {
              content: '';
src/tabviews/zshare/mutilform/index.scss
@@ -104,11 +104,6 @@
      min-width: 100px;
    }
  }
  .normal-braft-editor {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow-x: hidden;
  }
  p {
    color: #1890ff;
    font-size: 15px;
src/templates/modalconfig/dragelement/card.jsx
@@ -101,7 +101,7 @@
  } else if (card.type === 'textarea') {
    formItem = (<TextArea value={card.initval} placeholder={card.placeholder || ''} autoSize={{ minRows: 2, maxRows: 6 }} />)
  } else if (card.type === 'brafteditor') {
    formItem = (<Editor />)
    formItem = (<Editor config={{contHeidht: card.contHeidht}}/>)
  } else if (card.type === 'fileupload') {
    formItem = (<Button style={{marginTop: '3px'}}><UploadOutlined /> 点击上传 </Button>)
  } else if (card.type === 'funcvar') {
src/templates/modalconfig/dragelement/index.scss
@@ -113,10 +113,6 @@
          min-width: 100px;
        }
      }
      .normal-braft-editor {
        border: 1px solid #d9d9d9;
        border-radius: 4px;
      }
    }
    .ant-form-item-control-wrapper::after {
      content: '';
src/templates/zshare/formconfig.jsx
@@ -2523,6 +2523,18 @@
    },
    {
      type: 'number',
      key: 'contHeidht',
      label: '高度',
      min: 1,
      max: 2000,
      precision: 1,
      initVal: card.contHeidht,
      tooltip: '富文本编辑区的高度,小于100时为窗口的百分比。',
      required: false,
      forbid: appType === 'mob'
    },
    {
      type: 'number',
      key: 'labelwidth',
      min: 1,
      max: 100,
src/templates/zshare/modalform/index.jsx
@@ -41,7 +41,7 @@
  hint: ['label', 'field', 'type', 'blacklist', 'supField', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'],
  split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl', 'supField', 'opacity'],
  formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'supField', 'span', 'labelwidth', 'formula', 'eval', 'postfix'],
  brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom'],
  brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom', 'contHeidht'],
  funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'],
  linkMain: ['readonly', 'required', 'hidden','declare', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'place', 'marginTop', 'marginBottom'],
  popSelect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'enter', 'dataSource', 'columns', 'primaryKey', 'order', 'controlField', 'laypage', 'onload', 'searchKey', 'showField', 'popWidth'],
src/utils/utils-custom.js
@@ -703,10 +703,6 @@
  * @return {String}  item 组件信息
  */
  static resetComponentConfig = (item, appType, commonId) => {
    if (item.type === 'navbar') {
      return item
    }
    if (item.subtype === 'tablecard') { // 兼容
      item.type = 'card'
    }
@@ -724,7 +720,22 @@
      item.name = item.setting.name
    }
    if (item.type === 'menubar') {
    if (item.columns) {
      item.columns = item.columns.map(cell => {
        cell.uuid = this.getuuid()
        return cell
      })
    }
    if (item.type === 'navbar') {
      if (appType === 'mob') {
        item.menus.forEach(menu => {
          menu.MenuID = this.getuuid()
        })
        item.wrap.MenuNo = item.wrap.MenuNo + sign
      }
      return item
    } else if (item.type === 'menubar') {
      item.subMenus = item.subMenus.map(cell => {
        cell.uuid = this.getuuid()
        return cell
@@ -923,12 +934,6 @@
      }
    } else if (item.search) {
      item.search = item.search.map(cell => {
        cell.uuid = this.getuuid()
        return cell
      })
    }
    if (item.columns) {
      item.columns = item.columns.map(cell => {
        cell.uuid = this.getuuid()
        return cell
      })