king
2021-05-31 ec9c3ddc2b439180204e8432fb805920ed0d11c1
2021-05-31
3个文件已修改
40 ■■■■■ 已修改文件
src/menu/datasource/verifycard/index.jsx 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/components/formdragelement/card.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Form, Tabs, Popconfirm, Icon, notification, Modal, Typography, Spin } from 'antd'
import { Form, Tabs, Popconfirm, Icon, notification, Modal, Typography, Spin, message } from 'antd'
import moment from 'moment'
import Api from '@/api'
@@ -623,6 +623,27 @@
    })
  }
  copyColumns = () => {
    const { columns } = this.state
    let m = []
    let n = []
    columns.forEach(col => {
      m.push(`${col.field}(${col.label})`)
      n.push(col.field)
    })
    let oInput = document.createElement('input')
    oInput.value = `/*${m.join(',')}*/
      ${n.join(',')}`
    document.body.appendChild(oInput)
    oInput.select()
    document.execCommand('Copy')
    document.body.removeChild(oInput)
    message.success('复制成功。')
  }
  /**
   * @description 组件销毁,清除state更新
   */
@@ -658,6 +679,7 @@
              type="fields"
              updatefield={this.updatefields}
            />
            <Icon type="copy" onClick={this.copyColumns} style={{position: 'absolute', cursor: 'pointer', zIndex: 1, top: '-35px', right: '0px', color: '#1890ff'}} />
            <EditTable actions={['edit', 'move', 'copy', 'del']} type="datasourcefield" data={columns} columns={colColumns} onChange={(columns) => this.setState({columns})}/>
          </TabPane>
          <TabPane tab={
src/mob/components/formdragelement/card.jsx
@@ -85,7 +85,17 @@
      </div>
    </div>)
  } else if (card.type === 'fileupload') {
    formItem = (<Button style={{marginTop: '3px'}}><Icon type="upload" /> 点击上传 </Button>)
    formItem = (
      <div className="am-list-item checkbox">
        <div className="am-list-line">
          <div className="am-input-label">{card.label}</div>
          <div className="am-input-control" style={{textAlign: 'left'}}>
            {card.fileType !== 'picture-card' ? <Icon type="upload" style={{position: 'absolute', right: '10px', top: '10px'}} /> : null}
            {card.fileType === 'picture-card' ? <Button style={{width: '100px', marginBottom: '10px', height: '100px', fontSize: '50px', color: '#d9d9d9'}}><Icon type="plus" /></Button> : null}
          </div>
        </div>
      </div>
    )
  } else if (card.type === 'funcvar') {
    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.linkfield}</div></div></div>)
  } else if (card.type === 'switch') {
src/templates/zshare/formconfig.jsx
@@ -2561,9 +2561,9 @@
    {
      type: 'radio',
      key: 'compress',
      label: '前端压缩',
      label: '压缩',
      initVal: card.compress || 'false',
      tooltip: '前端压缩必须为图片。',
      tooltip: '文件压缩必须为图片,图片格式为jpg、png、gif 或 jpeg',
      options: [{
        value: 'true',
        text: Formdict['model.true']