king
2023-03-09 2d5d60d5f165546299d1b42004b1469cb6d2b3ef
2023-03-09
9个文件已修改
139 ■■■■ 已修改文件
src/menu/components/editor/braft-editor/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/options.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/bgcontroller/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/editor/braft-editor/index.jsx 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/popview/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/index.jsx
@@ -170,7 +170,7 @@
        <NormalHeader 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">
            <NormalForm title="富文本设置" width={700} update={this.updateWrap} getForms={this.getWrapForms}>
            <NormalForm title="富文本设置" width={750} update={this.updateWrap} getForms={this.getWrapForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="normaltable" card={card}/>
src/menu/components/editor/braft-editor/options.jsx
@@ -4,6 +4,19 @@
export default function (wrap, columns) {
  let appType = sessionStorage.getItem('appType')
  let roleList = sessionStorage.getItem('sysRoles')
  let menu = window.GLOB.customMenu
  let interfaces = []
  if (menu.interfaces) {
    menu.interfaces.forEach(item => {
      if (item.status === 'true') {
        interfaces.push({
          value: item.uuid,
          label: item.name
        })
      }
    })
  }
  if (roleList) {
    try {
@@ -52,14 +65,24 @@
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
        {value: 'public', label: '公共数据源'},
      ],
      controlFields: [
        {field: 'field', values: ['dynamic']},
        {field: 'encryption', values: ['dynamic']},
        {field: 'field', values: ['dynamic', 'public']},
        {field: 'publicId', values: ['public']},
        {field: 'encryption', values: ['dynamic', 'public']},
      ]
    },
    {
      type: 'select',
      field: 'publicId',
      label: '数据源',
      initval: wrap.publicId || '',
      required: true,
      options: interfaces
    },
    {
      type: 'select',
      field: 'field',
      label: '文本字段',
      initval: wrap.field || '',
src/pc/bgcontroller/index.jsx
@@ -2,13 +2,14 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Form, Select, Input } from 'antd'
import { ArrowUpOutlined, ArrowDownOutlined, ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons'
import { ArrowUpOutlined, ArrowDownOutlined, ArrowLeftOutlined, ArrowRightOutlined, BgColorsOutlined, ColumnWidthOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const StyleInput = asyncComponent(() => import('@/menu/stylecontroller/styleInput'))
const SysColorSketch = asyncComponent(() => import('@/menu/stylecontroller/syscolorsketch'))
const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
const { Option } = Select
@@ -150,8 +151,52 @@
    }
  }
  /**
   * @description 修改阴影颜色 ,颜色控件
   */
  changeShadowColor = (val) => {
    let config = fromJS(this.props.config).toJS()
    config.style.shadowColor = val
    config.style.boxShadow = `${config.style.hShadow || '0px'} ${config.style.vShadow || '0px'} ${config.style.shadowBlur || '0px'} ${config.style.shadowColor || 'transparent'}`
    this.props.updateConfig(config)
  }
  /**
   * @description 修改阴影颜色 ,颜色控件
   */
  changeShadowBlur = (val) => {
    let config = fromJS(this.props.config).toJS()
    config.style.shadowBlur = val
    config.style.boxShadow = `${config.style.hShadow || '0px'} ${config.style.vShadow || '0px'} ${config.style.shadowBlur || '0px'} ${config.style.shadowColor || 'transparent'}`
    this.props.updateConfig(config)
  }
  /**
   * @description 修改阴影颜色 ,颜色控件
   */
  changeHShadow = (val) => {
    let config = fromJS(this.props.config).toJS()
    config.style.hShadow = val
    config.style.boxShadow = `${config.style.hShadow || '0px'} ${config.style.vShadow || '0px'} ${config.style.shadowBlur || '0px'} ${config.style.shadowColor || 'transparent'}`
    this.props.updateConfig(config)
  }
  /**
   * @description 修改阴影颜色 ,颜色控件
   */
  changeVShadow = (val) => {
    let config = fromJS(this.props.config).toJS()
    config.style.vShadow = val
    config.style.boxShadow = `${config.style.hShadow || '0px'} ${config.style.vShadow || '0px'} ${config.style.shadowBlur || '0px'} ${config.style.shadowColor || 'transparent'}`
    this.props.updateConfig(config)
  }
  render () {
    const { config } = this.props
    const { config, type } = this.props
    const { backgroundColor, backgroundImage, backgroundSize, backgroundRepeat, backgroundPosition, background } = this.state
    const formItemLayout = {
      labelCol: {
@@ -174,8 +219,11 @@
          >
            <StyleInput defaultValue={config.style.width || '100%'} options={['px', '%', 'vw']} onChange={(val) => this.changePadding(val, 'width')}/>
          </Form.Item> */}
          <Form.Item className="color-control" colon={false} label="背景色">
          <Form.Item className="color-control" style={{marginBottom: '0px'}} colon={false} label="背景色">
            <ColorSketch value={backgroundColor} onChange={this.changeBackgroundColor} />
          </Form.Item>
          <Form.Item colon={false} label="系统色">
            <SysColorSketch onChange={this.changeBackgroundColor} />
          </Form.Item>
          {window.develop === true ? <Form.Item colon={false} label="颜色">
            <Input value={background} onChange={(e) => this.changeBackground(e.target.value)} />
@@ -209,6 +257,24 @@
              <Option value="bottom">bottom</Option>
            </Select>
          </Form.Item>
          {type === 'mob_popview' ? <p className="normal-view" style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>阴影</p> : null}
          {type === 'mob_popview' ? <>
            <Form.Item colon={false} label={<BgColorsOutlined title="阴影颜色"/>}>
              <ColorSketch value={config.style.shadowColor || 'transparent'} onChange={this.changeShadowColor} />
            </Form.Item>
            <Form.Item colon={false} label={<BgColorsOutlined title="系统色"/>}>
              <SysColorSketch onChange={this.changeShadowColor} />
            </Form.Item>
            <Form.Item colon={false} label={<ColumnWidthOutlined title="模糊距离"/>}>
              <StyleInput defaultValue={config.style.shadowBlur || '0px'} options={['px']} onChange={this.changeShadowBlur}/>
            </Form.Item>
            <Form.Item colon={false} label={<ArrowRightOutlined title="水平位置"/>}>
              <StyleInput defaultValue={config.style.hShadow || '0px'} options={['px']} onChange={this.changeHShadow}/>
            </Form.Item>
            <Form.Item colon={false} label={<ArrowDownOutlined title="垂直位置"/>}>
              <StyleInput defaultValue={config.style.vShadow || '0px'} options={['px']} onChange={this.changeVShadow}/>
            </Form.Item>
          </> : null}
          <p className="normal-view" style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>内边距</p>
          <Form.Item
            colon={false}
src/tabviews/custom/components/editor/braft-editor/index.jsx
@@ -46,7 +46,7 @@
      BID = BData.$BID || ''
    }
    
    if (_config.setting && _config.wrap.datatype !== 'static') {
    if (_config.setting && _config.wrap.datatype === 'dynamic') {
      _sync = _config.setting.sync === 'true'
      if (_sync && data) {
@@ -77,7 +77,7 @@
      config: _config,
      arr_field: _config.columns.map(col => col.field).join(','),
    }, () => {
      if (_config.wrap.datatype !== 'static' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
      if (_config.wrap.datatype === 'dynamic' && _config.setting && _config.setting.sync !== 'true' && _config.setting.onload === 'true') {
        setTimeout(() => {
          this.loadData()
        }, _config.setting.delay || 0)
@@ -86,8 +86,14 @@
  }
  componentDidMount () {
    const { config } = this.state
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
    if (config.wrap.datatype === 'public') {
      MKEmitter.addListener('mkPublicData', this.mkPublicData)
    }
  }
  shouldComponentUpdate (nextProps, nextState) {
@@ -99,6 +105,7 @@
      return
    }
    MKEmitter.removeListener('reloadData', this.reloadData)
    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
    MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
  }
@@ -125,6 +132,16 @@
    }
  }
  mkPublicData = (publicId, data) => {
    const { config } = this.state
    if (config.wrap.datatype === 'public' && config.wrap.publicId === publicId) {
      let _data = fromJS(data).toJS()
      this.setState({data: _data})
    }
  }
  resetParentParam = (MenuID, id) => {
    const { config } = this.state
@@ -148,6 +165,11 @@
    const { mainSearch } = this.props
    const { config, arr_field, BID } = this.state
    if (config.wrap.datatype === 'public') {
      MKEmitter.emit('reloadData', config.wrap.publicId)
      return
    }
    if (config.wrap.datatype === 'static') {
      this.setState({
        data: {},
src/tabviews/custom/index.jsx
@@ -516,7 +516,7 @@
      if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件
        mutil = true
        item.setting.supModule = item.supNodes[0].componentId
      } else if (item.setting && item.setting.supModule) {
      } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') {
        let pid = item.setting.supModule.pop()
        if (pid && pid !== 'empty') {
          item.setting.supModule = pid
src/tabviews/custom/popview/index.jsx
@@ -363,7 +363,7 @@
      if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件
        mutil = true
        item.setting.supModule = item.supNodes[0].componentId
      } else if (item.setting && item.setting.supModule) {
      } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') {
        let pid = item.setting.supModule.pop()
        if (pid && pid !== 'empty') {
          item.setting.supModule = pid
src/views/mobdesign/index.jsx
@@ -2023,7 +2023,7 @@
                  <Panel header="元素" key="element">
                    <Modulecell />
                  </Panel>
                  <Panel header={'页面样式'} key="background">
                  <Panel header="页面样式" key="background">
                    {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null}
                  </Panel>
                </Collapse>
src/views/mobdesign/popview/index.jsx
@@ -272,8 +272,8 @@
              <Panel header="元素" key="element">
                <Modulecell />
              </Panel>
              <Panel header={'页面样式'} key="background">
                <BgController config={config} updateConfig={this.updateConfig} />
              <Panel header="页面样式" key="background">
                <BgController config={config} type="mob_popview" updateConfig={this.updateConfig} />
              </Panel>
            </Collapse>
          </div>
src/views/pcdesign/index.jsx
@@ -1651,7 +1651,7 @@
                  <Panel header="元素" key="element">
                    <Modulecell />
                  </Panel>
                  <Panel header={'页面样式'} key="background">
                  <Panel header="页面样式" key="background">
                    {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null}
                  </Panel>
                </Collapse>