| | |
| | | import MarkForm from './markform' |
| | | import './index.scss' |
| | | import { minkeIconSystem } from '@/utils/option.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import '@/assets/css/table.scss' |
| | | |
| | | const EditTable = asyncComponent(() => import('@/templates/zshare/editTable')) |
| | |
| | | class MarkColumn extends Component { |
| | | static propTpyes = { |
| | | columns: PropTypes.array, // 显示列 |
| | | dict: PropTypes.object, // 字典项 |
| | | marks: PropTypes.object, |
| | | onSubmit: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | marks: null, |
| | | columns: null, |
| | | visible: false, |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { dict } = this.props |
| | | const { marks, markColumns, visible, options, signs } = this.state |
| | | const { marks, markColumns, visible, options, signs, dict } = this.state |
| | | |
| | | return ( |
| | | <div style={{display: 'inline-block'}}> |
| | |
| | | destroyOnClose |
| | | > |
| | | <MarkForm dict={dict} signs={signs} columns={options} markChange={this.markChange}/> |
| | | <EditTable data={marks} columns={markColumns} onChange={(marks) => this.setState({marks})}/> |
| | | <EditTable actions={['edit', 'move', 'del']} data={marks} columns={markColumns} onChange={(marks) => this.setState({marks})}/> |
| | | </Modal> |
| | | </div> |
| | | ) |