| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Modal, Button, Popconfirm, Table } from 'antd' |
| | | import { Modal, Button, Popconfirm, Table } from 'antd' |
| | | import { RedoOutlined, CloseOutlined, RollbackOutlined } from '@ant-design/icons' |
| | | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | appType: sessionStorage.getItem('appType'), |
| | | visible: false, |
| | | data: [], |
| | | columns: [ |
| | |
| | | title="确定恢复记录吗?" |
| | | onConfirm={() => this.revert(record)} |
| | | > |
| | | <span title="恢复" style={{color: '#26C281', fontSize: '16px', marginRight: '5px', cursor: 'pointer', padding: '5px'}}><Icon type="redo" /></span> |
| | | <span title="恢复" style={{color: '#26C281', fontSize: '16px', marginRight: '5px', cursor: 'pointer', padding: '5px'}}><RedoOutlined /></span> |
| | | </Popconfirm> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title="确定清除记录吗?" |
| | | onConfirm={() => this.handleDelete(record)} |
| | | > |
| | | <span title="清除" style={{color: '#ff4d4f', fontSize: '16px', cursor: 'pointer', padding: '5px'}}><Icon type="close" /></span> |
| | | <span title="清除" style={{color: '#ff4d4f', fontSize: '16px', cursor: 'pointer', padding: '5px'}}><CloseOutlined /></span> |
| | | </Popconfirm> |
| | | </div>) |
| | | } |
| | |
| | | } |
| | | |
| | | revert = (item) => { |
| | | const { appType } = this.state |
| | | const data = this.state.data.filter(d => d.uuid !== item.uuid) |
| | | |
| | | this.setState({data}) |
| | | MKEmitter.emit('thawButtons', item.uuid) |
| | | this.props.handlelog('revert', data, item) |
| | | |
| | | if (appType === 'mob' || (appType === 'pc' && item.OpenType !== 'popview')) return |
| | | |
| | | MKEmitter.emit('thawButtons', item.uuid) |
| | | } |
| | | |
| | | handleDelete = (item) => { |
| | |
| | | |
| | | return ( |
| | | <div className="btn-log-wrap"> |
| | | <Icon type="rollback" title="解除冻结" onClick={this.trigger} /> |
| | | <RollbackOutlined title="解除冻结" onClick={this.trigger} /> |
| | | <Modal |
| | | wrapClassName="popview-modal" |
| | | title="历史记录" |