king
2024-04-10 8a1ee7d651500f848a3c2f05c7fe3be2b7114a43
2024-04-10
23个文件已修改
727 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/elementform/index.jsx 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.jsx 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/index.jsx 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardsimplecomponent/index.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/doublecardcomponent/index.jsx 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/doublecardcomponent/index.scss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/formconfig.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/popupbutton/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/settingform/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/pasteform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-custom.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Popover, message } from 'antd'
import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Popover, message, AutoComplete } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import { formRule } from '@/utils/option.js'
@@ -61,7 +61,7 @@
      formlist: formlist.map(item => {
        item.hidden = !_options.includes(item.key)
        if (item.key === 'field' || item.key === 'linkurl' || item.key === 'bgImage' || item.key === 'posterField') {
        if ((item.key === 'field' || item.key === 'linkurl' || item.key === 'bgImage' || item.key === 'posterField') && item.type === 'select') {
          item.options = []
          
          if (side === 'sub') {
@@ -156,7 +156,7 @@
          item.required = card.eleType !== 'qrcode'
        }
        if (item.key === 'linkurl') {
          item.type = card.link === 'dynamic' ? 'select' : 'textarea'
          item.type = card.link === 'dynamic' ? item.defType : 'textarea'
        }
        return item
@@ -264,7 +264,7 @@
        item.initVal = this.record[item.key]
        item.hidden = !_options.includes(item.key)
        if (item.key === 'field') {
        if (item.key === 'field' && item.type === 'select') {
          item.options = []
          if (side === 'sub') {
@@ -364,7 +364,7 @@
          item.hidden = !_options.includes(item.key)
          if (item.key === 'linkurl') {
            item.type = value === 'dynamic' ? 'select' : 'textarea'
            item.type = value === 'dynamic' ? item.defType : 'textarea'
          }
          return item
        })
@@ -399,30 +399,65 @@
      if (item.hidden || item.forbid) return
      if (item.type === 'text') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <QuestionCircleOutlined className="mk-form-tip" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || '',
                rules: [
                  {
                    required: item.readonly ? false : !!item.required,
                    message: '请输入' + item.label + '!'
                  },
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                  }
                ]
              })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
        )
        if (item.options && item.options.length > 0) {
          fields.push(
            <Col span={12} key={index}>
              <Form.Item label={item.label}>
                {getFieldDecorator(item.key, {
                  initialValue: item.initVal || '',
                  rules: [
                    {
                      required: !!item.required,
                      message: '请输入' + item.label + '!'
                    },
                    {
                      pattern: formRule.field.pattern,
                      message: formRule.field.message
                    },
                    {
                      max: formRule.input.max,
                      message: formRule.input.message
                    }
                  ]
                })(
                  <AutoComplete
                    dataSource={item.options.map((cell, i) => <AutoComplete.Option value={cell.value} key={i}>
                      {cell.value}
                    </AutoComplete.Option>)}
                    filterOption={(input, option) => option.props.children.indexOf(input) > -1}
                  >
                    <Input autoComplete="off" onPressEnter={this.handleSubmit} />
                  </AutoComplete>
                )}
              </Form.Item>
            </Col>
          )
        } else {
          fields.push(
            <Col span={12} key={index}>
              <Form.Item label={item.tooltip ?
                <Tooltip placement="topLeft" title={item.tooltip}>
                  <QuestionCircleOutlined className="mk-form-tip" />
                  {item.label}
                </Tooltip> : item.label
              }>
                {getFieldDecorator(item.key, {
                  initialValue: item.initVal || '',
                  rules: [
                    {
                      required: item.readonly ? false : !!item.required,
                      message: '请输入' + item.label + '!'
                    },
                    {
                      max: formRule.input.max,
                      message: formRule.input.message
                    }
                  ]
                })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)}
              </Form.Item>
            </Col>
          )
        }
      } else if (item.type === 'textarea') {
        fields.push(
          <Col span={24} className="textarea" key={index}>
src/menu/components/card/cardcellcomponent/elementform/index.scss
@@ -39,6 +39,10 @@
  .ant-form-explain, .ant-form-extra {
    font-size: 13px;
  }
  .ant-select-search__field__mirror {
    max-width: 100%;
    overflow: hidden;
  }
}
.formula-fields {
  z-index: 1200!important;
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -127,6 +127,18 @@
    appMenus.push({value: 'goback', text: '返回(上一页)'})
  }
  let fields = []
  if (cards.subtype === 'propcard' && cards.wrap.datatype === 'static') {
    if (cards.wrap.supModule && cards.wrap.supModule.length) {
      let cell = MenuUtils.getComponent(cards.wrap.supModule[cards.wrap.supModule.length - 1])
      if (cell && cell.columns) {
        fields = cell.columns.map(col => ({ value: col.field }))
      }
    } else {
      fields = cards.columns.map(col => ({ value: col.field }))
    }
  }
  let forms = [
    {
      type: 'select',
@@ -160,12 +172,12 @@
      ]
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'field',
      label: '字段',
      initVal: card.field || '',
      required: true,
      options: []
      options: fields
    },
    {
      type: 'icon',
@@ -244,11 +256,12 @@
      required: true
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'posterField',
      label: '预览地址',
      initVal: card.posterField || '',
      required: true
      required: true,
      options: fields
    },
    {
      type: 'radio',
@@ -462,14 +475,14 @@
      required: false
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'bgImage',
      label: '动态背景',
      initVal: card.bgImage || '',
      tooltip: '绑定数据源字段,可根据返回值改变背景图。',
      required: false,
      allowClear: true,
      options: [],
      options: fields,
      forbid: isHeader
    },
    {
@@ -642,13 +655,14 @@
      forbid: ['pc', 'mob'].includes(appType)
    },
    {
      type: 'select',
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      defType: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      key: 'linkurl',
      label: '链接地址',
      initVal: card.linkurl || '',
      tooltip: ['pc', 'mob'].includes(appType) ? '当链接类型为“其他”,且链接地址以@menuid@开头时,其后内容将被视为菜单ID。' : '',
      required: true,
      options: []
      options: fields
    },
    {
      type: 'radio',
src/menu/components/card/cardcellcomponent/index.jsx
@@ -24,11 +24,12 @@
class CardCellComponent extends Component {
  static propTpyes = {
    cards: PropTypes.object,         // 菜单配置信息
    cards: PropTypes.object,
    cardCell: PropTypes.object,
    side: PropTypes.string,
    elements: PropTypes.array,       // 元素集
    updateElement: PropTypes.func    // 菜单配置更新
    timestamp: PropTypes.any,
    elements: PropTypes.array,
    updateElement: PropTypes.func
  }
  state = {
@@ -74,7 +75,7 @@
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (this.props.side !== nextProps.side && nextProps.side) {
    if (this.props.timestamp !== nextProps.timestamp && nextProps.timestamp) {
      this.setState({
        elements: fromJS(nextProps.elements).toJS()
      })
src/menu/components/card/cardcomponent/index.jsx
@@ -33,6 +33,7 @@
    formlist: null,        // 设置表单信息
    elements: null,        // 编辑组
    side: 'front',
    timestamp: '',
    appType: sessionStorage.getItem('appType'),
    visible: false
  }
@@ -44,6 +45,7 @@
    const { card } = this.props
    this.setState({
      timestamp: new Date().getTime() + '',
      card: fromJS(card).toJS(),
      elements: fromJS(card.elements).toJS(),
    })
@@ -117,7 +119,7 @@
      _elements = fromJS(card.backElements).toJS()
    }
    this.setState({side: _side, elements: _elements})
    this.setState({side: _side, elements: _elements, timestamp: new Date().getTime() + ''})
  }
  
  addElement = () => {
@@ -215,9 +217,7 @@
          okText: '确定',
          cancelText: '取消',
          onOk() {
            that.setState({ card: _card, side: '', elements: fromJS(_card.elements).toJS() }, () => {
              that.setState({ side: 'front' })
            })
            that.setState({ card: _card, side: 'front', timestamp: new Date().getTime() + '', elements: fromJS(_card.elements).toJS() })
            that.props.updateElement(_card)
          },
          onCancel() {}
@@ -267,6 +267,7 @@
    if (side === 'back' && res.type === 'simple') {
      this.setState({
        side: 'front',
        timestamp: new Date().getTime() + '',
        elements: fromJS(_card.elements).toJS()
      })
    }
@@ -274,8 +275,121 @@
    this.props.updateElement(_card)
  }
  updateFields = (elements, resolve, type) => {
    const { card, side } = this.state
    let items = elements
    if (type === 'form') {
      items = []
      elements.forEach(item => {
        let cell = {
          uuid: Utils.getuuid(),
          eleType: 'text',
          height: 1,
          innerHeight: 21,
          prefix: item.label ? item.label + ': ' : '',
          datatype: item.field ? 'dynamic' : 'static',
          field: item.field || '',
          width: item.span || 12,
          value: '',
          style: {marginBottom: '15px'}
        }
        if (item.type === 'number') {
          cell.eleType = 'number'
          cell.decimal = typeof(item.decimal) === 'number' ? item.decimal : ''
        }
        items.push(cell)
      })
    }
    if (items.length === 0) {
      resolve({status: false, message: '元素不可为空!'})
      return
    }
    let _card = { ...card }
    let _card2 = { ...card }
    let pass = false
    if (side === 'back') {
      if (!_card.backElements || _card.backElements.length === 0) {
        _card.backElements = items
        pass = true
      } else {
        _card.backElements = items
        _card2.backElements = [...card.backElements, ...items]
      }
    } else {
      if (!_card.elements || _card.elements.length === 0) {
        _card.elements = items
        pass = true
      } else {
        _card.elements = items
        _card2.elements = [...card.elements, ...items]
      }
    }
    if (pass) {
      this.setState({
        card: _card,
        timestamp: new Date().getTime() + '',
        elements: side === 'back' ? fromJS(_card.backElements).toJS() : fromJS(_card.elements).toJS()
      })
      this.props.updateElement(_card)
    } else {
      const that = this
      const _modal = confirm({
        title: '卡片中已存在元素,请选择要进行的操作。',
        className: 'mk-confirm-modal',
        content: <div className="footer">
          <Button key="cancel" onClick={() => _modal.destroy()}>取消</Button>
          <Button key="replace" className="mk-border-purple" onClick={() => {
            that.setState({
              card: _card,
              timestamp: new Date().getTime() + '',
              elements: side === 'back' ? fromJS(_card.backElements).toJS() : fromJS(_card.elements).toJS()
            })
            that.props.updateElement(_card)
            _modal.destroy()
          }}>替换</Button>
          <Button key="confirm" className="mk-border-green" onClick={() => {
            that.setState({
              card: _card2,
              timestamp: new Date().getTime() + '',
              elements: side === 'back' ? fromJS(_card2.backElements).toJS() : fromJS(_card2.elements).toJS()
            })
            that.props.updateElement(_card2)
            _modal.destroy()
          }}>添加</Button>
        </div>
      })
    }
    resolve({status: true})
  }
  paste = (element, resolve) => {
    const { card } = this.state
    if (['simpleform', 'forms', 'formgroup', 'cardcell'].includes(element.copyType)) {
      if (element.copyType === 'simpleform') {
        this.updateFields(element.subcards[0].fields, resolve, 'form')
      } else if (element.copyType === 'forms') {
        this.updateFields(element.fields, resolve, 'form')
      } else if (element.copyType === 'formgroup') {
        this.updateFields(element.fields, resolve, 'form')
      } else {
        this.updateFields(element.elements, resolve)
      }
      return
    }
    let _uuid = Utils.getuuid()
    
@@ -343,7 +457,7 @@
  render() {
    const { cards } = this.props
    const { card, elements, side, visible } = this.state
    const { card, elements, side, visible, timestamp } = this.state
    let _style = {...card.style}
@@ -390,7 +504,7 @@
      <Col span={card.setting.width || 6} style={_style_}>
        <div className={'card-item ' + (card.setting.btnControl || '') + checkAll + tablerole} style={_style} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}>
          <span className="circle-select"></span>
          <CardCellComponent cards={cards} cardCell={card} side={side} elements={elements} updateElement={this.updateCard}/>
          <CardCellComponent cards={cards} cardCell={card} side={side} timestamp={timestamp} elements={elements} updateElement={this.updateCard}/>
          <div className="card-control" onDoubleClick={(e) => e.stopPropagation()}>
            <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
              <div className="mk-popover-control">
@@ -400,7 +514,7 @@
                  <EditOutlined className="edit" title="编辑"/>
                </NormalForm>
                <CopyComponent type="cardcell" card={card}/>
                <PasteController options={['action', 'customCardElement']} updateConfig={this.paste} />
                <PasteController options={['action', 'customCardElement', 'simpleform', 'forms', 'formgroup', 'cardcell']} updateConfig={this.paste} />
                <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle} />
                <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
                  <div className="mk-popover-control">
src/menu/components/card/cardcomponent/index.scss
@@ -99,3 +99,16 @@
    display: inline;
  }
}
.mk-confirm-modal {
  .ant-modal-confirm-btns {
    display: none;
  }
  .footer {
    margin-top: 24px;
    text-align: right;
    .ant-btn {
      margin-left: 8px;
    }
  }
}
src/menu/components/card/cardsimplecomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover } from 'antd'
import { Popover, Modal, Button } from 'antd'
import { PlusOutlined, PlusSquareOutlined, EditOutlined, ArrowLeftOutlined, ArrowRightOutlined, SwapOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
@@ -11,6 +11,8 @@
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { confirm } = Modal
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const NodesWrap = asyncComponent(() => import('./node-wrap'))
@@ -30,7 +32,8 @@
  state = {
    card: null,            // 卡片信息
    formlist: null,        // 设置表单信息
    appType: sessionStorage.getItem('appType')
    appType: sessionStorage.getItem('appType'),
    timestamp: ''
  }
  /**
@@ -40,7 +43,8 @@
    const { card } = this.props
    this.setState({
      card: fromJS(card).toJS()
      card: fromJS(card).toJS(),
      timestamp: new Date().getTime() + ''
    })
  }
@@ -187,8 +191,99 @@
    this.props.updateElement(_card)
  }
  updateFields = (elements, resolve, type) => {
    const { card } = this.state
    let items = elements
    if (type === 'form') {
      items = []
      elements.forEach(item => {
        let cell = {
          uuid: Utils.getuuid(),
          eleType: 'text',
          height: 1,
          innerHeight: 21,
          prefix: item.label ? item.label + ': ' : '',
          datatype: item.field ? 'dynamic' : 'static',
          field: item.field || '',
          width: item.span || 12,
          value: '',
          style: {marginBottom: '15px'}
        }
        if (item.type === 'number') {
          cell.eleType = 'number'
          cell.decimal = typeof(item.decimal) === 'number' ? item.decimal : ''
        }
        items.push(cell)
      })
    }
    if (items.length === 0) {
      resolve({status: false, message: '元素不可为空!'})
      return
    }
    let _card = { ...card, elements: items }
    let _card2 = { ...card, elements: [...card.elements, ...items] }
    if (card.elements.length === 0) {
      this.setState({
        card: _card,
        timestamp: new Date().getTime() + ''
      })
      this.props.updateElement(_card)
    } else {
      const that = this
      const _modal = confirm({
        title: '卡片中已存在元素,请选择要进行的操作。',
        className: 'mk-confirm-modal',
        content: <div className="footer">
          <Button key="cancel" onClick={() => _modal.destroy()}>取消</Button>
          <Button key="replace" className="mk-border-purple" onClick={() => {
            that.setState({
              card: _card,
              timestamp: new Date().getTime() + ''
            })
            that.props.updateElement(_card)
            _modal.destroy()
          }}>替换</Button>
          <Button key="confirm" className="mk-border-green" onClick={() => {
            that.setState({
              card: _card2,
              timestamp: new Date().getTime() + ''
            })
            that.props.updateElement(_card2)
            _modal.destroy()
          }}>添加</Button>
        </div>
      })
    }
    resolve({status: true})
  }
  paste = (element, resolve) => {
    const { card } = this.state
    if (['simpleform', 'forms', 'formgroup', 'cardcell'].includes(element.copyType)) {
      if (element.copyType === 'simpleform') {
        this.updateFields(element.subcards[0].fields, resolve, 'form')
      } else if (element.copyType === 'forms') {
        this.updateFields(element.fields, resolve, 'form')
      } else if (element.copyType === 'formgroup') {
        this.updateFields(element.fields, resolve, 'form')
      } else {
        this.updateFields(element.elements, resolve)
      }
      return
    }
    let _uuid = Utils.getuuid()
    
@@ -208,7 +303,7 @@
  render() {
    const { cards } = this.props
    const { card } = this.state
    const { card, timestamp } = this.state
    let _style = {...card.style}
@@ -225,7 +320,7 @@
    return (
      <div className="card-item" style={_style}>
        <CardCellComponent cards={cards} cardCell={card} elements={card.elements} updateElement={this.updateCard}/>
        <CardCellComponent cards={cards} cardCell={card} timestamp={timestamp} elements={card.elements} updateElement={this.updateCard}/>
        <div className="card-control">
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
@@ -235,7 +330,7 @@
                <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
              </NormalForm> : <NodesWrap card={card} updateMenus={this.updateNodes}/>}
              {cards.type !== 'timeline' ? <CopyComponent type="cardcell" card={card}/> : null}
              <PasteController options={['action', 'customCardElement']} updateConfig={this.paste} />
              <PasteController options={['action', 'customCardElement', 'simpleform', 'forms', 'formgroup', 'cardcell']} updateConfig={this.paste} />
              <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
              {control ? <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
                <div className="mk-popover-control">
src/menu/components/card/cardsimplecomponent/index.scss
@@ -12,4 +12,17 @@
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
  }
}
.mk-confirm-modal {
  .ant-modal-confirm-btns {
    display: none;
  }
  .footer {
    margin-top: 24px;
    text-align: right;
    .ant-btn {
      margin-left: 8px;
    }
  }
}
src/menu/components/card/doublecardcomponent/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Col } from 'antd'
import { Popover, Col, Modal, Button } from 'antd'
import { UpOutlined, PlusOutlined, PlusSquareOutlined, EditOutlined, ToolOutlined, FontColorsOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
@@ -11,6 +11,8 @@
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const { confirm } = Modal
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CardCellComponent = asyncComponent(() => import('@/menu/components/card/cardcellcomponent'))
@@ -28,6 +30,7 @@
    card: null,            // 卡片信息,包括正反面
    appType: sessionStorage.getItem('appType'),
    visible: false,
    timestamp: '',
    side: ''
  }
@@ -38,7 +41,8 @@
    const { card } = this.props
    this.setState({
      card: fromJS(card).toJS()
      card: fromJS(card).toJS(),
      timestamp: new Date().getTime() + ''
    })
  }
@@ -208,8 +212,118 @@
    this.props.updateElement(_card)
  }
  updateFields = (elements, resolve, position, type) => {
    const { card } = this.state
    let items = elements
    if (type === 'form') {
      items = []
      elements.forEach(item => {
        let cell = {
          uuid: Utils.getuuid(),
          eleType: 'text',
          height: 1,
          innerHeight: 21,
          prefix: item.label ? item.label + ': ' : '',
          datatype: item.field ? 'dynamic' : 'static',
          field: item.field || '',
          width: item.span || 12,
          value: '',
          style: {marginBottom: '15px'}
        }
        if (item.type === 'number') {
          cell.eleType = 'number'
          cell.decimal = typeof(item.decimal) === 'number' ? item.decimal : ''
        }
        items.push(cell)
      })
    }
    if (items.length === 0) {
      resolve({status: false, message: '元素不可为空!'})
      return
    }
    let _card = { ...card }
    let _card2 = { ...card }
    let pass = false
    if (position === 'sub') {
      if (_card.backElements.length === 0) {
        _card.backElements = items
        pass = true
      } else {
        _card.backElements = items
        _card2.backElements = [...card.backElements, ...items]
      }
    } else {
      if (_card.elements.length === 0) {
        _card.elements = items
        pass = true
      } else {
        _card.elements = items
        _card2.elements = [...card.elements, ...items]
      }
    }
    if (pass) {
      this.setState({
        card: _card,
        timestamp: new Date().getTime() + ''
      })
      this.props.updateElement(_card)
    } else {
      const that = this
      const _modal = confirm({
        title: '卡片中已存在元素,请选择要进行的操作。',
        className: 'mk-confirm-modal',
        content: <div className="footer">
          <Button key="cancel" onClick={() => _modal.destroy()}>取消</Button>
          <Button key="replace" className="mk-border-purple" onClick={() => {
            that.setState({
              card: _card,
              timestamp: new Date().getTime() + ''
            })
            that.props.updateElement(_card)
            _modal.destroy()
          }}>替换</Button>
          <Button key="confirm" className="mk-border-green" onClick={() => {
            that.setState({
              card: _card2,
              timestamp: new Date().getTime() + ''
            })
            that.props.updateElement(_card2)
            _modal.destroy()
          }}>添加</Button>
        </div>
      })
    }
    resolve({status: true})
  }
  paste = (element, resolve, type) => {
    const { card } = this.state
    if (['simpleform', 'forms', 'formgroup', 'cardcell'].includes(element.copyType)) {
      if (element.copyType === 'simpleform') {
        this.updateFields(element.subcards[0].fields, resolve, type, 'form')
      } else if (element.copyType === 'forms') {
        this.updateFields(element.fields, resolve, type, 'form')
      } else if (element.copyType === 'formgroup') {
        this.updateFields(element.fields, resolve, type, 'form')
      } else {
        this.updateFields(element.elements, resolve, type)
      }
      return
    }
    let _uuid = Utils.getuuid()
    
@@ -238,7 +352,7 @@
  render() {
    const { cards } = this.props
    const { card } = this.state
    const { card, timestamp } = this.state
    let _style = {...card.style}
    let _backStyle = {...card.backStyle}
@@ -288,14 +402,14 @@
                    <EditOutlined className="edit" title="编辑"/>
                  </NormalForm>
                  <CopyComponent type="cardcell" card={{...card, backElements: []}}/>
                  <PasteController options={['action', 'customCardElement']} updateConfig={(element, resolve) => this.paste(element, resolve, 'main')} />
                  <PasteController options={['action', 'customCardElement', 'simpleform', 'forms', 'formgroup', 'cardcell']} updateConfig={(element, resolve) => this.paste(element, resolve, 'main')} />
                  <FontColorsOutlined className="style" title="调整样式" onClick={() => this.changeStyle()} />
                </div>
              } trigger="hover">
                <ToolOutlined />
              </Popover>
            </div>
            <CardCellComponent cards={cards} cardCell={card} side="main" elements={card.elements} updateElement={(elements, btn) => this.updateCard(elements, btn)}/>
            <CardCellComponent cards={cards} cardCell={card} side="main" timestamp={timestamp} elements={card.elements} updateElement={(elements, btn) => this.updateCard(elements, btn)}/>
          </div>
          <Col span={card.backSetting.width || 24}>
            <div className={'card-item ' + (card.backSetting.btnControl || '')} style={_backStyle} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard('sub')}} id={card.uuid}>
@@ -308,14 +422,14 @@
                      <EditOutlined className="edit" title="编辑"/>
                    </NormalForm>
                    <CopyComponent type="cardcell" card={{...card, elements: card.backElements, backElements: []}}/>
                    <PasteController options={['action', 'customCardElement']} updateConfig={(element, resolve) => this.paste(element, resolve, 'sub')} />
                    <PasteController options={['action', 'customCardElement', 'simpleform', 'forms', 'formgroup', 'cardcell']} updateConfig={(element, resolve) => this.paste(element, resolve, 'sub')} />
                    <FontColorsOutlined className="style" title="调整样式" onClick={() => this.changeStyle('sub')} />
                  </div>
                } trigger="hover">
                  <ToolOutlined />
                </Popover>
              </div>
              <CardCellComponent cards={cards} cardCell={card} side="sub" elements={card.backElements} updateElement={(elements, btn) => this.updateCard(elements, btn, 'sub')}/>
              <CardCellComponent cards={cards} cardCell={card} side="sub" timestamp={timestamp} elements={card.backElements} updateElement={(elements, btn) => this.updateCard(elements, btn, 'sub')}/>
            </div>
          </Col>
        </div>
src/menu/components/card/doublecardcomponent/index.scss
@@ -117,3 +117,16 @@
    display: inline-block;
  }
}
.mk-confirm-modal {
  .ant-modal-confirm-btns {
    display: none;
  }
  .footer {
    margin-top: 24px;
    text-align: right;
    .ant-btn {
      margin-left: 8px;
    }
  }
}
src/menu/components/form/formaction/actionform/index.jsx
@@ -57,7 +57,7 @@
    } else if (this.record.type === 'close' || this.record.type === 'reset') {
      shows = ['typeName', 'label']
    } else {
      shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton', 'formCache'] // 选项列表
      shows = ['typeName', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'output', 'reload', 'preButton'] // 选项列表
      if (this.record.execSuccess === 'never') {
        shows.push('resetForms')
src/menu/components/form/formaction/formconfig.jsx
@@ -539,21 +539,6 @@
        value: 'true',
        text: '刷新'
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'formCache',
    //   label: '表单缓存',
    //   initVal: card.formCache || 'false',
    //   tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
    //   required: false,
    //   options: [{
    //     value: 'false',
    //     text: '不清空'
    //   }, {
    //     value: 'clear',
    //     text: '清空'
    //   }]
    // },
    }
  ]
}
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -15,9 +15,9 @@
const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror'))
const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable'))
const acTyOptions = {
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'formCache'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'formCache'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton', 'formCache'],
  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton'],
  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton'],
  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'],
  excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'],
  popview: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'],
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -1068,7 +1068,7 @@
      key: 'tipTitle',
      label: '确认提示',
      initVal: card.tipTitle || '',
      tooltip: '注:弹窗(表单)在显示为是否框时有效。',
      tooltip: '提示框的确认提示信息。',
      required: false
    },
    {
@@ -1328,21 +1328,21 @@
      initVal: card.reason || '',
      required: false
    },
    {
      type: 'radio',
      key: 'formCache',
      label: '表单缓存',
      initVal: card.formCache || 'false',
      tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
      required: false,
      options: [{
        value: 'false',
        text: '不清空'
      }, {
        value: 'clear',
        text: '清空'
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'formCache',
    //   label: '表单缓存',
    //   initVal: card.formCache || 'false',
    //   tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
    //   required: false,
    //   options: [{
    //     value: 'false',
    //     text: '不清空'
    //   }, {
    //     value: 'clear',
    //     text: '清空'
    //   }]
    // },
    {
      type: 'radio',
      key: 'hidden',
@@ -2338,7 +2338,7 @@
      key: 'tipTitle',
      label: '确认提示',
      initVal: card.tipTitle || '',
      tooltip: '注:弹窗(表单)在显示为是否框时有效。',
      tooltip: '提示框的确认提示信息。',
      required: false
    },
    {
@@ -2519,21 +2519,21 @@
      initVal: card.reason || '',
      required: false
    },
    {
      type: 'radio',
      key: 'formCache',
      label: '表单缓存',
      initVal: card.formCache || 'false',
      tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
      required: false,
      options: [{
        value: 'false',
        text: '不清空'
      }, {
        value: 'clear',
        text: '清空'
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'formCache',
    //   label: '表单缓存',
    //   initVal: card.formCache || 'false',
    //   tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
    //   required: false,
    //   options: [{
    //     value: 'false',
    //     text: '不清空'
    //   }, {
    //     value: 'clear',
    //     text: '清空'
    //   }]
    // },
    {
      type: 'radio',
      key: 'hidden',
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -76,6 +76,14 @@
    _data.$$BID = BID || ''
    _data.$$BData = BData || ''
    if (_config.wrap.datatype === 'static' && BData) {
      Object.keys(BData).forEach(key => {
        if (/\$/.test(key)) return
        _data[key] = BData[key]
      })
    }
    if (_config.setting.primaryKey) {
      _data.$$uuid = _data[_config.setting.primaryKey] || ''
    }
@@ -494,8 +502,16 @@
    }
    
    if (config.wrap.datatype === 'static') {
      let _data = {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()}
      if (BData) {
        Object.keys(BData).forEach(key => {
          if (/\$/.test(key)) return
          _data[key] = BData[key]
        })
      }
      this.setState({
        data: {$$BID: BID || '', $$BData: BData, $$empty: true, $$time: new Date().getTime()},
        data: _data,
      })
      if (!btn) {
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -2351,9 +2351,9 @@
      tabId = btn.refreshTab[btn.refreshTab.length - 1]
    }
    if (btn.formCache === 'clear') { // 清除表单缓存
      window.GLOB.CacheMap = new Map()
    }
    // if (btn.formCache === 'clear') { // 清除表单缓存
    //   window.GLOB.CacheMap = new Map()
    // }
    if (tabId && btn.$MenuID === tabId) { // 刷新当前菜单时,停止其他操作
      MKEmitter.emit('reloadMenuView', tabId, 'table')
@@ -3205,7 +3205,7 @@
  }
  modelconfirm = () => {
    const { btn, BID } = this.props
    const { BID } = this.props
    const { btnconfig, selines } = this.state
    let _this = this
@@ -3350,7 +3350,7 @@
      this.execSubmit(selines, () => {}, result)
    } else {
      confirm({
        title: btn.tipTitle || '确定要执行吗?',
        title: btnconfig.setting.tipTitle || '确定要执行吗?',
        onOk() {
          return new Promise(resolve => {
            _this.execSubmit(selines, resolve, result)
src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -174,9 +174,9 @@
    let _data = null
    let primaryId = ''
    if (btn.Ot === 'requiredSgl' && setting.primaryKey) {
    if (btn.Ot === 'requiredSgl') {
      _data = data[0]
      primaryId = _data.$$uuid || _data[setting.primaryKey] || ''
      primaryId = _data.$$uuid || ''
    }
    this.setState({
src/tabviews/zshare/mutilform/index.jsx
@@ -148,6 +148,7 @@
      item.readin = item.readin !== 'false' && item.readin !== 'top'
      item.readonly = check || item.readonly === 'true'
      item.writein = item.writein !== 'false'
      item.defHidden = item.hidden === 'true'
      item.hidden = item.hidden === 'true'
      item.fieldlength = item.fieldlength || 50
@@ -497,7 +498,7 @@
        let _hidden = false
        if (supItem.hidden) {
        if (supItem.hidden && !supItem.defHidden) {
          _hidden = true
        } else {
          let box = [...item.values]
src/templates/modalconfig/settingform/index.jsx
@@ -347,8 +347,13 @@
              )}
            </Form.Item>
          </Col> : null}
          {appType !== 'mob' ? <Col span={12}>
            <Form.Item label="表单类型">
          {appType !== 'mob' && (display === 'drawer' || display === 'modal') ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="选择查看时表单均为只读,仅用于数据展示。">
                <QuestionCircleOutlined className="mk-form-tip" />
                表单类型
              </Tooltip>
            }>
              {getFieldDecorator('formType', {
                initialValue: config.setting.formType || 'edit'
              })(
@@ -359,6 +364,20 @@
              )}
            </Form.Item>
          </Col> : null}
          {display === 'prompt' ? <Col span={12}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="提示框的确认提示信息。">
                <QuestionCircleOutlined className="mk-form-tip" />
                确认提示
              </Tooltip>
            }>
              {getFieldDecorator('tipTitle', {
                initialValue: config.setting.tipTitle || ''
              })(
                <Input autoComplete="off" onPressEnter={this.handleSubmit} />
              )}
            </Form.Item>
          </Col> : null}
          {!this.props.isSubTab && !appType && this.state.viewType !== 'popview' && display === 'modal' ? <Col span={12}>
            <Form.Item label="挂载对象">
              {getFieldDecorator('container', {
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -13,7 +13,7 @@
const { TextArea } = Input
const actionTypeOptions = {
  pop: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle', 'hidden'],
  pop: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'hidden'],
  prompt: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle', 'hidden'],
  exec: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'hidden'],
  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'hidden'],
src/templates/sharecomponent/actioncomponent/formconfig.jsx
@@ -523,7 +523,7 @@
      key: 'tipTitle',
      label: '确认提示',
      initVal: card.tipTitle || '',
      tooltip: '注:弹窗(表单)在显示为是否框时有效。',
      tooltip: '提示框的确认提示信息。',
      required: false
    },
    {
src/templates/zshare/pasteform/index.jsx
@@ -116,7 +116,7 @@
      <Form {...formItemLayout} className="config-paste-form">
        <Row gutter={24}>
          <Col span={24}>
            <Form.Item label="配置信息" className="textarea">
            <Form.Item label="" className="textarea">
              {getFieldDecorator('config', {
                initialValue: '',
                rules: [
src/utils/utils-custom.js
@@ -193,6 +193,42 @@
  }
  /**
   * @description 获取指定组件
   * @return {String}  组件id
   */
  static getComponent (Id) {
    let interfaces = window.GLOB.customMenu.interfaces
    let components = window.GLOB.customMenu.components
    let cell = null
    let mapComponents = (components = []) => {
      components.forEach(item => {
        if (item.uuid === Id) {
          cell = item
        }else if (item.type === 'tabs') {
          item.subtabs.forEach(f_tab => {
            mapComponents(f_tab.components)
          })
        } else if (item.type === 'group') {
          mapComponents(item.components)
        }
      })
    }
    mapComponents(components)
    if (!cell && interfaces) {
      interfaces.forEach(m => {
        if (m.uuid === Id && m.status === 'true') {
          cell = m
        }
      })
    }
    return cell
  }
  /**
   * @description 获取上级模块
   * @return {String}  selfId  当前组件id
   */