king
2021-05-27 62ebae424b86bb51f86d3d8852eb38450db9769a
2021-05-27
16个文件已修改
115 ■■■■ 已修改文件
src/locales/zh-CN/model.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/dragaction/card.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/index.jsx 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/normal-form/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/formdragelement/card.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/wrapsetting/settingform/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/modaleditable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 补丁 | 查看 | 原始文档 | blame | 历史
src/locales/zh-CN/model.js
@@ -125,7 +125,7 @@
  'model.form.link': '联动菜单',
  'model.form.linkform': '关联表单',
  'model.form.dateday': '日期(天)',
  'model.form.datetime': '日期(秒)',
  'model.form.datetime': '日期(分/秒)',
  'model.form.dateweek': '日期(周)',
  'model.form.datemonth': '日期(月)',
  'model.form.daterange': '日期(区间)',
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -52,6 +52,16 @@
    _style = {...card.style, opacity: isDragging ? 0 : 1}
    _style = resetStyle(_style)
  }
  if (card.eleType === 'picture' && card.maxWidth) {
    _style.maxWidth = card.maxWidth
    let left = _style.marginLeft && _style.marginLeft !== '0px' ? _style.marginLeft : 'auto'
    let right = _style.marginRight && _style.marginRight !== '0px' ? _style.marginRight : 'auto'
    _style.margin = (_style.marginTop || 0) + ' ' + right + ' ' + (_style.marginBottom || 0) + ' ' + left
    delete _style.marginLeft
    delete _style.marginRight
    delete _style.marginTop
    delete _style.marginBottom
  }
  const getContent = () => {
    if (card.eleType === 'sequence') {
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -15,7 +15,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', 'link'],
  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'],
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -319,6 +319,16 @@
      ]
    },
    {
      type: 'number',
      key: 'maxWidth',
      min: 10,
      max: 2000,
      label: '最大宽度',
      initVal: card.maxWidth || '',
      tooltip: '图片宽度的最大值。',
      required: false,
    },
    {
      type: 'select',
      key: 'aspectRatio',
      label: '长宽比',
src/menu/components/form/formaction/index.jsx
@@ -7,6 +7,7 @@
import enUS from '@/locales/en-US/model.js'
import asyncComponent from '@/utils/asyncComponent'
import { getActionForm } from './formconfig'
import { resetStyle } from '@/utils/utils-custom.js'
import MKEmitter from '@/utils/events.js'
import MenuUtils from '@/utils/utils-custom.js'
@@ -184,7 +185,7 @@
            <Icon className="style" title="调整样式" onClick={() => this.handleStyle(group.prevButton)} type="font-colors" />
          </div>
        } trigger="hover">
          <Button type="link" className="prev" style={group.prevButton.style}>{group.prevButton.label}</Button>
          <Button type="link" className="prev" style={resetStyle(group.prevButton.style)}>{group.prevButton.label}</Button>
        </Popover> : null}
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
@@ -193,7 +194,7 @@
            <Icon className="profile" title="setting" type="profile" onClick={() => this.profileAction()} />
          </div>
        } trigger="hover">
          <Button type="link" className="submit mk-primary" style={group.subButton.style}>{group.subButton.label}</Button>
          <Button type="link" className="submit mk-primary" style={resetStyle(group.subButton.style)}>{group.subButton.label}</Button>
        </Popover>
        {group.sort !== config.subcards.length ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
@@ -201,7 +202,7 @@
            <Icon className="style" title="调整样式" onClick={() => this.handleStyle(group.nextButton)} type="font-colors" />
          </div>
        } trigger="hover">
          <Button type="link" className={'skip ' + group.nextButton.enable} style={group.nextButton.style}>{group.nextButton.label}</Button>
          <Button type="link" className={'skip ' + group.nextButton.enable} style={resetStyle(group.nextButton.style)}>{group.nextButton.label}</Button>
        </Popover> : null}
        {/* 编辑按钮:复制、编辑 */}
        <Modal
src/menu/components/form/normal-form/index.jsx
@@ -8,6 +8,7 @@
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
import { getModalForm } from '@/templates/zshare/formconfig'
import { resetStyle } from '@/utils/utils-custom.js'
import ModalForm from '@/templates/zshare/modalform'
import MKEmitter from '@/utils/events.js'
import Utils from '@/utils/utils.js'
@@ -632,7 +633,7 @@
    const { card, dict, group, appType } = this.state
    return (
      <div className="menu-normal-form-edit-box" style={{...card.style}} onClick={this.clickComponent} id={card.uuid}>
      <div className="menu-normal-form-edit-box" style={resetStyle(card.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">
            <Icon className="plus" title="添加分组" onClick={this.addCard} type="plus" />
src/mob/components/formdragelement/card.jsx
@@ -72,7 +72,18 @@
  } else if (card.type === 'datetime') {
    formItem = (<div className="am-list-item"><div className="am-list-line"><div className="am-input-label">{card.label}</div><div className="am-input-control">{card.initval ? moment().subtract(card.initval, 'days').format('YYYY-MM-DD HH:mm') : '请选择'}</div><div className="am-list-extra"><Icon type="right" /></div></div></div>)
  } else if (card.type === 'textarea') {
    // formItem = (<TextareaItem title={card.label} autoHeight />)
    let height = (card.maxRows || 2) * 25
    formItem = (<div className="am-list-item check-card">
      <div className="am-list-line">
        <div className="am-input-label">{card.label}</div>
        <div className="am-input-control">
          <div style={{textAlign: 'left', position: 'relative', height, lineHeight: 1.5}}>
            {card.initval ? card.initval : <span style={{color: '#bcbcbc'}}>请输入</span> }
            {card.count === 'true' ? <span style={{position: 'absolute', right: 0, bottom: 0}}>0/{card.fieldlength}</span> : null}
          </div>
        </div>
      </div>
    </div>)
  } else if (card.type === 'fileupload') {
    formItem = (<Button style={{marginTop: '3px'}}><Icon type="upload" /> 点击上传 </Button>)
  } else if (card.type === 'funcvar') {
src/pc/components/login/normal-login/index.jsx
@@ -139,6 +139,16 @@
  render() {
    const { card, dict } = this.state
    let style = resetStyle(card.style)
    if (card.wrap.maxWidth) {
      style.maxWidth = card.wrap.maxWidth
      let left = style.marginLeft && style.marginLeft !== '0px' ? style.marginLeft : 'auto'
      let right = style.marginRight && style.marginRight !== '0px' ? style.marginRight : 'auto'
      style.margin = (style.marginTop || 0) + ' ' + right + ' ' + (style.marginBottom || 0) + ' ' + left
      delete style.marginLeft
      delete style.marginRight
      delete style.marginTop
      delete style.marginBottom
    }
    return (
      <div className="login-edit-box" style={style} onClick={this.clickComponent} id={card.uuid}>
src/pc/components/login/wrapsetting/settingform/index.jsx
@@ -164,6 +164,18 @@
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="登录框的最大宽度值。">
                  <Icon type="question-circle" />
                  最大宽度
                </Tooltip>
              }>
                {getFieldDecorator('maxWidth', {
                  initialValue: wrap.maxWidth || ''
                })(<InputNumber min={100} max={2000} precision={0} onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="组件占用的最小高度,用于页面布局。">
                  <Icon type="question-circle" />
                  高度
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -428,8 +428,17 @@
      )
    } else if (card.eleType === 'picture') {
      let _imagestyle = {}
      let _style = card.style ? {...card.style} : {}
      let _style = card.style ? {margin: '0 auto', ...card.style} : {}
      let url = ''
      if (card.maxWidth) {
        _style.maxWidth = card.maxWidth
        if (_style.marginLeft === '0px') {
          delete _style.marginLeft
        }
        if (_style.marginRight === '0px') {
          delete _style.marginRight
        }
      }
      if (card.datatype === 'static') {
        url = card.url
src/tabviews/zshare/mutilform/index.jsx
@@ -256,7 +256,7 @@
    if (deForms.length === 0) {
      return
    } else if (menuType !== 'HS' && options.sysType === 'local' && !window.GLOB.systemType) {
    } else if (menuType !== 'HS' && options.sysType === 'local' && window.GLOB.systemType !== 'production') {
      this.improveSimpleActionForm(deForms)
      return
    }
src/templates/zshare/formconfig.jsx
@@ -2332,11 +2332,12 @@
    {
      type: 'number',
      key: 'maxRows',
      min: 2,
      min: 1,
      max: 100,
      precision: 0,
      label: Formdict['header.form.maxRows'],
      initVal: card.maxRows || 6,
      label: appType === 'mob' ? '行数' : Formdict['header.form.maxRows'],
      tooltip: appType === 'mob' ? '行数为空时,高度自适应' : '',
      initVal: card.maxRows || (appType === 'mob' ? '' : 6),
      required: false
    },
    {
@@ -2580,6 +2581,21 @@
      }]
    },
    {
      type: 'radio',
      key: 'count',
      label: '计数功能',
      initVal: card.count || 'false',
      tooltip: '显示输入的字符数,设置行数时生效,注:加密传输时最大值与字段长度不等。',
      options: [{
        value: 'true',
        text: '开启'
      }, {
        value: 'false',
        text: '关闭'
      }],
      forbid: appType !== 'mob'
    },
    {
      type: 'select',
      key: 'supField',
      label: '上级表单',
src/templates/zshare/modalform/index.jsx
@@ -27,7 +27,7 @@
  date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType'],
  datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType'],
  datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType'],
  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra'],
  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count'],
  color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'],
  hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth'],
  split: ['label', 'type'],
src/templates/zshare/modalform/modaleditable/index.jsx
@@ -389,7 +389,7 @@
                title={this.props.dict['model.query.delete']}
                onConfirm={() => this.handleDelete(record.key)
              }>
                <span style={{color: '#1890ff', cursor: 'pointer'}}><Icon type="delete" /></span>
                <span style={{color: '#ff4d4f', cursor: 'pointer'}}><Icon type="delete" /></span>
              </Popconfirm>
            </div>
          ) : null,
src/utils/utils-custom.js
@@ -373,7 +373,8 @@
 * @return {Object}  style
 */
export function resetStyle (style) {
  if (sessionStorage.getItem('appType') === 'mob' && style) {
  if (!style) return {}
  if (sessionStorage.getItem('appType') === 'mob') {
    let _style = JSON.stringify(style)
    // scaleview
@@ -386,8 +387,6 @@
    })
    return JSON.parse(_style)
  } else {
    return style
  }
  return JSON.parse(JSON.stringify(style))
}
src/views/mobdesign/index.jsx