| | |
| | | import { fromJS } from 'immutable' |
| | | import { DndProvider, DragSource, DropTarget } from 'react-dnd' |
| | | import { Table, Input, InputNumber, Popconfirm, Form, Select, Radio, Cascader, notification, Typography, Button } from 'antd' |
| | | import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | import { PlusOutlined, EditOutlined, DeleteOutlined, ArrowRightOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import ColorSketch from '@/mob/colorsketch' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | let actions = this.props.actions || [] |
| | | let columns = fromJS(this.props.columns).toJS() |
| | | |
| | | let operation = { |
| | |
| | | <span className="danger"><DeleteOutlined /></span> |
| | | </Popconfirm> : null} |
| | | {editingKey !== '' ? <span className="danger"><DeleteOutlined /></span> : null} |
| | | {actions.includes('view') ? <span className="copy" onClick={() => {editingKey === '' && this.changeMenu(record.menu)}}><ArrowRightOutlined /></span> : null} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | // return !is(fromJS(this.state), fromJS(nextState)) |
| | | // } |
| | | |
| | | changeMenu = (MenuId) => { |
| | | if (MenuId === 'IM') { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', {MenuID: MenuId}) |
| | | } |
| | | } |
| | | |
| | | isEditing = record => record.uuid === this.state.editingKey |
| | | |
| | | cancel = () => { |