From ec9c3ddc2b439180204e8432fb805920ed0d11c1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 31 五月 2021 19:11:09 +0800 Subject: [PATCH] 2021-05-31 --- src/mob/components/formdragelement/card.jsx | 12 +++++++++++- src/templates/zshare/formconfig.jsx | 4 ++-- src/menu/datasource/verifycard/index.jsx | 24 +++++++++++++++++++++++- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index b21db46..0e0666e 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/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={ diff --git a/src/mob/components/formdragelement/card.jsx b/src/mob/components/formdragelement/card.jsx index ba71189..31bed88 100644 --- a/src/mob/components/formdragelement/card.jsx +++ b/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') { diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 74f69e9..b219e0e 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -2561,9 +2561,9 @@ { type: 'radio', key: 'compress', - label: '鍓嶇鍘嬬缉', + label: '鍘嬬缉', initVal: card.compress || 'false', - tooltip: '鍓嶇鍘嬬缉蹇呴』涓哄浘鐗囥��', + tooltip: '鏂囦欢鍘嬬缉蹇呴』涓哄浘鐗囷紝鍥剧墖鏍煎紡涓簀pg銆乸ng銆乬if 鎴� jpeg', options: [{ value: 'true', text: Formdict['model.true'] -- Gitblit v1.8.0