| | |
| | | import { Button, Modal, Empty, notification } from 'antd' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import EditCard from './editcard' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | appType: sessionStorage.getItem('appType'), |
| | | fields: [], // 字段集 |
| | | visible: false, // 模态框控制 |
| | |
| | | |
| | | render() { |
| | | const { type } = this.props |
| | | const { dict, fields } = this.state |
| | | const { fields } = this.state |
| | | |
| | | return ( |
| | | <div className="quickly-add"> |
| | | <Button type="primary" block onClick={this.queryField}>{dict['model.batchAdd']}</Button> |
| | | <Button type="primary" block onClick={this.queryField}>批量添加</Button> |
| | | {/* 根据字段名添加显示列及搜索条件 */} |
| | | <Modal |
| | | wrapClassName="model-table-fieldmanage-modal" |
| | | title={dict['model.edit']} |
| | | title="编辑" |
| | | visible={this.state.visible} |
| | | width={'65vw'} |
| | | maskClosable={false} |
| | | cancelText={dict['model.close']} |
| | | cancelText="关闭" |
| | | onOk={this.addFieldSubmit} |
| | | onCancel={() => this.setState({ visible: false })} |
| | | destroyOnClose |