| | |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Button, Spin, Icon, Col, Card, Tabs, Row, Input } from 'antd' |
| | | import moment from 'moment' |
| | | import Preview from '@/components/preview' |
| | | import Preview from './preview' |
| | | import TransferForm from '@/components/transferform' |
| | | import Utils from '@/utils/utils.js' |
| | | import DragElement from '../menuelement' |
| | |
| | | menuConfig: '', |
| | | tempSearchKey: '', |
| | | loading: false, |
| | | preview: null, |
| | | pretemplate: null, |
| | | baseTemplates: [{ |
| | | title: '基础表格', |
| | | type: 'CommonTable', |
| | |
| | | }) |
| | | } |
| | | |
| | | previewPicture = (url) => { |
| | | previewPicture = (template) => { |
| | | // 图片预览 |
| | | this.setState({ |
| | | preview: url |
| | | preview: template.url, |
| | | pretemplate: template |
| | | }) |
| | | } |
| | | |
| | |
| | | <Col key={template.type} span={8}> |
| | | <Card |
| | | title={template.title}> |
| | | <img onClick={() => {this.previewPicture(template.url)}} src={template.url} alt=""/> |
| | | <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/> |
| | | <div className="card-operation"> |
| | | {/* <Button type="primary" onClick={() => {this.previewPicture(template.url)}}>预览</Button> */} |
| | | <Button type="primary" onClick={() => {this.useTemplate(template)}}>使用模板</Button> |
| | | </div> |
| | | </Card> |
| | |
| | | <Col key={template.type + index} span={8}> |
| | | <Card |
| | | title={template.title}> |
| | | <img onClick={() => {this.previewPicture(template.url)}} src={template.url} alt=""/> |
| | | <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/> |
| | | <div className="card-operation"> |
| | | {/* <Button type="primary" onClick={() => {this.previewPicture(template.url)}}>预览</Button> */} |
| | | <Button type="primary" onClick={() => {this.useTemplate(template)}}>使用模板</Button> |
| | | </div> |
| | | </Card> |
| | |
| | | /> |
| | | } |
| | | {/* 图片预览 */} |
| | | <Preview cancel={this.cancelPrePicture} preview={this.state.preview}/> |
| | | <Preview cancel={this.cancelPrePicture} preview={this.state.preview} template={this.state.pretemplate} confirm={this.useTemplate}/> |
| | | {/* 解冻菜单模态框 */} |
| | | <Modal |
| | | title={this.state.dict['header.thawmenu']} |