king
2021-08-10 704011800afdf0e87dc006b8d6e444556eaa9bf8
2021-08-10
11个文件已修改
2个文件已添加
8个文件已删除
787 ■■■■ 已修改文件
src/components/normalform/modalform/mkSelect/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/code/sandbox/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/code/sandbox/options.jsx 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/code/sandbox/wrapsetting/index.jsx 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/code/sandbox/wrapsetting/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/code/sandbox/wrapsetting/settingform/index.jsx 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/code/sandbox/wrapsetting/settingform/index.scss 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/editorcontent/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/options.jsx 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/wrapsetting/index.jsx 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/wrapsetting/index.scss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/wrapsetting/settingform/index.jsx 199 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/wrapsetting/settingform/index.scss 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/normalTable/index.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkSelect/index.jsx
@@ -117,7 +117,7 @@
          onChange={(val) => val === undefined && this.selectChange('')}
        >
          {options.map(option =>
            <Select.Option id={option.value} title={option.label} key={option.value} value={option.value}>{option.label || option.text}</Select.Option>
            <Select.Option key={option.value || option.field} value={option.value || option.field}>{option.label || option.text}</Select.Option>
          )}
        </Select>
      )
@@ -130,7 +130,7 @@
        onChange={this.mutilselectChange}
      >
        {options.map(option =>
          <Select.Option id={option.value} title={option.label} key={option.value} value={option.value}>{option.label || option.text}</Select.Option>
          <Select.Option key={option.value} value={option.value}>{option.label || option.text}</Select.Option>
        )}
      </Select>)
    }
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -16,7 +16,7 @@
  sequence: ['eleType', 'width'],
  text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link'],
  number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix'],
  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'scale'],
  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link'],
  video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop'],
  icon: ['eleType', 'icon', 'datatype', 'width'],
  slider: ['eleType', 'datatype', 'width', 'color', 'maxValue'],
@@ -110,6 +110,8 @@
        } else if (link === 'linkpage') {
          _options.push('linkmenu', 'joint', 'open')
        }
      } else if (eleType === 'picture' && !link) {
        _options.push('scale')
      }
    } else if (eleType === 'icon') {
      if (datatype === 'dynamic') {
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -296,17 +296,6 @@
      required: false,
    },
    {
      type: 'radio',
      key: 'scale',
      label: '图片放大',
      initVal: card.scale || 'false',
      required: false,
      options: [
        { value: 'false', text: '不可以' },
        { value: 'true', text: '可以' }
      ]
    },
    {
      type: 'select',
      key: 'aspectRatio',
      label: '长宽比',
@@ -332,7 +321,7 @@
      ]
    },
    {
      type: 'select',
      type: 'radio',
      key: 'link',
      label: '链接',
      initVal: card.link || '',
@@ -345,6 +334,17 @@
      ]
    },
    {
      type: 'radio',
      key: 'scale',
      label: '图片放大',
      initVal: card.scale || 'false',
      required: false,
      options: [
        { value: 'false', text: '不可以' },
        { value: 'true', text: '可以' }
      ]
    },
    {
      type: 'select',
      key: 'linkmenu',
      label: '关联菜单',
src/menu/components/code/sandbox/index.jsx
@@ -7,15 +7,16 @@
import asyncIconComponent from '@/utils/asyncIconComponent'
import { resetStyle } from '@/utils/utils-custom.js'
import MKEmitter from '@/utils/events.js'
import getWrapForm from './options'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import './index.scss'
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
const WrapComponent = asyncIconComponent(() => import('./wrapsetting'))
const EditorCode = asyncIconComponent(() => import('./editorcode'))
const CodeContent = asyncComponent(() => import('./codecontent'))
@@ -143,6 +144,16 @@
    this.props.updateConfig(config)
  }
  getWrapForms = () => {
    const { card } = this.state
    return getWrapForm(card.wrap)
  }
  updateWrap = (res) => {
    this.updateconfig({...this.state.card, wrap: res})
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -158,7 +169,9 @@
      <div className="menu-editor-sand-box" style={_style} onClick={this.clickComponent} id={card.uuid}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <NormalForm title="自定义组件设置" width={700} update={this.updateWrap} getForms={this.getWrapForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="normaltable" card={card}/>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <UserComponent config={card}/>
src/menu/components/code/sandbox/options.jsx
New file
@@ -0,0 +1,60 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap) {
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch {
      roleList = []
    }
  } else {
    roleList = []
  }
  const cardWrapForm = [
    {
      type: 'text',
      field: 'name',
      label: '组件名称',
      initval: wrap.name || '',
      tooltip: '用于组件间的区分。',
      required: true
    },
    {
      type: 'number',
      field: 'width',
      label: '宽度',
      initval: wrap.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    },
    {
      type: 'radio',
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'dynamic',
      tooltip: '选择静态值,无需配置数据源。',
      required: false,
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ]
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
      initval: wrap.blacklist || [],
      required: false,
      options: roleList
    },
  ]
  return cardWrapForm
}
src/menu/components/code/sandbox/wrapsetting/index.jsx
File was deleted
src/menu/components/code/sandbox/wrapsetting/index.scss
File was deleted
src/menu/components/code/sandbox/wrapsetting/settingform/index.jsx
File was deleted
src/menu/components/code/sandbox/wrapsetting/settingform/index.scss
File was deleted
src/menu/components/editor/braft-editor/editorcontent/index.scss
@@ -10,5 +10,8 @@
    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/editor/braft-editor/index.jsx
@@ -5,7 +5,7 @@
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
import getWrapForm from './options'
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
@@ -13,10 +13,10 @@
import './index.scss'
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
const WrapComponent = asyncIconComponent(() => import('./wrapsetting'))
const EditorContent = asyncIconComponent(() => import('./editorcontent'))
const BraftContent = asyncComponent(() => import('@/tabviews/custom/components/share/braftContent'))
@@ -147,6 +147,16 @@
    this.props.updateConfig(config)
  }
  getWrapForms = () => {
    const { card } = this.state
    return getWrapForm(card.wrap, card.columns)
  }
  updateWrap = (res) => {
    this.updateconfig({...this.state.card, wrap: res})
  }
  clickComponent = (e) => {
    if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
      e.stopPropagation()
@@ -161,7 +171,9 @@
        <NormalHeader defaultshow="hidden" hideSearch="true" config={card} updateComponent={this.updateComponent}/>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <NormalForm title="富文本设置" width={700} update={this.updateWrap} getForms={this.getWrapForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="normaltable" card={card}/>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <UserComponent config={card}/>
src/menu/components/editor/braft-editor/options.jsx
New file
@@ -0,0 +1,85 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap, columns) {
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch {
      roleList = []
    }
  } else {
    roleList = []
  }
  const cardWrapForm = [
    {
      type: 'text',
      field: 'name',
      label: '组件名称',
      initval: wrap.name || '',
      tooltip: '用于组件间的区分。',
      required: true
    },
    {
      type: 'number',
      field: 'width',
      label: '宽度',
      initval: wrap.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    },
    {
      type: 'radio',
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'dynamic',
      tooltip: '选择静态值,无需配置数据源。',
      required: false,
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ],
      controlFields: [
        {field: 'field', values: ['dynamic']},
        {field: 'encryption', values: ['dynamic']},
      ]
    },
    {
      type: 'select',
      field: 'field',
      label: '文本字段',
      initval: wrap.field || '',
      tooltip: '选择动态值时,需设置文本字段才可生效。',
      required: false,
      options: columns
    },
    {
      type: 'radio',
      field: 'encryption',
      label: '数据解码',
      initval: wrap.encryption || 'true',
      tooltip: '从数据源获取的数据是否需要解码。',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ]
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
      initval: wrap.blacklist || [],
      required: false,
      options: roleList
    },
  ]
  return cardWrapForm
}
src/menu/components/editor/braft-editor/wrapsetting/index.jsx
File was deleted
src/menu/components/editor/braft-editor/wrapsetting/index.scss
File was deleted
src/menu/components/editor/braft-editor/wrapsetting/settingform/index.jsx
File was deleted
src/menu/components/editor/braft-editor/wrapsetting/settingform/index.scss
File was deleted
src/tabviews/custom/components/card/balcony/index.jsx
@@ -4,7 +4,6 @@
import { Spin, notification, Checkbox } from 'antd'
import Api from '@/api'
// import Utils from '@/utils/utils.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import asyncComponent from '@/utils/asyncComponent'
import MKEmitter from '@/utils/events.js'
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -476,6 +476,7 @@
      }
      let scale = url && card.scale === 'true'
      return (
        <Col key={card.uuid} span={card.width}>
          <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -275,6 +275,7 @@
      let cols = 24 / (col.picSort || 1)
      let paddingTop = '100%'
      let scale = col.scale === 'true'
      if (PicRadio[col.lenWidRadio]) {
        paddingTop = PicRadio[col.lenWidRadio]
@@ -284,8 +285,8 @@
        <div>
          {photos.map((url, i) => (
            <Col key={i} span={cols}>
              <div className="ant-mk-picture" onClick={() => {
                if (col.scale !== 'true') return
              <div className={'ant-mk-picture' + (scale ? ' scale' : '')} onClick={() => {
                if (!scale) return
                MKEmitter.emit('mkImageScale', url, photos)
              }} style={{paddingTop, backgroundImage: `url('${url}')`}}></div>
            </Col>
src/tabviews/custom/components/share/normalTable/index.scss
@@ -68,6 +68,9 @@
          background-size: cover;
          margin: 2px;
        }
        .ant-mk-picture.scale {
          cursor: zoom-in;
        }
        .action-col {
          .ant-btn > .anticon + span {
            margin-left: 3px;
src/tabviews/custom/index.jsx
@@ -738,7 +738,6 @@
    })
  }
  filterBalcony = (components, balMap) => {
    return components.filter(item => {
      if (item.type === 'tabs') {